Commit d926ceb2 authored by Mike Kremer's avatar Mike Kremer
Browse files

Compute bottom-up adjacencies even if file has not completely been loaded.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13497 383ad7c9-94d9-4d36-a494-682f7c89f535
parent eeb8e051
......@@ -109,7 +109,7 @@ void FileOpenVolumeMeshPlugin::initializePlugin() {
QString FileOpenVolumeMeshPlugin::getLoadFilters() {
return QString(tr("Polyhedral Volume Mesh files ( *.ovm *.polyvolmesh )"));
return QString(tr("Polyhedral Volume Mesh files ( *.ovm *.polyvolmesh *.tetmesh )"));
}
;
......@@ -202,6 +202,12 @@ int FileOpenVolumeMeshPlugin::loadObject(QString _filename) {
loadMesh((const char*) _filename.toAscii(), *(obj->mesh()), compatibility_mode,
topology_checks, correct_face_order);
// Compute top-down-adjacencies
obj->mesh()->update_adjacencies();
// Compute face normals
obj->mesh()->request_face_normals();
} else {
if(!fileManager_.readFile(_filename.toStdString(), *(obj->mesh()),
topology_checks,true, true)) {
......
......@@ -146,7 +146,7 @@ void FileOpenVolumeMeshPlugin::loadMesh(const char* _filename, MeshT& _mesh, boo
// Read faces and find the respective halffaces
iff >> s;
if( s != "Polyhedra") {
if(s != "Polyhedra") {
std::cerr << "ERROR reading OpenVolumeMesh (Polyhedra Section Failed)\n";
iff.close();
return;
......@@ -258,12 +258,6 @@ void FileOpenVolumeMeshPlugin::loadMesh(const char* _filename, MeshT& _mesh, boo
}
iff.close();
// Compute top-down-adjacencies
_mesh.update_adjacencies();
// Compute face normals
_mesh.request_face_normals();
std::cerr << "######## openvolumemesh info #########\n";
std::cerr << "#vertices: " << _mesh.n_vertices() << std::endl;
std::cerr << "#edges : " << _mesh.n_edges() << std::endl;
......
Supports Markdown
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