I probably have but I've slept since then and probably forgot. Sorry if I'm making you repeat yourself. Must be getting old.realthunder wrote: I thought you've called that method before?
I've been playing with 'project=True' for a couple days and haven't hit any problem shapes yet. However, it doesn't seem to be as fast as the TechDraw method.And in case you've missed my previous post. Please also try calling makeSections(project=True ...) to see if it can replace TechDraw.findShapeOutline. It is a complex operation, and I am expecting some problems here.
my benchmark script might be flawed so I'm including it below. With this script I'm getting results where the TechDraw method is from .3x to 5x faster depending on the shape.:
Code: Select all
import TechDraw
import Part
import Path
import timeit
sel = Gui.Selection.getSelectionEx()[0]
obj = sel.Object
shape = obj.Shape
def areaway():
z = Path.Area(Offset=0,SectionCount=1, Project=True)
z.add(shape)
x = z.getShape()
# Part.show(x)
def techdrawway():
x = TechDraw.findShapeOutline(shape, 1, FreeCAD.Vector(0,0,1))
# Part.show(x)
print (timeit.timeit(areaway, number=100))
print (timeit.timeit(techdrawway, number=100))
#areaway()
#techdrawway()