Todo

  • singularities
  • extraction
  • (custom) curl removal
  • snapping

Mail from Nicolas Ray

It is not very difficult to constraint vertices. The code of Geogram aready do that for constraining hard edges, but does not expose the possibility to constrain just a vertex.You can try to directly edit “mesh_PGP_2D.cpp” to add your constraints. It actually locks extremities of edges considered as constrained, but you can edit the condition to include the vertices you want.

if(constrain_hard_edges) {
  FOR(c,mesh->facet_corners.nb()) {
    index_t cnstr =
    Internal::get_edge_constraints(mesh, c, B);
    index_t v = mesh->facet_corners.vertex(c);
    // Inverse R, because when the axis turns
    // clockwise, coordinates turn anticlockwise.
    index_t Rcc = Internal::inverse_R(R_fv[c]);
    if(cnstr & Internal::CNSTR_U) {
      if(Rcc == 0 || Rcc == 2) {
        nlLockVariable(4*v);
        nlSetVariable(4*v,1e4);
        nlLockVariable(4*v+1);
        nlSetVariable(4*v+1,0.0);
      } else {
        nlLockVariable(4*v+2);
        nlSetVariable(4*v+2,1e4);
        nlLockVariable(4*v+3);
        nlSetVariable(4*v+3,0.0);
      }
    }
    if(cnstr & Internal::CNSTR_V) {
      if(Rcc == 0 || Rcc == 2) {
        nlLockVariable(4*v+2);
        nlSetVariable(4*v+2,1e4);
        nlLockVariable(4*v+3);
        nlSetVariable(4*v+3,0.0);
      } else {
        nlLockVariable(4*v);
        nlSetVariable(4*v,1e4);
        nlLockVariable(4*v+1);
        nlSetVariable(4*v+1,0.0);
      }
    }
  }
}