def run_pathanalyzer(obj,app=None,forcereload=True,createFC=False):
''' split path into intervals '''
import reconstruction.pathanalyser
if forcereload: reload(reconstruction.pathanalyser)
if app <> None:
FreeCAD.app=app
try: obj.Proxy.pl2
except:
sayexc("no data - run FindPathes first")
errorDialog("no data - run FindPathes first")
return
try: widget=obj.Proxy.analyzer
except: widget=None
hideApprox=obj.hideApproximation
if obj.pathSelection: # process selected path
analyzer=reconstruction.pathanalyser.runsel(obj.N,obj.Threshold,widget,createFC,obj)
elif obj.pathId==-1: # process pathObject
analyzer=reconstruction.pathanalyser.runobj(obj.pathObject,obj.N,obj.Threshold,widget,createFC,obj)
else: # process object by index number
analyzer=reconstruction.pathanalyser.run(obj.Proxy.pl2,obj.pathId,obj.N,obj.Threshold,widget,createFC,obj)
obj.Proxy.analyzer=analyzer
return
评论列表
文章目录