Path Sorting Issues

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
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Path Sorting Issues

Post by dubstar-04 »

I am looking for some ideas to help make this op work:

I would like to cut from the outside in and from the top down, one z height at a time.
Once one z height is complete I would like the tool to start again at the next z height from the same start point (as set).

These are the path params that I have been using and whatever I try I cannot get the correct tool path. It either cuts from the inside (slotting) or plunges at double depth.

obj.PathParams = "{'orientation': 1, 'direction': 3, 'sort_mode': 3, 'feedrate': 0.0, 'feedrate_v': 0.0, 'verbose': True, 'resume_height': 74.5, 'retraction': 76.5, 'return_end': True, 'preamble': False, 'start': FreeCAD.Vector (-112.5, -22.5, 76.5)}"

The sort mode doesn't seem to have any affect. I have tried None, 2D5, 3D and Greedy.
Peek 2020-03-16 12-48.gif
Peek 2020-03-16 12-48.gif (231 KiB) Viewed 1170 times
Thanks,

Dan

OS: Debian GNU/Linux 10 (buster) (GNOME/gnome)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20071 (Git)
Build type: Unknown
Branch: feature/PocketDirection
Hash: 8f44a7695bb8b73a7d96bd2bde3065d1e9097e6a
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)
Attachments
CRX Battery And ECU Mount.FCStd
(101.73 KiB) Downloaded 23 times
Last edited by dubstar-04 on Sun Apr 05, 2020 9:41 am, edited 1 time in total.
blue0cean
Posts: 508
Joined: Tue Feb 19, 2019 2:31 pm
Location: Bayern

Pocket params

Post by blue0cean »

Like that?
Attachments
CRX Battery And ECU Mount.FCStd
(110.82 KiB) Downloaded 17 times
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Pocket params

Post by dubstar-04 »

blue0cean wrote: Thu Mar 19, 2020 10:24 pmLike that?
Thanks for the reply. The path isn't quite what I was after because the second stepdown in done 'inboard' causing slotting.

Thanks,

Dan
blue0cean
Posts: 508
Joined: Tue Feb 19, 2019 2:31 pm
Location: Bayern

Pocket params

Post by blue0cean »

Do you have an idea for my problem:
https://forum.freecadweb.org/viewtopic. ... 90#p379390
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Path Sorting Issues

Post by dubstar-04 »

I am continuing to experience issues with the path sorting.

I have a commit https://github.com/dubstar-04/FreeCAD/c ... df4d47c06c to expose the cut direction to force the direction for facing and pocket operation's, the problem i am experiencing is that I can't get the paths to sort by z height (see attached gif)

I am using the 2D5 sorting method with the expectation that the paths are sorted by z height. The description for 2D5:


"'2D5' explode shapes into wires, and groups the shapes by its plane. The 'start' position"
"chooses the first plane to start. The algorithm will then sort within the plane and then"
"move on to the next nearest plane."


SortingIssue.gif
SortingIssue.gif (349.75 KiB) Viewed 874 times

realthunder wrote:ping
Is there something I am missing?

Test file attached.

Thanks,

Dan

OS: Debian GNU/Linux 10 (buster) (GNOME/default)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20391 (Git)
Build type: Unknown
Branch: feature/PocketDirection
Hash: da92b8c242ead8cc106f480aa2eed0bac2edf10a
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)
Attachments
ViceClamp-Facing.FCStd
(158.99 KiB) Downloaded 23 times
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Path Sorting Issues

Post by realthunder »

PR submitted here.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Path Sorting Issues

Post by dubstar-04 »

realthunder wrote: Mon Apr 06, 2020 2:06 am PR submitted here.
Fantastic!

Thank you,

Dan
Post Reply