Skip to content

.NET API

AnalyzeApi

Analysis helpers. Same math as the Analyze commands, headless.

from ArtisanPlugin.Scripting import AnalyzeApi

See also the guide, Analysis › Global thickness, and the Python package, ra.analyze.

Methods

Method
GlobalThicknessWhole-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.
ThicknessAtWall 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).
ThicknessAtPointsSame probe for a list of points, meshing the objects only once.

GlobalThickness

GlobalThicknessResult AnalyzeApi.GlobalThickness(
    IEnumerable<Guid> objectIds,
    double thinThresholdMm = 0,
    bool colorize = false)

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. objectIds objects to analyze; meshed together on every call. thinThresholdMm 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.

ParameterTypeDefault
objectIdsIEnumerable<Guid>required
thinThresholdMmdouble0
colorizeboolfalse

Returns GlobalThicknessResult.

ThicknessAt

double AnalyzeApi.ThicknessAt(
    IEnumerable<Guid> objectIds,
    Point3d point,
    bool annotate = false)

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.

ParameterTypeDefault
objectIdsIEnumerable<Guid>required
pointPoint3drequired
annotateboolfalse

Returns double.

ThicknessAtPoints

IReadOnlyList<double> AnalyzeApi.ThicknessAtPoints(
    IEnumerable<Guid> objectIds,
    IEnumerable<Point3d> points,
    bool annotate = false)

Same probe for a list of points, meshing the objects only once. Result list is parallel to points (0 = not measurable there).

ParameterTypeDefault
objectIdsIEnumerable<Guid>required
pointsIEnumerable<Point3d>required
annotateboolfalse

Returns IReadOnlyList<double>.