Skip to main content

Crate ogeom_io

Crate ogeom_io 

Source
Expand description

Data exchange.

The native format is what the test suite round-trips through. STEP is the exchange format with external value, and reading it is mostly not parsing: the Part 21 syntax is the small part, and the rest is the semantic mapping onto this kernel’s topology, unit and assembly-transform handling, and surviving the spec-violating output real exporters write.

§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 cloud::PointCloud;
pub use cloud::Scalar;
pub use cloud::XyzColumn;
pub use cloud::read_pts;
pub use cloud::read_xyz;
pub use cloud::write_xyz;
pub use iges::IgesExport;
pub use iges::IgesImport;
pub use iges::IgesReport;
pub use iges::read_iges;
pub use iges::read_iges_file;
pub use iges::write_iges;
pub use iges::write_iges_reported;
pub use mesh_formats::ExportMesh;
pub use mesh_formats::ImportedMesh;
pub use mesh_formats::MeshColours;
pub use mesh_formats::ObjImport;
pub use mesh_formats::PlyImport;
pub use mesh_formats::read_glb;
pub use mesh_formats::read_gltf;
pub use mesh_formats::read_obj;
pub use mesh_formats::read_obj_file;
pub use mesh_formats::read_obj_with_materials;
pub use mesh_formats::read_ply;
pub use mesh_formats::read_ply_bytes;
pub use mesh_formats::write_glb;
pub use mesh_formats::write_obj;
pub use mesh_formats::write_ply;
pub use mesh_formats::write_ply_binary;
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::StlMesh;
pub use stl::read;
pub use stl::read_with_quantum;
pub use stl::write;
pub use threemf::ObjectRole;
pub use threemf::ObjectType;
pub use threemf::ThreeMfImport;
pub use threemf::ThreeMfObject;
pub use threemf::ThreeMfVolume;
pub use threemf::read_3mf;
pub use threemf::write_3mf;
pub use vrml::read_vrml;

Modules§

brep
The .brep interchange text format, both directions.
cloud
Point clouds, and the text formats that carry them: XYZ and PTS.
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.