Skip to content

Commit f1018b9

Browse files
committed
added ogrid test
1 parent 16d728a commit f1018b9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test_link/test_ogrid.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import pyMagix3D as Mgx3D
2+
3+
def test_ogrid():
4+
ctx = Mgx3D.getStdContext()
5+
tm = ctx.getTopoManager()
6+
7+
ctx.clearSession() # Clean the session after the previous test
8+
# Création d'une boite avec une topologie
9+
ctx.getTopoManager().newBoxWithTopo (Mgx3D.Point(0, 0, 0), Mgx3D.Point(1, 1, 1), 10, 10, 10)
10+
# Découpage de l'arête Ar0005
11+
ctx.getTopoManager().splitEdge ("Ar0005", .5)
12+
# Découpage de l'arête Ar0001
13+
ctx.getTopoManager().splitEdge ("Ar0001", .5)
14+
# Découpage en O-grid des blocs structurés Bl0000
15+
ctx.getTopoManager().splitBlocksWithOgridV2 (["Bl0000"], ["Fa0000", "Fa0001"], .5, 10)
16+
assert(tm.getNbBlocks() == 5)

0 commit comments

Comments
 (0)