extract BoardArcs along with BoardPolygon
This commit is contained in:
parent
3984abc2f3
commit
22ccb608dc
1 changed files with 2 additions and 3 deletions
|
@ -4,7 +4,7 @@ import FreeCAD as App
|
||||||
from . import settings
|
from . import settings
|
||||||
import Part
|
import Part
|
||||||
|
|
||||||
from kipy.board_types import Footprint3DModel, BoardPolygon, BoardSegment, PadStackShape
|
from kipy.board_types import Footprint3DModel, BoardArc, BoardPolygon, BoardSegment, PadStackShape
|
||||||
from kipy.geometry import PolygonWithHoles, PolyLine, PolyLineNode, Vector2
|
from kipy.geometry import PolygonWithHoles, PolyLine, PolyLineNode, Vector2
|
||||||
from kipy.proto.common.types import KiCadObjectType
|
from kipy.proto.common.types import KiCadObjectType
|
||||||
from kipy.util.board_layer import BoardLayer
|
from kipy.util.board_layer import BoardLayer
|
||||||
|
@ -197,8 +197,7 @@ def makeBoard(parent, kicad_board, polygon):
|
||||||
def extract_polygons(board):
|
def extract_polygons(board):
|
||||||
# find polygons of Edge Cuts
|
# find polygons of Edge Cuts
|
||||||
edge_cuts = [ edge for edge in board.get_shapes() if edge.layer == BoardLayer.BL_Edge_Cuts ]
|
edge_cuts = [ edge for edge in board.get_shapes() if edge.layer == BoardLayer.BL_Edge_Cuts ]
|
||||||
polygons = [ edge for edge in edge_cuts if isinstance(edge, BoardPolygon) ]
|
polygons = [ edge for edge in edge_cuts if (isinstance(edge, BoardPolygon) or isinstance(edge, BoardArc)) ]
|
||||||
|
|
||||||
# XXX only single board supported at the moment
|
|
||||||
return polygons
|
return polygons
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue