Salome HOME
[bos #39942] EDF 25230 - New problem with XYZtoUV
[modules/geom.git] / src / MeasureGUI / MeasureGUI_CheckSelfIntersectionsDlg.cxx
index 41c0d94ffe53ac9e2d5b77d180429f6c7b23ed35..43effcaca19d0e9a48b3925c1992f2f9b658ce94 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //=================================================================================
 MeasureGUI_CheckSelfIntersectionsDlg::MeasureGUI_CheckSelfIntersectionsDlg (GeometryGUI* GUI, QWidget* parent)
   : GEOMBase_Skeleton (GUI, parent, false),
+    myCurrConstrId    (-1),
+    myComputeButton1  (0),
     myTextView1       (0),
-    myTextView2       (0),
     mySelButton1      (0),
-    mySelButton2      (0),
     myEditObjName1    (0),
-    myEditObjName2    (0),
     myLevelBox        (0),
-    myComputeButton1  (0),
-    myComputeButton2  (0),
     myInteList1       (0),
     myShapeList1      (0),
+    myComputeButton2  (0),
+    myTextView2       (0),
+    mySelButton2      (0),
+    myEditObjName2    (0),
     myInteList2       (0),
-    myShapeList2      (0),
-    myCurrConstrId    (-1)
+    myShapeList2      (0)
 {
   SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
   QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_CHECK_SELF_INTERSECTIONS")));
@@ -89,7 +89,7 @@ MeasureGUI_CheckSelfIntersectionsDlg::MeasureGUI_CheckSelfIntersectionsDlg (Geom
   mainFrame()->RadioButton3->close();
 
   /***************************************************************/
-  /* SIMPLE SELF-INTERSECTION constructor
+  // SIMPLE SELF-INTERSECTION constructor
   /***************************************************************/
   mySimpleGrp             = new QGroupBox(tr("GEOM_CHECK_INFOS"));
   QLabel    *anObjLbl    = new QLabel(tr("GEOM_OBJECT"));
@@ -139,7 +139,7 @@ MeasureGUI_CheckSelfIntersectionsDlg::MeasureGUI_CheckSelfIntersectionsDlg (Geom
   aGrpLayout1->addWidget(myShapeList1,     6, 2);
 
   /***************************************************************/
-  /* FAST SELF-INTERSECTION constructor
+  // FAST SELF-INTERSECTION constructor
   /***************************************************************/
   
   myFastGrp               = new QGroupBox(tr("GEOM_CHECK_INFOS"), centralWidget());
@@ -268,7 +268,7 @@ void MeasureGUI_CheckSelfIntersectionsDlg::Init()
   /***************************************************************/
 
   connect(this,               SIGNAL(constructorsClicked(int)), 
-         this,               SLOT(ConstructorsClicked(int)));
+          this,               SLOT(ConstructorsClicked(int)));
   connect(myGeomGUI,          SIGNAL(SignalDeactivateActiveDialog()),
           this,               SLOT(DeactivateActiveDialog()));
   connect(myGeomGUI,          SIGNAL(SignalCloseAllDialogs()),
@@ -486,7 +486,7 @@ bool MeasureGUI_CheckSelfIntersectionsDlg::extractPrefix() const
 //=================================================================================
 GEOM::GEOM_IOperations_ptr MeasureGUI_CheckSelfIntersectionsDlg::createOperation()
 {
-  return getGeomEngine()->GetIMeasureOperations( getStudyId() );
+  return getGeomEngine()->GetIMeasureOperations();
 }
 
 //=================================================================================
@@ -527,19 +527,19 @@ void MeasureGUI_CheckSelfIntersectionsDlg::SelectionIntoArgument()
 
   if ( getConstructorId() == 0 ) {
     typesLst << TopAbs_COMPOUND
-            << TopAbs_COMPSOLID
-            << TopAbs_SOLID
-            << TopAbs_SHELL
-            << TopAbs_FACE
-            << TopAbs_WIRE
-            << TopAbs_EDGE
-            << TopAbs_VERTEX
-            << TopAbs_SHAPE;
+             << TopAbs_COMPSOLID
+             << TopAbs_SOLID
+             << TopAbs_SHELL
+             << TopAbs_FACE
+             << TopAbs_WIRE
+             << TopAbs_EDGE
+             << TopAbs_VERTEX
+             << TopAbs_SHAPE;
   } else {
     typesLst << TopAbs_FACE
-            << TopAbs_SHELL
-            << TopAbs_SOLID
-            << TopAbs_COMPOUND;
+             << TopAbs_SHELL
+             << TopAbs_SOLID
+             << TopAbs_COMPOUND;
   }
 
   // Clear the dialog.
@@ -588,7 +588,7 @@ bool MeasureGUI_CheckSelfIntersectionsDlg::findSelfIntersections
     }
     nbPairs = getInters()->length()/2;
 
-    if (nbPairs*2 != getInters()->length()) {
+    if (nbPairs*2 != (int)getInters()->length()) {
       isOK = false;
     }
   }
@@ -672,11 +672,11 @@ void MeasureGUI_CheckSelfIntersectionsDlg::onSubShapesListSelectionChanged()
     foreach(int idx, aIds) {
       aSubShape = anIndices.FindKey(idx);
       try {
-       SALOME_Prs* aPrs = !aSubShape.IsNull() ? getDisplayer()->BuildPrs(aSubShape) : 0;
-       if (aPrs) displayPreview(aPrs, true);
+        SALOME_Prs* aPrs = !aSubShape.IsNull() ? getDisplayer()->BuildPrs(aSubShape) : 0;
+        if (aPrs) displayPreview(aPrs, true);
       }
       catch (const SALOME::SALOME_Exception& e) {
-       SalomeApp_Tools::QtCatchCorbaException(e);
+        SalomeApp_Tools::QtCatchCorbaException(e);
       }
     }
   }
@@ -710,7 +710,7 @@ bool MeasureGUI_CheckSelfIntersectionsDlg::execute(ObjectList& objects)
     }
   }
 
-  GEOM::ShapesOpPtr shapesOper = getGeomEngine()->GetIShapesOperations(getStudyId());
+  GEOM::ShapesOpPtr shapesOper = getGeomEngine()->GetIShapesOperations();
   
   // Explode sub-shapes
   GEOM::ListOfLong_var anArray   = new GEOM::ListOfLong;