MCPcopy Create free account
hub / github.com/ThatOpen/engine_web-ifc / GetCrossSections3D

Function GetCrossSections3D

src/cpp/test/web-ifc-test.cpp:116–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116std::vector<webifc::geometry::IfcCrossSections> GetCrossSections3D(webifc::parsing::IfcLoader &loader, webifc::geometry::IfcGeometryProcessor &geometryLoader)
117{
118 std::vector<webifc::geometry::IfcCrossSections> crossSections;
119
120 std::vector<uint32_t> typeList;
121 typeList.push_back(webifc::schema::IFCSECTIONEDSOLID);
122 typeList.push_back(webifc::schema::IFCSECTIONEDSURFACE);
123 typeList.push_back(webifc::schema::IFCSECTIONEDSOLIDHORIZONTAL);
124
125 for (auto &type : typeList)
126 {
127
128 auto elements = loader.GetExpressIDsWithType(type);
129
130 for (unsigned int i = 0; i < elements.size(); i++)
131 {
132 auto crossSection = geometryLoader.GetLoader().GetCrossSections3D(elements[i]);
133 crossSections.push_back(crossSection);
134 }
135 }
136
137 bool writeFiles = true;
138
139 if (writeFiles)
140 {
141 DumpCrossSections(crossSections, "CrossSection.obj");
142 }
143
144 return crossSections;
145}
146
147std::string ReadValue(webifc::parsing::IfcLoader &loader, webifc::parsing::IfcTokenType t)
148{

Callers

nothing calls this directly

Calls 4

DumpCrossSectionsFunction · 0.85
GetExpressIDsWithTypeMethod · 0.80
sizeMethod · 0.80
GetCrossSections3DMethod · 0.80

Tested by

no test coverage detected