MCPcopy Create free account
hub / github.com/OpenWebCAD/node-occ / push_normal

Method push_normal

src/Mesh.cc:88–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88uint32_t Mesh::push_normal(const Coord3f& normal) {
89 long hash = hashpoint(normal.x, normal.y, normal.z);
90 auto it = this->_mapNormals.find(hash);
91 if (it == this->_mapNormals.end()) {
92 this->_normals.push_back(normal);
93 uint32_t index = (uint32_t)(this->_normals.size() - 1);
94 this->_mapNormals[hash] = index;
95 return index;
96 }
97 return it->second;
98}
99
100int Mesh::extractFaceMesh(const TopoDS_Face& face, bool qualityNormals)
101{

Callers 1

extractFaceMeshMethod · 0.95

Calls 1

hashpointFunction · 0.85

Tested by

no test coverage detected