Curves workbench

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
hammax
Veteran
Posts: 1985
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: Curves workbench

Post by hammax »

@Chris_G: some more questions about (sweep_2_rail) <=> Edit: Approximate Points to NURBS.
Working with that tool, one can find some parametrization-options.
- Continuity is almost selfexplaining - are there any recommendations?
- Parametrization grants 4 items - not so clear - a trial and error thing: Any recommendations?
- Smoothing Algorithm - 3 possible Parameters - maybe also a testing and experience thing: Any recommendations?

CWB_Parametr_7.png
CWB_Parametr_7.png (34.47 KiB) Viewed 2883 times
Last edited by hammax on Fri Dec 15, 2017 6:44 am, edited 2 times in total.
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Curves workbench

Post by freecad-heini-1 »

Hi Chris_G,
I had great success in creating a two-rail surface for the tide-bottle.
Very nice, thank you for the curves workbench:
phpBB [video]

Best regards
Wilfried

Please have look into this thread:
https://forum.freecadweb.org/viewtopic. ... 62#p204162

I miss G1 at the outside surface:
Image
User avatar
Chris_G
Veteran
Posts: 2572
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves workbench

Post by Chris_G »

hammax wrote: Thu Dec 14, 2017 2:14 pm @Chris_G: some more questions about sweep_2_rail.
Working with that tool, one can find some parametrization-options.
- Continuity is almost selfexplaining - are there any recommendations?
- Parametrization grants 4 items - not so clear - a trial and error thing: Any recommendations?
- Smoothing Algorithm - 3 possible Parameters - maybe also a testing and experience thing: Any recommendations?
This tool is not sweep_2_rails. It is the approximate tool.
One good way to feel how these settings work is to discretize an edge with few points (and eventually change the discretization method to get regularly or not regularly spaced points) and create an approximate curve on them.
You can then check the properties of the approximation curve with a comb plot, and the GeomInfo tool.
Even though there is nothing scientific in this, you end up getting a kind of feeling of the "quality" of the approximation curve :
- how many control points (less is better)
- how the control points are distributed (high-degrees can give CPs that are distributed in a very chaotic way)
Then you can suppose the same will apply to approximation surfaces.
hammax wrote: Thu Dec 14, 2017 2:14 pm - Continuity is almost selfexplaining - are there any recommendations?
It depends on what you want to do.
C# continuities are mathematical continuities. On a visual point of view, they don't really offer any value over their G# conterparts.
G1 is usually good enough for curves. They will look perfectly smooth. Inkscape only offers C1 continuous paths at best, and that's OK.
But on surfaces (or curves that will be used to generate surfaces later) then G2 will be better, and G3 will offer a visually perfectly smooth surface.
hammax wrote: Thu Dec 14, 2017 2:14 pm - Parametrization grants 4 items - not so clear - a trial and error thing: Any recommendations?
If the points you are approximating are regularly spaced, the parametrization setting will have a very low influence.
hammax wrote: Thu Dec 14, 2017 2:14 pm - Smoothing Algorithm - 3 possible Parameters - maybe also a testing and experience thing: Any recommendations?
The smoothing algo can be pretty interesting but it has some limitation.
It tries to find a curve (or surface) that minimizes the properties according to the supplied weights.

Curve properties :
CL = curve length
CC = curve curvature
CT = curve torsion

Algo settings :
WL = algo length weight
WC = algo curvature weight
XT = algo torsion weight

The algo tries to find the minimal criterion CL*WL + CC*WC + CT*WT
So you assign a high value to torsion weight to get a curve with the least possible torsion, a high value to curvature weight to get a curve with the least possible curvature, etc.
However the algo will not produce a curve or surface with continuity higher than C2.
User avatar
Chris_G
Veteran
Posts: 2572
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves workbench

Post by Chris_G »

freecad-heini-1 wrote: Thu Dec 14, 2017 3:37 pm Hi Chris_G,
I had great success in creating a two-rail surface for the tide-bottle.
Nice !
freecad-heini-1 wrote: Thu Dec 14, 2017 3:37 pm I miss G1 at the outside surface:
Unfortunately, I'm afraid I won't be able to do anything for this.
Sweep-2-rails tool is an approximation tool. It's not a Class-A surfacing tool. You will even be lucky if you get C0 continuity between the 2 halves :D
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Curves workbench

Post by freecad-heini-1 »

Hi Chris,
please can you tell me if there is a way to manipulate the poles from a bspline, or the points of a discetized edge in different axis directions, like to see in this vid at about min 8?
phpBB [video]

Best regards
Wilfried
User avatar
Chris_G
Veteran
Posts: 2572
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves workbench

Post by Chris_G »

freecad-heini-1 wrote: Sun Dec 17, 2017 10:08 pm Hi Chris,
please can you tell me if there is a way to manipulate the poles from a bspline, or the points of a discetized edge in different axis directions, like to see in this vid at about min 8?
Unfortunately, I don't have that kind of tool yet.
I would like to do this for a long time now.
But I have never had the courage to give it a try yet.
This will be a rather complex task for me, since it will require some Qt widgets code, along with some Coin3D editing code in the 3D view.
I will first need to convince myself : "Come on, Chris, you CAN do it !" :lol:
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Curves workbench

Post by freecad-heini-1 »

Chris_G wrote: Mon Dec 18, 2017 1:43 pm "Come on, Chris, you CAN do it !" :lol:
Yes Sir, you can do it!
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Curves workbench

Post by microelly2 »

freecad-heini-1 wrote: Mon Dec 18, 2017 1:48 pm
Chris_G wrote: Mon Dec 18, 2017 1:43 pm "Come on, Chris, you CAN do it !" :lol:
Yes Sir, you can do it!
Yes Sir, you can do it!
You have already a lot of methods for access the coin 3D space,
so it should be possible to get an easier to use tool.
some of my ideas are here
phpBB [video]

phpBB [video]

meantime we have learned a lot to get a better tool.
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Curves workbench

Post by freecad-heini-1 »

Yes, yes, yes, teamwork.
Please meet over meet.jit.si/freeacd
Take a cold oder hot drink and then start a video conference.

Maybe realthunder and deepsoic are interested to join the video conference for a coffee / tea or beer. 8-)
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Curves workbench

Post by looo »

Maybe we can apply such interaction nodes?:
https://forum.freecadweb.org/viewtopic. ... 72#p169625

phpBB [video]


combining them with widgets is not a big problem:
phpBB [video]


(ignore the py2 vs py3 stuff, there is no difference between py3 and py2 anymore.)
Post Reply