mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-29 10:50:35 +05:00
IPAL20712 5x: Couldn't select plane as "Face-Selection"
This commit is contained in:
parent
6e1135c999
commit
feaba17527
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 17 KiB |
Binary file not shown.
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@ -27,7 +27,8 @@ of the plane).
|
||||
\image html plane2.png
|
||||
|
||||
\n Finally, you can define a \b Plane by another \b Plane or <b>Local
|
||||
Coordinate System</b> and a <b>Size of the Plane</b>.
|
||||
Coordinate System</b> and a <b>Size of the Plane</b>. To change selection type cilck the corresponding
|
||||
radio button "Face" or "Local Coordinate System".
|
||||
\n <b>TUI Command:</b> <em>geompy.MakePlaneFace(Face, TrimSize)</em>
|
||||
\n <b>Arguments:</b> Name + 1 face + 1 value (to define the size of
|
||||
the plane).
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
//////////////////////////////////////////
|
||||
|
@ -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
|
||||
//////////////////////////////////////////
|
||||
|
150
src/DlgRef/DlgRef_3Radio1Sel1Spin_QTD.ui
Normal file
150
src/DlgRef/DlgRef_3Radio1Sel1Spin_QTD.ui
Normal file
@ -0,0 +1,150 @@
|
||||
<ui version="4.0" >
|
||||
<class>DlgRef_3Radio1Sel1Spin_QTD</class>
|
||||
<widget class="QWidget" name="DlgRef_3Radio1Sel1Spin_QTD" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>357</width>
|
||||
<height>131</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="GroupBox1" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>357</width>
|
||||
<height>131</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<item row="0" column="0" colspan="3" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" >
|
||||
<item>
|
||||
<widget class="QRadioButton" name="RadioButton1" >
|
||||
<property name="text" >
|
||||
<string>RadioButton1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="RadioButton2" >
|
||||
<property name="text" >
|
||||
<string>RadioButton2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="RadioButton3" >
|
||||
<property name="text" >
|
||||
<string>RadioButton3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="TextLabel1" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>TL1</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QPushButton" name="PushButton1" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QLineEdit" name="LineEdit1" />
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="TextLabel2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>TL2</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2" >
|
||||
<widget class="QtxDoubleSpinBox" name="SpinBox_DX" />
|
||||
</item>
|
||||
<item row="3" column="2" >
|
||||
<spacer name="verticalSpacer" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>256</width>
|
||||
<height>19</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11" />
|
||||
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QtxDoubleSpinBox</class>
|
||||
<extends>QDoubleSpinBox</extends>
|
||||
<header location="global" >QtxDoubleSpinBox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>PushButton1</tabstop>
|
||||
<tabstop>LineEdit1</tabstop>
|
||||
<tabstop>SpinBox_DX</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -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 \
|
||||
|
@ -552,6 +552,10 @@ Please, select face, shell or solid and try again</translation>
|
||||
<source>GEOM_FACE</source>
|
||||
<translation>Face</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>GEOM_LCS</source>
|
||||
<translation>Local coordinate system</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>GEOM_FACES</source>
|
||||
<translation>Faces</translation>
|
||||
|
Loading…
Reference in New Issue
Block a user