mirror of https://github.com/CGAL/cgal
Revert "fix moving with sizing formula"
This reverts commit bbeb755d379b56198ee879b648b80bde7fed041e but keep the vh*_moving booleans
This commit is contained in:
parent
d4e2bd0436
commit
6727a64e6a
|
|
@ -689,22 +689,19 @@ private:
|
||||||
|
|
||||||
const Point_3& p0 = point(vh0->point());
|
const Point_3& p0 = point(vh0->point());
|
||||||
const Point_3& p1 = point(vh1->point());
|
const Point_3& p1 = point(vh1->point());
|
||||||
|
const auto mass = density_along_segment(e, c3t3, true);
|
||||||
const FT length = approximate_edge_length(e, tr);
|
|
||||||
const FT density = density_along_segment(e, c3t3, true);
|
|
||||||
//density = 1./sizing_field(midpoint(e))
|
|
||||||
|
|
||||||
if (vh0_moving)
|
if (vh0_moving)
|
||||||
{
|
{
|
||||||
moves[i0] += density * Vector_3(p0, p1);
|
moves[i0] += mass * Vector_3(p0, p1);
|
||||||
neighbors[i0]++;
|
neighbors[i0]++;
|
||||||
masses[i0] += density * length;
|
masses[i0] += mass;
|
||||||
}
|
}
|
||||||
if (vh1_moving)
|
if (vh1_moving)
|
||||||
{
|
{
|
||||||
moves[i1] += density * Vector_3(p1, p0);
|
moves[i1] += mass * Vector_3(p1, p0);
|
||||||
neighbors[i1]++;
|
neighbors[i1]++;
|
||||||
masses[i1] += density * length;
|
masses[i1] += mass;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -806,22 +803,19 @@ std::size_t smooth_vertices_on_surfaces(C3t3& c3t3,
|
||||||
|
|
||||||
const Point_3& p0 = point(vh0->point());
|
const Point_3& p0 = point(vh0->point());
|
||||||
const Point_3& p1 = point(vh1->point());
|
const Point_3& p1 = point(vh1->point());
|
||||||
|
const auto mass = density_along_segment(e, c3t3, true);
|
||||||
const FT length = approximate_edge_length(e, tr);
|
|
||||||
const FT density = density_along_segment(e, c3t3, true);
|
|
||||||
//density = 1./sizing_field(midpoint(e))
|
|
||||||
|
|
||||||
if (vh0_moving)
|
if (vh0_moving)
|
||||||
{
|
{
|
||||||
moves[i0] += density * Vector_3(p0, p1);
|
moves[i0] += mass * Vector_3(p0, p1);
|
||||||
neighbors[i0]++;
|
neighbors[i0]++;
|
||||||
masses[i0] += density * length;
|
masses[i0] += mass;
|
||||||
}
|
}
|
||||||
if (vh1_moving)
|
if (vh1_moving)
|
||||||
{
|
{
|
||||||
moves[i1] += density * Vector_3(p1, p0);
|
moves[i1] += mass * Vector_3(p1, p0);
|
||||||
neighbors[i1]++;
|
neighbors[i1]++;
|
||||||
masses[i1] += density * length;
|
masses[i1] += mass;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1001,29 +995,27 @@ std::size_t smooth_internal_vertices(C3t3& c3t3,
|
||||||
const std::size_t& i0 = vertex_id(vh0);
|
const std::size_t& i0 = vertex_id(vh0);
|
||||||
const std::size_t& i1 = vertex_id(vh1);
|
const std::size_t& i1 = vertex_id(vh1);
|
||||||
|
|
||||||
const Point_3& p0 = point(vh0->point());
|
|
||||||
const Point_3& p1 = point(vh1->point());
|
|
||||||
|
|
||||||
const bool vh0_moving = (c3t3.in_dimension(vh0) == 3 && is_free(i0));
|
const bool vh0_moving = (c3t3.in_dimension(vh0) == 3 && is_free(i0));
|
||||||
const bool vh1_moving = (c3t3.in_dimension(vh1) == 3 && is_free(i1));
|
const bool vh1_moving = (c3t3.in_dimension(vh1) == 3 && is_free(i1));
|
||||||
|
|
||||||
if (!vh0_moving && !vh1_moving)
|
if (!vh0_moving && !vh1_moving)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const FT length = approximate_edge_length(e, tr);
|
const Point_3& p0 = point(vh0->point());
|
||||||
const FT density = density_along_segment(e, c3t3);
|
const Point_3& p1 = point(vh1->point());
|
||||||
|
const auto mass = density_along_segment(e, c3t3);
|
||||||
|
|
||||||
if (vh0_moving)
|
if (vh0_moving)
|
||||||
{
|
{
|
||||||
moves[i0] += density * Vector_3(p0, p1);
|
moves[i0] += mass * Vector_3(p0, p1);
|
||||||
neighbors[i0]++;
|
neighbors[i0]++;
|
||||||
masses[i0] += density * length;
|
masses[i0] += mass;
|
||||||
}
|
}
|
||||||
if (vh1_moving)
|
if (vh1_moving)
|
||||||
{
|
{
|
||||||
moves[i1] += density * Vector_3(p1, p0);
|
moves[i1] += mass * Vector_3(p1, p0);
|
||||||
neighbors[i1]++;
|
neighbors[i1]++;
|
||||||
masses[i1] += density * length;
|
masses[i1] += mass;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue