meshing.bounds.fit_bounds
meshing.bounds.fit_bounds(sdf, padding=0.0)
(origin, size) of a box around the part, found at its own scale.
Parameters
| sdf |
Callable |
The field, mapping (n, 3) points to (n,) values. |
required |
| padding |
float |
Extra margin per side, in model units, on top of the one and a half fine-scan cells every fit carries. |
0.0 |
Returns
|
tuple[float, float, float] |
The lower corner and the extent, ready for |
|
tuple[float, float, float] |
meth:~cadjoint.meshing.GridSpec.from_bounds. |
Raises
|
ValueError |
When no cube up to half-width SCAN_HALF_WIDTHS[-1] holds a closed part: the object is empty, or unbounded (an infinite plane, a missing intersection) and needs explicit bounds. |