CW comp error in Countor

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
Linden
Posts: 109
Joined: Wed Aug 19, 2015 10:35 pm
Location: Canada/Philippines

CW comp error in Countor

Post by Linden »

Hello all,
Wile I was playing trying to configure a this post processor I have been working on I came across this oddity using contour.
CW comp Error.png
CW comp Error.png (19.84 KiB) Viewed 2360 times
If you select CW for compensation you get a circular cut into your part. See image. CCW and Compensation off give expected results. Freecad file attached.

OS: Linux Mint 17.3 Rosa
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9822 (Git)
Build type: None
Branch: master
Hash: 0df4af4ba5e6edce825af6ecf6d024c704292633
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Attachments
CW Comp Error.fcstd
(13.81 KiB) Downloaded 56 times
Linden
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: CW comp error in Countor

Post by mlampert »

Should be fixed in the latest version - this is a side effect of the float - double changes done in Vector3D a while ago. Please let me know if this is still an issue once you updated FC.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: CW comp error in Countor

Post by chrisb »

It is not fixed in this version:
OS: Ubuntu 14.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9842 (Git)
Build type: None
Branch: master
Hash: ea2f8731e97b8f7873094556126c42f1412e98bd
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

but it seems to be a precision problem. If I change the radius in the sketch from 10 to 10.001 it is ok. Back to 10 not ok. 9.999 ok, and here we go: back to 10.000 is ok.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
herbk
Veteran
Posts: 2660
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: CW comp error in Countor

Post by herbk »

If i make the part with the part WB it works also.
cw.jpg
cw.jpg (27.89 KiB) Viewed 2345 times
OS: "openSUSE Leap 42.2"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9822 (Git) (Packman)
Build type: Release
Branch: master
Hash: 0df4af4ba5e6edce825af6ecf6d024c704292633
Python version: 2.7.12
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.9.1.oce-0.18-dev
Gruß Herbert
Linden
Posts: 109
Joined: Wed Aug 19, 2015 10:35 pm
Location: Canada/Philippines

Re: CW comp error in Countor

Post by Linden »

mlampert wrote: Should be fixed in the latest version - this is a side effect of the float - double changes done in Vector3D a while ago. Please let me know if this is still an issue once you updated FC.
Still appears to be there with latest version from ppa. I think chrisb is on the right track with it being a precision problem

OS: Linux Mint 17.3 Rosa
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9842 (Git)
Build type: None
Branch: master
Hash: ea2f8731e97b8f7873094556126c42f1412e98bd
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Linden
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: CW comp error in Countor

Post by mlampert »

Interestingly using a face Profile instead of Contour produces the correct path. The fix I mentioned earlier does have to do with rounding - I suspect we're having more of those in the code. This is a great test piece, I'll create an issue and attach the file. Thanks for reporting, these things are hard to find, having a model like this helps!
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: CW comp error in Countor

Post by mlampert »

mlampert wrote:Interestingly using a face Profile instead of Contour produces the correct path. The fix I mentioned earlier does have to do with rounding - I suspect we're having more of those in the code. This is a great test piece, I'll create an issue and attach the file. Thanks for reporting, these things are hard to find, having a model like this helps!
I was mistaken, Profile also generates the (same) wrong path if the direction is set to CW - so the path to failure is really the direction (there's probably an edge that doesn't get flipped although it should - or vice versa).
Post Reply