Skip to main content
Question

How to rotate a polygon around an axis?


arthy
Contributor
Forum|alt.badge.img+8
  • Contributor

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

erik_jan
Contributor
Forum|alt.badge.img+19
  • Contributor
  • April 18, 2019

Have a look at the 3DRotator transformer.

The functionality seems available, so why use Python?


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • April 18, 2019

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings