Adaptive Path/CAM Operation

Here's the place for discussion related to CAM/CNC and the development of the Path module.
chrisb
Posts: 17515
Joined: Tue Mar 17, 2015 9:14 am

Re: Adaptive Path/CAM Operation

Postby chrisb » Sat Jun 22, 2019 8:22 am

Tried the macro, alas here the write command fails:

Code: Select all

sys.stdout.write("AP: {}\n".format(path))
... 
Traceback (most recent call last):
  File "<input>", line 3, in <module>
NameError: name 'sys' is not defined
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16933 (Git)
Build type: Release
Branch: master
Hash: 4494d384a6b7e183dd4ae12baadfcf6972039c45
Python version: 3.7.3
Qt version: 5.9.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)
User avatar
sliptonic
Posts: 1557
Joined: Tue Oct 25, 2011 10:46 pm

Re: Adaptive Path/CAM Operation

Postby sliptonic » Sat Jun 22, 2019 2:28 pm

Add an

Code: Select all

import sys
At the beginning
chrisb
Posts: 17515
Joined: Tue Mar 17, 2015 9:14 am

Re: Adaptive Path/CAM Operation

Postby chrisb » Sun Jun 23, 2019 5:32 am

Here is my output. The values look reasonable compared to yours. You may note that even in the first path there are deviations of ~0.2 - far too much for the common rounding issues.
I had observed such differences before, when I had the issues, and you didn't.

Code: Select all

AP: (0, [(-49.99375, 44.74375), (-49.91875, 44.66875), (-49.8625, 44.58125), (-49.84375, 44.48125), (-49.225, 43.1625), (-48.74375, 42.51875), (-48.4, 42.2125), (-48.15625, 42.0375), (-47.85, 41.875), (-47.50625, 41.7625), (-47.2, 41.63125), (-46.45, 41.34375), (-45.66875, 41.1625), (-44.90625, 41.11875), (-44.55, 41.13125), (-43.7125, 41.225), (-42.9375, 41.4375), (-42.4, 41.6125), (-41.8, 41.8875), (-41.375, 42.125), (-40.9125, 42.44375), (-40.48125, 42.80625), (-40.05, 43.11875), (-39.475, 43.675), (-38.95, 44.23125), (-38.46875, 44.86875), (-38.1625, 45.31875), (-37.58125, 46.35625), (-37.025, 48.025), (-36.46875, 52.525), (-36.63125, 55.05625), (-37.0625, 56.6375), (-37.425, 57.425), (-38.06875, 58.36875), (-39.1, 59.58125), (-39.63125, 60.175), (-40.23125, 60.7), (-40.7875, 61.13125), (-41.33125, 61.525), (-42.0125, 61.93125), (-43.18125, 62.5375), (-43.64375, 62.65625), (-44.01875, 62.69375), (-44.10625, 62.73125), (-45.5125, 63.06875), (-50.95, 63.4875), (-53.66875, 63.26875), (-55.35625, 62.83125), (-55.98125, 62.5375), (-56.21875, 62.3625), (-56.2875, 62.29375), (-56.375, 62.25625), (-56.5375, 62.14375), (-57.675, 61.54375), (-58.3625, 61.14375), (-59.0, 60.6625), (-59.4625, 60.2625), (-59.9125, 59.84375), (-60.44375, 59.24375), (-60.85625, 58.70625), (-61.25, 58.125), (-61.6875, 57.5375), (-62.18125, 56.6625), (-62.54375, 55.71875), (-62.83125, 54.51875), (-63.18125, 51.51875), (-63.1, 48.21875), (-62.875, 46.51875), (-62.54375, 45.425), (-61.93125, 44.1125), (-61.63125, 43.36875), (-61.3, 42.6375), (-60.8875, 41.95), (-60.025, 40.66875), (-59.5125, 40.04375), (-58.975, 39.44375), (-58.5, 38.79375), (-57.34375, 37.53125), (-57.0125, 37.2625), (-56.74375, 37.10625), (-55.90625, 36.33125), (-55.80625, 36.3125), (-37.30625, 36.35625), (-36.70625, 36.4375), (-36.5125, 36.5), (-36.35625, 36.625), (-36.31875, 36.71875), (-36.3125, 43.5625)])
AP: (0, [(-36.3125, 43.5625), (-36.325, 43.66875)])
AP: (1, [])
AP: (0, [(-36.33125, 43.6), (-36.325, 43.44375), (-36.3125, 43.6625)])
AP: (0, [(-36.3125, 43.6625), (-36.3125, 44.6)])
AP: (0, [(-36.3125, 44.6), (-36.35, 45.11875), (-36.4125, 45.6375), (-36.525, 46.14375), (-36.68125, 46.6375), (-37.0875, 47.6375), (-37.2875, 48.15625)])
AP: (1, [])
AP: (0, [(-37.4375, 48.68125), (-37.5375, 49.2125), (-37.5875, 49.74375), (-37.59375, 50.2625), (-37.5375, 50.76875), (-37.4125, 51.25625), (-37.2375, 51.725), (-36.83125, 52.675), (-36.65625, 53.1625), (-36.525, 53.6625), (-36.425, 54.175), (-36.3125, 55.2125)])
AP: (0, [(-36.3125, 55.2125), (-36.3125, 63.18125), (-36.325, 63.275), (-36.4, 63.45), (-36.45625, 63.53125), (-36.61875, 63.63125), (-36.70625, 63.66875), (-45.05, 63.68125)])
AP: (0, [(-45.05, 63.68125), (-45.56875, 63.6375), (-46.0875, 63.5625), (-46.59375, 63.45), (-47.6, 63.16875)])
AP: (1, [])
AP: (0, [(-48.1125, 63.08125), (-48.625, 63.0625), (-49.13125, 63.125), (-50.65, 63.48125), (-51.1625, 63.5625), (-52.20625, 63.68125)])
AP: (0, [(-52.20625, 63.68125), (-63.26875, 63.61875), (-63.45625, 63.575), (-63.5375, 63.51875), (-63.6, 63.44375), (-63.68125, 63.25625), (-63.68125, 36.75625), (-63.60625, 36.5625), (-63.54375, 36.475), (-63.4625, 36.40625), (-63.26875, 36.31875), (-61.76875, 36.3125)])
AP: (0, [(-61.76875, 36.3125), (-61.24375, 36.35), (-60.725, 36.4125), (-60.21875, 36.525), (-59.71875, 36.68125), (-59.24375, 36.88125), (-58.7875, 37.125), (-58.35, 37.4125)])
AP: (1, [(-57.9375, 37.73125), (-57.54375, 38.08125), (-56.4125, 39.20625), (-39.45625, 56.95625)])
AP: (0, [(-39.0125, 57.41875), (-37.73125, 58.8), (-37.34375, 59.25), (-37.0, 59.7), (-36.7, 60.15625), (-36.44375, 60.625), (-36.23125, 61.10625), (-36.06875, 61.6), (-35.95, 62.10625), (-35.7875, 63.14375)])
AP: (0, [(-35.7875, 63.14375), (-35.79375, 63.24375), (-35.83125, 63.4625), (-35.9125, 63.65625), (-36.05, 63.85), (-36.26875, 64.04375), (-36.425, 64.11875), (-36.64375, 64.19375), (-36.9, 64.2125), (-63.24375, 64.2), (-63.46875, 64.1625), (-63.6625, 64.08125), (-63.86875, 63.925), (-64.04375, 63.725), (-64.11875, 63.56875), (-64.19375, 63.35), (-64.2125, 63.05625), (-64.2, 36.75), (-64.1625, 36.525), (-64.08125, 36.33125), (-63.9375, 36.1375), (-63.725, 35.95), (-63.56875, 35.875), (-63.35, 35.8), (-63.09375, 35.78125), (-37.025, 35.78125), (-36.70625, 35.8), (-36.525, 35.83125), (-36.33125, 35.9125), (-36.1375, 36.05625), (-35.95, 36.26875), (-35.8875, 36.4), (-35.8, 36.64375), (-35.78125, 36.9), (-35.7875, 63.15), (-35.7875, 63.14375)])
>>> 
kreso-t
Posts: 114
Joined: Sat Aug 04, 2018 2:32 pm

Re: Adaptive Path/CAM Operation

Postby kreso-t » Sun Jul 14, 2019 3:19 pm

I finally managed to reproduce the problem using openSUSE 15.1Beta (in a VirtualBox)
Selection_071.png
Selection_071.png (112.49 KiB) Viewed 301 times
OS: openSUSE Leap 15.1Beta
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16117 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.18.2)
Hash: dbb4cc6415bac848a294f03b80f65e888d531742
Python version: 3.6.7
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

fixing it now it should be the easier part...
BR,
K.
chrisb
Posts: 17515
Joined: Tue Mar 17, 2015 9:14 am

Re: Adaptive Path/CAM Operation

Postby chrisb » Sun Jul 14, 2019 4:48 pm

Thanks for working on it, I hope the best!
dubstar-04
Posts: 379
Joined: Mon Mar 04, 2013 8:41 pm
Location: Manchester, UK
Contact:

Re: Adaptive Path/CAM Operation

Postby dubstar-04 » Sat Jul 20, 2019 9:35 am

I've been away from FreeCAD for a while, I've updated FreeCAD and this is reproduceable.
adaptive-bug.png
adaptive-bug.png (79.98 KiB) Viewed 237 times
File attached incase its any use.

OS: Ubuntu 19.04 (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.7.3
Qt version: 5.12.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
Attachments
DizzyBlank2-CAM.fcstd
(274.64 KiB) Downloaded 3 times
kreso-t
Posts: 114
Joined: Sat Aug 04, 2018 2:32 pm

Re: Adaptive Path/CAM Operation

Postby kreso-t » Wed Jul 24, 2019 4:41 pm

Hi,

The issue should be fixed now.

using openSUSE Leap 15.1Beta where it consistently appeared
before applying fix:
Selection_072.png
Selection_072.png (30.31 KiB) Viewed 188 times
the same model with fix applied:
Selection_073.png
Selection_073.png (17.84 KiB) Viewed 188 times
BR,
Kresimir
chrisb
Posts: 17515
Joined: Tue Mar 17, 2015 9:14 am

Re: Adaptive Path/CAM Operation

Postby chrisb » Wed Jul 24, 2019 9:04 pm

Great!
dubstar-04
Posts: 379
Joined: Mon Mar 04, 2013 8:41 pm
Location: Manchester, UK
Contact:

Re: Adaptive Path/CAM Operation

Postby dubstar-04 » Wed Jul 24, 2019 9:10 pm

Working well for me too!

Thank you,

Dan