mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-11 16:19:16 +05:00
Correction for dual mesh + improve test to check more options
This commit is contained in:
parent
c8dfd88621
commit
ca50de3bc4
@ -48,11 +48,17 @@ isDone = Mesh_1.Compute()
|
|||||||
if not isDone:
|
if not isDone:
|
||||||
raise Exception("Error when computing Mesh")
|
raise Exception("Error when computing Mesh")
|
||||||
|
|
||||||
# Creating Dual mesh
|
# Creating Dual mesh with projection on shape
|
||||||
dual_Mesh_1 = smesh.CreateDualMesh( Mesh_1, 'dual_Mesh_1', True)
|
dual_Mesh_1 = smesh.CreateDualMesh( Mesh_1, 'dual_Mesh_1', True)
|
||||||
|
|
||||||
assert(dual_Mesh_1.NbPolyhedrons() > 0)
|
assert(dual_Mesh_1.NbPolyhedrons() > 0)
|
||||||
assert(dual_Mesh_1.NbTetras() == 0)
|
assert(dual_Mesh_1.NbTetras() == 0)
|
||||||
|
|
||||||
|
# Creating Dual mesh withour projection on shape
|
||||||
|
dual_Mesh_2 = smesh.CreateDualMesh( Mesh_1, 'dual_Mesh_2', False)
|
||||||
|
|
||||||
|
assert(dual_Mesh_2.NbPolyhedrons() > 0)
|
||||||
|
assert(dual_Mesh_2.NbTetras() == 0)
|
||||||
|
|
||||||
if salome.sg.hasDesktop():
|
if salome.sg.hasDesktop():
|
||||||
salome.sg.updateObjBrowser()
|
salome.sg.updateObjBrowser()
|
||||||
|
@ -195,7 +195,7 @@ def smesh_create_dual_mesh(mesh_ior, output_file, adapt_to_shape=True,
|
|||||||
id_grp_poly, nodes_added_on_tri = \
|
id_grp_poly, nodes_added_on_tri = \
|
||||||
__getIdsGrpDualFromOrig(mc_mesh_file, grp_name, mesh2d, -1)
|
__getIdsGrpDualFromOrig(mc_mesh_file, grp_name, mesh2d, -1)
|
||||||
|
|
||||||
if id_grp_poly is not None and grp_name[:4] == __prefix:
|
if id_grp_poly is not None and grp_name[:4] == __prefix and adapt_to_shape:
|
||||||
# This group is on a specific geom face
|
# This group is on a specific geom face
|
||||||
face_id = grp_name.split("_")[-1]
|
face_id = grp_name.split("_")[-1]
|
||||||
face_id = int(face_id)
|
face_id = int(face_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user