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__
GetRegshapeCircleCreate a circle regshape
GetRegshapeRectangleCreate a rectangle regshape
GetRegshapeSlotCreate a slot regshape
_GetReferenceMatrixArgs:
_LinTranslateArgs:
_CirTranslateArgs:
_GetMatrixFromRefPointArgs:
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 R2025.2.4.

Was this page helpful?