Skip to main content

Hi all,

I have succesfully transformed IfcDoor-entities into (shapeless) dwg-blocks with the extracted information being written into the dwg-block. Now I would like to rotate the block parallel to the respective door. But I do not konw how to retrieve this information. I thought I could derive the rotation / orientation information from the footprint (identifiy the longest line-segment of the edgecurve), but I dont know how to do that either. Can anyone give advice on this matter?2023-07-12 15_17_41-Greenshotthx in advance!

Hi @morja​,

You can use the FME Hub transformer TransformationMatrixExtractor to extract the transformation matrix parameters from the IFCDoors, then use the 3DAffiner transformer to apply those parameters to the DWG blocks. Your DWG blocks should be at 0,0,0 before applying the affine, since the it will also move the block into the correct location.


Hej @daveatsafe​ ,

Thanks a lot for this hint. I have tried several different approaches and came up with this:

The "A"-value in the transformationMatrix seems to carry the cosine-value of the geometry's rotation.

dwg-block-rotation_1I do use it directly (after converting it into degrees) to assign it to the wgStyler-Transformer for the "Rotation"-input. so far it seems to work quite fine.

dwg-block-rotation_2Would this be an appropriate way of dealing with the problem?

best,

Morten

 


The A value is cos of the rotation angle * scale, but I think that for IFC, the scale will usually be 1, so your shortcut should work.


Reply