Every sketch is a set of curves forming closed contours. Understanding how those curves are represented mathematically explains both what a CAD system can do and where it will refuse.
Engineering
Mechanical Engineering
Part 11 of 21
6 min read
Starting point
Contours, nesting and why solids fail
A sketch consists of curves connected into closed contours, or loops. A sketch
with a single contour generates a solid with no holes. A sketch with multiple
contours generates a solid with holes in it — but only to one level of
nesting: an outer contour containing one or more disconnected inner contours.
Attempt two levels of nesting, such as a rectangle inside a circle that is
itself inside a larger boundary, and the solid creation operation fails.
That is not an arbitrary software limit. It follows from the ambiguity of
what the second level means: material, or void? Rather than guess, the kernel
declines. Knowing the rule turns a mysterious failure into an obvious
one.
Classification
Two families of curve
Family 1
Analytic curves
Curves with closed-form defining equations: lines, circles, ellipses,
parabolas and hyperbolas. The family is also called the conics, because each
member arises from intersecting a cone with a plane.
Plane through the cone axis → a line
Plane perpendicular to the axis → a circle
Plane oblique to the axis → an ellipse, parabola or hyperbola
depending on the angle
Analytic curves are exact, compact to store and predictable to evaluate.
Almost all engineering geometry that is meant to be manufactured on conventional
machines is built from them.
Family 2
Synthetic curves
Curves defined by a polynomial fitted through or near a set of data points,
where the points control the shape. Cubic curves and B-splines — usually
called simply splines — are the common examples.
Synthetic curves offer far more modelling flexibility and are the efficient
route to free-form shape. Definition is straightforward: place the control
points by clicking in the sketch or by entering coordinates, then edit their
positions to reshape the curve.
The cost is control. A spline that looks correct may contain curvature
reversals invisible at normal zoom, and those reversals become visible defects
once the curve drives a surface.
Representation
Explicit and parametric forms
A point on a planar curve has coordinates (x, y); a point on a non-planar
curve has (x, y, z). Curves can be described in either of two ways.
Explicit (non-parametric) form
For a planar curve, an explicit equation relates y directly to x:
y = f(x), over the interval xmin ≤ x ≤
xmax.
Explicit equations for non-planar curves become complex and do not sit
comfortably in a CAD design environment, so CAD systems generally do not support
them. In practice a system will accept an explicit equation for a sketch curve
and will not accept one for a three-dimensional curve.
Parametric form
A parametric equation introduces a parameter — conventionally u,
although CAD systems commonly expose it as t — and expresses each
coordinate as a function of it:
P = P(u) = [x(u), y(u), z(u)], over umin ≤ u
≤ umax.
The parameter increases from its minimum at one end of the curve to its
maximum at the other, which defines the parameterisation direction. Every point
on the curve corresponds to exactly one value of u.
Why parametric form wins
Parametric representation is independent of the dimensionality of the space.
Set z = 0 in the three-dimensional equations and you have two-dimensional
modelling. This is precisely what happens when you sketch: within a sketch plane
the z value is zero, and on exiting the sketch the system transforms those
two-dimensional working coordinates into the three-dimensional model coordinate
system.
The tangent vector
Differentiating the position vector with respect to the parameter gives the
tangent vector P′ = dP/du at any point. For a straight
line defined by two endpoints, the tangent vector is constant —
independent of u — exactly as expected, and the slope in any coordinate
plane follows from the ratio of its components.
The tangent vector is not an academic nicety. Two significant CAD/CAM
applications depend on it, both by way of the normal vector derived from
it:
Mass property calculation
The direction of the normal vector distinguishes the inside of a solid, where
material is, from the outside, where holes are. Without that distinction, volume
integration has no sign convention.
NC programming
The cutting tool is advanced along the direction of the normal vector until
it contacts the surface to be machined. Approaching along the normal minimises
lateral shear force on the tool, which in turn reduces the chance of breaking it
on contact.
Beyond the sketch plane
Creating three-dimensional curves
Two-dimensional curves live in a sketch plane. Three-dimensional curves do
not, and there are several distinct routes to producing them.
Methods of generating 3D curves, and when each is appropriate
Method
Input
Best for
Parametric equation
x(t), y(t), z(t) with a parameter range.
Mathematically defined forms — helices, spirals, cycloids, involutes.
Exact and fully reproducible.
Points in space
A table of 3D coordinates.
Digitised or measured data, and curves derived from analysis
output.
3D sketching
Free sketching directly in space, snapping between planes.
Routing, weldment frames, wiring and pipe centrelines.
Composite curve
Existing curves, edges and sketch segments joined into one entity.
Producing a single continuous path for a sweep from geometry that was
created piecemeal.
Projection onto a face
A planar sketch plus a curved target face.
Text, decorative grooves and split lines that must follow a curved
surface.
Projected (intersecting) curves
Two sketches in intersecting planes.
Defining a spatial curve from two orthogonal profile views — a classic
technique inherited from lofting in shipbuilding and aircraft.
Face or surface intersection
Two faces or surfaces.
Deriving a curve where two surfaces meet, for trimming or for use as a sweep
path.
Helix and spiral
Pitch, revolutions, height, taper.
Springs, threads, augers — a dedicated route to the most common
parametric 3D curve.
Discipline
Curve management
Curves are easier to create than to control. A few habits prevent most of the
trouble that appears later, when the curves are driving surfaces.
Watch the parameterisation direction
Sweeps, lofts and surface operations inherit direction from their input
curves. Curves that run in opposing directions produce twisted results.
Minimise spline control points
Every extra point is a degree of freedom that can produce an unintended
inflection. Use the fewest points that achieve the shape.
Check curvature, not just position
A curve that passes through the right points can still have discontinuous
curvature. Inspect with a curvature comb before committing it to a
surface.
Prefer analytic where analytic will do
An arc is exact, light and machinable. A spline approximating an arc is none
of those things.
Keep curves in named sketches
Complex free-form models can accumulate dozens of driving curves. Named,
foldered sketches remain navigable; the default names do not.
Rebuild composites deliberately
Composite curves depend on their constituent geometry. If an underlying edge
disappears, the composite fails — and so does everything downstream of
it.
Key takeaways
Sketch contours may nest one level deep; two levels of nesting will fail the
solid operation.
Analytic curves are exact conics; synthetic curves are point-driven
polynomials offering flexibility at the cost of control.
CAD systems accept explicit equations for planar curves only, and parametric
equations for both planar and spatial curves.
The tangent vector yields the normal, which underpins both mass property
integration and safe tool approach in NC machining.
Three-dimensional curves have several distinct construction routes —
choose the one matching how the curve is defined, not the one you know
best.
Manage direction, control-point count and curvature continuity before curves
are used to drive surfaces.
Series
Continue the pathway
The SOLIDWORKS Design Approach series works through computer aided design as an engineering discipline, from first principles to manufacture.
Curves
Geometry
Mathematics
Surface Modelling
CAD
KEVOS®Precision to VisionEngineering · Mechanical EngineeringWritten by Kevin Jogin6 min read