MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / P62Ifc

Class P62Ifc

src/ifc4d/ifc4d/p62ifc.py:25–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24
25class P62Ifc:
26 def __init__(self):
27 self.xml = None
28 self.file = None
29 self.work_plan = None
30 self.project = {}
31 self.calendars = {}
32 self.wbs = {}
33 self.root_activites = []
34 self.activities = {}
35 self.relationships = {}
36 self.resources = {}
37 self.output = None
38 self.day_map = {
39 "Monday": 1,
40 "Tuesday": 2,
41 "Wednesday": 3,
42 "Thursday": 4,
43 "Friday": 5,
44 "Saturday": 6,
45 "Sunday": 7,
46 }
47 self.sequence_type_map = {
48 "Start to Start": "START_START",
49 "Start to Finish": "START_FINISH",
50 "Finish to Start": "FINISH_START",
51 "Finish to Finish": "FINISH_FINISH",
52 }
53 self.resource_type_map = {
54 "Labor": "LABOR",
55 "Mat": "MATERIAL",
56 "Equip": "EQUIPMENT",
57 # https://www.primaverascheduling.com/category/primavera-resources/
58 "Nonlabor": "EQUIPMENT",
59 }
60
61 def execute(self):
62 import time
63
64 start = time.time()
65 print("Started")
66 self.parse_xml()
67 settings = {
68 "work_plan": self.work_plan,
69 "project": self.project,
70 "calendars": self.calendars,
71 "wbs": self.wbs,
72 "root_activities": self.root_activites,
73 "activities": self.activities,
74 "relationships": self.relationships,
75 "resources": self.resources,
76 }
77 ifcCreator = ScheduleIfcGenerator(self.file, self.output, settings)
78 end = time.time()
79
80 ifcCreator.create_ifc()
81 end2 = time.time()
82 print("Parsing time is", end - start)

Callers 2

__main__.pyFile · 0.90
_executeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected