IfcClash improvement
Hi,
I would like to improve IfcClash with several functionality, i still don't know where to put it, but at least it will exist somewhere.
Expand number of rule
From now, we have 4 rules with IfcClash. I would like to expand the number of rule, by example add the rule to check if an object is above another one.
Template creation
In order to ease the addition of rule, i will create a template for rule to share the basic tools.
Catalog of rule
I already know that the logic used in rule will be hard to guess, i need to describe every rule, and every hypothesis used in the creation of them.
The catalog will held all information about rules, with small schema, etc..
Rule of Rule
A rule can create a list of object. This list can be used as an entry for another rule, etc, etc..
By example : Check that the wall, close to a bed, as a light on it.
This can be done by fusing two rule together.
- Get list of wall close to a bed
- Use the previous list of wall to check againt light
These combinaison of clash would be used to create complexe rule that exactly fit the issue.
Other functionality to ease the use of Clash
I have several small idea that are described in the github, nothing fancy but it could be usefull.
- Store rule in a json or xml
- Use IDS to select objects
- Exception rule, get a way to treat edge case
- Automate result categorization
- Regroup result of rule
- Group rule in folder
Example
I have a small file with two working example.
Exemple 1: Create a clash with one file, and 1 intersection. => Basic stuff
Exemple 2: Create a rule of rule => The main functionality
Only a few functionality are working right now but the main skeleton is here.
GitHub
I put everything in a github and update it, the main script is in /src. Once i have something working properly and that improve something, i will thing what to do with it.
https://github.com/Elobo68/IfcClash_Plus/blob/main/README.md
Feel free to comment and share your thought !



Comments
Hi everyone,
Slowly but surely i continue my little journey.
I added several functionnality around the rule check.
By grouping object, you create a sets of object. On these set, you can check relative or absolute value of number or quantity.
By example, I must have at least one door intersecting with each space.
By example, I must have at exactly 1 drain below a shower drain.
I have added the "Above Rule". It check if something is above the source object.
This rule detect the top or bottom surface of the object. Then, it check if the source surface is below tolerance of target surface.
This rule can be parametered as TopToTop, TopToBottom, etc...
You can check the code here
https://github.com/JocelinBirling/IfcClash_Plus
Hi,
I am continuing my small journey, with a new update.
1. Create custom OBB Class
This is a customOBB class made with the Bnd_OBB() class from OCC. It will help to modify existing OBB, in order to expand, detach side or top, etc... This new OBB will then create a new space that can clash with objects. The obb is very convienent to modify, and easy enough to apply transformation. I can now have several clash, with very specific case. Because it is using OBB, it's not very precise, but it's very versatile and fast.
2. Add a display function
This function should help to see, what should happen in the rule. It will print OBB Box, where the clash should appear. It will show the object that are. It display a small window to look at the geometry.
3. OBB Top and bottom
This rule will check if something is above or below an object. It will create a new obb in the top (or bottom) of the object and check if something clash with it. It's a little bit different from Above or Below rule, because you can modify the size of the OBB more precisely.
4. OBB Front and Back
This rule will check if something is in front or in the back of the object. It's quite hard to detect what is the front and back. I am using the size of the OBB to detect that. It will be then dependent to each objects. For a door, the front is the wide part. For some other object, it will be the narrow part.
5. Added a few test
I added a few test to get a clearner code.
I will try to deploy it on conda next week, to ease the testing.
https://github.com/JocelinBirling/IfcClash_Plus