Hello everyone,
I was interested in using IfcClash, but being new to relatively Python I'm not sure how to do that. How does it relate to IfcOpenShell in this repository? Does it get compiled with it or is it a separate tool?
Any help on this would be really appreciated :)
ifcclash uses IfcOpenShell, as well as another library called fcl. At the moment, the easiest way to use it is through the BlenderBIM Add-on UI. This might help: https://www.youtube.com/watch?v=99i4leHzUC4
If you're interested in running it via Python, or via CLI, indeed, we need to write some documentation for it! Ping @fbpyr ... keen? :)
@Moult sure, 馃檪
@harrycollin here is how it could be done in Python scripts within blenderBIM (which I also used for a BB addon) :
https://wiki.osarch.org/index.php?title=BlenderBIM_Add-on_code_examples#Clash_Detection
@Moult let me know, if it should move somewhere else or need to be linked differently.
@Moult @fbpyr Thank you! I will check this out.
If we could write some documentation on how to use it outside of Blender it would be great! As @Moult mentioned - even running it via CLI / Python. I can see in the example that Blender's APIs (bby and bmesh) are used throughout - does IfcOpenShell have what it takes to run this without Blender? I understand this was initially written to work with Blender so I apologise if it's unreasonable.
@harrycollin ah those examples that @fbpyr linked to are a little misleading - they are examples specifically on how to use IfcClash with Blender objects. However, if you are using IfcClash just with IFC, then no need to use any Blender. IfcClash by itself has no dependency on Blender.
@fbpyr I recently wrote some docs on IfcPatch that look like https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.6.0/src/ifcpatch - would you be interested in writing the same as a README.md for IfcClash?
@Moult is there any news on this? :)
@harrycollin sorry, no - let me ping @fbpyr to see if he's interested. Otherwise, I'll make some time and write some initial docs.
@Moult Thank you! :)
Hey @Moult & @fbpyr great work with this and a brilliant suggestion @harrycollin. I'm looking forward to seeing an example/ documentation of the IfcClash simply with IFC with no attachments to Blender 馃殌
So I figured out how to run IfcClash from the CLI. I didn't previously see the block of code right at the bottom of the IfcClash.py which allowed it to be easily run from a CLI. I did have some trouble getting everything set up though. I'm on Windows 10 and python-fcl (one of the packages used) wasn't playing well and refused to install. I ended up having to use WSL with Ubuntu to install and run the clashing. For those getting started make sure you follow the additional installation instructions for python-fcl here.
@harrycollin glad you cracked it! In fact, would you like to write some docs about it?
By the way, the BlenderBIM Add-on actually packages all the deps already for you for Python 3.7 (and potentially above - haven't checked), so you can just copy it from the BlenderBIM Add-on download in the lib/site/packages folder.
@Moult I'd be happy to write some initial docs, although it's not straightforward for Windows users. As for the site-packages I didn't think about that. I will give it try on Windows with the existing packages.
I'd still need someone else to make documentation on the clashsets if it's not already written. I managed to get some results but the viewpoints were completely off, not even getting close to the building in some cases. I'm not sure if this due to misuse or something else.
Most helpful comment
@harrycollin sorry, no - let me ping @fbpyr to see if he's interested. Otherwise, I'll make some time and write some initial docs.