Python package
ra.advanced_gems_on_curve
Runs of stones along a curve with per-stone sizes, shapes and rotations.
import rhinoartisan as ra
Wraps ArtisanPlugin.Scripting.AdvancedGemsOnCurveApi.
Functions
| Function | |
|---|---|
all() | AdvancedGemsOnCurve handles for every object of this kind in the active document (empty when there is no document). |
by_layer() | AdvancedGemsOnCurve 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() | Lays a PATTERN of gem groups along a curve — the ArtisanAdvancedGemsOnCurve tool, headless. |
find() | The handle for id, or None when the id does not belong to an object of this kind. |
selected() | AdvancedGemsOnCurve handles for the objects of this kind currently selected in the active document. |
ra.advanced_gems_on_curve.all()
ra.advanced_gems_on_curve.all() -> List[AdvancedGemsOnCurve]
AdvancedGemsOnCurve handles for every object of this kind in the active document (empty when there is no document).
ra.advanced_gems_on_curve.by_layer()
ra.advanced_gems_on_curve.by_layer(layer_name: str) -> List[AdvancedGemsOnCurve]
AdvancedGemsOnCurve handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | |
|---|---|---|
layer_name | str | required |
ra.advanced_gems_on_curve.count()
ra.advanced_gems_on_curve.count() -> int
Number of objects of this kind in the active document.
ra.advanced_gems_on_curve.create()
ra.advanced_gems_on_curve.create(curve_id: IdLike, sizes: Sequence[float], quantities=None, sizes2=None, shapes=None, rotations=None, distance=None, move_by_z=None, rotation_on_curve=None, alignment_on_curve=None, alignment_vertical=None, start_centered=None, upside_down=None, flip_curve=None, orientation_ids=None, t0=None, t1=None) -> AdvancedGemsOnCurveResult
Lays a PATTERN of gem groups along a curve — the ArtisanAdvancedGemsOnCurve tool, headless. Unlike GemsOnCurveApi (one size, one shape) each group i has quantities[i] gems graduating from sizes[i] to sizes2[i] mm (same size when omitted), of shapes[i] (default ROUND) rotated rotations[i] degrees; the groups run one after another from the curve start. Diamonds only (the tool has no material choice). Millimetres; omitting keeps the tool default (or the user’s saved defaults): distance 0.2 between gems. alignment_on_curve START (default) / CENTER / END, alignment_vertical ON_GIRDLE (default) / TOP. t0/t1 limit the run to a curve parameter range. Returns the group id plus the gem ids.
| Parameter | Type | |
|---|---|---|
curve_id | IdLike | required |
sizes | Sequence[float] | required |
quantities | Sequence[int] | optional — None = the tool default |
sizes2 | Sequence[float] | optional — None = the tool default |
shapes | Sequence[str] | optional — None = the tool default |
rotations | Sequence[float] | optional — None = the tool default |
distance | float | optional — None = the tool default |
move_by_z | float | optional — None = the tool default |
rotation_on_curve | float | optional — None = the tool default |
alignment_on_curve | str | optional — None = the tool default |
alignment_vertical | str | optional — None = the tool default |
start_centered | Optional[bool] | optional — None = the tool default |
upside_down | Optional[bool] | optional — None = the tool default |
flip_curve | bool | optional — None = the tool default |
orientation_ids | Sequence[IdLike] | optional — None = the tool default |
t0 | float | optional — None = the tool default |
t1 | float | optional — None = the tool default |
ra.advanced_gems_on_curve.find()
ra.advanced_gems_on_curve.find(id: IdLike) -> AdvancedGemsOnCurve
The handle for id, or None when the id does not belong to an object of this kind.
| Parameter | Type | |
|---|---|---|
id | IdLike | required |
ra.advanced_gems_on_curve.selected()
ra.advanced_gems_on_curve.selected() -> List[AdvancedGemsOnCurve]
AdvancedGemsOnCurve handles for the objects of this kind currently selected in the active document.
Handles
Objects returned by the functions above. Assigning a settable property regenerates the object; the change is one undo step inside ra.transaction().
AdvancedGemsOnCurve (handle)
| Property | Type | Settable | |
|---|---|---|---|
curve_id | str | ||
layer_name | str | ||
member_count | int | Rhino objects in the group | |
mother_gem_id | str | ||
object_type | str | ||
parameters_json | str | the kernel model, as stored in the group | |
position | Point3d |
| Method | |
|---|---|
delete() | |
get_parameter(path: str) -> str | dotted JSON path; None when absent |
move(translation: VectorLike) |
Plus what every handle has: id, delete(), update(**kwargs), parameters(), equality and hashing by id, and raw (the underlying .NET object).