Skip to main content

Crate ogeom_io

Crate ogeom_io 

Source
Expand description

Data exchange.

Elsewhere: the shape serialization, STEP, IGES, glTF and transfer-framework packages.

The native format comes first, in Phase 1, because it is what the test suite round-trips through, not because anyone wants it.

STEP is the one with real external value: there is no production-grade Rust STEP importer today. Parsing is the easy 20% (ruststep/espr cover it); the other 80% is semantic mapping onto our topology, unit and assembly-transform handling, and surviving spec-violating output from commercial CAD systems.

§Two formats, two things

native carries a whole document (topology, geometry, placements, tolerances, provenance) and reads back as the same model, handles and all. stl carries a triangle soup and loses everything else, which is the format’s nature rather than a shortcoming of the writer.

The crate root re-exports STL’s read and write() for the common case; the native pair are reached as native::read and native::write(), because “write this shape” means something different for each and a name that did not say which would be the wrong kind of convenience.

Re-exports§

pub use iges::IgesImport;
pub use iges::IgesReport;
pub use iges::read_iges;
pub use iges::write_iges;
pub use mesh_formats::ExportMesh;
pub use mesh_formats::ImportedMesh;
pub use mesh_formats::read_glb;
pub use mesh_formats::read_gltf;
pub use mesh_formats::write_glb;
pub use mesh_formats::write_obj;
pub use mesh_formats::write_ply;
pub use step::StepImport;
pub use step::StepReport;
pub use step::UntrimmedFace;
pub use step::WarningSummary;
pub use step::read_step;
pub use step::write_step;
pub use stl::Encoding;
pub use stl::read;
pub use stl::write;
pub use threemf::ObjectType;
pub use threemf::ThreeMfImport;
pub use threemf::ThreeMfObject;
pub use threemf::read_3mf;
pub use threemf::write_3mf;
pub use vrml::read_vrml;

Modules§

brep
The .brep interchange text format, both directions.
dxf
DXF: 2D drawings, the interchange the field expects.
iges
IGES exchange.
json
Just enough JSON to read a glTF document.
mesh_formats
Tessellated interchange: glTF 2.0, OBJ and PLY.
native
The native .og format: a whole document, written so it can be read back.
step
STEP exchange files: ISO 10303.
stl
STL: a triangle soup, in ASCII or binary.
threemf
3MF: the mesh package, written with its own archive.
vrml
Reading VRML scenes: the meshes a VRML97 (2.0) or VRML 1.0 file draws, each placed by the transforms above it and coloured by its material.