.NET API
BailApi
Bail smart component (the pendant hanger loop) — the ArtisanBail tool, headless. The result is the same editable smart component the panel inserts: a group carrying the serialized parameters, with the bail (and optional o-ring) breps as Artisan brep objects with the metal material.
from ArtisanPlugin.Scripting import BailApi
See also the guide, Accessories › Bail, and the Python package, ra.bail.
Methods
| Method | |
|---|---|
Create | Creates a bail on plane (defaults to the active view’s construction plane, like the tool). |
Create
IReadOnlyList<Guid> BailApi.Create(
Plane? plane = null,
double diameterTop = 0,
double diameterBottom = 0,
double distance = 0,
bool withORing = false,
string name = null,
string profile = null,
double topWidth = 0,
double topHeight = 0,
double bottomWidth = 0,
double bottomHeight = 0,
string topProfile = null,
string bottomProfile = null,
double startingOnTop = double.NaN,
double startingOnBottom = double.NaN,
double curveTension = double.NaN,
double oRingThickness = 0,
double oRingDiameter = 0,
double oRingOverlap = 0,
double oRingRotation = double.NaN,
string element = null)
Creates a bail on plane (defaults to the active view’s construction plane, like the tool). Millimetres; 0 keeps the tool default (or the user’s saved defaults): diameterTop 3, diameterBottom 1, distance 5. withORing true also builds the torus o-ring; false (default) builds none. The wire cross-section drives the weight: topWidth/topHeight (default 4 x 1.4) and bottomWidth/bottomHeight (default 1 x 1); profile sets both profile assets, topProfile/bottomProfile each one. startingOnTop, startingOnBottom (default 0.5) and curveTension (default 1) shape the side curves; NaN keeps the default. oRingThickness (1), oRingDiameter (2), oRingOverlap (1) size the o-ring; oRingRotation in degrees (0; NaN keeps it). Returns the ids of the created breps. element = name of a saved Bail element (ElementsApi.List(“Bail”)) to start from; explicit arguments override it (profile names replace its profiles; withORing false keeps its o-ring setting).
| Parameter | Type | Default |
|---|---|---|
plane | Plane? | null |
diameterTop | double | 0 |
diameterBottom | double | 0 |
distance | double | 0 |
withORing | bool | false |
name | string | null |
profile | string | null |
topWidth | double | 0 |
topHeight | double | 0 |
bottomWidth | double | 0 |
bottomHeight | double | 0 |
topProfile | string | null |
bottomProfile | string | null |
startingOnTop | double | double.NaN |
startingOnBottom | double | double.NaN |
curveTension | double | double.NaN |
oRingThickness | double | 0 |
oRingDiameter | double | 0 |
oRingOverlap | double | 0 |
oRingRotation | double | double.NaN |
element | string | null |
Returns IReadOnlyList<Guid>.