Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: IFC files with spatial reference systems (and/or georeferenced) #495

Closed
onderilkesever opened this issue Sep 4, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@onderilkesever
Copy link

What happened?

Hi,
I am using the library to convert an IFC file which has a spatial reference system & georeferenced to fragments group. The resulting fragments group seems to be appearing at the correct place but with the wrong orientation. But I cannot find any documentation regarding this support. So I wonder, is this a bug that supposed to be working? Can you please share what is coming from the library and what is not so that we can understand what we should be doing to support IFC files with spatial reference systems and/or georeferenced?
Thanks

Version

0.0.56

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

Anything else?

No response

@onderilkesever onderilkesever added the bug Something isn't working label Sep 4, 2024
@beachtom
Copy link
Contributor

beachtom commented Sep 5, 2024

Hi - I don't think we actually do any georeferencing in this library itself. It is possibly done by one of the tools that reads the coordinates web-ifc produces.

Does the model look ok when viewed in this viewer?

https://thatopen.github.io/engine_web-ifc/demo/

I.e. does what is the wrong way around look the right way around

@onderilkesever
Copy link
Author

onderilkesever commented Sep 5, 2024

Hi @beachtom thanks for the response.
The model looks fine when viewed on that viewer.
The reason why I was under the assumption that library was doing something was because of the fact that I see my model in different location when I convert my two IFC's to FragmentsGroups; one georeferenced one not, but besides they are exactly same. But it can be as you mentioned, because I am not directly using this library but via engine_components library. Maybe there is something on top happening. I wonder are you aware of anything there?
I will share you my files for reference if you would like to try out yourself;
Georef -> https://drive.google.com/file/d/1R-mR17RH20AJ-2E6djFOUUxg9THLSPui/view?usp=drive_link
Without georef -> https://drive.google.com/file/d/13QEY3arAjrYe49Wfp5P6uGv5nQrIstlM/view?usp=sharing
Thanks for your support here.

@beachtom
Copy link
Contributor

Sorry I did not get a notification that you had replied from github!

I only really am involved in this library so i can't really help - but I will transfer this to components and @agviegas may well be able to assist

@beachtom beachtom transferred this issue from ThatOpen/engine_web-ifc Sep 12, 2024
@agviegas
Copy link
Contributor

Hey @onderilkesever can you provide a small reproducible example / snippet of how you are loading the IFC, as well as a screenshot with the expected result vs what you get? Thanks!

@onderilkesever
Copy link
Author

Hi @agviegas & @beachtom,
I created one small reproducible example that hopefully will help us. Here is the small project -> https://drive.google.com/file/d/1A6CWnooy9Yp_eVC9H3nNO_V8UU75umT6/view?usp=sharing
The imports you see on the file are referring two files that I already shared above

import ifcPath from './assets/HQ.ifc';
import ifcPath2 from './assets/HQ_georeferenced.ifc';

Georef -> https://drive.google.com/file/d/1R-mR17RH20AJ-2E6djFOUUxg9THLSPui/view?usp=drive_link
Without georef -> https://drive.google.com/file/d/13QEY3arAjrYe49Wfp5P6uGv5nQrIstlM/view?usp=sharing

Those two files are basically the same, but their only difference is georeferencing information(IfcProjectedCrs & IfcProjectedCrs).

Try loading one or another by commenting out either lines 50 OR 51. You will realise one of the models will not appear on scene origin. Can you please help me understand which library is causing this difference and how?
I am looking forward to hearing back.
Thanks!

@agviegas
Copy link
Contributor

Hey @onderilkesever I think we alredy discussed this here. By default, web-ifc (our core IFC library) positions the model according to the IFC spatial structure. When using COORDINATE_TO_ORIGIN, the library takes the first vertex of the first geometry that it finds and brings it to the origin (0, 0, 0) to prevent nummerical stability issues. This generates a coordinationMatrix that you can use to align multiple models together. Of course, if COORDINATE_TO_ORIGIN=false, then models that were aligned in the authoring app and correctly exported should be aligned automatically.

As for this specific case, I believe the cause behind the difference in the rotation is the orientation of the IFCGEOMETRICREPRESENTATIONCONTEXT, which you can see in the screenshot below.

image

Closing this as I believe the library is working as expected, but feel free to ping me and I'll be happy to solve any remaining questions/doubts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants