@property
    def bounds(self):
        xmin = ymin = 100000000000
        xmax = ymax = -100000000000
        for hit in self.hits:
            radius = hit.tool.diameter / 2.
            x, y = hit.position
            xmin = min(x - radius, xmin)
            xmax = max(x + radius, xmax)
            ymin = min(y - radius, ymin)
            ymax = max(y + radius, ymax)
        return ((xmin, xmax), (ymin, ymax))
dataset/ETHPy150Open curtacircuitos/pcb-tools/gerber/excellon.py/ExcellonFile.bounds/original