Path Generation freezes

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
coogle
Posts: 9
Joined: Sun Aug 02, 2020 5:34 pm

Path Generation freezes

Post by coogle »

Hello,

I'm a new FreeCAD user and recently downloaded it to try to find a new FOSS tool for doing my CNC tool paths. At first going through tutorials things looked pretty great, but when I tried to do something "real" I've hit a wall. I can attach my project file if necessary but to give some context it's roughly 250 MB in size..

Basically, I'm trying to surface a piece of stock and then 3D pocket out a spoon (followed by a contour with tabs). For this I have a spoon STL that I imported using the Mesh workspace, then converted to a solid part as so:

- Import into mesh
- Convert to Part
- Convert to solid
- Refine Part to remove extra faces

This process took *a long* time. I then created a Draft Clone of the part to scale it on the Y axis a bit. The scaled version is the one I want to mill.

When I go into the path workspace I'm able to create my facing path using an 8mm end mill without too much trouble. But when I try to create the 3D pocket (4mm, 80% overlap value) it hangs, apparently forever (I left it running overnight on my 2.9GHz Intel with 32GB of RAM). I finally forced FreeCAD to close after 12 hours of unresponsiveness (I'm on macOS 10.15.5)

Is FreeCAD really just this slow, or am I doing something wrong? Is there anything I can do to try to reduce the complexity of this spoon in order to speed things up?

John
Attachments
The project
The project
Screen Shot 2020-08-02 at 1.49.35 PM.png (289.41 KiB) Viewed 2490 times
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Path Generation freezes

Post by jmaustpc »

Your first post, welcome to FreeCAD.

I can't answer you question specifically but I can offer some tips.
coogle wrote: Sun Aug 02, 2020 5:51 pm I can attach my project file if necessary but to give some context it's roughly 250 MB in size..
Sounds like it was a complex STL mesh. STL is best to avoid if at all possible, its a lossy format and with complex shapes it can end up with a lot of faces when converted to a solid.

Its unlikely that Refine would make much difference since I imagine that the spoon would have few flat surfaces , and Refine is only going to remove extra unwanted edges on flat surfaces.

Another tip, I see in your screen shot that you are using FreeCAD 0.18, if you want to do much with Path WB you really need to use a FreeCAD 0.19 snapshot release since Path WB is currently in development so there are many bug fixes and new features in the newer FreeCAD.

Jim
chrisb
Veteran
Posts: 54166
Joined: Tue Mar 17, 2015 9:14 am

Re: Path Generation freezes

Post by chrisb »

FreeCAD is not optimized to work with meshes. They are a degraded file format which may serve for output but it is not well suited for input. How many faces does the mesh have? Werner mentioned here a limit of approximately 100000 without even working with Path workbench.
It would probably be sensible if you remodel the spoon from scratch, although I have to admit that it's daring for a newbie.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
etrombly
Posts: 144
Joined: Thu Dec 05, 2019 6:50 pm

Re: Path Generation freezes

Post by etrombly »

What version of freecad are you using? There was a bug in 3D surface and pocket that was recently fixed. It was causing an infinite loop, so it would never finish.
coogle
Posts: 9
Joined: Sun Aug 02, 2020 5:34 pm

Re: Path Generation freezes

Post by coogle »

Thanks for the welcome!

Per the advice, I upgraded to 0.19-dev using conda (macOS 10.15) and I was able to make some headway with 3D Surfacing... although I posted a problem I had making that work as well (see https://forum.freecadweb.org/viewtopic.php?p=421374).

Unfortunately when it comes to models I can appreciate why STL sort of sucks, but it's everywhere. In this case, I was able to use some tools to reduce the number of faces of the spoon to something more reasonable and that speed things up considerably.
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: Path Generation freezes

Post by freman »

etrombly wrote: Mon Aug 03, 2020 3:06 pm What version of freecad are you using? There was a bug in 3D surface and pocket that was recently fixed. It was causing an infinite loop, so it would never finish.
You submitted a bunch of nice, small easy to review PRs recently. I've kinda lost track of them now. Did they get merged to master yet?

thx.
etrombly
Posts: 144
Joined: Thu Dec 05, 2019 6:50 pm

Re: Path Generation freezes

Post by etrombly »

freman wrote: Thu Aug 06, 2020 2:18 pm
etrombly wrote: Mon Aug 03, 2020 3:06 pm What version of freecad are you using? There was a bug in 3D surface and pocket that was recently fixed. It was causing an infinite loop, so it would never finish.
You submitted a bunch of nice, small easy to review PRs recently. I've kinda lost track of them now. Did they get merged to master yet?

thx.
Yes, they've all been merged as of a few days ago.
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: Path Generation freezes

Post by freman »

Ah cool. Many thanks that saves me reapply them again locally.

Thanks for that effort. They were small but significant changes.
Post Reply