yorikvanhavre / BIM_Workbench

A BIM Workbench for FreeCAD
363 stars 77 forks source link

Update BimPreflight.py to allow prebuild version of ifcopenshell #125

Closed rostskadat closed 12 months ago

rostskadat commented 1 year ago

After installing a pre-compiled package of IFCOpenShell-python (according to the documentation available at freecad.org), I was able to do a IFC pre-flight checks.

However I get an error because the version returned by ifcopenshell.version does not have a standard format (x.y.z). It is in fact appended with the git commit id to read something like this v0.7.0-f0e03c79d'.

This PR uses the standard python version package to read the version and in case something a git commit is detected it will try to remove it.

Here are the information about my system:

OS: Ubuntu Core 20 (GNOME)
Word size of FreeCAD: 64-bit
Version: 0.21.1.33668 +26 (Git) Snap 759
Build type: Release
Branch: tag: 0.21.1
Hash: f6708547a9bb3f71a4aaade12109f511a72c207c
Python 3.8.10, Qt 5.15.7, Coin 4.0.0, Vtk 7.1.1, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * Reinforcement
  * Help 1.0.3
  * A2plus 0.4.61
  * Reporting
  * ArchTextures
  * parts_library
  * dodo 1.0.0
  * WebTools 1.0.0
  * BIM 2021.12.0
  * fasteners 0.4.71
  * woodworking 0.21.30486
yorikvanhavre commented 12 months ago

Great! Thanks!!