Expand description
The .brep interchange text format, both directions.
An interchange format for boundary representation that a good deal of the field can already read, implemented here from its published specification. It is worth having for one reason: it is the cheapest bridge that exists for an application moving onto this kernel, far cheaper than STEP to produce and far more faithful than a mesh.
The file is five sections (a header, a table of placements, a table of geometry, and a table of topology), and the last of those is the interesting one. Topology records are written leaves first and numbered backwards: the final record is number one, and a record refers to its children by how far above it they sit. So a parent can only name children already written, the file needs no forward references, and a reader can build the model in a single pass with nothing left dangling.
§What crosses
Everything this kernel’s own geometry can say: lines, circles, ellipses, parabolas, hyperbolas, B-splines, and the trimmed and offset forms over them, in two dimensions and three; planes, cylinders, cones, spheres, tori, extrusions, revolutions, B-spline surfaces, and trimmed and offset forms over those. All of the topology, with every occurrence’s orientation and placement, and edges carrying their curve, their pcurves and their seams.
§What does not
One thing the reader deliberately does not take on faith: whether an edge’s representations agree on parameterization. That is a claim, the writing kernel’s claim about its own data, and everything downstream relies on it, so it is measured here instead, each representation evaluated against the others at matched parameters and the claim re-established only where they actually land together. A file can therefore come back with the claim established where its writer never made it, which is the right direction to be wrong in.
Cached triangulations and the polygons that go with them are parsed and skipped rather than half-honoured: this kernel tessellates on demand and keeps its own cache, and a mesh read from a file would be a mesh nobody could say the deflection of. The bookkeeping flags each record carries are read and dropped for the same reason: they describe the state of the writer’s own session, not the shape.