mirror of https://github.com/CGAL/cgal
Enforce constraints by not updating their position
This commit is contained in:
parent
5983a80f6f
commit
0840a6e1a3
|
|
@ -311,14 +311,21 @@ private:
|
||||||
|
|
||||||
// Copy the data from two vectors to the UVmap.
|
// Copy the data from two vectors to the UVmap.
|
||||||
template <typename VertexUVMap,
|
template <typename VertexUVMap,
|
||||||
typename VertexIndexMap>
|
typename VertexIndexMap,
|
||||||
|
typename VertexParameterizedMap>
|
||||||
void assign_solution(const Vector& Xu,
|
void assign_solution(const Vector& Xu,
|
||||||
const Vector& Xv,
|
const Vector& Xv,
|
||||||
const Vertex_set& vertices,
|
const Vertex_set& vertices,
|
||||||
VertexUVMap uvmap,
|
VertexUVMap uvmap,
|
||||||
const VertexIndexMap vimap)
|
const VertexIndexMap vimap,
|
||||||
|
const VertexParameterizedMap vpmap)
|
||||||
{
|
{
|
||||||
BOOST_FOREACH(vertex_descriptor vd, vertices) {
|
BOOST_FOREACH(vertex_descriptor vd, vertices) {
|
||||||
|
// The solver might not have managed to exactly constrain the vertex that was marked
|
||||||
|
// as constrained; simply don't update its position.
|
||||||
|
if(get(vpmap, vd))
|
||||||
|
continue;
|
||||||
|
|
||||||
int index = get(vimap, vd);
|
int index = get(vimap, vd);
|
||||||
NT u = Xu(index);
|
NT u = Xu(index);
|
||||||
NT v = Xv(index);
|
NT v = Xv(index);
|
||||||
|
|
@ -1132,13 +1139,13 @@ private:
|
||||||
BOOST_FOREACH(vertex_descriptor vd, vertices) {
|
BOOST_FOREACH(vertex_descriptor vd, vertices) {
|
||||||
if(get(vpmap, vd)) {
|
if(get(vpmap, vd)) {
|
||||||
int index = get(vimap, vd);
|
int index = get(vimap, vd);
|
||||||
CGAL_postcondition(std::abs(Xu[index] - Bu[index] ) < 1e-10);
|
CGAL_warning(std::abs(Xu[index] - Bu[index] ) < 1e-7);
|
||||||
CGAL_postcondition(std::abs(Xv[index] - Bv[index] ) < 1e-10);
|
CGAL_warning(std::abs(Xv[index] - Bv[index] ) < 1e-7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
assign_solution(Xu, Xv, vertices, uvmap, vimap);
|
assign_solution(Xu, Xv, vertices, uvmap, vimap, vpmap);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue