Scripting API
Transform
from ArtisanPlugin.Scripting import TransformApi as transform
The operations that take geometry you already have and move, resize or reshape it. Each has its own page.
Scale by weightScale so the piece weighs exactly N grams in a metal.
Scale to dimensionsMake the bounding box measure exactly X × Y × Z mm.
Copy on objectsCopies draped onto a target surface, one per point.
Move on objectsMove the selection onto a target surface, reoriented to it.
Move by normalPush each object along a surface's local normal.
Mirror quadThree history-linked copies filling the four quadrants.
Mirror oppositeOne copy on the opposite side, keeping its handedness.
BendCurve a flat motif — e.g. around the finger.
TwistRope-like shanks, twisted wires, spiral motifs.
TaperGrow or shrink the section linearly along an axis.
The three families
| Family | Pages | What they do |
|---|---|---|
| Scaling | Scale by weight, Scale to dimensions | Resize the whole set to hit an exact target — grams, or millimetres |
| Placement | Copy on objects, Move on objects, Move by normal, Mirror quad, Mirror opposite | Move or duplicate geometry relative to a surface or a plane |
| Deformations | Bend, Twist, Taper | Rhino space-morphs that reshape the geometry itself |
Conventions
Millimetres and degrees throughout, and mutations belong inside a Transaction for one-step undo.
Every one of these takes an object list where None or an empty list falls back to the current viewport selection — and raises when that is empty too — “Nothing selected…” on the scaling and placement methods, “Nothing to deform…” on the deformations. Explicit ids are validated individually and de-duplicated.
Where a method takes a plane, None resolves to the active viewport’s construction plane, falling back to world XY when running headless.
What each one returns
These facades hand back plain values — there are no handles and no query methods. What comes back differs by method, and so does whether your originals survive.
| Page | Returns | Sources |
|---|---|---|
| Scale by weight | The scale factor applied, as a number | Scaled in place, or copied with keepOriginal |
| Scale to dimensions | Object ids | Scaled in place, or copied with keepOriginal |
| Copy on objects | The new copies’ ids | Untouched |
| Move on objects | Count of objects moved | Moved in place |
| Move by normal | Count of objects moved | Moved in place |
| Mirror quad | The new copies’ ids | Untouched |
| Mirror opposite | The new copy’s id | Untouched |
| Bend · Twist · Taper | The new deformed objects’ ids — never the ids you passed | Deleted, unless keepOriginal |