Regshape Util
Quick Facts
| Property | Value |
|---|---|
| Class | RegshapeUtil |
| Module | cenpylib.RegshapeUtil |
| Package | cenpylib |
| Release | R2025.2.4 |
| Methods | 12 |
Quick Start
# Boilerplate Example
obj = RegshapeUtil(operator)
result = obj.GetRegshapeCircle(shiftReference, radius, overrun, leadin)Method Index
| Method | Returns | Summary |
|---|---|---|
__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:
| Name | Type | Description |
|---|---|---|
operator | — | — |
Query Methods
GetRegshapeCircle
def GetRegshapeCircle(shiftReference, radius, overrun=0, leadin=0)Create a circle regshape
Parameters:
| Name | Type | Description |
|---|---|---|
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:
| Name | Type | Description |
|---|---|---|
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:
| Name | Type | Description |
|---|---|---|
shiftReference | — | — |
length | — | — |
height | — | — |
radius | — | — |
overrun | — | — (default: 0) |
leadin | — | — (default: 0) |
Mutation Methods
AddLaserOnEvent
def AddLaserOnEvent(Operator, point, action=0, insertpos=TPINSERTPOS_INSERTBEFORE)Parameters:
| Name | Type | Description |
|---|---|---|
Operator | — | — |
point | — | — |
action | — | — (default: 0) |
insertpos | — | — (default: TPINSERTPOS_INSERTBEFORE) |
AddLaserOffEvent
def AddLaserOffEvent(Operator, point, action=0, insertpos=TPINSERTPOS_INSERTBEFORE)Parameters:
| Name | Type | Description |
|---|---|---|
Operator | — | — |
point | — | — |
action | — | — (default: 0) |
insertpos | — | — (default: TPINSERTPOS_INSERTBEFORE) |
Utilities
_GetReferenceMatrix
def _GetReferenceMatrix()Args: Returns:
_LinTranslate
def _LinTranslate(x, y, z)Args: Returns:
Parameters:
| Name | Type | Description |
|---|---|---|
x | — | — |
y | — | — |
z | — | — |
_CirTranslate
def _CirTranslate(x1, y1, z1, x2, y2, z2)Args: Returns:
Parameters:
| Name | Type | Description |
|---|---|---|
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:
| Name | Type | Description |
|---|---|---|
radius | — | — |
arc_length | — | — |
coordinates_on_circle_given_degrees
def coordinates_on_circle_given_degrees(radius, angle_degrees)Parameters:
| Name | Type | Description |
|---|---|---|
radius | — | — |
angle_degrees | — | — |
Version Notes
This class is documented as of release R2025.2.4.
Was this page helpful?