CW comp error in Countor

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Linden
Posts: 95
Joined: Wed Aug 19, 2015 10:35 pm
Location: Canada/Philippines

CW comp error in Countor

Postby Linden » Sun Jan 29, 2017 6:16 pm

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 1022 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 28 times
Linden
mlampert
Posts: 1308
Joined: Fri Sep 16, 2016 9:28 pm

Re: CW comp error in Countor

Postby mlampert » Sun Jan 29, 2017 9:16 pm

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

Re: CW comp error in Countor

Postby chrisb » Sun Jan 29, 2017 10:07 pm

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

Re: CW comp error in Countor

Postby herbk » Sun Jan 29, 2017 10:26 pm

If i make the part with the part WB it works also.
cw.jpg
cw.jpg (27.89 KiB) Viewed 1007 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: 95
Joined: Wed Aug 19, 2015 10:35 pm
Location: Canada/Philippines

Re: CW comp error in Countor

Postby Linden » Mon Jan 30, 2017 5:07 am

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

Re: CW comp error in Countor

Postby mlampert » Mon Jan 30, 2017 6:39 pm

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

Re: CW comp error in Countor

Postby mlampert » Mon Jan 30, 2017 6:51 pm

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).