Skip to content

Commit e047bc6

Browse files
committed
New smoothing test
1 parent 1d39475 commit e047bc6

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

test_link/test_smoothing.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import math
2+
import pyMagix3D as Mgx3D
3+
4+
def test_smoothing_sphere(capfd):
5+
ctx = Mgx3D.getStdContext()
6+
ctx.clearSession() # Clean the session after the previous test
7+
re = 6.456
8+
ro = math.sqrt(1.0086544512)
9+
ratio = ro / re
10+
11+
ctx.getTopoManager().newSphereWithTopo (Mgx3D.Point(0, 0, 0), re, Mgx3D.Portion.HUITIEME, True, ratio, 11, 89, "MAT")
12+
# Modifie le groupe PX0
13+
ctx.getGeomManager().addToGroup (["Surf0003"], 2, "PX0")
14+
# Modifie le groupe PY0
15+
ctx.getGeomManager().addToGroup (["Surf0002"], 2, "PY0")
16+
# Modifie le groupe PZ0
17+
ctx.getGeomManager().addToGroup (["Surf0001"], 2, "PZ0")
18+
# Modifie le groupe EXTERN
19+
ctx.getGeomManager().addToGroup (["Surf0000"], 2, "EXTERN")
20+
# Ajoute une modification de maillage
21+
ctx.getGroupManager().addSmoothing ("EXTERN",Mgx3D.SurfacicSmoothing())
22+
# Ajoute une modification de maillage
23+
ctx.getGroupManager().addSmoothing ("PX0",Mgx3D.SurfacicSmoothing())
24+
# Ajoute une modification de maillage
25+
ctx.getGroupManager().addSmoothing ("PY0",Mgx3D.SurfacicSmoothing())
26+
# Ajoute une modification de maillage
27+
ctx.getGroupManager().addSmoothing ("PZ0",Mgx3D.SurfacicSmoothing())
28+
# Ajoute une modification de maillage => nécessite smooth3D pas dispo en logiciel libre
29+
#ctx.getGroupManager().addSmoothing ("MAT",Mgx3D.VolumicSmoothing())
30+
# Création du maillage pour tous les blocs
31+
ctx.getMeshManager().newAllBlocksMesh()
32+
33+
out, err = capfd.readouterr()
34+
assert len(err) == 0

0 commit comments

Comments
 (0)