Rotated holes result in different sized Helix tool paths.

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!
rainharvester
Posts: 23
Joined: Fri Nov 16, 2018 2:00 am

Re: Rotated holes result in different sized Helix tool paths.

Post by rainharvester »

chrisb,
Is this the additional "helix problem" you are having?

If I start a new helix and select the circle "edges" (ie not the deep hole / faces), then Add them to the Helix, I see them in the list, but no path is generated.

As a workaround, I need to first add a "deep hole / face", to the "base geometry" then add all my "edges". Then I can delete the "deep hole / face", and the helixes from all my "edges" will all show up on screen and in the generated gcode.

But this doesn't always work: sometimes the paths just disappear again. Not sure why. Sometimes rearranging the Operations list causes the helixes to disappear. Sometimes they just disappear for some other reason.
If I start with my version that used "deep hole / faces", and remove all those from the Helix's list (Cntl A, then "remove"), then add the "edges", the helixes seem to stay. (I guess I'm lucky I started with "deep hole /faces" because otherwise, just adding edges wouldn't have worked.)
- aka 'TheRainHarvester" on youtube.
IMback!
Posts: 72
Joined: Sat Jul 13, 2019 9:40 pm

Re: Rotated holes result in different sized Helix tool paths.

Post by IMback! »

I cant reproduce any unexpected behaviour, please be aware how the selection interacts with the start/end depth of the operation.
chrisb
Veteran
Posts: 53933
Joined: Tue Mar 17, 2015 9:14 am

Re: Rotated holes result in different sized Helix tool paths.

Post by chrisb »

I'm awfully sorry for the noise. It was my mistake. I had used too big a tool. Of course it has to be smaller than the hole diameter.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Rotated holes result in different sized Helix tool paths.

Post by mlampert »

I'm not able to reproduce the issue other than verify that your file @chrisb does have that issue.

Attached is the file I used to create some unit tests. They rotate the body in 5 degree increments and the resulting helices are all correct. They also rotate the Job's model clone in 5 degree increments and the results are also correct. Finally, the create a clone of the Body, rotate the clone in 5 degree increments and generate helixes based off that - also all of them correct.
I will not push the tests as they are since they add ~30 seconds of unit test runtime to our build, so for the final PR I'll reduce the test samples. But if anybody wants to have a look, and play with it the tests are in github
Attachments
test_holes00.fcstd
(12.69 KiB) Downloaded 52 times
chrisb
Veteran
Posts: 53933
Joined: Tue Mar 17, 2015 9:14 am

Re: Rotated holes result in different sized Helix tool paths.

Post by chrisb »

mlampert wrote: Sat Aug 10, 2019 5:47 pm I'm not able to reproduce the issue other than verify that your file @chrisb does have that issue.
First you have to use the inner faces, not the edges, but it is more complicated, and finally it may be no issue at all.

I used your model and turned the body 90° around Z. Angular deflection is 28.5, Deviation is 0.5.

If I select the inner faces of the holes and create a new helix operation I get
Bildschirmfoto 2019-08-11 um 08.59.06.png
Bildschirmfoto 2019-08-11 um 08.59.06.png (28.52 KiB) Viewed 2148 times
-

However, if I make a full recompute, it changes to the correct values, without any further changes:
Bildschirmfoto 2019-08-11 um 09.02.01.png
Bildschirmfoto 2019-08-11 um 09.02.01.png (27.38 KiB) Viewed 2148 times
Attachments
test_holes00_cb.fcstd
(33.31 KiB) Downloaded 49 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 53933
Joined: Tue Mar 17, 2015 9:14 am

Re: Rotated holes result in different sized Helix tool paths.

Post by chrisb »

I found something more severe, where FreeCAD crashes. If I use my model from above ...
chrisb wrote: Wed Aug 07, 2019 10:02 pm I can confirm the issue
... and turn the clone Job->Model->Extrude by 90° around Z axis, then FreeCAD crashes immediately when leaving the field which induces a recompute. If I remove the Helix operation before turning there is no crash.

Can anyone confirm?

OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17512 (Git)
Build type: Release
Branch: master
Hash: 7b315d3a15f6c0a3e796b2bf000cb791092de079
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)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Rotated holes result in different sized Helix tool paths.

Post by mlampert »

chrisb wrote: Sun Aug 11, 2019 7:04 am First you have to use the inner faces, not the edges, but it is more complicated, and finally it may be no issue at all.
That's what the unit tests do, I verified.
EDIT: Also, I use a blank FC config file, default settings, so PDN is 28.5° and 0.5%
rainharvester
Posts: 23
Joined: Fri Nov 16, 2018 2:00 am

Re: Rotated holes result in different sized Helix tool paths.

Post by rainharvester »

When I saved the file and reloaded, the helix holes were still the wrong size. Wouldn't reloading do "a full recompute"? I also tried pressing f5 (does that do "a full recompute").
- aka 'TheRainHarvester" on youtube.
chrisb
Veteran
Posts: 53933
Joined: Tue Mar 17, 2015 9:14 am

Re: Rotated holes result in different sized Helix tool paths.

Post by chrisb »

Right mouse on the root of the document tree select "Mark for recompute" plus F5 does a full recompute.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
IMback!
Posts: 72
Joined: Sat Jul 13, 2019 9:40 pm

Re: Rotated holes result in different sized Helix tool paths.

Post by IMback! »

mlampert wrote: Sat Aug 10, 2019 5:47 pm I'm not able to reproduce the issue other than verify that your file @chrisb does have that issue.

Attached is the file I used to create some unit tests. They rotate the body in 5 degree increments and the resulting helices are all correct. They also rotate the Job's model clone in 5 degree increments and the results are also correct. Finally, the create a clone of the Body, rotate the clone in 5 degree increments and generate helixes based off that - also all of them correct.
I will not push the tests as they are since they add ~30 seconds of unit test runtime to our build, so for the final PR I'll reduce the test samples. But if anybody wants to have a look, and play with it the tests are in github
Even tough this works most of the time ATM, relying on the tessellated surface having a polygonal maximum in the x direction as the current code dose is fragile and may break at any time if the tesselation algorithm is changed, or the assumption is wrong for other reasons, like rotation after tesselation. Therefore i have the following PR: 2416 this fixes all test cases in this thread for me. Please test.
Last edited by IMback! on Sun Aug 11, 2019 3:20 pm, edited 1 time in total.
Post Reply