Skip to content

Python package

ra.channel

Channel settings along a curve.

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.ChannelApi.

Functions

Function
all()Channels are baked as groups carrying RaObjectUserData, so they resolve like the other group-based types.
by_layer()Channel 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()Builds the channel along curve_id.
find()The handle for id, or None when the id does not belong to an object of this kind.
for_curve()The channels built on curve_id.
selected()Channel handles for the objects of this kind currently selected in the active document.

ra.channel.all()

ra.channel.all() -> List[Channel]

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.

ra.channel.by_layer()

ra.channel.by_layer(layer_name: str) -> List[Channel]

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

ParameterType
layer_namestrrequired

ra.channel.count()

ra.channel.count() -> int

Number of objects of this kind in the active document.

ra.channel.create()

ra.channel.create(curve_id: IdLike, gem_size=None, width=None, height=None, min_distance=None, orientation_ids=None, profile=None, prong_type=None, gem_shape=None, run_mode=None, position_z=None, rotation=None, gem_inside=None, vertical=None, force_even_number=None, prong_height=None) -> List[str]

Builds the channel along curve_id. Millimetres; omitting keeps the tool default (or the user’s saved defaults): gem_size 1.8, width 3, height 2, min_distance 0.1. orientation_ids 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.

ParameterType
curve_idIdLikerequired
gem_sizefloatoptional — None = the tool default
widthfloatoptional — None = the tool default
heightfloatoptional — None = the tool default
min_distancefloatoptional — None = the tool default
orientation_idsSequence[IdLike]optional — None = the tool default
profilestroptional — None = the tool default
prong_typestroptional — None = the tool default
gem_shapestroptional — None = the tool default
run_modestroptional — None = the tool default
position_zfloatoptional — None = the tool default
rotationfloatoptional — None = the tool default
gem_insidefloatoptional — None = the tool default
verticalfloatoptional — None = the tool default
force_even_numberOptional[bool]optional — None = the tool default
prong_heightfloatoptional — None = the tool default

ra.channel.find()

ra.channel.find(id: IdLike) -> Channel

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

ParameterType
idIdLikerequired

ra.channel.for_curve()

ra.channel.for_curve(curve_id: IdLike) -> List[Channel]

The channels built on curve_id.

ParameterType
curve_idIdLikerequired

ra.channel.selected()

ra.channel.selected() -> List[Channel]

Channel 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().

Channel (handle)

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.

PropertyTypeSettable
automatic_prong_sizeboolyes
boolean_cuttersboolyes
bright_cutfloatyes
curve_idstrRhino id of the curve the channel was built on.
fillet_factorfloatyes
flip_curveboolyesreverse the stone order and start point
force_even_numberboolyes
gem_insidefloatyessigned
gem_shapestryesThe stones and how they are held. “ROUND” or “PRINCESS”
gem_sizefloatyes
heightfloatyes
inner_heightfloatyes
inner_widthfloatyes
invert_segmentboolyesclosed curve: take the other arc
layer_namestr
marginfloatyesSEGMENT: gap left at each end, mm
min_distancefloatyes
mother_gem_idstr
object_typestr
positionPoint3d
position_zfloatyessigned
profile_namestrCHANNEL_PROFILE asset name
prong_distancefloatyessigned
prong_end_modestryes”SINGLE” or “DOUBLE”
prong_external_diameterfloat
prong_heightfloatyes
prong_internal_diameterfloat
prong_typestryes”NONE”, “SHARED” or “SCALLOPED”
rotationfloatyesdegrees, signed
run_modestryesHow much of the curve is used: “FULL” (the whole loop) or “SEGMENT”.
verticalfloatyessigned
widthfloatyesThe metal rail section.
Method
delete()
move(translation: VectorLike)
set_profile(asset_name: str)CHANNEL_PROFILE asset
set_prong_diameters(external: float, internal_diameter: float)

Plus what every handle has: id, delete(), update(**kwargs), parameters(), equality and hashing by id, and raw (the underlying .NET object).