Part->sweep of a Draft->Circle along Part->Helix gives weird results

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
Lupin
Posts: 76
Joined: Sat Mar 13, 2021 10:55 am

Part->sweep of a Draft->Circle along Part->Helix gives weird results

Post by Lupin »

I want to model the handrail of a helical staircase. When I sweep a circle along a helix in FreeCAD, the result is very inconsistent and for example depends on the diameter of the swept circle. While in my example I sweep a simple Draft->Circle along a helix, the exact same is happening when I draw the circle in a sketch (I guess internally those two things are same in FreeCAD).

Here's the result of sweeping three circles (30mm, 75mm, 150mm radius resp.) along the same helix (with the sweep moved in z direction).
broken_helical_sweep.png
broken_helical_sweep.png (100.03 KiB) Viewed 644 times
broken_helical_sweep_tree.png
broken_helical_sweep_tree.png (12.79 KiB) Viewed 644 times
Changing any of the sweep properties (Solid, Frenet, Transistion) does not change the outcome.
Attachments
broken_helical_sweep.FCStd
(19.14 KiB) Downloaded 18 times
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Part->sweep of a Draft->Circle along Part->Helix gives weird results

Post by openBrain »

This has been discussed several times already. You should find with a search on the forum.;)
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Part->sweep of a Draft->Circle along Part->Helix gives weird results

Post by chrisb »

Bildschirm­foto 2023-03-30 um 19.46.36.png
Bildschirm­foto 2023-03-30 um 19.46.36.png (21.98 KiB) Viewed 621 times
Divide the helix into shorter segments:
Attachments
fixed_helical_sweep_cb.FCStd
(33.89 KiB) Downloaded 16 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
user1234
Veteran
Posts: 3334
Joined: Mon Jul 11, 2016 5:08 pm

Re: Part->sweep of a Draft->Circle along Part->Helix gives weird results

Post by user1234 »

Finally, it seems to be solved in OCCT7.7.1 . Would be good, if someone can confirm it.

Code: Select all

OS: Debian GNU/Linux 11 (bullseye) (X-Cinnamon/lightdm-xsession)
Word size of FreeCAD: 64-bit
Version: 0.21.0.32637 (Git)
Build type: Release
Branch: master
Hash: 7fa7cb7f0b222864be7416c683166876eab190bc
Python 3.9.2, Qt 5.15.2, Coin 4.0.0, Vtk 9.0.1, OCC 7.7.1
Locale: English/United States (en_US)
Installed mods: 
  * QuickMeasure 2022.10.28
  * Assembly4 0.12.6
  * CurvedShapes 1.0.4
  * Curves 0.6.8

2023-03-30_19-50.png
2023-03-30_19-50.png (256.31 KiB) Viewed 613 times


Greetings
user1234
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Part->sweep of a Draft->Circle along Part->Helix gives weird results

Post by adrianinsaval »

Wasn't this solved in 7.6.something already? OP didn't post full version info unfortunately :roll:
Lupin
Posts: 76
Joined: Sat Mar 13, 2021 10:55 am

Re: Part->sweep of a Draft->Circle along Part->Helix gives weird results

Post by Lupin »

openBrain wrote: Thu Mar 30, 2023 5:35 pm This has been discussed several times already. You should find with a search on the forum.;)
I did search the forum and the closest thing I found was this:
viewtopic.php?t=57984
But changing the tesselation settings, as described in that thread, didn't change anything either (btw. I change those settings sometimes anyway for mesh exports for 3D prints).



adrianinsaval wrote: Thu Mar 30, 2023 5:54 pm Wasn't this solved in 7.6.something already? OP didn't post full version info unfortunately :roll:
I always think about that, but then forget :roll:

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: German/Austria (de_AT)
Installed mods: 
  * Assembly4 0.12.5
  * fasteners 0.4.54
  * kicadStepUpMod 10.17.1
  * lattice2 1.0.0
  * Manipulator 1.5.0
  * Part-o-magic 1.0.0
  * PathDressupDogbone.py.mod
  * startup_macros
  * TabBar
  * workfeature


chrisb wrote: Thu Mar 30, 2023 5:47 pm Divide the helix into shorter segments:
That seems to be the solution. Thank you! The annoying thing: I played with the segment length value while trying to get the swept helix to be rendered correctly, but I must have had an unfortunate combination of values, because it wasn't fixed by that at the time and dismissed that as an option. :(
user1234
Veteran
Posts: 3334
Joined: Mon Jul 11, 2016 5:08 pm

Re: Part->sweep of a Draft->Circle along Part->Helix gives weird results

Post by user1234 »

adrianinsaval wrote: Thu Mar 30, 2023 5:54 pm Wasn't this solved in 7.6.something already?
This was also what i thought, but sometimes in sweeps in PartWB had still this issue. When i look on the example file, then yet (pretty late) i get the idea, that it have something to do with the section area to length ratio.


Greetings
user1234
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Part->sweep of a Draft->Circle along Part->Helix gives weird results

Post by openBrain »

Lupin wrote: Thu Mar 30, 2023 6:13 pm I did search the forum and the closest thing I found was this:
viewtopic.php?t=57984
This thread and others linked there should be helpful : viewtopic.php?t=64333
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Part->sweep of a Draft->Circle along Part->Helix gives weird results

Post by chrisb »

adrianinsaval wrote: Thu Mar 30, 2023 5:54 pm Wasn't this solved in 7.6.something already?
Not in 7.6.3

Code: Select all

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.21.0.32532 (Git)
Build type: Release
Branch: master
Hash: 20e44eba50e1365b9e7bb9c5c244afe96a627a28
Python 3.10.10, Qt 5.15.8, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: C/Default (C)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply