Commit 5aafd36e authored by Isaak Lim's avatar Isaak Lim

added a missing topology check from the topology kernel to add_cell

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@241 66977474-1d4b-4f09-8fe9-267525286df2
parent 14d47c24
......@@ -408,9 +408,22 @@ HexahedralMeshTopologyKernel::add_cell(const std::vector<VertexHandle>& _vertice
return InvalidCellHandle;
}
// The halffaces are now guaranteed to form a two-manifold
if(has_face_bottom_up_incidences()) {
for(std::vector<HalfFaceHandle>::const_iterator it = hfs.begin(),
end = hfs.end(); it != end; ++it) {
if(incident_cell(*it) != InvalidCellHandle) {
std::cerr << "Warning: One of the specified half-faces is already incident to another cell!" << std::endl;
return InvalidCellHandle;
}
}
}
}
return TopologyKernel::add_cell(hfs,false);
return TopologyKernel::add_cell(hfs, false);
}
//========================================================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment