.NET API
GemsOn2CurvesApi
Stones fitted between two rails, sized to the gap.
from ArtisanPlugin.Scripting import GemsOn2CurvesApi
See also the Python package, ra.gems_on_two_curves.
Methods
| Method | |
|---|---|
All | IGemsOn2Curves handles for every object of this kind in the active document (empty when there is no document). |
ByLayer | IGemsOn2Curves 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 null when the id does not belong to an object of this kind. |
Selected | IGemsOn2Curves handles for the objects of this kind currently selected in the active document. |
All
IReadOnlyList<IGemsOn2Curves> GemsOn2CurvesApi.All()
IGemsOn2Curves handles for every object of this kind in the active document (empty when there is no document).
Returns IReadOnlyList<IGemsOn2Curves>.
ByLayer
IReadOnlyList<IGemsOn2Curves> GemsOn2CurvesApi.ByLayer(string layerName)
IGemsOn2Curves handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
Returns IReadOnlyList<IGemsOn2Curves>.
Count
int GemsOn2CurvesApi.Count()
Number of objects of this kind in the active document.
Returns int.
Create
GemsOn2CurvesResult GemsOn2CurvesApi.Create(
Guid curve1Id,
Guid curve2Id,
double distance = 0,
double minSize = 0,
double moveInZ = double.NaN,
string gemMaterial = null,
string algorithm = null,
bool? alignOnTop = null,
bool? flip = null,
bool? flip1 = null,
bool? flip2 = null,
bool? rebuildCurves = null,
bool prongs = false,
string prongType = null,
string prongEndMode = null,
double prongDiameter = 0,
double prongDistance = 0,
double prongHeightOverGirdle = 0,
double prongHeightUnderGirdle = 0,
bool group = true)
Fills the space between two curves with round gems whose diameter adapts to the local width — the ArtisanGemsOn2Curves tool, headless. Millimetres; 0 keeps the tool default (or the user’s saved defaults): distance 0.2 between gems, minSize 1 (smaller gems are dropped). algorithm is SPINE (default) or TANGENCY; gemMaterial 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 | Default |
|---|---|---|
curve1Id | Guid | required |
curve2Id | Guid | required |
distance | double | 0 |
minSize | double | 0 |
moveInZ | double | double.NaN |
gemMaterial | string | null |
algorithm | string | null |
alignOnTop | bool? | null |
flip | bool? | null |
flip1 | bool? | null |
flip2 | bool? | null |
rebuildCurves | bool? | null |
prongs | bool | false |
prongType | string | null |
prongEndMode | string | null |
prongDiameter | double | 0 |
prongDistance | double | 0 |
prongHeightOverGirdle | double | 0 |
prongHeightUnderGirdle | double | 0 |
group | bool | true |
Returns GemsOn2CurvesResult.
Find
IGemsOn2Curves GemsOn2CurvesApi.Find(Guid id)
The handle for id, or null when the id does not belong to an object of this kind.
| Parameter | Type | Default |
|---|---|---|
id | Guid | required |
Returns IGemsOn2Curves.
Selected
IReadOnlyList<IGemsOn2Curves> GemsOn2CurvesApi.Selected()
IGemsOn2Curves handles for the objects of this kind currently selected in the active document.
Returns IReadOnlyList<IGemsOn2Curves>.
Handles and sections
What the methods above hand back. A handle’s setters regenerate the object; wrap changes in a Transaction so they land as one undo step.
IGemsOn2Curves
Handle — extends IParametricGroup, IParametricObject.
| Property | Type | ||
|---|---|---|---|
Curve1Id | Guid | get | |
Curve2Id | Guid | get | |
Id | Guid | get | (from IParametricObject) |
LayerName | string | get | (from IParametricObject) |
MemberCount | int | get | Rhino objects in the group (from IParametricGroup) |
MotherGemId | Guid | get | (from IParametricObject) |
ObjectType | string | get | (from IParametricObject) |
ParametersJson | string | get | the kernel model, as stored in the group (from IParametricGroup) |
Position | Point3d | get | (from IParametricObject) |
| Method | |
|---|---|
void Delete() | (from IParametricObject) |
string GetParameter(string path) | dotted JSON path; null when absent (from IParametricGroup) |
void Move(Vector3d translation) | (from IParametricObject) |