web-ifc-viewer icon indicating copy to clipboard operation
web-ifc-viewer copied to clipboard

Plan view feature: when loading the second model in the viewer it cut it's plans at the wrong offset

Open Medo-85 opened this issue 3 years ago • 0 comments

Hello each time I load an ifc model in the viewer I use the following method to compute the viewplan with the following method. await this.ifc.ifcViewer?.plans.computeAllPlanViews(modelID); Inside that function which is located at node_modules\web-ifc-viewer\dist\components\display\plans\plan-manager.js You can see that there is a call to const transformHeight = await this.getTransformHeight(modelID); now if you if you do console.log('transformHeight ', transformHeight); you will find that it is different if you load your model as the second model which result that the all view plans for that model that was loaded as the second model cuts the plans at the wrong offset because transformHeight is the wrong value.

IFC models I tested on was the following https://github.com/IFCjs/test-ifc-files/blob/main/Revit/rac_basic_sample_project.ifc and https://github.com/IFCjs/test-ifc-files/blob/main/Revit/rac_advanced_sample_project.ifc

Medo-85 avatar May 10 '22 08:05 Medo-85