.NET API
BypassApi
Bypass shanks — the ring body whose two arms cross past each other. Query-only for now: run ArtisanBypass in the UI once, then script every variant from the handle it leaves behind.
from ArtisanPlugin.Scripting import BypassApi
See also the guide, Shanks › Bypass, and the Python package, ra.bypass.
Methods
| Method | |
|---|---|
All | IBypass handles for every object of this kind in the active document (empty when there is no document). |
ByLayer | IBypass handles on the layer with the given full path (empty when the layer does not exist). |
Count | Number of objects of this kind in the active document. |
Create | Builds a bypass shank — the ArtisanBypass tool, headless: a band whose two arms cross past each other instead of meeting. |
Find | The handle for id, or null when the id does not belong to an object of this kind. |
Selected | IBypass handles for the objects of this kind currently selected in the active document. |
All
IReadOnlyList<IBypass> BypassApi.All()
IBypass handles for every object of this kind in the active document (empty when there is no document).
Returns IReadOnlyList<IBypass>.
ByLayer
IReadOnlyList<IBypass> BypassApi.ByLayer(string layerName)
IBypass handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
Returns IReadOnlyList<IBypass>.
Count
int BypassApi.Count()
Number of objects of this kind in the active document.
Returns int.
Create
IBypass BypassApi.Create(
double fingerDiameter = 0,
double topWidth = 0,
double topHeight = 0,
double bottomWidth = 0,
double bottomHeight = 0,
double armAngle = double.NaN,
double armHeight = 0,
double armWidth = 0,
bool withGems = false,
double gemSize = 0,
string profile = null,
Plane? plane = null,
string element = null)
Builds a bypass shank — the ArtisanBypass tool, headless: a band whose two arms cross past each other instead of meeting. Millimetres / degrees; 0 keeps the tool default (or the user’s saved defaults). fingerDiameter 0 = the document’s finger size. withGems turns on the stone run along the arms. Returns an IBypass handle: use its setters for the rest of the model (the handle covers the full parameter set). element = name of a saved bypass element (ElementsApi.List(“ByPass”)) to start from instead of the tool defaults; explicit arguments override it.
| Parameter | Type | Default |
|---|---|---|
fingerDiameter | double | 0 |
topWidth | double | 0 |
topHeight | double | 0 |
bottomWidth | double | 0 |
bottomHeight | double | 0 |
armAngle | double | double.NaN |
armHeight | double | 0 |
armWidth | double | 0 |
withGems | bool | false |
gemSize | double | 0 |
profile | string | null |
plane | Plane? | null |
element | string | null |
Returns IBypass.
Find
IBypass BypassApi.Find(Guid id)
The handle for id, or null when the id does not belong to an object of this kind.
| Parameter | Type | Default |
|---|---|---|
id | Guid | required |
Returns IBypass.
Selected
IReadOnlyList<IBypass> BypassApi.Selected()
IBypass handles for the objects of this kind currently selected in the active document.
Returns IReadOnlyList<IBypass>.
Handles and sections
What the methods above hand back. A handle’s setters regenerate the object; wrap changes in a Transaction so they land as one undo step.
IBypass
Handle — extends IParametricObject.
Bypass ring shank: two arms that cross past each other instead of meeting. Multiple gems possible, so no single MotherGem.
| Property | Type | ||
|---|---|---|---|
Gems | IBypassGems | get | |
Id | Guid | get | (from IParametricObject) |
LayerName | string | get | (from IParametricObject) |
MotherGemId | Guid | get | (from IParametricObject) |
ObjectType | string | get | (from IParametricObject) |
Position | Point3d | get | (from IParametricObject) |
RingDiameterMm | double | get | |
RingSizeLabel | string | get | |
RingSizeRegion | string | get | |
Shank | IBypassShank | get | Parameter sections — each is a live view over the shank’s stored parameters; their setters regenerate the shank in place (same Guid) and call LicenseGate.RequireValid() first. Millimetres. |
| Method | |
|---|---|
void Delete() | (from IParametricObject) |
void Move(Vector3d translation) | (from IParametricObject) |
void SetElement(string element) | Applies a saved ByPass element (ElementsApi.List(“ByPass”)) to this shank: its parameters replace the current ones, the ring size stays, and the shank regenerates in place (same id). |
IBypassShank
Section.
The bypass band: the two band sections, the crossing arms and the optional bridge, plus the per-station cross-sections.
| Property | Type | ||
|---|---|---|---|
ArmAngle | double | get | degrees |
ArmHeight | double | get | mm |
ArmTangent | double | get | |
ArmWidth | double | get | mm |
BottomHeight | double | get | mm |
BottomWidth | double | get | mm |
BridgeAngle | double | get | degrees |
BridgeDiameter | double | get | mm |
BridgeEnabled | bool | get | |
BridgeThickness | double | get | mm |
BridgeWidth | double | get | mm |
CapDistance | double | get | mm |
Displacement | double | get | how far the arms pass each other, mm |
DisplacementStart | int | get | rail point where the displacement starts |
ProfileName | string | get | RING_PROFILE asset name, "" when unset |
SharedProfile | bool | get | every station uses the same profile asset |
Stations | IReadOnlyList<IBypassStation> | get | |
TipRotation | double | get | roll of the tip about the rail tangent, degrees |
TopHeight | double | get | mm |
TopWidth | double | get | mm |
UseStations | bool | get | build from Stations instead of the top/bottom gradient |
| Method | |
|---|---|
void SetArmAngle(double degrees) | |
void SetArmHeight(double height) | |
void SetArmTangent(double tangent) | |
void SetArmWidth(double width) | |
void SetBottomHeight(double height) | |
void SetBottomWidth(double width) | |
void SetBridgeAngle(double degrees) | |
void SetBridgeDiameter(double diameter) | |
void SetBridgeEnabled(bool enabled) | |
void SetBridgeThickness(double thickness) | |
void SetBridgeWidth(double width) | |
void SetCapDistance(double distance) | |
void SetDisplacement(double displacement) | |
void SetDisplacementStart(int start) | |
void SetProfile(string assetName) | RING_PROFILE asset by name — list them with AssetsApi.List(“RING_PROFILE”) |
void SetSharedProfile(bool shared) | |
void SetStation( int index, double position, double width, double height, string profileName = null) | |
void SetStations(IEnumerable<IBypassStation> stations) | Replaces the whole station list. Positions run 0 (arm tip) to 1 (ring bottom); profileName omitted keeps the shank’s profile. |
void SetTipRotation(double degrees) | |
void SetTopHeight(double height) | |
void SetTopWidth(double width) | |
void SetUseStations(bool useStations) |
IBypassStation
Section.
One cross-section along the bypass rail. Stations let the band change width, height and profile as it runs from the arm tip to the ring bottom.
| Property | Type | ||
|---|---|---|---|
Height | double | get | mm |
Position | double | get | 0 = arm tip, 1 = ring bottom |
ProfileName | string | get | RING_PROFILE asset name, "" when unset |
Width | double | get | mm |
IBypassGems
Section.
The gems row a bypass shank carries along each arm. A live view over the shank’s stored parameters: getters read the current values, setters regenerate the shank in place (same Guid) and are license-gated.
| Property | Type | ||
|---|---|---|---|
Angle | double | get | arc covered by the row from each tip, degrees |
AutomaticProngDiameter | bool | get | |
BrightCut | double | get | mm |
DoubleProngSetting | bool | get | |
DrillAllowIntersection | bool | get | |
DrillEnabled | bool | get | |
DrillHeight | double | get | mm |
DrillType | string | get | ”NONE”, “ROUND” or “QUAD” |
DrillVisible | bool | get | |
DrillWidth | double | get | mm |
Enabled | bool | get | |
EndProngCount | int | get | |
ExtensionForManufacturing | double | get | mm |
GemInside | double | get | mm |
GemShape | string | get | ”ROUND”, “PRINCESS”, … |
GemSize | double | get | mm |
GemSizeEnd | double | get | mm |
GemSizeMiddle | double | get | mm |
GemSizeStart | double | get | mm |
Gradient | bool | get | Stone-size gradient along the row. |
GradientMiddlePosition | double | get | 0..1 |
GradientPoints | int | get | |
InnerHeight | double | get | inner channel height, mm |
InnerMargin | double | get | mm |
InnerWidth | double | get | inner channel width, mm |
Margin | double | get | mm |
MinDistance | double | get | mm |
ProngDiameter | double | get | mm |
ProngDistance | double | get | mm |
ProngGrow | double | get | mm |
ProngHeight | double | get | mm |
ProngMinDiameter | double | get | mm |
ProngSpacing | double | get | mm |
ProngType | string | get | ”NONE”, “SHARED” or “SCALLOPED” |
ScallopGemHeight | double | get | |
ScallopGemWidth | double | get | Scalloped-setting proportions (percentages, not mm). |
ScallopProngHeight | double | get | |
ScallopProngWidth | double | get | |
ScallopRailHeight | double | get | |
ScallopRailWidth | double | get | |
ScallopRemoveChannel | bool | get | |
Vertical | double | get | mm |
| Method | |
|---|---|
void SetAngle(double degrees) | |
void SetAutomaticProngDiameter(bool automatic) | |
void SetBrightCut(double brightCut) | |
void SetDoubleProngSetting(bool enabled) | |
void SetDrillAllowIntersection(bool allow) | |
void SetDrillEnabled(bool enabled) | |
void SetDrillHeight(double height) | |
void SetDrillType(string drillType) | ”NONE”, “ROUND” or “QUAD” |
void SetDrillVisible(bool visible) | |
void SetDrillWidth(double width) | |
void SetEnabled(bool enabled) | |
void SetEndProngCount(int count) | |
void SetExtensionForManufacturing(double extension) | |
void SetGemInside(double gemInside) | |
void SetGemShape(string shape) | |
void SetGemSize(double size) | |
void SetGemSizeGradient(double start, double middle, double end) | |
void SetGradient(bool enabled) | |
void SetGradientMiddlePosition(double position) | 0..1 |
void SetGradientPoints(int points) | |
void SetInnerHeight(double height) | |
void SetInnerMargin(double margin) | |
void SetInnerWidth(double width) | |
void SetMargin(double margin) | |
void SetMinDistance(double distance) | |
void SetProngDiameter(double diameter) | |
void SetProngDistance(double distance) | |
void SetProngGrow(double grow) | |
void SetProngHeight(double height) | |
void SetProngMinDiameter(double diameter) | |
void SetProngSpacing(double spacing) | |
void SetProngType(string prongType) | ”NONE”, “SHARED” or “SCALLOPED” |
void SetScallopGem(double width, double height) | |
void SetScallopProng(double width, double height) | |
void SetScallopRail(double width, double height) | |
void SetScallopRemoveChannel(bool enabled) | |
void SetVertical(double vertical) |