Skip to content

.NET API

AdvancedCathedralApi

Advanced cathedral shanks — the station-based cathedral body. Query-only for now: run ArtisanAdvancedCathedralShank in the UI once, then script every variant from the handle it leaves behind.

from ArtisanPlugin.Scripting import AdvancedCathedralApi

See also the guide, Shanks › Advanced cathedral, and the Python package, ra.advanced_cathedral.

Methods

Method
AllIAdvancedCathedral handles for every object of this kind in the active document (empty when there is no document).
ByLayerIAdvancedCathedral handles on the layer with the given full path (empty when the layer does not exist).
CountNumber of objects of this kind in the active document.
CreateBuilds an advanced cathedral shank — the ArtisanAdvancedCathedral tool, headless: the cathedral band with a fully parametric arm and bridge, plus an optional stone run.
FindThe handle for id, or null when the id does not belong to an object of this kind.
SelectedIAdvancedCathedral handles for the objects of this kind currently selected in the active document.

All

IReadOnlyList<IAdvancedCathedral> AdvancedCathedralApi.All()

IAdvancedCathedral handles for every object of this kind in the active document (empty when there is no document).

Returns IReadOnlyList<IAdvancedCathedral>.

ByLayer

IReadOnlyList<IAdvancedCathedral> AdvancedCathedralApi.ByLayer(string layerName)

IAdvancedCathedral handles on the layer with the given full path (empty when the layer does not exist).

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<IAdvancedCathedral>.

Count

int AdvancedCathedralApi.Count()

Number of objects of this kind in the active document.

Returns int.

Create

IAdvancedCathedral AdvancedCathedralApi.Create(
    double fingerDiameter = 0,
    double armHeight = 0,
    double armOpening = 0,
    double tipInclination = double.NaN,
    double bridgeWidth = 0,
    double bridgeThickness = 0,
    bool withGems = false,
    double gemSize = 0,
    string profile = null,
    Plane? plane = null,
    string element = null,
    int gemsCount = 0,
    bool bridgeGems = false,
    double bridgeGemSize = 0,
    int bridgeGemsCount = 0)

Builds an advanced cathedral shank — the ArtisanAdvancedCathedral tool, headless: the cathedral band with a fully parametric arm and bridge, plus an optional stone run. Millimetres / degrees; 0 keeps the tool default (or the user’s saved defaults). fingerDiameter 0 = the document’s finger size. withGems turns the stone run on. element = name of a saved AdvancedCathedralShank element (ElementsApi.List(“AdvancedCathedralShank”)) to start from; explicit arguments override it (its finger size is always replaced). Returns an IAdvancedCathedral handle: its ~25 setters cover the rest of the model. gemsCount > 0 = exactly that many gems per side (implies withGems; the angle is derived and the End angle is not used). bridgeGems true adds gems on the two side faces of the bridge (independent from the stone run; it enables the bridge, and the bridge then has no disk and no fillet). bridgeGemSize default 1.0 mm; the bridge thickness grows to the gem size + 0.2 mm when it is thinner. bridgeGemsCount > 0 = exactly that many gems per run (implies bridgeGems); 0 = as many as fit. The rest (setting mode, prongs, margin, drill) is edited on the handle’s BridgeGems section.

ParameterTypeDefault
fingerDiameterdouble0
armHeightdouble0
armOpeningdouble0
tipInclinationdoubledouble.NaN
bridgeWidthdouble0
bridgeThicknessdouble0
withGemsboolfalse
gemSizedouble0
profilestringnull
planePlane?null
elementstringnull
gemsCountint0
bridgeGemsboolfalse
bridgeGemSizedouble0
bridgeGemsCountint0

Returns IAdvancedCathedral.

Find

IAdvancedCathedral AdvancedCathedralApi.Find(Guid id)

The handle for id, or null when the id does not belong to an object of this kind.

ParameterTypeDefault
idGuidrequired

Returns IAdvancedCathedral.

Selected

IReadOnlyList<IAdvancedCathedral> AdvancedCathedralApi.Selected()

IAdvancedCathedral handles for the objects of this kind currently selected in the active document.

Returns IReadOnlyList<IAdvancedCathedral>.

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.

Also used here: ICathedralGems.

IAdvancedCathedral

Handle — extends IParametricObject.

Advanced cathedral shank: like the classic cathedral, but the band’s cross-section is defined by editable stations along the arm instead of a single fixed profile. Multiple gems, so no single MotherGem.

PropertyType
BridgeGemsICathedralGemsgetThe gems on the two side faces of the bridge (the faces seen from the ring’s profile view), independent from the gems row: same rules as ICathedral.BridgeGems. With an open bridge each half carries its own run. They need the bridge enabled; while they are on, the bridge has no disk and no fillet, and enabling them or raising the gem size grows BridgeThickness to gem size + 0.2 mm when it is thinner.
GemGradientIAdvancedCathedralGemGradientget
GemsICathedralGemsgetThe gems row uses the same model as the classic cathedral.
IdGuidget(from IParametricObject)
LayerNamestringget(from IParametricObject)
MotherGemIdGuidget(from IParametricObject)
ObjectTypestringget(from IParametricObject)
PositionPoint3dget(from IParametricObject)
RingDiameterMmdoubleget
RingSizeLabelstringget
RingSizeRegionstringget
ShankIAdvancedCathedralShankgetParameter 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 AdvancedCathedralShank element (ElementsApi.List(“AdvancedCathedralShank”)) to this shank: its parameters replace the current ones, the ring size stays, and the shank regenerates in place (same id).

IAdvancedCathedralShank

Section.

The band: the stations that shape it, the arm and the bridge.

PropertyType
ArmHeightdoublegetmm
ArmOpeningdoublegetmm
BridgeAngledoublegetdegrees
BridgeDiameterdoublegetmm
BridgeEnabledboolget
BridgeFilletdoublegetmm
BridgeOpenAngledoublegetdegrees
BridgeThicknessdoublegetmm
BridgeWidthdoublegetmm
SharedProfileboolgetevery station uses the same profile asset
StationsIReadOnlyList<IAdvancedCathedralStation>get
TangentPointdoubleget1 = 90 degrees, 0 = 140, -1 = 190
TipInclinationdoubleget
TipRounddoublegetmm
Method
void SetArmHeight(double height)
void SetArmOpening(double opening)
void SetBridgeAngle(double degrees)
void SetBridgeDiameter(double diameter)
void SetBridgeEnabled(bool enabled)
void SetBridgeFillet(double fillet)
void SetBridgeOpenAngle(double degrees)
void SetBridgeThickness(double thickness)
void SetBridgeWidth(double width)
void SetProfile(string assetName)applies to every station — 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<IAdvancedCathedralStation> stations)Replaces the whole station list (at least 2, positions 0..1). Every station needs a profile: profileName omitted reuses the first station’s current asset.
void SetTangentPoint(double tangentPoint)
void SetTipInclination(double inclination)
void SetTipRound(double round)

IAdvancedCathedralStation

Section.

One cross-section along the arm. Stations let the band change width, height and profile as it runs from the arm tip to the ring bottom.

PropertyType
Heightdoublegetmm
Positiondoubleget0 = arm tip, 1 = ring bottom
ProfileNamestringgetRING_PROFILE asset name, "" when unset
Widthdoublegetmm

IAdvancedCathedralGemGradient

Section.

How stone size and prongs vary along the gem run.

PropertyType
Enabledboolget
EndProngCountintget
GemSizeEnddoublegetmm
GemSizeMiddledoublegetmm
GemSizeStartdoublegetmm
MiddlePositiondoubleget0..1
Pointsintget2 = start/end, 3 = start/middle/end
ProngDistancedoublegetmm
ProngGrowdoublegetmm
ProngMinDiameterdoublegetmm
ProngSpacingdoublegetmm
Method
void SetEnabled(bool enabled)
void SetEndProngCount(int count)
void SetGemSizes(double start, double middle, double end)
void SetMiddlePosition(double position)
void SetPoints(int points)2 or 3
void SetProngDistance(double distance)
void SetProngGrow(double grow)
void SetProngMinDiameter(double diameter)
void SetProngSpacing(double spacing)