.NET API
AdvancedGemsOnCurveApi
Runs of stones along a curve with per-stone sizes, shapes and rotations.
from ArtisanPlugin.Scripting import AdvancedGemsOnCurveApi
See also the Python package, ra.advanced_gems_on_curve.
Methods
| Method | |
|---|---|
All | IAdvancedGemsOnCurve handles for every object of this kind in the active document (empty when there is no document). |
ByLayer | IAdvancedGemsOnCurve 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 null when the id does not belong to an object of this kind. |
Selected | IAdvancedGemsOnCurve handles for the objects of this kind currently selected in the active document. |
All
IReadOnlyList<IAdvancedGemsOnCurve> AdvancedGemsOnCurveApi.All()
IAdvancedGemsOnCurve handles for every object of this kind in the active document (empty when there is no document).
Returns IReadOnlyList<IAdvancedGemsOnCurve>.
ByLayer
IReadOnlyList<IAdvancedGemsOnCurve> AdvancedGemsOnCurveApi.ByLayer(string layerName)
IAdvancedGemsOnCurve handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
Returns IReadOnlyList<IAdvancedGemsOnCurve>.
Count
int AdvancedGemsOnCurveApi.Count()
Number of objects of this kind in the active document.
Returns int.
Create
AdvancedGemsOnCurveResult AdvancedGemsOnCurveApi.Create(
Guid curveId,
IEnumerable<double> sizes,
IEnumerable<int> quantities = null,
IEnumerable<double> sizes2 = null,
IEnumerable<string> shapes = null,
IEnumerable<double> rotations = null,
double distance = 0,
double moveByZ = double.NaN,
double rotationOnCurve = double.NaN,
string alignmentOnCurve = null,
string alignmentVertical = null,
bool? startCentered = null,
bool? upsideDown = null,
bool flipCurve = false,
IEnumerable<Guid> orientationIds = null,
double t0 = double.NaN,
double t1 = double.NaN)
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; 0 keeps the tool default (or the user’s saved defaults): distance 0.2 between gems. alignmentOnCurve START (default) / CENTER / END, alignmentVertical ON_GIRDLE (default) / TOP. t0/t1 limit the run to a curve parameter range. Returns the group id plus the gem ids.
| Parameter | Type | Default |
|---|---|---|
curveId | Guid | required |
sizes | IEnumerable<double> | required |
quantities | IEnumerable<int> | null |
sizes2 | IEnumerable<double> | null |
shapes | IEnumerable<string> | null |
rotations | IEnumerable<double> | null |
distance | double | 0 |
moveByZ | double | double.NaN |
rotationOnCurve | double | double.NaN |
alignmentOnCurve | string | null |
alignmentVertical | string | null |
startCentered | bool? | null |
upsideDown | bool? | null |
flipCurve | bool | false |
orientationIds | IEnumerable<Guid> | null |
t0 | double | double.NaN |
t1 | double | double.NaN |
Returns AdvancedGemsOnCurveResult.
Find
IAdvancedGemsOnCurve AdvancedGemsOnCurveApi.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 IAdvancedGemsOnCurve.
Selected
IReadOnlyList<IAdvancedGemsOnCurve> AdvancedGemsOnCurveApi.Selected()
IAdvancedGemsOnCurve handles for the objects of this kind currently selected in the active document.
Returns IReadOnlyList<IAdvancedGemsOnCurve>.
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.
IAdvancedGemsOnCurve
Handle — extends IParametricGroup, IParametricObject.
| Property | Type | ||
|---|---|---|---|
CurveId | 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) |