diff --git a/doc/salome/gui/GEOM/images/plane1.png b/doc/salome/gui/GEOM/images/plane1.png
index 10b420283..aaf7f12d5 100755
Binary files a/doc/salome/gui/GEOM/images/plane1.png and b/doc/salome/gui/GEOM/images/plane1.png differ
diff --git a/doc/salome/gui/GEOM/images/plane2.png b/doc/salome/gui/GEOM/images/plane2.png
index f6c50d7d9..3644d6b38 100755
Binary files a/doc/salome/gui/GEOM/images/plane2.png and b/doc/salome/gui/GEOM/images/plane2.png differ
diff --git a/doc/salome/gui/GEOM/images/plane3.png b/doc/salome/gui/GEOM/images/plane3.png
index e48916cc8..b815f8d0d 100755
Binary files a/doc/salome/gui/GEOM/images/plane3.png and b/doc/salome/gui/GEOM/images/plane3.png differ
diff --git a/doc/salome/gui/GEOM/input/creating_plane.doc b/doc/salome/gui/GEOM/input/creating_plane.doc
index d7c9e8f9f..c6116021b 100644
--- a/doc/salome/gui/GEOM/input/creating_plane.doc
+++ b/doc/salome/gui/GEOM/input/creating_plane.doc
@@ -27,7 +27,8 @@ of the plane).
\image html plane2.png
\n Finally, you can define a \b Plane by another \b Plane or Local
-Coordinate System and a Size of the Plane.
+Coordinate System and a Size of the Plane. To change selection type cilck the corresponding
+radio button "Face" or "Local Coordinate System".
\n TUI Command: geompy.MakePlaneFace(Face, TrimSize)
\n Arguments: Name + 1 face + 1 value (to define the size of
the plane).
diff --git a/src/BasicGUI/BasicGUI_PlaneDlg.cxx b/src/BasicGUI/BasicGUI_PlaneDlg.cxx
index 8e8914cce..5070f7d50 100644
--- a/src/BasicGUI/BasicGUI_PlaneDlg.cxx
+++ b/src/BasicGUI/BasicGUI_PlaneDlg.cxx
@@ -100,7 +100,11 @@ BasicGUI_PlaneDlg::BasicGUI_PlaneDlg( GeometryGUI* theGeometryGUI, QWidget* pare
Group3Pnts->LineEdit2->setEnabled( false );
Group3Pnts->LineEdit3->setEnabled( false );
- GroupFace = new DlgRef_1Sel1Spin( centralWidget() );
+ GroupFace = new DlgRef_3Radio1Sel1Spin( centralWidget() );
+ GroupFace->RadioButton1->setText(tr("GEOM_FACE"));
+ GroupFace->RadioButton2->setText(tr("GEOM_LCS"));
+ GroupFace->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
+ GroupFace->RadioButton3->close();
GroupFace->GroupBox1->setTitle( tr( "GEOM_FACE_OR_LCS" ) );
GroupFace->TextLabel1->setText( tr( "GEOM_SELECTION" ) );
GroupFace->TextLabel2->setText( tr( "GEOM_PLANE_SIZE" ) );
@@ -139,6 +143,7 @@ void BasicGUI_PlaneDlg::Init()
{
/* init variables */
myEditCurrentArgument = GroupPntDir->LineEdit1;
+ GroupFace->RadioButton1->setChecked(true);
myPoint = myDir = myPoint1 = myPoint2 = myPoint3 = myFace = GEOM::GEOM_Object::_nil();
@@ -180,6 +185,8 @@ void BasicGUI_PlaneDlg::Init()
connect( Group3Pnts->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
connect( Group3Pnts->LineEdit3, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
connect( GroupFace->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
+ connect( GroupFace->RadioButton1,SIGNAL( clicked() ), this, SLOT( SelectionTypeClicked() ) );
+ connect( GroupFace->RadioButton2,SIGNAL( clicked() ), this, SLOT( SelectionTypeClicked() ) );
connect( GroupPntDir->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
connect( Group3Pnts->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
@@ -205,6 +212,25 @@ void BasicGUI_PlaneDlg::SetDoubleSpinBoxStep( double step )
GroupFace->SpinBox_DX->setSingleStep(step);
}
+//=================================================================================
+// function : SelectionTypeClicked()
+// purpose : Selection type radio buttons managment
+//=================================================================================
+void BasicGUI_PlaneDlg::SelectionTypeClicked()
+{
+ myFace = GEOM::GEOM_Object::_nil();
+ if ( GroupFace->RadioButton1->isChecked()) {
+ globalSelection(); // close local contexts, if any
+ localSelection( GEOM::GEOM_Object::_nil(), TopAbs_FACE );
+ } else if ( GroupFace->RadioButton2->isChecked()) {
+ TColStd_MapOfInteger aMap;
+ aMap.Add( GEOM_PLANE );
+ aMap.Add( GEOM_MARKER );
+ globalSelection( aMap );
+ }
+ displayPreview();
+}
+
//=================================================================================
// function : ConstructorsClicked()
@@ -257,7 +283,7 @@ void BasicGUI_PlaneDlg::ConstructorsClicked( int constructorId )
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
break;
}
- case 2: /* plane from a planar face selection */
+ case 2: /* plane from a planar face or LSC selection */
{
GroupPntDir->hide();
Group3Pnts->hide();
@@ -267,12 +293,15 @@ void BasicGUI_PlaneDlg::ConstructorsClicked( int constructorId )
GroupFace->LineEdit1->setText( "" );
GroupFace->PushButton1->setDown( true );
- /* for the first argument */
- //globalSelection( GEOM_PLANE );
- TColStd_MapOfInteger aMap;
- aMap.Add( GEOM_PLANE );
- aMap.Add( GEOM_MARKER );
- globalSelection( aMap );
+ if ( GroupFace->RadioButton1->isChecked()) {
+ globalSelection(); // close local contexts, if any
+ localSelection( GEOM::GEOM_Object::_nil(), TopAbs_FACE );
+ } else if ( GroupFace->RadioButton2->isChecked()) {
+ TColStd_MapOfInteger aMap;
+ aMap.Add( GEOM_PLANE );
+ aMap.Add( GEOM_MARKER );
+ globalSelection( aMap );
+ }
break;
}
}
@@ -342,6 +371,8 @@ void BasicGUI_PlaneDlg::SelectionIntoArgument()
TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX;
if ( myEditCurrentArgument == GroupPntDir->LineEdit2 )
aNeedType = TopAbs_EDGE;
+ else if ( myEditCurrentArgument == GroupFace->LineEdit1 )
+ aNeedType = TopAbs_FACE;
TopoDS_Shape aShape;
if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) {
@@ -377,7 +408,7 @@ void BasicGUI_PlaneDlg::SelectionIntoArgument()
myEditCurrentArgument->setText( aName );
- if (!aSelectedObject->_is_nil()) { // clear selection if something selected
+ /* if (!aSelectedObject->_is_nil()) { // clear selection if something selected
globalSelection();
if ( myEditCurrentArgument == GroupFace->LineEdit1 ) {
TColStd_MapOfInteger aMap;
@@ -387,7 +418,7 @@ void BasicGUI_PlaneDlg::SelectionIntoArgument()
}
else
localSelection( GEOM::GEOM_Object::_nil(), aNeedType );
- }
+ }*/
if ( myEditCurrentArgument == GroupPntDir->LineEdit1 ) {
myPoint = aSelectedObject;
diff --git a/src/BasicGUI/BasicGUI_PlaneDlg.h b/src/BasicGUI/BasicGUI_PlaneDlg.h
index ec43ced5e..819d74480 100644
--- a/src/BasicGUI/BasicGUI_PlaneDlg.h
+++ b/src/BasicGUI/BasicGUI_PlaneDlg.h
@@ -31,6 +31,7 @@
class DlgRef_1Sel1Spin;
class DlgRef_2Sel1Spin;
class DlgRef_3Sel1Spin;
+class DlgRef_3Radio1Sel1Spin;
//=================================================================================
// class : BasicGUI_PlaneDlg
@@ -61,7 +62,7 @@ private:
DlgRef_2Sel1Spin* GroupPntDir;
DlgRef_3Sel1Spin* Group3Pnts;
- DlgRef_1Sel1Spin* GroupFace;
+ DlgRef_3Radio1Sel1Spin* GroupFace;
private slots:
void ClickOnOk();
@@ -76,6 +77,7 @@ private slots:
void ConstructorsClicked( int );
void ValueChangedInSpinBox( double );
void SetDoubleSpinBoxStep( double );
+ void SelectionTypeClicked();
};
#endif // BASICGUI_PLANEDLG_H
diff --git a/src/DlgRef/DlgRef.cxx b/src/DlgRef/DlgRef.cxx
index f93df1ac2..5f575d77f 100644
--- a/src/DlgRef/DlgRef.cxx
+++ b/src/DlgRef/DlgRef.cxx
@@ -485,6 +485,20 @@ DlgRef_3Radio::~DlgRef_3Radio()
{
}
+//////////////////////////////////////////
+// DlgRef_3Radio1Sel1Spin
+//////////////////////////////////////////
+
+DlgRef_3Radio1Sel1Spin::DlgRef_3Radio1Sel1Spin( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+ setupUi( this );
+}
+
+DlgRef_3Radio1Sel1Spin::~DlgRef_3Radio1Sel1Spin()
+{
+}
+
//////////////////////////////////////////
// DlgRef_3Sel1Check
//////////////////////////////////////////
diff --git a/src/DlgRef/DlgRef.h b/src/DlgRef/DlgRef.h
index 4e677a321..4becec59a 100644
--- a/src/DlgRef/DlgRef.h
+++ b/src/DlgRef/DlgRef.h
@@ -564,6 +564,22 @@ public:
~DlgRef_3Radio();
};
+//////////////////////////////////////////
+// DlgRef_1Sel3Radio1Sel1Spin
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Radio1Sel1Spin_QTD.h"
+
+class DLGREF_EXPORT DlgRef_3Radio1Sel1Spin : public QWidget,
+ public Ui::DlgRef_3Radio1Sel1Spin_QTD
+{
+ Q_OBJECT
+
+public:
+ DlgRef_3Radio1Sel1Spin( QWidget* = 0, Qt::WindowFlags = 0 );
+ ~DlgRef_3Radio1Sel1Spin();
+};
+
//////////////////////////////////////////
// DlgRef_3Sel1Check
//////////////////////////////////////////
diff --git a/src/DlgRef/DlgRef_3Radio1Sel1Spin_QTD.ui b/src/DlgRef/DlgRef_3Radio1Sel1Spin_QTD.ui
new file mode 100644
index 000000000..a1c14757d
--- /dev/null
+++ b/src/DlgRef/DlgRef_3Radio1Sel1Spin_QTD.ui
@@ -0,0 +1,150 @@
+
+ DlgRef_3Radio1Sel1Spin_QTD
+
+
+
+ 0
+ 0
+ 357
+ 131
+
+
+
+
+
+
+
+ 0
+
+
+ 0
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 357
+ 131
+
+
+
+
+
+
+
-
+
+
-
+
+
+ RadioButton1
+
+
+
+ -
+
+
+ RadioButton2
+
+
+
+ -
+
+
+ RadioButton3
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ TL1
+
+
+ false
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ TL2
+
+
+ false
+
+
+
+ -
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 256
+ 19
+
+
+
+
+
+
+
+
+
+
+ qPixmapFromMimeSource
+
+
+ QtxDoubleSpinBox
+ QDoubleSpinBox
+
+
+
+
+ PushButton1
+ LineEdit1
+ SpinBox_DX
+
+
+
+
diff --git a/src/DlgRef/Makefile.am b/src/DlgRef/Makefile.am
index 46df04ce7..07cf7fe2c 100644
--- a/src/DlgRef/Makefile.am
+++ b/src/DlgRef/Makefile.am
@@ -71,6 +71,7 @@ UIC_FILES = \
ui_DlgRef_2Spin_QTD.h \
ui_DlgRef_3Check_QTD.h \
ui_DlgRef_3Radio_QTD.h \
+ ui_DlgRef_3Radio1Sel1Spin_QTD.h \
ui_DlgRef_3Sel1Check_QTD.h \
ui_DlgRef_3Sel1Spin_QTD.h \
ui_DlgRef_3Sel3Spin1Check_QTD.h \
diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts
index 361dde1f5..1d9d86465 100644
--- a/src/GEOMGUI/GEOM_msg_en.ts
+++ b/src/GEOMGUI/GEOM_msg_en.ts
@@ -552,6 +552,10 @@ Please, select face, shell or solid and try again
Face
+
+
+ Local coordinate system
+
Faces