I have no problem with the math - but all I know about FreeCAD is from my limited explorations. As I understand it, FreeCAD's primary representation of geometry is BREP - boundary representation. (Meshes being an obvious exception.)
Points are just 3D vectors.
Edges are parametric curves bounded by two endpoints (coincident for closed curves).
Faces are parametric surfaces bounded by Wires - a closed sequence of edges.
Solids are bounded by a closed set of Faces.
What is a parametric curve? Imagine a small insect crawling along the curve, starting at one end and proceeding smoothly to the other (smoothly means no stops and starts, no backing up, no sudden jerks of acceleration). Call the time t
. For each time t
the creature has a specific location (x(t), y(t), z(t)
) on our curve. Mathematically we express this as
telling us the location of the insect as a function of time. This is a parametric representation of the curve. It is not unique. In fact there are an infinite number of possible representations, depending on how fast the insect crawls and how much its speed varies.
The representations that are actually used are ones that have a convenient algebraic form that can be readily manipulated.
Consider a line along the x-axis from x = 0 to x = x_0. The simplest parameterization is
Our insect travels at unit speed along the line segment, so that the t parameter is synonymous with distance along the curve. This is the one used in FreeCAD for line segments.
Distance parameterization, although very convenient, is not always available, as even some relatively simple curves, such as ellipses, have no formula for arc-length.
Code: Select all
x = a * cos(t)
y = b * sin(t) # 0<= t <= 2 pi
in fact, is the parameterization used for an ellipse.
Another way of thinking about parameterization - which generalizes nicely to surfaces is to imagine we have an elastic string with distance markings along it. If we lay the unstretched string along our curve, the location of our markings (t=0, t=1 ...) in 3D space is the distance parameterization of our curve. Stretching and compressing our string along the curve provides all the other possible parameterizations.
So moving on to surfaces, imagine now graph paper printed on an elastic sheet. Wrap this sheet onto our surface. Call the coordinates printed on our graph paper u
. Each coordinate pair maps
to a point on our surface. This relation is expressed mathematically as
Code: Select all
x = x(u, v)
y = y(u, v)
z = z(u, v)
As in the curve case, the functions here have to be suitably smooth. Our stretched elastic graph paper cannot have folds or tears or other kinds of discontinuities. If our surface is closed, we have to sew edges of our graph-paper along seams
Unfortunately, there is no equivalent to the natural distance parameterizations of curves, for surfaces, because in general you cannot lay a flat sheet onto a curved surface without deforming it in some way. The exceptions to these are called developable surfaces
, like the surface of a cone. The well known example of this is you can't make a map of the earth without it being deformed in some way. There are large numbers of map projections in use, each of which correspond to a particular parameterization of the sphere (or oblate spheroid).
You can look at how FreeCAD parameterized any given face surface using the Curves workbench IsoCurve tool. It draws lines of constant u and v on the surface. These are the coordinate lines of our stretched graph paper.