\page extruded_boss_operation_page Extruded boss
-The "Extruded boss" operation allows you to add material to an object by extruding a profile or a face
-along the normal to its plane.
+The <b>Extruded boss</b> operation allows you to easily add material on a \b solid by extruding a profile along the normal to its plane.
-*/
+\image html extruded_boss_example.png
+
+To produce the <b>extruded boss</b>:
+
+1. Draw the \b profile of the extrusion. It can be:
+
+ - a \b Sketch drawn on a planar face of the object you want to boss.
+
+ - any closed edge or wire of the desired shape (circle, ellipse ...).
+
+2. In the <b>Main Menu</b> select <b>Operations - > Extruded Boss</b> or click on
+\image html extruded_boss.png
+
+3. Fill in the dialog box fields:
+
+\image html extruded_boss_dlg.png
+
+The input arguments are:
+
+- The <b>initial shape</b> you want to add material on. It must be a solid or a compound made of a single solid.
+
+- The \b profile. It must be a \b closed edge or wire and it must be \b planar.
+
+- The \b height of extrusion. It's calculated from the <b>base profile</b> along the normal to its plane.
+
+And optionnaly:
+
+- A <b>draft angle</b> in degrees. Activated by clicking on \image html draft.png
+
+The direction can be reversed by pushing the <b> Change direction </b> button: \image html change_direction.png
+
+
+This functionality is available via the textual interface with the command:
+
+\n <b>TUI Command:</b> <em>geompy.MakeExtrudedBoss(InitShape, Profile, Height, Angle),</em>
+
+*/
\ No newline at end of file
The <b>Extruded cut</b> operation allows you to easily remove material from a \b solid by extruding a profile along the normal to its plane.
-- \image html extruded_cut_example.png
+\image html extruded_cut_example.png
To produce the <b>extruded cut</b>:
3. Fill in the dialog box fields:
-\image
+\image html extruded_cut_dlg.png
-The input parameters are:
+The input arguments are:
- The <b>initial shape</b> you want to cut. It must be a solid or a compound made of a single solid.
- A <b>draft angle</b> in degrees. Activated by clicking on \image html draft.png
+The direction can be reversed by pushing the <b> Change direction </b> button: \image html change_direction.png
+
+
+This functionality is available via the textual interface with the command:
+
+\n <b>TUI Command:</b> <em>geompy.MakeExtrudedCut(InitShape, Profile, Height,Angle),</em>
*/
chamferface.png \
chamferedgefromface.png \
change_orientation.png \
+change_direction.png \
check.png \
circle.png \
circlepointvector.png \
{
}
+//////////////////////////////////////////
+// DlgRef_2Sel2Spin2Push
+//////////////////////////////////////////
+
+DlgRef_2Sel2Spin2Push::DlgRef_2Sel2Spin2Push( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+ setupUi( this );
+}
+
+DlgRef_2Sel2Spin2Push::~DlgRef_2Sel2Spin2Push()
+{
+}
+
//////////////////////////////////////////
// DlgRef_2Sel3Spin2Rb
//////////////////////////////////////////
~DlgRef_2Sel2Spin1Push();
};
+//////////////////////////////////////////
+// DlgRef_2Sel2Spin2Push
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel2Spin2Push_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel2Spin2Push : public QWidget,
+ public Ui::DlgRef_2Sel2Spin2Push_QTD
+{
+ Q_OBJECT
+
+public:
+ DlgRef_2Sel2Spin2Push( QWidget* = 0, Qt::WindowFlags = 0 );
+ ~DlgRef_2Sel2Spin2Push();
+};
+
//////////////////////////////////////////
// DlgRef_2Sel3Spin2Rb
//////////////////////////////////////////
</property>
</widget>
</item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="TextLabel4">
+ <property name="text">
+ <string>TL4</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_2Sel2Spin2Push_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel2Spin2Push_QTD">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>281</width>
+ <height>165</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="title">
+ <string/>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="TextLabel1">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="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="0" column="2">
+ <widget class="QPushButton" name="PushButton1">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3" colspan="2">
+ <widget class="QLineEdit" name="LineEdit1"/>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="TextLabel2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="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="1" column="2">
+ <widget class="QPushButton" name="PushButton2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3" colspan="2">
+ <widget class="QLineEdit" name="LineEdit2"/>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="TextLabel3">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL3</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2" colspan="3">
+ <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX"/>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="TextLabel4">
+ <property name="text">
+ <string>TL4</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="2">
+ <widget class="QPushButton" name="PushButton3">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="3" colspan="2">
+ <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY"/>
+ </item>
+ <item row="5" column="2">
+ <widget class="QPushButton" name="PushButton4">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="TextLabel5">
+ <property name="text">
+ <string>TL5</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>SalomeApp_DoubleSpinBox</class>
+ <extends>QDoubleSpinBox</extends>
+ <header location="global">SalomeApp_DoubleSpinBox.h</header>
+ </customwidget>
+ </customwidgets>
+ <tabstops>
+ <tabstop>PushButton1</tabstop>
+ <tabstop>LineEdit1</tabstop>
+ <tabstop>PushButton2</tabstop>
+ <tabstop>LineEdit2</tabstop>
+ <tabstop>SpinBox_DX</tabstop>
+ <tabstop>SpinBox_DY</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
ui_DlgRef_2Sel2Spin3Check_QTD.h \
ui_DlgRef_2Sel2Spin_QTD.h \
ui_DlgRef_2Sel2Spin1Push_QTD.h \
+ ui_DlgRef_2Sel2Spin2Push_QTD.h \
ui_DlgRef_2Sel3Spin2Rb_QTD.h \
ui_DlgRef_2Sel3Spin_QTD.h \
ui_DlgRef_2Sel4Spin1Check_QTD.h \
<source>ICON_DLG_CHANGE_ORIENTATION</source>
<translation>change_orientation.png</translation>
</message>
+ <message>
+ <source>ICON_DLG_CHANGE_DIRECTION</source>
+ <translation>change_direction.png</translation>
+ </message>
<message>
<source>ICON_DLG_REMOVE_EXTRA_EDGES</source>
<translation>remove_extra_edges.png</translation>
<source>GEOM_CHANGE_ORIENTATION</source>
<translation>Objects to change orientation</translation>
</message>
+ <message>
+ <source>GEOM_CHANGE_DIRECTION</source>
+ <translation>Change direction</translation>
+ </message>
<message>
<source>GEOM_CHANGE_ORIENTATION_TITLE</source>
<translation>Change orientation</translation>
<source>GEOM_DropSmallEdges</source>
<translation>DropSmallEdges</translation>
</message>
+ <message>
+ <source>GEOM_DRAFT_ANGLE</source>
+ <translation>Draft angle:</translation>
+ </message>
<message>
<source>GEOM_EDGE</source>
<translation>Edge</translation>
<source>GEOM_PIPE_TITLE</source>
<translation>Pipe Construction</translation>
</message>
+ <message>
+ <source>GEOM_PROFILE</source>
+ <translation>Profile</translation>
+ </message>
<message>
<source>GEOM_SEGMENT</source>
<translation>Segment of straight line</translation>
QPixmap image0;
QPixmap image1 (aResMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
QPixmap image2 (aResMgr->loadPixmap("GEOM", tr("ICO_DRAFT")));
+ QPixmap image3 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_CHANGE_DIRECTION")));
QString aTitle;
switch (myOperation)
{
mainFrame()->RadioButton1->setChecked(true);
- myGroup = new DlgRef_2Sel2Spin1Push(centralWidget());
+ myGroup = new DlgRef_2Sel2Spin2Push(centralWidget());
+
+ myGroup->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
+
myGroup->PushButton1->setIcon(image1);
myGroup->PushButton2->setIcon(image1);
myGroup->PushButton3->setIcon(image2);
+ myGroup->PushButton4->setIcon(image3);
myGroup->LineEdit1->setReadOnly(true);
myGroup->LineEdit2->setReadOnly(true);
myGroup->TextLabel1->setText(tr("GEOM_INIT_SHAPE"));
- myGroup->TextLabel2->setText(tr("GEOM_SKETCH"));
+ myGroup->TextLabel2->setText(tr("GEOM_PROFILE"));
myGroup->TextLabel3->setText(tr("GEOM_HEIGHT"));
+ myGroup->TextLabel4->setText(tr("GEOM_DRAFT_ANGLE"));
+ myGroup->TextLabel5->setText(tr("GEOM_CHANGE_DIRECTION"));
QVBoxLayout* layout = new QVBoxLayout(centralWidget());
connect(myGroup->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(myGroup->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(myGroup->PushButton3, SIGNAL(clicked(bool)), this, SLOT(ButtonClicked(bool)));
+ connect(myGroup->PushButton4, SIGNAL(clicked(bool)), this, SLOT(ButtonClicked(bool)));
connect(myGroup->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
connect(myGroup->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
//=================================================================================
void OperationGUI_ExtrudedFeatureDlg::ButtonClicked(bool checked)
{
- myGroup->SpinBox_DY->setEnabled(checked);
+ QPushButton* send = (QPushButton*)sender();
+ if (send == myGroup->PushButton3)
+ myGroup->SpinBox_DY->setEnabled(checked);
+
displayPreview(true);
}
GEOM::GEOM_I3DPrimOperations_var anOper = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation());
double angle=0.0;
+ double aHeight = myGroup->SpinBox_DX->value();
+
if (myGroup->PushButton3->isChecked())
angle=myGroup->SpinBox_DY->value();
+
+ if (myGroup->PushButton4->isChecked())
+ {
+ aHeight = -aHeight;
+ angle = -angle;
+ }
bool isProtrusion = (myOperation == OperationGUI::BOSS);
// Hide the initial shape in order to see the modifications on the preview
- erase(myObject1.get(),false);
+ erase(myObject1.get(),false);
GEOM::GEOM_Object_var anObj = anOper->MakeDraftPrism(myObject1.get(), myObject2.get(),
- myGroup->SpinBox_DX->value(),
+ aHeight,
angle,
isProtrusion);
if (!anObj->_is_nil())
// class DlgRef_2Sel;
// class DlgRef_1Sel3Spin;
// class DlgRef_1Sel2Spin;
-class DlgRef_2Sel2Spin1Push;
+class DlgRef_2Sel2Spin2Push;
// class QLineEdit;
// class QGroupBox;
GEOM::GeomObjPtr myObject1;
GEOM::GeomObjPtr myObject2;
- DlgRef_2Sel2Spin1Push* myGroup;
+ DlgRef_2Sel2Spin2Push* myGroup;
private slots:
void ClickOnOk();