pcurve and other FreeCAD concepts.

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!
Post Reply
User avatar
onekk
Veteran
Posts: 6199
Joined: Sat Jan 17, 2015 7:48 am
Contact:

pcurve and other FreeCAD concepts.

Post by onekk »

Hello, I'm stuck with some conceptual things, speaking about BSPline and BSplineSurfaces.
  1. What are the concepts behing the BSPline definition used in OCCT. (my fault as someone has tried to explain these things to me, but I missed to note down the post reference)
  2. what are pcurves? My fault also here, but a quick search in OCCT documentation gave no proper results, meybe "projected cruves"

TIA and Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
wandererfan
Veteran
Posts: 6309
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: pcurve and other FreeCAD concepts.

Post by wandererfan »

onekk wrote: Sat Aug 06, 2022 11:06 am what are pcurves? My fault also here, but a quick search in OCCT documentation gave no proper results, meybe "projected cruves"
2d parametric curves on the surface underlying the face. Some OCC algos require these.

see: https://opencascade.blogspot.com/2009/0 ... de_12.html

for the other point, maybe B-Splines? More math than OOC though.
User avatar
onekk
Veteran
Posts: 6199
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: pcurve and other FreeCAD concepts.

Post by onekk »

wandererfan wrote: Sat Aug 06, 2022 2:39 pm
onekk wrote: Sat Aug 06, 2022 11:06 am what are pcurves? My fault also here, but a quick search in OCCT documentation gave no proper results, meybe "projected cruves"
2d parametric curves on the surface underlying the face. Some OCC algos require these.

see: https://opencascade.blogspot.com/2009/0 ... de_12.html

for the other point, maybe B-Splines? More math than OOC though.
Thanks.

Although I've read recently the article you linked. I've missed:
- Curve C(t) in 3D space, encoded as Geom_Curve. This is considered as a primary representation;
- Curve(s) P(t) in parametric 2D space of a surface underlying each face the edge belongs to. These are often called pcurves and are encoded as Geom2d_Curve;
So P stand for Parametric.

For BSPlines I know the wiki page, mut as there are some peculiarity about the underlying explanation, about poles, knots, and the way they are defined in FC, I don't remember well but @chrisb or @Chris_G once has explained to me the mathematics theory that OCCT follow to define things, like "closed BSpline" and the way you have to specify the knots and similar data that are slightly different from what is the "most found" explanations around.

My fault is not having noted down the forum post reference and probably the linked documents.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
chrisb
Veteran
Posts: 54168
Joined: Tue Mar 17, 2015 9:14 am

Re: pcurve and other FreeCAD concepts.

Post by chrisb »

onekk wrote: Sat Aug 06, 2022 3:04 pm @chrisb or @Chris_G once has explained to me the mathematics theory that OCCT follow to define things, like "closed BSpline" and the way you have to specify the knots and similar data that are slightly different from what is the "most found" explanations around.
I have done quite some research on B-splines, but have hardly posted here about it.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Chris_G
Veteran
Posts: 2596
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: pcurve and other FreeCAD concepts.

Post by Chris_G »

I think the only thing that OCCT does slightly different from others, is separating the knot sequence into 2 lists (of equal length) :
- knots is the list of unique knots (= not repeated)
- multiplicities (integers) is the list that represent the number of repetition of each knot.

So, a knot sequence that is usually represented like this, for example :
[0.0, 0.0, 0.0, 0.0, 0.3, 0.3, 0.5, 0.5, 0.5, 0.7, 1.0, 1.0, 1.0, 1.0]

will look like this in OCCT / FreeCAD :
knots = [0.0, 0.3, 0.5, 0.7, 1.0]
multiplicities = [4, 2, 3, 1, 4]
User avatar
onekk
Veteran
Posts: 6199
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: pcurve and other FreeCAD concepts.

Post by onekk »

chrisb wrote: Sat Aug 06, 2022 3:54 pm ...
I have done quite some research on B-splines, but have hardly posted here about it.
Thanks for answering.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
onekk
Veteran
Posts: 6199
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: pcurve and other FreeCAD concepts.

Post by onekk »

Chris_G wrote: Sat Aug 06, 2022 3:54 pm I think the only thing that OCCT ....
Many thanks, this was the "different" thing I remembered, let me note it down so no more :oops:.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Post Reply