Skip to main content

Breps

Tellusim SDK provides efficient and high-performance implementations for common BREP (Boundary Representation) formats used in CAD, modeling, and simulation workflows.

info

The Brep system represents models as geometric primitives with boundary constraints defined by curves.

info

Support for additional Brep formats can be added via the BrepStream interface.

Supported Brep Formats

Tellusim Engine SDK natively supports the following BREP formats on all platforms:

  • BREP (*.brep) - Native Tellusim format optimized for fast loading and runtime efficiency. Supports all Brep features, including materials, and attachments. Node transformation matrices can be stored with 32-bit or 64-bit floating-point precision.

  • STEP (*.stp, *.step) - ISO 10303-21 standard format widely used for 3D CAD data exchange. Tellusim provides optimized STEP import with fast parsing and efficient conversion of complex assemblies, surfaces, and geometries.

  • TTF (*.ttf) - TrueType Font format. Interpreted as curves for BREP glyph generation.

Example

#include <format/TellusimBrep.h>

// Load brep
Brep brep;
if(!brep.load("brep.step")) return false;

// brep nodes
TS_LOGF(Message, "nodes %u\n", brep.getNumNodes());
for(const BrepNode &node : brep.getNodes()) {
TS_LOGT(Message, "{0}: {1} {2} {3} {4}\n", brep.findNode(node),
node.getName(),
node.getNumChildren(),
node.getNumGeometries(),
brep.findNode(node.getParent()));
}

// brep geometries
TS_LOGF(Message, "geometries %u\n", brep.getNumGeometries());
for(const BrepGeometry &geometry : brep.getGeometries()) {
TS_LOGT(Message, "{0}: <{1}>\n", geometry.getIndex(), geometry.getName());

// Faces
TS_LOGF(Message, " faces: %u\n", geometry.getNumFaces());
for(uint32_t i = 0; i < geometry.getNumFaces(); i++) {
const BrepFace &face = geometry.getFace(i);
TS_LOGT(Message, " {0}: {1} <{2}> {3}\n", i,
face.getTypeName(),
face.getName(),
face.getNumCurves());
}

// Materials
TS_LOGF(Message, " materials: %u\n", geometry.getNumMaterials());
for(uint32_t i = 0; i < geometry.getNumMaterials(); i++) {
const BrepMaterial &material = geometry.getMaterial(i);
TS_LOGT(Message, " {0}: <{1}>\n", i,
material.getName());
}
}