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 R2026.1.1.
Was this page helpful?