Skip to content

Python package

ra.bypass

Bypass shanks whose arms cross past each other.

import rhinoartisan as ra

Wraps ArtisanPlugin.Scripting.BypassApi.

Functions

Function
all()Bypass handles for every object of this kind in the active document (empty when there is no document).
by_layer()Bypass 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 a bypass shank — the ArtisanBypass tool, headless: a band whose two arms cross past each other instead of meeting.
find()The handle for id, or None when the id does not belong to an object of this kind.
selected()Bypass handles for the objects of this kind currently selected in the active document.

ra.bypass.all()

ra.bypass.all() -> List[Bypass]

Bypass handles for every object of this kind in the active document (empty when there is no document).

ra.bypass.by_layer()

ra.bypass.by_layer(layer_name: str) -> List[Bypass]

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

ParameterType
layer_namestrrequired

ra.bypass.count()

ra.bypass.count() -> int

Number of objects of this kind in the active document.

ra.bypass.create()

ra.bypass.create(finger_diameter=None, top_width=None, top_height=None, bottom_width=None, bottom_height=None, arm_angle=None, arm_height=None, arm_width=None, with_gems=None, gem_size=None, profile=None, plane=None, element=None) -> Bypass

Builds a bypass shank — the ArtisanBypass tool, headless: a band whose two arms cross past each other instead of meeting. Millimetres / degrees; omitting keeps the tool default (or the user’s saved defaults). finger_diameter 0 = the document’s finger size. with_gems turns on the stone run along the arms. Returns an Bypass handle: use its setters for the rest of the model (the handle covers the full parameter set). element = name of a saved element (ra.elements.list) to start from; explicit arguments override it.

ParameterType
finger_diameterfloatoptional — None = the tool default
top_widthfloatoptional — None = the tool default
top_heightfloatoptional — None = the tool default
bottom_widthfloatoptional — None = the tool default
bottom_heightfloatoptional — None = the tool default
arm_anglefloatoptional — None = the tool default
arm_heightfloatoptional — None = the tool default
arm_widthfloatoptional — None = the tool default
with_gemsbooloptional — None = the tool default
gem_sizefloatoptional — None = the tool default
profilestroptional — None = the tool default
planeOptional[PlaneLike]optional — None = the tool default
elementstroptional — None = the tool default

ra.bypass.find()

ra.bypass.find(id: IdLike) -> Bypass

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

ParameterType
idIdLikerequired

ra.bypass.selected()

ra.bypass.selected() -> List[Bypass]

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

Bypass (handle)

Bypass ring shank: two arms that cross past each other instead of meeting. Multiple gems possible, so no single MotherGem.

PropertyTypeSettable
gemsBypassGems
layer_namestr
mother_gem_idstr
object_typestr
positionPoint3d
ring_diameter_mmfloat
ring_size_labelstr
ring_size_regionstr
shankBypassShankParameter sections — each is a live view over the shank’s stored parameters; their setters regenerate the shank in place (same Guid) and call LicenseGate.RequireValid() first. Millimetres.
Method
delete()
move(translation: VectorLike)
set_element(element: str)Applies a saved ByPass element (ra.elements.list(“ByPass”)) to this shank: its parameters replace the current ones, the ring size stays, and the shank regenerates in place (same id).

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

BypassGems (section)

The gems row a bypass shank carries along each arm. A live view over the shank’s stored parameters: getters read the current values, setters regenerate the shank in place (same Guid) and are license-gated.

PropertyTypeSettable
anglefloatyesarc covered by the row from each tip, degrees
automatic_prong_diameterboolyes
bright_cutfloatyesmm
double_prong_settingboolyes
drill_allow_intersectionboolyes
drill_enabledboolyes
drill_heightfloatyesmm
drill_typestryes”NONE”, “ROUND” or “QUAD”
drill_visibleboolyes
drill_widthfloatyesmm
enabledboolyes
end_prong_countintyes
extension_for_manufacturingfloatyesmm
gem_insidefloatyesmm
gem_shapestryes”ROUND”, “PRINCESS”, …
gem_sizefloatyesmm
gem_size_endfloatmm
gem_size_middlefloatmm
gem_size_startfloatmm
gradientboolyesStone-size gradient along the row.
gradient_middle_positionfloatyes0..1
gradient_pointsintyes
inner_heightfloatyesinner channel height, mm
inner_marginfloatyesmm
inner_widthfloatyesinner channel width, mm
marginfloatyesmm
min_distancefloatyesmm
prong_diameterfloatyesmm
prong_distancefloatyesmm
prong_growfloatyesmm
prong_heightfloatyesmm
prong_min_diameterfloatyesmm
prong_spacingfloatyesmm
prong_typestryes”NONE”, “SHARED” or “SCALLOPED”
scallop_gem_heightfloat
scallop_gem_widthfloatScalloped-setting proportions (percentages, not mm).
scallop_prong_heightfloat
scallop_prong_widthfloat
scallop_rail_heightfloat
scallop_rail_widthfloat
scallop_remove_channelboolyes
verticalfloatyesmm
Method
set_gem_size_gradient(start: float, middle: float, end: float)
set_scallop_gem(width: float, height: float)
set_scallop_prong(width: float, height: float)
set_scallop_rail(width: float, height: float)

BypassShank (section)

The bypass band: the two band sections, the crossing arms and the optional bridge, plus the per-station cross-sections.

PropertyTypeSettable
arm_anglefloatyesdegrees
arm_heightfloatyesmm
arm_tangentfloatyes
arm_widthfloatyesmm
bottom_heightfloatyesmm
bottom_widthfloatyesmm
bridge_anglefloatyesdegrees
bridge_diameterfloatyesmm
bridge_enabledboolyes
bridge_thicknessfloatyesmm
bridge_widthfloatyesmm
cap_distancefloatyesmm
displacementfloatyeshow far the arms pass each other, mm
displacement_startintyesrail point where the displacement starts
profile_namestrRING_PROFILE asset name, "" when unset
shared_profileboolyesevery station uses the same profile asset
stationsList[BypassStation]yes
tip_rotationfloatyesroll of the tip about the rail tangent, degrees
top_heightfloatyesmm
top_widthfloatyesmm
use_stationsboolyesbuild from Stations instead of the top/bottom gradient
Method
set_profile(asset_name: str)RING_PROFILE asset by name — list them with ra.assets.list(“RING_PROFILE”)
set_station(index: int, position: float, width: float, height: float, profile_name=None)