Skip to Content

Regshape Util

Quick Facts

PropertyValue
ClassRegshapeUtil
Modulecenpylib.RegshapeUtil
Packagecenpylib
ReleaseR2025.2.4
Methods12

Quick Start

# Boilerplate Example obj = RegshapeUtil(operator) result = obj.GetRegshapeCircle(shiftReference, radius, overrun, leadin)

Method Index

MethodReturnsSummary
__init__โ€”โ€”
GetRegshapeCircleโ€”Create a circle regshape
GetRegshapeRectangleโ€”Create a rectangle regshape
GetRegshapeSlotโ€”Create a slot regshape
_GetReferenceMatrixโ€”Args:
_LinTranslateโ€”Args:
_CirTranslateโ€”Args:
_GetMatrixFromRefPointโ€”Args:
coordinates_on_circle_given_arc_lengthโ€”โ€”
coordinates_on_circle_given_degreesโ€”โ€”
AddLaserOnEventโ€”โ€”
AddLaserOffEventโ€”โ€”

Lifecycle

__init__

def __init__(operator)

Parameters:

NameTypeDescription
operatorโ€”โ€”

Query Methods

GetRegshapeCircle

def GetRegshapeCircle(shiftReference, radius, overrun=0, leadin=0)

Create a circle regshape

Parameters:

NameTypeDescription
shiftReferenceโ€”โ€”
radiusโ€”โ€”
overrunโ€”โ€” (default: 0)
leadinโ€”โ€” (default: 0)

GetRegshapeRectangle

def GetRegshapeRectangle(shiftReference, length, height, radius=0, overrun=0, leadin=0)

Create a rectangle regshape

Parameters:

NameTypeDescription
shiftReferenceโ€”โ€”
lengthโ€”โ€”
heightโ€”โ€”
radiusโ€”โ€” (default: 0)
overrunโ€”โ€” (default: 0)
leadinโ€”โ€” (default: 0)

GetRegshapeSlot

def GetRegshapeSlot(shiftReference, length, height, radius, overrun=0, leadin=0)

Create a slot regshape

Parameters:

NameTypeDescription
shiftReferenceโ€”โ€”
lengthโ€”โ€”
heightโ€”โ€”
radiusโ€”โ€”
overrunโ€”โ€” (default: 0)
leadinโ€”โ€” (default: 0)

Mutation Methods

AddLaserOnEvent

def AddLaserOnEvent(Operator, point, action=0, insertpos=TPINSERTPOS_INSERTBEFORE)

Parameters:

NameTypeDescription
Operatorโ€”โ€”
pointโ€”โ€”
actionโ€”โ€” (default: 0)
insertposโ€”โ€” (default: TPINSERTPOS_INSERTBEFORE)

AddLaserOffEvent

def AddLaserOffEvent(Operator, point, action=0, insertpos=TPINSERTPOS_INSERTBEFORE)

Parameters:

NameTypeDescription
Operatorโ€”โ€”
pointโ€”โ€”
actionโ€”โ€” (default: 0)
insertposโ€”โ€” (default: TPINSERTPOS_INSERTBEFORE)

Utilities

_GetReferenceMatrix

def _GetReferenceMatrix()

Args: Returns:

_LinTranslate

def _LinTranslate(x, y, z)

Args: Returns:

Parameters:

NameTypeDescription
xโ€”โ€”
yโ€”โ€”
zโ€”โ€”

_CirTranslate

def _CirTranslate(x1, y1, z1, x2, y2, z2)

Args: Returns:

Parameters:

NameTypeDescription
x1โ€”โ€”
y1โ€”โ€”
z1โ€”โ€”
x2โ€”โ€”
y2โ€”โ€”
z2โ€”โ€”

_GetMatrixFromRefPoint

def _GetMatrixFromRefPoint()

Args: Returns:

coordinates_on_circle_given_arc_length

def coordinates_on_circle_given_arc_length(radius, arc_length)

Parameters:

NameTypeDescription
radiusโ€”โ€”
arc_lengthโ€”โ€”

coordinates_on_circle_given_degrees

def coordinates_on_circle_given_degrees(radius, angle_degrees)

Parameters:

NameTypeDescription
radiusโ€”โ€”
angle_degreesโ€”โ€”

Version Notes

This class is documented as of release R2026.1.1.

Was this page helpful?