GeometryGym / GeometryGymIFC

C# classes to generate and parse OpenBIM IFC files
Other
282 stars 97 forks source link

Missing log features #65

Closed F-Fede closed 1 year ago

F-Fede commented 2 years ago

Hi,

it seems that in the IFC process a logging feature is missing, e.g. in the following section (BaseClassIfc.Extract)

image

Would it be added in the future?

jmirtsch commented 2 years ago

Hi,

This loops simply ensures no "duplicates" are returned. The model traversal can collect the same object through different relationships, so the global id hashset is used to ignore subsequent listing of the same item. There isn't anything to log, just perhaps the code could be commented (or refactored to show intent more obviously).

F-Fede commented 2 years ago

Hi Jon,

thank you very much for your reply.

However, in an actual case we are facing, we receive a file that contains such an error and we would like to receive a log of this kind of skips...

Is it possible?

jmirtsch commented 2 years ago

Can you describe the error in more detail? Some elements have multiple relationships that are traversed. Ie a Door might be contained in a spatial element, but also filling an opening element in a wall. So this globalId check ensure the list is a set, without duplicates. If you are using this method for error checking, we might need to consider if there is an alternative approach.

F-Fede commented 2 years ago

In the attachments you can find a file with a duplication; duplicated items for #15, #1338, #1334, #1342, #5746 are discarded, but no log is given.

_#5921 = IFCRELCONTAINEDINSPATIALSTRUCTURE('3L$Oc2Zsv9UvD3MJIAJJbx', #1, $, $, (#15, #1338, #1334, #1342, #5746), #5754);

5922 = IFCRELCONTAINEDINSPATIALSTRUCTURE('1JxHEZNrr9cgT7$w4tBT5R', #1, $, $, (#15, #1338, #1334, #1342, #5746), #5853);_

OfficeBuilding (EDITED) (1).zip

jmirtsch commented 2 years ago

This data is not schema compliant. If you refer to https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2/HTML/link/ifcrelcontainedinspatialstructure.htm (similar on 2x3 https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ ) states that an element can only be contained in one spatial element. Was the file edited to nominate the multiple containments?

The Geometry Gym IFC toolkit is tolerant of lots of schema non-compliance to increase success of import. So it's not really a good choice to "diagnoze" files, there are other tools and utilities that do a better job of this.

Is that your requirement to detect non compliance?

F-Fede commented 2 years ago

Yes, detecting non compliance is one of the requirements of ours; there are other tools and utilities that do a better job of this: do you know any? Could you please list some of them?

jmirtsch commented 2 years ago

KIT ifc checking tool is one that I've used to improve this toolkit, https://www.iai.kit.edu/english/1302.php IfcDoc has some checking capability. If you have access to Revit, you can link the ifc file and it also produces an adjacent log file that can identify non compliance. I've used each of these in validating IFC generated from the geometry gym toolkit.

F-Fede commented 2 years ago

Thank you very much for your hints!