Skip to content

Python package

ra.cutter

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

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.CutterApi.

Functions

Function
all()Cutter handles for every object of this kind in the active document (empty when there is no document).
by_layer()Cutter 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 one cutter per gem (the ArtisanCutters tool, headless): the cutting/drilling solid used to open the gem seat in the metal.
find()The handle for id, or None when the id does not belong to an object of this kind.
for_gem()Cutter handles whose mother gem is gem_id (empty for None).
selected()Cutters currently selected in the active doc.

ra.cutter.all()

ra.cutter.all() -> List[Cutter]

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

ra.cutter.by_layer()

ra.cutter.by_layer(layer_name: str) -> List[Cutter]

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

ParameterType
layer_namestrrequired

ra.cutter.count()

ra.cutter.count() -> int

Number of objects of this kind in the active document.

ra.cutter.create()

ra.cutter.create(gem_ids=None, size_top=None, size_bottom=None, size_drill=None, height_top=None, height_crown=None, height_girdle=None, height_pavilion=None, height_drill=None, gem_inside=None, drill_type=None, fit_to_gem=None, clearance=None) -> List[Cutter]

Builds one cutter per gem (the ArtisanCutters tool, headless): the cutting/drilling solid used to open the gem seat in the metal. gem_ids None/empty = the currently selected gems. Size arguments are PERCENTAGES of the gem size (the tool’s own convention), except gem_inside, which is millimetres added to the gem outline (negative shrinks). Pass 0 to keep the tool default (size_top 40, size_bottom 40, size_drill 40, height_top 100, height_crown 34, height_girdle 3, height_pavilion 71). height_drill uses -1 as “keep default (200)” because 0 is meaningful: it disables the drill body entirely. drill_type -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 height_pavilion % 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 height_pavilion / height_girdle or give gem_inside a positive margin when the cutter must enclose the stone. fit_to_gem True computes gem_inside, height_girdle and height_pavilion 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 Cutter handle per gem, in input order.

ParameterType
gem_idsSequence[IdLike]optional — None = the tool default
size_topfloatoptional — None = the tool default
size_bottomfloatoptional — None = the tool default
size_drillfloatoptional — None = the tool default
height_topfloatoptional — None = the tool default
height_crownfloatoptional — None = the tool default
height_girdlefloatoptional — None = the tool default
height_pavilionfloatoptional — None = the tool default
height_drillfloatoptional — None = the tool default
gem_insidefloatoptional — None = the tool default
drill_typeintoptional — None = the tool default
fit_to_gembooloptional — None = the tool default
clearancefloatoptional — None = the tool default

ra.cutter.find()

ra.cutter.find(id: IdLike) -> Cutter

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

ParameterType
idIdLikerequired

ra.cutter.for_gem()

ra.cutter.for_gem(gem_id: IdLike) -> List[Cutter]

Cutter handles whose mother gem is gem_id (empty for None).

ParameterType
gem_idIdLikerequired

ra.cutter.selected()

ra.cutter.selected() -> List[Cutter]

Cutters currently selected in the active doc.

Handles

Objects returned by the functions above. Assigning a settable property regenerates the object; the change is one undo step inside ra.transaction().

Cutter (handle)

PropertyTypeSettable
drill_typeintyes0 gem shape, 1 round, 2 square, 3 hexagon
gem_carat_weightfloat
gem_insidefloatyes
gem_materialstr
gem_shapestr
height_crownfloatyes
height_drillfloatyes
height_girdlefloatyes
height_pavilionfloatyes
height_topfloatyes
layer_namestr
mother_gem_idstr
object_typestr
positionPoint3d
size_bottomfloatyes
size_drillfloatyes
size_topfloatyesSizes 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
delete()
fit_to_gem(clearance=None)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).
move(translation: VectorLike)

Plus what every handle has: id, delete(), update(**kwargs), parameters(), equality and hashing by id, and raw (the underlying .NET object).