Skip to content

Commit

Permalink
Removed obsolete singledoc self test
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Mar 14, 2024
1 parent 0b9d819 commit 5c10b6a
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions ifc_selftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,28 +385,3 @@ def test15_Psets(self):
pset = ifc_psets.add_pset(obj, "Pset_Custom")
ifc_psets.add_property(ifcfile, pset, "MyMessageToTheWorld", "Hello, World!")
self.failUnless(ifc_psets.has_psets(obj), "Psets failed")

def test16_Singledoc(self):
FreeCAD.Console.PrintMessage("16. Single document paradigm...")
doc = FreeCAD.ActiveDocument
doc.addProperty("App::PropertyPythonObject", "IfcFile")
doc.setPropertyStatus("IfcFile", "Transient")
doc.addProperty("App::PropertyFile", "IfcFilePath", "Base")
fp = getIfcFilePath()
doc.IfcFilePath = fp
ifcfile = ifcopenshell.open(fp)
doc.IfcFile = ifcfile
import FreeCADGui

sg = FreeCADGui.getDocument(doc.Name).ActiveView.getSceneGraph()
proj = ifcfile.by_type("IfcProject")[0]
doc.addProperty("App::PropertyInteger", "StepId", "IFC")
doc.StepId = proj.id()
elements = ifc_generator.get_decomposed_elements(proj)
elements = ifc_generator.filter_types(elements)
node = ifc_generator.generate_coin(ifcfile, elements)[0]
sg.addChild(node)
ifc_tools.create_children(doc, ifcfile, recursive=False, assemblies=False)
sg.removeChild(node)
print([obj.Label for obj in doc.Objects])
self.failUnless(len(doc.Objects) == 2, "Singledoc failed")

0 comments on commit 5c10b6a

Please sign in to comment.