From bfbaaf717fcadb3ffb3678f5bcc79a4ffa1bc7aa Mon Sep 17 00:00:00 2001 From: nicolas le goff Date: Sun, 8 Dec 2024 22:42:34 +0100 Subject: [PATCH] added ogrid test --- test_link/test_ogrid.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test_link/test_ogrid.py diff --git a/test_link/test_ogrid.py b/test_link/test_ogrid.py new file mode 100644 index 0000000..25eaec8 --- /dev/null +++ b/test_link/test_ogrid.py @@ -0,0 +1,16 @@ +import pyMagix3D as Mgx3D + +def test_ogrid(): + ctx = Mgx3D.getStdContext() + tm = ctx.getTopoManager() + + ctx.clearSession() # Clean the session after the previous test + # Création d'une boite avec une topologie + ctx.getTopoManager().newBoxWithTopo (Mgx3D.Point(0, 0, 0), Mgx3D.Point(1, 1, 1), 10, 10, 10) + # Découpage de l'arête Ar0005 + ctx.getTopoManager().splitEdge ("Ar0005", .5) + # Découpage de l'arête Ar0001 + ctx.getTopoManager().splitEdge ("Ar0001", .5) + # Découpage en O-grid des blocs structurés Bl0000 + ctx.getTopoManager().splitBlocksWithOgridV2 (["Bl0000"], ["Fa0000", "Fa0001"], .5, 10) + assert(tm.getNbBlocks() == 5)