From 09b59da42849e1039e0e4fdc0d37bb705517abd7 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@uliege.be>
Date: Mon, 13 Jun 2022 21:20:03 +0200
Subject: [PATCH] use model.getEntitiesInBoundingBox to get curve STL inferred
 from surface STL

---
 examples/api/naca_boundary_layer_3d.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/examples/api/naca_boundary_layer_3d.py b/examples/api/naca_boundary_layer_3d.py
index fe922fce90..9a78450d3d 100644
--- a/examples/api/naca_boundary_layer_3d.py
+++ b/examples/api/naca_boundary_layer_3d.py
@@ -76,8 +76,9 @@ gmsh.model.occ.fragment([(1, c1), (1, c2)], gmsh.model.occ.getEntities(2))
 # retrieve tip curves that will be revolved
 eps = 1e-6
 gmsh.option.setNumber('Geometry.OCCBoundsUseStl', 1)
-tc = gmsh.model.occ.getEntitiesInBoundingBox(-eps,-eps,z-eps,
-                                             bb[3]+eps,1,z+eps, dim=1)
+gmsh.model.occ.synchronize()
+tc = gmsh.model.getEntitiesInBoundingBox(-eps,-eps,z-eps,
+                                         bb[3]+eps,1,z+eps, dim=1)
 
 # create rounded wing tip by revolution
 rev = gmsh.model.occ.revolve(tc, 0,0,z, 1,0,0, math.pi/2)
-- 
GitLab