# Placement & representation dimensionalities

**URL:** <https://forums.buildingsmart.org/t/placement-representation-dimensionalities/4287>\
**Category:** Developers\
**Created:** [June 28, 2022, 2:22pm UTC](https://forums.buildingsmart.org/t/placement-representation-dimensionalities/4287 "2022-06-28T14:22:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![claimred](https://avatars.discourse-cdn.com/v4/letter/c/e47c2d/32.png) [@claimred](https://forums.buildingsmart.org/u/claimred)\
**Post date:** [June 28, 2022, 2:22pm UTC](https://forums.buildingsmart.org/t/placement-representation-dimensionalities/4287/1 "2022-06-28T14:22:26Z")

</div>

I am struggling to understand what should be done in case of different dimensionalities of `MappingOrigin` & `CartesianOperator`. 🤔 Is there any formal rule or an agreement I am missing? Or, more broadly, how should one interpret 3D bodies in 2D geometry context?

Example:

```cpp
/* Geometry context set using AxisPlacement2D? */
#13 = IFCGEOMETRICREPRESENTATIONCONTEXT('Body', 'Model', 3, $, #14, #17);
#14 = IFCAXIS2PLACEMENT2D(#15, #16);
#15 = IFCCARTESIANPOINT((0., 0.));
#16 = IFCDIRECTION((1., 0.));
/* ........ Closed shells, faceted breps and other 3D body geometry ..... */
#55 = IFCREPRESENTATIONMAP(#14, #48);
#56 = IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM(#58, #17, #57, 1., #59, 1., 1.);
#57 = IFCCARTESIANPOINT((0., 0., 0.));
#58 = IFCDIRECTION((1., 0., 0.));
#59 = IFCDIRECTION((0., 0., 1.));
#60 = IFCMAPPEDITEM(#55, #56);

```

I’ve seen IfcOpenShell solution here: [IfcOpenShell/IfcMappedItem.cpp at v0.7.0 · IfcOpenShell/IfcOpenShell · GitHub](https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcgeom/IfcMappedItem.cpp#L27)

---

<div class="post-metadata">

**Author:** ![aothms](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@aothms](https://forums.buildingsmart.org/u/aothms)\
**Post date:** [July 2, 2022, 8:54am UTC](https://forums.buildingsmart.org/t/placement-representation-dimensionalities/4287/2 "2022-07-02T08:54:14Z")

</div>

IfcOpenShell is a not an authoritative source here, because it never makes the distinction between 2d and 3d. E.g 2d points become just 3d points on the z=0 plane, similarly for 2d and 3d placements or transformations.

There are some constraints on mixing 2d and 3d relative placements [8.7.6.1 IfcCorrectLocalPlacement - IFC4.3.0.1 Documentation](http://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcCorrectLocalPlacement.htm) If I read it correctly, a 2d placement can refer to a 3d placement, but a 3d placement not to a 2d placement. Not sure if I understand the rationale.

What do you see as the most natural way forward? Are there reasons to allow mixing 2d and 3d items/transformations?

---

<div class="post-metadata">

**Author:** ![igor.sokolov](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/igor.sokolov/32/25_2.png) [@igor.sokolov](https://forums.buildingsmart.org/u/igor.sokolov)\
**Post date:** [July 4, 2022, 7:09am UTC](https://forums.buildingsmart.org/t/placement-representation-dimensionalities/4287/3 "2022-07-04T07:09:41Z")

</div>

@aothms I think they mean IfcAxisToPlacement2D may be used to shift 3D model object on horizontal surfaces (like positioning of earth surface), i.e. it is equal to IfcAxisToPlacement3D with Axis (0,0,1).

Using 2D objects in 3D context may happen for example you extrude (composite) profile. 2D object is a surface and may be placed in 3D world.

Using 3D object in 2D surface is not clear, I think the snapshot of @claimred is invalid

---

<div class="post-metadata">

**Author:** ![claimred](https://avatars.discourse-cdn.com/v4/letter/c/e47c2d/32.png) [@claimred](https://forums.buildingsmart.org/u/claimred)\
**Post date:** [July 4, 2022, 6:54pm UTC](https://forums.buildingsmart.org/t/placement-representation-dimensionalities/4287/4 "2022-07-04T18:54:58Z")

</div>

> [@aothms](#):
>
> Are there reasons to allow mixing 2d and 3d items/transformations?

I don’t see any to be honest, nothing but confusion.

> [@aothms](#):
>
> What do you see as the most natural way forward?

Well, I think we could introduce a formal rule for `IfcMappedItem.MappingTarget` & `RepresentationMap.MappingOrigin` dimension compatibility for starters (and RepresentationType constraint perhaps?). It looks doable in EXPRESS, doesn’t it?

@TLiebich may I ask you to chime in?

---

<div class="post-metadata">

**Author:** ![aothms](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@aothms](https://forums.buildingsmart.org/u/aothms)\
**Post date:** [July 5, 2022, 7:48am UTC](https://forums.buildingsmart.org/t/placement-representation-dimensionalities/4287/5 "2022-07-05T07:48:16Z")

</div>

@claimred probably a better place to elaborate on the proposal is here [Issues · buildingSMART/IFC4.3.x-development · GitHub](https://github.com/buildingSMART/IFC4.3.x-development/issues) At least it’d better tracked. Can you mirror your proposal there?

---

<div class="post-metadata">

**Author:** ![TLiebich](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/tliebich/32/71_2.png) [@TLiebich](https://forums.buildingsmart.org/u/TLiebich)\
**Post date:** [July 5, 2022, 11:41am UTC](https://forums.buildingsmart.org/t/placement-representation-dimensionalities/4287/6 "2022-07-05T11:41:39Z")

</div>

> [@claimred](#):
>
> ```auto
> /* Geometry context set using AxisPlacement2D? */
> #13 = IFCGEOMETRICREPRESENTATIONCONTEXT('Body', 'Model', 3, $, #14, #17);
> #14 = IFCAXIS2PLACEMENT2D(#15, #16);
> #15 = IFCCARTESIANPOINT((0., 0.));
> #16 = IFCDIRECTION((1., 0.));
> 
> ```

isn’t it just plain wrong? A 3D geometric representation context (as shown by type “Model” and dimensionality = 3) requires a 3D placement. We may consider ensuring it by an extra rule.

---

<div class="post-metadata">

**Author:** ![claimred](https://avatars.discourse-cdn.com/v4/letter/c/e47c2d/32.png) [@claimred](https://forums.buildingsmart.org/u/claimred)\
**Post date:** [July 5, 2022, 2:02pm UTC](https://forums.buildingsmart.org/t/placement-representation-dimensionalities/4287/7 "2022-07-05T14:02:56Z")

</div>

Looks like it, yeah. Formal rule would be nice though.

What are you thoughts about `IfcMappedItem.MappingTarget` & `RepresentationMap.MappingOrigin` dimensions compatibility?

---

<div class="post-metadata">

**Author:** ![TLiebich](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/tliebich/32/71_2.png) [@TLiebich](https://forums.buildingsmart.org/u/TLiebich)\
**Post date:** [July 5, 2022, 8:31pm UTC](https://forums.buildingsmart.org/t/placement-representation-dimensionalities/4287/8 "2022-07-05T20:31:07Z")

</div>

I would argue, that those should have the same dimensionality
