Optimize Stepover Transitions In 3d Surface

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!
acp693
Posts: 127
Joined: Wed Dec 15, 2021 7:41 pm

Optimize Stepover Transitions In 3d Surface

Post by acp693 »

Hi, It seems 'optimize Stepover Transitions' isn't working correctly in 3d Surface. With it enabled, everything above StartDepth-(1xStepdown) is ignored.

Can anyone else confirm this?

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.21.31109 (Git)
Build type: Release
Branch: master
Hash: c23ee7ad88433a0f00e84afae0a62fe738be0c09
Python 3.10.8, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * CurvedShapes 1.0.4
  * Curves 0.5.3
  * FeedsAndSpeeds 0.4.0
  * Marz 0.0.26-alpha
  * Silk 1.0.0
Attachments
TestOptimizeStepOverTransitions.FCStd
(36.65 KiB) Downloaded 33 times
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Optimize Stepover Transitions In 3d Surface

Post by GeneFC »

acp693 wrote: Sun Dec 04, 2022 3:40 pm Can anyone else confirm this?
Yes, I see the same thing with your file.

I have never understood what this is supposed to do, and I never use it.

I vaguely recall there was some discussion quite a while ago that indicated the option was not working correctly.

Gene
acp693
Posts: 127
Joined: Wed Dec 15, 2021 7:41 pm

Re: Optimize Stepover Transitions In 3d Surface

Post by acp693 »

Gene, Thank you for confirming. Without it enabled, the tool doesn't start at uncut material, rather with every layer it starts in the middle at the top in my example and goes over already cut material which considerably increases milling time.
acp693
Posts: 127
Joined: Wed Dec 15, 2021 7:41 pm

Re: Optimize Stepover Transitions In 3d Surface

Post by acp693 »

acp693
Posts: 127
Joined: Wed Dec 15, 2021 7:41 pm

Re: Optimize Stepover Transitions In 3d Surface

Post by acp693 »

Hi everyone, just wondering if this bug could be fixed sometime soon; it's been over a year since I submitted the bug report. With out this working properly, the 3d Surface functionality is compromised. Currently with 'Optimize Stepover Transitions' enabled, the work isn't cut correctly - the section above the first stepdown is ignored. With 'Optimize stepover Transitions' disabled, for each pass the tool goes over already cut surfaces which drastically increases cutting time.

I've looked at the code several times myself, but fail to see what the problem could be. Would be fantastic if this could be fixed!

Many thanks!
Dimitrios2
Posts: 104
Joined: Tue Feb 21, 2023 9:30 pm

Re: Optimize Stepover Transitions In 3d Surface

Post by Dimitrios2 »

It appears that the first step down mast be excluded of the optimization.

replace the following lines form file /Path/Op/Surface.py

line 1689 and 1710 ( At least in my file )
if optLinTrans is True:
with
if optLinTrans is True and layDep != (obj.OpStartDepth.Value - obj.StepDown.Value):


line 1837 ( At least in my file )
if obj.OptimizeStepOverTransitions:
with
if obj.OptimizeStepOverTransitions and p2.z != (obj.OpStartDepth.Value - obj.StepDown.Value):

That looks to be working for your file above.
Attachments
Screenshot from 2024-01-15 22-22-02.png
Screenshot from 2024-01-15 22-22-02.png (74.48 KiB) Viewed 3167 times
Last edited by Dimitrios2 on Mon Jan 15, 2024 8:57 pm, edited 2 times in total.
acp693
Posts: 127
Joined: Wed Dec 15, 2021 7:41 pm

Re: Optimize Stepover Transitions In 3d Surface

Post by acp693 »

@Dimitrios2 Thank you so much for looking at this. I followed your instructions and with the example file achieve the same results as you did. I'll test tomorrow with more files. Thanks again!
Dimitrios2
Posts: 104
Joined: Tue Feb 21, 2023 9:30 pm

Re: Optimize Stepover Transitions In 3d Surface

Post by Dimitrios2 »

No problem.

Maybe this is a better approach.
Attachments
Screenshot from 2024-01-16 00-51-34.png
Screenshot from 2024-01-16 00-51-34.png (141.96 KiB) Viewed 3045 times
acp693
Posts: 127
Joined: Wed Dec 15, 2021 7:41 pm

Re: Optimize Stepover Transitions In 3d Surface

Post by acp693 »

@Dimitrios2 Thank you for showing that, that path looks far more reasonable.

As I understand it, The Bounding Box options mean Should the operation be limited by the stock object or by the bounding box of the base object. If I make the size of the stock exactly the same size as the bounding box, surely the resulting path should be the same? When The 'Bounding Box' option is set to 'Stock' there's a lot of jumping around to safe height on this example.

I think in the past, I automatically chose 'Stock' for this option because otherwise, larger models would never finish calculating, even if left overnight, whereas when set to 'Stock' the calculation would take around 10 minutes. Has this now been fixed?
acp693
Posts: 127
Joined: Wed Dec 15, 2021 7:41 pm

Re: Optimize Stepover Transitions In 3d Surface

Post by acp693 »

Should this code change now be submitted as a bug fix?
Post Reply