Spring renders incorrectly

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
NewJoker
Veteran
Posts: 3014
Joined: Sun Oct 11, 2020 7:49 pm

Spring renders incorrectly

Post by NewJoker »

Hi,

I'm trying to create a conical spring. Here's what I do:
1) Create new body
2) Add helix primitive and adjust the parameters
3) Create a sketch of a profile for sweep
4) Use Part module Sweep

And here's what I get:

spring.JPG
spring.JPG (41.43 KiB) Viewed 1984 times

After exporting to step and opening in a different software the spring looks fine. So it seems to be some rendering issue. Do you know what's going on ?

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: Polish/Poland (pl_PL)

I attached a FreeCAD file as well.
Spring fail.FCStd
(34.27 KiB) Downloaded 35 times
drmacro
Veteran
Posts: 8862
Joined: Sun Mar 02, 2014 4:35 pm

Re: Spring renders incorrectly

Post by drmacro »

Seems ok if you don't mix Part and Part Design...
Snip macro screenshot-f36d5c.png
Snip macro screenshot-f36d5c.png (161.14 KiB) Viewed 1972 times
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
NewJoker
Veteran
Posts: 3014
Joined: Sun Oct 11, 2020 7:49 pm

Re: Spring renders incorrectly

Post by NewJoker »

Thank you for the replies. I should switch to 0.20 to avoid problems like that in the future. But it would be good to eliminate this issue for the default rendering settings, if possible.
drmacro
Veteran
Posts: 8862
Joined: Sun Mar 02, 2014 4:35 pm

Re: Spring renders incorrectly

Post by drmacro »

NewJoker wrote: Wed Dec 08, 2021 11:07 pm Thank you for the replies. I should switch to 0.20 to avoid problems like that in the future. But it would be good to eliminate this issue for the default rendering settings, if possible.
I think that is the issue; there is no default setting that works for all situations.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Spring renders incorrectly

Post by chrisb »

The rendering settings - Deviation and AngularDeflection - are a different topic. They seem to be currently a good compromise between quality and speed.
I don't know if changing the segment length has other undesired side effects, because we usually change it only if something goes wrong. Could be an interesting experiment though.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
un1corn
Posts: 239
Joined: Sat Dec 26, 2015 2:06 pm

Re: Spring renders incorrectly

Post by un1corn »

I too had this problem even with straight springs, it seems that version 19 does not react the same as previous versions, I have found that after defining the helix and shape to be swept it works OK using the adaptive helix tab in PD WB.
My request for help posted on December 3rd, found for myself eventually.
I was surprised that version 19 did not reach a stable version, I am neither a programmer or developer so maybe there is more to it than meets the eye.
User avatar
NewJoker
Veteran
Posts: 3014
Joined: Sun Oct 11, 2020 7:49 pm

Re: Spring renders incorrectly

Post by NewJoker »

Now I'm using 0.20 and I went back to this to see if I can make it work in this version without the need to change the modeling approach. Unfortunately, none of the options mentioned in this thread and the other one referenced by Shalmeneser works. I tried reducing the angular deflection and deviation, as well as adjusting the helix segment length but the spring is still rendered incorrectly. Is there anything else that can be done to eliminate this issue ? I think that it's time to report it on GitHub.


OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.27809 (Git)
Build type: Release
Python 3.8.12, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: Polish/Poland (pl_PL)
kisolre
Veteran
Posts: 4162
Joined: Wed Nov 21, 2018 1:13 pm

Re: Spring renders incorrectly

Post by kisolre »

Using a SectionLength of 0.2 (1/5th) and the whole Helix object (instead of just the segments) works here:
.
SegmentLength.jpg
SegmentLength.jpg (78.92 KiB) Viewed 1306 times
.

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.28003 (Git)
Build type: Release
Branch: master
Hash: 248946009c2c584d6cc7731d156de677eba2462d
Python 3.8.8, Qt 5.15.2, Coin 4.0.1, OCC 7.5.3
Locale: Bulgarian/Bulgaria (bg_BG)
Attachments
Spring fail_kiss.FCStd
(90.17 KiB) Downloaded 14 times
User avatar
NewJoker
Veteran
Posts: 3014
Joined: Sun Oct 11, 2020 7:49 pm

Re: Spring renders incorrectly

Post by NewJoker »

kisolre wrote: Sat Mar 12, 2022 9:26 am
Thanks. In addition to changing the segment length, I also had to redefine the sweep path so that it includes the whole helix. How did you select it ? I only managed to do it by editing the Spine setting of the existing Sweep and deleting the edges listed next to the Helix. Is there a way to select the whole helix while defining a new Sweep ? When I click the Sweep Path button, I have to pick all the edges one by one. Box selection can help but maybe it's also possible to select the whole Helix object at once in some other way that I missed.
Post Reply