Wrong profile path (strange loops)

Here's the place for discussion related to CAM/CNC and the development of the Path module.
julienbld
Posts: 2
Joined: Sat Sep 24, 2016 9:59 am

Wrong profile path (strange loops)

Postby julienbld » Sat Sep 24, 2016 10:14 am

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 1354 times
bug.fcstd
(11.57 KiB) Downloaded 29 times
User avatar
DeepSOIC
Posts: 7149
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Wrong profile path (strange loops)

Postby DeepSOIC » Sat Sep 24, 2016 11:03 am

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)

Postby julienbld » Sat Sep 24, 2016 11:27 am

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
Posts: 1572
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Wrong profile path (strange loops)

Postby herbk » Fri Oct 14, 2016 4:51 pm

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 1250 times
and here the loops:
loops2.jpg
loops2.jpg (46.58 KiB) Viewed 1248 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 39 times
Gruß Herbert
mlampert
Posts: 1379
Joined: Fri Sep 16, 2016 9:28 pm

Re: Wrong profile path (strange loops)

Postby mlampert » Fri Oct 14, 2016 6:10 pm

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
Posts: 1572
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Postby herbk » Fri Oct 14, 2016 6:33 pm

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
Posts: 1577
Joined: Tue Oct 25, 2011 10:46 pm

Re: Wrong profile path (strange loops)

Postby sliptonic » Fri Oct 14, 2016 6:59 pm

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
Posts: 19589
Joined: Tue Mar 17, 2015 9:14 am

Re: Wrong profile path (strange loops)

Postby chrisb » Fri Oct 14, 2016 7:20 pm

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.
mlampert
Posts: 1379
Joined: Fri Sep 16, 2016 9:28 pm

Re: Wrong profile path (strange loops)

Postby mlampert » Sat Oct 15, 2016 5:09 am

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
Posts: 1572
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Wrong profile path (strange loops)

Postby herbk » Sat Oct 15, 2016 5:36 am

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