Skip to main content
Solved

3DAffiner example please

  • September 17, 2013
  • 4 replies
  • 78 views

fmelizard
Safer
Forum|alt.badge.img+18
I am trying to build some 3D planes from XYZ centre points.

 

 

I have generated the planes using sector generator coerced these as polygons then 3d Forced them @ZValue  rotated them CLOCKWISE them using ) and I am stuck trying to get the resultant planes to rotate/tilt on their Z axis about their @ZValue centre using an @Value(Dip)

 

 

can someone please provide a screenshot of a 3DAffiner example of a Z-axis affine of say 10 degrees 

 

 

AND

 

 

a 3DRotator example of a custom axis example OR z-axis example to apply a 10 degrees to each plane element?

 

the help file for these two transformers are for irony and i am unable to debug why nothing is tilting.

 

 

Kind Regards,

 

Steve

 

 

Best answer by gio

3D rotation matrix:

 

 

Y-axis:

 

cos ?,0,sin?

 

0,1,0

 

-sin ?,0,cos ?

 

 

? = your rotation

 

 

every forth parameter (D,H andL) in the affiner is a "move" If u just rotate use 0 for every forth. 

 

 

If u only want to move an object and not scale and/or rotate it:

 

1,0,0,@MoveX

 

0,1,0,@KMoveY

 

0,0,1,@MoveZ

 

 

U can also use some math here.

 

 

rotate and move:

 

 

cos ?,0,sin?                        1,0,0,@MoveX

 

0,1,0                         +         0,1,0,@KMoveY   =    new transformmatrix

 

-sin ?,0,cos ?                      0,0,1,@MoveZ

 

 

etc.etc.

 

 

 

u can look up x and y-axis rotations on Wiki (keyword: rotationmatrix) or any mathsite.

 

 

haves funs!

 

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

david_r
Celebrity
  • September 17, 2013
Hi,

 

 

have you looked at this article on FMEPedia?

 

 

You can also download the sample workspaces used in the article.

 

 

David

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • Best Answer
  • September 17, 2013
3D rotation matrix:

 

 

Y-axis:

 

cos ?,0,sin?

 

0,1,0

 

-sin ?,0,cos ?

 

 

? = your rotation

 

 

every forth parameter (D,H andL) in the affiner is a "move" If u just rotate use 0 for every forth. 

 

 

If u only want to move an object and not scale and/or rotate it:

 

1,0,0,@MoveX

 

0,1,0,@KMoveY

 

0,0,1,@MoveZ

 

 

U can also use some math here.

 

 

rotate and move:

 

 

cos ?,0,sin?                        1,0,0,@MoveX

 

0,1,0                         +         0,1,0,@KMoveY   =    new transformmatrix

 

-sin ?,0,cos ?                      0,0,1,@MoveZ

 

 

etc.etc.

 

 

 

u can look up x and y-axis rotations on Wiki (keyword: rotationmatrix) or any mathsite.

 

 

haves funs!

 


fmelizard
Safer
Forum|alt.badge.img+18
  • Author
  • Safer
  • September 18, 2013
Thank you for your replies. I have trawled wiki and FMEpedia at the 2.5D buildings example for a solution. Really I needed an application of the transformers which i could backwards engineer to my application.

 

This morning an ACE Safe employee, we shall call him 'Evan Angelist', helped me troubleshoot my workspace and we just wound up using a 3D rotation and then 2D rotation to accomplish what i was after.

 

 

so to apply the Dip angle to each feature about their centres used a 3DRotator.

 

Angle in degrees @Value(Dip)

 

rotate along : Custom axis

 

origin XYZ: pt_X, pt_Y, pt_Z

 

direction XYZ: pt_X, pt_Y, pt_Z

 

 

then a 2D rotator of dip_direction:

 

RotationAngle: )

 

X_origin: pt_X

 

Y Origin: pt_Y

 

(my values are cartesian 0=North and rotators are left turns in FME)

 

 

the separate steps made it easier to debug and acheived what i needed. But I will now go try your method Gio. because the 3dAffiner has higher score because of 'degree of difficulty' i reckon.

 

Cheers Gio and Dave,

 

Steve

  • January 6, 2014
Hey Steve,

 

 

In the first approach you took, which transformers did you use for the 3D and 2D rotations? I couldn't find anything under the name 3D/2DRotator and I am also having trouble with the 3DAffiner. I tried to rotate buildings in place (leaving the D, H, and L parameters blank), but still had a massive shift in my dataset. 

 

 

Thanks for any input!

 

Jon

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