From d16f6b67b8462a06accbfb92f85eea23990d5f7a Mon Sep 17 00:00:00 2001 From: Jerome Robert Date: Thu, 31 Jan 2019 08:44:08 +0100 Subject: [PATCH] [Amibe] Fix QEMDecimateHalfEdge metric support AnalyticMetric.getTargetSize return the size not the square of the size. --- amibe/python/remesh.py | 4 ++-- .../src/org/jcae/mesh/amibe/algos3d/QEMDecimateHalfEdge.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/amibe/python/remesh.py b/amibe/python/remesh.py index 760fbc8a8..2a46ffcd7 100644 --- a/amibe/python/remesh.py +++ b/amibe/python/remesh.py @@ -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 @@ -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 diff --git a/amibe/src/org/jcae/mesh/amibe/algos3d/QEMDecimateHalfEdge.java b/amibe/src/org/jcae/mesh/amibe/algos3d/QEMDecimateHalfEdge.java index 80281d235..524cd96cb 100644 --- a/amibe/src/org/jcae/mesh/amibe/algos3d/QEMDecimateHalfEdge.java +++ b/amibe/src/org/jcae/mesh/amibe/algos3d/QEMDecimateHalfEdge.java @@ -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