Skip to main content

Module export

Module export 

Source
Expand description

Writing a part as a STEP file (AP214, the geometry every CAD system reads): each solid a MANIFOLD_SOLID_BREP — a BREP_WITH_VOIDS if it has voids — and each sheet of faces standing on their own a SHELL_BASED_SURFACE_MODEL, with every surface and curve written exactly as the kernel holds it: a B_SPLINE_*_WITH_KNOTS, rational where a weight is not one. Lengths are millimetres: a length of one in the kernel is one millimetre.

A part placing others (write_part) is written as an assembly: each distinct component placed in it — every instance sharing one built component — a product of its own with its bodies in its own frame, and each placement a NEXT_ASSEMBLY_USAGE_OCCURRENCE of it in the product it is placed in, with an ITEM_DEFINED_TRANSFORMATION saying where. A part placing others has a SHAPE_REPRESENTATION of the placements, its own bodies related to it; a part placing none has its bodies’ representation as its shape.

Every value is written as its interval’s midpoint. Entities are named after the part’s names for them, so a face picked as extrude(E,end) here is called that in the file.

Structs§

Step
Writes the part as far as the program runs as a STEP file — the parts placed in it as an assembly (see write_part) — named after the program’s file.

Functions§

write_part
The part reader reads — its bodies and the parts placed in it, however deep — as the text of a STEP file whose product is called name.
write_step
The bodies of model as the text of a STEP file whose product is called name.