B-Rep Model Structure for Developers

A CAD model that looks like a single solid object on screen is usually represented internally by a network of interconnected geometric and topological entities. Boundary representation, commonly called B-Rep, provides this structure by describing a solid through its boundary rather than storing every point inside its volume. Understanding that structure is essential for developers implementing model editing, feature recognition, geometry analysis, data exchange, or other operations on engineering 3D models.

Geometry and Topology Solve Different Problems

The key to understanding B-Rep is separating geometry from topology.

Geometry provides the mathematical description of shape. Points define positions, curves describe one-dimensional geometry, and surfaces define two-dimensional geometry embedded in 3D space. A cylindrical face, for example, may reference an underlying cylindrical surface.

Topology describes how these geometric elements are connected and bounded. Vertices, edges, loops, faces, shells, and bodies form relationships that define the actual structure of the model.

This separation allows the same mathematical surface to support a bounded face representing only a specific region. The geometric definition answers what the shape is; topology determines which part belongs to the model and how it connects to neighboring entities.

From Vertices to Bodies

A simplified B-Rep hierarchy starts with vertices. A vertex represents a topological location and is typically associated with a point in geometric space.

Edges connect vertices and usually reference curves. An edge does not necessarily use an entire mathematical curve: its valid portion is bounded by its topological structure.

Edges form loops that define face boundaries. A face references an underlying surface and uses one or more loops to determine its usable region. An outer loop normally describes the main boundary, while additional loops can represent holes or internal boundaries.

Connected faces form shells. A closed and consistently oriented shell can define the boundary of a solid body.

For application developers, these relationships matter because operations often modify several levels simultaneously. Splitting a face can create new edges and vertices; removing a feature may eliminate faces and reconnect surrounding topology.

Orientation Makes B-Rep Meaningful

Connectivity alone is not sufficient. B-Rep entities also require orientation.

Faces have orientations relative to their supporting surfaces, while edges have directions within boundary loops. These relationships allow the modeling system to distinguish the material side of a closed boundary and maintain consistent traversal through the topology.

Incorrect orientation can produce a model that appears acceptable when rendered but fails during Boolean operations, volume calculations, meshing, or subsequent solid modeling.

A geometric modeling kernel therefore needs to maintain both mathematical geometry and coherent topological orientation as the model changes.

Why Tolerances Are Part of the Structure

B-Rep models operate with finite numerical precision. Two neighboring faces may theoretically share the same edge while their underlying surfaces evaluate to slightly different coordinates near that boundary.

Modeling systems use tolerances to determine when geometric entities should be treated as coincident. This affects vertex matching, edge construction, surface intersections, topology validation, and many other geometric operations.

Tolerance management becomes particularly important when geometry is imported from another system. Small inconsistencies that were acceptable in the source representation may create gaps, overlapping entities, or invalid topology after conversion.

What Happens During a Boolean Operation

Consider subtracting a cylindrical tool body from a block to create a hole. At the B-Rep level, this is much more than removing volume.

The geometry engine calculates intersections between relevant faces. Existing faces may be split along intersection curves. Resulting regions are classified according to their relationship with the other body. Unwanted regions are removed, new boundary faces are incorporated, and the remaining entities are assembled into a valid shell.

The final model may contain new faces, edges, loops, and vertices that did not exist before the operation.

This illustrates why B-Rep is central to CAD kernel architecture: geometric calculations and topological reconstruction must work together.

B-Rep as an Application-Level Data Structure

Developers rarely work with B-Rep only to display geometry. CAD application development may require traversing faces, identifying neighboring entities, querying surface types, extracting edges, calculating intersections, recognizing geometric patterns, or mapping topology before and after model modifications.

An API or SDK therefore needs to expose enough information for applications to inspect these relationships without confusing topology with the underlying mathematical geometry.

For engineering software, understanding B-Rep at this level changes how modeling features are designed. A 3D model is not merely a collection of visible surfaces. It is a structured graph of geometric definitions and topological relationships whose consistency determines whether subsequent modeling, analysis, and manufacturing operations can be performed reliably.


Did this page help you?