Python package
ra.gems_on_two_curves
Stones fitted between two rails, sized to the gap.
import rhinoartisan as ra
Wraps ArtisanPlugin.Scripting.GemsOn2CurvesApi.
Functions
| Function | |
|---|---|
all() | GemsOn2Curves handles for every object of this kind in the active document (empty when there is no document). |
by_layer() | GemsOn2Curves 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() | Fills the space between two curves with round gems whose diameter adapts to the local width — the ArtisanGemsOn2Curves tool, headless. |
find() | The handle for id, or None when the id does not belong to an object of this kind. |
selected() | GemsOn2Curves handles for the objects of this kind currently selected in the active document. |
ra.gems_on_two_curves.all()
ra.gems_on_two_curves.all() -> List[GemsOn2Curves]
GemsOn2Curves handles for every object of this kind in the active document (empty when there is no document).
ra.gems_on_two_curves.by_layer()
ra.gems_on_two_curves.by_layer(layer_name: str) -> List[GemsOn2Curves]
GemsOn2Curves handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | |
|---|---|---|
layer_name | str | required |
ra.gems_on_two_curves.count()
ra.gems_on_two_curves.count() -> int
Number of objects of this kind in the active document.
ra.gems_on_two_curves.create()
ra.gems_on_two_curves.create(curve1_id: IdLike, curve2_id: IdLike, distance=None, min_size=None, move_in_z=None, gem_material=None, algorithm=None, align_on_top=None, flip=None, flip1=None, flip2=None, rebuild_curves=None, prongs=None, prong_type=None, prong_end_mode=None, prong_diameter=None, prong_distance=None, prong_height_over_girdle=None, prong_height_under_girdle=None, group=None) -> GemsOn2CurvesResult
Fills the space between two curves with round gems whose diameter adapts to the local width — the ArtisanGemsOn2Curves tool, headless. Millimetres; omitting keeps the tool default (or the user’s saved defaults): distance 0.2 between gems, min_size 1 (smaller gems are dropped). algorithm is SPINE (default) or TANGENCY; gem_material accepts the GemApi vocabulary (default Diamond). prongs True also bakes the prongs (SHARED by default, or INDIVIDUAL) as metal. Returns the group id plus the gem/prong ids; group False bakes loose gems instead.
| Parameter | Type | |
|---|---|---|
curve1_id | IdLike | required |
curve2_id | IdLike | required |
distance | float | optional — None = the tool default |
min_size | float | optional — None = the tool default |
move_in_z | float | optional — None = the tool default |
gem_material | str | optional — None = the tool default |
algorithm | str | optional — None = the tool default |
align_on_top | Optional[bool] | optional — None = the tool default |
flip | Optional[bool] | optional — None = the tool default |
flip1 | Optional[bool] | optional — None = the tool default |
flip2 | Optional[bool] | optional — None = the tool default |
rebuild_curves | Optional[bool] | optional — None = the tool default |
prongs | bool | optional — None = the tool default |
prong_type | str | optional — None = the tool default |
prong_end_mode | str | optional — None = the tool default |
prong_diameter | float | optional — None = the tool default |
prong_distance | float | optional — None = the tool default |
prong_height_over_girdle | float | optional — None = the tool default |
prong_height_under_girdle | float | optional — None = the tool default |
group | bool | optional — None = the tool default |
ra.gems_on_two_curves.find()
ra.gems_on_two_curves.find(id: IdLike) -> GemsOn2Curves
The handle for id, or None when the id does not belong to an object of this kind.
| Parameter | Type | |
|---|---|---|
id | IdLike | required |
ra.gems_on_two_curves.selected()
ra.gems_on_two_curves.selected() -> List[GemsOn2Curves]
GemsOn2Curves 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().
GemsOn2Curves (handle)
| Property | Type | Settable | |
|---|---|---|---|
curve1_id | str | ||
curve2_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).