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

Method GetBrep

src/cpp/web-ifc/geometry/IfcGeometryProcessor.cpp:1906–1934  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1904 }
1905
1906 IfcGeometry IfcGeometryProcessor::GetBrep(uint32_t expressID)
1907 {
1908 spdlog::debug("[GetBrep({})]", expressID);
1909 auto lineType = _loader.GetLineType(expressID);
1910 switch (lineType)
1911 {
1912 case schema::IFCCONNECTEDFACESET:
1913 case schema::IFCCLOSEDSHELL:
1914 case schema::IFCOPENSHELL:
1915 {
1916 _loader.MoveToArgumentOffset(expressID, 0);
1917 auto faces = _loader.GetSetArgument();
1918
1919 IfcGeometry geometry;
1920 for (auto &faceToken : faces)
1921 {
1922 uint32_t faceID = _loader.GetRefArgument(faceToken);
1923 AddFaceToGeometry(faceID, geometry);
1924 }
1925
1926 return geometry;
1927 }
1928 default:
1929 spdlog::error("[GetBrep()] unexpected shell type {}", expressID, lineType);
1930 break;
1931 }
1932
1933 return IfcGeometry();
1934 }
1935
1936 void IfcGeometryProcessor::AddFaceToGeometry(uint32_t expressID, IfcGeometry &geometry)
1937 {

Callers

nothing calls this directly

Calls 7

debugFunction · 0.85
errorFunction · 0.85
MoveToArgumentOffsetMethod · 0.80
GetSetArgumentMethod · 0.80
GetRefArgumentMethod · 0.80
IfcGeometryClass · 0.70
GetLineTypeMethod · 0.45

Tested by

no test coverage detected