RobWorkProject  23.9.11-
Classes | Namespaces
BREP.hpp File Reference

Boundary representation (or B-Rep) of a geometric shape, using a collection of connected surfaces, edges and vertices. More...

#include <rw/core/Ptr.hpp>
#include <rw/geometry/GeometryData.hpp>
#include <rw/geometry/OBB.hpp>
#include <rw/math/Vector3D.hpp>
#include <set>

Classes

class  BREP
 Boundary representation (or B-Rep) of a geometric shape, using a collection of connected surfaces, edges and vertices. More...
 
class  BREP::CommonCurveSet
 Convenience type for a set of curves in a BREP. More...
 
struct  BREP::Vertex
 Vertex for the half-edge structure. More...
 
struct  BREP::Face
 Face concept in the half-edge structure. More...
 
struct  BREP::HalfEdge
 Half-edge structure. More...
 

Namespaces

 rw
 Deprecated namespace since 16/4-2020 for this class.
 
 rw::geometry
 Loading and storing of CAD models.
 

Detailed Description

Boundary representation (or B-Rep) of a geometric shape, using a collection of connected surfaces, edges and vertices.

In the Shell representation, the geometric shape is formed as a collection of disconnected faces. The BREP representation adds more information about the topology, as surface and curve elements are connected. For a certain surface, curve or vertex, it is possible to find information about the directly connected neighbouring surfaces, edges and vertices. From a BREP it is also possible to retrieve a Shell representation, but in the Shell representation information about connectedness is lost.

The half-edge data structure is used internally to store the topological information about the faces, edges and vertices, and how they are connected. Subtypes of BREP implements the concrete Surface and Curve geometries that can be attached to the faces and edges.

In general, the procedure for forming a BREP is the following:

  1. Add all the needed vertices by using the addVertex function. Each vertex is given an index starting, increasing from zero.
  2. Add the edges. An edge is added between two vertices using their vertex indexes. Addition of edges is documented under the specific BREP implementation (depending on the type of Curve that is expected). The edge is in general added with a Curve and two vertex indices. Notice that the curve must have limits, such that it starts in the first vertex and ends in the second vertex (the curve has a direction). Each edge is given an index, increasing from zero.
  3. Use the makeLoop function to form loops, based on the edges just added. The makeLoop takes an arbitrary number of edge indices. Notice that makeLoop expects the edge indexing to start at 1, and supports negative indices to indicate opposite direction of the edge. To form a loop, a list of these indexes is given, to form a counter clockwise loop of edges. Each loop is given a loop index, increasing from zero.
  4. Attach a Surface to each loop. Again, the addition of surfaces is documented under the specific BREP implementation (depending on the type of Surface that is expected). Each surface is given an increasing surface index, starting from zero. Notice that this index is not necessarily the same as the loop index.