MeshFlattening: add function to unwrap face

This commit is contained in:
looooo
2017-10-11 23:38:12 +02:00
committed by wmayer
parent 2329ac38e8
commit 76b66159b3
12 changed files with 279 additions and 63 deletions

View File

@@ -169,13 +169,13 @@ FaceUnwrapper::FaceUnwrapper(const TopoDS_Face& face)
}
}
void FaceUnwrapper::findFlatNodes()
void FaceUnwrapper::findFlatNodes(int steps, double val)
{
std::vector<long> fixed_pins; //TODO: INPUT
LscmRelax mesh_flattener(this->xyz_nodes.transpose(), this->tris.transpose(), fixed_pins);
mesh_flattener.lscm();
for (int j=0; j<9; j++)
mesh_flattener.relax(0.9);
for (int j=0; j<steps; j++)
mesh_flattener.relax(0.95);
this->ze_nodes = mesh_flattener.flat_vertices.transpose();
}