Geometric modelling: wireframe, surface and solid
Wireframe, surface and solid models (CSG, B-rep), the Euler–Poincaré check and Bezier/B-spline curves, with worked numericals.
Drafted with Aria, reviewed by the AiCanCode.org team. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Everything downstream of design — toolpaths, finite-element meshes, mass properties, rapid prototypes, inspection programs — needs a computer description of the part's geometry. How complete that description is decides what the software can do with it: a wireframe cannot tell you the volume of a part, a surface model cannot tell you which side is material, a solid model can. Choosing the right representation is the first decision in any CAD/CAM chain.
Key ideas
Wireframe models store only points (vertices) and the curves (edges) joining them.
- Cheap in memory and fast to display.
- Ambiguous: the same set of edges can be read as several different solids (the classic "which way is the hole?" figures), and there is no information about faces, so hidden-line removal, sectioning, volume and interference checks are impossible.
- Still used for simple 2½-D work and for construction geometry.
Surface models add the faces between edges, as analytic surfaces (plane, cylinder, cone, sphere, torus), ruled and revolved surfaces, or free-form surfaces (Bezier, B-spline, NURBS patches).
- Good for complex external shapes — car bodies, turbine blades, die cavities, consumer products — and enough for 3-axis and 5-axis surface machining.
- No notion of inside and outside: mass properties and automatic section views are unreliable, and gaps or overlaps between patches are common after data exchange.
Solid models describe a closed, bounded volume, so any point in space can be classified as inside, on or outside the part. This makes volume, mass, centre of gravity, moments of inertia, interference checks, sections and FEA meshing automatic. Two main schemes:
- Constructive solid geometry (CSG): the part is a binary tree of primitives (block, cylinder, cone, sphere, wedge, torus) combined by Boolean union (∪), difference (−) and intersection (∩). Compact, always valid, easy to edit by changing a primitive — but the faces and edges are not stored explicitly and must be computed to display or machine.
- Boundary representation (B-rep): the solid is stored as its bounding faces, the edges bounding each face and the vertices ending each edge, plus the topology linking them. Fast to display and query, handles free-form faces, but needs more storage and validity checks.
- Modern feature-based parametric modellers keep a history tree (CSG-like features: extrude, revolve, hole, fillet) and evaluate it into a B-rep — a hybrid.
Validity of a B-rep — the Euler–Poincaré formula. For a valid polyhedral solid, vertices, edges, faces, inner loops (rings), shells and through-holes must satisfy a fixed relation. Euler operators (make-edge-vertex, make-edge-face, kill-edge-make-ring, …) build a B-rep step by step while keeping it satisfied.
Free-form curves. Synthetic curves in CAD are parametric, P(u) with 0 ≤ u ≤ 1.
- Bezier curve: defined by n + 1 control points, degree n. It passes through the first and last points, is tangent at each end to the first and last legs of the control polygon, and lies inside the convex hull of the control points. Moving one control point changes the whole curve (global control), and the degree rises with the number of points.
- B-spline: the degree is chosen independently of the number of control points, and moving one point changes only a local part of the curve (local control). NURBS add weights, so they can represent conics (circles, ellipses) exactly — the industry standard in STEP and IGES exchange.
Formulas
V − E + F − L = 2(S − G)
- V vertices, E edges, F faces, L inner loops (rings) on faces, S separate shells (bodies), G genus (through-holes). Applies to a valid closed polyhedral solid. For a simple solid with no holes this reduces to
V − E + F = 2.
P(u) = Σ (i = 0 to n) B_i,n(u) · P_i , 0 ≤ u ≤ 1
- P_i control points (coordinates in mm), n degree, u parameter (dimensionless).
B_i,n(u) = C(n, i) · uⁱ · (1 − u)ⁿ⁻ⁱ
- Bernstein basis; C(n, i) = n! / (i!(n − i)!). The basis functions sum to 1 for every u.
P(u) = (1 − u)³P₀ + 3u(1 − u)²P₁ + 3u²(1 − u)P₂ + u³P₃
- Cubic Bezier (n = 3).
P′(0) = n(P₁ − P₀) , P′(1) = n(P_n − P_{n−1})
- End tangent vectors of a Bezier curve.
Worked examples
Example 1 (standard). A cubic Bezier curve has control points P₀(0, 0), P₁(1, 2), P₂(3, 2), P₃(4, 0) in mm. Find the point at u = 0.5 and the tangent vector at u = 0.
- At u = 0.5 the weights are (1 − u)³ = 0.125, 3u(1 − u)² = 0.375, 3u²(1 − u) = 0.375, u³ = 0.125.
- x = 0.125(0) + 0.375(1) + 0.375(3) + 0.125(4) = 0 + 0.375 + 1.125 + 0.5 = 2.0 mm.
- y = 0.125(0) + 0.375(2) + 0.375(2) + 0.125(0) = 1.5 mm. So P(0.5) = (2.0, 1.5) mm.
P′(0) = 3(P₁ − P₀)= 3(1, 2) = (3, 6) mm per unit u — pointing along the first leg of the polygon.
Example 2 (GATE level). (a) For the same curve find P(0.25). (b) A cube has a square through-hole from the top face to the bottom face. Check its B-rep with the Euler–Poincaré formula.
- (a) Weights at u = 0.25: 0.75³ = 0.421875; 3(0.25)(0.75)² = 0.421875; 3(0.25)²(0.75) = 0.140625; 0.25³ = 0.015625. Sum = 1 ✓.
- x = 0.421875(1) + 0.140625(3) + 0.015625(4) = 0.421875 + 0.421875 + 0.0625 = 0.90625 mm; y = 0.421875(2) + 0.140625(2) = 1.125 mm. P(0.25) = (0.906, 1.125) mm.
- (b) Count: V = 8 outer + 8 hole = 16. E = 12 outer + 4 (hole on top) + 4 (hole on bottom) + 4 (vertical hole edges) = 24. F = top + bottom + 4 outer sides + 4 hole walls = 10. L = 2 (the hole outlines are inner loops on the top and bottom faces). S = 1, G = 1.
- Left side: 16 − 24 + 10 − 2 = 0. Right side: 2(1 − 1) = 0. The formula is satisfied, so the topology is consistent.
Common mistakes
- Forgetting the inner loops L when a face has a hole in it; the count then appears to fail.
- Believing a surface model "is a solid" because it looks closed on screen — without inside/outside information mass properties are wrong.
- Saying a Bezier curve passes through all its control points. It passes only through the two end points.
- Mixing up control: Bezier is global, B-spline is local.
- Treating Euler–Poincaré as sufficient for validity. It is necessary, not sufficient — a count can balance for a nonsense shape.
- In CSG, assuming difference is commutative: A − B ≠ B − A.
For GATE PI
Conceptual MCQs compare wireframe, surface and solid models and CSG versus B-rep (storage, editing, ambiguity, what each can compute). Numerical questions ask for a point or tangent on a Bezier curve for given control points, the number of control points for a given degree, or a missing count (V, E or F) from the Euler formula. Practise Bernstein weights for u = 0.25, 0.5 and 0.75 until they are quick.
Quick check
- Which modelling scheme cannot compute the volume of a part?
- How many control points define a cubic Bezier curve?
- A simple polyhedron has 6 vertices and 9 edges. How many faces?
- For a quadratic Bezier with P₀(0, 0), P₁(2, 4), P₂(4, 0), find P(0.5).
- Which curve type gives local control?
Answers: 1. Wireframe (and surface models are unreliable). 2. Four. 3. F = 2 − 6 + 9 = 5 (a triangular prism). 4. (2, 2). 5. B-spline (and NURBS).
Interview questions
All Computer Integrated Manufacturing interview questionsTry answering each one aloud before you open it.
1.Compare wireframe, surface and solid models.Concept
A wireframe stores only vertices and edges: it is light and fast but ambiguous, and it cannot compute volume, remove hidden lines or check interference. A surface model adds faces, so it can describe complex shapes and drive surface machining, but it has no inside/outside information. A solid model describes a closed volume, so every point can be classified as inside, on or outside, which makes mass properties, sections, interference checks and FEA meshing automatic.
2.What is the difference between CSG and B-rep solid modelling?Concept
CSG stores the part as a tree of primitives combined by union, difference and intersection; it is compact, always valid and easy to edit, but faces and edges must be computed before display or machining. B-rep stores the bounding faces, edges and vertices and their connectivity explicitly; it displays and queries quickly and handles free-form faces, but uses more memory and needs validity checks. Modern parametric modellers keep a feature history (CSG-like) and evaluate it into a B-rep.
3.What is the Euler–Poincaré formula and why is it used in solid modelling?Concept
For a valid polyhedral solid, V − E + F − L = 2(S − G), where L is the number of inner loops on faces, S the number of shells and G the number of through-holes; for a simple solid it reduces to V − E + F = 2. B-rep modellers use Euler operators that keep this relation true at every step, which guarantees topological consistency. It is a necessary check, not a sufficient one — geometry can still be invalid.
4.Why do CAD systems use parametric rather than explicit equations for curves?Concept
A parametric curve P(u) handles vertical tangents, closed and multivalued shapes without special cases, and it is independent of the coordinate system, so transformations are applied simply to the control points. It also makes it easy to step along the curve in equal parameter increments for display or toolpath generation, and it extends naturally to surfaces P(u, v).
5.Compare Bezier curves, B-splines and NURBS.Concept
A Bezier curve's degree is fixed by its number of control points and every point influences the whole curve (global control). A B-spline lets you choose the degree independently and gives local control, so long smooth curves can be edited piece by piece. NURBS are non-uniform rational B-splines: weights on the control points let them represent conics such as circles exactly, which is why they are the standard for CAD data exchange.
6.A design imported through IGES shows gaps between surfaces and the CAM system refuses to generate a solid-based toolpath. What is going on and how would you fix it?Concept
IGES often transfers trimmed surfaces rather than a topologically connected solid, and tolerance differences between the two systems leave small gaps or overlaps, so the receiving system cannot close a watertight volume. The fix is to heal or sew the surfaces within a sensible tolerance in the CAD system, or to re-export using STEP (AP203/AP214) with solid topology. Machining can sometimes proceed on surfaces directly, but stock and gouge checking need a valid solid.
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?