Path: contour handles arch panels
This commit is contained in:
committed by
Yorik van Havre
parent
3303c4dc45
commit
79e9f76252
@@ -30,6 +30,7 @@ from PathScripts import PathUtils
|
||||
from PathScripts.PathUtils import depth_params
|
||||
from PySide import QtCore
|
||||
import TechDraw
|
||||
import ArchPanel
|
||||
|
||||
LOG_MODULE = 'PathContour'
|
||||
PathLog.setLevel(PathLog.Level.INFO, LOG_MODULE)
|
||||
@@ -220,14 +221,30 @@ class ObjectContour:
|
||||
baseobject = parentJob.Base
|
||||
if baseobject is None:
|
||||
return
|
||||
contourwire = TechDraw.findShapeOutline(baseobject.Shape, 1, Vector(0, 0, 1))
|
||||
|
||||
edgelist = contourwire.Edges
|
||||
edgelist = Part.__sortEdges__(edgelist)
|
||||
try:
|
||||
output += self._buildPathLibarea(obj, edgelist)
|
||||
except:
|
||||
FreeCAD.Console.PrintError("Something unexpected happened. Unable to generate a contour path. Check project and tool config.")
|
||||
if isinstance(baseobject.Proxy, ArchPanel.PanelSheet): # process the sheet
|
||||
baseobject.Proxy.execute(baseobject)
|
||||
for subobj in baseobject.Group: # process the group of panels
|
||||
if isinstance(subobj.Proxy, ArchPanel.PanelCut):
|
||||
subobj.Proxy.execute(subobj)
|
||||
contourwire = TechDraw.findOuterWire(subobj.Shape.Edges)
|
||||
if contourwire is not None:
|
||||
edgelist = contourwire.Edges
|
||||
edgelist = Part.__sortEdges__(edgelist)
|
||||
try:
|
||||
output += self._buildPathLibarea(obj, edgelist)
|
||||
except:
|
||||
FreeCAD.Console.PrintError("Something unexpected happened. Unable to generate a contour path. Check project and tool config.")
|
||||
else:
|
||||
contourwire = TechDraw.findShapeOutline(baseobject.Shape, 1, Vector(0, 0, 1))
|
||||
|
||||
edgelist = contourwire.Edges
|
||||
edgelist = Part.__sortEdges__(edgelist)
|
||||
|
||||
try:
|
||||
output += self._buildPathLibarea(obj, edgelist)
|
||||
except:
|
||||
FreeCAD.Console.PrintError("Something unexpected happened. Unable to generate a contour path. Check project and tool config.")
|
||||
if obj.Active:
|
||||
path = Path.Path(output)
|
||||
obj.Path = path
|
||||
|
||||
Reference in New Issue
Block a user