omnimesh¶
OMNIMESH file format.
This module implements support for reading and writing of OMNIMESH mesh files.
- class omnimesh.Mesh(metadata_path: Path, metadata: dict)¶
OMNIMESH
- property bounding_max: List[float]¶
The maximum coordinates of a bounding box.
- property bounding_min: List[float]¶
The minimum coordinates of a bounding box.
- property format: str¶
The format of this file: OMNIMESH-1.0
- save_metadata()¶
Save the metadata to a file.
- property size_mm: List[float] | None¶
The physical size of the coordinates in millimeters.
- class omnimesh.MeshGroup(metadata: dict = None, name: str = None, color: str = None, files: List[Dict[str, Any]] = None)¶
OMNIMESH group
- property color: str | None¶
#RRGGBB hex color string.
- property files: List[Dict[str, Any]]¶
List of file references.
- property name: str¶
The name of the group.
- class omnimesh.MeshPart(path: Path, color: str, size_mm: list[float] | None, group: MeshGroup | None)¶
E.g. a PLY file.
- class omnimesh.XFMeshLoader(worker: XFWorkerJob, mesh_parameter: dict, *, copy_even_on_direct_access: bool = False, snapshot_mesh_set: MeshSet | None = None)¶
Load OMNIMesh files recursively.
- omnimesh.format_hex_color(r: int, g: int, b: int) str¶
Format a hex #RRGGBB color from 8-bit integers between 0 and 255.
- omnimesh.parse_hex_color_as_floats(color: str) list[float]¶
Parse a hex #RRGGBB color to floats between 0.0 and 1.0.