Path: TD version of getEnvelope for testing.

This commit is contained in:
sliptonic
2017-05-09 14:01:46 -05:00
committed by wmayer
parent c7afbd1e12
commit 0917fcb37b

View File

@@ -211,6 +211,23 @@ def getEnvelope(partshape, stockheight=None):
else:
return sec.extrude(FreeCAD.Vector(0, 0, partshape.BoundBox.ZMax))
def getEnvelopeTD(partshape, stockheight=None):
'''
getEnvelopTD(partshape, stockheight=None)
Uses the TechDraw findShapeOutline to return a shape corresponding to the
partshape silhouette extruded to height. if stockheight is given, the
returned shape is extruded to that height otherwise the returned shape
is the height of the original shape boundbox
partshape = solid object
stockheight = float
'''
import TechDraw
sec = Part.Face(TechDraw.findShapeOutline(partshape, 1 , FreeCAD.Vector(0,0,1)))
if stockheight is not None:
return sec.extrude(FreeCAD.Vector(0, 0, stockheight))
else:
return sec.extrude(FreeCAD.Vector(0, 0, partshape.BoundBox.ZMax))
def reverseEdge(e):
if geomType(e) == "Circle":
arcstpt = e.valueAt(e.FirstParameter)