small fix and mod in ifc2ca

This commit is contained in:
Jesusbill
2021-03-19 23:39:25 +01:00
parent 39c8c8db37
commit ca59b3220b
3 changed files with 5 additions and 13 deletions
+5 -3
View File
@@ -1,6 +1,7 @@
import json
import ifcopenshell
import os
from datetime import datetime
class CA2IFC:
@@ -317,7 +318,8 @@ class CA2IFC:
)
p_o = self.f.createIfcPersonAndOrganization(person, organization)
application = self.f.createIfcApplication(organization, "v0.0.x", "IFC2CA", "IFC2CA")
ownerHistory = self.f.createIfcOwnerHistory(p_o, application, "READWRITE", None, None, p_o, application)
timestamp = int(datetime.now().timestamp())
ownerHistory = self.f.createIfcOwnerHistory(p_o, application, "READWRITE", None, None, None, None, timestamp)
return ownerHistory
@@ -497,8 +499,8 @@ class CA2IFC:
if __name__ == "__main__":
inputFilename = "structure_01.json"
outputFilename = "structure_01.ifc"
inputFilename = "grid_of_beams.json"
outputFilename = "grid_of_beams.ifc"
ca2ifc = CA2IFC(inputFilename, outputFilename)
ca2ifc.convert()
-5
View File
@@ -257,11 +257,6 @@ class MODEL:
init_time += elapsed_time
print("Building Geometry Defined in %g sec" % (elapsed_time))
if len([e for e in elements if e["geometryType"] == "line"]) > 0:
buildingShapeType = "EDGE"
if len([e for e in elements if e["geometryType"] == "surface"]) > 0:
buildingShapeType = "FACE"
# Define and add groups for all curve and surface members
if len([e for e in elements if e["geometryType"] == "line"]) > 0:
# Make compound of requested group
-5
View File
@@ -208,11 +208,6 @@ class MODEL:
init_time += elapsed_time
print("Building Geometry Defined in %g sec" % (elapsed_time))
if len([e for e in elements if e["geometryType"] == "line"]) > 0:
buildingShapeType = "EDGE"
if len([e for e in elements if e["geometryType"] == "surface"]) > 0:
buildingShapeType = "FACE"
# Define and add groups for all curve, surface and rigid members
if len([e for e in elements if e["geometryType"] == "line"]) > 0:
# Make compound of requested group