Skip to content

CAD kernel foundations · Part one

What a B-rep is

A B-rep describes a solid by its boundary: an edge is a curve bounded by vertices, a face is a surface bounded by wires, and a solid is space bounded by shells. In this article we go through the rules a model must respect to be a valid solid (the Euler–Poincaré formula, the orientation convention, the manifold assumption and tolerances) and the four questions the theory leaves to whoever implements it.

Geometry bounded by topology

A boundary representation (B-rep) describes a solid by describing its skin, the surface that separates the inside from the outside. It does not store the volume, or the sweep that produced it, or a recipe to rebuild it. The skin is recorded precisely enough that, for any point in space, we can ask whether it is material or air, and everything else a kernel does is built on that question.

The description works in levels, and each level applies the same idea one dimension higher: take a piece of geometry and cut it down with a boundary.

the surfaces run on the whole circle is geometry; half is an edge the wire keeps one piece of the plane
One shape and the geometry it is cut from: five planes and one cylinder. Every surface is drawn running past the solid, and so is every curve where two of them meet. The circle where the cylinder crosses the top plane goes all the way round, but only half of it is an edge. The geometry does not say where to stop; the shaded faces and the closed wire do, and that is what topology adds.
Topological entityIs a piece ofBounded byDimension
Vertexa pointnothing (it is its own boundary)0
Edgea curvetwo vertices1
Wire—a chain of edges meeting end to end1
Facea surfaceone or more wires2
Shell—a set of faces joined along shared edges2
Solid3D spaceone or more shells3

A vertex carries a point. An edge carries a curve, and its two vertices say where that curve starts and stops. A face carries a surface, and a wire (a closed loop of edges) says which part of that infinite surface is real. A solid carries a region of space, and a shell (a closed set of faces) says which part of it.

Wires and shells carry no geometry of their own. They exist only to group: a wire says “these edges form one loop” and a shell says “these faces form one closed surface”. Without them we could not tell a face with a hole from two unrelated faces, or a solid with a cavity from two solids.

POINT → VERTEX V a point — and how far off it may be CURVE → EDGE V1 V2 the dashed curve is infinite; the edge is not SURFACE → FACE outer wire keeps material; inner wire removes it
The same step at three levels. The dashed geometry is unbounded and has no notion of inside; the solid outline is the topology that makes it finite. A face can carry more than one wire, one outer and any number of inner ones, and this is how a hole is represented without cutting the surface.
topology: the bounded piece geometry: unbounded inner wire: removes material
About this series

This is the first article in CAD Kernel Foundations, a series on what is inside a CAD kernel, from the bottom up. It starts here because the modelling algorithms (extrude, fillet, Boolean operations, defeaturing) all take a valid B-rep and return a valid B-rep, so we first need to define what valid means.

The series covers the mathematics a kernel is built on, the rules that make a shape valid, and then each modelling algorithm and what it has to compute.

Topology vs geometry

In short, a B-rep immerses geometry into topology:

  • Geometry defines the shape of objects. A plane, a cylinder, a NURBS surface, a circle, a line. It is parametric, unbounded (or bounded only by its own parameter range), and it knows nothing about the model it appears in.
  • Topology defines how shapes are connected: which edges bound this face, which faces meet at this edge, which shells enclose this solid. It is pure adjacency and has no shape on its own.

Every topological entity points at a geometric one, and the connectivity is recorded independently of the coordinates.

This lets the same geometry be used many times. A cylindrical surface is one object, and the four faces cut from it after a Boolean are four faces pointing at that one surface. A vertex is one point, and the three edges meeting at a corner of a cube all point at that one vertex. The sharing is what tells the model that they are the same corner. Two faces whose corners happen to have the same coordinates are not connected; two faces that reference the same vertex object are.

Rule

Connected edges must share the same vertex, the exact same instance, not only a vertex at the same position. Adjacent faces must share the same edge.

Most hand-built B-reps break this rule, and that is why a model can look perfect on screen and still be unusable by the algorithms that come after.

It is also why the connectivity has to be recorded instead of recovered from the geometry. In principle we could find adjacent entities by comparing coordinates, but floating point cannot be trusted with that comparison: two corners that should coincide will differ in the last few bits. Recovering topology from geometry means deciding again, every time, something that was already decided when the model was built. How the connectivity is stored is a separate question (some structures keep an object per element, others keep only the links and derive the elements from them), but in both cases it is a record with no coordinates in it.

The data structure in memory

Let’s look at how this is actually stored. Whatever the object, it breaks into two frames that are stored separately and joined only by links:

SOLID TOPOLOGY — how it is connected GEOMETRY — what shape it has SHELL WIRE (LOOP) FACE COEDGE EDGE VERTEX SURFACE PCURVE  u,v CURVE POINT no geometry of their own — they exist to group
The split, for any part. The topology frame says what touches what; the geometry frame says what shape it is; the dashed links are the only connection between them. A shell and a wire have nothing to their right because they carry no geometry: they are containers.

One box in this diagram is missing from most textbook versions: the coedge. A coedge is one use of an edge by one face. In a closed solid every edge is used twice, once by each of the two faces that meet there, and the two uses differ on almost everything: the direction the wire runs through the edge, the side the material is on, and the parametric curve that describes the edge in that face’s own (u, v) space. None of this can be stored on the edge, because the edge is shared, so it is stored on the coedge. This is also why the coedge is the only container-like entity in the diagram with geometry attached to it: the pcurve belongs to the use of the edge, not to the edge.

Here is a cube, with every entity and the counts written in:

TOPOLOGY — connectivity GEOMETRY — shape b solid ×1 sh shell ×1 f face ×6 l loop ×6 e edge ×12 v vertex ×8 s surface ×6 c curve ×12 p point ×8 no geometry — grouping only no geometry — grouping only every arrow is a pointer; nothing is found by comparing coordinates
A cube in memory, following Stroud and Nagy’s figure 2.21. Each topological level points down at the one below and sideways at its geometry. Shell and loop have nothing to their right, since they exist only to group.
topological entity geometric entity the link between them

First, the counts on the two sides are independent. They match here, because a cube has six faces on six distinct planes and twelve edges on twelve distinct lines, but nothing requires it. Cut a cylinder with a Boolean and we get four faces pointing at one surface. Model a part with several coplanar pockets and many faces share one plane.

Second, the real structure has more pointers than this diagram. Stroud and Nagy draw the same cube with every pointer in place and say it “is a mess, but it illustrates graphically what is in memory.” Most of the extra pointers are between loop and edge. A loop cannot simply list its edges, because each edge belongs to two loops and has to know its neighbours in each one. So the classical structure puts an intermediate record between them, one per use of an edge by a loop, pointing to the next and previous edge in each direction. This is the coedge again under Stroud’s name for it. ACIS calls the same record a coedge and Parasolid calls it a fin, and they differ mostly in which pointers they keep:

RecordPoints at
loopone edge-link, and back at its face
edge-linkthe next and previous link round the loop, its loop, and its edge
edgeits left and right edge-link, its curve, and its start and end vertex
vertexone loop or edge that uses it, and its point

These links are what let an algorithm move from a face to its neighbour across an edge, and they are why a B-rep is called a localised representation: every question is answered by following two or three pointers from where we are, never by searching the whole model. It is also why nobody builds this structure by hand. As Stroud and Nagy put it, if you were forced to assemble the datastructure manually in a CAD tool, you would probably not use a CAD system.

Counting a cube: Euler–Poincaré

To check whether a model is topologically coherent, we use the Euler–Poincaré formula. In its simplest form, for a solid with no holes through it and a single shell, it relates the number of vertices (V), edges (E) and faces (F):

V − E + F = 2
Vertices minus edges plus faces. For any simply connected polyhedron the result is 2, whatever its shape.

Let’s apply it to a cube built correctly, where the faces share their edges and vertices. It has 8 vertices, 12 edges and 6 faces:

A cube: 8, 12, 6

e0 e2 e1 e3 e4 e5 e7 e9 e6 e8 e10 e11 v7 v4 v6 v0 v3 v1 v5 v2

Eight vertices, twelve edges, six faces. 8 − 12 + 6 = 2. Each vertex is one object reached by three faces; each edge is one object reached by two faces.

Six loose faces: 24, 24, 6

The same six faces sharing nothing. Every corner is now three separate vertices and every edge two separate edges. 24 − 24 + 6 = 6.

Both drawings enclose the same volume and a renderer draws them identically. The formula tells them apart because it counts objects, not positions.

V − E + F = 8 − 12 + 6 = 2, so this cube satisfies the formula.

Now let’s build the same cube another way: construct each face on its own, each a correct square with four correct corner points, and put the six faces in a list to make a shell. Each face brings its own 4 vertices and 4 edges, so the model now has 24 vertices, 24 edges and 6 faces, and V − E + F = 24 − 24 + 6 = 6.

The result is not 2. On screen it is still a cube and every coordinate is right, but nothing in the model says that the top face and the front face meet. Grouping faces in a list does not give a valid solid.

This matters for everything that comes after. A Boolean operation walks from a face across an edge to the neighbouring face. A volume calculation needs a closed boundary to integrate over. A point-in-solid test needs to know that a ray crossing the skin has entered something. All of these follow the adjacency, and in the second cube there is no adjacency to follow. A system that only exports surfaces may never notice the problem, because the model renders fine.

Shared: one corner

V

Three faces, three edges, one vertex object. There is a path from one face to the next.

Coincident: three corners

Drawn touching, they look the same. Pulled apart, nothing holds them together.

The two cubes differ only in whether each corner is one object or three. Rendering cannot tell them apart, but every modelling algorithm can.

The full Euler–Poincaré formula

V − E + F = 2 only holds in the simplest case: one shell, no holes through the body and no holes in any face. Real parts have all three, and the general form has a term for each:

V − E + 2F − L − 2(S − G) = 0
The Euler–Poincaré formula as a B-rep validity condition. L counts all face bounds, every wire on every face, outer and inner. That is why F is doubled: each face has one outer bound, which the extra F cancels, so only the inner bounds are subtracted.
TermCountsWhat it corrects for
V, E, Funique vertices, edges, facesthe base count
Lface bounds (wires), inner and outerholes in a face: a pocket floor, a bolt hole through a plate
Sshellsinternal voids: a sealed cavity is a second shell of the same solid
Ggenus, summed over the shellsholes through the body (handles, in topology)

The same formula is also written with the inner wires only: v − e + f − h + 2g − 2b = 0, where h counts the inner wires and b the shells. Since every face has exactly one outer bound, h = L − F, and substituting gives back the form above. The two versions differ only in whether the author counts all wires or only the ones that make holes.

Let’s apply both forms to five shapes. The torus is a single face wrapped on itself in both directions and closed by two seams. The cylinder and the plate with a hole are built the way a kernel that closes periodic faces with a seam builds them: each cylindrical face is one face, closed by one seam edge.

ShapeVEFLSGV − E + FFull form
Cube812661020
Cylinder23331020
Plate with one hole through1015791120
Torus12111100
Six loose faces2424661064

The torus fails the simple form and passes the full one. It is a valid solid with a hole through it: V − E + F = 2 only describes solids of genus zero. The six loose faces fail both forms, and no value of G or S can fix a model whose faces are not joined.

The cylinder has 3 faces (the side and two caps), but also 3 edges and 2 vertices, which is more than we see on screen. Each circle is one edge, and each needs a vertex to start and end at. The third edge is the seam, the line where the side face closes on itself, and it runs between those two vertices. With the seam counted, 2 − 3 + 3 = 2.

The plate with a hole drilled through it adds the same three edges and two vertices to the plate’s 8, 12 and 6, plus one face for the wall of the hole: 10, 15 and 7. The simple form gives 10 − 15 + 7 = 2 and passes, but only by accident. The top and bottom faces each have an inner wire, so L = 9, and those two extra wires cancel the handle. The full form counts both: 10 − 15 + 14 − 9 − 2(1 − 1) = 0.

A second check counts edge uses. In a manifold model each edge is used twice, once by the face on each side of it, so the wires of the plate should list 30 uses for its 15 edges. They do: the top and bottom faces list 5 each, the four sides 4 each, and the wall of the hole 4 (the two circles, and the seam twice). The seam is the only edge whose two uses belong to the same face, which is the case the manifold section below comes back to.

Genus and multiplicity

Two of these terms need a closer look.

Multiplicity is b, the number of shells, meaning closed surfaces and not solids. A plain block has one. A block with a sealed cavity inside has two: the outer skin and the cavity wall, both bounding the same material. Two separate blocks modelled as one object also have two.

Genus is g, the number of handles, that is, holes that go all the way through. A torus has one. A plate with four bolt holes drilled through it has four. It is a property of the surface and does not depend on how the model was built: the holes could have been drilled, extruded or imported from a STEP file.

Genus 0

A plain plate. Nothing goes through it, so V − E + F = 2 holds as written.

Genus 1

One hole through. Topologically this is a torus, the same shape as the one in the table above.

Genus 2

Two holes, two handles. Four bolt holes would be genus 4.

Genus counts handles, not holes in the everyday sense. A blind pocket adds none, and a sealed cavity adds none either (it raises the multiplicity b instead, because it is a second closed shell). The three plates differ only in how many faces and edges they have; the genus is not recorded anywhere in them.

Braid, Hillyard and Stroud state the validity conditions as four rules, and the formula is the last of them:

RuleSays
1v, e, f, h, g, b ≥ 0no element count is negative
2if v = e = f = h = 0 then g = b = 0there is no genus without a body to have it
3if b > 0 then v ≥ b and f ≥ bevery shell needs at least one vertex and one face
4v − e + f − h = 2(b − g)the Euler–Poincaré formula
The genus is not stored

v, e, f and h can be counted directly from the datastructure. b can be counted too if shells are recorded explicitly; if they are not, they have to be found some other way.

g is different. The genus is not stored anywhere: it is not a field on any record, and no traversal returns it. In practice it is obtained by rearranging rule 4 and solving for it, which means the formula is no longer checking the model, only defining the one quantity nobody measured.

Computing the genus independently takes real work. Robin Hillyard built a package that computes the Betti numbers from the adjacencies in a model, which gives the genus explicitly. Without something like that, “the model satisfies Euler–Poincaré” can mean “we picked g so that it would.”

Stroud and Nagy give an example with one part reflected several times:

Shapevefhv − e + f − hbg
after one reflection1041566612210
after two19228812024011
after three35252821648−815

The element counts roughly double each time while the left-hand side falls from 2 to 0 to −8. With one shell throughout, this means the genus goes from 0 to 1 to 5: reflecting the shape onto itself closes loops between the copies, and each closed loop is a new handle. The datastructure does not record this anywhere; only the arithmetic shows it.

What the formula checks

Necessary, not sufficient

Satisfying Euler–Poincaré is necessary but not sufficient. It checks that the adjacency graph has the structure of a closed orientable surface. It says nothing about the geometry: a model can satisfy it while its faces pass through one another, or while an edge’s curve is far from the surface of its face.

It is a cheap check that catches the most common construction errors, not a proof that the model is correct.

A model that satisfies the formula is called Eulerian. The classical way to guarantee this is to make it impossible to break. Braid’s BUILD system and the systems that followed it (Mäntylä, Stroud) give no way to add a face to a shell directly. Instead they provide Euler operators, a small set of primitives that each change several counts at once, chosen so that the formula holds at every intermediate step and not only at the end. Braid showed that five of them, with their inverses, can build every Eulerian object and every transition between two of them, which turns “how do I build this shape” into a linear algebra problem with an exact answer.

Euler operators will get their own article later in the series. For now, the important point is the design choice behind them: make invalid states impossible to construct. A kernel can also make the opposite choice: build freely and check afterwards.

Manifold and non-manifold models

Everything above assumed a manifold model, and the counting rule depends on that assumption.

The assumption

Every edge is shared by exactly two faces. Every vertex has exactly one cycle of faces around it. If we zoom in far enough on any point of the boundary, we see a flat disc.

Under this condition the boundary is a surface in the ordinary sense, and Euler–Poincaré as stated is a theorem about such surfaces. Real models break it in three common ways, all of them found in ordinary parts.

Seam edges. When a surface closes on itself (a cylinder, a sphere, a torus), its parameter space still has to be a rectangle. So the face is cut somewhere in (u, v) even though nothing is cut in 3D. This cut is a seam edge, and it appears twice in the same loop with opposite orientations: one edge in space, two curves in parameter space. It is shared by one face with itself instead of by two faces.

Degenerate edges. At the pole of a sphere, a whole side of the parameter rectangle collapses to a single point in 3D. The edge exists in (u, v), has no 3D curve, and has the same vertex at both ends. It bounds the face in parameter space and bounds nothing in space. The vertex at the pole has more than one cycle of faces around it.

Non-manifold contact. Two blocks touching along a single edge or at a single vertex. A partition inside a shell, where three faces meet along one edge. A sheet body with no thickness. These are ordinary engineering objects, and in all of them the two-faces-per-edge rule fails.

In 3D: one closed face

seam

One edge, drawn once, where the surface meets itself.

In (u, v): a rectangle

E E u = 0 u = 2π

The same edge, twice, at both ends of the parameter range.

At a seam, the 3D topology and the UV topology are no longer the same graph. Code that handles closed surfaces mostly has to handle this, and many Boolean and healing bugs come from a seam edge treated as an ordinary one.

A kernel has three options, and each is used by some kernel: refuse non-manifold models; represent them with extended structures and operators; or represent them and let each algorithm decide whether it can handle them. For the rest of this series, what matters is that the counting rule does not apply as is outside the manifold case, so a check that assumes a manifold model can reject a model that is correct.

Orientation: material on the left

Counting is not enough, because the counts do not say which side is the material. A closed wire divides its surface into two regions, and nothing in the adjacency says which of the two is the face.

This is fixed by a direction rule on the wire:

Rule

Walking along the edges of a wire in the wire’s direction, the material is always on the left.

In 2D that is enough. In 3D, “left” depends on which way is up, so the rule is read with respect to the normal of the face’s surface, by the right-hand rule. Stand on the surface with your head along the normal, walk the wire, and the material is on your left.

Two consequences follow, and together they are how a hole works:

  • The outer wire of a face runs counter-clockwise seen from the side the normal points to, so it keeps the region it encloses.
  • Every inner wire runs the opposite way. The rule is the same, but because the direction is reversed, the material it keeps is outside the loop. This gives a hole without cutting the surface into pieces.
outer wire inner wire material on the left, both times
One rule, two loops, opposite directions. If either wire is reversed, the face claims the complement of what it should. This is invisible in a wireframe view and breaks every area, volume and Boolean computation afterwards.

At the shell level, the same convention gives the rule most people know: face normals point out of the material. This is the same convention, not a second one. A face’s normal is fixed by its surface parametrisation and its wire direction, so requiring every face of a shell to point outward is requiring every wire to be wound consistently. If one face is backwards, the shell is no longer consistently oriented, and the point-in-solid test (which decides membership by checking which way the boundary faces when a ray crosses it) will report some regions as inside and outside at the same time.

Consistent: all outward

Every normal points away from the material, so a ray crossing the skin always crosses it the same way.

Broken: one face reversed

The top face now treats the outside as inside. No coordinate has changed, but the volume comes out wrong and a point above the cube tests as material.

The two cubes have the same eight vertices, twelve edges, six surfaces and the same Euler–Poincaré count. They differ in one flag on one face, and only the first is a valid solid.

An inner shell, a sealed void inside a solid, follows the same rule, which is why it looks inverted: its faces also point away from the material, and since the material is outside that shell, its normals point into the cavity.

Floating point and tolerances

So far everything has been exact: an edge is a curve bounded by two vertices, a vertex is a point, and two faces meeting at an edge share it. In a computer this no longer holds.

A vertex stores three doubles. The curve of an edge ending at that vertex is evaluated by a parametric formula which, at the end parameter, returns three doubles that are close to the vertex but not equal to it. The surface of a face that owns the edge returns, at the corresponding parameters, three more doubles, close to both and equal to neither.

So the corner of a cube is not one point but a small cloud of points: one from the vertex, one from each of the three edge curves and one from each of the three surfaces. In an exact model they would all be the same point.

Stroud puts it directly: computers do not work with exact values, so it is necessary to use tolerances when comparing values. Everyone agrees with that, but the harder question is which tolerance to use.

Hans-Ulrich Pfeifer’s classification for the GPM volume module, as Stroud records it, lists six:

ToleranceNameCompares
TOLABSMachine tolerancethe smallest ε where 1 + ε > 1, a property of the hardware, not the model
TOLEPSLength tolerancethe shortest distance that still distinguishes two points
TOLANGAngle tolerancethe smallest angle that can be determined
TOLGEOGeometric toleranceintersections and geometric property calculations
TOLRELRelative tolerancesizes, against the magnitudes being compared
TOLPOLPolynomial tolerancework on the polynomials behind the geometry
Rule

Be consistent. The distance between two points must not be compared against TOLABS, and the angle between two lines must not be compared against TOLEPS. Mixing them means that changing one tolerance has unexpected effects somewhere unrelated.

Stroud gives an example. Two lines meet at a small angle. We can compare the angle against TOLANG, or, if the lines have the same length, compare the positions of their far endpoints against TOLEPS: if those are within tolerance, the angle is implicitly zero. Both tests are reasonable, but they are different tests and they do not always agree.

Global and local tolerances

The classical approach is a single global tolerance: one distance, set for the whole modelling session, below which everything is considered coincident. Parasolid used 5.0e-9 metres, chosen to be below the smallest realistic tolerance for a mechanical part. Every system using the modeller was advised to use the same value, so that models could be exchanged between them.

David Jackson’s 1995 paper, written from inside the Parasolid team to explain why they abandoned that approach, describes what a global tolerance gives and where it fails. It gives three things:

  • Set several orders of magnitude above floating-point precision, it makes the modeller largely unaffected by rounding error.
  • It prevents the creation of very small faces and edges that serve no purpose in the model and break downstream applications.
  • Used consistently, it keeps decisions from conflicting: topology and geometry agree because every decision that produced them was made against the same value.

But no single value works for every model:

ChooseAnd you get
A very small toleranceBlends and other approximated surfaces need a huge amount of defining data to reach it. The model becomes expensive to store and slow to compute with.
A large toleranceNo small features are possible anywhere on the model. Consistency also starts to fail: an edge shorter than about four times the tolerance cannot be split without producing edges that are too short, or edges that do not meet.

Imported data is the case that decides it. A trimmed surface created in another system meets its neighbour only to that system’s tolerance. Sometimes we can extend both surfaces and intersect them again to any accuracy we want, but where the two surfaces meet tangentially this may be impossible, because at higher resolution tangent surfaces simply do not meet. The only way to accept the model is then to raise the global tolerance to cover its worst case, which lowers the accuracy of the entire model to that of its worst corner.

Tolerant modelling

The approach Jackson describes, which most modern kernels adopted, is to make tolerance local: every face, edge and vertex carries its own. Intersection and coincidence tests then use the tolerances of the entities involved (two entities intersect if they come within the sum of their tolerances), and where there is ambiguity, the tolerances are increased locally and the topology merged, instead of loosening the whole model.

With local tolerances, each entity occupies a region instead of a position, and the shape of the region depends on the dimension:

Vertex: a sphere

TolV

Radius equal to the tolerance, centred on the stored point.

Edge: a pipe

TolE

A tube of that radius around the curve. Every representation of the edge lies inside it.

Face: a slab

2·TolF

A thickness above and below the surface, half on each side.

The tolerance region of each entity. It is the region where all representations of that entity are guaranteed to lie: the stored point, the curve evaluations, the surface evaluations, and whatever a neighbour computed for its own copy.

Since an edge must lie on its faces and a vertex on its edges, the regions have to nest:

tol(vertex)  ≥  tol(edge)  ≥  tol(face)
The nesting rule. A vertex must be loose enough to contain the ends of every edge that meets it, and an edge loose enough to stay inside every face that owns it. If the ordering is broken, an entity can end up outside the entity that is supposed to bound it.

So the tolerance strategy is mostly about structure, not about the value on any one entity: every entity has a tolerance, comparisons use the right pair, and the ordering holds.

What the theory leaves open

Everything above describes what a boundary representation has to record and what has to be true of it. It says almost nothing about how this is stored, and there are four questions the theory cannot answer, because each is a design decision rather than a fact:

The questionWhy the theory cannot settle it
How is sharing represented?“These two faces share an edge” is a statement about identity, and identity depends on storage. One object referenced twice and two records that happen to agree satisfy the same definition but behave very differently.
Is validity enforced or checked?The counting rule says what a valid model satisfies. It does not say whether a modeller should make invalid states impossible to build, or build freely and detect problems afterwards. Both give valid models, and they fail in opposite ways.
Where does the tolerance live?Every entity needs a tolerance region. Whether the value is stored on the entity, on the model, or on the operation asking the question is left open, and that choice decides which imported data can be accepted at all.
What happens off the manifold?Seams, degenerate edges and three-face contacts all occur in real models. The theory says the counting rule no longer applies as is. It does not say whether to refuse the model, repair it, or represent it and carry on.

These are the four places where every kernel has to make a choice, and these choices explain most of the differences between kernels: what they will load, what they will accept without complaint, and what they will change in your model.

The next article moves to the geometry: the parametrisations of the curves and surfaces the topology points at. After that come the algorithms that turn one valid B-rep into another.

Reading list

Sources

  • I. Stroud, Boundary Representation Modelling Techniques, Springer, 2006. Chapter 3 is the source for the datastructure elements and the topological connections; chapter 4 for the Euler operators and the spanning-set argument, including the cube decomposition and the cautionary note on their use as user-facing tools; §16.1 for Pfeifer’s tolerance classification and the consistency rule that goes with it. Appendix A gives the record definitions the description of the datastructure is drawn from.
  • I. Stroud, H. Nagy, Solid Modelling and CAD Systems: How to Survive a CAD System, Springer, 2011. Chapter 2 is the source for the in-memory datastructure diagram above (their figure 2.21, “Simple cube topological datastructure”, which the schema here follows), the record definitions for body, shell, face, loop, edge-link, edge and vertex, the “localised representation” observation, and the remark that the full diagram “is a mess, but it illustrates graphically what is in memory”. It also carries Braid, Hillyard and Stroud’s four validity rules, the definitions of multiplicity and genus, and the note that the genus is not recorded in the datastructure. The reflected-shape progression with genus 0, 1 and 5 is from its chapter 4.
  • D. J. Jackson, Boundary representation modelling with local tolerances, Solid Modeling ’95, ACM. The source for what a global tolerance buys, the three ways it fails, the 5.0e-9 metre Parasolid value, the tangential-surface argument, the short-edge splitting limit, and the sphere / tube / thickness tolerance regions with their nesting rule. Written from inside the Parasolid team, describing the change as they made it.
  • I. C. Braid, R. C. Hillyard, I. Stroud, the validity rules and the element vector (v, e, f, h, g, b); and R. Hillyard’s Betti-number package for determining genus explicitly. Read here through both Stroud books, which state the rules, attribute them and use them throughout.
  • H.-U. Pfeifer, the six tolerance classes defined for the GPM volume module. Read here through Stroud §16.1, which states the classification and attributes it. The original was not consulted.
  • I. C. Braid, Designing with Volumes, PhD dissertation, Cambridge University Computer Laboratory / CANTAB Press, 1974, and the BUILD system that came out of it: the Euler-operator tradition and the five-operator spanning set. Read here through Stroud chapters 2 and 4, which describe both and give the spanning set explicitly.
  • D. M. Straub, CAD as Code: Parametric Modeling and Engineering with Python, HM Munich University of Applied Sciences, 2026, CC BY 4.0, doi:10.60948/OPUS-1358. Chapter 5 is the source for the cylinder and the plate with a hole: their face, edge and vertex counts, the seam as a real edge between the two vertices, and the edge-use count.
  • M. Mäntylä, An Introduction to Solid Modeling, Computer Science Press, 1988, the standard treatment of Euler operators and the half-edge datastructure. Read here through Stroud. The book itself was not consulted.
Revision history

. Part numbers renumbered for the new part two, The Mathematics a Kernel Stands On.