Problems with Z tolerances on RampEntryDressup

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
roivai
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

Problems with Z tolerances on RampEntryDressup

Post by roivai »

Hi,

When trying to generate some screeshots for documenting the Ramp Entry Dressup like discussed on this thread, I ran into issues with a very simple Path. Essentially just a contour around 50x50x10mm box with step down of 3mm. The problem is, that with helix ramp method, the last round of the loop should be treated differently from earlier ones, as it should be run flat. Now, for some reason, the path generated by the contour puts the last layer at height Z0.000001, or more accurately at 1.000001e-6mm instead of exact Z0. Practically it is OK of course, but now the dressup is checking if the Z height corresponds to the minimum Z found in the Path with PathGeom.isRoughly() function which has a default tolerance of 1e-6. So the generated path just barely is outside of the isRoughly tolerance and thus it is not regognized as the last layer of the loop.

Now questions: 1.Should the Path Geometry Tolerance set in Preferences affect the Z tolerances as well or is it only used in the 2D algorithms of Path.Area? Because I tried to set the tolerance to 0.1nm (1e-7mm) and I still get the same result..
2. I can of course easily increase the tolerance of PathGeom.isRoughly to 1e-5mm for example, but would there be a way to make the default tolerance track what is set to the tolerance in Preferences to make it fit whatever application Path is used for?

BTW, my OCC right here is old, but I can see the same thing with OCC 7.2

Code: Select all

OS: Debian GNU/Linux 9.4 (n/a)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13892 (Git)
Build type: Unknown
Branch: master
Hash: 23f58f1afc710c6189ac44414c8696e8e838535c
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.0
Locale: English/UnitedStates (en_US)
Attachments
rampentrydebug.fcstd
(22.14 KiB) Downloaded 24 times
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Problems with Z tolerances on RampEntryDressup

Post by mlampert »

roivai wrote: Mon Jun 04, 2018 6:02 pm 2. I can of course easily increase the tolerance of PathGeom.isRoughly to 1e-5mm for example, but would there be a way to make the default tolerance track what is set to the tolerance in Preferences to make it fit whatever application Path is used for?
We currently have two of these "precision" tolerances in the Preferences, and it isn't clear for what they are used for. More specifically I highly doubt our average user knows to look for them and what to do with them. The same would probably be true for the PathGeom tolerance.

Having said that it might be nice to add a "Parameter" so it could be changed (by a power user). Changing the default to 10nm is totally fine, maybe we should even raise it to 0.1μm.
Post Reply