OSArch Community

Machine readable BIM requirements

  1. M

    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?

  2. B

    @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

  3. B

    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"))
    
  4. B
  5. B
  6. J

    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.

  7. B

    thanks jesusbill

  8. B

    done another step.

    behave (this is what is behind bimtester) needs a special folder structure. In the directory with the feature files there need to be a directory called step with the step implementation. The problem with bimtester is, the features may change from project to project, whereas the step will not be changed.

    https://aditamasblog.wordpress.com/2018/07/18/setup-pythons-behave-library-to-read-steps-from-subfolders/

    https://www.testaddict.space/understanding-behaves-feature-files-and-step-implementations/

    https://behave.readthedocs.io/en/latest/tutorial.html

  9. B

    my version of bimtester:

    https://gist.github.com/berndhahnebach/2774f553643c275f8a8e912a426e413d

    It is done the other way around. features are NOT copied in ifcopenshell source code but steps are copied to the features and deleted after the run. IMHO a much cleaner way to do it and it would work if bimtester is installed in a write protected directory.

  10. B

    I plan to make some small FreeCAD workbench out of bimtester. In there I will propose another way of file copy. The ifc, the feature files and the step files will be copied into tmp. In there the behave tests will be run thus the report will be saved in tmp as well. The report than will be opened in webbrowser.

  11. B

    @Moult

    I run into trouble with bimtester in the regard of the purging. I did wrote my own run_test method (this is very good news since I will start using bimtester at work). I saw you did wrote a purging class which does some replacement in the feature files. Would you give some informations what is this about.

    cheers bernd

  12. M

    @bernd the purging function detects if there are any tests which mention an IFC GlobalId, and if the GlobalId doesn't exist in the active IFC file, it simply removes the test. This is to allow for IFC updates where people delete objects.

  13. B

    thanks for the information.

    Two problems resist:

    • if I make changes to the step files and include some prints for debugging, nothing is printed

    • if I run bimtester from FreeCAD twice I run into a behave.step_registry.AmbiguousStep failure see https://github.com/behave/behave/issues/871 . Means I have to restart FreeCAD for a second ifc test. Have you had this problem?

  14. B
  15. S

    Why not try Ontology? IFCOWL is so smooth

  16. B

    @shanmama said:

    Why not try Ontology? IFCOWL is so smooth

    To be honest I have no idea how this ifcowl works ... Not much around on the web, which does describe it or give some examples ...

  17. R

    @shanmama RDF/OWL is not smooth, because it's NoSQL, but could be useful, especially when it's a trend nowadays and many like zombies want it

  18. S

    @ReD_CoDE said:

    @shanmama RDF/OWL is not smooth, because it's NoSQL, but could be useful, especially when it's a trend nowadays and many like zombies want it

    Yes. I try to manage it based on MongoDB

  1. Page 1
  2. 2

Login or Register to reply.