Python package
ra.analyze
Wall thickness: at points and globally.
import rhinoartisan as ra
Wraps ArtisanPlugin.Scripting.AnalyzeApi.
Functions
| Function | |
|---|---|
global_thickness() | Whole-piece wall-thickness map (the ArtisanGlobalThickness command, headless): meshes the given objects at high resolution and measures the wall thickness at EVERY vertex of that analysis mesh, returning the numbers the display-only command can only show as colors. |
thickness_at() | Wall thickness at a point (the ArtisanThickness probe, scriptable): meshes the given objects at high resolution and measures the material thickness at point (which should lie on/near the surface). |
thickness_at_points() | Same probe for a list of points, meshing the objects only once. |
ra.analyze.global_thickness()
ra.analyze.global_thickness(object_ids: Sequence[IdLike], thin_threshold_mm=None, colorize=None) -> GlobalThicknessResult
Whole-piece wall-thickness map (the ArtisanGlobalThickness command, headless): meshes the given objects at high resolution and measures the wall thickness at EVERY vertex of that analysis mesh, returning the numbers the display-only command can only show as colors. object_ids objects to analyze; meshed together on every call. thin_threshold_mm walls thinner than this count as thin spots; 0 = the command’s default (0.6 mm). colorize True = also add the command’s vertex-colored mesh to the document (red = thin, green = ok, black = not measurable), the same mesh its KeepMesh=Yes exit leaves behind. That is a document mutation — wrap in a Transaction and expect a license check. False = pure read-only measurement. ThinSpots lists the measurable vertices below the threshold, thinnest first, capped at the worst 100. All values in millimetres. Long operation on dense geometry: one ray cast per mesh vertex.
| Parameter | Type | |
|---|---|---|
object_ids | Sequence[IdLike] | required |
thin_threshold_mm | float | optional — None = the tool default |
colorize | bool | optional — None = the tool default |
ra.analyze.thickness_at()
ra.analyze.thickness_at(object_ids: Sequence[IdLike], point: PointLike, annotate=None) -> float
Wall thickness at a point (the ArtisanThickness probe, scriptable): meshes the given objects at high resolution and measures the material thickness at point (which should lie on/near the surface). Returns the thickness in model units, or 0 when no measurement is possible at that point. With annotate=True it also draws the same measure the command leaves behind (line + label dot + end points, grouped), which is a document mutation — wrap in a Transaction and expect a license check. Plain measuring is read-only and free. Note: the objects are meshed on EVERY call. To probe many points on the same geometry, prefer ThicknessAtPoints — it meshes once.
| Parameter | Type | |
|---|---|---|
object_ids | Sequence[IdLike] | required |
point | PointLike | required |
annotate | bool | optional — None = the tool default |
ra.analyze.thickness_at_points()
ra.analyze.thickness_at_points(object_ids: Sequence[IdLike], points: Sequence[PointLike], annotate=None) -> List[float]
Same probe for a list of points, meshing the objects only once. Result list is parallel to points (0 = not measurable there).
| Parameter | Type | |
|---|---|---|
object_ids | Sequence[IdLike] | required |
points | Sequence[PointLike] | required |
annotate | bool | optional — None = the tool default |