| 226 | } |
| 227 | |
| 228 | std::vector<webifc::geometry::IfcCrossSections> GetAllCrossSections(uint32_t modelID, uint8_t dimensions) |
| 229 | { |
| 230 | if (!manager.IsModelOpen(modelID)) |
| 231 | return std::vector<webifc::geometry::IfcCrossSections>(); |
| 232 | auto geomLoader = manager.GetGeometryProcessor(modelID); |
| 233 | |
| 234 | std::vector<uint32_t> typeList; |
| 235 | typeList.push_back(webifc::schema::IFCSECTIONEDSOLIDHORIZONTAL); |
| 236 | typeList.push_back(webifc::schema::IFCSECTIONEDSOLID); |
| 237 | typeList.push_back(webifc::schema::IFCSECTIONEDSURFACE); |
| 238 | |
| 239 | std::vector<webifc::geometry::IfcCrossSections> crossSections; |
| 240 | |
| 241 | for (auto &type : typeList) |
| 242 | { |
| 243 | auto elements = manager.GetIfcLoader(modelID)->GetExpressIDsWithType(type); |
| 244 | |
| 245 | for (size_t i = 0; i < elements.size(); i++) |
| 246 | { |
| 247 | webifc::geometry::IfcCrossSections crossSection; |
| 248 | if (dimensions == 2) |
| 249 | crossSection = geomLoader->GetLoader().GetCrossSections2D(elements[i]); |
| 250 | else |
| 251 | crossSection = geomLoader->GetLoader().GetCrossSections3D(elements[i]); |
| 252 | crossSections.push_back(crossSection); |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | return crossSections; |
| 257 | } |
| 258 | |
| 259 | std::vector<webifc::geometry::IfcAlignment> GetAllAlignments(uint32_t modelID) |
| 260 | { |
nothing calls this directly
no test coverage detected