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

Function GetAllRebars

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

Source from the content-addressed store, hash-verified

302}
303
304std::vector<webifc::geometry::SweptDiskSolid> GetAllRebars(webifc::parsing::IfcLoader &loader, webifc::geometry::IfcGeometryProcessor &geometryLoader)
305{
306 std::vector<webifc::geometry::SweptDiskSolid> reinforcingBars;
307 std::vector<glm::dmat4> reinforcingBarsTransform;
308
309 auto type = webifc::schema::IFCREINFORCINGBAR;
310
311 auto elements = loader.GetExpressIDsWithType(type);
312
313 for (size_t i = 0; i < elements.size(); i++)
314 {
315 auto mesh = geometryLoader.GetFlatMesh(elements[i]);
316
317 for (auto &geom : mesh.geometries)
318 {
319 auto flatGeom = geometryLoader.GetGeometry(geom.geometryExpressID);
320 reinforcingBars.push_back(flatGeom.sweptDiskSolid);
321 reinforcingBarsTransform.push_back(geom.transformation);
322 }
323 }
324
325 return reinforcingBars;
326}
327
328void DumpRefs(std::unordered_map<uint32_t, std::vector<uint32_t>> &refs)
329{

Callers

nothing calls this directly

Calls 4

GetExpressIDsWithTypeMethod · 0.80
sizeMethod · 0.80
GetGeometryMethod · 0.80
GetFlatMeshMethod · 0.45

Tested by

no test coverage detected