Salome HOME
projects
/
modules
/
geom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RNC: EDF 1542: Take into account orientation in newly created MakeVertexOnCurveByLeng...
[modules/geom.git]
/
src
/
BasicGUI
/
BasicGUI_CurveDlg.cxx
diff --git
a/src/BasicGUI/BasicGUI_CurveDlg.cxx
b/src/BasicGUI/BasicGUI_CurveDlg.cxx
index a2c17827b32c6dc61be20c1b5538b430e8699f0b..2a962c46180c4427c13a3511d6f6c7b382b939b3 100644
(file)
--- a/
src/BasicGUI/BasicGUI_CurveDlg.cxx
+++ b/
src/BasicGUI/BasicGUI_CurveDlg.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
08
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
10
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-19,10
+19,11
@@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// GEOM GEOMGUI : GUI for Geometry component
// File : BasicGUI_CurveDlg.cxx
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
// GEOM GEOMGUI : GUI for Geometry component
// File : BasicGUI_CurveDlg.cxx
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
-
+//
#include "BasicGUI_CurveDlg.h"
#include <DlgRef.h>
#include "BasicGUI_CurveDlg.h"
#include <DlgRef.h>
@@
-157,6
+158,10
@@
void BasicGUI_CurveDlg::ConstructorsClicked( int id )
myPoints->length( 0 );
myEditCurrentArgument->setText( "" );
myPoints->length( 0 );
myEditCurrentArgument->setText( "" );
+ qApp->processEvents();
+ updateGeometry();
+ resize( minimumSizeHint() );
+ SelectionIntoArgument();
}
}
@@
-281,8
+286,6
@@
void BasicGUI_CurveDlg::SelectionIntoArgument()
{
myEditCurrentArgument->setText( "" );
{
myEditCurrentArgument->setText( "" );
- Standard_Boolean aRes = Standard_False;
-
SalomeApp_Application* app = myGeomGUI->getApp();
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
_PTR(Study) aDStudy = appStudy->studyDS();
SalomeApp_Application* app = myGeomGUI->getApp();
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
_PTR(Study) aDStudy = appStudy->studyDS();
@@
-303,8
+306,8
@@
void BasicGUI_CurveDlg::SelectionIntoArgument()
// that will actually be put into myPoints
for (SALOME_ListIteratorOfListIO anIt (selected); anIt.More(); anIt.Next()) {
// that will actually be put into myPoints
for (SALOME_ListIteratorOfListIO anIt (selected); anIt.More(); anIt.Next()) {
- GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(
anIt.Value(), aRes
);
- if (!CORBA::is_nil(aSelectedObject)
&& aRes
) {
+ GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(
anIt.Value()
);
+ if (!CORBA::is_nil(aSelectedObject) ) {
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE) && !aShape.IsNull()) {
aSelMgr->GetIndexes(anIt.Value(), aMapIndexes);
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE) && !aShape.IsNull()) {
aSelMgr->GetIndexes(anIt.Value(), aMapIndexes);
@@
-341,10
+344,12
@@
void BasicGUI_CurveDlg::SelectionIntoArgument()
}
}
else { // aMap.Extent() == 0
}
}
else { // aMap.Extent() == 0
- int pos = isPointInList( myOrderedSel, aSelectedObject );
- if ( pos == -1 )
- myOrderedSel.push_back( aSelectedObject );
- aList.push_back( aSelectedObject );
+ if ( aShape.ShapeType() == TopAbs_VERTEX ) {
+ int pos = isPointInList( myOrderedSel, aSelectedObject );
+ if ( pos == -1 )
+ myOrderedSel.push_back( aSelectedObject );
+ aList.push_back( aSelectedObject );
+ }
}
}
}
}
}
}
@@
-439,18
+444,19
@@
bool BasicGUI_CurveDlg::execute( ObjectList& objects )
GEOM::GEOM_Object_var anObj;
GEOM::GEOM_Object_var anObj;
+ GEOM::GEOM_ICurvesOperations_var anOper = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() );
+
switch ( getConstructorId() ) {
case 0 :
switch ( getConstructorId() ) {
case 0 :
- anObj =
GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )
->MakePolyline( myPoints );
+ anObj =
anOper
->MakePolyline( myPoints );
res = true;
break;
case 1 :
res = true;
break;
case 1 :
- anObj =
GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )
->MakeSplineBezier( myPoints );
+ anObj =
anOper
->MakeSplineBezier( myPoints );
res = true;
break;
case 2 :
res = true;
break;
case 2 :
- anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->
- MakeSplineInterpolation( myPoints, GroupPoints->CheckButton1->isChecked() );
+ anObj = anOper->MakeSplineInterpolation( myPoints, GroupPoints->CheckButton1->isChecked() );
res = true;
break;
}
res = true;
break;
}