Python scripting - Objects

CENPyOlpPoint

 

Methods

 

CENPyOlpPoint(x: float, y: float, z: float)

 

o

x

x coordinate in meters

 

o

y

y coordinate in meters

 

o

z

z coordinate in meters

 

Create new point object

Note that object will be deleted automatically by python at the end of current callback scope.

 

[Example]

   myNewPoint = CENPyOlpPoint(1, 2.22, -3.333)

 


 

SetXYZ(x: float, y: float, z: float)

 

o

x

x coordinate in meters

 

o

y

y coordinate in meters

 

o

z

z coordinate in meters

 

Set coordinates.

 

[Example]

   myNewPoint.SetXYZ(-1, 2.2, 3)

 


 

GetXYZ(): tuple

 

o

return

tuple (x coordinate, y coordinate, z coordinate) in meters

 

Get coordinates  as tuple  

 

[Example]

   myPointCoordinates = myNewPoint.GetXYZ()

 


 

GetX(): float

 

o

return

x coordinate in meters

 

Get x coordinate.

 

[Example]

   myPointXCoord = myNewPoint.GetX()

 


 

GetY(): float

 

o

return

y coordinate in meters

 

Get y coordinate.

 

[Example]

   myPointYCoord = myNewPoint.GetY()

 


 

GetZ(): float

 

o

return

z coordinate in meters

 

Get z coordinate.

 

 [Example]

   myPointZCoord = myNewPoint.GetZ()

 


 

SetX(val: float)

 

o

val

new x coordinate in meters

 

Set x coordinate.

 

[Example]

   myNewPoint.SetX(0.1)

 


 

SetY(val: float)

 

o

val

new y coordinate in meters

 

Set y coordinate.

 

[Example]

   myNewPoint.SetY(-0.2)

 


 

SetZ(val: float)

 

o

val

new z coordinate in meters

 

Set z coordinate.

 

[Example]

   myNewPoint.SetZ(-0.003)

 


 

Transform(iTransformationMatrix: CENPyOlpMatrix)

 

o

iTransformationMatrix

CENPyOlpMatrix transformation matrix

 

Transform point.

 

[Example]

   myPointYCoord.Transform(trsnsformMat)

 


 

Dist(secondPoint: CENPyOlpPoint): float

 

o

secondPoint

CENPyOlpPoint the second point

 

o

return

the distance in meters

 

Get distance between this and a second point.

 

[Example]

   dist = myNewPoint.Dist(myOldPoint)

 

 


 

 


Previous
Page précédente
Chapter
Page principale du chapitre
Next
Page suivante