treble_tsdk.geometry.model_layers
Layer and surface geometry queries built on a MeshCollection.
Functions
|
Build the layer/surface geometry views of a |
Classes
A model layer with its surfaces and aggregate geometry properties. |
|
A single surface (Rhino object) of a model layer. |
- class treble_tsdk.geometry.model_layers.ModelLayer
A model layer with its surfaces and aggregate geometry properties.
- __init__(geometry: _TriangleGeometry, cell_indices: numpy.ndarray, name: str, surfaces: list[ModelSurface])
- point_on(u: float, v: float) Point3d
Point in the surface plane, parametrized by
u/vin [0, 1] over the bounding rectangle of the surface projected onto its in-plane axes.The point lies in the surface plane and may fall outside non-rectangular shapes.
The returned point is rounded to 3 decimals (as are the other returned values: coordinates and area to 3 decimals, normals to 6).
- Parameters:
- Raises:
ValueError – If the surface is not planar, its vertices do not lie in a single plane, or u/v are outside [0, 1].
- property area: float
One-sided geometric area in m².
- property normal: Vector3d | None
Unit normal for planar regions,
Nonefor closed or non-planar regions.
- class treble_tsdk.geometry.model_layers.ModelSurface
A single surface (Rhino object) of a model layer.
- __init__(geometry: _TriangleGeometry, cell_indices: numpy.ndarray, object_id: str | None, layer_name: str)
- point_on(u: float, v: float) Point3d
Point in the surface plane, parametrized by
u/vin [0, 1] over the bounding rectangle of the surface projected onto its in-plane axes.The point lies in the surface plane and may fall outside non-rectangular shapes.
The returned point is rounded to 3 decimals (as are the other returned values: coordinates and area to 3 decimals, normals to 6).
- Parameters:
- Raises:
ValueError – If the surface is not planar, its vertices do not lie in a single plane, or u/v are outside [0, 1].
- property area: float
One-sided geometric area in m².
- property normal: Vector3d | None
Unit normal for planar regions,
Nonefor closed or non-planar regions.
- treble_tsdk.geometry.model_layers.build_layers(mc: MeshCollection) dict[str, ModelLayer]
Build the layer/surface geometry views of a
MeshCollection.Keys are the layer names (
"/"-separated); only layers that have cells are included. Surfaces within each layer are sorted by ascendingobject_index(Rhino object order).