Machine readable BIM requirements

edited August 6 in General

What the best way to describe requirements in a machine readable way? For example describing LOD requirements and valid syntax / properties.
I'm looking for ways to describe requirements against this danish LOD/LOI standard (translated to english) https://www.dikon.info/download/specification-of-building-parts_en_v-3/

«1

Comments

  • You need IDM Toolkit/Configurator or something like that (bSI works on it)
    See this: http://big.yonsei.ac.kr/xppm

    duncan
  • Brilliant @ReD_CoDE that's just what I was looking for.

  • @duncan that is what an MVD (Model View Definition - a definition of what should be included in a model) was designed for. However, the devil is in the details. For this reason, at work we've translated exchange requirements into the MicroMVDs that I've half documented in the wiki (they read like English, but are machine readable). It has been very successful - with both technical and non-technical (people who don't know anything about IFC and don't use BIM software) able to appreciate. I described a bit of it here. The academic paper here also justifies why MVDs are not currently capable. The four main points are that:

    1. Are highly bespoke, leading to a lack of implementations
    2. Have a lot of dialects due to an ambiguous specification, leading to unreliable execution
    3. Inefficient to describe exchange requirements (a unit testing approach results in an average of 10% of the size of an mvdXML definition)
    4. There are certain exchange requirements which simply cannot be described in mvdXML

    Tools like the one @ReD_CoDE has pointed to help generate mvdXML - the machine readable format for an MVD.

  • @Moult MicroMVDs are nothing new, and even IDM Toolkit is developed to solve these kinds of issues and many other issues too
    When ISO19650 came, IFC was not (and still is not) ready for that, and IDM Toolkit is the attempt to solve the issues, and introduce new IDM which will come 2021
    However, some from bSI built it as commercial solutions
    The approach you follow has some advantages as well as disadvantages, however, it's invaluable too me
    And in the end, the day I decide to build IfcXtreme, all of those solutions will destroy, including what you purpose

  • @ReD_CoDE thanks for your comment. You might want to check the dictionary definition of invaluable. I'm guessing you probably mean 'not valuable to me' since that's usually what you write. 'Invaluable', to the great frustration of many with English as a second language, means the opposite. I have no idea how the English language did something so stupid - but it happened.
    https://www.merriam-webster.com/dictionary/invaluable

  • @duncan thanks, at first many confuse, the first time I heard "invaluable" I thought it's negative too, however, soon realized that it has an extremely positive meaning:

    Invaluable: /ɪnˈvaljʊ(ə)b(ə)l/
    adjective
    extremely useful; indispensable.
    "an invaluable source of information"
    
  • tried to run BIM-tester. At the moment my blender is broken :-( tried to download BIM-tester from the BlenderBIM page but this does not run on my system either ...
    [6224] Error loading Python lib '/tmp/_MEIsfJQav/libpython3.7m.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: versionGLIBC_2.29' not found (required by /tmp/_MEIsfJQav/libpython3.7m.so.1.0)
    `
    How do I compile BIM-tester myself? Or is it a simple python module?

    cheers bernd

  • I've now organised pages about MicroMVDs into one category
    https://wiki.osarch.org/index.php?title=Category:MicroMVD

  • @bernd BIMTester should be run from Blender - the one on the website's download page is extremely outdated and should not be used. I'll update the downloads page to prevent confusing others, sorry. This page has instructions: https://wiki.osarch.org/index.php?title=Using_MicroMVDs_for_exchange_requirements

  • @duncan said:
    I've now organised pages about MicroMVDs into one category
    https://wiki.osarch.org/index.php?title=Category:MicroMVD

    great

  • edited August 25

    @Moult said:
    @bernd BIMTester should be run from Blender - the one on the website's download page is extremely outdated and should not be used. I'll update the downloads page to prevent confusing others, sorry. This page has instructions: https://wiki.osarch.org/index.php?title=Using_MicroMVDs_for_exchange_requirements

    How about the python module from ifcopenshell? AFAIKS I could run the method run_tests from bimtester module in ifcopenshell too?

    https://github.com/IfcOpenShell/IfcOpenShell/blob/d0c207f6b90877ee9f4a04434ac712e4f3867f6e/src/ifcbimtester/bimtester.py#L33

    but ist it installed somewhere? How do I import this module?

  • OK importing is easy by the use of sys.path.append() the time beeing, but how to run bimtester methods standalone with python directly?

  • It runs from blender :-) great stuff. I need to play with this ... But still I would like to know how to run it from python.

  • edited August 25

    about MicroMVD for element classes ... https://wiki.osarch.org/index.php?title=Element_classes_MicroMVD

    I would like to check if all IfcSpace in the ifc fit the following requirements:

    • the guid does not matter, it must just be provided for each IfcSpace
    • the Name attribute of the IfcSpace entity must be provided for each IfcSpace
    • the LongName attribute of the IfcSpace entity must be provided for each IfcSpace
    • the pset Pset_SpaceCoveringRequirements must be provided for each IfcSpace
    • the attribut FloorCovering in pset Pset_SpaceCoveringRequirements must be provided for each IfcSpace

    that would be a start ...

    ATM I only found how to check for some attributes and properties of a special guid entity in MicroMVD

  • @bernd You can run it standalone python bimtester.py ...

    A new MicroMVD statement needs to be defined. It should be very fast to write.

  • and the ifc file? how to define the ifc file to take for bimtester?

  • edited August 25

    @Moult said:
    A new MicroMVD statement needs to be defined. It should be very fast to write.

    would you help to start ? May be only with this:

    _the Name attribute of each IfcSpace entity must be provided _

  • edited August 25

    @Moult said:
    @bernd You can run it standalone python bimtester.py ...

    works great. How to create the html files from json output? adding -r does not work

  • edited August 25

    for some reasons my *.feature files are copied into soruce tree of ifcopenshell and sometimes deleted in its origin ... there are happen some strange os copy and remove actions in bimtester if run in python or as python method

  • all this seam only to run if the *.feature file will be copied into the source tree of bimtester.py inside the feature directory over there ... ?
    Actually this is what bimtester does and calls behave with this directory

  • if I comment this line the reports in html are created with latest master ifcopenshell too. https://github.com/IfcOpenShell/IfcOpenShell/blob/c872ee8844327987dc2331e30b9e08f8b87124f1/src/ifcbimtester/bimtester.py#L119

    Might BlenderBIM not have latest master bimtester script?

  • Sorry - I haven't had the time yet to look at your issue.

    @Moult said:
    @bernd BIMTester should be run from Blender - the one on the website's download page is extremely outdated and should not be used. I'll update the downloads page to prevent confusing others, sorry.

    The downloads page has now been updated.

  • edited September 3

    bringing this up once again ...

    AFAIKT bimtester is not installed if run make install for ifcopenshell. Would you confirm this?

    I tried to use the bimtester from source to import and run ...
    This is what I came up with.

    # Copy the feature files inside the feature directory in ifcopenshell source!
    from behave.__main__ import main as behave_main
    args = ['/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-official/ifcos/src/ifcbimtester/features', '--format', 'json.pretty', '--outfile', 'report/report.json']
    behave_main(args)
    
    import sys
    sys.path.append("/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-official/ifcos/src/ifcbimtester/")
    import bimtester
    bimtester.generate_report()
    

    very cumbersome IMHO

  • edited September 3

    Correct, IfcOpenShell does not package BIMTester, IfcClash, IfcDiff, etc.

    Couldn't you just run bimtester.run_tests(...)? instead of the first three lines of code?

  • edited September 4

    @Moult said:
    Couldn't you just run bimtester.run_tests(...)? instead of the first three lines of code?

    No not really, give it a try. It does really strange file copy stuff with the feature files. To fix it I would have needed to change all the method, but than for sure it would not run in Blender anymor :-) Thus I ask here.

    bernd

  • edited September 28

    found the problem, one has to change the directory from the python console run bimtester and change it back.

    path_to_bimtester_module = "/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-official/ifcos/src/ifcbimtester/"
    path_to_ifc_and_featurefiles = "/home/hugo/Desktop/zeug/ifcos_bimtester/bimtester/myrun/"
    
    import importlib
    import os
    import sys
    import webbrowser
    sys.path.append(path_to_bimtester_module)
    import bimtester
    importlib.reload(bimtester)
    
    cwd = os.getcwd()
    os.chdir(path_to_ifc_and_featurefiles)
    bimtester.run_tests({'feature': os.path.join(path_to_ifc_and_featurefiles, "01_proj.feature"), 'advanced_arguments': None, 'console': False})
    bimtester.generate_report()
    bimtester.run_tests({'feature': os.path.join(path_to_ifc_and_featurefiles, "02_elem.feature"), 'advanced_arguments': None, 'console': False})
    bimtester.generate_report()
    os.chdir(cwd)
    
    webbrowser.open(os.path.join(path_to_ifc_and_featurefiles, "report", "01_proj.feature" + ".html"))
    webbrowser.open(os.path.join(path_to_ifc_and_featurefiles, "report", "02_elem.feature" + ".html"))
    
  • Still ...
    https://github.com/IfcOpenShell/IfcOpenShell/blob/b4f4d9b3c5f495943d26462cf7b052b57e53b608/src/ifcbimtester/bimtester.py#L53-L57
    copies the feature file inside the directory of the bimtester module. Why is it needed to copy data into the code directory. I do not understand this?
    If the module will be installed on /usr/local and the user has not write access all bimtester does not work.

  • May be my question is wrong ... Just found this only happens if bimtester is not installed with pyinstaller? https://github.com/IfcOpenShell/IfcOpenShell/blob/b4f4d9b3c5f495943d26462cf7b052b57e53b608/src/ifcbimtester/bimtester.py#L22-L26 What the hell is pyinstaller?
    How about to add some standard tmp directory here made with tmpdir module?

    brunopostle
  • What the hell is pyinstaller?

    :D :D pyinstaller is a package that allows creating a proper executable of a python program. This would happen if you run the command in L3 or L5. I guess this statement allows to run bimtester both to create the exe or as a module, but not sure about it.

Sign In or Register to comment.