PathPocketShape.StartDepth : unable to change in FreeCADCmd

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
cristian.a73
Posts: 41
Joined: Wed Jul 18, 2018 4:15 pm

PathPocketShape.StartDepth : unable to change in FreeCADCmd

Post by cristian.a73 »

Hi FreeCAD Forumer

In my code I create a PathPocketShape object onto a planar face, by doing this :

Code: Select all

pRootObject.Shape.tessellate(0.1)
localJobObj = PathJob.Create("Job", [ pRootObject ] )
objFaceMill = PathPocketShape.Create(opTitle)
objFaceMill.Base = [ ( pRoot, ( face_name ) ) ]
objFaceMill.recompute()
objFaceMill.StartDepth = sZ
objFaceMill.FinalDepth = eZ
In the GUI version (windows 7) it works great, but in Command line (ubuntu) StartDepth does not change
so I tryed several ways but none of these works :

Code: Select all

objFaceMill.setEditorMode('StartDepth', 0)
objFaceMill.setExpression('StartDepth', '%0.3f'%sZ+'' )
objFaceMill.setExpression('StartDepth', '%0.3f'%sZ+'mm' )
objFaceMill.StartDepth = sZ
objFaceMill.StartDepth.Value = sZ

objFaceMill.setEditorMode('OpStartDepth', 0)
objFaceMill.setExpression('OpStartDepth', '%0.3f'%sZ+'' )
objFaceMill.setExpression('OpStartDepth', '%0.3f'%sZ+'mm' )
objFaceMill.OpStartDepth= sZ
objFaceMill.OpStartDepth.Value = sZ

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 32-bit
Version: 0.18.15527 (Git)
Build type: Release
Branch: master
Hash: 70aaf3e95fe2a3f17d43e95a1afe7d903d91b8ae
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Italian/Italy (it_IT)

under linux : FreeCAD 0.18, Libs: 6.0R2019


Could someone help me about why cannot change StartDepth ?

Thank you
Cristian
Last edited by cristian.a73 on Tue Jan 29, 2019 12:56 am, edited 1 time in total.
chrisb
Veteran
Posts: 54302
Joined: Tue Mar 17, 2015 9:14 am

Re: PathPocketShape.StartDepth : unable to change in FreeCADCmd

Post by chrisb »

I hope it's as simple as that: You have a typo in "tessellate".
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
cristian.a73
Posts: 41
Joined: Wed Jul 18, 2018 4:15 pm

Re: PathPocketShape.StartDepth : unable to change in FreeCADCmd

Post by cristian.a73 »

chrisb wrote: Tue Jan 29, 2019 12:46 am I hope it's as simple as that: You have a typo in "tessellate".
naturally it was a syntax error typing the post, not in the code (there isn't any axception in the execution) ... sorry for that
... but wait a moment ... it works :D
Now I see, tessellate was simply commented out from the code (13.000 rows of code is killling me!)

A strange thing : both of these row is needed to update StartDepth :

Code: Select all

            
objFaceMill.StartDepth.Value = eZ
objFaceMill.setExpression('StartDepth', '%0.3f'%eZ+'mm' )
Thank you
:mrgreen:
Post Reply