path: more collision support

Made depthparams an iterable.
This commit is contained in:
sliptonic
2017-06-21 15:23:38 -05:00
committed by wmayer
parent 0326b5ba49
commit 8b804d71ae
7 changed files with 158 additions and 88 deletions

View File

@@ -178,21 +178,11 @@ class ObjectContour:
simobj = None
if getsim:
#from PathScripts.PathUtils import CollisionTester
parentJob = PathUtils.findParentJob(obj)
if parentJob is None:
pass
base = parentJob.Base
if base is None:
pass
profileparams['Thicken'] = True #{'Fill':0, 'Coplanar':0, 'Project':True, 'SectionMode':2, 'Thicken':True}
profileparams['ToolRadius']= self.radius - self.radius *.005
profile.setParams(**profileparams)
sec = profile.makeSections(heights=[0.0])[0].getShape()
sec = profile.makeSections(mode=0, project=False, heights=depthparams.get_depths())[-1].getShape()
simobj = sec.extrude(FreeCAD.Vector(0,0,baseobject.BoundBox.ZMax))
#c = CollisionTester()
#simobj = c.getCollisionSim(base.Shape, cutPath)
return pp, simobj