From: Christophe Bourcier Date: Wed, 11 Apr 2018 14:04:41 +0000 (+0200) Subject: Remove hard-coded sub-shapes ids from test X-Git-Tag: V8_5_0rc1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fcbr%2Ffix_hybrid_tests_more;p=plugins%2Fhybridplugin.git Remove hard-coded sub-shapes ids from test --- diff --git a/tests/advanced_text_option.py b/tests/advanced_text_option.py index f4f7687..357bd4e 100644 --- a/tests/advanced_text_option.py +++ b/tests/advanced_text_option.py @@ -18,54 +18,54 @@ import SALOMEDS geompy = geomBuilder.New(theStudy) +# first cylinder +r1 = 0.5 +h1 = 5 + +# second cylinder +r2 = 0.3 +h2 = 3 + +length_piquage = 1.5 + O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) OY = geompy.MakeVectorDXDYDZ(0, 1, 0) OZ = geompy.MakeVectorDXDYDZ(0, 0, 1) -O_1 = geompy.MakeVertex(0, 0, 0) -OX_1 = geompy.MakeVectorDXDYDZ(1, 0, 0) -OY_1 = geompy.MakeVectorDXDYDZ(0, 1, 0) -OZ_1 = geompy.MakeVectorDXDYDZ(0, 0, 1) -Cylinder_1 = geompy.MakeCylinderRH(0.5, 5) -Cylinder_2 = geompy.MakeCylinderRH(0.3, 3) -Rotation_1 = geompy.MakeRotation(Cylinder_2, OY_1, -90*math.pi/180.0) -Translation_1 = geompy.MakeTranslation(Rotation_1, 0, 0, 1.5) -piquage = geompy.MakeFuseList([Cylinder_1, Translation_1], True, True) -[Outlet] = geompy.SubShapes(piquage, [15]) -[Inlet_z,Inlet_x] = geompy.SubShapes(piquage, [3, 22]) -[corner] = geompy.SubShapes(piquage, [14]) -[geomObj_1] = geompy.SubShapeAll(Outlet, geompy.ShapeType["FACE"]) -[geomObj_2] = geompy.SubShapeAll(Inlet_z, geompy.ShapeType["FACE"]) -[geomObj_3] = geompy.SubShapeAll(Inlet_x, geompy.ShapeType["FACE"]) -geomObj_4 = geompy.MakeVertex(0, 0, 0) -geomObj_5 = geompy.MakeVectorDXDYDZ(1, 0, 0) -geomObj_6 = geompy.MakeVectorDXDYDZ(0, 1, 0) -geomObj_7 = geompy.MakeVectorDXDYDZ(0, 0, 1) -Wall = geompy.CreateGroup(piquage, geompy.ShapeType["FACE"]) -geompy.UnionIDs(Wall, [7, 17]) -[geomObj_8,geomObj_9] = geompy.SubShapeAll(Wall, geompy.ShapeType["SHAPE"]) -[geomObj_10,geomObj_11] = geompy.SubShapeAll(Wall, geompy.ShapeType["SHAPE"]) -[geomObj_12,geomObj_13] = geompy.SubShapeAll(Wall, geompy.ShapeType["FACE"]) -[geomObj_14,geomObj_15] = geompy.SubShapeAll(Wall, geompy.ShapeType["SHAPE"]) geompy.addToStudy( O, 'O' ) geompy.addToStudy( OX, 'OX' ) geompy.addToStudy( OY, 'OY' ) geompy.addToStudy( OZ, 'OZ' ) -geompy.addToStudy( O_1, 'O' ) -geompy.addToStudy( OX_1, 'OX' ) -geompy.addToStudy( OY_1, 'OY' ) -geompy.addToStudy( OZ_1, 'OZ' ) -geompy.addToStudy( Cylinder_1, 'Cylinder_1' ) -geompy.addToStudy( Cylinder_2, 'Cylinder_2' ) -geompy.addToStudy( Rotation_1, 'Rotation_1' ) -geompy.addToStudy( Translation_1, 'Translation_1' ) + +Cylinder_1 = geompy.MakeCylinderRH(r1, h1) +Cylinder_2 = geompy.MakeCylinderRH(r2, h2) +Rotation_1 = geompy.MakeRotation(Cylinder_2, OY, -90*math.pi/180.0) +Translation_1 = geompy.MakeTranslation(Rotation_1, 0, 0, length_piquage) + +piquage = geompy.MakeFuseList([Cylinder_1, Translation_1], True, True) geompy.addToStudy( piquage, 'piquage' ) -geompy.addToStudyInFather( piquage, Outlet, 'Outlet' ) + +Inlet_z = geompy.GetFaceNearPoint(piquage, O) geompy.addToStudyInFather( piquage, Inlet_z, 'Inlet_z' ) + +p_inlet_x = geompy.MakeVertex(-h2, 0, length_piquage) +Inlet_x = geompy.GetFaceNearPoint(piquage, p_inlet_x) geompy.addToStudyInFather( piquage, Inlet_x, 'Inlet_x' ) -geompy.addToStudyInFather( piquage, corner, 'corner' ) + +p_outlet = geompy.MakeVertex(0, 0, h1) +Outlet = geompy.GetFaceNearPoint(piquage, p_outlet) +geompy.addToStudyInFather( piquage, Outlet, 'Outlet' ) + +Wall = geompy.CreateGroup(piquage, geompy.ShapeType["FACE"]) +faces = geompy.SubShapeAll(piquage, geompy.ShapeType["FACE"]) +geompy.UnionList(Wall, faces) +geompy.DifferenceList(Wall, [Inlet_x, Inlet_z, Outlet]) geompy.addToStudyInFather( piquage, Wall, 'Wall' ) +p_corner = geompy.MakeVertex(-r2, 0, length_piquage+r2) +corner = geompy.GetVertexNearPoint(piquage, p_corner) +geompy.addToStudyInFather( piquage, corner, 'corner' ) + ### ### SMESH component ### @@ -84,15 +84,19 @@ NETGEN_Parameters_2D.SetFineness( 5 ) NETGEN_Parameters_2D.SetGrowthRate( 0.1 ) NETGEN_Parameters_2D.SetNbSegPerEdge( 2 ) NETGEN_Parameters_2D.SetNbSegPerRadius( 3 ) -#Mesh_with_imprinting_set_by_groups.Triangle(algo=smeshBuilder.MG_CADSurf) + +wall_faces = geompy.SubShapeAll(Wall, geompy.ShapeType["FACE"]) +wall_ids = geompy.GetSubShapesIDs(piquage, wall_faces) +Inlet_x_id, Inlet_z_id, Outlet_id = geompy.GetSubShapesIDs(piquage, [Inlet_x, Inlet_z, Outlet]) + HYBRID_3D_2_2 = Mesh_with_imprinting_set_by_groups.Tetrahedron(algo=smeshBuilder.HYBRID) HYBRID_Parameters_2 = HYBRID_3D_2_2.Parameters() HYBRID_Parameters_2.SetElementGeneration( 0 ) HYBRID_Parameters_2.SetHeightFirstLayer( 0.01 ) HYBRID_Parameters_2.SetBoundaryLayersProgression( 1.1 ) HYBRID_Parameters_2.SetNbOfBoundaryLayers( 3 ) -HYBRID_Parameters_2.SetFacesWithLayers( [ 7, 17 ] ) -HYBRID_Parameters_2.SetFacesWithImprinting( [ 22, 3, 15 ] ) +HYBRID_Parameters_2.SetFacesWithLayers( wall_ids ) +HYBRID_Parameters_2.SetFacesWithImprinting( [ Inlet_x_id, Inlet_z_id, Outlet_id ] ) HYBRID_Parameters_2.SetLayersOnAllWrap( 0 ) isDone = Mesh_with_imprinting_set_by_groups.Compute() diff --git a/tests/enforced_mesh.py b/tests/enforced_mesh.py index d2675f2..97d4871 100644 --- a/tests/enforced_mesh.py +++ b/tests/enforced_mesh.py @@ -18,37 +18,52 @@ import SALOMEDS geompy = geomBuilder.New(theStudy) +# first cylinder +r1 = 0.5 +h1 = 5 + +# second cylinder +r2 = 0.3 +h2 = 3 + +length_piquage = 1.5 + O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) OY = geompy.MakeVectorDXDYDZ(0, 1, 0) OZ = geompy.MakeVectorDXDYDZ(0, 0, 1) -Cylinder_1 = geompy.MakeCylinderRH(0.5, 5) -Cylinder_2 = geompy.MakeCylinderRH(0.3, 3) -Rotation_1 = geompy.MakeRotation(Cylinder_2, OY, -90*math.pi/180.0) -Translation_1 = geompy.MakeTranslation(Rotation_1, 0, 0, 1.5) -piquage = geompy.MakeFuseList([Cylinder_1, Translation_1], True, True) -[Outlet] = geompy.SubShapes(piquage, [15]) -[Inlet_z,Inlet_x] = geompy.SubShapes(piquage, [3, 22]) -[corner] = geompy.SubShapes(piquage, [14]) -geomObj_1 = geompy.MakeVertex(0, 0, 0) -geomObj_2 = geompy.MakeVectorDXDYDZ(1, 0, 0) -geomObj_3 = geompy.MakeVectorDXDYDZ(0, 1, 0) -geomObj_4 = geompy.MakeVectorDXDYDZ(0, 0, 1) -Wall = geompy.CreateGroup(piquage, geompy.ShapeType["FACE"]) -geompy.UnionIDs(Wall, [7, 17]) geompy.addToStudy( O, 'O' ) geompy.addToStudy( OX, 'OX' ) geompy.addToStudy( OY, 'OY' ) geompy.addToStudy( OZ, 'OZ' ) -geompy.addToStudy( Cylinder_1, 'Cylinder_1' ) -geompy.addToStudy( Cylinder_2, 'Cylinder_2' ) -geompy.addToStudy( Rotation_1, 'Rotation_1' ) -geompy.addToStudy( Translation_1, 'Translation_1' ) + +Cylinder_1 = geompy.MakeCylinderRH(r1, h1) +Cylinder_2 = geompy.MakeCylinderRH(r2, h2) +Rotation_1 = geompy.MakeRotation(Cylinder_2, OY, -90*math.pi/180.0) +Translation_1 = geompy.MakeTranslation(Rotation_1, 0, 0, length_piquage) + +piquage = geompy.MakeFuseList([Cylinder_1, Translation_1], True, True) geompy.addToStudy( piquage, 'piquage' ) + +Inlet_z = geompy.GetFaceNearPoint(piquage, O) +geompy.addToStudyInFather( piquage, Inlet_z, 'Inlet_z' ) + +p_inlet_x = geompy.MakeVertex(-h2, 0, length_piquage) +Inlet_x = geompy.GetFaceNearPoint(piquage, p_inlet_x) geompy.addToStudyInFather( piquage, Inlet_x, 'Inlet_x' ) + +p_outlet = geompy.MakeVertex(0, 0, h1) +Outlet = geompy.GetFaceNearPoint(piquage, p_outlet) geompy.addToStudyInFather( piquage, Outlet, 'Outlet' ) + +Wall = geompy.CreateGroup(piquage, geompy.ShapeType["FACE"]) +faces = geompy.SubShapeAll(piquage, geompy.ShapeType["FACE"]) +geompy.UnionList(Wall, faces) +geompy.DifferenceList(Wall, [Inlet_x, Inlet_z, Outlet]) geompy.addToStudyInFather( piquage, Wall, 'Wall' ) -geompy.addToStudyInFather( piquage, Inlet_z, 'Inlet_z' ) + +p_corner = geompy.MakeVertex(-r2, 0, length_piquage+r2) +corner = geompy.GetVertexNearPoint(piquage, p_corner) geompy.addToStudyInFather( piquage, corner, 'corner' ) p1 = geompy.MakeVertex(0, -0.25, 1) @@ -89,13 +104,16 @@ NETGEN_2D_Parameters.SetGrowthRate( 0.1 ) NETGEN_2D_Parameters.SetNbSegPerEdge( 2 ) NETGEN_2D_Parameters.SetNbSegPerRadius( 3 ) +wall_faces = geompy.SubShapeAll(Wall, geompy.ShapeType["FACE"]) +wall_ids = geompy.GetSubShapesIDs(piquage, wall_faces) + NETGEN_3D = Mesh_1.Tetrahedron() Viscous_Layers_1 = NETGEN_3D.ViscousLayers(0.05,3,1.1,[],1,StdMeshersBuilder.SURF_OFFSET_SMOOTH) Viscous_Layers_1.SetTotalThickness( 0.05 ) Viscous_Layers_1.SetNumberLayers( 3 ) Viscous_Layers_1.SetStretchFactor( 1.1 ) Viscous_Layers_1.SetMethod( StdMeshersBuilder.SURF_OFFSET_SMOOTH ) -Viscous_Layers_1.SetFaces( [ 7, 17 ], 0 ) +Viscous_Layers_1.SetFaces( wall_ids, 0 ) #isDone = Mesh_1.Compute() diff --git a/tests/layers_imprinting.py b/tests/layers_imprinting.py index 4dec793..8ce327c 100644 --- a/tests/layers_imprinting.py +++ b/tests/layers_imprinting.py @@ -18,37 +18,52 @@ import SALOMEDS geompy = geomBuilder.New(theStudy) +# first cylinder +r1 = 0.5 +h1 = 5 + +# second cylinder +r2 = 0.3 +h2 = 3 + +length_piquage = 1.5 + O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) OY = geompy.MakeVectorDXDYDZ(0, 1, 0) OZ = geompy.MakeVectorDXDYDZ(0, 0, 1) -Cylinder_1 = geompy.MakeCylinderRH(0.5, 5) -Cylinder_2 = geompy.MakeCylinderRH(0.3, 3) -Rotation_1 = geompy.MakeRotation(Cylinder_2, OY, -90*math.pi/180.0) -Translation_1 = geompy.MakeTranslation(Rotation_1, 0, 0, 1.5) -piquage = geompy.MakeFuseList([Cylinder_1, Translation_1], True, True) -[Outlet] = geompy.SubShapes(piquage, [15]) -[Inlet_z,Inlet_x] = geompy.SubShapes(piquage, [13, 22]) -[corner] = geompy.SubShapes(piquage, [14]) -geomObj_1 = geompy.MakeVertex(0, 0, 0) -geomObj_2 = geompy.MakeVectorDXDYDZ(1, 0, 0) -geomObj_3 = geompy.MakeVectorDXDYDZ(0, 1, 0) -geomObj_4 = geompy.MakeVectorDXDYDZ(0, 0, 1) -Wall = geompy.CreateGroup(piquage, geompy.ShapeType["FACE"]) -geompy.UnionIDs(Wall, [3, 17]) geompy.addToStudy( O, 'O' ) geompy.addToStudy( OX, 'OX' ) geompy.addToStudy( OY, 'OY' ) geompy.addToStudy( OZ, 'OZ' ) -geompy.addToStudy( Cylinder_1, 'Cylinder_1' ) -geompy.addToStudy( Cylinder_2, 'Cylinder_2' ) -geompy.addToStudy( Rotation_1, 'Rotation_1' ) -geompy.addToStudy( Translation_1, 'Translation_1' ) + +Cylinder_1 = geompy.MakeCylinderRH(r1, h1) +Cylinder_2 = geompy.MakeCylinderRH(r2, h2) +Rotation_1 = geompy.MakeRotation(Cylinder_2, OY, -90*math.pi/180.0) +Translation_1 = geompy.MakeTranslation(Rotation_1, 0, 0, length_piquage) + +piquage = geompy.MakeFuseList([Cylinder_1, Translation_1], True, True) geompy.addToStudy( piquage, 'piquage' ) + +Inlet_z = geompy.GetFaceNearPoint(piquage, O) +geompy.addToStudyInFather( piquage, Inlet_z, 'Inlet_z' ) + +p_inlet_x = geompy.MakeVertex(-h2, 0, length_piquage) +Inlet_x = geompy.GetFaceNearPoint(piquage, p_inlet_x) geompy.addToStudyInFather( piquage, Inlet_x, 'Inlet_x' ) + +p_outlet = geompy.MakeVertex(0, 0, h1) +Outlet = geompy.GetFaceNearPoint(piquage, p_outlet) geompy.addToStudyInFather( piquage, Outlet, 'Outlet' ) + +Wall = geompy.CreateGroup(piquage, geompy.ShapeType["FACE"]) +faces = geompy.SubShapeAll(piquage, geompy.ShapeType["FACE"]) +geompy.UnionList(Wall, faces) +geompy.DifferenceList(Wall, [Inlet_x, Inlet_z, Outlet]) geompy.addToStudyInFather( piquage, Wall, 'Wall' ) -geompy.addToStudyInFather( piquage, Inlet_z, 'Inlet_z' ) + +p_corner = geompy.MakeVertex(-r2, 0, length_piquage+r2) +corner = geompy.GetVertexNearPoint(piquage, p_corner) geompy.addToStudyInFather( piquage, corner, 'corner' ) geom_groups = [Inlet_x, Inlet_z, Outlet, Wall] @@ -81,6 +96,9 @@ NETGEN_2D_Parameters.SetGrowthRate( 0.1 ) NETGEN_2D_Parameters.SetNbSegPerEdge( 2 ) NETGEN_2D_Parameters.SetNbSegPerRadius( 3 ) +wall_faces = geompy.SubShapeAll(Wall, geompy.ShapeType["FACE"]) +wall_ids = geompy.GetSubShapesIDs(piquage, wall_faces) + MG_Hybrid = Mesh_1.Tetrahedron(algo=smeshBuilder.HYBRID) MG_Hybrid_Parameters_1 = MG_Hybrid.Parameters() MG_Hybrid_Parameters_1.SetLayersOnAllWrap( 0 ) @@ -88,7 +106,7 @@ MG_Hybrid_Parameters_1.SetElementGeneration( HYBRIDPluginBuilder.Generation_Tetr MG_Hybrid_Parameters_1.SetHeightFirstLayer( 0.01 ) MG_Hybrid_Parameters_1.SetBoundaryLayersProgression( 1.1 ) MG_Hybrid_Parameters_1.SetNbOfBoundaryLayers( 3 ) -MG_Hybrid_Parameters_1.SetFacesWithLayers( [ 3, 17 ] ) +MG_Hybrid_Parameters_1.SetFacesWithLayers( wall_ids ) isDone = Mesh_1.Compute() @@ -121,6 +139,8 @@ Mesh_2 = smesh.Mesh(piquage, "Mesh_with_imprinting") NETGEN_2D_1_1 = Mesh_2.Triangle(algo=smeshBuilder.NETGEN_1D2D) status = Mesh_2.AddHypothesis(NETGEN_2D_Parameters) +Inlet_x_id, Inlet_z_id, Outlet_id = geompy.GetSubShapesIDs(piquage, [Inlet_x, Inlet_z, Outlet]) + MG_Hybrid_2 = Mesh_2.Tetrahedron(algo=smeshBuilder.HYBRID) MG_Hybrid_Parameters_2 = MG_Hybrid_2.Parameters() MG_Hybrid_Parameters_2.SetLayersOnAllWrap( 0 ) @@ -128,8 +148,8 @@ MG_Hybrid_Parameters_2.SetElementGeneration( HYBRIDPluginBuilder.Generation_Tetr MG_Hybrid_Parameters_2.SetHeightFirstLayer( 0.01 ) MG_Hybrid_Parameters_2.SetBoundaryLayersProgression( 1.1 ) MG_Hybrid_Parameters_2.SetNbOfBoundaryLayers( 3 ) -MG_Hybrid_Parameters_2.SetFacesWithLayers( [ 3, 17 ] ) -MG_Hybrid_Parameters_2.SetFacesWithImprinting( [ 22, 15, 13 ] ) +MG_Hybrid_Parameters_2.SetFacesWithLayers( wall_ids ) +MG_Hybrid_Parameters_2.SetFacesWithImprinting( [ Inlet_x_id, Inlet_z_id, Outlet_id ] ) isDone = Mesh_2.Compute() diff --git a/tests/layers_imprinting_hexa_core.py b/tests/layers_imprinting_hexa_core.py index 2cd92cb..9c3e624 100644 --- a/tests/layers_imprinting_hexa_core.py +++ b/tests/layers_imprinting_hexa_core.py @@ -20,37 +20,52 @@ import SALOMEDS geompy = geomBuilder.New(theStudy) +# first cylinder +r1 = 0.5 +h1 = 5 + +# second cylinder +r2 = 0.3 +h2 = 3 + +length_piquage = 1.5 + O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) OY = geompy.MakeVectorDXDYDZ(0, 1, 0) OZ = geompy.MakeVectorDXDYDZ(0, 0, 1) -Cylinder_1 = geompy.MakeCylinderRH(0.5, 5) -Cylinder_2 = geompy.MakeCylinderRH(0.3, 3) -Rotation_1 = geompy.MakeRotation(Cylinder_2, OY, -90*math.pi/180.0) -Translation_1 = geompy.MakeTranslation(Rotation_1, 0, 0, 1.5) -piquage = geompy.MakeFuseList([Cylinder_1, Translation_1], True, True) -[Outlet] = geompy.SubShapes(piquage, [15]) -[Inlet_z,Inlet_x] = geompy.SubShapes(piquage, [13, 22]) -[corner] = geompy.SubShapes(piquage, [14]) -geomObj_1 = geompy.MakeVertex(0, 0, 0) -geomObj_2 = geompy.MakeVectorDXDYDZ(1, 0, 0) -geomObj_3 = geompy.MakeVectorDXDYDZ(0, 1, 0) -geomObj_4 = geompy.MakeVectorDXDYDZ(0, 0, 1) -Wall = geompy.CreateGroup(piquage, geompy.ShapeType["FACE"]) -geompy.UnionIDs(Wall, [3, 17]) geompy.addToStudy( O, 'O' ) geompy.addToStudy( OX, 'OX' ) geompy.addToStudy( OY, 'OY' ) geompy.addToStudy( OZ, 'OZ' ) -geompy.addToStudy( Cylinder_1, 'Cylinder_1' ) -geompy.addToStudy( Cylinder_2, 'Cylinder_2' ) -geompy.addToStudy( Rotation_1, 'Rotation_1' ) -geompy.addToStudy( Translation_1, 'Translation_1' ) + +Cylinder_1 = geompy.MakeCylinderRH(r1, h1) +Cylinder_2 = geompy.MakeCylinderRH(r2, h2) +Rotation_1 = geompy.MakeRotation(Cylinder_2, OY, -90*math.pi/180.0) +Translation_1 = geompy.MakeTranslation(Rotation_1, 0, 0, length_piquage) + +piquage = geompy.MakeFuseList([Cylinder_1, Translation_1], True, True) geompy.addToStudy( piquage, 'piquage' ) + +Inlet_z = geompy.GetFaceNearPoint(piquage, O) +geompy.addToStudyInFather( piquage, Inlet_z, 'Inlet_z' ) + +p_inlet_x = geompy.MakeVertex(-h2, 0, length_piquage) +Inlet_x = geompy.GetFaceNearPoint(piquage, p_inlet_x) geompy.addToStudyInFather( piquage, Inlet_x, 'Inlet_x' ) + +p_outlet = geompy.MakeVertex(0, 0, h1) +Outlet = geompy.GetFaceNearPoint(piquage, p_outlet) geompy.addToStudyInFather( piquage, Outlet, 'Outlet' ) + +Wall = geompy.CreateGroup(piquage, geompy.ShapeType["FACE"]) +faces = geompy.SubShapeAll(piquage, geompy.ShapeType["FACE"]) +geompy.UnionList(Wall, faces) +geompy.DifferenceList(Wall, [Inlet_x, Inlet_z, Outlet]) geompy.addToStudyInFather( piquage, Wall, 'Wall' ) -geompy.addToStudyInFather( piquage, Inlet_z, 'Inlet_z' ) + +p_corner = geompy.MakeVertex(-r2, 0, length_piquage+r2) +corner = geompy.GetVertexNearPoint(piquage, p_corner) geompy.addToStudyInFather( piquage, corner, 'corner' ) geom_groups = [Inlet_x, Inlet_z, Outlet, Wall] @@ -83,6 +98,10 @@ NETGEN_2D_Parameters.SetGrowthRate( 0.1 ) NETGEN_2D_Parameters.SetNbSegPerEdge( 2 ) NETGEN_2D_Parameters.SetNbSegPerRadius( 3 ) +wall_faces = geompy.SubShapeAll(Wall, geompy.ShapeType["FACE"]) +wall_ids = geompy.GetSubShapesIDs(piquage, wall_faces) +Inlet_x_id, Inlet_z_id, Outlet_id = geompy.GetSubShapesIDs(piquage, [Inlet_x, Inlet_z, Outlet]) + MG_Hybrid_4 = Mesh_4.Tetrahedron(algo=smeshBuilder.HYBRID) MG_Hybrid_Parameters_4 = MG_Hybrid_4.Parameters() MG_Hybrid_Parameters_4.SetLayersOnAllWrap( 0 ) @@ -90,8 +109,8 @@ MG_Hybrid_Parameters_4.SetElementGeneration( HYBRIDPluginBuilder.Generation_Hexa MG_Hybrid_Parameters_4.SetHeightFirstLayer( 0.01 ) MG_Hybrid_Parameters_4.SetBoundaryLayersProgression( 1.1 ) MG_Hybrid_Parameters_4.SetNbOfBoundaryLayers( 3 ) -MG_Hybrid_Parameters_4.SetFacesWithLayers( [ 3, 17 ] ) -MG_Hybrid_Parameters_4.SetFacesWithImprinting( [ 22, 15, 13 ] ) +MG_Hybrid_Parameters_4.SetFacesWithLayers( wall_ids ) +MG_Hybrid_Parameters_4.SetFacesWithImprinting( [ Inlet_x_id, Inlet_z_id, Outlet_id ] ) isDone = Mesh_4.Compute()