I uploaded my IFC version 4 to Autodesk forge and then added my extension, unfortunately, my control panel can not work and connect to my model. Also, I had this problem with the Revit model but solved it with a solution from Mr. Petr Broz.
Please check this (Extension Autodesk Forge: My control panel doesn't connect to the Revit model after adding my own extension to the package).
unfortunately, the solution for the Revit model doesn't work for the IFC4 model. Would you please Guide me on how I can solve it?
I cannot see the full extension code from the thread you pointed out, but this problem should not be related to IFC4.
From your code snippet, I can see that there is a great possibility that the
setTransformation
function would be called before the geometries are loaded completely. Before completely loaded geometries, fragment info like transform matrix, bounding box, and so on would not be completed. Therefore, I would advise you tosetTransformation
function afterAutodesk.Viewing.GEOMETRY_LOADED_EVENT
is triggered to avoid this problem.Or call the async function
viewer.waitForLoadDone()
before callingsetTransformation
function to ensure geometries are loaded completely.