Skip to content

Commit

Permalink
[Amibe] Fix QEMDecimateHalfEdge metric support
Browse files Browse the repository at this point in the history
AnalyticMetric.getTargetSize return the size not the square of the size.
  • Loading branch information
jeromerobert committed Jan 31, 2019
1 parent 915d8df commit d16f6b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions amibe/python/remesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def __remesh(options):
if point_metric:
point_metric.scaling = sqrt(2)
algo.analyticMetric = point_metric
algo.toleranceFactor = 0.2
algo.toleranceFactor = 0.3
algo.compute()

#3
Expand Down Expand Up @@ -394,7 +394,7 @@ def __remesh(options):
if point_metric:
point_metric.scaling = sqrt(2)
algo.analyticMetric = point_metric
algo.toleranceFactor = 0.2
algo.toleranceFactor = 0.3
algo.compute()

#12
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ private double scaleAreaWithTolerance(Triangle t, double area) {
Vertex v = t.getV0();
double m = analyticMetric.getTargetSize(v.getX(), v.getY(),
v.getZ(), t.getGroupId());
return area / toleranceFactor / m;
return area / toleranceFactor / m / m;
} else if(tolerance > 0)
return area / tolerance;
else
Expand Down

0 comments on commit d16f6b6

Please sign in to comment.