File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ def getArcMinMaxPoints(draw):
7979def getMinMax2DimOfBoard (board ):
8080 minMax2Dim = MinMax2DimHolder ()
8181
82- for draw in board . GetDrawings ( ):
82+ def updateMinMax2DimByDrawing ( draw ):
8383 if draw .GetClass () in ["DRAWSEGMENT" , "PCB_SHAPE" ] and draw .GetLayerName () == 'Edge.Cuts' :
8484 if draw .GetShape () == pcbnew .S_ARC :
8585 for point in getArcMinMaxPoints (draw ):
@@ -95,6 +95,12 @@ def getMinMax2DimOfBoard(board):
9595 minMax2Dim .updateMinMax (draw .GetStart ())
9696 minMax2Dim .updateMinMax (draw .GetEnd ())
9797
98+ for draw in board .GetDrawings ():
99+ updateMinMax2DimByDrawing (draw )
100+ for footprint in board .GetFootprints ():
101+ for graphicalItem in footprint .GraphicalItems ():
102+ updateMinMax2DimByDrawing (graphicalItem )
103+
98104 return minMax2Dim
99105 if minMax2Dim .x .isMinOrMaxNone () or minMax2Dim .y .isMinOrMaxNone ():
100106 return None
You can’t perform that action at this time.
0 commit comments