yapcad.boolean package
Submodules
yapcad.boolean.native module
Native boolean engine extracted from yapcad.geom3d.
- yapcad.boolean.native.stitch_open_edges(triangles, tol)[source]
Experimental: attempt to close open edge loops by triangulating them.
- Parameters:
triangles (Iterable) – A sequence of triangle coordinate lists
[[x, y, z, w], ...]describing a mesh with potential boundary edges.tol (float) – Tolerance used when deduplicating vertices and detecting shared edges. Typically reuse
_DEFAULT_RAY_TOL.
- Returns:
A new list of triangles with any stitched faces appended.
- Return type:
- yapcad.boolean.native.stitch_solid(sld, tol=1e-07)[source]
Experimental helper that runs
stitch_open_edges()on a solid.
yapcad.boolean.occ_engine module
OCC-backed boolean engine operating on BrepSolid metadata.
yapcad.boolean.trimesh_engine module
Trimesh-backed boolean engine for yapCAD solids.
This engine is optional. It converts yapCAD solids to trimesh.Trimesh
instances, dispatches boolean operations via trimesh.boolean, and
converts the resulting mesh back into a yapCAD solid.
Availability depends on both the trimesh package and at least one
boolean backend supported by trimesh (e.g. Blender, OpenSCAD, Cork).
- yapcad.boolean.trimesh_engine.engines_available() set[str][source]
Return the set of trimesh boolean backends that are operational.