ST_ONIN
};
+ /*!
+ * Kind of method to find inside one main shape some subshapes,
+ * corresponding to other given shape (its argument)
+ * Is used in functions GEOM_Gen.RestoreSubShapes<xxx>()
+ */
+ enum find_shape_method
+ {
+ /*! Use GetInPlace functionality. Suits all cases, except transformations */
+ FSM_GetInPlace,
+
+ /*! To be used only for transformation result, to find subshapes of argument.
+ * Only this method can be used after transformation.
+ */
+ FSM_Transformed,
+
+ /*! To find only shared subshapes, not modified by the operation */
+ FSM_GetSame,
+
+ /*! Use GetShapesOnShape method (can work only on solids) */
+ FSM_GetShapesOnShape,
+
+ /*! Use GetInPlaceByHistory method (can work only after Partition) */
+ FSM_GetInPlaceByHistory
+ };
+
+
typedef sequence<string> string_array;
typedef sequence<short> short_array;
typedef sequence<long> ListOfLong;
* \param theObject published GEOM object, arguments of which will be published
* \param theArgs list of GEOM_Object, operation arguments to be published.
* If this list is empty, all operation arguments will be published
- * \param isTrsf If True, search sub-shapes by indices, as in case of
- * transformation they cannot be found by GetInPlace.
- * The argument itself is not published in this case,
- * because the whole shape corresponds to the argument.
+ * \param theFindMethod method to search subshapes, corresponding to arguments and
+ * their subshapes. Value from enumeration GEOM::find_shape_method.
+ * \param theInheritFirstArg set properties of the first argument for \a theObject.
+ * Do not publish subshapes in place of arguments, but only
+ * in place of subshapes of the first argument,
+ * because the whole shape corresponds to the first argument.
+ * Mainly to be used after transformations, but it also can be
+ * usefull after partition with one object shape, and some other
+ * operations, where only the first argument has to be considered.
+ * If theObject has only one argument shape, this flag is automatically
+ * considered as True, not regarding really passed value.
* \return True in case of success, False otherwise.
*/
boolean RestoreSubShapesO (in SALOMEDS::Study theStudy,
in GEOM_Object theObject,
in ListOfGO theArgs,
- in boolean isTrsf);
+ in find_shape_method theFindMethod,
+ in boolean theInheritFirstArg);
/*!
* Publish sub-shapes, standing for arguments and sub-shapes of arguments
- * To be used from GUI and from geompy.addToStudy
- * \param theStudy the study, in which theObject is published already,
- * and in which the arguments will be published
+ * To be used from GUI and from geompy.addToStudy.
+ * Work like the above method, but accepts study object theSObject instead of GEOM_Object.
* \param theSObject study object, referencing GEOM object, arguments of which will be published
- * \param theArgs list of GEOM_Object, operation arguments to be published.
- * If this list is empty, all operation arguments will be published
- * \param isTrsf If True, search sub-shapes by indices, as in case of
- * transformation they cannot be found by GetInPlace.
- * The argument itself is not published in this case,
- * because the whole shape corresponds to the argument.
- * \return True in case of success, False otherwise.
*/
boolean RestoreSubShapesSO (in SALOMEDS::Study theStudy,
in SALOMEDS::SObject theSObject,
in ListOfGO theArgs,
- in boolean isTrsf);
+ in find_shape_method theFindMethod,
+ in boolean theInheritFirstArg);
/*!
* Methods to access interfaces for objects creation and transformation
{
GEOM::GEOM_Object_var anObj;
- anObj = GEOM::GEOM_IBooleanOperations::_narrow( getOperation() )->MakeBoolean( myObject1, myObject2, myOperation );
+ anObj = GEOM::GEOM_IBooleanOperations::_narrow( getOperation() )->
+ MakeBoolean( myObject1, myObject2, myOperation );
if ( !anObj->_is_nil() )
objects.push_back( anObj._retn() );
{
if (CheckBoxRestoreSS->isChecked()) {
// empty list of arguments means that all arguments should be restored
- getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(), /*isTrsf=*/false);
+ getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+ /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame
+ /*theInheritFirstArg=*/myOperation==BooleanGUI::CUT); // ? false
}
}
{
if (CheckBoxRestoreSS->isChecked()) {
// empty list of arguments means that all arguments should be restored
- getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(), /*isTrsf=*/false);
+ getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+ /*theFindMethod=*/GEOM::FSM_GetSame, // ? GEOM::FSM_GetInPlace
+ /*theInheritFirstArg=*/false);
}
}
// example of implementation in particular dialog:
// GEOM::ListOfGO anArgs;
// anArgs.length(0); // empty list means that all arguments should be restored
- // getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs, /*isTrsf=*/false);
+ // getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
+ // /*theFindMethod=*/GEOM::FSM_GetInPlace,
+ // /*theInheritFirstArg=*/false);
}
//================================================================
}
//============================================================================
-// function : RestoreSubShapes
+// function : RestoreSubShapesO
// purpose : Publish sub-shapes, standing for arguments and sub-shapes of arguments.
// To be used from python scripts out of geompy.addToStudy (non-default usage)
//============================================================================
-CORBA::Boolean GEOM_Gen_i::RestoreSubShapesO (SALOMEDS::Study_ptr theStudy,
- GEOM::GEOM_Object_ptr theObject,
- const GEOM::ListOfGO& theArgs,
- CORBA::Boolean isTrsf)
+CORBA::Boolean GEOM_Gen_i::RestoreSubShapesO (SALOMEDS::Study_ptr theStudy,
+ GEOM::GEOM_Object_ptr theObject,
+ const GEOM::ListOfGO& theArgs,
+ GEOM::find_shape_method theFindMethod,
+ CORBA::Boolean theInheritFirstArg)
{
if (CORBA::is_nil(theStudy) || CORBA::is_nil(theObject))
return false;
if (CORBA::is_nil(aSO))
return false;
- return RestoreSubShapes(theStudy, theObject, aSO, theArgs, isTrsf);
+ return RestoreSubShapes(theStudy, theObject, aSO, theArgs, theFindMethod, theInheritFirstArg);
}
//============================================================================
-// function : RestoreSubShapes
+// function : RestoreSubShapesSO
// purpose : Publish sub-shapes, standing for arguments and sub-shapes of arguments.
// To be used from GUI and from geompy.addToStudy
//============================================================================
-CORBA::Boolean GEOM_Gen_i::RestoreSubShapesSO (SALOMEDS::Study_ptr theStudy,
- SALOMEDS::SObject_ptr theSObject,
- const GEOM::ListOfGO& theArgs,
- CORBA::Boolean isTrsf)
+CORBA::Boolean GEOM_Gen_i::RestoreSubShapesSO (SALOMEDS::Study_ptr theStudy,
+ SALOMEDS::SObject_ptr theSObject,
+ const GEOM::ListOfGO& theArgs,
+ GEOM::find_shape_method theFindMethod,
+ CORBA::Boolean theInheritFirstArg)
{
if (CORBA::is_nil(theStudy) || CORBA::is_nil(theSObject))
return false;
if (CORBA::is_nil(anO))
return false;
- return RestoreSubShapes(theStudy, anO, theSObject, theArgs, isTrsf);
+ return RestoreSubShapes(theStudy, anO, theSObject, theArgs, theFindMethod, theInheritFirstArg);
}
//============================================================================
// purpose : Private method. Works only if both theObject and theSObject
// are defined, and does not check, if they correspond to each other.
//============================================================================
-CORBA::Boolean GEOM_Gen_i::RestoreSubShapes (SALOMEDS::Study_ptr theStudy,
- GEOM::GEOM_Object_ptr theObject,
- SALOMEDS::SObject_ptr theSObject,
- const GEOM::ListOfGO& theArgs,
- CORBA::Boolean isTrsf)
+CORBA::Boolean GEOM_Gen_i::RestoreSubShapes (SALOMEDS::Study_ptr theStudy,
+ GEOM::GEOM_Object_ptr theObject,
+ SALOMEDS::SObject_ptr theSObject,
+ const GEOM::ListOfGO& theArgs,
+ GEOM::find_shape_method theFindMethod,
+ CORBA::Boolean theInheritFirstArg)
{
if (CORBA::is_nil(theStudy) || CORBA::is_nil(theObject) || CORBA::is_nil(theSObject))
return false;
- if (isTrsf && theArgs.length() > 1)
- // only one (the first) argument of transformation
- // (the transformed shape) can be restored
- return false;
-
// Arguments to be published
GEOM::ListOfGO_var aList;
if (aLength < 1)
return false;
- if (isTrsf) {
- // In case of transformation we do not publish argument's reflection,
+ if (theInheritFirstArg || (nbArgsActual == 1)) {
+ // Do not publish argument's reflection,
// but only reconstruct its published sub-shapes
GEOM::GEOM_Object_var anArgO = aList[0];
SALOMEDS::SObject_var anArgSO = theStudy->FindObjectIOR(anIOR.in());
GEOM::ListOfGO_var aParts =
- RestoreSubShapesOneLevel(theStudy, anArgSO, theSObject, theObject, isTrsf);
+ RestoreSubShapesOneLevel(theStudy, anArgSO, theSObject, theObject, theFindMethod);
// set the color of the transformed shape to the color of initial shape
theObject->SetColor(aList[0]->GetColor());
return (aParts->length() > 0);
}
- else {
- // in this case (not a transformation) we cannot detect, if the final
- // shape should have the same color, as one of arguments, and we apply
- // the same color only in case of single argument
- if (nbArgsActual == 1) {
- // set the color of the new shape to the color of its single argument
- theObject->SetColor(aList[0]->GetColor());
- }
- }
- // Get interface, containing method GetInPlace, which we will use to reconstruct sub-shapes
+ // Get interface, containing method, which we will use to reconstruct sub-shapes
GEOM::GEOM_IShapesOperations_var aShapesOp = GetIShapesOperations(theStudy->StudyId());
+ GEOM::GEOM_IGroupOperations_var aGroupOp = GetIGroupOperations(theStudy->StudyId());
// Reconstruct arguments and tree of sub-shapes of the arguments
CORBA::String_var anIOR;
}
// Find a sub-shape of theObject in place of the argument
- GEOM::GEOM_Object_var aSubO = aShapesOp->GetInPlace(theObject, anArgO);
+ GEOM::GEOM_Object_var aSubO;
+ switch (theFindMethod) {
+ case GEOM::FSM_GetInPlace:
+ {
+ // Use GetInPlace
+ aSubO = aShapesOp->GetInPlace(theObject, anArgO);
+ }
+ break;
+ case GEOM::FSM_Transformed:
+ {
+ // transformation, cannot use GetInPlace, operate with indices
+ GEOM::ListOfLong_var anIDs = anArgO->GetSubShapeIndices();
+ if (anIDs->length() > 1) {
+ // group
+ aSubO = aGroupOp->CreateGroup(theObject, aGroupOp->GetType(anArgO));
+ if (!CORBA::is_nil(aSubO))
+ aGroupOp->UnionIDs(aSubO, anIDs);
+ }
+ else {
+ // single sub-shape
+ aSubO = aShapesOp->GetSubShape(theObject, anIDs[0]);
+ }
+ }
+ break;
+ case GEOM::FSM_GetSame:
+ {
+ // Use GetSame
+ aSubO = aShapesOp->GetSame(theObject, anArgO);
+ }
+ break;
+ case GEOM::FSM_GetShapesOnShape:
+ {
+ // Use GetShapesOnShape. Can work only on solids, so it has sense to search only solids
+ aSubO = aShapesOp->GetShapesOnShapeAsCompound(anArgO, theObject,
+ (short)GEOM::SOLID, GEOM::ST_ONIN);
+ }
+ break;
+ case GEOM::FSM_GetInPlaceByHistory:
+ {
+ // Use GetInPlaceByHistory
+ aSubO = aShapesOp->GetInPlaceByHistory(theObject, anArgO);
+ }
+ break;
+ default:
+ {}
+ }
+
if (!CORBA::is_nil(aSubO)) {
// Publish the sub-shape
TCollection_AsciiString aSubName ("from_");
if (!CORBA::is_nil(anArgSO)) {
// Restore published sub-shapes of the argument
- RestoreSubShapesOneLevel(theStudy, anArgSO, aSubSO, aSubO, isTrsf);
+ if (theFindMethod == GEOM::FSM_GetInPlaceByHistory)
+ // pass theObject, because only it has the history
+ RestoreSubShapesOneLevel(theStudy, anArgSO, aSubSO, theObject, theFindMethod);
+ else
+ RestoreSubShapesOneLevel(theStudy, anArgSO, aSubSO, aSubO, theFindMethod);
}
}
else { // GetInPlace failed, try to build from published parts
// Restore published sub-shapes of the argument
GEOM::ListOfGO_var aParts =
- RestoreSubShapesOneLevel(theStudy, anArgSO, aSubSO, theObject, isTrsf);
+ RestoreSubShapesOneLevel(theStudy, anArgSO, aSubSO, theObject, theFindMethod);
if (aParts->length() > 0) {
// try to build an argument from a set of its sub-shapes,
// function : RestoreSubShapesOneLevel
// purpose : Private method
//============================================================================
-GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr theStudy,
- SALOMEDS::SObject_ptr theOldSO,
- SALOMEDS::SObject_ptr theNewSO,
- GEOM::GEOM_Object_ptr theNewO,
- CORBA::Boolean isTrsf)
+GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr theStudy,
+ SALOMEDS::SObject_ptr theOldSO,
+ SALOMEDS::SObject_ptr theNewSO,
+ GEOM::GEOM_Object_ptr theNewO,
+ GEOM::find_shape_method theFindMethod)
{
int i = 0;
GEOM::ListOfGO_var aParts = new GEOM::ListOfGO;
SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
- // Get interface, containing method GetInPlace, which we will use to reconstruct sub-shapes
+ // Get interface, containing method, which we will use to reconstruct sub-shapes
GEOM::GEOM_IShapesOperations_var aShapesOp = GetIShapesOperations(theStudy->StudyId());
GEOM::GEOM_IGroupOperations_var aGroupOp = GetIGroupOperations(theStudy->StudyId());
if (!CORBA::is_nil(anOldSubO)) {
// Find a sub-shape of theNewO in place of anOldSubO
GEOM::GEOM_Object_var aNewSubO;
- if (isTrsf) {
- // transformation, cannot use GetInPlace, operate with indices
- GEOM::ListOfLong_var anIDs = anOldSubO->GetSubShapeIndices();
- if (anIDs->length() > 1) {
- // group
- aNewSubO = aGroupOp->CreateGroup(theNewO, aGroupOp->GetType(anOldSubO));
- if (!CORBA::is_nil(aNewSubO))
- aGroupOp->UnionIDs(aNewSubO, anIDs);
+ switch (theFindMethod) {
+ case GEOM::FSM_GetInPlace:
+ {
+ // Use GetInPlace
+ aNewSubO = aShapesOp->GetInPlace(theNewO, anOldSubO);
}
- else {
- // single sub-shape
- aNewSubO = aShapesOp->GetSubShape(theNewO, anIDs[0]);
+ break;
+ case GEOM::FSM_Transformed:
+ {
+ // transformation, cannot use GetInPlace, operate with indices
+ GEOM::ListOfLong_var anIDs = anOldSubO->GetSubShapeIndices();
+ if (anIDs->length() > 1) {
+ // group
+ aNewSubO = aGroupOp->CreateGroup(theNewO, aGroupOp->GetType(anOldSubO));
+ if (!CORBA::is_nil(aNewSubO))
+ aGroupOp->UnionIDs(aNewSubO, anIDs);
+ }
+ else {
+ // single sub-shape
+ aNewSubO = aShapesOp->GetSubShape(theNewO, anIDs[0]);
+ }
}
- }
- else {
- // not a transformation, so use GetInPlace
- aNewSubO = aShapesOp->GetInPlace(theNewO, anOldSubO);
+ break;
+ case GEOM::FSM_GetSame:
+ {
+ // Use GetSame
+ aNewSubO = aShapesOp->GetSame(theNewO, anOldSubO);
+ }
+ break;
+ case GEOM::FSM_GetShapesOnShape:
+ {
+ // Use GetShapesOnShape. Can work only on solids, so it has sense to search only solids
+ aNewSubO = aShapesOp->GetShapesOnShapeAsCompound(anOldSubO, theNewO,
+ (short)GEOM::SOLID, GEOM::ST_ONIN);
+ }
+ break;
+ case GEOM::FSM_GetInPlaceByHistory:
+ {
+ // Use GetInPlaceByHistory
+ aNewSubO = aShapesOp->GetInPlaceByHistory(theNewO, anOldSubO);
+ }
+ break;
+ default:
+ {}
}
if (!CORBA::is_nil(aNewSubO)) {
aNewSubO->SetColor(anOldSubO->GetColor());
// Restore published sub-shapes of the argument
- RestoreSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO, aNewSubO, isTrsf);
+ if (theFindMethod == GEOM::FSM_GetInPlaceByHistory)
+ // pass the main shape as Object, because only it has the history
+ RestoreSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO, theNewO, theFindMethod);
+ else
+ RestoreSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO, aNewSubO, theFindMethod);
}
else { // GetInPlace failed, try to build from published parts
SALOMEDS::SObject_var aNewSubSO = aStudyBuilder->NewObject(theNewSO);
// Restore published sub-shapes of the argument
GEOM::ListOfGO_var aParts =
- RestoreSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO, theNewO, isTrsf);
+ RestoreSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO, theNewO, theFindMethod);
if (aParts->length() > 0) {
// try to build an object from a set of its sub-shapes,
/*! \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments.
* To be used from python scripts out of geompy.addToStudy (non-default usage)
*/
- CORBA::Boolean RestoreSubShapesO (SALOMEDS::Study_ptr theStudy,
- GEOM::GEOM_Object_ptr theObject,
- const GEOM::ListOfGO& theArgs,
- CORBA::Boolean isTrsf);
+ CORBA::Boolean RestoreSubShapesO (SALOMEDS::Study_ptr theStudy,
+ GEOM::GEOM_Object_ptr theObject,
+ const GEOM::ListOfGO& theArgs,
+ GEOM::find_shape_method theFindMethod,
+ CORBA::Boolean theInheritFirstArg);
/*! \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments.
* To be used from GUI and from geompy.addToStudy
*/
- CORBA::Boolean RestoreSubShapesSO (SALOMEDS::Study_ptr theStudy,
- SALOMEDS::SObject_ptr theSObject,
- const GEOM::ListOfGO& theArgs,
- CORBA::Boolean isTrsf);
+ CORBA::Boolean RestoreSubShapesSO (SALOMEDS::Study_ptr theStudy,
+ SALOMEDS::SObject_ptr theSObject,
+ const GEOM::ListOfGO& theArgs,
+ GEOM::find_shape_method theFindMethod,
+ CORBA::Boolean theInheritFirstArg);
//-----------------------------------------------------------------------//
// Transaction methods //
virtual GEOM::GEOM_Object_ptr GetObject(CORBA::Long theStudyID, const char* theEntry);
private:
- GEOM::ListOfGO* RestoreSubShapesOneLevel (SALOMEDS::Study_ptr theStudy,
- SALOMEDS::SObject_ptr theOldSO,
- SALOMEDS::SObject_ptr theNewSO,
- GEOM::GEOM_Object_ptr theNewO,
- CORBA::Boolean isTrsf);
-
- CORBA::Boolean RestoreSubShapes (SALOMEDS::Study_ptr theStudy,
- GEOM::GEOM_Object_ptr theObject,
- SALOMEDS::SObject_ptr theSObject,
- const GEOM::ListOfGO& theArgs,
- CORBA::Boolean isTrsf);
+ GEOM::ListOfGO* RestoreSubShapesOneLevel (SALOMEDS::Study_ptr theStudy,
+ SALOMEDS::SObject_ptr theOldSO,
+ SALOMEDS::SObject_ptr theNewSO,
+ GEOM::GEOM_Object_ptr theNewO,
+ GEOM::find_shape_method theFindMethod);
+
+ CORBA::Boolean RestoreSubShapes (SALOMEDS::Study_ptr theStudy,
+ GEOM::GEOM_Object_ptr theObject,
+ SALOMEDS::SObject_ptr theSObject,
+ const GEOM::ListOfGO& theArgs,
+ GEOM::find_shape_method theFindMethod,
+ CORBA::Boolean theInheritFirstArg);
private:
# \param doRestoreSubShapes if True, finds and publishes also
# sub-shapes of \a aShape, corresponding to its arguments
# and published sub-shapes of arguments
- # \param theArgs,isTrsf see geompy.RestoreSubShapes for these arguments description
+ # \param theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes for
+ # these arguments description
# \return study entry of the published shape in form of string
#
# Example: see GEOM_TestAll.py
- def addToStudy(self, aShape, aName,
- doRestoreSubShapes=False, theArgs=[], isTrsf=False):
+ def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
+ theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
try:
aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
if doRestoreSubShapes:
- self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs, isTrsf)
+ self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
+ theFindMethod, theInheritFirstArg)
except:
print "addToStudy() failed"
return ""
# \param theObject published GEOM object, arguments of which will be published
# \param theArgs list of GEOM_Object, operation arguments to be published.
# If this list is empty, all operation arguments will be published
- # \param isTrsf If True, search sub-shapes by indices, as in case of
- # transformation they cannot be found by GetInPlace.
- # The argument itself is not published in this case,
- # because the whole shape corresponds to the argument.
+ # \param theFindMethod method to search subshapes, corresponding to arguments and
+ # their subshapes. Value from enumeration GEOM::find_shape_method.
+ # \param theInheritFirstArg set properties of the first argument for \a theObject.
+ # Do not publish subshapes in place of arguments, but only
+ # in place of subshapes of the first argument,
+ # because the whole shape corresponds to the first argument.
+ # Mainly to be used after transformations, but it also can be
+ # usefull after partition with one object shape, and some other
+ # operations, where only the first argument has to be considered.
+ # If theObject has only one argument shape, this flag is automatically
+ # considered as True, not regarding really passed value.
# \return True in case of success, False otherwise.
#
# Example: see GEOM_TestAll.py
- def RestoreSubShapes (self, theObject, theArgs=[], isTrsf=False):
- return self.RestoreSubShapesO(self.myStudy, theObject, theArgs, isTrsf)
+ def RestoreSubShapes (self, theObject, theArgs=[],
+ theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
+ return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
+ theFindMethod, theInheritFirstArg)
# -----------------------------------------------------------------------------
# Basic primitives
{
if (CheckBoxRestoreSS->isChecked()) {
// empty list of arguments means that all arguments should be restored
- getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(), /*isTrsf=*/false);
+ getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+ /*theFindMethod=*/GEOM::FSM_GetInPlaceByHistory,
+ /*theInheritFirstArg=*/myListShapes.length() == 1); // ? false
}
}
-// GEOM GEOMGUI : GUI for Geometry component
+// GEOM RepairGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
GroupPoints->TextLabel1->setText(tr("GEOM_SELECTED_SHAPE"));
GroupPoints->PushButton1->setPixmap(image1);
GroupPoints->LineEdit1->setReadOnly( true );
-
- int aWidth = GroupPoints->TextLabel1->sizeHint().width() +
- GroupPoints->PushButton1->sizeHint().width() +
+
+ int aWidth = GroupPoints->TextLabel1->sizeHint().width() +
+ GroupPoints->PushButton1->sizeHint().width() +
GroupPoints->getGroupBoxLayout()->spacing();
Layout1->addWidget(GroupPoints, 2, 0);
QHBox* aHBox = new QHBox( GroupPoints->GroupBox1 );
aHBox->setSpacing( 5 );
-
+
(new QLabel( tr( "GEOM_TOLERANCE" ), aHBox ))->setFixedWidth( aWidth );
myTolEdt = new QtxDblSpinBox( 0, 100, 1e-7, aHBox );
myTolEdt->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
/***************************************************************/
setHelpFileName("glue_faces_operation_page.html");
-
+
// Disable second way of gluing if OCC viewer is not active one
- if (SUIT_Session::session()->activeApplication()->desktop()->activeWindow()->getViewManager()->getType()
+ if (myGeomGUI->getApp()->desktop()->activeWindow()->getViewManager()->getType()
!= OCCViewer_Viewer::Type())
RadioButton2->setEnabled(false);
//myGeomGUI->SetState( 0 );
//globalSelection( GEOM_COMPOUND );
+ GroupBoxPublish->show();
+
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect( myTolEdt2, SIGNAL( valueChanged( double ) ), this, SLOT( onTolerChanged( double ) ) );
connect( mySubShapesChk, SIGNAL( stateChanged( int ) ), this, SLOT( onSubShapesChk() ) );
- connect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
+ connect( myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) );
connect(myDetectBtn, SIGNAL(clicked()), this, SLOT(onDetect()));
initName( tr( "GLUE_NEW_OBJ_NAME" ) );
ConstructorsClicked(0);
-
+
activateSelection();
updateButtonState();
}
{
if ( myCurrConstrId == constructorId )
return;
-
- disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0);
-
+
+ disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
+
switch ( constructorId )
{
case 0:
GroupPoints->show();
GroupPoints->LineEdit1->setText( "" );
myEditCurrentArgument = GroupPoints->LineEdit1;
-
+
if ( myCurrConstrId >= 0 ) // i.e. it is not initialisation
{
// copy tolerance from previous tolerance field
myTolEdt->setValue( myTolEdt2->value() );
}
-
+
break;
}
case 1:
GroupPoints2->show();
GroupPoints->LineEdit1->setText("");
myEditCurrentArgument = GroupPoints2->LineEdit1;
-
+
if ( myCurrConstrId >= 0 ) // i.e. it is not initialisation
{
// copy tolerance from previous tolerance field
mySubShapesChk->setChecked( false );
clearTemporary();
}
-
+
break;
}
}
-
- myCurrConstrId = constructorId;
+
+ myCurrConstrId = constructorId;
myEditCurrentArgument->setFocus();
- connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
+ connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
qApp->processEvents();
updateGeometry();
QSize aSize = minimumSizeHint();
resize( width(), aSize.height() );
-
+
displayPreview();
updateButtonState();
activateSelection();
updateButtonState();
return;
}
-
+
erasePreview();
myEditCurrentArgument->setText("");
myObject = GEOM::GEOM_Object::_nil();
void RepairGUI_GlueDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
- connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
+ connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
//GroupPoints->LineEdit1->setText("");
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void RepairGUI_GlueDlg::closeEvent(QCloseEvent* e)
-{
- //myGeomGUI->SetState( -1 );
- GEOMBase_Skeleton::closeEvent( e );
-}
-
-
//=================================================================================
// function : createOperation
// purpose :
// Get names of selected objects
SALOME_ListIteratorOfListIO it ( selectedIO() );
- for (; it.More(); it.Next())
+ for (; it.More(); it.Next())
selected.insert( it.Value()->getName(), 0 );
// Iterate through result and select objects with names from selection
// ObjectList toRemoveFromEnggine;
ObjectList toGlue;
ObjectList::iterator anIter;
- for (anIter = myTmpObjs.begin(); anIter != myTmpObjs.end(); ++anIter)
+ for (anIter = myTmpObjs.begin(); anIter != myTmpObjs.end(); ++anIter)
{
if ( selected.contains( myGeomGUI->getApp()->orb()->object_to_string(*anIter) ) )
toGlue.push_back(*anIter);
return aResult;
}
+//=================================================================================
+// function : restoreSubShapes
+// purpose :
+//=================================================================================
+void RepairGUI_GlueDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
+ SALOMEDS::SObject_ptr theSObject)
+{
+ if (CheckBoxRestoreSS->isChecked()) {
+ GEOM::find_shape_method aFindMethod = GEOM::FSM_GetInPlace;
+ if (getConstructorId() == 0) // MakeGlueFaces
+ aFindMethod = GEOM::FSM_GetInPlaceByHistory;
+
+ // empty list of arguments means that all arguments should be restored
+ getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+ aFindMethod, /*theInheritFirstArg=*/true);
+ }
+}
//================================================================
// Function : clearShapeBufferLocal
-// Purpose :
+// Purpose :
//================================================================
void RepairGUI_GlueDlg::clearShapeBufferLocal( GEOM::GEOM_Object_ptr theObj )
{
if ( anIt->Value()->FindAttribute(anAttr, "AttributeIOR") ) {
_PTR(AttributeIOR) anIOR ( anAttr );
TCollection_AsciiString asciiIOR( (char*)anIOR->Value().c_str() );
- myGeomGUI->GetShapeReader().RemoveShapeFromBuffer( asciiIOR );
+ myGeomGUI->GetShapeReader().RemoveShapeFromBuffer( asciiIOR );
}
}
}
//================================================================
// Function : onAccept
// Purpose : This method should be called from dialog's slots onOk() and onApply()
-// It perfroms user input validation, then it
+// It perfroms user input validation, then it
// performs a proper operation and manages transactions, etc.
//================================================================
bool RepairGUI_GlueDlg::onAcceptLocal()
_PTR(Study) aStudy = getStudy()->studyDS();
bool aLocked = aStudy->GetProperties()->IsLocked();
- if ( aLocked )
+ if ( aLocked )
{
MESSAGE("GEOMBase_Helper::onAccept - ActiveStudy is locked");
- SUIT_MessageBox::warn1 ( (QWidget*)(SUIT_Session::session()->activeApplication()->desktop()),
+ SUIT_MessageBox::warn1 ( (QWidget*)(myGeomGUI->getApp()->desktop()),
QObject::tr("WRN_WARNING"), QObject::tr("WRN_STUDY_LOCKED"), QObject::tr("BUT_OK") );
return false;
}
QString msg;
- if ( !isValid( msg ) )
+ if ( !isValid( msg ) )
{
showError( msg );
return false;
erasePreview( false );
- try
+ try
{
- if ( openCommand() )
+ if ( openCommand() )
{
SUIT_OverrideCursor wc;
- SUIT_Session::session()->activeApplication()->putInfo( "" );
+ myGeomGUI->getApp()->putInfo( "" );
ObjectList objects;
-
- if ( !execute( objects ) )
- {
+
+ if ( !execute( objects ) )
+ {
wc.suspend();
abortCommand();
showError();
}
- else
+ else
{
const int nbObjs = objects.size();
- bool withChildren = false;
- for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it )
+ for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it )
{
- QString aName("");
+ QString aName = getNewObjectName();
if ( nbObjs > 1 )
{
- aName = strlen( getNewObjectName() ) ? GEOMBase::GetDefaultName( getNewObjectName() ) : GEOMBase::GetDefaultName( getPrefix( *it ) );
+ if (aName.isEmpty())
+ aName = getPrefix(*it);
+ aName = GEOMBase::GetDefaultName(aName);
}
- else
+ else
{
- aName = getNewObjectName();
// PAL6521: use a prefix, if some dialog box doesn't reimplement getNewObjectName()
- if ( aName.isEmpty() )
+ if (aName.isEmpty())
aName = GEOMBase::GetDefaultName( getPrefix( *it ) );
}
addInStudy( *it, aName.latin1() );
- withChildren = false;
display( *it, false );
}
- if ( nbObjs )
+ if ( nbObjs )
{
commitCommand();
updateObjBrowser();
- SUIT_Session::session()->activeApplication()->putInfo( QObject::tr("GEOM_PRP_DONE") );
+ myGeomGUI->getApp()->putInfo( QObject::tr("GEOM_PRP_DONE") );
}
- else
+ else
{
abortCommand();
}
// JFA 28.12.2004 BEGIN // To enable warnings
- if ( !getOperation()->_is_nil() )
+ if ( !getOperation()->_is_nil() )
{
- if ( !getOperation()->IsDone() )
+ if ( !getOperation()->IsDone() )
{
wc.suspend();
QString msgw = QObject::tr( getOperation()->GetErrorCode() );
- SUIT_MessageBox::warn1((QWidget*)(SUIT_Session::session()->activeApplication()->desktop()),
- QObject::tr( "WRN_WARNING" ),
- msgw,
+ SUIT_MessageBox::warn1((QWidget*)(myGeomGUI->getApp()->desktop()),
+ QObject::tr( "WRN_WARNING" ),
+ msgw,
QObject::tr( "BUT_OK" ));
}
}
}
}
}
- catch( const SALOME::SALOME_Exception& e )
+ catch( const SALOME::SALOME_Exception& e )
{
SalomeApp_Tools::QtCatchCorbaException( e );
abortCommand();
GEOM::ListOfGO_var aList = GEOM::GEOM_IShapesOperations::_narrow
( getOperation() )->GetGlueFaces( myObject, myTolEdt2->value() );
-
- for (int i = 0, n = aList->length(); i < n; i++)
+
+ for (int i = 0, n = aList->length(); i < n; i++)
myTmpObjs.push_back(GEOM::GEOM_Object::_duplicate(aList[i]));
-
+
if ( myTmpObjs.size() > 0 )
{
msg = tr( "FACES_FOR_GLUING_ARE_DETECTED" ).arg( myTmpObjs.size() );
{
msg = tr( "THERE_ARE_NO_FACES_FOR_GLUING" );
}
-
- connect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
- SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) ) ;
+
+ connect( myGeomGUI->getApp()->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) );
SUIT_MessageBox::info1( this, tr( "GEOM_FREE_BOUNDS_TLT" ), msg, "Close" );
updateButtonState();
activateSelection();
void RepairGUI_GlueDlg::activateSelection()
{
erasePreview(false);
-
+
int anId = getConstructorId();
if ( anId == 0 ) // Case of whole gluing
{
- disconnect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
- SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) ) ;
-
+ disconnect( myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
+ this, SLOT(SelectionIntoArgument()) );
+
globalSelection( GEOM_ALLSHAPES );
- if (myObject->_is_nil())
+ if (myObject->_is_nil())
SelectionIntoArgument();
- connect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
- SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) ) ;
- }
+ connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
+ this, SLOT(SelectionIntoArgument()) );
+ }
else // Second case of gluing
{
- if ( !mySubShapesChk->isChecked() )
+ if ( !mySubShapesChk->isChecked() )
globalSelection( GEOM_ALLSHAPES );
- else
+ else
{
displayPreview( true, false, false, 2/*line width*/, 1/*display mode*/, Quantity_NOC_RED );
- disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
- SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) ) ;
+ disconnect(myGeomGUI->getApp()->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) );
globalSelection( GEOM_PREVIEW );
- connect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
- SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) ) ;
- }
+ connect( myGeomGUI->getApp()->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) );
+ }
}
updateViewer();
}
//=================================================================================
// function : updateButtonState
-// purpose : Update button state
+// purpose : Update button state
//=================================================================================
void RepairGUI_GlueDlg::updateButtonState()
{
clearTemporary();
GEOMBase_Skeleton::ClickOnCancel();
}
-
-//================================================================
-// Function : getEntry
-// Purpose :
-//================================================================
-static string getEntry( GEOM::GEOM_Object_ptr object )
-{
- SUIT_Session* session = SUIT_Session::session();
- SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( session->activeApplication() );
- if ( app )
- {
- string IOR = app->orb()->object_to_string( object );
- if ( IOR != "" )
- {
- SalomeApp_Study* study = ( SalomeApp_Study* )app->activeStudy();
- _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( IOR ) );
- if ( SO )
- return SO->GetID();
- }
- }
- return "";
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& objects );
+ virtual void restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
private:
void Init();
void enterEvent(QEvent* e);
- void closeEvent(QCloseEvent* e);
void initSelection();
void clearTemporary();
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// GEOM RepairGUI : GUI for Geometry component
+//
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
// File : RepairGUI_RemoveExtraEdgesDlg.cxx
// Author : Michael Zorin
// Module : GEOM
-// $Header:
+// $Header$
#include "RepairGUI_RemoveExtraEdgesDlg.h"
#include <TColStd_MapOfInteger.hxx>
#include <qlabel.h>
-
-using namespace std;
+#include <qcheckbox.h>
//=================================================================================
// class : RepairGUI_RemoveExtraEdgesDlg()
:GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize |
WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{
- QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_REMOVE_EXTRA_EDGES")));
- QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
-
+ SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
+ QPixmap image0(aResMgr->loadPixmap("GEOM",tr("ICON_DLG_REMOVE_EXTRA_EDGES")));
+ QPixmap image1(aResMgr->loadPixmap("GEOM",tr("ICON_SELECT")));
+
setCaption(tr("GEOM_REMOVE_EXTRA_EDGES_TITLE"));
/***************************************************************/
Layout1->addWidget(GroupPoints, 2, 0);
/***************************************************************/
-
+
setHelpFileName("remove_extra_edges_operation_page.html");
Init();
{
/* init variables */
myEditCurrentArgument = GroupPoints->LineEdit1;
-
+
myOkObject = false;
activateSelection();
-
+
+ GroupBoxPublish->show();
+
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
- connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
- SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+ connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
+ this, SLOT(SelectionIntoArgument()));
initName( tr( "REMOVE_EXTRA_EDGES_NEW_OBJ_NAME" ) );
}
myEditCurrentArgument->setText("");
myObject = GEOM::GEOM_Object::_nil();
-
+
activateSelection();
return true;
{
myEditCurrentArgument->setText("");
QString aName;
-
+
if(myEditCurrentArgument == GroupPoints->LineEdit1) {
if (IObjectCount() != 1) {
if (myEditCurrentArgument == GroupPoints->LineEdit1)
return;
}
}
-
+
// nbSel == 1
Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_ptr aSelectedObject =
if (!testResult)
return;
-
+
if (myEditCurrentArgument == GroupPoints->LineEdit1) {
myObject = aSelectedObject;
myOkObject = true;
void RepairGUI_RemoveExtraEdgesDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
- connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
- SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+ connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
+ this, SLOT(SelectionIntoArgument()));
activateSelection();
}
bool RepairGUI_RemoveExtraEdgesDlg::execute( ObjectList& objects )
{
GEOM::GEOM_Object_var anObj;
-
+
anObj = GEOM::GEOM_IBlocksOperations::_narrow(getOperation())->RemoveExtraEdges(myObject);
-
+
if ( !anObj->_is_nil() )
objects.push_back( anObj._retn() );
return true;
}
+
+//=================================================================================
+// function : restoreSubShapes
+// purpose :
+//=================================================================================
+void RepairGUI_RemoveExtraEdgesDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
+ SALOMEDS::SObject_ptr theSObject)
+{
+ if (CheckBoxRestoreSS->isChecked()) {
+ // empty list of arguments means that all arguments should be restored
+ getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+ /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GetInPlaceByHistory
+ /*theInheritFirstArg=*/true);
+ }
+}
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& objects );
+ virtual void restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
private :
void Init();
{
if (CheckBoxRestoreSS->isChecked()) {
// empty list of arguments means that all arguments should be restored
- getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(), /*isTrsf=*/true);
+ getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+ /*theFindMethod=*/GEOM::FSM_Transformed,
+ /*theInheritFirstArg=*/true);
}
}
{
if (CheckBoxRestoreSS->isChecked()) {
// empty list of arguments means that all arguments should be restored
- getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(), /*isTrsf=*/true);
+ getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+ /*theFindMethod=*/GEOM::FSM_Transformed,
+ /*theInheritFirstArg=*/true);
}
}
{
if (CheckBoxRestoreSS->isChecked()) {
// empty list of arguments means that all arguments should be restored
- getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(), /*isTrsf=*/true);
+ getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+ /*theFindMethod=*/GEOM::FSM_Transformed,
+ /*theInheritFirstArg=*/true);
}
}
{
if (CheckBoxRestoreSS->isChecked()) {
// empty list of arguments means that all arguments should be restored
- getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(), /*isTrsf=*/true);
+ getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+ /*theFindMethod=*/GEOM::FSM_Transformed,
+ /*theInheritFirstArg=*/true);
}
}
{
if (CheckBoxRestoreSS->isChecked()) {
// empty list of arguments means that all arguments should be restored
- getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(), /*isTrsf=*/true);
+ getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+ /*theFindMethod=*/GEOM::FSM_Transformed,
+ /*theInheritFirstArg=*/true);
}
}
{
if (CheckBoxRestoreSS->isChecked()) {
// empty list of arguments means that all arguments should be restored
- getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(), /*isTrsf=*/true);
+ getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+ /*theFindMethod=*/GEOM::FSM_Transformed,
+ /*theInheritFirstArg=*/true);
}
}