Python package
ra.mesh
Mesh decimation.
import rhinoartisan as ra
Wraps ArtisanPlugin.Scripting.MeshApi.
Functions
| Function | |
|---|---|
decimate() | Decimates meshes with Rhino’s quadric edge-collapse reduction (the ArtisanMeshDecimate command, headless). |
decimate_to_tolerance() | Decimates meshes as much as a deviation budget allows (the ArtisanMeshDecimateTolerance command, headless). |
ra.mesh.decimate()
ra.mesh.decimate(object_ids=None, percentage=None) -> DecimateResult
Decimates meshes with Rhino’s quadric edge-collapse reduction (the ArtisanMeshDecimate command, headless). Distortion is allowed: the reducer prioritizes hitting the target face count over shape fidelity, so heavy percentages give a faceted low-poly look. object_ids meshes to decimate; None/empty = current selection. percentage faces to REMOVE, 1-99 (default 50). Each mesh is replaced in place (same Guid). Returns totals so the script can report “N meshes: X faces -> Y faces”.
| Parameter | Type | |
|---|---|---|
object_ids | Sequence[IdLike] | optional — None = the tool default |
percentage | float | optional — None = the tool default |
ra.mesh.decimate_to_tolerance()
ra.mesh.decimate_to_tolerance(object_ids=None, tolerance_mm=None) -> DecimateToleranceResult
Decimates meshes as much as a deviation budget allows (the ArtisanMeshDecimateTolerance command, headless). Each mesh is reduced to the heaviest percentage whose result still stays within tolerance_mm of the original surface, so the shape is guaranteed and the face count is whatever falls out. object_ids meshes to decimate; None/empty = current selection. tolerance_mm max deviation in MILLIMETRES, None = the default (0.05). Each mesh is replaced in place (same Guid). Meshes that cannot lose a single percent within tolerance are left untouched and counted in MeshesUnchanged.
| Parameter | Type | |
|---|---|---|
object_ids | Sequence[IdLike] | optional — None = the tool default |
tolerance_mm | float | optional — None = the tool default |