-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schema conversion retains entity types unknown in target schema #9
Comments
Good one, these schema converters were never finished. Also some of the code is in the wrong project. |
I found that actually the non-streaming serializer works fine, because of the check whether Of course, still, converters would need to do some cleanup in consequence of omitting those entities. Having schema conversion as an extension point would be great. |
Ah oke, I agree the nicest fix would be in the schema converter. Ideally the conversion would not be fully "automatic" as well, a programmed conversion would for some types make more sense. |
I believe the streaming serializers don't currently use the schema converter. That's another reason why it can't be fixed in the serializer alone. If you factor out schema converters as plugins, then no serializer should bypass the conversion, of course. |
From reading the code in
org.bimserver.schemaconverter.AbstractSchemaConverter
I was expecting that entities of types not contained in the target schema would be omitted from serialization. However, a sample conversion from IFC4 to IFC2x3 revealed that this is not the case. For example, the file IfcDoorType_4.ifc.txt contains an entity of typeIfcDoorType
which was unknown in IFC2x3. The conversion result, IfcDoorType_2x3.ifc.txt, still contains exactly the same number of entities, including theIfcDoorType
entity. Consequently the subsequent checkin of the invalid IFC2x3 file into a new BIMserver project fails.I could not yet trace how these elements end up in the model, but I suspect
org.bimserver.ifc.step.serializer.IfcStepSerializer
to follow some references outside of the filtered model it was given to serialize.Proper schema conversion could help to deal with legacy files when transitioning from IFC2x3 to IFC4, but since in IFC4 some entity types were deleted, this issue would reduce the usefulness of BIMserver in the process.
The text was updated successfully, but these errors were encountered: