Skip to content

.NET API

CutterApi

The cutters that carve the seat of a stone into the metal.

from ArtisanPlugin.Scripting import CutterApi

See also the guide, Gemsets › Cutters, and the Python package, ra.cutter.

Methods

Method
AllICutter handles for every object of this kind in the active document (empty when there is no document).
ByLayerICutter 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 one cutter per gem (the ArtisanCutters tool, headless): the cutting/drilling solid used to open the gem seat in the metal.
FindThe handle for id, or null when the id does not belong to an object of this kind.
ForGemICutter handles whose mother gem is gemId (empty for Guid.Empty).
SelectedCutters currently selected in the active doc.

All

IReadOnlyList<ICutter> CutterApi.All()

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

Returns IReadOnlyList<ICutter>.

ByLayer

IReadOnlyList<ICutter> CutterApi.ByLayer(string layerName)

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

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<ICutter>.

Count

int CutterApi.Count()

Number of objects of this kind in the active document.

Returns int.

Create

IReadOnlyList<ICutter> CutterApi.Create(
    IEnumerable<Guid> gemIds = null,
    double sizeTop = 0,
    double sizeBottom = 0,
    double sizeDrill = 0,
    double heightTop = 0,
    double heightCrown = 0,
    double heightGirdle = 0,
    double heightPavilion = 0,
    double heightDrill = -1,
    double gemInside = double.NaN,
    int drillType = -1,
    bool fitToGem = false,
    double clearance = double.NaN)

Builds one cutter per gem (the ArtisanCutters tool, headless): the cutting/drilling solid used to open the gem seat in the metal. gemIds null/empty = the currently selected gems. Size arguments are PERCENTAGES of the gem size (the tool’s own convention), except gemInside, which is millimetres added to the gem outline (negative shrinks). Pass 0 to keep the tool default (sizeTop 40, sizeBottom 40, sizeDrill 40, heightTop 100, heightCrown 34, heightGirdle 3, heightPavilion 71). heightDrill uses -1 as “keep default (200)” because 0 is meaningful: it disables the drill body entirely. drillType -1 keeps the default; valid values are 0 = gem shape, 1 = round, 2 = square, 3 = hexagon. Same geometry as the panel: the size arguments scale the gem outline, the heights are % of the gem height, and the pavilion is a straight cone from the girdle outline to one point heightPavilion % below it. It does not follow the real pavilion of fancy cuts (cushion, oval…), where it can sit inside the stone just below the girdle: raise heightPavilion / heightGirdle or give gemInside a positive margin when the cutter must enclose the stone. fitToGem true computes gemInside, heightGirdle and heightPavilion per gem so the cutter encloses the gem’s real girdle and pavilion with clearance mm (NaN = 0.05), overriding those three arguments; the crown, top and drill stay as given. Returns one ICutter handle per gem, in input order.

ParameterTypeDefault
gemIdsIEnumerable<Guid>null
sizeTopdouble0
sizeBottomdouble0
sizeDrilldouble0
heightTopdouble0
heightCrowndouble0
heightGirdledouble0
heightPaviliondouble0
heightDrilldouble-1
gemInsidedoubledouble.NaN
drillTypeint-1
fitToGemboolfalse
clearancedoubledouble.NaN

Returns IReadOnlyList<ICutter>.

Find

ICutter CutterApi.Find(Guid id)

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

ParameterTypeDefault
idGuidrequired

Returns ICutter.

ForGem

IReadOnlyList<ICutter> CutterApi.ForGem(Guid gemId)

ICutter handles whose mother gem is gemId (empty for Guid.Empty).

ParameterTypeDefault
gemIdGuidrequired

Returns IReadOnlyList<ICutter>.

Selected

IReadOnlyList<ICutter> CutterApi.Selected()

Cutters currently selected in the active doc.

Returns IReadOnlyList<ICutter>.

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.

ICutter

Handle — extends IGemSetting, IParametricObject.

PropertyType
DrillTypeintget0 gem shape, 1 round, 2 square, 3 hexagon
GemCaratWeightdoubleget(from IGemSetting)
GemInsidedoubleget
GemMaterialstringget(from IGemSetting)
GemShapestringget(from IGemSetting)
HeightCrowndoubleget
HeightDrilldoubleget
HeightGirdledoubleget
HeightPaviliondoubleget
HeightTopdoubleget
IdGuidget(from IParametricObject)
LayerNamestringget(from IParametricObject)
MotherGemIdGuidget(from IParametricObject)
ObjectTypestringget(from IParametricObject)
PositionPoint3dget(from IParametricObject)
SizeBottomdoubleget
SizeDrilldoubleget
SizeTopdoublegetSizes and heights are PERCENTAGES of the mother gem, except GemInside which is millimetres. 0 is legal for all of them (a 0 drill height means no drill body at all).
Method
void Delete()(from IParametricObject)
void FitToGem(double clearance = double.NaN)Fit to gem: sets GemInside, HeightGirdle and HeightPavilion so the cutter encloses this gem’s real pavilion and girdle with clearance mm (NaN = 0.05). The crown, top and drill stay. Regenerates in place.
void Move(Vector3d translation)(from IParametricObject)
void SetDrillType(int drillType)0-3
void SetGemInside(double gemInside)mm, signed
void SetHeightCrown(double heightCrown)
void SetHeightDrill(double heightDrill)0 = no drill body
void SetHeightGirdle(double heightGirdle)
void SetHeightPavilion(double heightPavilion)
void SetHeightTop(double heightTop)
void SetSizeBottom(double sizeBottom)
void SetSizeDrill(double sizeDrill)
void SetSizeTop(double sizeTop)Parametric edits — each regenerates the cutter in place (same Guid) and calls LicenseGate.RequireValid() first. These take LITERAL values, so 0 is a real 0.