-
Notifications
You must be signed in to change notification settings - Fork 18
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
IVS-99 IFC105 resource entities ... #329
base: development
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, especially the traversal over the full model step :-)
I'm rephrasing out loud, let me know if I miss something.
In Given a traversal over the full model originating from subtypes of IfcRoot,
we start by identifying all the subtypes of IfcRoot (7 entities in the test file). The names function determines the names of all attributes for each of these entities. The list of traversed or visited entities, derived from these attributes and the initial 7 entities, is stored in context.visited_instances.
We then compare the visited instances with the full list of entity instances in the model. For example, in the failing test file, #64=IFCPRODUCTDEFINITIONSHAPE($,$,(#63));
is no longer visited. This is because the removal of IfcSpace results in a missing link between IfcSpace and all the attributes traversed from #64 (and also #46).
Because it's much more efficient to do a 'flood fill' first starting the IfcRoot elements traversing over everything reachable, then trying to reconnect this on an individual instance basis without pre-computation.
-
Should we consider using these functionalities and caching further in the validation service? I feel that (let's see if I can verify this with the metrics we collected) we could save a lot of processing time by saving the entity instances linked to a model in the cache.
-
I've updated the ifcopenshell version, Scott and Rick Brice did some work that were I think not reflected yet and causes some of the tests to fail.
features/IFC105_Resource-entities-need-to-be-referenced-by-rooted-entity.feature
Outdated
Show resolved
Hide resolved
return set() | ||
|
||
visited = set() | ||
def visit(inst, path=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what is path
used? I see it's passed as an argument in he visit
function in
visit(ref, (path or ()) + (inst, attr,))
But not where it's functional, or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. I used it for debugging.
When deleting the Space from the test model to create the fail file at first it didn't cause any issues, basically due to the path of Project -fwd-> RepresentationContext -inv-> Representation. This caused me to revisit the approach to not allow all inverse attributes, but only 1 for now.
…ted-entity.feature Co-authored-by: Geert Hesselink <[email protected]>
From the top of my head I cannot think of cases where it would make a big difference. I thought most rules are fairly 'unary' i.e they only concern the element in question, but not much relational context that could be preprocesed. But you obviously have a better understanding of the full body of rules. |
Still needs some clean-up, readme, comments, etc. But the parts that I wanted to socialize is mostly the given step to do pre-computation that is referenced in the then-step:
Given a traversal over the full model originating from subtypes of IfcRoot
. Because it's much more efficient to do a 'flood fill' first starting the IfcRoot elements traversing over everything reachable, then trying to reconnect this on an individual instance basis without pre-computation.