Wrong profile path (strange loops)

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!
julienbld
Posts: 2
Joined: Sat Sep 24, 2016 9:59 am

Wrong profile path (strange loops)

Post by julienbld »

Hi,

I draw a valid sketch containing lines and tangents arcs. I made a solid by extrusion and I tried to generate a profile path from this solid.
The result is not correct, there are some wrong "loops" in the path (where arcs join the lines)
Am I doing something wrong ? Is it a bug ? Is there a way to avoid this behaviour ?

Thank you !
Attachments
loop.png
loop.png (9.8 KiB) Viewed 2638 times
bug.fcstd
(11.57 KiB) Downloaded 56 times
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Wrong profile path (strange loops)

Post by DeepSOIC »

Hi!
In the sketch, you have applied Tangent constraints the wrong way. You should do it using method 2, by selecting endpoints.
http://www.freecadweb.org/wiki/index.ph ... angency.29
You applied coincident constraint first, then tangent between edges. While that often works, it causes poor solver convergence, and consequently tangency mismatch. I believe this is the cause for the loops in path, but I think there might be another bug involved.

Unfortunately, I can't recompute your Path project in v0.17dev which I'm using.
Traceback (most recent call last):
File "C:\_vt\dev\PC\Qt\FreeCAD\Default\Mod\Path\PathScripts\PathProfile.py", line 275, in execute
self.vertFeed = toolLoad.VertFeed.Value
<type 'exceptions.AttributeError'>: 'FeaturePython' object has no attribute 'VertFeed'
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.8361 (Git)
Build type: Release
Branch: DeepSOIC10
Hash: 4ac7673e543274bcae856872033a114c7b60481b
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
julienbld
Posts: 2
Joined: Sat Sep 24, 2016 9:59 am

Re: Wrong profile path (strange loops)

Post by julienbld »

Thank you !
It seems ok, now I can generate a valid path !
I don't understand why it was a problem for the solver, but this way is ok for me.

My version is 0.16. I think you can't compute the path because I didn't complete the horizontal and vertical speed fields. It might be mandatory in your version.
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Wrong profile path (strange loops)

Post by herbk »

Hi,
i have the same Problem on some parts. It's not always, only if the parts a little more difficult.
Here's an example: i want to mill out this part:
loops1.jpg
loops1.jpg (52.14 KiB) Viewed 2534 times
and here the loops:
loops2.jpg
loops2.jpg (46.58 KiB) Viewed 2532 times
The loops are not on each pocket, the whole part has 34, the loops are only on this 2 pockets.
The differnt to julienbld's situation is: my part is made with the part and draft WB only, so there isn't any sketch.
Attachments
magnetscheibe_34_magnete_mit_pfad.fcstd
(132.98 KiB) Downloaded 64 times
Gruß Herbert
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Wrong profile path (strange loops)

Post by mlampert »

Hi Herbert,
Not on my computer right now, will check it out tonight. Which version are you using?
Markus

BTW: I had a quick look and you seem to have 4 of those issues, 2 on top and 2 at the bottom.
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Post by herbk »

Hi mlampert,
you are right, there two more on the bottom..

Im using

OS: "openSUSE 13.2 (Harlequin) (x86_64)"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.8577 (Git) (Packman)
Build type: Release
Branch: master
Hash: c833136cde65b90bdc2809c3022afdfa4a3a4bb6
Python version: 2.7.12
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.9.1.oce-0.18-dev

Its a 17.xx, but on opensuse are some functions not available...
Gruß Herbert
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Wrong profile path (strange loops)

Post by sliptonic »

herbk,
It looks like you're using OCC.

I tried it again with my current version that uses libarea by default and was able to get a normal looking path. However, libarea would often fail to generate a profile at all. I got it to work by playing with the 'extra offset' value, setting it to something like -0.01. It feels like a rounding bug but I'm not sure how to track it down.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Wrong profile path (strange loops)

Post by chrisb »

It pretty sure is a rounding bug. Turning the cut before applying the path operation sometimes works, e.g. with 0.2°, and sometimes makes things even worse.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Wrong profile path (strange loops)

Post by mlampert »

Hi Herbert,

Unfortunately I can't reproduce your issue (other than in your file) with any of the builds I have of 0.17

I did notice a few things:
* it works in the newer version (sliptonic has a pull request out - doesn't help you right now though)
* I got some good results by converting your magnet wheel to a "Solid" (Part menu) and build the path around that
* I can't create the outside path with other builds. I can create the "Right" path and the "On" path, but not the "Left" - which is not entirely true. After fixing some issues it does seem to build - except that there is no outcome.

Question to the experts: Is there a limit in the size or number of properties a Feature can have ?

Stab - stab - no, still dark .... sorry
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Wrong profile path (strange loops)

Post by herbk »

sorry, double post...
Last edited by herbk on Sat Oct 15, 2016 5:44 am, edited 1 time in total.
Gruß Herbert
Post Reply