]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0022490: [CEA 1057] Default tick of "Detect self-intersections" in Partition
authorskv <skv@opencascade.com>
Wed, 26 Feb 2014 09:13:55 +0000 (13:13 +0400)
committerskv <skv@opencascade.com>
Wed, 26 Feb 2014 09:13:55 +0000 (13:13 +0400)
12 files changed:
doc/salome/gui/GEOM/images/partition1.png [changed mode: 0755->0644]
doc/salome/gui/GEOM/images/partition2.png [changed mode: 0755->0644]
doc/salome/gui/GEOM/input/partition.doc [changed mode: 0644->0755]
idl/GEOM_Gen.idl
src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx
src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx
src/GEOMImpl/GEOMImpl_PartitionDriver.cxx
src/GEOM_I/GEOM_IBooleanOperations_i.cc
src/GEOM_I/GEOM_IBooleanOperations_i.hh
src/GEOM_I_Superv/GEOM_Superv_i.cc
src/GEOM_SWIG/geomBuilder.py
src/OperationGUI/OperationGUI_PartitionDlg.cxx

old mode 100755 (executable)
new mode 100644 (file)
index c36e8b1..f221399
Binary files a/doc/salome/gui/GEOM/images/partition1.png and b/doc/salome/gui/GEOM/images/partition1.png differ
old mode 100755 (executable)
new mode 100644 (file)
index 0035cce..4ea865e
Binary files a/doc/salome/gui/GEOM/images/partition2.png and b/doc/salome/gui/GEOM/images/partition2.png differ
old mode 100644 (file)
new mode 100755 (executable)
index 30ac52b..48d56c0
@@ -51,10 +51,11 @@ In this case the Partition algorithm will work faster, but the result might diff
 default behavior.
 
 <b>Detect Self-intersections</b> check box is used to check self-intersection of arguments.
-- If this option is switched on (by default), each input shape is checked for self-intersection.
+It is enabled only if <b>No sub-shapes intersection (Compounds only)</b> is checked.
+- If this option is switched off (by default), the partition algorithm is
+performed without self-intersection checks.
+- If this option is switched on, each input shape is checked for self-intersection.
 If self-intersection is detected, the operation is aborted.
-- If this option is switched off, the partition algorithm is performed without self-intersection
-checks.
 
 \note This algorithm does not find all types of self-intersections. It is tuned
       to detect vertex/vertex, vertex/edge, edge/edge, vertex/face and edge/face
@@ -75,7 +76,7 @@ checks.
 
 <em>geompy.MakePartition(ListOfShapes, ListOfTools, ListOfKeepInside,
 ListOfRemoveInside, Limit, RemoveWebs, ListOfMaterials,
-KeepNonlimitShapes, checkSelfInte)</em>
+KeepNonlimitShapes)</em>
 
 <b>TUI Command (without sub-shapes intersection):</b>
 
@@ -105,11 +106,9 @@ Activate \ref restore_presentation_parameters_page "Advanced options" if require
 
 <b>TUI Command:</b>
 
-<em>geompy.MakeHalfPartition(Shape, Plane, checkSelfInte)</em>, where:
+<em>geompy.MakeHalfPartition(Shape, Plane)</em>, where:
 - \em Shape is a source shape to be intersected by the \em Plane
 - \em Plane is a tool shape, to intersect the \em Shape.
-- \em checkSelfInte is a flag that indicates if the arguments should
-be checked for self-intersection prior to the operation.
 
 <b>Examples:</b>
 
index 630b6606724ad7601d62a9300ba36bb5a1519915..f7af6efcb293f88531e8bb16f405c97ceca94a2f 100644 (file)
@@ -2968,8 +2968,6 @@ module GEOM
      *         Each shape from theRemoveInside must belong to theShapes also.
      *  \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
      *  \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
-     *  \param IsCheckSelfInte If TRUE, perform check self intersection
-     *                         of arguments before an operation.
      *
      *  \return New GEOM_Object, containing the result shapes.
      */
@@ -2980,8 +2978,7 @@ module GEOM
                                in short      theLimit,
                                in boolean    theRemoveWebs,
                                in ListOfLong theMaterials,
-                               in short      theKeepNonlimitShapes,
-                               in boolean    IsCheckSelfInte);
+                               in short      theKeepNonlimitShapes);
 
     /*!
      *  \brief Perform partition operation.
@@ -2990,7 +2987,10 @@ module GEOM
      *  a compound containing nonintersected shapes. Performance will be better
      *  since intersection between shapes from compound is not performed.
      *
-     *  Description of all parameters as in previous method MakePartition()
+     *  Description of all parameters as in previous method MakePartition().
+     *  One additional parameter is provided:
+     *  \param IsCheckSelfInte If TRUE, perform check self intersection
+     *                         of arguments before an operation.
      *
      *  \note Passed compounds (via ListShapes or via ListTools)
      *        have to consist of nonintersecting shapes.
@@ -3011,13 +3011,10 @@ module GEOM
      *  \brief Perform partition of the Shape with the Plane
      *  \param theShape Shape to be intersected.
      *  \param thePlane Tool shape, to intersect theShape.
-     *  \param IsCheckSelfInte If TRUE, perform check self intersection
-     *                         of arguments before an operation.
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
-                                   in GEOM_Object thePlane,
-                                   in boolean     IsCheckSelfInte);
+                                   in GEOM_Object thePlane);
   };
 
  // # GEOM_ICurvesOperations:
index 8b2b2a1e9814e0ea1a6cbb9cad7e0f815cea70a5..a503e4c0931443aa7b0ffe3319c3fa5fff4fe997 100644 (file)
@@ -492,7 +492,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition
   }
   pd << "], " << theKeepNonlimitShapes;
 
-  if (IsCheckSelfInte) {
+  if (IsCheckSelfInte && !thePerformSelfIntersections) {
     pd << ", True";
   }
 
@@ -508,8 +508,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition
  */
 //=============================================================================
 Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeHalfPartition
-       (Handle(GEOM_Object) theShape, Handle(GEOM_Object) thePlane,
-        const Standard_Boolean IsCheckSelfInte)
+       (Handle(GEOM_Object) theShape, Handle(GEOM_Object) thePlane)
 {
   SetErrorCode(KO);
 
@@ -535,7 +534,6 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeHalfPartition
 
   aCI.SetShape(aRef1);
   aCI.SetPlane(aRef2);
-  aCI.SetCheckSelfIntersection(IsCheckSelfInte);
 
   //Compute the Partition value
   try {
@@ -556,13 +554,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeHalfPartition
   //Make a Python command
   GEOM::TPythonDump pd (aFunction);
   pd << aPart << " = geompy.MakeHalfPartition("
-     << theShape << ", " << thePlane;
-
-  if (IsCheckSelfInte) {
-    pd << ", True";
-  }
-
-  pd << ")";
+     << theShape << ", " << thePlane << ")";
 
   SetErrorCode(OK);
   return aPart;
index 6fb71258948520262f4f759ce5f6a392b301726f..8db023a0117f1eccd3f6e20469cded62c15ba202 100644 (file)
@@ -68,8 +68,7 @@ class GEOMImpl_IBooleanOperations : public GEOM_IOperations {
                    const Standard_Boolean IsCheckSelfInte);
 
   Standard_EXPORT Handle(GEOM_Object) MakeHalfPartition (Handle(GEOM_Object)    theShape,
-                                                         Handle(GEOM_Object)    thePlane,
-                                                         const Standard_Boolean IsCheckSelfInte);
+                                                         Handle(GEOM_Object)    thePlane);
 
 private:
 
index 97625c539c359cfb8109191eea93beab05cec1f7..c50b0a86addd27bcd9770953af2552b8dcb9e9b0 100644 (file)
@@ -174,7 +174,7 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const
       }
 
       // Check self-intersection.
-      if (isCheckSelfInte) {
+      if (isCheckSelfInte && aType == PARTITION_NO_SELF_INTERSECTIONS) {
         CheckSelfIntersection(aShape_i);
       }
 
@@ -216,7 +216,7 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const
       }
 
       // Check self-intersection.
-      if (isCheckSelfInte) {
+      if (isCheckSelfInte && aType == PARTITION_NO_SELF_INTERSECTIONS) {
         CheckSelfIntersection(aShape_i);
       }
 
@@ -359,12 +359,6 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const
       Standard_NullObject::Raise("In Half Partition a shape or a plane is null");
     }
 
-    // Check self-intersection.
-    if (isCheckSelfInte) {
-      CheckSelfIntersection(aShapeArg);
-      CheckSelfIntersection(aPlaneArg);
-    }
-
     TopoDS_Shape aShapeArg_copy;
     TopoDS_Shape aPlaneArg_copy;
     {
@@ -405,8 +399,20 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const
     }
 
     // add object shapes that are in ListShapes;
-    PS.AddArgument(aShapeArg_copy);
-    //PS.AddShape(aShapeArg);
+    TopTools_ListOfShape aSimpleShapes;
+    TopTools_MapOfShape aShapesMap;
+
+    PrepareShapes(aShapeArg_copy, aType, aSimpleShapes);
+
+    TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes);
+
+    for (; aSimpleIter.More(); aSimpleIter.Next()) {
+      const TopoDS_Shape& aSimpleSh = aSimpleIter.Value();
+
+      if (aShapesMap.Add(aSimpleSh)) {
+        PS.AddArgument(aSimpleSh);
+      }
+    }
 
     // add tool shapes that are in ListTools and not in ListShapes;
     PS.AddTool(aPlaneArg_copy);
@@ -560,6 +566,10 @@ GetCreationInformation(std::string&             theOperationName,
     AddParam( theParams, "Resulting type", (TopAbs_ShapeEnum) aCI.GetLimit());
     AddParam( theParams, "Keep shapes of lower type", aCI.GetKeepNonlimitShapes());
     AddParam( theParams, "No object intersections", ( aType == PARTITION_NO_SELF_INTERSECTIONS ));
+
+    if (aType == PARTITION_NO_SELF_INTERSECTIONS) {
+      AddParam( theParams, "Check self-intersections", aCI.GetCheckSelfIntersection());
+    }
     break;
   case PARTITION_HALF:
     AddParam( theParams, "Object", aCI.GetShape() );
index 2d56814e132eecef97b821e0583bddcea7e24d9b..66dbcd625e3740235ad3330d52973ba3a2677596 100644 (file)
@@ -200,8 +200,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition
                                        CORBA::Short            theLimit,
                                        CORBA::Boolean          theRemoveWebs,
                                        const GEOM::ListOfLong& theMaterials,
-                                       CORBA::Short theKeepNonlimitShapes,
-                                       CORBA::Boolean          IsCheckSelfInte)
+                                       CORBA::Short theKeepNonlimitShapes)
 {
   GEOM::GEOM_Object_var aGEOMObject;
 
@@ -235,7 +234,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition
                                    theLimit, theRemoveWebs, aMaterials,
                                    theKeepNonlimitShapes,
                                    /*PerformSelfIntersections*/Standard_True,
-                                   IsCheckSelfInte);
+                                   /*IsCheckSelfInte*/Standard_False);
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
 
@@ -304,8 +303,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartitionNonSelfIntersected
 //=============================================================================
 GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakeHalfPartition
                                                  (GEOM::GEOM_Object_ptr theShape,
-                                                  GEOM::GEOM_Object_ptr thePlane,
-                                                  CORBA::Boolean        IsCheckSelfInte)
+                                                  GEOM::GEOM_Object_ptr thePlane)
 {
   GEOM::GEOM_Object_var aGEOMObject;
 
@@ -320,7 +318,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakeHalfPartition
 
   // Make Half Partition
   Handle(GEOM_Object) anObject =
-    GetOperations()->MakeHalfPartition(aSh, aPl, IsCheckSelfInte);
+    GetOperations()->MakeHalfPartition(aSh, aPl);
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
 
index 5d1c3489bc71761194fb4b5131585ad733f69d87..dea57d833b5be75ac88a359f221a9661ea0e1cdd 100644 (file)
@@ -64,8 +64,7 @@ class GEOM_I_EXPORT GEOM_IBooleanOperations_i :
                                       CORBA::Short            theLimit,
                                       CORBA::Boolean          theRemoveWebs,
                                       const GEOM::ListOfLong& theMaterials,
-                                      CORBA::Short theKeepNonlimitShapes,
-                                       CORBA::Boolean          IsCheckSelfInte);
+                                      CORBA::Short theKeepNonlimitShapes);
 
   GEOM::GEOM_Object_ptr MakePartitionNonSelfIntersectedShape (const GEOM::ListOfGO&   theShapes,
                                                              const GEOM::ListOfGO&   theTools,
@@ -79,8 +78,7 @@ class GEOM_I_EXPORT GEOM_IBooleanOperations_i :
 
 
   GEOM::GEOM_Object_ptr MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
-                                          GEOM::GEOM_Object_ptr thePlane,
-                                           CORBA::Boolean        IsCheckSelfInte);
+                                          GEOM::GEOM_Object_ptr thePlane);
 
   ::GEOMImpl_IBooleanOperations* GetOperations()
   { return (::GEOMImpl_IBooleanOperations*)GetImpl(); }
index 708f793dc45e6b94e2fead2131ad7241216d4c37..71e38f9d2e7f4ac41ea3feb34afc505033eff666 100644 (file)
@@ -1528,7 +1528,7 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (GEOM::GEOM_List_ptr   theSha
       myBoolOp->MakePartition(aListImplS->GetList(), aListImplT->GetList(),
                               aListImplKI->GetList(), aListImplRI->GetList(),
                               theLimit, theRemoveWebs, aListImplM->GetList(),
-                              theKeepNonlimitShapes, false);
+                              theKeepNonlimitShapes);
     endService( " GEOM_Superv_i::MakePartition" );
     return anObj;
   }
@@ -1546,7 +1546,7 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHalfPartition (GEOM::GEOM_Object_ptr th
   MESSAGE("GEOM_Superv_i::MakeHalfPartition");
   getBoolOp();
   GEOM::GEOM_Object_ptr anObj =
-    myBoolOp->MakeHalfPartition(theShape, thePlane, false);
+    myBoolOp->MakeHalfPartition(theShape, thePlane);
   endService( " GEOM_Superv_i::MakeHalfPartition" );
   return anObj;
 }
index 9b1a12a2786eab8b620005583a3dd7c28348f495..62bf941d0872649cbf16156327594edf9849c580 100644 (file)
@@ -7115,16 +7115,6 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         #                             target type (equal to Limit) are kept in the result,
         #                             else standalone shapes of lower dimension
         #                             are kept also (if they exist).
-        #  @param checkSelfInte The flag that tells if the arguments should
-        #         be checked for self-intersection prior to the operation.
-        #
-        #  @note This algorithm doesn't find all types of self-intersections.
-        #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
-        #        vertex/face and edge/face intersections. Face/face
-        #        intersections detection is switched off as it is a
-        #        time-consuming operation that gives an impact on performance.
-        #        To find all self-intersections please use
-        #        CheckSelfIntersections() method.
         #
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
@@ -7149,7 +7139,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         #  @ref tui_partition "Example"
         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
-                          KeepNonlimitShapes=0, checkSelfInte=False, theName=None):
+                          KeepNonlimitShapes=0, theName=None):
             """
             Perform partition operation.
 
@@ -7163,18 +7153,6 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                                     target type (equal to Limit) are kept in the result,
                                     else standalone shapes of lower dimension
                                     are kept also (if they exist).
-                checkSelfInte The flag that tells if the arguments should
-                              be checked for self-intersection prior to
-                              the operation.
-
-            Note:
-                    This algorithm doesn't find all types of self-intersections.
-                    It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
-                    vertex/face and edge/face intersections. Face/face
-                    intersections detection is switched off as it is a
-                    time-consuming operation that gives an impact on performance.
-                    To find all self-intersections please use
-                    CheckSelfIntersections() method.
 
                 theName Object name; when specified, this parameter is used
                         for result publication in the study. Otherwise, if automatic
@@ -7209,7 +7187,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
                                               ListKeepInside, ListRemoveInside,
                                               Limit, RemoveWebs, ListMaterials,
-                                              KeepNonlimitShapes, checkSelfInte);
+                                              KeepNonlimitShapes);
             RaiseIfFailed("MakePartition", self.BoolOp)
             self._autoPublish(anObj, theName, "partition")
             return anObj
@@ -7219,7 +7197,18 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         #  compound contains nonintersected shapes. Performance will be better
         #  since intersection between shapes from compound is not performed.
         #
-        #  Description of all parameters as in previous method MakePartition()
+        #  Description of all parameters as in previous method MakePartition().
+        #  One additional parameter is provided:
+        #  @param checkSelfInte The flag that tells if the arguments should
+        #         be checked for self-intersection prior to the operation.
+        #
+        #  @note This algorithm doesn't find all types of self-intersections.
+        #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
+        #        vertex/face and edge/face intersections. Face/face
+        #        intersections detection is switched off as it is a
+        #        time-consuming operation that gives an impact on performance.
+        #        To find all self-intersections please use
+        #        CheckSelfIntersections() method.
         #
         #  @note Passed compounds (via ListShapes or via ListTools)
         #           have to consist of nonintersecting shapes.
@@ -7239,7 +7228,20 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             since intersection between shapes from compound is not performed.
 
             Parameters: 
-                Description of all parameters as in method geompy.MakePartition
+                Description of all parameters as in method geompy.MakePartition.
+                One additional parameter is provided:
+                checkSelfInte The flag that tells if the arguments should
+                              be checked for self-intersection prior to
+                              the operation.
+
+            Note:
+                    This algorithm doesn't find all types of self-intersections.
+                    It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
+                    vertex/face and edge/face intersections. Face/face
+                    intersections detection is switched off as it is a
+                    time-consuming operation that gives an impact on performance.
+                    To find all self-intersections please use
+                    CheckSelfIntersections() method.
         
             NOTE:
                 Passed compounds (via ListShapes or via ListTools)
@@ -7268,7 +7270,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         #  \n @ref swig_Partition "Example 2"
         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
-                      KeepNonlimitShapes=0, checkSelfInte=False, theName=None):
+                      KeepNonlimitShapes=0, theName=None):
             """
             See method geompy.MakePartition for more information.
             """
@@ -7277,58 +7279,35 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             anObj = self.MakePartition(ListShapes, ListTools,
                                        ListKeepInside, ListRemoveInside,
                                        Limit, RemoveWebs, ListMaterials,
-                                       KeepNonlimitShapes, checkSelfInte,
-                                       theName);
+                                       KeepNonlimitShapes, theName);
             return anObj
 
         ## Perform partition of the Shape with the Plane
         #  @param theShape Shape to be intersected.
         #  @param thePlane Tool shape, to intersect theShape.
-        #  @param checkSelfInte The flag that tells if the arguments should
-        #         be checked for self-intersection prior to the operation.
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
         #         publication is switched on, default value is used for result name.
         #
-        #  @note This algorithm doesn't find all types of self-intersections.
-        #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
-        #        vertex/face and edge/face intersections. Face/face
-        #        intersections detection is switched off as it is a
-        #        time-consuming operation that gives an impact on performance.
-        #        To find all self-intersections please use
-        #        CheckSelfIntersections() method.
-        #
         #  @return New GEOM.GEOM_Object, containing the result shape.
         #
         #  @ref tui_partition "Example"
-        def MakeHalfPartition(self, theShape, thePlane, checkSelfInte=False, theName=None):
+        def MakeHalfPartition(self, theShape, thePlane, theName=None):
             """
             Perform partition of the Shape with the Plane
 
             Parameters: 
                 theShape Shape to be intersected.
                 thePlane Tool shape, to intersect theShape.
-                checkSelfInte The flag that tells if the arguments should
-                              be checked for self-intersection prior to
-                              the operation.
                 theName Object name; when specified, this parameter is used
                         for result publication in the study. Otherwise, if automatic
                         publication is switched on, default value is used for result name.
 
-            Note:
-                    This algorithm doesn't find all types of self-intersections.
-                    It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
-                    vertex/face and edge/face intersections. Face/face
-                    intersections detection is switched off as it is a
-                    time-consuming operation that gives an impact on performance.
-                    To find all self-intersections please use
-                    CheckSelfIntersections() method.
-
             Returns:  
                 New GEOM.GEOM_Object, containing the result shape.
             """
             # Example: see GEOM_TestAll.py
-            anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane, checkSelfInte)
+            anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
             self._autoPublish(anObj, theName, "partition")
             return anObj
index b6f4cb9d07ef07ec3422c85342d4747699f3729b..07ea18eb4c6a63f940499f785700b2bc95f96d0d 100644 (file)
@@ -144,7 +144,7 @@ void OperationGUI_PartitionDlg::Init()
   GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_VERTEX" ) );
   GroupPoints->ComboBox1->setItemData(GroupPoints->ComboBox1->count()-1, GEOM::VERTEX);
   GroupPoints->CheckButton1->setChecked( false );
-  mySelfInte->setChecked(true);
+  mySelfInte->setChecked(false);
 
   mainFrame()->GroupBoxPublish->show();
 
@@ -167,8 +167,10 @@ void OperationGUI_PartitionDlg::Init()
 
   connect( GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(processPreview()) );
   connect( GroupPoints->CheckButton2, SIGNAL(toggled(bool)), this, SLOT(processPreview()) );
+  connect( GroupPoints->CheckButton2, SIGNAL(toggled(bool)), mySelfInte, SLOT(setEnabled(bool)) );
   connect( mySelfInte,                SIGNAL(toggled(bool)), this, SLOT(processPreview()) );
 
+  mySelfInte->setEnabled(GroupPoints->CheckButton2->isChecked());
   initName( tr( "GEOM_PARTITION" ) );
 
   ConstructorsClicked( 0 );
@@ -201,6 +203,7 @@ void OperationGUI_PartitionDlg::ConstructorsClicked( int constructorId )
     GroupPoints->ComboBox1->setCurrentIndex( 0 );
     GroupPoints->CheckButton1->show();
     GroupPoints->CheckButton2->show();
+    mySelfInte->show();
     GroupPoints->PushButton1->setDown( true );
     GroupPoints->PushButton2->setDown( false );
     GroupPoints->LineEdit1->setEnabled(true);
@@ -214,6 +217,7 @@ void OperationGUI_PartitionDlg::ConstructorsClicked( int constructorId )
     GroupPoints->TextLabel2->setText( tr( "GEOM_PLANE" ) );
     GroupPoints->CheckButton1->hide();
     GroupPoints->CheckButton2->hide();
+    mySelfInte->hide();
     GroupPoints->PushButton1->setDown( true );
     GroupPoints->LineEdit1->setEnabled(true);
     break;
@@ -446,13 +450,13 @@ bool OperationGUI_PartitionDlg::execute (ObjectList& objects)
 {
   bool res = false;
   GEOM::GEOM_Object_var anObj;
-  bool isDetectSelfInte = mySelfInte->isChecked();
 
   GEOM::GEOM_IBooleanOperations_var anOper = GEOM::GEOM_IBooleanOperations::_narrow(getOperation());
 
   switch ( getConstructorId() ) {
   case 0:
     {
+      bool isDetectSelfInte    = mySelfInte->isChecked();
       int aLimit               = GetLimit();
       int aKeepNonlimitShapes  = GroupPoints->CheckButton1->isChecked();
       bool aNoSelfIntersection = GroupPoints->CheckButton2->isChecked();
@@ -464,15 +468,13 @@ bool OperationGUI_PartitionDlg::execute (ObjectList& objects)
                                                      isDetectSelfInte) :
         anOper->MakePartition(myListShapes, myListTools,
                               myListKeepInside, myListRemoveInside,
-                              aLimit, false, myListMaterials, aKeepNonlimitShapes,
-                              isDetectSelfInte);
+                              aLimit, false, myListMaterials, aKeepNonlimitShapes);
       res = true;
     }
     break;
   case 1:
     {
-      anObj = anOper->MakeHalfPartition( myListShapes[0].in(), myListTools[0].in(),
-                                         isDetectSelfInte );
+      anObj = anOper->MakeHalfPartition(myListShapes[0].in(), myListTools[0].in());
       res = true;
     }
     break;