You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lets say I have an IFC representing 3 IFCDoors, each of those IFCDoor share the same visual representation in the viewer and in the .ifc file but at a different location.
Is it possible that the loader identify that there is only one representation so it creates only one ItemShapeDataOCC that keeps being reused by the RepresentationDataOCC and the ProductShapeDataOCC ?
From what I can see the converter creates a new ItemShapeDataOCC for each ProductShapeDataOCC which is not very efficient if the geometry is repeating a lot throughout the model.
It would indeed reduce memory and loading time if the ItemShape would be created only once for IfcRepresentationItems with the same ID.
But the problem is, that these items can be a part of an IfcMappedItem, with a local transformation. That transformation needs to be applied to the (carve or OCC) mesh of the item, because in the end and also before all boolean operations, the geometry needs to be in global coordinates.
So at some point, each item needs to be an actual copy of the geometry with all transformations multiplied.
In a scenegraph, such copies can be avoided with transform nodes, but Carve and OCC need actual copies of the mesh with transformations applied.
If you find a solution to avoid that, feel free to share it here :)
Thank you for your quick and very informative answer,
I am not sure to understand what the IfcMappedItem is here for, any clarification would be appreciated.
If you represent the scene as a flat list of mesh I agree, applying the transformation to the geometry directly is good approach but as you said in a scenegraph the transformations can be applied to the nodes instead of the geometry.
Fortunately OCC have the capability to do that using the XDE system (also referred has XCAF) this system allows you to define reference (the actual geometry) and instances that refers to the reference geometry with a different transformation. such a scene can be built under an XCAF document which is actually what I'm trying to do here.
Not sure to know what Carve is and provide compare to OCC.
Lets say I have an IFC representing 3 IFCDoors, each of those IFCDoor share the same visual representation in the viewer and in the .ifc file but at a different location.
Is it possible that the loader identify that there is only one representation so it creates only one ItemShapeDataOCC that keeps being reused by the RepresentationDataOCC and the ProductShapeDataOCC ?
From what I can see the converter creates a new ItemShapeDataOCC for each ProductShapeDataOCC which is not very efficient if the geometry is repeating a lot throughout the model.
here is how I load and convert the ifc file:
`
shared_ptr ifc_model(new BuildingModel());
`
Best regards,
JB
The text was updated successfully, but these errors were encountered: