-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.cpp
More file actions
60 lines (36 loc) · 1.46 KB
/
test.cpp
File metadata and controls
60 lines (36 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#define IfcSchema Ifc4
#include <iostream>
#include <string>
#include <ifcparse/IfcFile.h>
#include <ifcparse/Ifc4.h>
#include <ifcparse/IfcSchema.h>
int main(){
IfcParse::IfcFile file("archivo.ifc");
IfcSchema::IfcWindow::list::ptr windows = file.instances_by_type<IfcSchema::IfcWindow>();
IfcSchema::IfcWall::list::ptr walls = file.instances_by_type<IfcSchema::IfcWall>();
IfcSchema::IfcDoor::list::ptr doors = file.instances_by_type<IfcSchema::IfcDoor>();
for (IfcSchema::IfcWindow::list::it it = windows->begin(); it != windows->end(); ++it) {
IfcSchema::IfcObjectPlacement position;
const IfcSchema::IfcWindow* w = *it;
const IfcSchema::IfcWindow* window;
if ((window = w->as<IfcSchema::IfcWindow>()) != 0) {
position = window->ObjectPlacement();
}
}
for (IfcSchema::IfcWall::list::it it = walls->begin(); it != walls->end(); ++it) {
IfcSchema::IfcObjectPlacement position;
const IfcSchema::IfcWall* w = *it;
const IfcSchema::IfcWall* wall;
if ((wall = w->as<IfcSchema::IfcWall>()) != 0) {
position = wall->ObjectPlacement();
}
}
for (IfcSchema::IfcDoor::list::it it = doors->begin(); it != doors->end(); ++it) {
IfcSchema::IfcObjectPlacement position;
const IfcSchema::IfcDoor* w = *it;
const IfcSchema::IfcDoor* door;
if ((door = w->as<IfcSchema::IfcDoor>()) != 0) {
position = door->ObjectPlacement();
}
}
}