C3D Engineering Blog

B-Rep Geometry for CAD Developers

B-Rep is one of the central data representations used in solid modeling systems, but its role is often misunderstood outside the geometry layer of CAD software. A boundary representation does not describe a solid as a simple collection of surfaces. It combines mathematical geometry with explicit topological relationships, allowing software to determine how faces, edges and vertices form a coherent three-dimensional body.

Geometry Does Not Define the Whole Model

The geometric part of a B-Rep model contains mathematical entities such as curves and surfaces. A planar face may reference an infinite plane, while a cylindrical face may be based on a cylindrical surface extending beyond the visible portion of the model.

Topology defines which part of that geometry belongs to the actual object.

A typical boundary representation contains vertices, edges, loops, faces, shells and bodies. An edge references a curve but is limited by its vertices. A face references a surface but is bounded by one or more loops. Connected faces form shells, and a closed shell can represent the boundary of a solid.

This separation gives CAD systems considerable flexibility. The same type of surface can participate in many different models because its final role depends on topology rather than on the mathematical definition alone.

What Happens During a B-Rep Operation

Consider subtracting a cylindrical hole from a solid block. At application level, this may appear to be a single Boolean subtraction. Internally, the operation requires substantially more work.

The modeling system calculates intersections between the participating faces, generates intersection curves, splits existing edges and faces where necessary, and determines which resulting regions should remain. New topological entities are then constructed and connected into the modified body.

Similar processes appear in trimming, filleting, chamfering and direct face editing. These operations do not merely change coordinates. They can alter the structure of the B-Rep itself.

A geometric kernel or geometric modeling kernel handles much of this interaction between mathematical geometry and topology. The distinction is critical because a model can contain individually valid surfaces while still having invalid connections between them.

Tolerances and Model Validity

Exact mathematical coincidence is difficult to maintain in numerical computation. Two vertices that conceptually represent the same point may differ by a very small distance after calculations involving intersections or transformations.

CAD kernels therefore use tolerances when evaluating geometric relationships. The tolerance model affects decisions such as whether two points should be treated as coincident or whether an edge lies on a surface boundary.

Poorly managed tolerances can cause gaps, duplicated topology or failed operations. Imported models are especially challenging because their geometry may have been generated using different modeling assumptions or numerical tolerances.

Validation routines commonly inspect whether faces are connected consistently, whether edge orientations are coherent and whether shells represent meaningful boundaries.

B-Rep in CAD Application Development

For developers working through an API or SDK, B-Rep entities often provide access to much more than visual geometry. Applications may inspect faces to identify machining regions, analyze edges for feature recognition, calculate surface properties or associate application-specific information with parts of a model.

A CAM system, for example, may classify planar and cylindrical faces when preparing machining operations. A mechanical CAD application may track faces created by individual features. CAE software may use model boundaries when preparing geometry for meshing.

This makes entity identity an important architectural concern. After a Boolean operation or feature modification, some original faces may disappear, while others may be split or replaced. Application code that references those entities must be prepared for topology to change.

Thinking in Boundaries Rather Than Shapes

B-Rep becomes easier to work with when developers stop treating a 3D model as a visual shape and instead view it as a network of geometric definitions constrained by topology.

A face is not simply a visible patch. An edge is not merely a displayed line. Each entity participates in relationships that determine whether the complete model represents a valid solid.

That perspective is useful when designing modeling commands, diagnosing failed geometric operations and integrating a CAD kernel into engineering software. Many problems that appear to be failures of 3D geometry are, at a deeper level, problems involving the consistency and reconstruction of the boundary representation.

Related Articles