treble_tsdk.geometry.geometry_definition¶
Classes
- class treble_tsdk.geometry.geometry_definition.GeometryDefinition¶
- __init__(room_geo: str | ModelObj | GeometryLibraryObj, layer_as_component: dict[str, str] | None = None)¶
Create a geometry definition object
- add_geometry_component(name: str, geometry_component: GeometryComponent, transform: Transform3d, snap_layer_name: str | None = None)¶
- clear_geometry_components()¶
Removes all geometry components from the room.
- get_bounding_box() BoundingBox | None¶
Get the bounding box of the model. :returns BoundingBox | None: Bounding box of the model or None if unable to get bounding box.
- get_min_distance_to_layer(point: Point3d, layer_names: list[str] | str) float | None¶
Calculate the minimum distance from a point to a layer in layer_names in meters.
- has_line_of_sight(point_a: Point3d, point_b: Point3d) bool¶
Check if two points have line-of-sight to each other within the model.
- Parameters:
point_a (Point3d) – The first point
point_b (Point3d) – The second point
- Return bool:
True if the points have line-of-sight (no mesh occlusion), False otherwise
- populate_with_geometry_components(components: list[GeometryComponentPlacement], selection_algorithm: ComponentSelectionAlgorithm = ComponentSelectionAlgorithm.random)¶