XbimWebUI
XbimWebUI copied to clipboard
Rendering issue when moving the model far from the origin
I have transferred the model from (0,0) to (350000, 3000000) according to the actual location of certain building and the geometry got messed up as the photos show. I don't know what is wrong and I have done many trials with the model and the problem gets repeated when the model is in a very far location from the origin.
Model at origin :
Model at the far location:
This is a common issue due to math rounding errors of applying transform matrices on single precision numbers. It is advised that you avoid doing this.
If you are doing this to federate models have a look at what we do in xplorer, there's a class to center the first model on the center of coordinates of the viewer and then adapt the others accordingly, without moving much away from 0,0,0.
I hope this helps.
@CBenghi Thanks so much for your reply To be more clear, I have a model in "Revit" and I am trying to translate the model of building to actual coordinates in real world, when the model at origin and exported IFC file then converted to wexbim and view this file all work fine but after translation model got messed up.
I am really appreciate you help. Thanks.
Any Help with this issue?
Hello, I'm not sure I understand your question. Have you tried changing the adjustwcs option in the createContext function?
On Tue, 18 Feb 2020 at 08:40, Omar Khairy [email protected] wrote:
Any Help with this issue?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xBimTeam/XbimWebUI/issues/279?email_source=notifications&email_token=ABJY7MPOVZWYPVYR6JZNOPDRDOGGVA5CNFSM4KWDXTHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMA5M3Y#issuecomment-587322991, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJY7MP3V2CQTGRD2Z6OF73RDOGGVANCNFSM4KWDXTHA .
Hi @CBenghi, I mean if the model is located at origin or any point near from it and then exported to IFC format and view this file everything work fine but if I locate the model at (350000, 3000000) and do the same step model is messed in viewer as shown below:
Model at origin ( the desired view for model);
Model at (350000, 3000000) (it is messed):
I have read #240 and https://github.com/xBimTeam/XbimGeometry/issues/213 which are related issues but they try solving the problem by translate the model.
Have you tried changing the adjustwcs option in the createContext function?
@CBenghi I appreciate your response.
Yes I have tried to do that but not working for me.
When you say you have moved the model. Have you physically moved it to remote place in the authoring SW, or did you set the local WCS origin to large coordinates? In other words: Does your IFC file contain large coordinates, or is there large displacement stored on the level of IfcBuilding or IfcSite in the placement hierarchy? Is your model using placement hierarchy at all?
I have physically moved it to remote place and my IFC file contains large coordinates
That is generally not the best practise. If your SW allows to define real world coordinates for the project origin it is best to do it that way. It is usually than exported to IFC this way and allows for easier handling of large coordinates.
What do you mean with "SW"? Is there any way to solve this?
Sure, there is always a way. By SW I mean Revit, Bentley, ArchiCAD, Tekla, DDS-CAD and other SW for model authoring. What did you use to move the model?
I hope so, I use Revit
Any help with this issue ?
You can use Project Base Point in Revit to set it's real position and orientation. This will be reflected in the exported IFC file.