Hide menu
Loading...
Searching...
No Matches
Part Representations

Representations are associated with a ModelData_Part and define its shape.

The following representations are supported:

  • Boundary Representation (B-Rep) – exact geometrical representation.
  • Polygonal or faceted, or tessellated – approximated representation with the help of a mesh.

Each part may have zero or one Boundary Representation.

Boundary Representation

B-Rep includes a topological model that describes hierarchy and connectivity information between elements in a 3D model (from vertices to a solid), as well as the underlying geometry entities (points, curves and surfaces):

Topology and Geometry

Topological entities inherit the base class ModelData_Shape , curves inherit the class Geom_Curve and surfaces inherit from the base class Geom_Surface .

Manufacturing Toolkit supports the next types of bodies: ModelData_SolidBody , ModelData_SheetBody and ModelData_WireframeBody . These bodies form the B-Rep representation of a part.

B-Rep bodies

Supported geometries include:

  • Analytical representations (lines, circles, ellipses, planar, spherical, cylindrical and other elementary surfaces);
  • Extrusion and rotation surfaces;
  • Offset curves and surfaces;
  • Bezier and NURBS curves and surfaces.

Each topological entity can be explored for its children. Vertices, edges and faces provide access to associated geometries.

aWire = ... # mtk.ModelData_Wire
anIt = mtk.ShapeIterator(aWire)
while anIt.HasNext():
anEdge = mtk.ModelData_Edge.Cast(anIt.Next())
# edge's curve range
aFirst = 0.0
aLast = 0.0
aCurve = anEdge.Curve(aFirst, aLast)

Curves and surfaces give access to their defining parameters (e.g. axis for a circle, or control points for a NURBS curve):

aCircle = ... # mtk.Geom_Circle
anAxis = aCircle.Position()
aPoint = aCircle.Value(math.pi / 2)

Polygonal Representation

Polygonal representation describes a 3D shape as a set of flat polygonal facets. Such meshes are commonly used for visualization and approximate geometry analysis.

In MTK, polygonal geometry is represented by ModelData_MeshBody , which holds one or more ModelData_MeshShape elements.