From fcc9882b0c5c3dcb8b167610483df751392f7a4b Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 16 Dec 2010 15:10:40 +0000 Subject: [PATCH] Fix regressions in test scripts caused by recent changed behaviour of SubShapeAll() functions --- src/SMESH_SWIG/ex19_sphereINcube.py | 35 +++++++++++------------------ 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/src/SMESH_SWIG/ex19_sphereINcube.py b/src/SMESH_SWIG/ex19_sphereINcube.py index 043a2e312..f50a0c8e4 100644 --- a/src/SMESH_SWIG/ex19_sphereINcube.py +++ b/src/SMESH_SWIG/ex19_sphereINcube.py @@ -76,17 +76,13 @@ f4 = MakePlane(sphere_centre, MakeVectorDXDYDZ( 1, 0, -1), plan_trim) #sphere_decoupee = MakePartition(solids, sphere_outils, [], [], ShapeType["SOLID"]) -solids = geompy.SubShapeAll(sphere_troue,geompy.ShapeType["SOLID"]) -sphere_decoupee = MakePartition(solids, [f1], [], [], ShapeType["SOLID"]) -solids = geompy.SubShapeAll(sphere_decoupee,geompy.ShapeType["SOLID"]) -sphere_decoupee = MakePartition(solids, [f2], [], [], ShapeType["SOLID"]) -solids = geompy.SubShapeAll(sphere_decoupee,geompy.ShapeType["SOLID"]) -sphere_decoupee = MakePartition(solids, [f3], [], [], ShapeType["SOLID"]) -solids = geompy.SubShapeAll(sphere_decoupee,geompy.ShapeType["SOLID"]) -sphere_decoupee = MakePartition(solids, [f4], [], [], ShapeType["SOLID"]) -solids = geompy.SubShapeAll(sphere_decoupee,geompy.ShapeType["SOLID"]) - -sphere_partie = geompy.MakeCompound(solids) + +sphere_decoupee = MakePartition([sphere_troue], [f1], [], [], ShapeType["SOLID"]) +sphere_decoupee = MakePartition([sphere_decoupee], [f2], [], [], ShapeType["SOLID"]) +sphere_decoupee = MakePartition([sphere_decoupee], [f3], [], [], ShapeType["SOLID"]) +sphere_decoupee = MakePartition([sphere_decoupee], [f4], [], [], ShapeType["SOLID"]) + +sphere_partie = geompy.MakeCompound([sphere_decoupee]) sphere_partie = GetBlockNearPoint(sphere_decoupee, MakeVertex(-sphere_rayon, 0, 0)) sphere_bloc = RemoveExtraEdges(sphere_partie) @@ -113,17 +109,12 @@ cube_plein = MakeBox(-cube_cote, -cube_cote, -cube_cote, +cube_cote, +cube_co cube_trou = MakeCut(cube_plein, sphere_pleine) #cube_decoupe = MakePartition([cube_trou], sphere_outils, [], [], ShapeType["SOLID"]) -solids = geompy.SubShapeAll(cube_trou,geompy.ShapeType["SOLID"]) -cube_decoupe = MakePartition(solids, [f1], [], [], ShapeType["SOLID"]) -solids = geompy.SubShapeAll(cube_decoupe,geompy.ShapeType["SOLID"]) -cube_decoupe = MakePartition(solids, [f2], [], [], ShapeType["SOLID"]) -solids = geompy.SubShapeAll(cube_decoupe,geompy.ShapeType["SOLID"]) -cube_decoupe = MakePartition(solids, [f3], [], [], ShapeType["SOLID"]) -solids = geompy.SubShapeAll(cube_decoupe,geompy.ShapeType["SOLID"]) -cube_decoupe = MakePartition(solids, [f4], [], [], ShapeType["SOLID"]) -solids = geompy.SubShapeAll(cube_decoupe,geompy.ShapeType["SOLID"]) - -cube_decoupe = geompy.MakeCompound(solids) +cube_decoupe = MakePartition([cube_trou], [f1], [], [], ShapeType["SOLID"]) +cube_decoupe = MakePartition([cube_decoupe], [f2], [], [], ShapeType["SOLID"]) +cube_decoupe = MakePartition([cube_decoupe], [f3], [], [], ShapeType["SOLID"]) +cube_decoupe = MakePartition([cube_decoupe], [f4], [], [], ShapeType["SOLID"]) + +cube_decoupe = geompy.MakeCompound([cube_decoupe]) cube_partie = GetBlockNearPoint(cube_decoupe, MakeVertex(-cube_cote, 0, 0)) -- 2.39.2