MCPcopy Create free account
hub / github.com/assimp/assimp / ProcessPolyloop

Function ProcessPolyloop

code/AssetLib/IFC/IFCGeometry.cpp:59–81  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

57
58// ------------------------------------------------------------------------------------------------
59bool ProcessPolyloop(const Schema_2x3::IfcPolyLoop& loop, TempMesh& meshout, ConversionData& /*conv*/) {
60 size_t cnt = 0;
61 for(const Schema_2x3::IfcCartesianPoint& c : loop.Polygon) {
62 IfcVector3 tmp;
63 ConvertCartesianPoint(tmp,c);
64
65 meshout.mVerts.push_back(tmp);
66 ++cnt;
67 }
68
69 meshout.mVertcnt.push_back(static_cast<unsigned int>(cnt));
70
71 // zero- or one- vertex polyloops simply ignored
72 if (meshout.mVertcnt.back() > 1) {
73 return true;
74 }
75
76 if (meshout.mVertcnt.back()==1) {
77 meshout.mVertcnt.pop_back();
78 meshout.mVerts.pop_back();
79 }
80 return false;
81}
82
83// ------------------------------------------------------------------------------------------------
84void ProcessPolygonBoundaries(TempMesh& result, const TempMesh& inmesh, size_t master_bounds = (size_t)-1) {

Callers 1

ProcessConnectedFaceSetFunction · 0.85

Calls 2

ConvertCartesianPointFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected