Open onderilkesever opened 4 days ago
I wanted to share some further observations to aid in the investigation. I noticed that the coordination matrices obtained from fragmentsGroup
and directly from web-ifc
are not matching. However, when these matrices are applied to the corresponding 3D objects (meshes), the objects are brought to the exact same location in the scene.
This suggests that there might be a discrepancy in the mesh creation process, which is somehow compensated for in the coordinationMatrix
. I couldn’t identify any code in the repository that explicitly handles this adjustment, which leaves me at a bit of a loss in terms of where to focus my investigation.
From web-ifc >
1 0 0 0 0 1 0 0 0 0 1 0 48.8318280384837 0.1524 19.4187064561144 1
From fragmentsGroup.coordinationMatrix >
1 0 0 0 0 1 0 0 0 0 1 0 -2.215953884857178 -2.076200008392334 27.88630140649414 1
Here is my ifc file if you would like to try out yourself. https://drive.google.com/file/d/1kXqb-5_7z05Trn655KQG7WmQBNoAH94E/view?usp=sharing
I’d really appreciate any insights or guidance on this topic.
Thank you!
I might have an idea about what’s happening here. Could it be that the coordination matrix depends on how the IFC model is traversed? For example, using StreamAllMeshes
vs. StreamAllMeshesWithTypes
might result in different coordination matrices. However, applying the matrix to the object still places it in the correct location. Could you please confirm if this is the case?
Also, perhaps I should tag @beachtom, as I believe he might be able to provide valuable input on this matter.
So _coordinationMatrix is only used when coordinating to Origin - and yes it could depend on the order of the objects - the matrix is generated based on the first object that is found that needs coordinating - then all others are done related to that object - so you if you change the order of the objects then yes the matrix will change
Describe the bug 📝
Hello,
I wanted to ask about a behavior I’ve observed when working with meshes using the library. So far, I have been creating my meshes via ifcLoader.load, and everything has been working as expected. However, today, I conducted an experiment and manually created a mesh using a method from a sibling repository, as demonstrated in this example: web-ifc-three.ts#L26.
The issue I noticed is that the meshes generated through these two approaches do not appear in the same positions within my scene. To ensure consistency, I’ve set
COORDINATE_TO_ORIGIN
totrue
in both scenarios. Additionally, for ifcLoader.load, I pass thecoordinate
parameter asfalse
. Despite these settings, the placement discrepancy persists._Note that when
COORDINATE_TO_ORIGIN
set thefalse
on both, they appear exactly same on same location as expected._Since the precise positioning of the models is critical for my use case, I would like to understand what might be causing this difference. Are there additional factors or settings I might be overlooking that could impact mesh placement?
I greatly appreciate your support and insights on this matter.
Thank you in advance!
Best regards,
Reproduction ▶️
No response
Steps to reproduce 🔢
No response
System Info 💻
Used Package Manager 📦
npm
Error Trace/Logs 📃
No response
Validations ✅