{"repo":"opensourceBIM/python-mvdxml","free":true,"listed":false,"github":"https://github.com/opensourceBIM/python-mvdxml","clone":"git clone https://github.com/opensourceBIM/python-mvdxml.git","description":"A mvdXML checker and w3c SPARQL converter, as an IfcOpenShell submodule or stand-alone.","language":"Python","stars":32,"topics":["buildingsmart","mvd","mvdxml","ifc","industryfoundationclasses","linkedbuildingdata","linkeddata","ifcowl","owl","semanticweb"],"license":"LGPL-3.0","category":"workflow-automation","readme_excerpt":"python-mvdxml A mvdXML checker and w3c SPARQL converter, as an IfcOpenShell submodule or stand-alone. WARNING: While this repository has many useful building blocks to build software around mvdXML and IFC, there are many mvdXML dialects and not all variants are likely to be fully supported. Quickstart Extraction Validation py import ifcopenshell from ifcopenshell.mvd import mvd from colorama import Fore from colorama import Style concept roots = list(ifcopenshell.mvd.concept root.parse(MVDXML FILENAME)) file = ifcopenshell.open(IFC FILENAME) tt = 0 # total number of tests ts = 0 # total number of successful tests for concept root in concept roots: print(\"ConceptRoot: \", concept root.entity) for concept in concept root.concepts(): tt = tt + 1 print(\"Concept: \", concept.name) try: if len(concept.template().rules) 1: attribute rules = [] for rule in concept.template().rules: attribute rules.append(rule) rules root = ifcopenshell.mvd.rule(\"EntityRule\", concept root.entity, attribute rules) else: rules root = concept.template().rules[0] ts = ts + 1 finst = 0 #failed instances for inst in file.by type(concept root.entity): try: data = mvd.extract data(rules root, inst) valid, output = mvd.validate data(concept, data) if not valid: finst = finst + 1 print(\"[VALID]\" if valid else Fore.RED +\"[failure]\"+Style.RESET ALL, inst) print(output) except Exception as e: print(Fore.RED+\"EXCEPTION: \", e, Style.RESET ALL,inst) print () print (int(finst), \"out of\", int(len(file.by type(concept roo","default_branch":null,"files":null,"tree":[],"storefront":"/r/opensourceBIM","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/opensourceBIM/python-mvdxml/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}