Question

How to rotate a polygon around an axis?

  • 18 April 2019
  • 2 replies
  • 9 views

Badge +1

Hello,

 

I have a 3D polygon.

I would like to perform a rotation of that polygon around an axis with a specific angle value given a defined x,y,z point.

 

 

How can I do that inside a python caller?

 

Thanks


2 replies

Userlevel 2
Badge +12

Have a look at the 3DRotator transformer.

The functionality seems available, so why use Python?

Badge +22

If you absolutely need to use python, since there is no build-in method to rotate in 3D like there is in 2D, you can use

fmeobjects.FMEFeature.performFunction(str) or

fmeobjects.FMEFactoryPipeline

I'm not sure which, as the 3DRotator does not appear to be in the functions and factories documentation

https://docs.safe.com/fme/html/FME_FactFunc/index.html

 

EDIT: It looks like the 3D rotator uses the @affine function

Reply