Skip to content

Python package

ra.gems_on_curve

A run of stones along one curve, with prongs and cutters, editable afterwards.

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.GemsOnCurveApi.

Functions

Function
all()GemsOnCurve handles for every object of this kind in the active document (empty when there is no document).
by_layer()GemsOnCurve 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()Distributes a row of identical gems along an existing curve — the ArtisanGemsOnCurve tool, headless.
find()The handle for id, or None when the id does not belong to an object of this kind.
for_curve()
selected()GemsOnCurves currently selected in the active doc.

ra.gems_on_curve.all()

ra.gems_on_curve.all() -> List[GemsOnCurve]

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

ra.gems_on_curve.by_layer()

ra.gems_on_curve.by_layer(layer_name: str) -> List[GemsOnCurve]

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

ParameterType
layer_namestrrequired

ra.gems_on_curve.count()

ra.gems_on_curve.count() -> int

Number of objects of this kind in the active document.

ra.gems_on_curve.create()

ra.gems_on_curve.create(curve_id: IdLike, gem_size=None, distance=None, gem_shape=None, gem_material=None, prongs=None, cutters=None, orientation_ids=None) -> GemsOnCurve

Distributes a row of identical gems along an existing curve — the ArtisanGemsOnCurve tool, headless. curve_id must be a curve in the active document; it becomes the row’s parent (see ForCurve). Millimetres; omitting keeps the tool default (or the user’s saved defaults): gem_size 1.5, distance 0.2. gem_shape/gem_material accept the GemApi vocabularies (default ROUND Diamond). prongs True also builds the shared prongs; cutters True bakes one cutter per gem into a separate group. orientation_ids optionally orient the gems onto those surfaces/breps. Returns an GemsOnCurve handle to the new row.

ParameterType
curve_idIdLikerequired
gem_sizefloatoptional — None = the tool default
distancefloatoptional — None = the tool default
gem_shapestroptional — None = the tool default
gem_materialstroptional — None = the tool default
prongsbooloptional — None = the tool default
cuttersbooloptional — None = the tool default
orientation_idsSequence[IdLike]optional — None = the tool default

ra.gems_on_curve.find()

ra.gems_on_curve.find(id: IdLike) -> GemsOnCurve

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

ParameterType
idIdLikerequired

ra.gems_on_curve.for_curve()

ra.gems_on_curve.for_curve(curve_id: IdLike) -> List[GemsOnCurve]
ParameterType
curve_idIdLikerequired

ra.gems_on_curve.selected()

ra.gems_on_curve.selected() -> List[GemsOnCurve]

GemsOnCurves 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().

GemsOnCurve (handle)

A row of identical gems distributed along a parent curve. The “Mother” here is the curve, not a single gem — accessible via CurveId. GemShape/Material/CaratWeight describe the gem template that gets repeated along the curve.

PropertyTypeSettable
alignment_verticalstryes”TOP” | “ON_GIRDLE”
curve_idstr
cutters_enabledboolyes
distancefloatyes
flip_curveboolyes
gem_carat_weightfloat
gem_materialstryes
gem_orientationstryes”NATURAL” | “UPSIDE_DOWN”
gem_shapestryes
gem_sizefloatyesCurrent values (millimetres / degrees; several are signed).
gem_size_yfloatyes0 = symmetric; only used by asymmetric shapes
layer_namestr
mother_gem_idstr
move_by_zfloatyessigned
object_typestr
positionPoint3d
prong_diameterfloatyes
prong_end_modestryes”SINGLE” | “DOUBLE”
prong_height_over_girdlefloatyes
prong_height_under_girdlefloatyes
prong_typestryes”INDIVIDUAL” | “SHARED”
prongs_enabledboolyes
rotate90boolyes
rotation_on_curvefloatyesdegrees, signed
starting_pointstryes”BOUNDARY” | “CENTER”
stone_countint
Method
delete()
move(translation: VectorLike)
set_prong_distance_shared(distance: float)

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