# Rotation in IfcAxis2Placement3D

**URL:** <https://forums.buildingsmart.org/t/rotation-in-ifcaxis2placement3d/4618>\
**Category:** Users\
**Tags:** ifc\
**Created:** [February 6, 2023, 1:24am UTC](https://forums.buildingsmart.org/t/rotation-in-ifcaxis2placement3d/4618 "2023-02-06T01:24:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![OzKitsune](https://avatars.discourse-cdn.com/v4/letter/o/258eb7/32.png) [@OzKitsune](https://forums.buildingsmart.org/u/OzKitsune)\
**Post date:** [February 6, 2023, 1:24am UTC](https://forums.buildingsmart.org/t/rotation-in-ifcaxis2placement3d/4618/1 "2023-02-06T01:24:04Z")

</div>

Hello!

Please help me figure out how to set the rotation of an object when creating of IFC in IfcAxis2Placement3D.

I have a quaternion and I can get the Euler angles or the rotation matrix but i can’t quite figure out how to use them in IfcAxis2Placement3D.

---

<div class="post-metadata">

**Author:** ![tauscher](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/tauscher/32/816_2.png) [@tauscher](https://forums.buildingsmart.org/u/tauscher)\
**Post date:** [February 10, 2023, 2:28pm UTC](https://forums.buildingsmart.org/t/rotation-in-ifcaxis2placement3d/4618/2 "2023-02-10T14:28:00Z")

</div>

Welcome OzKitsune,  
to get a value for `IfcAxis2Placement3D.Axis`, you can simply apply the given rotation to vector (0,0,1) or (0,0,z) with any real value z (any other not-normalized z-axis vector). Likewise, to get a value for `IfcAxis2Placement3D.RefDirection`, apply the given rotation to vector (1,0,0) or (x,0,0) with any real value x (any other x-axis vector) . You could also use any other vector in the xz-plane as `Refdirection`, but one that is orthogonal to the z-axis is just fine. It is just meant to fix the rotation about the z axis once you have the z-axis itself fixed via the `Axis` attribute.  
Hope that helps,  
Helga

---

<div class="post-metadata">

**Author:** ![OzKitsune](https://avatars.discourse-cdn.com/v4/letter/o/258eb7/32.png) [@OzKitsune](https://forums.buildingsmart.org/u/OzKitsune)\
**Post date:** [February 13, 2023, 12:30am UTC](https://forums.buildingsmart.org/t/rotation-in-ifcaxis2placement3d/4618/3 "2023-02-13T00:30:09Z")

</div>

Thanks for the help!

I still have one more question (a little off topic, but not to create a new one): how can I set the scale of individual objects? Or is it usually not done in IFC?

---

<div class="post-metadata">

**Author:** ![tauscher](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/tauscher/32/816_2.png) [@tauscher](https://forums.buildingsmart.org/u/tauscher)\
**Post date:** [February 13, 2023, 7:47am UTC](https://forums.buildingsmart.org/t/rotation-in-ifcaxis2placement3d/4618/4 "2023-02-13T07:47:28Z")

</div>

You may use `IfcMappedItem` and can then specify geometric any transformation consisting of translation, rotation and isotropic scaling.

---

<div class="post-metadata">

**Author:** ![stefkeB](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/stefkeb/32/1755_2.png) [@stefkeB](https://forums.buildingsmart.org/u/stefkeB)\
**Post date:** [February 15, 2023, 11:23am UTC](https://forums.buildingsmart.org/t/rotation-in-ifcaxis2placement3d/4618/5 "2023-02-15T11:23:27Z")

</div>

Scaling is risky… Because it may impact many other things. Are you expecting the scaling to also impact dependent objects (parts)? Are quantities for that object recalculated based on scaled geometry? Are any dimension parameters scaled as well?

So I would be really, really careful before introducing scaling and if you can avoid it (e.g. by parametrically controlled size/dimension), than you don’t need scaling at all.

---

<div class="post-metadata">

**Author:** ![OzKitsune](https://avatars.discourse-cdn.com/v4/letter/o/258eb7/32.png) [@OzKitsune](https://forums.buildingsmart.org/u/OzKitsune)\
**Post date:** [February 19, 2023, 11:26pm UTC](https://forums.buildingsmart.org/t/rotation-in-ifcaxis2placement3d/4618/6 "2023-02-19T23:26:26Z")

</div>

@tauscher, @stefkeB

Thanks for the advice!
