Python scripting - Common operators

CENPyOlpProcessGeometryOperator

Previous  Chapter  Next

 

The object of the CENPyOlpProcessGeometryOperator can be used to obtain attributes and regshape information about the underlying process geometry.

 

[Example]

 

def PostInitManufacturingGeometry(mfGeoInitOperator): 

   pgOperator = mfGeoInitOperator.GetCurrentProcessGeometryOperator()

  

    

Methods

 

GetInteger(attributeName: string): int

 

o

attributeName

The name of the attribute

 

o

return

The value of the attribute

 

[Example]

   valOfMyIntAttrib = mfGeoInitOperator.GetInteger('MyIntAttribute')

 


 

GetDouble(attributeName: string): float

 

o

attributeName

The name of the attribute

 

o

return

The value of the attribute

 

[Example]

   valOfMyDoubleAttrib = mfGeoInitOperator.GetDouble('MyDoubleAttribute')


 

GetString(attributeName: string): string

 

o

attributeName

The name of the attribute

 

o

return

The value of the attribute

 

[Example]

   valOfMyStrAttrib = mfGeoInitOperator.GetString('MyStringAttribute')

 


 

GetBool(attributeName: string): bool

 

o

attributeName

The name of the attribute

 

o

return

The value of the attribute

 

[Example]

   valOfMyBoolAttrib = mfGeoInitOperator.GetBool('MyBoolAttribute')

 


 

GetProcessGeometryName(): string

 

o

return

The name of process geometry

 

[Example]

   myProcessGeometryName = mfGeoInitOperator.GetProcessGeometryName()

 


 

IsRegshape(): bool

 

 

o

return

0 - not regshape; 1 - is regshape;

 

[Example]

   myPGisRegshape = mfGeoInitOperator.IsRegshape()

 


 

GetRegshapeType(): RegShapeType

 

 

o

return

0:

unknown regshape

1:

circle regshape

2:

slot regshape

3:

hexagon regshape

4:

rectangle regshape

5:

quadrilateral regshape

6:

parallelogram regshape

7:

square regshape

8:

rhombus regshape

 

[Example]

   regshapeType = mfGeoInitOperator.GetRegshapeType()

 


 

GetRegshapeCenter(): CENPyOlpMatrix

 

 

o

return

CENPyOlpMatrix of the regshape center

 

[Example]

   rScenterMat = mfGeoInitOperator.GetRegshapeCenter()

 


 

GetRegshapeLength(): float

 

o

return

length of the regshape

 

[Example]

   regshapeLength = mfGeoInitOperator.GetRegshapeLength()

 


 

GetRegshapeHeight(): float

 

o

return

height of the regshape

 

[Example]

   regshapeHeight = mfGeoInitOperator.GetRegshapeHeight()

 


 

GetRegshapeRadius(): float

 

o

return

radius of the regshape

 

[Example]

   regshapeRadius = mfGeoInitOperator.GetRegshapeRadius()

 


 

GetRegshapeCornerRadius(): float

 

o

return

Corner radius of the regshape (keyhole)

 

[Example]

   regshapeCornerRadius = mfGeoInitOperator.GetRegshapeCornerRadius()

 


 

GetGeoType(): ProcGeoType

 

o

return

process geometry type

0:

none

1:

point

2:

contour

3:

surface

 

[Example]

   geoType = mfGeoInitOperator.GetGeoType()

 


 

HasBoundary(): bool

 

o

return

 

 

If the operator holds a process-geometry-surface, with this method it could be checked if the surface has 

  a boundary attached.

 

[Example]

   hasBoundary = mfGeoInitOperator.HasBoundary()

 


GetContourLength(): float

 

o

return

Contour curve length in meters

 

Returns the curve length of the contour process geometry.

 

[Example]

   length = mfGeoInitOperator.GetContourLength()


 

 


Previous
Previous page
Chapter
Chapter page
Next
Next page