treble_tsdk.core.geometry_component_library

Classes

ComponentAnglePool

ComponentAnglePool(allowed_angle_pool: 'list[int]' = None)

ComponentSelectionAlgorithm

Algorithm for selecting components.

GeometryComponent

GeometryComponentPlacement

Class to define a component placement

class treble_tsdk.core.geometry_component_library.ComponentAnglePool

ComponentAnglePool(allowed_angle_pool: ‘list[int]’ = None)

__init__(allowed_angle_pool: list[int] | None = None) None
static from_min_max(min_angle: int, max_angle: int)
allowed_angle_pool: list[int] = None
class treble_tsdk.core.geometry_component_library.ComponentSelectionAlgorithm

Algorithm for selecting components.

ordered_all: Annotated[str, 'Try place all components in order from their list, exhausting each element until moving on to the next.'] = 'ordered_all'
ordered_single: Annotated[str, 'Try place components in order from their list, try add one element instance before moving on to the next.'] = 'ordered_single'
random: Annotated[str, 'Select components at random from the list.'] = 'random'
class treble_tsdk.core.geometry_component_library.GeometryComponent
__init__(geometry_component_dto: GeometryComponentDto, client: TSDKClient)
get_bounding_box() BoundingBox
plot()
suggested_materials()
property description: str
property group_name: str
property id: str
property layer_names: list[str]
property name: str
class treble_tsdk.core.geometry_component_library.GeometryComponentPlacement

Class to define a component placement

Parameters:
  • component – Component to place, algorithm will select one component from the list at random each time it tries to place from this GeometryComponentPlacement.

  • preferred_count – Preferred number of instances to place, note: this does not guarantee that this number of instances will be placed.

  • min_dist_from_walls – Minimum distance from walls in meters

  • min_dist_from_objects – Minimum distance from other objects in meters

  • snap_layer_name – Layer to snap to, currently snapping on z-axis is only supported. If None, no snapping will be done.

__init__(components: list[GeometryComponent], preferred_count: int = 1, min_dist_from_walls: float = 0.1, min_dist_from_objects: float = 0.2, rotation_settings: ComponentAnglePool | None = None, snap_layer_name: str | None = None) None
components: list[GeometryComponent]
min_dist_from_objects: float = 0.2
min_dist_from_walls: float = 0.1
preferred_count: int = 1
rotation_settings: ComponentAnglePool = None
snap_layer_name: str | None = None