kumiki.stl¶
Flat import path
kumiki/__init__.py re-exports everything on this page via from kumiki import *, so every name below is also available directly as kumiki.STLTimber -- you do not need to import from the submodule path shown in the heading above.
kumiki.stl
¶
STL stock, timber-local placement, and source-call provenance.
STLTimber
dataclass
¶
STLTimber(*, stl_path: str, mesh: TriangleSolid, placement: Optional[STLPlacement] = None, source: Optional[STLSource] = None, units: str = 'mm')
Bases: MeshTimber
Represent STL stock, or a reference prism awaiting placement when placement is None.
placement
class-attribute
instance-attribute
¶
placement: Optional[STLPlacement] = field(default=None, kw_only=True)
source
class-attribute
instance-attribute
¶
placed_mesh
¶
placed_mesh() -> TriangleSolid
Source code in kumiki/stl.py
is_perfect_timber
¶
get_rough_half_sizes
¶
Source code in kumiki/stl.py
get_actual_csg_local
¶
get_extended_actual_csg_local
¶
STLPlacement
dataclass
¶
STLPlacement(translation: Sequence[float] = (0, 0, 0), rotation: Sequence[float] = (0, 0, 0), scale: Sequence[float] = (1, 1, 1))
Place a mesh in timber-local space: scale, XYZ Euler rotation in degrees, then translation in metres.
__post_init__
¶
Source code in kumiki/stl.py
to_dict
¶
matrix
¶
Source code in kumiki/stl.py
create_stl_timber
¶
create_stl_timber(reference: PerfectTimberWithin, stl_path, *, units: str = 'mm', placement: Optional[Mapping[str, Sequence[float]]] = None) -> STLTimber
Load STL stock relative to this source file, using reference for joinery coordinates.
Omit placement to show a placeholder in Kigumi. Placement has translation (metres), rotation (XYZ degrees), and positive scale triples, all relative to the reference timber. STL stock cannot extend itself to accommodate end joints.