From 4f6cc0826f4d9c289323de852f530d69215ebc87 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@uliege.be> Date: Thu, 12 May 2022 20:29:24 +0200 Subject: [PATCH] use abs(b[1]) since b[1] can be negative: see #1929 --- examples/api/mirror_mesh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/api/mirror_mesh.py b/examples/api/mirror_mesh.py index 16beaee621..9677425226 100644 --- a/examples/api/mirror_mesh.py +++ b/examples/api/mirror_mesh.py @@ -26,7 +26,7 @@ for e in gmsh.model.getEntities(): def transform(m, offset_entity, offset_node, offset_element, tx, ty, tz): for e in sorted(m): gmsh.model.addDiscreteEntity(e[0], e[1] + offset_entity, - [b[1] + offset_entity for b in m[e][0]]) + [abs(b[1]) + offset_entity for b in m[e][0]]) coord = [] for i in range(0, len(m[e][1][1]), 3): x = m[e][1][1][i] * tx -- GitLab