Close

Relief for ODA Team in Ukraine

Learn more
ODA BimRv SDK
Overview of B-Rep in .rfa/.rvt Files

Introduction to B-Rep Models

B-Rep (or Boundary Representation) is a method of representing objects by their boundaries. B-Rep objects are stored as objects contained in sets of connected faces, edges and vertices, which are saved with topological information that defines the relationships between faces.

A solid's boundaries divide points into two types: points inside the solid and points outside the solid. Each face defines a bounded region on a surface. Geometrically, a face's boundary is represented by a closed loop of curves that lie on the surface. A face can have 0, 1, or more loops of edges, which bound the face. A loop contains one or more edges. Multiple loops are used in the following situations:

  • When a face has holes.
  • When loops bound multiple areas on a surface.

Each edge stores two lists of points: the first array stores start and end points, and the second array stores all interior points. Faces of B-Rep objects do not intersect each other, but they can be connected by a vertex or edge.

Sometimes it is important to know the orientation of a face. The normal vector of each face of the solid should always point to the exterior of the solid. Each edge has coedges — logical entities — which represent edges in the loops. Normally the direction of coedges is counter-clockwise. For all faces of an object, the direction of coedges should be the same. This means that for two faces that are bound by the same edge, the coedges have two different directions. The picture below shows how the next direction is used for face_0: (1-6) - (6-7) - (7-2) - (2-1). But to describe face_1, the coedge of a shared edge (2-1) will have a reversed direction (1-2).

B-Rep in .rfa/.rvt Files

ODA BimRv SDK has the following base classes to work with a B-Rep model:

  • OdBmGeometry — Main class of a B-Rep model in .rvt/.rfa files. It is used to determine the geometry of B-Rep objects and contains arrays of edges, shared surfaces, enabled faces, etc.
  • OdBmGInfo — Class stores geometry information as flags that are used to check the visibility type or to check whether an object is transparent, etc.
  • OdBmFace — Class represents a face. It has information about the underlying surface, has a pointer to the first loop of edges, etc.
  • OdBmGEdge — Class represents an edge. It contains pointers to the previous and next edges in the loop, array of faces connected with this edge, array of points, etc.
  • OdBmGEdgeLoop — Class represents loop of edges. It has information about a face connected with this loop, the next loop of the face, etc.

Each loop contains direct and reversed loops (direct loops are used for rendering currently). A loop is finished if the getNext() or getPrev() method (returns pointer to the next edge of a loop in a forward or reverse direction) of the edge returns a pointer to the loop.

Hierarchy and relations between the BimRv B-Rep classes are shown on picture below:

See Also

Work with Boundary Representation Objects

Example of Work with B-Rep Objects

Copyright © 2002 – 2022. Open Design Alliance. All rights reserved.