]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Merge from V5_1_2_BR branch (14 July 2009)
authorvsr <vsr@opencascade.com>
Wed, 15 Jul 2009 08:09:58 +0000 (08:09 +0000)
committervsr <vsr@opencascade.com>
Wed, 15 Jul 2009 08:09:58 +0000 (08:09 +0000)
28 files changed:
doc/salome/gui/GEOM/input/import_export.doc
doc/salome/gui/GEOM/input/remove_extra_edges_operation.doc
src/BasicGUI/BasicGUI_CurveDlg.cxx
src/BasicGUI/BasicGUI_EllipseDlg.cxx
src/BooleanGUI/BooleanGUI_Dialog.cxx
src/EntityGUI/EntityGUI_SubShapeDlg.cxx
src/GEOM/GEOM_Engine.cxx
src/GEOM/GEOM_Engine.hxx
src/GEOMImpl/GEOMImpl_IShapes.hxx
src/GEOMImpl/GEOMImpl_ShapeDriver.cxx
src/GEOM_SWIG/geompyDC.py
src/GenerationGUI/GenerationGUI_FillingDlg.cxx
src/GenerationGUI/GenerationGUI_PipeDlg.cxx
src/GenerationGUI/GenerationGUI_RevolDlg.cxx
src/OperationGUI/OperationGUI_ArchimedeDlg.cxx
src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx
src/RepairGUI/RepairGUI_ChangeOrientationDlg.cxx
src/RepairGUI/RepairGUI_CloseContourDlg.cxx
src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx
src/RepairGUI/RepairGUI_DivideEdgeDlg.h
src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx
src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx
src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx
src/RepairGUI/RepairGUI_SewingDlg.cxx
src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx
src/TransformationGUI/TransformationGUI_MirrorDlg.cxx
src/TransformationGUI/TransformationGUI_OffsetDlg.cxx
src/TransformationGUI/TransformationGUI_RotationDlg.cxx

index cedbe93d6e058763d47b0c1d46c9899d091275ae..296c68b22536421ec33415c95cc0af404a323a65 100644 (file)
@@ -23,10 +23,9 @@ the module and its contents (geometrical object) will be displayed in
 the <b>Object Browser</b>.
 
 \note If the selected file is in IGES format and the length is not
-expressed in meters, it will be sussested to scale the model into the
+expressed in meters, it will be suggested to scale the model into the
 metric system:
-y types (solid, face, edge and
-vertex) for all named shapes
+
 \image html iges_unit.png
 
 \par
index 401e200c31506b674d98ea3ebe9bc5c4b0ef69d5..4988009e622279b2f0727cb7329c446b95dea103 100644 (file)
@@ -7,8 +7,8 @@
 \n This operation removes all seam and degenerated edges from a given
 shape. Its main purpose is healing of solids and compounds to obtain
 hexahedral solids and compounds of hexahedral solids.
-However, there is an option to unite all faces, sharing one
-surface, which allows obaining not only hexahedral solids.
+However, there is an option to unite all faces sharing one
+surface, which produces not only hexahedral solids.
 
 \n <b>TUI Command:</b> <em>geompy.RemoveExtraEdges(theShape,theOptimumNbFaces)</em>,
 where <em>theShape</em> is a compound or a single solid
index 05a7baf26c76cc831bf7a27618bafffbd2f99275..0212cdb31b650ecc450414675bb56c4a00033f01 100644 (file)
@@ -129,6 +129,7 @@ void BasicGUI_CurveDlg::Init()
           SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ) ;
  
   initName( tr( "GEOM_CURVE" ) );
+  resize(100,100);
   ConstructorsClicked( 0 );
 }
 
index dee60ede93b426581618fd752cd71deb68ff393d..3faa712772dc1bc97a343cb52f12f654235e2ac0 100644 (file)
@@ -157,6 +157,7 @@ void BasicGUI_EllipseDlg::Init()
 
   initName( tr( "GEOM_ELLIPSE" ) );
 
+  resize(100,100);
   displayPreview();
 }
 
index 85e1f19902c4a0b7eb08b2f5041040dd25bd91ad..7b1e3df5a01ac59c2125bb47baaf2d248364a406 100644 (file)
@@ -161,6 +161,7 @@ void BooleanGUI_Dialog::Init()
 
   myGroup->PushButton1->click();
   SelectionIntoArgument();
+  resize(100,100);
 }
 
 //=================================================================================
index af81a31bb94685883d964619e6bd0a8dd52a4ba0..45e27d2e712569473437c2188f22ef17f360e07b 100644 (file)
@@ -143,7 +143,7 @@ void EntityGUI_SubShapeDlg::Init()
           SIGNAL( currentSelectionChanged( )), this, SLOT( SelectionIntoArgument() ) );
 
   updateButtonState();
-
+  resize(100,100);
   SelectionIntoArgument();
 }
 
index 2ec87cbcfb279353d9ea8e6e050cd554b64baad0..436287cff5bd679b6869ba6395ca97c3b197bd4f 100644 (file)
@@ -18,7 +18,7 @@
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
 #ifdef WNT
 #pragma warning( disable:4786 )
 #endif
@@ -248,17 +248,12 @@ Handle(GEOM_Object) GEOM_Engine::AddObject(int theDocID, int theType)
   //            if this label has been freed (object deleted)
   bool useExisting = false;
   TDF_Label aChild;
-  if (!_lastCleared.IsNull()) {
-    if (_lastCleared.Root() == aDoc->Main().Root()) {
+  if (_freeLabels.find(theDocID) != _freeLabels.end()) {
+    std::list<TDF_Label>& aFreeLabels = _freeLabels[theDocID];
+    if (!aFreeLabels.empty()) {
       useExisting = true;
-      aChild = _lastCleared;
-      // 0020229: if next label exists and is empty, try to reuse it
-      Standard_Integer aNextTag = aChild.Tag() + 1;
-      TDF_Label aNextL = aDoc->Main().FindChild(aNextTag, Standard_False);
-      if (!aNextL.IsNull() && !aNextL.HasAttribute())
-        _lastCleared = aNextL;
-      else
-        _lastCleared.Nullify();
+      aChild = aFreeLabels.front();
+      aFreeLabels.pop_front();
     }
   }
   if (!useExisting) {
@@ -294,6 +289,7 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
   //            if this label has been freed (object deleted)
   bool useExisting = false;
   TDF_Label aChild;
+  /*
   if (!_lastCleared.IsNull()) {
     if (_lastCleared.Root() == aDoc->Main().Root()) {
       useExisting = true;
@@ -307,6 +303,16 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
         _lastCleared.Nullify();
     }
   }
+  */
+  int aDocID = theMainShape->GetDocID();
+  if (_freeLabels.find(aDocID) != _freeLabels.end()) {
+    std::list<TDF_Label>& aFreeLabels = _freeLabels[aDocID];
+    if (!aFreeLabels.empty()) {
+      useExisting = true;
+      aChild = aFreeLabels.front();
+      aFreeLabels.pop_front();
+    }
+  }
   if (!useExisting) {
     // create new label
     aChild = TDF_TagSource::NewChild(aDoc->Main());
@@ -366,6 +372,8 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_Object) theObject)
 {
   if (!theObject) return false;
 
+  int aDocID = theObject->GetDocID();
+
   //Remove an object from the map of available objects
   TCollection_AsciiString anID = BuildIDFromObject(theObject);
   if (_objects.IsBound(anID)) _objects.UnBind(anID);
@@ -380,7 +388,10 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_Object) theObject)
 
   TDF_Label aLabel = theObject->GetEntry();
   aLabel.ForgetAllAttributes(Standard_True);
-  _lastCleared = aLabel;
+
+  // Remember the label to reuse it then
+  std::list<TDF_Label>& aFreeLabels = _freeLabels[aDocID];
+  aFreeLabels.push_back(aLabel);
 
   theObject.Nullify();
 
@@ -464,7 +475,11 @@ void GEOM_Engine::Close(int theDocID)
     }
     for (Standard_Integer i=1; i<=aSeq.Length(); i++) _objects.UnBind(aSeq.Value(i));
 
-    _lastCleared.Nullify();
+    // Forget free labels for this document
+    TFreeLabelsList::iterator anIt = _freeLabels.find(theDocID);
+    if (anIt != _freeLabels.end()) {
+      _freeLabels.erase(anIt);
+    }
 
     _mapIDDocument.UnBind(theDocID);
     _OCAFApp->Close(aDoc);
index 5a45bdc9372dcad97bea07caee8dd5116cb6789a..c901123b604ff4923451d08bdde802b31c9f3804 100644 (file)
@@ -18,7 +18,7 @@
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
 #ifndef _GEOM_Engine_HXX_
 #define _GEOM_Engine_HXX_
 
@@ -34,6 +34,7 @@
 #include <TDF_Label.hxx>
 
 #include <map>
+#include <list>
 #include <vector>
 
 struct TVariable{
@@ -67,6 +68,8 @@ private:
 
 typedef std::map<TCollection_AsciiString, ObjectStates* > TVariablesList;
 
+typedef std::map<int, std::list<TDF_Label> > TFreeLabelsList;
+
 class GEOM_Engine
 {
  public:
@@ -139,7 +142,7 @@ class GEOM_Engine
 
   Resource_DataMapOfAsciiStringAsciiString _studyEntry2NameMap;
 
-  TDF_Label _lastCleared;
+  TFreeLabelsList _freeLabels;
 };
 
 #endif
index e0827f4ea89a20c4642079fd27719e290bd8f48a..504dbd315c1fd7a2cdafc6999177dbf73d4f7b66 100644 (file)
@@ -72,7 +72,7 @@ class GEOMImpl_IShapes
   void SetTolerance(const Standard_Real theValue)
   { _func->SetReal(SHAPE_ARG_TOLERANCE, theValue); }
 
-  Standard_Integer GetTolerance() { return _func->GetReal(SHAPE_ARG_TOLERANCE); }
+  Standard_Real GetTolerance() { return _func->GetReal(SHAPE_ARG_TOLERANCE); }
 
  private:
 
index 1165007ea9f0bab0746bb005447220d30d6f6688..ca0f348edef62f74fb985200661ad786f8ada1c9 100644 (file)
@@ -168,20 +168,22 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
       if (aFW->StatusConnected(ShapeExtend_FAIL)) {
         Standard_ConstructionError::Raise("Wire construction failed: cannot build connected wire");
       }
-
       // IMP 0019766
-      aFW->FixGapsByRangesMode() = Standard_True;
-      if (aFW->FixGaps3d()) {
-        Handle(ShapeExtend_WireData) sbwd = aFW->WireData();
-        Handle(ShapeFix_Edge) aFe = new ShapeFix_Edge;
-        for (Standard_Integer iedge = 1; iedge <= sbwd->NbEdges(); iedge++) {
-          TopoDS_Edge aEdge = TopoDS::Edge(sbwd->Edge(iedge));
-          aFe->FixVertexTolerance(aEdge);
-          aFe->FixSameParameter(aEdge);
+      if (aFW->StatusConnected(ShapeExtend_DONE3)) {
+        // Confused with <prec> but not Analyzer.Precision(), set the same
+        aFW->FixGapsByRangesMode() = Standard_True;
+        if (aFW->FixGaps3d()) {
+          Handle(ShapeExtend_WireData) sbwd = aFW->WireData();
+          Handle(ShapeFix_Edge) aFe = new ShapeFix_Edge;
+          for (Standard_Integer iedge = 1; iedge <= sbwd->NbEdges(); iedge++) {
+            TopoDS_Edge aEdge = TopoDS::Edge(sbwd->Edge(iedge));
+            aFe->FixVertexTolerance(aEdge);
+            aFe->FixSameParameter(aEdge);
+          }
+        }
+        else if (aFW->StatusGaps3d(ShapeExtend_FAIL)) {
+          Standard_ConstructionError::Raise("Wire construction failed: cannot fix 3d gaps");
         }
-      }
-      else if (aFW->StatusGaps3d(ShapeExtend_FAIL)) {
-        Standard_ConstructionError::Raise("Wire construction failed: cannot fix 3d gaps");
       }
 
       aShape = aFW->WireAPIMake();
index 3cf6cabc6c95023ec8be7b4bdc11db3a6de715a7..e6e7b8dd275defe86479f145f8f9397cab8fa105 100644 (file)
@@ -407,7 +407,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
         ## Create a tangent plane, corresponding to the given parameter on the given face.
         #  @param theFace The face for which tangent plane should be built.
         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
-       #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
+        #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
        #  @param theTrimSize the size of plane.
         #  @return New GEOM_Object, containing the created tangent.
         #
index 4f46e1962f51a7749f7c22d20d1945d8fdd0bc80..986f6286464fac7d012d786e737051834db3d140 100644 (file)
@@ -149,6 +149,7 @@ void GenerationGUI_FillingDlg::Init()
           SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
 
   initName( tr( "GEOM_FILLING" ) );
+  resize(100,100);
 }
 
 //=================================================================================
index e560176dc627c1b0a3387fa3ab47027fa2e5ca2c..78d7abfcef1781a149bfb74e4e29f2fd3dc65519 100644 (file)
@@ -135,6 +135,7 @@ void GenerationGUI_PipeDlg::Init()
   connect(GroupPoints->CheckButton1,   SIGNAL(toggled(bool)), this, SLOT(SelectionTypeButtonClicked()));
 
   initName(tr("GEOM_PIPE"));
+  resize(100,100);
 
   GroupPoints->TextLabel3->hide();
   GroupPoints->PushButton3->hide();
index 2a5d00b43dddffff259cd1558d33d11544a9fc58..99d8ba14e5464a8a836db3c1a8be9dcd027aa64a 100644 (file)
@@ -138,6 +138,7 @@ void GenerationGUI_RevolDlg::Init()
   connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), this, SLOT(SetDoubleSpinBoxStep(double)));
 
   initName(tr("GEOM_REVOLUTION"));
+  resize(100,100);
 
   GroupPoints->PushButton1->click();
   SelectionIntoArgument();
index fdf1778e3e1ea4b340f01fa12eb3f5d029cf59cd..96840b012167322ae45df629ae42abf6055c7010 100644 (file)
@@ -130,6 +130,7 @@ void OperationGUI_ArchimedeDlg::Init()
   globalSelection( GEOM_ALLSHAPES );
 
   SelectionIntoArgument();
+  resize(100,100);
 }
 
 
index 778af7b67a5633e418c9b3eaf109f9282450ecaa..70e011f7a34b229e2baa656384dfd8e7219bbf07 100644 (file)
@@ -144,6 +144,7 @@ void OperationGUI_GetShapesOnShapeDlg::Init()
 
   GroupPoints->PushButton1->click();
   SelectionIntoArgument();
+  resize(100,100);
 }
 
 //=================================================================================
index 485127b1fb13a0a5572f23612fa99f2aa83d8df3..4d6e6aeefa8faf5beed47659d6af5b02691621ee 100644 (file)
@@ -116,6 +116,7 @@ void RepairGUI_ChangeOrientationDlg::Init()
           SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
 
   initName( tr( "CHANGE_ORIENTATION_NEW_OBJ_NAME" ) );
+  resize(100,100);
 }
 
 
index 85705502ff33ddc36d90ba4ddfcd53b01fb71716..a65cd69f7fc6c2268d98cebd94746269e9d938e6 100644 (file)
@@ -133,6 +133,7 @@ void RepairGUI_CloseContourDlg::Init()
 
   GroupPoints->PushButton1->click();
   SelectionIntoArgument();
+  resize(100,100);
 }
 
 //=================================================================================
index e7016862167d6e5a1c468011ea443e1c9d885ea5..2f3d7a58235d6d2f2fbcc507bc84d71d1a75df57 100644 (file)
 #include <Geom_Curve.hxx>
 #include <gp_Pnt.hxx>
 #include <TopoDS.hxx>
+#include <TopExp.hxx>
 #include <TopoDS_Edge.hxx>
 #include <BRep_Tool.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
 #include <BRepBuilderAPI_MakeVertex.hxx>
 #include <TColStd_IndexedMapOfInteger.hxx>
 
@@ -124,6 +126,7 @@ void RepairGUI_DivideEdgeDlg::Init()
   myEditCurrentArgument = GroupPoints->LineEdit1;
 
   myObject = GEOM::GEOM_Object::_nil();
+  myIndex = -1;
 
   //myGeomGUI->SetState( 0 );
   initSelection();
@@ -141,6 +144,7 @@ void RepairGUI_DivideEdgeDlg::Init()
           SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
 
   initName( tr( "DEVIDE_EDGE_NEW_OBJECT_NAME" ) );
+  resize(100,100);
 }
 
 //=================================================================================
@@ -163,20 +167,26 @@ void RepairGUI_DivideEdgeDlg::displayPreview()
 
   TopoDS_Shape aShape;
   gp_Pnt aPnt;
-  if ( GEOMBase::GetShape( myObject, aShape, TopAbs_SHAPE ) ) {
-    if (aShape.ShapeType() == TopAbs_EDGE) {
-      Standard_Real aFP, aLP, aP;
-       Handle(Geom_Curve) aCurve = BRep_Tool::Curve(TopoDS::Edge(aShape), aFP, aLP);
-       aP = aFP + (aLP - aFP) * myValEdt->value();
-       aPnt = aCurve->Value(aP);
-       BRepBuilderAPI_MakeVertex mkVertex (aPnt);
-       aShape = mkVertex.Shape();
-       // Build prs
-       SALOME_Prs* aPrs = getDisplayer()->BuildPrs( aShape );
-       if ( aPrs != 0 && !aPrs->IsNull() )
-         GEOMBase_Helper::displayPreview( aPrs, false, true );
-    }
+  GEOMBase::GetShape( myObject, aShape, TopAbs_SHAPE );
+
+  if ( myIndex != -1) {
+    TopTools_IndexedMapOfShape aShapes;
+    TopExp::MapShapes(aShape, aShapes);
+    aShape = aShapes.FindKey(myIndex);
   }
+
+  if (aShape.ShapeType() == TopAbs_EDGE) {
+    Standard_Real aFP, aLP, aP;
+    Handle(Geom_Curve) aCurve = BRep_Tool::Curve(TopoDS::Edge(aShape), aFP, aLP);
+    aP = aFP + (aLP - aFP) * myValEdt->value();
+    aPnt = aCurve->Value(aP);
+    BRepBuilderAPI_MakeVertex mkVertex (aPnt);
+    aShape = mkVertex.Shape();
+    // Build prs
+    SALOME_Prs* aPrs = getDisplayer()->BuildPrs( aShape );
+    if ( aPrs != 0 && !aPrs->IsNull() )
+      GEOMBase_Helper::displayPreview( aPrs, false, true );
+  } 
 }
 
 //=================================================================================
@@ -203,6 +213,7 @@ bool RepairGUI_DivideEdgeDlg::ClickOnApply()
 
   myEditCurrentArgument->setText( "" );
   myObject = GEOM::GEOM_Object::_nil();
+  myIndex = -1;
 
   initSelection();
 
@@ -220,6 +231,7 @@ void RepairGUI_DivideEdgeDlg::SelectionIntoArgument()
   myEditCurrentArgument->setText( "" );
 
   myObject = GEOM::GEOM_Object::_nil();
+  myIndex = -1;
 
   LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
   SALOME_ListIO aSelList;
@@ -228,46 +240,45 @@ void RepairGUI_DivideEdgeDlg::SelectionIntoArgument()
   if ( aSelList.Extent() == 1 ) {
     Handle(SALOME_InteractiveObject) anIO = aSelList.First();
     Standard_Boolean aRes;
-    GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIO, aRes );
-    if ( !CORBA::is_nil( aSelectedObject ) && aRes ) {
-      QString aName = GEOMBase::GetName( aSelectedObject );
+    GEOM::GEOM_Object_var aSelectedObj = GEOMBase::ConvertIOinGEOMObject( anIO, aRes );
+    if ( !CORBA::is_nil( aSelectedObj ) && aRes )
+    {
       TopoDS_Shape aShape;
-      if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) ) {
+      QString aName = GEOMBase::GetName( aSelectedObj );
+      if ( GEOMBase::GetShape( aSelectedObj, aShape, TopAbs_SHAPE ) )
+      {
         const int aType = aShape.ShapeType();
-        if ( aType <= TopAbs_EDGE ) {
-         // edge, wire, face, shell, solid, compound
+        if ( aType <= TopAbs_EDGE ) // edge, wire, face, shell, solid, compound
+        {
           GEOM::short_array anIndexes;
 
           TColStd_IndexedMapOfInteger aMap;
-          aSelMgr->GetIndexes( anIO, aMap );
-
-          if ( aMap.Extent() == 1 ) { // local selection
-            int anIndex = aMap( 1 );
-            myEditCurrentArgument->setText( aName += QString( ":edge_%1" ).arg( anIndex ) );
-
-           //Find SubShape Object in Father
-           GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
-           if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
-             GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
-             myObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
-           }
-           else {
-             myObject = aFindedObject; // get Object from study
-           }
+          SalomeApp_Application* anApp =
+            (SalomeApp_Application*)(SUIT_Session::session()->activeApplication());
+          anApp->selectionMgr()->GetIndexes( anIO, aMap );
+
+          if ( !aMap.IsEmpty() ) // subshape selection
+          {
+            myIndex = aMap( 1 );
+            myObject = aSelectedObj;
+           myEditCurrentArgument->setText( aName += QString( ":edge_%1" ).arg( myIndex ) );
           }
-          else if ( aType == TopAbs_EDGE ) { 
-           // single shape selection
-            myObject = aSelectedObject;
+          else if ( aType == TopAbs_EDGE ) // single shape selection
+          {
+            myIndex = -1;
+            myObject = aSelectedObj;
             myEditCurrentArgument->setText( GEOMBase::GetName( myObject ) );
           }
-          else {
-           // face, shell, solid or compound was selected, and NOT its subshape.
+          else // face, shell, solid or compound was selected, and NOT its subshape.
+          {
+            myIndex = -1;
             myObject = GEOM::GEOM_Object::_nil();
           }
         }
       }
     }
   }
+
   displayPreview();
 }
 
@@ -309,6 +320,7 @@ void RepairGUI_DivideEdgeDlg::ActivateThisDialog()
           SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
 
 //  myObject = GEOM::GEOM_Object::_nil();
+  myIndex = -1;
 
   //myGeomGUI->SetState( 0 );
   initSelection();
@@ -351,7 +363,7 @@ bool RepairGUI_DivideEdgeDlg::isValid( QString& msg )
 bool RepairGUI_DivideEdgeDlg::execute( ObjectList& objects )
 {
   GEOM::GEOM_Object_var anObj = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->DivideEdge
-    ( myObject, -1, myValEdt->value(), getIsByParameter() );
+    ( myObject, myIndex, myValEdt->value(), getIsByParameter() );
   bool aResult = !anObj->_is_nil();
   if ( aResult )
   {
@@ -387,15 +399,3 @@ void RepairGUI_DivideEdgeDlg::initSelection()
   GEOM::GEOM_Object_var aNullGeomObject;
   localSelection( aNullGeomObject, TopAbs_EDGE ); // load local selection on ALL objects
 }
-
-//=================================================================================
-// function : addSubshapeToStudy
-// purpose  : virtual method to add new SubObjects if local selection
-//=================================================================================
-void RepairGUI_DivideEdgeDlg::addSubshapesToStudy()
-{
-  QMap<QString, GEOM::GEOM_Object_var> objMap;
-  objMap[GroupPoints->LineEdit1->text()] = myObject;
-
-  addSubshapesToFather( objMap );
-}
index d7ceed40e41471c5a520ea1cdbe01ed40ae7054e..d2a71bf3594bcb695bb0eeee14de178a55b342f5 100644 (file)
@@ -49,7 +49,6 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
-  virtual void                       addSubshapesToStudy();
   
 private:
   void                               Init();
@@ -57,6 +56,7 @@ private:
   void                               initSelection();
   
   bool                               getIsByParameter() const;
+  int                                myIndex;
   
 private:
   GEOM::GEOM_Object_var              myObject;
index 8d7be6e729405d9fc87bd034acb5e642594161d3..25fceb12f45c0b1083e07aec07312ca2121a74b3 100644 (file)
@@ -121,6 +121,7 @@ void RepairGUI_RemoveExtraEdgesDlg::Init()
           this, SLOT( SelectionIntoArgument() ) );
 
   initName( tr( "REMOVE_EXTRA_EDGES_NEW_OBJ_NAME" ) );
+  resize(100,100);
 }
 
 
index 3ef74ca4a92685d6d8956f4c7c39c9b2463648c3..cc90a25cd9a53a55177ac4dfe22a3acd28ed0a8c 100644 (file)
@@ -134,6 +134,7 @@ void RepairGUI_RemoveHolesDlg::Init()
 
   GroupPoints->PushButton1->click();
   SelectionIntoArgument();
+  resize(100,100);
 }
 
 //=================================================================================
index 8079b166d4e3c0fd2a82df72c20a4563c8d6c499..90b89b872a52c4ce6a12f21a080a1c319ff770fa 100644 (file)
@@ -122,6 +122,7 @@ void RepairGUI_RemoveIntWiresDlg::Init()
 
   GroupPoints->PushButton1->click();
   SelectionIntoArgument();
+  resize(100,100);
 }
 
 //=================================================================================
index a5d6465d92d050570f6e8d71b940f16211d66b58..a709997e5041b86385b449eab82aa7cfe1be27c8 100644 (file)
@@ -134,6 +134,7 @@ void RepairGUI_SewingDlg::Init()
   connect( myFreeBoundBtn, SIGNAL( clicked() ), this, SLOT( onDetect() ) );
 
   initName( tr( "SEWING_NEW_OBJ_NAME" ) );
+  resize(100,100);
 }
 
 
index 7daaab8e1e1407a4c16ef01209d3940691e4be91..6149e963fa2729cb7ab42b3dbd60249c904d3d26 100644 (file)
@@ -118,6 +118,7 @@ void RepairGUI_SuppressFacesDlg::Init()
           SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
 
   initName( tr( "SUPRESS_FACE_NEW_OBJ_NAME" ) );
+  resize(100,100);
 }
 
 
index 4e3abf68326a323175100e08f7e5b42384549fe2..772755da5326b7660fb94e879ad762bb2a89afc8 100644 (file)
@@ -139,6 +139,7 @@ void TransformationGUI_MirrorDlg::Init()
   initName(tr("GEOM_MIRROR"));
 
   ConstructorsClicked(0);
+  resize(0,0);
 }
 
 //=================================================================================
index f548ca48e4a7ee33eb75987aee9092953c677573..df5a0dd1e1fb5441ed7fb265ee1ace7c925e0022 100644 (file)
@@ -128,6 +128,7 @@ void TransformationGUI_OffsetDlg::Init()
   initName( tr( "GEOM_OFFSET" ) );
 
   globalSelection( GEOM_ALLSHAPES );
+  resize(100,100);
 }
 
 
index c56fd9c9b935de0f116db7ae06fd9121793e570c..7171cb4aee453fc4e84ce72d9d723a11ddc3a472 100644 (file)
@@ -263,6 +263,7 @@ void TransformationGUI_RotationDlg::SelectionIntoArgument()
   LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
   SALOME_ListIO aSelList;
   aSelMgr->selectedObjects(aSelList);
+  GEOM::GEOM_Object_var aSelectedObject;
 
   QString aName;
 
@@ -274,8 +275,6 @@ void TransformationGUI_RotationDlg::SelectionIntoArgument()
     GEOMBase::ConvertListOfIOInListOfGO(aSelList, myObjects);
     if (!myObjects.length())
       return;
-    else
-      myEditCurrentArgument->setText(aName);
   }
   else {
     if (aSelList.Extent() != 1)
@@ -283,7 +282,7 @@ void TransformationGUI_RotationDlg::SelectionIntoArgument()
 
     // nbSel == 1
     Standard_Boolean testResult = Standard_False;
-    GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+    aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
 
     if (!testResult || CORBA::is_nil(aSelectedObject))
       return;
@@ -328,30 +327,36 @@ void TransformationGUI_RotationDlg::SelectionIntoArgument()
         }
       }
     }
+  }
+  
+  myEditCurrentArgument->setText(aName);
 
-    myEditCurrentArgument->setText(aName);
-
-    if (myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 0) {
-      myAxis = aSelectedObject;
-      if (!myAxis->_is_nil() && !myObjects.length())
-        GroupPoints->PushButton1->click();
-    }
-    else if (myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 1) {
-      myCentPoint = aSelectedObject;
-      if (!myCentPoint->_is_nil() && myPoint1->_is_nil())
-        GroupPoints->PushButton4->click();
-    }
-    else if (myEditCurrentArgument == GroupPoints->LineEdit4) {
-      myPoint1 = aSelectedObject;
-      if (!myPoint1->_is_nil() && myPoint2->_is_nil())
-        GroupPoints->PushButton5->click();
-    }
-    else if (myEditCurrentArgument == GroupPoints->LineEdit5) {
-      myPoint2 = aSelectedObject;
-      if (!myPoint2->_is_nil() && !myObjects.length())
-        GroupPoints->PushButton1->click();
+  if (myEditCurrentArgument == GroupPoints->LineEdit1) {
+    if (myObjects.length()) {
+      if (getConstructorId() == 0 && myAxis->_is_nil() || getConstructorId() == 1 && myCentPoint->_is_nil() )
+       GroupPoints->PushButton2->click();
     }
   }
+  else if (myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 0) {
+    myAxis = aSelectedObject;
+    if (!myAxis->_is_nil() && !myObjects.length())
+      GroupPoints->PushButton1->click();
+  }
+  else if (myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 1) {
+    myCentPoint = aSelectedObject;
+    if (!myCentPoint->_is_nil() && myPoint1->_is_nil())
+      GroupPoints->PushButton4->click();
+  }
+  else if (myEditCurrentArgument == GroupPoints->LineEdit4) {
+    myPoint1 = aSelectedObject;
+    if (!myPoint1->_is_nil() && myPoint2->_is_nil())
+      GroupPoints->PushButton5->click();
+  }
+  else if (myEditCurrentArgument == GroupPoints->LineEdit5) {
+    myPoint2 = aSelectedObject;
+    if (!myPoint2->_is_nil() && !myObjects.length())
+      GroupPoints->PushButton1->click();
+  }
 
   // clear selection
   disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
@@ -377,7 +382,11 @@ void TransformationGUI_RotationDlg::SetEditCurrentArgument()
     myEditCurrentArgument = GroupPoints->LineEdit1;
 
     GroupPoints->PushButton2->setDown(false);
+    GroupPoints->PushButton4->setDown(false);
+    GroupPoints->PushButton5->setDown(false);
     GroupPoints->LineEdit2->setEnabled(false);
+    GroupPoints->LineEdit4->setEnabled(false);
+    GroupPoints->LineEdit5->setEnabled(false);
   }
   else if (send == GroupPoints->PushButton2) {
     myEditCurrentArgument = GroupPoints->LineEdit2;