]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Extruded boss / cut dialog improvement and documenation update
authorrnc <rnc@opencascade.com>
Tue, 6 Mar 2012 16:22:03 +0000 (16:22 +0000)
committerrnc <rnc@opencascade.com>
Tue, 6 Mar 2012 16:22:03 +0000 (16:22 +0000)
17 files changed:
doc/salome/gui/GEOM/images/change_direction.png [new file with mode: 0644]
doc/salome/gui/GEOM/images/extruded_boss.png [new file with mode: 0644]
doc/salome/gui/GEOM/images/extruded_boss_dlg.png [new file with mode: 0644]
doc/salome/gui/GEOM/images/extruded_cut_dlg.png [new file with mode: 0644]
doc/salome/gui/GEOM/input/extruded_boss_operation.doc
doc/salome/gui/GEOM/input/extruded_cut_operation.doc
resources/Makefile.am
resources/change_direction.png [new file with mode: 0644]
src/DlgRef/DlgRef.cxx
src/DlgRef/DlgRef.h
src/DlgRef/DlgRef_2Sel2Spin1Push_QTD.ui
src/DlgRef/DlgRef_2Sel2Spin2Push_QTD.ui [new file with mode: 0644]
src/DlgRef/Makefile.am
src/GEOMGUI/GEOM_images.ts
src/GEOMGUI/GEOM_msg_en.ts
src/OperationGUI/OperationGUI_ExtrudedFeatureDlg.cxx
src/OperationGUI/OperationGUI_ExtrudedFeatureDlg.h

diff --git a/doc/salome/gui/GEOM/images/change_direction.png b/doc/salome/gui/GEOM/images/change_direction.png
new file mode 100644 (file)
index 0000000..fb34fed
Binary files /dev/null and b/doc/salome/gui/GEOM/images/change_direction.png differ
diff --git a/doc/salome/gui/GEOM/images/extruded_boss.png b/doc/salome/gui/GEOM/images/extruded_boss.png
new file mode 100644 (file)
index 0000000..fca4e90
Binary files /dev/null and b/doc/salome/gui/GEOM/images/extruded_boss.png differ
diff --git a/doc/salome/gui/GEOM/images/extruded_boss_dlg.png b/doc/salome/gui/GEOM/images/extruded_boss_dlg.png
new file mode 100644 (file)
index 0000000..80c767e
Binary files /dev/null and b/doc/salome/gui/GEOM/images/extruded_boss_dlg.png differ
diff --git a/doc/salome/gui/GEOM/images/extruded_cut_dlg.png b/doc/salome/gui/GEOM/images/extruded_cut_dlg.png
new file mode 100644 (file)
index 0000000..f18ed6a
Binary files /dev/null and b/doc/salome/gui/GEOM/images/extruded_cut_dlg.png differ
index 79d50f0cdb1ad4932db36eaf711259cd1a8811c0..a7d6d92f2ba357de926df37d25a1b58c8afbfd47 100644 (file)
@@ -2,7 +2,42 @@
 
 \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
index c1c9401585de1402b943a708f2c77afa30535680..efd7e76e0e1ec1ae97cd2de3fae73c46e1976181 100644 (file)
@@ -4,7 +4,7 @@
 
 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>:
 
@@ -19,9 +19,9 @@ 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.
 
@@ -33,6 +33,12 @@ 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.MakeExtrudedCut(InitShape, Profile, Height,Angle),</em>
 
 
 */
index 9719dd063fcbbeba0168b59e8243b98fea80ba66..ef1cc9fa114fc8d529e2c1cf24163d8b4bd35952 100644 (file)
@@ -57,6 +57,7 @@ chamferedge.png                       \
 chamferface.png                        \
 chamferedgefromface.png                \
 change_orientation.png         \
+change_direction.png           \
 check.png                      \
 circle.png                     \
 circlepointvector.png          \
diff --git a/resources/change_direction.png b/resources/change_direction.png
new file mode 100644 (file)
index 0000000..fb34fed
Binary files /dev/null and b/resources/change_direction.png differ
index 8c21e214d056798c728000ab97acc52876fa2594..65541592bb6672a8504c0e3f9eabb2dfad78be87 100644 (file)
@@ -442,6 +442,20 @@ DlgRef_2Sel2Spin1Push::~DlgRef_2Sel2Spin1Push()
 {
 }
 
+//////////////////////////////////////////
+// DlgRef_2Sel2Spin2Push
+//////////////////////////////////////////
+
+DlgRef_2Sel2Spin2Push::DlgRef_2Sel2Spin2Push( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel2Spin2Push::~DlgRef_2Sel2Spin2Push()
+{
+}
+
 //////////////////////////////////////////
 // DlgRef_2Sel3Spin2Rb
 //////////////////////////////////////////
index 0673ad7dc84c8a5343636f23de14535fcf5d9cbc..9b565ba0ab67806bcf9c5558088b0c3b62b79dee 100644 (file)
@@ -515,6 +515,22 @@ public:
   ~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
 //////////////////////////////////////////
index 4c3dbe5e8877d5c7e3f5cfdbbab7f9c1e32488da..d240954498f68660d67e734af137e6c1417c6edf 100644 (file)
         </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>
diff --git a/src/DlgRef/DlgRef_2Sel2Spin2Push_QTD.ui b/src/DlgRef/DlgRef_2Sel2Spin2Push_QTD.ui
new file mode 100644 (file)
index 0000000..625ad9d
--- /dev/null
@@ -0,0 +1,173 @@
+<?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>
index 8566c14e1d6584ba94db75afac54c7384e1cbf1d..e5266843ac5a2c6bb717e33e6cf5553ea6121a75 100644 (file)
@@ -66,6 +66,7 @@ UIC_FILES =                                   \
        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         \
index d10d88748d7e3a664fd0bedcb19ef2197e9b9bb3..8acae0f621303fb60f1e9d78b654586b5c5380ae 100644 (file)
             <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>
index 6936f97e847c2d4dea7b80b008392a8577c6a885..48edbe8ac685f2c5ec7cf5c87d6ae95e2bdb09d9 100644 (file)
@@ -325,6 +325,10 @@ Please, select face, shell or solid and try again</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>
@@ -541,6 +545,10 @@ Please, select face, shell or solid and try again</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>
@@ -1211,6 +1219,10 @@ Please, select face, shell or solid and try again</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>
index 80f6a8e539bc877d727ac00978e117d540cddb69..44e8c46d7b4f64c37bbac9485ef7b4d9c536f6bf 100644 (file)
@@ -69,6 +69,7 @@ OperationGUI_ExtrudedFeatureDlg::OperationGUI_ExtrudedFeatureDlg(const int theOp
   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) 
   {
@@ -94,15 +95,21 @@ OperationGUI_ExtrudedFeatureDlg::OperationGUI_ExtrudedFeatureDlg(const int theOp
   
   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());
@@ -153,6 +160,7 @@ void OperationGUI_ExtrudedFeatureDlg::Init()
   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()));
   
@@ -331,7 +339,10 @@ void OperationGUI_ExtrudedFeatureDlg::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);
 }
 
@@ -362,16 +373,24 @@ bool OperationGUI_ExtrudedFeatureDlg::execute (ObjectList& objects)
   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())
index 6a31231056d5b432035e2da1073b68d9be3c5041..e1bdd3066d8adaec79ac97884f574d4861a70da1 100644 (file)
@@ -36,7 +36,7 @@
 // class DlgRef_2Sel;
 // class DlgRef_1Sel3Spin;
 // class DlgRef_1Sel2Spin;
-class DlgRef_2Sel2Spin1Push;
+class DlgRef_2Sel2Spin2Push;
 
 // class QLineEdit;
 // class QGroupBox;
@@ -73,7 +73,7 @@ private:
   GEOM::GeomObjPtr            myObject1;
   GEOM::GeomObjPtr            myObject2;
   
-  DlgRef_2Sel2Spin1Push*      myGroup;
+  DlgRef_2Sel2Spin2Push*      myGroup;
   
 private slots:
   void                        ClickOnOk();