colour.geometry.hull_section#
- colour.geometry.hull_section(hull: trimesh.Trimesh, axis: Literal['+z', '+x', '+y'] | str = '+z', origin: float = 0.5, normalise: bool = False) NDArrayFloat [source]#
Compute the hull section for given axis at given origin.
- Parameters:
- Returns:
Hull section vertices.
- Return type:
Examples
>>> from colour.geometry import primitive_cube >>> from colour.utilities import is_trimesh_installed >>> vertices, faces, outline = primitive_cube(1, 1, 1, 2, 2, 2) >>> if is_trimesh_installed: ... import trimesh ... ... hull = trimesh.Trimesh(vertices["position"], faces, process=False) ... hull_section(hull, origin=0) array([[-0. , -0.5, 0. ], [ 0.5, -0.5, 0. ], [ 0.5, 0. , -0. ], [ 0.5, 0.5, -0. ], [-0. , 0.5, 0. ], [-0.5, 0.5, 0. ], [-0.5, 0. , -0. ], [-0.5, -0.5, -0. ], [-0. , -0.5, 0. ]])