Path: Several small bugs related to Arch Panel support in Path.
Sheet tag placement not including the sheet offset contour not using sheet attributes Engraving not using sheet attributes Profile not using transform.
This commit is contained in:
@@ -949,7 +949,10 @@ class PanelSheet(Draft._DraftObject):
|
||||
w.Placement = obj.Placement.multiply(w.Placement)
|
||||
outp.append(w)
|
||||
if self.sheettag is not None:
|
||||
outp.append(self.sheettag)
|
||||
w = self.sheettag.copy()
|
||||
if transform:
|
||||
w.Placement = obj.Placement.multiply(w.Placement)
|
||||
outp.append(w)
|
||||
|
||||
return outp
|
||||
|
||||
|
||||
@@ -227,15 +227,16 @@ class ObjectContour:
|
||||
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.")
|
||||
shapes = baseobject.Proxy.getOutlines(baseobject, transform=True)
|
||||
for shape in shapes:
|
||||
for wire in shape.Wires:
|
||||
edgelist = wire.Edges
|
||||
edgelist = Part.__sortEdges__(edgelist)
|
||||
PathLog.debug("Processing panel perimeter. edges found: {}".format(len(edgelist))) # subobj.Proxy.execute(subobj)
|
||||
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))
|
||||
|
||||
|
||||
@@ -205,6 +205,7 @@ class ObjectDrilling:
|
||||
tooldiameter = obj.ToolController.Proxy.getTool(obj.ToolController).Diameter
|
||||
PathLog.debug('search for holes larger than tooldiameter: {}: '.format(tooldiameter))
|
||||
if dgu.isPlanar(shape):
|
||||
PathLog.debug("shape is planar")
|
||||
for i in range(len(shape.Edges)):
|
||||
candidateEdgeName = "Edge" + str(i +1)
|
||||
e = shape.getElement(candidateEdgeName)
|
||||
@@ -215,6 +216,7 @@ class ObjectDrilling:
|
||||
diameter = e.BoundBox.XLength
|
||||
holelist.append((candidateEdgeName, e, x, y, diameter))
|
||||
else:
|
||||
PathLog.debug("shape is not planar")
|
||||
for i in range(len(shape.Faces)):
|
||||
candidateFaceName = "Face" + str(i + 1)
|
||||
f = shape.getElement(candidateFaceName)
|
||||
|
||||
@@ -131,7 +131,8 @@ class ObjectPathEngrave:
|
||||
output += self.buildpathocc(obj, wires)
|
||||
|
||||
elif isinstance(baseobject.Proxy, ArchPanel.PanelSheet): # process the sheet
|
||||
shapes = baseobject.Proxy.getTags(baseobject)
|
||||
|
||||
shapes = baseobject.Proxy.getTags(baseobject, transform=True)
|
||||
for shape in shapes:
|
||||
output += "G0 Z" + PathUtils.fmt(obj.ClearanceHeight.Value) + "F " + PathUtils.fmt(self.vertRapid) + "\n"
|
||||
for w in shape.Wires:
|
||||
|
||||
@@ -284,7 +284,7 @@ print "y - " + str(point.y)
|
||||
if hasattr(baseobject, "Proxy"):
|
||||
if isinstance(baseobject.Proxy, ArchPanel.PanelSheet): # process the sheet
|
||||
if obj.processPerimeter:
|
||||
shapes = baseobject.Proxy.getOutlines(baseobject, transform=False)
|
||||
shapes = baseobject.Proxy.getOutlines(baseobject, transform=True)
|
||||
for shape in shapes:
|
||||
for wire in shape.Wires:
|
||||
edgelist = wire.Edges
|
||||
@@ -295,7 +295,7 @@ print "y - " + str(point.y)
|
||||
except:
|
||||
FreeCAD.Console.PrintError("Something unexpected happened. Unable to generate a contour path. Check project and tool config.")
|
||||
|
||||
shapes = baseobject.Proxy.getHoles(baseobject, transform=False)
|
||||
shapes = baseobject.Proxy.getHoles(baseobject, transform=True)
|
||||
for shape in shapes:
|
||||
for wire in shape.Wires:
|
||||
drillable = PathUtils.isDrillable(baseobject.Proxy, wire)
|
||||
|
||||
Reference in New Issue
Block a user