Open Manriss opened 2 years ago
Hi, we face the same issue. We are trying to fix it out by this: var ifcCamera= viewer.context.getIfcCamera(); //children[0] is mesh if one model is connected (we think) ifcCamera.cameraControls.fitToSphere(scene.children[0].geometry.boundingSphere); ifcCamera.cameraControls.maxDistance = 5000; ifcCamera.cameraControls.minDistance = -5000; ifcCamera.cameraControls.minZoom = 0.0002;
And it works on some CIVIL models, that are not too large (we have some, that are 30 square kilometres wide).
If model is too large we are dealing with occlusion culling - that means model is in scene, but too far to view it by camera.
https://stackoverflow.com/questions/59727192/threejs-disable-frustum-culling-for-some-objects
Even if I set all meshes to .frustumCulled = false (even scene).
function listChildren(children) { let child; for (let i = 0; i < children.length; i++) { child = children[i]; // console.log(child.frustumCulled); child.frustumCulled = false; // console.log(child); // Calls this function again if the child has children if (child.children && child.children.length > 0) { listChildren(child.children); } // Logs if this child last in recursion else { console.log('Reached bottom with: ', child); } } }
Hey, this is already solved. We'll publish a new version today!
Hi, I have been trying to load several IFC (2x3 and 4) models generated from Civil3D, all of then are far away from origin so I am using:
but it doesn´t matter, geometry is shown distorted:
Civil3D always locate IFCSITE at 0,0,0 and uses the real world coordinates at every element:
Elements geometry with very large coordinates:
Not sure if it is an issue or a bad practice from Autodesk... Does COORDINATE_TO_ORIGIN uses IFCSITE or IFCMAPCONVERSION to relocate the model? Please could you clarify what is the theory behind it? I have read this issue https://github.com/tomvandig/web-ifc/issues/84 but it is not clear for me what have been done at the end here it is one of the IFC files in a ZIP. T15C500060-202111111-VIA-MX-00006_Modelo_via_2x3_C3D_clean.zip Thank you very much and congratulations for your great work