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).
| Parameter | Type | |
|---|---|---|
layer_name | str | required |
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.
| Parameter | Type | |
|---|---|---|
gem_ids | Sequence[IdLike] | optional — None = the tool default |
size_top | float | optional — None = the tool default |
size_bottom | float | optional — None = the tool default |
size_drill | float | optional — None = the tool default |
height_top | float | optional — None = the tool default |
height_crown | float | optional — None = the tool default |
height_girdle | float | optional — None = the tool default |
height_pavilion | float | optional — None = the tool default |
height_drill | float | optional — None = the tool default |
gem_inside | float | optional — None = the tool default |
drill_type | int | optional — None = the tool default |
fit_to_gem | bool | optional — None = the tool default |
clearance | float | optional — 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.
| Parameter | Type | |
|---|---|---|
id | IdLike | required |
ra.cutter.for_gem()
ra.cutter.for_gem(gem_id: IdLike) -> List[Cutter]
Cutter handles whose mother gem is gem_id (empty for None).
| Parameter | Type | |
|---|---|---|
gem_id | IdLike | required |
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)
| Property | Type | Settable | |
|---|---|---|---|
drill_type | int | yes | 0 gem shape, 1 round, 2 square, 3 hexagon |
gem_carat_weight | float | ||
gem_inside | float | yes | |
gem_material | str | ||
gem_shape | str | ||
height_crown | float | yes | |
height_drill | float | yes | |
height_girdle | float | yes | |
height_pavilion | float | yes | |
height_top | float | yes | |
layer_name | str | ||
mother_gem_id | str | ||
object_type | str | ||
position | Point3d | ||
size_bottom | float | yes | |
size_drill | float | yes | |
size_top | float | yes | Sizes 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).