Skip to content

.NET API

ChannelApi

Channel setting along a curve — the ArtisanChannel tool, headless: a metal channel with a run of gems inside, following an existing curve.

from ArtisanPlugin.Scripting import ChannelApi

See also the guide, Gemsets › Channel, and the Python package, ra.channel.

Methods

Method
AllChannels are baked as groups carrying RaObjectUserData, so they resolve like the other group-based types.
ByLayerIChannel handles on the layer with the given full path (empty when the layer does not exist).
CountNumber of objects of this kind in the active document.
CreateBuilds the channel along curveId.
FindThe handle for id, or null when the id does not belong to an object of this kind.
ForCurveThe channels built on curveId.
SelectedIChannel handles for the objects of this kind currently selected in the active document.

All

IReadOnlyList<IChannel> ChannelApi.All()

Channels are baked as groups carrying RaObjectUserData, so they resolve like the other group-based types. Create returns the member ids; these return handles you can read and edit.

Returns IReadOnlyList<IChannel>.

ByLayer

IReadOnlyList<IChannel> ChannelApi.ByLayer(string layerName)

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

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<IChannel>.

Count

int ChannelApi.Count()

Number of objects of this kind in the active document.

Returns int.

Create

IReadOnlyList<Guid> ChannelApi.Create(
    Guid curveId,
    double gemSize = 0,
    double width = 0,
    double height = 0,
    double minDistance = 0,
    IEnumerable<Guid> orientationIds = null,
    string profile = null,
    string prongType = null,
    string gemShape = null,
    string runMode = null,
    double positionZ = double.NaN,
    double rotation = double.NaN,
    double gemInside = double.NaN,
    double vertical = double.NaN,
    bool? forceEvenNumber = null,
    double prongHeight = 0)

Builds the channel along curveId. Millimetres; 0 keeps the tool default (or the user’s saved defaults): gemSize 1.8, width 3, height 2, minDistance 0.1. orientationIds optionally orient the channel onto those surfaces/breps. profile picks a CHANNEL_PROFILE asset by name; omitted = the tool’s default (the “domed rectangle” profile when available). Open curves run as a segment, closed curves all the way around, exactly like the tool. Returns the ids of the created objects (metal, then gems), all grouped as one editable Channel.

ParameterTypeDefault
curveIdGuidrequired
gemSizedouble0
widthdouble0
heightdouble0
minDistancedouble0
orientationIdsIEnumerable<Guid>null
profilestringnull
prongTypestringnull
gemShapestringnull
runModestringnull
positionZdoubledouble.NaN
rotationdoubledouble.NaN
gemInsidedoubledouble.NaN
verticaldoubledouble.NaN
forceEvenNumberbool?null
prongHeightdouble0

Returns IReadOnlyList<Guid>.

Find

IChannel ChannelApi.Find(Guid id)

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

ParameterTypeDefault
idGuidrequired

Returns IChannel.

ForCurve

IReadOnlyList<IChannel> ChannelApi.ForCurve(Guid curveId)

The channels built on curveId.

ParameterTypeDefault
curveIdGuidrequired

Returns IReadOnlyList<IChannel>.

Selected

IReadOnlyList<IChannel> ChannelApi.Selected()

IChannel handles for the objects of this kind currently selected in the active document.

Returns IReadOnlyList<IChannel>.

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.

IChannel

Handle — extends IParametricObject.

A channel setting: the metal rail built along a curve plus the run of stones set into it. Setters regenerate it in place (the group keeps its id) and take LITERAL values — 0 and negatives are allowed where the parameter is signed.

PropertyType
AutomaticProngSizeboolget
BooleanCuttersboolget
BrightCutdoubleget
CurveIdGuidgetRhino id of the curve the channel was built on.
FilletFactordoubleget
FlipCurveboolgetreverse the stone order and start point
ForceEvenNumberboolget
GemInsidedoublegetsigned
GemShapestringgetThe stones and how they are held. “ROUND” or “PRINCESS”
GemSizedoubleget
Heightdoubleget
IdGuidget(from IParametricObject)
InnerHeightdoubleget
InnerWidthdoubleget
InvertSegmentboolgetclosed curve: take the other arc
LayerNamestringget(from IParametricObject)
MargindoublegetSEGMENT: gap left at each end, mm
MinDistancedoubleget
MotherGemIdGuidget(from IParametricObject)
ObjectTypestringget(from IParametricObject)
PositionPoint3dget(from IParametricObject)
PositionZdoublegetsigned
ProfileNamestringgetCHANNEL_PROFILE asset name
ProngDistancedoublegetsigned
ProngEndModestringget”SINGLE” or “DOUBLE”
ProngExternalDiameterdoubleget
ProngHeightdoubleget
ProngInternalDiameterdoubleget
ProngTypestringget”NONE”, “SHARED” or “SCALLOPED”
Rotationdoublegetdegrees, signed
RunModestringgetHow much of the curve is used: “FULL” (the whole loop) or “SEGMENT”.
Verticaldoublegetsigned
WidthdoublegetThe metal rail section.
Method
void Delete()(from IParametricObject)
void Move(Vector3d translation)(from IParametricObject)
void SetAutomaticProngSize(bool automatic)
void SetBooleanCutters(bool booleanCutters)
void SetBrightCut(double brightCut)
void SetFilletFactor(double factor)
void SetFlipCurve(bool flip)
void SetForceEvenNumber(bool forceEven)
void SetGemInside(double gemInside)signed
void SetGemShape(string shape)ROUND | PRINCESS
void SetGemSize(double size)
void SetHeight(double height)
void SetInnerHeight(double height)
void SetInnerWidth(double width)
void SetInvertSegment(bool invert)
void SetMargin(double margin)
void SetMinDistance(double distance)
void SetPositionZ(double positionZ)signed
void SetProfile(string assetName)CHANNEL_PROFILE asset
void SetProngDiameters(double external, double internalDiameter)
void SetProngDistance(double distance)signed
void SetProngEndMode(string endMode)SINGLE | DOUBLE
void SetProngHeight(double height)
void SetProngType(string prongType)NONE | SHARED | SCALLOPED
void SetRotation(double degrees)signed
void SetRunMode(string runMode)FULL | SEGMENT
void SetVertical(double vertical)signed
void SetWidth(double width)