How does geometric element positioning work? #8610
-
I thought I knew this, but I'm seeing something really weird on one model in my iTwin.js viewer. I have two elements, They have no part instances, this is inline element geometry.
According to placement3d the geometry should be relative to the placement. So why are the two elements visibly next to each other in the viewer? Is there more to that calculation than I am aware of? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 14 replies
-
|
Beta Was this translation helpful? Give feedback.
-
ok so I checked and neither of those elements are listed in the schedule script. What else could be affecting the position? Am I misunderstanding something? |
Beta Was this translation helpful? Give feedback.
-
Are they supposed to look next to each other? What do the coordinates in their respective geometry streams look like? Do you observe this only with exportGraphics, or do the tiles produced by the iModel backend exhibit the same behavior? |
Beta Was this translation helpful? Give feedback.
I hope that isn't the case as it's recommend that geometry be stored relative to 0, 0, 0 and unrotated and positioned in the world using the placement transform.
The placement represents the local to world transform that is applied to the geometry read out of the geometry steam.
Mesh A stored vertices that are not near zero and a placement that doesn't apply a translation (Not recommended).
Mesh B stored vertices near zero and has a placement that applies a translation (Recommend).
It applies the placement transform to the mesh outpu…