Open favreau84 opened 2 years ago
What do you think @tomvandig?
How would you propose we choose the site? We can give the user the option to scan the sites beforehand and determine the coordination they want, but this is possible already now, although not easy.
Do you propose that this process should be easier, i.e: get its own API endpoint?
Hi @tomvandig, as far as I'm concerned, in the vast majority of the ifc files used in a construction project, there is only one ifcSite. So taking the first (and only one) site will definitely solve 99% of the use cases. For the edge cases were there are several ifcSites, well, it's not really a pb : the user will be able to translate the model afterwards from the ifcSite locationPlacement.
In other words, we could have 2 options (already implemented) + 1 additional option to load the model :
Please keep in mind that I'm looking for a programmatic solution to avoid the manual settings of the ifcSite coordinates to 0,0,0 that do solve geometry discrepancies in the model I'm using.
What do you think ?
@favreau84
Sounds good, I'll update the ticket when first_site_as_origin (or similar) is in
Hello, I opened this issue which seems quite close : https://github.com/tomvandig/web-ifc/issues/91
As a side note, it would be really useful if ifc.js would store the chosen offset somewhere in the generated mesh, for instance on .userData.originOffset
.
@autra In the new components repository, we import IFCs as a group of meshes called FragmentsGroup that has a property with the applied matrix 🙂
@autra In the new components repository, we import IFCs as a group of meshes called FragmentsGroup that has a property with the applied matrix 🙂
What is the name of this property ?
@sguimmara it's coordinationMatrix. You can check it out in the flatbuffer schema here!
Context
-When the site origin is far far away from the world origin, some discrepancies appear in the 3D geometry (example : https://github.com/IFCjs/web-ifc-three/issues/30). -Thanks to the
COORDINATE_TO_ORIGIN:true
config, a new model's origin is computed (let's call it IFCjs origin), the model is loaded in Three.js with the origin positioned at (0,0,0), and the discrepancies disappeared.Problems
Problem 1
Problem 2
Possible solution to solve 1 & 2
Solving Problem 1
Solving Problem 2
=> Solution