mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
small fix and mod in ifc2ca
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user