IfcOpenShell / IfcOpenShell

Open source IFC library and geometry engine
GNU Lesser General Public License v3.0
1.86k stars 730 forks source link

Issue with model conversion with IFCConvert 7 #5186

Open MonishVinceant1506 opened 2 months ago

MonishVinceant1506 commented 2 months ago

Hi Team. When the following model is converted to GLB using IFC convert 7, one of the part shapes is incorrect and it seem to miss a cut. image image

Also, when tried converting it with IFC Convert 6, it is getting converted as expected. Please find the attached files for reference.

Please let us know if there a way to overcome this issue. Models.zip

Regards, Monish

smr02 commented 2 months ago

Have you tried exporting it again from Tekla? It seems to me like the Void is there but not being applied? Moving it makes it appear

https://github.com/user-attachments/assets/6938a3d5-ce77-4e69-9847-d39c79bda77a

MonishVinceant1506 commented 2 months ago

The IFC exported from Tekla is fine as show in the BHIM vision and the GLB converted using IFC Convert 6 is also correct. But this issue is occurring with the GLB converted with IFC Convert 7 as mentioned above.

smr02 commented 2 months ago

Ok, i've looked a bit further into this. I've managed to create a file that seems to be working. The only difference is two IfcDirection. There seems to be some weird rounding error? @Moult, can you make sense of this?

Screenshot from 2024-08-21 23-58-59

Screenshot from 2024-08-21 23-48-24

the original file:

model = ifcopenshell.open('Model.ifc')
opening = model.by_id(552)
pprint( opening.ObjectPlacement.RelativePlacement.get_info() )
{'Axis': #166=IfcDirection((1.32348898008484E-23,-0.,1.)),
 'Location': #6=IfcCartesianPoint((0.,0.,0.)),
 'RefDirection': #167=IfcDirection((1.,0.,-1.32348898008484E-23)),
 'id': 548,
 'type': 'IfcAxis2Placement3D'}

the edited file:

model = ifcopenshell.open('Model_test.ifc')
opening = model.by_id(552)
pprint( opening.ObjectPlacement.RelativePlacement.get_info() )

{'Axis': #166=IfcDirection((-9.90000081522298E-08,7.54979012640431E-08,0.999999999999992)),
 'Location': #6=IfcCartesianPoint((0.,0.,0.)),
 'RefDirection': #167=IfcDirection((0.999999999999992,7.54979012640431E-08,9.90000024522969E-08)),
 'id': 548,
 'type': 'IfcAxis2Placement3D'}

Model_test.ifc.txt Model.ifc.txt