Replies: 2 comments 3 replies
-
I haven't ran the IDS myself, if you can share a model that might help. But I do see this:
Which relates this line comment in the code: # Usually, we rely on an entity applicability to give us our first
# shortlist of elements, as it's the most efficient way to filter
# elements. If this does not exist, then we have no choice but to
# check everything. https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifctester/ifctester/ids.py#L206-L212 So yes, your IDS will check quite a bit slower than typical IDS'es because we have no efficient mechanism implemented to filter out the relevant instances. But it is possible to find the entities that carry a certain attribute by which we could apply the same pre-filtering we have with entity facets. See below: import ifcopenshell
w = ifcopenshell.ifcopenshell_wrapper
s = w.schema_by_name('IFC4')
def get_entities_with_attribute(name)
for ent in s.entities():
if any(a.name() == name for a in ent.attributes()):
yield ent.name() Are you interested perhaps in tying these two things together in ids.py, with the help from the community if needed? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I am trying to create an IDS in order to explain and ease data validation for my model.
It's seems quite slow.
I have a PBS (a classification) in some parameters, with a hierachy.
I have a huge excel file, that explain this hierachy, the IDS aim to translate that PBS in a file that can control it's application.
Explanation of the PBS
Domaine = GXX (G11, G12, etc...)
Specialite = It depends of the "Domaine".
G14-600 is a valid value and G14-599 is invalid, because it's not in my main Excel.
Domaine and Specialite are linked by my main Excel file, but i have two parameters.
Building my IDS
First Specification
Do you have a domaine ? If not, i will not try to test further.
My applicability, is based on tag. In that way, i can only select, IfcElement.
G11 Specification
If you have G14, you are only allowed to have an enumeration in the Specialite
...
...
G99 Specification
If you have G99, you are only allowed to have an enumeration in the Specialite
My question:
It seems that my script is slow and i would like to understand if it's a bad creation of the IDS or a normal way of working.
It tooks 19 seconds to check.
It's only a small part of my check (G1X, not the whole)
It's my smallest model (10Mo), and 820 objects to check.
I put my IDS here.
SampleIDS.zip
My script is quite easy.
Thanks for you light !
And thank you for your amazing IfcOpenShell
Beta Was this translation helpful? Give feedback.
All reactions