Skip to content
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

Exception using IFC4.3ADD2 Bridge #501

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ehtick
Copy link

@ehtick ehtick commented Oct 9, 2024

need to check it is available in the tree, with ifc 4.3Add2 they can exist only in the root.
if (localPlacement.PlacementRelTo != null && Nodes.ContainsKey(localPlacement.PlacementRelTo.EntityLabel)) //resolve parent

in IFC4.3ADD2 samples this gives exception if no check on dictionary

@andyward andyward requested a review from Ibrahim5aad October 10, 2024 08:49
Copy link
Member

@Ibrahim5aad Ibrahim5aad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would consider this fix just a way around the fundemental issue that causes the exception, which is that the linear placements are not processed into the placements tree.

So if a local placment has a linear placement as PlacementRelTo it will throw exception. But it should be addressed with our IFC4x3 work as we now support processing of linear placements. (prerelease package: https://www.nuget.org/packages/Xbim.Geometry.Engine.Interop/6.1.801-netcore)

@ehtick
Copy link
Author

ehtick commented Jan 7, 2025

I would consider this fix just a way around the fundemental issue that causes the exception, which is that the linear placements are not processed into the placements tree.

So if a local placment has a linear placement as PlacementRelTo it will throw exception. But it should be addressed with our IFC4x3 work as we now support processing of linear placements. (prerelease package: https://www.nuget.org/packages/Xbim.Geometry.Engine.Interop/6.1.801-netcore)

The code is a simple check on null pointers, often ifc models are not correct and can lead to exceptions.
Better is to have a kind of error log or validation on the model.

Will try the new engine on ifc 4.3 models to see if there are any failures.

@Ibrahim5aad
Copy link
Member

Ibrahim5aad commented Jan 7, 2025

I would consider this fix just a way around the fundemental issue that causes the exception, which is that the linear placements are not processed into the placements tree.
So if a local placment has a linear placement as PlacementRelTo it will throw exception. But it should be addressed with our IFC4x3 work as we now support processing of linear placements. (prerelease package: https://www.nuget.org/packages/Xbim.Geometry.Engine.Interop/6.1.801-netcore)

The code is a simple check on null pointers, often ifc models are not correct and can lead to exceptions. Better is to have a kind of error log or validation on the model.

Will try the new engine on ifc 4.3 models to see if there are any failures.

I got your point (There is already a PR that tries to address this with extra logging), I was just making a point in the scope of this PR which is IFC4.3ADD2 placements; in which I would still assume that the fundemental issue was the unprocessed linear placements.

I would also avoid updating packages as it is out of scope of the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants