SOLVESPACE -- parametric 2d/3d CAD
Examples
Tutorials
Features
Download
Reference
Technology
Library
Forum
Contact
USER FORUM

(you are viewing a thread; or go back to list of threads)

Qubic bezier spline? I want qudratic bezier curve in sketch! (by Geert Hospers)

Background:
My background is mechanical design engineer, I am not a programmer.
I try to model an airfoil.
AFAIK this is the standard definition for many NACA profiles.
NASA report No. 460
See pages 4 and 5 of this document: https://digital.library.unt.ed...2/1/high_res_d/19930091108.pdf
I would like to make this in Solvespace.

1) A cubic spline is too complex as a BASIC construction element. It seems that Solvespace tends to see it in 2 dimensional Sketch as a 3 dimensional curve.
In the sketch plane it is very desirable to have the most simple spline: a parabola, i.e. a QUADRATIC bezier curve.
It is very simple to manupalate by moving the midpoint. It is the intersection of 2 tangent lines.
The definition is very clear and understandable. It fits in a triangle. The top of curve is halfway the half triangle base. And so on.
Its equidistant offset is also a parabola (I define equidistant offset as a ball that fits everywhere between the 2 parabola).
The parabola (quadratic bezier curve) is constructed with same ease as a circle segment, but gives extra control.
With the parabola (quadratic bezier curve) NACA profiles could quickly be implemented or at least easily be approximated.



2) It is desirable to be able to plot a curve (or import a plot) in Solvespace.
Fri Jul 5 2019, 05:12:18
(no subject) (by Matthew H)
Kind of a pain, but any polynomial of degree m is also a polynomial of degree n > m, with the leading coefficient equal to zero. So the cubic Beziers should be able to exactly implement quadratic Beziers with a little math:

https://en.wikipedia.org/wiki/B%C3%A9zier_curve#Degree_elevation
Fri Jul 5 2019, 13:55:47
(no subject) (by Geert Hospers)
@Matthew H
At first sight you indicate how the degree can be increased, but I want it decreased.

But the solution could be very simple: merge the 2 mid control points into 1.
I will check that out.
Sat Jul 6 2019, 04:39:25
(no subject) (by Matthew H)
I think you want increased-you have a quadratic Bezier, and SolveSpace needs a cubic.
Sat Jul 6 2019, 18:52:08
(no subject) (by Paul)
Found this paper about the NACA series foils:

https://scholarsarchive.byu.ed...rticle=3150&context=facpub

It seems they are not 2nd order curves in most cases, but they do talk about fitting bezier curves to them in great detail. The 4-series is 8th order apparently.

As for 2nd order curves in solvespace, that is entirely possible with regard to the internals. Every surface created is composed of sections that are 3rd order NURBS surfaces. These are created from Bezier loops which are created from the entities in a sketch. The flow is SketchEntities->Beziers->NURBS where the 2nd two are up to 3rd degree (but can be lower).

What's missing is a sketch entity that is a single 2nd order curve, preferably with an adjustable weight for the control point. This would be handy for creating an ellipse - make the angle formed by the 3 points 90 degrees and set the weight to 0.70710678.

Another idea this suggests to me is the ability to directly enter coordinates for points, say a menu item Constrain->Coordinates. This could just be a constraint directly on x and/or y and would go really well with the much desired named parameters and expressions.

I think it's worth opening a ticket for both of these, even though it may be a while before they get done. These could be good features for new developers to implement.
Sun Jul 7 2019, 13:21:16
(no subject) (by Geert Hospers)
I tried to force the Bezier into "parabola mode" (I 'think' this makes a parabola) by forcing the 2 midpoints on a line parallel to the endpoints, and on a line of 1/3 length of the base.

I have some problem that the base points move a little if I move the top. It is like the curve does not want to be in this plane.

I will try to attach a picture and also the Solvespace file.
Sun Jul 7 2019, 17:38:55, download attachment Bezier3parabola.slvs~
(no subject) (by Geert Hospers)
The picture for a quick view.
Sun Jul 7 2019, 17:47:15, download attachment Bezier3parabola.png
(no subject) (by EvilSpirit)
Actually, you need Cubic Splines even if your input data is Quadratic. This fact is based on physics - for creating good wing profile you need to apply g2-continuity for you curves when they contact to each other and this can be perfromed only if you have curves of 3rd (and more) order (you should take derivative twice and still get something). So, the best way to get this is already in SolveSpace - you can create bezier spline with precomputed g2-continuity - just create bezier loop (up to 16 points is supported).
Tue Jul 9 2019, 00:02:56
(no subject) (by EvilSpirit)
But in case of having document where formulas for wing profile is written in some form, better to have arbitrary function curve to define any profile. This approach you can test using http://notecad.xyz where function entitiy is available.
Tue Jul 9 2019, 00:16:27
(no subject) (by Geert Hospers)
@EvilSpirit
I did a quick try.
I made the contour.
Then, if I change one control point EVERYTHING changes...
May be no problem (or even nice) for an artist.

In engineering I want/need local control.
We split things in simple elements.
The quadratic bezier is almost as simple to use as a circle.

So far I cood not fully manage the Solvespace qubic bezier to behave as a quadratic type (all points still move if I change one).
I hope we get a proper quadratic bezier
Examples:
http://www.improve2011.it/Full_Paper/77.pdf
http://demonstrations.wolfram....ectrixInAQuadraticBezierCurve/
Tue Jul 9 2019, 14:32:41
(no subject) (by Geert Hospers)
Ah! I need to lock the end points of the parabola triangle...!
Then if I move the top I get the control I need.

I must say that this parabola thing is an extremely good excercise in learning Solvespace constraints :)
Tue Jul 9 2019, 15:15:13
(no subject) (by Geert Hospers)
For those who are interested only in representing airfoils.
I did make a plot of this NACA profile (page 4):
https://digital.library.unt.ed...2/1/high_res_d/19930091108.pdf

I scaled up the y-co├Ârdinate by 3.3333
You can clearly see that from x=0 to x=.3 it is a circle, and from x=.3 to x=1 it is a parabola.
Just scale down the y-co├Ârdinates to get thinner profiles.

The upper half of the airfoil can be represented by 1 cubic spline!
Thu Jul 11 2019, 09:05:39, download attachment HalfNACA0060.png
(no subject) (by Geert Hospers)
@Geert Hospers (Sun Jul 7 2019, 17:38:55)

I have extended the Bezier3parabola with a construct for finding focus position and parabola center line.
See attached new Bezier3parabola.slvs file.
I would like very much to mark the point of intersection of centerline and parabola.
But that is not possible GRRRRRRRRRRRRRRRRRR!
Come on developers, we need that.

If it was possible then I also could find directrix and radius at center...
Sat Jul 13 2019, 14:27:18, download attachment Bezier3parabola.slvs
(no subject) (by Geert Hospers)
I have added a solution for finding the directrix.
I stole it from: http://www.pandd.demon.nl/parab/parab3.htm (Dick Klingens great website)

11. Opnieuw: constructies
Constructie 15

===============================================================
I call this Bezier3parabola_FDR
F= Focus point
D= Directrix line
R= Radius at nose

In the attached slvs I have unlocked the right triangle point and "Lock Point Where Dragged" the cirkel center.
And the cirkel diameter is set to 50.
Change/remove diameter constraint or lock points as you like.
Have fun!

(In fact this all built around an unknown parabola, only defined by Bezier triangle.
What I hope for is that Solvespace developers make a Bezier2 without all my construction lines and the abality to select an arbitrary point on the parabola curve, and that it also understands 'make tangent' to a line or other simple curve like circle or parabola)
Sun Jul 14 2019, 06:49:43, download attachment Bezier3parabola_FDR.slvs
(no subject) (by Geert Hospers)
Bezierrparabola_FDR
Changed: some constrains that caused problems.
Sun Jul 14 2019, 10:39:02, download attachment Bezier3parabola_FDR.slvs
(no subject) (by Geert Hospers)
New! Bezier3parabola_T


Traceble parabola. You can take tangent at trace point.
Or intersect and select what part of the parabola you want to cut or keep.
With this we could have "Parallel/Tangent" and "On point/curve/plain" working on parabola (I suppose...)


This is totally different construction if compared to The previous Bezier3parbola_FDR.
Now it is built by laying 2 Bezier3parabola on the same main Bezier3parabola.
In the construction it is key to make the 3 axises parallel.
I removed some parts of the 3th parabola (the 1/3 bar), it appers redundant with other parallel constrains.
If "Move pt" is going passed left angle then the thing goes wrong.
If "Move pt" is going passed right corner it is OK.

Have fun!
Tue Jul 16 2019, 08:33:20, download attachment Bezier3parabola_T.slvs
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):
© 2008-2018 SolveSpace contributors. Most recent update Nov 22 2018.