Skip to content

Commit

Permalink
added ogrid test
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaslg committed Dec 8, 2024
1 parent 16d728a commit bfbaaf7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test_link/test_ogrid.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit bfbaaf7

Please sign in to comment.