From 6e88cee8a2f327429d3f1a418752c98fdc2558a0 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 24 Jul 2009 13:57:10 +0000 Subject: [PATCH] Issue 0020001: EDF 813 GEOM : PArtition , argument to get subshapes Additional changes: fix bugs, update documentation --- doc/salome/gui/GEOM/input/tui_basic_operations.doc | 1 + src/GEOM_I/GEOM_Gen_i.cc | 2 +- src/GEOM_SWIG/GEOM_TestAll.py | 9 ++++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/salome/gui/GEOM/input/tui_basic_operations.doc b/doc/salome/gui/GEOM/input/tui_basic_operations.doc index 1250c128d..50c8a7c3d 100644 --- a/doc/salome/gui/GEOM/input/tui_basic_operations.doc +++ b/doc/salome/gui/GEOM/input/tui_basic_operations.doc @@ -85,6 +85,7 @@ gg.setDisplayMode(id_archimede,1) \code import geompy import GEOM +import SALOMEDS # create a box and a cylinder box = geompy.MakeBoxDXDYDZ(200, 200, 200) diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index b8af061b6..d90d0101b 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -741,7 +741,7 @@ CORBA::Boolean GEOM_Gen_i::RestoreSubShapes (SALOMEDS::Study_ptr theStudy, if (!CORBA::is_nil(aSubO)) aGroupOp->UnionIDs(aSubO, anIDs); } - else { + else if (anIDs->length() > 0) { // single sub-shape aSubO = aShapesOp->GetSubShape(theObject, anIDs[0]); } diff --git a/src/GEOM_SWIG/GEOM_TestAll.py b/src/GEOM_SWIG/GEOM_TestAll.py index a37fa0502..79d14c84a 100644 --- a/src/GEOM_SWIG/GEOM_TestAll.py +++ b/src/GEOM_SWIG/GEOM_TestAll.py @@ -30,7 +30,8 @@ # ! documentation generation to identify certain places of this file # def TestAll (geompy, math): - + import GEOM + #Create base Variables nbtimes1 = 5 #Short nbtimes2 = 5 @@ -424,4 +425,10 @@ def TestAll (geompy, math): if ind_e != ind: print "Error in GetSubShape or GetSubShapeID" + #RestoreSubShapes + geompy.RestoreSubShapes(Copy) + geompy.RestoreSubShapes(RotatPnt, [], GEOM.FSM_Transformed) + geompy.RestoreSubShapes(Partition, [Box]) + geompy.RestoreSubShapes(Partition1) + print "DONE" -- 2.39.2