]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Merge branch 'origin/ysn/doc_update_740': update documentation
authorvsr <vsr@opencascade.com>
Wed, 7 May 2014 12:25:27 +0000 (16:25 +0400)
committervsr <vsr@opencascade.com>
Wed, 7 May 2014 12:25:27 +0000 (16:25 +0400)
22 files changed:
CMakeLists.txt
doc/salome/gui/GEOM/CMakeLists.txt
doc/salome/gui/GEOM/images/smoothingsurface_dlg.png
doc/salome/gui/GEOM/input/creating_ellipse.doc
doc/salome/gui/GEOM/input/creating_sketcher.doc
doc/salome/gui/GEOM/input/creating_smoothingsurface.doc
doc/salome/gui/GEOM/input/get_non_blocks.doc
doc/salome/gui/GEOM/input/manipulate_object.doc
doc/salome/gui/GEOM/input/python_interface.doc
doc/salome/gui/GEOM/input/pythonutils.doc [new file with mode: 0644]
doc/salome/gui/GEOM/input/struct_elem_visualisation.doc
src/AdvancedEngine/GEOMImpl_SmoothingSurfaceDriver.cxx
src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx
src/AdvancedGUI/AdvancedGUI_msg_en.ts
src/EntityGUI/EntityGUI_3DSketcherDlg.cxx
src/EntityGUI/EntityGUI_3DSketcherDlg.h
src/GEOMGUI/GeometryGUI.cxx
src/GEOM_PY/sketcher.py
src/GEOM_SWIG/geomBuilder.py
src/GEOM_SWIG/gsketcher.py
src/GroupGUI/GroupGUI_GroupDlg.cxx
src/GroupGUI/GroupGUI_GroupDlg.h

index 1300477fcf3bd970a9720c565cfa700ad311d7cf..5c9446aa60f106ee6d3f840f074c46772585c2f1 100755 (executable)
@@ -30,11 +30,11 @@ CMAKE_POLICY(SET CMP0003 NEW)
 STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
 
 SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 3)
-SET(${PROJECT_NAME_UC}_PATCH_VERSION 1)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 4)
+SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
 SET(${PROJECT_NAME_UC}_VERSION
   ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
-SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
+SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
 
 # Find KERNEL
 # ===========
index 435d60b92fc481c763eabde4e7c623f7dd7e6a87..1b8fbf299c443ab30b79f8bf5b90e5baaf39b9e5 100644 (file)
@@ -34,6 +34,7 @@ ADD_CUSTOM_TARGET(usr_docs ${CMAKE_COMMAND} -E make_directory tmp
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/geomBuilder.py ${CMAKE_SOURCE_DIR}/src/GEOM_SWIG/geomBuilder.py
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/gsketcher.py   ${CMAKE_SOURCE_DIR}/src/GEOM_SWIG/gsketcher.py
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/geomtools.py   ${CMAKE_SOURCE_DIR}/src/GEOM_PY/geomtools.py
+  COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/sketcher.py    ${CMAKE_SOURCE_DIR}/src/GEOM_PY/sketcher.py
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/structelem.py  ${CMAKE_SOURCE_DIR}/src/GEOM_PY/structelem/__init__.py
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/parts.py       ${CMAKE_SOURCE_DIR}/src/GEOM_PY/structelem/parts.py
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/orientation.py ${CMAKE_SOURCE_DIR}/src/GEOM_PY/structelem/orientation.py
index 4605175c2d7a3d25e62c52a98263bb4c395ee34b..dabea3519f55154071247aef7c45953c9fe0dbd3 100644 (file)
Binary files a/doc/salome/gui/GEOM/images/smoothingsurface_dlg.png and b/doc/salome/gui/GEOM/images/smoothingsurface_dlg.png differ
index 2cbe099abb5d88668dfaafeb4dfef9c77de06179..124e7f3848edfd0f15fe128d87ec03348f2c78be 100644 (file)
@@ -19,11 +19,11 @@ corresponds to OX axis of the global coordinate system.
 <EM> Vmaj' = (Vn * Vmaj) * Vn</em>, where \em Vn is a normal vector and
 \em Vmaj is an original vector of the major axis.
 
-\n <b>TUI Command (with the major axis):</b> <em>geompy.MakeEllipse(Point, Vector, RadiusMajor, RadiusMinor)</em>
+\n <b>TUI Command (without the major axis):</b> <em>geompy.MakeEllipse(Point, Vector, RadiusMajor, RadiusMinor)</em>
 \n <b>Arguments:</b> Name + 1 vertex (for the center) + 1 edge (for
 the direction) + 1 X Radius + 1 Y Radius.
 
-\n <b>TUI Command (without the major axis):</b> <em>geompy.MakeEllipseVec(Point, Vector, RadiusMajor, RadiusMinor, VectorMajor)</em>
+\n <b>TUI Command (with the major axis):</b> <em>geompy.MakeEllipseVec(Point, Vector, RadiusMajor, RadiusMinor, VectorMajor)</em>
 \n <b>Arguments:</b> Name + 1 vertex (for the center) + 1 edge (for
 the normal direction) + 1 X Radius + 1 Y Radius + 1 edge (for the
 major axis direction).
index 821886a96eaa28ab00b12fadaee06b4206f887e5..159361772d2516a72ac5fb73c115142fa8c863ba 100644 (file)
@@ -8,57 +8,54 @@ To create a <b>2D Sketch</b> select in the main menu  <b>New Entity -> Basic ->
 
 \image html sketcher_dlg.png
 
-\n At first it is necessary to define the reference coordinate system, where the sketch will be created:
+At first it is necessary to define the reference coordinate system, where the sketch will be created:
 - The XOY plane of the <b>Global coordinate system</b> is suggested by default (if no plane or planar face is selected when <b>2D Sketcher</b> is activated). 
 - If any Local Coordinate Systems have been created in the study earlier, they can be selected as a reference coordinate system in the corresponding list box.
 - The \b Arrow button allows selecting a \b plane or a <b>planar face</b> in the viewer or in the object browser as the reference coordinate system for the sketch. The start point will be set in the \b geometric \b center of the face.  
 - <b>Restore</b> button orientates the viewer correspondingly to the chosen working plane and fits the scene to show all objects. 
 
-\n It is possible to create sketches of two types:
+It is possible to create sketches of two types:
 - \b Profiles made of <b>line segments</b> and \b arcs, or 
 - \b Rectangles. 
 
 <h2>Creation of a Profile by straight segments</h2>
 
 - Choose \b segment radio button to start a \b profile.
+
 - Define the start point. By default the start point of the curve is located at the origin of the reference coordinate system. A point in 2D Sketcher can be defined in one of three ways: 
-       - By \b Absolute coordinates. Select \b Absolute radio button in \b Points group, input \b X and \b Y values and click \b Apply button.
-       
-       \image html 2dsketch1.png       
 
-       - By \b Relative coordinates. Select \b Relative radio button in \b Points group, input \b DX and \b DY values and click \b Apply button. 
-       
-       \image html 2dsketch2.png
+  - By \b Absolute coordinates. Select \b Absolute radio button in \b Points group, input \b X and \b Y values and click \b Apply button:
+  \image html 2dsketch1.png
+  
+  - By \b Relative coordinates. Select \b Relative radio button in \b Points group, input \b DX and \b DY values and click \b Apply button. 
+  \image html 2dsketch2.png
 
-       - By \b Selection of an existing point. Select \b Selection radio button in \b Points group, select a point in the viewer or in the object browser and click \b Apply button.
-       
-       \image html 2dsketch3.png
+  - By \b Selection of an existing point. Select \b Selection radio button in \b Points group, select a point in the viewer or in the object browser and click \b Apply button.
+  \image html 2dsketch3.png
 
 - Define the next point. Together these two points form the first segment of the sketch.
 
-\n Alternatively to the definition by \b Points it is possible to define segments by \b Direction and \Distance.  
+Alternatively to the definition by \b Points it is possible to define segments by \b Direction and \b Distance.  
  
 - The \b Direction can be:
-       - Defined by an \b Angle to the previous segment.
-
-       \image html 2dsketch4.png
-       
-       - \b Perpendicular to the previous segment (i.e. the Angle is 90 degrees).
-       
-       \image html 2dsketch5.png
-               
-       - \b Tangent (collinear) to the previous segment (i.e. the Angle is 0 degrees).
 
-       \image html 2dsketch6.png
-       
-       - Defined by <b>VX-VY</b> vector coordinates.   
-       
-       \image html 2dsketch7.png
+  - Defined by an \b Angle to the previous segment.
+  \image html 2dsketch4.png
+  
+  - \b Perpendicular to the previous segment (i.e. the Angle is 90 degrees).
+  \image html 2dsketch5.png
+  
+  - \b Tangent (collinear) to the previous segment (i.e. the Angle is 0 degrees).
+  \image html 2dsketch6.png
+  
+  - Defined by <b>VX-VY</b> vector coordinates.   
+  \image html 2dsketch7.png
        
 - The \b Distance can be defined: 
-       - By the absolute segment \b Length or 
-       - By \b DX - the length of segment projection on X-axis. 
-       - By \b DY - the length of segment projection on Y-axis. 
+
+  - By the absolute segment \b Length
+  - By \b DX - the length of segment projection on X-axis. 
+  - By \b DY - the length of segment projection on Y-axis. 
        
 - Proceed with creation of the sketch segments and click \b Apply after each step. The drawn segments will be displayed in the viewer. 
 - Use \b Undo and \b Redo buttons to cancel an erroneously applied segment or to restore it. 
@@ -94,16 +91,16 @@ Draw a rectangle with the mouse directly in the view or input the coordinates of
 
 <h2>TUI Commands</h2>
 
-\n <em>geompy.MakeSketcherOnPlane(Command, WorkingPlane)</em>
+<em>geompy.MakeSketcherOnPlane(Command, WorkingPlane)</em>
 
 This algorithm creates a sketcher (wire or face), following the textual description, passed through the <i>Command</i> argument. The edges of the resulting wire or face will be arcs of circles and/or linear segments.
 
 - \em Command is a string, defining the sketcher by the coordinates of points in the current LCS.
 - <em>WorkingPlane</em> can be a Local CS, a plane, or a planar face.
 
-\n Another way to create the 2D Sketcher in TUI is using Sketcher2D interface.
+Another way to create the 2D Sketcher in TUI is using Sketcher2D interface.
 
-\n <em>sk = geompy.Sketcher2D()</em> - returns an instance of Sketcher2D interface <i>sk</i>.
+<em>sk = geompy.Sketcher2D()</em> - returns an instance of Sketcher2D interface <i>sk</i>.
 
 \image html sketch_example.png
 
index 2b2968a5213c3799bf09fe3fdda3aabe5d994a55..a4d3fb6471d6940d3971141779ba866a439cca94 100644 (file)
@@ -12,7 +12,15 @@ In this dialog you can specify the following parameters:
 - the list of \b Points or compounds of points, from which it is approximated;
 - <b>Max nbr of Bezier pieces</b> in the resulting surface;
 - <b>Max BSpline surface degree</b> of the resulting BSpline surface;
-- <b>Max plate criterion value</b>, which is computed as <em> max(0.0001,10*error), </em> where error is a 3D tolerance of the surface.
+- <b>3D tolerance of initial approximation</b>
+
+\note <b>3D tolerance of initial approximation</b> represents a tolerance of
+initial plate surface approximation. If this parameter is equal to 0 (default),
+its value is automatically computed as <em> max(0.0001, 10*error)</em>,
+where <em>error</em> is a 3D tolerance of the surface representing a maximal
+distance between computed plate surface and given points.
+
+<b>Advanced options:</b> \ref preview_anchor "Preview"
 
 Press "Apply" or "Apply & Close" button to get the resulting <em>GEOM_Object(Surface)</em>.
 
@@ -20,7 +28,7 @@ Press "Apply" or "Apply & Close" button to get the resulting <em>GEOM_Object(Sur
 - \em thelPoints is a list of points or compounds of points;
 - \em theNbMax maximum number of Bezier pieces in the resulting surface;
 - \em theDegMax maximum degree;  
-- \em theDMax specifies maximum value of <em> GeomPlate_PlateG0Criterion </em>.
+- \em theDMax specifies 3D tolerance of initial approximation
 
 Example:
 
index 02aefdc15052b161e8b007ab8101d35a3aa5e441..79f6ba0219ef9b3b633145648cad4ad9e74f8cb6 100644 (file)
@@ -5,7 +5,7 @@
 
 This operation retrieves all non-block solids and non-quadrangular faces from the selected shape.
 
-A non-block solid is a solid that does not have 6 faces, or has 6 faces, but some of them are not quadrangular).
+A non-block solid is a solid that does not have 6 faces, or has 6 faces, but some of them are not quadrangular.
 
 \image html measures2.png
 
@@ -21,6 +21,9 @@ If no bad sub-shapes have been found, the corresponding warning is shown.
 \n <b>TUI Command:</b>
 <em>geompy.GetNonBlocks(Compound).</em> Returns a tuple of two GEOM_Objects. 
 
+The first object is a group of all non block solids; the second object is a group of all non
+quadrangular faces.
+
 See also a \ref tui_get_non_blocks_page "TUI example".
 
 */
index a27fdd422f545b607b1dfc17a653a5d51f6fe02f..3e12df685e162eae8b576c70eb737eda0236722f 100644 (file)
@@ -2,6 +2,13 @@
 
 \page manipulate_object Manipulate GEOM object in the study (module geomtools)
 
+The Python module <a href="geompy_doc/group__geomtools.html">geomtools</a> provides
+utility functions to handle %GEOM items in SALOME study:
+- add or remove a shape;
+- display or erase a shape in the viewer;
+- completely delete a shape (undisplay, unpublish, and destroy it);
+- manage the selection in the object browser
+
 The usage of <em>geomtools</em> module can be tested with the following set of instructions:
 
 \code
@@ -17,7 +24,7 @@ This test executes the following procedure:
 - Delete the cylinder. It is no longer displayed and does not exist any more in the study or in the GEOM component.
 
 At outcome of the test execution, the following objects appear in the SALOME session:
-- the box located in a dedicated study folder and displayed in the viewer;
-- the sphere in the standard place of the study, and not displayed.
+- The box located in a dedicated study folder and displayed in the viewer;
+- The sphere in the standard place of the study, and not displayed.
 
 */
index a8fe1e99efb13f4e7a20fe48216bc41c77d19eb9..7aaad029d91722448cb06abc8792b055e58788a5 100644 (file)
@@ -4,25 +4,24 @@
 
 The %GEOM python package essentially contains:
 
-- Python Interface \subpage geompy_page "geomBuilder.py" to import/export, create and transform geometrical objects and use measurement tools;
-- Utility functions <em>geomtools.py</em> to handle %GEOM items in Salome study:
+- Python Interface \subpage geompy_page "geomBuilder.py" to import/export,
+  create and transform geometrical objects, manage fields, use measurement tools;
+
+- Utility functions within Python module \subpage manipulate_object "geomtools.py"
+  to handle %GEOM items in SALOME study:
   - add or remove a shape;
   - display or erase a shape in the viewer;
   - completely delete a shape (undisplay, unpublish, and destroy it);
-  - manage the selection in the object browser
-  See for example how to \subpage manipulate_object "Manipulate a GEOM object in the study".
-- Wrapping functions for %GEOM tools:
-  - sketcher module to create sketches from the python API (gsketcher.py)
-- \subpage struct_elem_visualisation "Visualization of structural elements" function to create
-  geometrical 3D representations of mechanical models called
-  "structural elements" (package \ref structelem.py "structelem")
+  - manage the selection in the object browser.
+
+- \subpage pythonutils_page "Wrapping functions" for %GEOM tools       
+
+- Python package \subpage struct_elem_visualisation "structelem" that provides
+  functions to create geometrical 3D representations of mechanical models called
+  "structural elements"
 
 The functions are distributed in the python package <em>salome.geom.</em> 
 Its documentation is mainly generated from the code of source python files.
-<b>salome.geom</b> – Package containing the %GEOM python utilities:
-- <a href="geompy_doc/group__geomtools.html">geomtools</a>
-- <a href="geompy_doc/group__sketcher.html">sketcher</a>
-- <a href="geompy_doc/group__structelem.html">structelem</a>
 
 \note The main package <em>salome</em> contains other sub-packages that are
 distributed with the other SALOME modules. For example, the KERNEL
diff --git a/doc/salome/gui/GEOM/input/pythonutils.doc b/doc/salome/gui/GEOM/input/pythonutils.doc
new file mode 100644 (file)
index 0000000..504874d
--- /dev/null
@@ -0,0 +1,11 @@
+/*!
+
+\page pythonutils_page Auxiliary Python API of Geometry module
+
+Python API of Geometry module includes some additional packages:
+
+- Sketcher module <a href="geompy_doc/group__sketcher.html">gsketcher.py</a> to create 2D / 3D sketches
+
+- Simplified sketcher module <a href="geompy_doc/group__simplesketcher.html">sketcher.py</a> (deprecated)
+
+*/
\ No newline at end of file
index 70cc550cb580e7c4557fb13dec7e78ccc72d1ad6..78dca8b3f06712d27cb9e2b5071e474449c6280a 100644 (file)
@@ -2,6 +2,9 @@
 
 \page struct_elem_visualisation Visualization of structural elements (package structelem)
 
+The Python package <a href="geompy_doc/group__structelem.html">structelem</a> contains functions
+to create geometrical 3D representations of mechanical models called "structural elements".
+
 The visualization of structural elements can be tested with the following set of instructions:
 
 \code
index ef1b732aedba6e1cf557d01889a95a13c4f6691d..2b0345522a4a2018a9df7b80b5d92395b8eb8ad7 100644 (file)
@@ -262,7 +262,7 @@ GetCreationInformation(std::string&             theOperationName,
 
       AddParam(theParams, "Max nbr of Bezier pieces", aCI.GetNbMax());
       AddParam(theParams, "Max BSpline surface degree", aCI.GetDegMax());
-      AddParam(theParams, "Max plate criterion value", aCI.GetDMax());
+      AddParam(theParams, "3D tolerance of initial approximation", aCI.GetDMax());
     }
     break;
   default:
index 15a5cd5701897a6714ed7da1f36d205ea4e16474..46be04e60f79626ecca3ac2b67ea4064e13326bd 100644 (file)
@@ -115,6 +115,8 @@ void AdvancedGUI_SmoothingSurfaceDlg::Init()
   myDegMaxSpin->setValue(8);
   myDMaxSpin->setValue(0.);
 
+  showOnlyPreviewControl();
+
   //@@ initialize dialog box widgets here @@//
 
   // Signal/slot connections
@@ -133,6 +135,7 @@ void AdvancedGUI_SmoothingSurfaceDlg::Init()
  
   initName(tr("GEOM_SMOOTHINGSURFACE"));
   //displayPreview();
+  SelectionIntoArgument();
 }
 
 //=================================================================================
index 3e6b28602527ec622fe9a012bebd3f81d8c62e9b..06d2d0804db4187d813e11a418c8c0a91f54d600 100644 (file)
     </message>
     <message>
         <source>GEOM_SMOOTHINGSURFACE_ARG_D_MAX</source>
-        <translation>Max plate criterion value</translation>
+        <translation>3D tolerance of initial approximation</translation>
     </message>
     <message>
         <source>GEOM_SMOOTHINGSURFACE_NO_POINTS</source>
index 40a0e5228730111bc198707b9401b4aed2d7f0de..609b7e8a39e0df80382b3f456d542de996da21e7 100755 (executable)
@@ -219,7 +219,8 @@ EntityGUI_3DSketcherDlg::EntityGUI_3DSketcherDlg (GeometryGUI* theGeometryGUI, Q
     myOK(false),
     myLineWidth(lineWidth),
     myGeometryGUI(theGeometryGUI),
-    myLengthIORedoList()
+    myLengthIORedoList(),
+    myIsUndoRedo(false)
 {
   QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_UNDO")));
@@ -615,6 +616,7 @@ void EntityGUI_3DSketcherDlg::UpdatePointCoordinates()
 //=================================================================================
 void EntityGUI_3DSketcherDlg::ClickOnUndo()
 {
+  myIsUndoRedo = true;
   if (myPointsList.count() > 0) {
     
     myRedoList.append(myPointsList.last());
@@ -635,6 +637,7 @@ void EntityGUI_3DSketcherDlg::ClickOnUndo()
     ((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->Display(myTextPrs);
     
     // Remove last point from list
+    myWorkPoint = myPointsList.last();
     myPointsList.removeLast();
     GEOMBase_Helper::displayPreview(true, false, true, true, myLineWidth);
     UpdateButtonsState();
@@ -644,6 +647,7 @@ void EntityGUI_3DSketcherDlg::ClickOnUndo()
 
     updateViewer();
   }
+  myIsUndoRedo = false;
 }
 
 //=================================================================================
@@ -652,6 +656,7 @@ void EntityGUI_3DSketcherDlg::ClickOnUndo()
 //=================================================================================
 void EntityGUI_3DSketcherDlg::ClickOnRedo()
 {
+  myIsUndoRedo = true;
   if (myRedoList.count() > 0) {
     
     myPointsList.append(myRedoList.last());
@@ -672,6 +677,7 @@ void EntityGUI_3DSketcherDlg::ClickOnRedo()
     ((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->Display(myTextPrs);
     
     // Remove last point from redo list
+    myWorkPoint = myRedoList.last();
     myRedoList.removeLast();
     GEOMBase_Helper::displayPreview(true, false, true, true, myLineWidth);
     UpdateButtonsState();
@@ -681,6 +687,7 @@ void EntityGUI_3DSketcherDlg::ClickOnRedo()
 
     updateViewer();
   }
+  myIsUndoRedo = false;
 }
 
 //=================================================================================
@@ -1242,7 +1249,13 @@ gp_Dir EntityGUI_3DSketcherDlg::getPresentationPlane() const
   bool twoAngles = GroupAngles->checkBox->isChecked();
   
   XYZ Last    = getLastPoint();
-  XYZ Current = getCurrentPoint();
+  XYZ Current;
+  if( myIsUndoRedo ) {
+      Current = myWorkPoint;
+  } else {
+    Current = getCurrentPoint();
+  }
+  
   XYZ Penultimate = getPenultimatePoint();
   
   gp_Pnt P1 = gp_Pnt(Last.x,Last.y,Last.z);
@@ -1303,7 +1316,9 @@ gp_Dir EntityGUI_3DSketcherDlg::getPresentationPlane() const
       }
     }
     // If no angles, the plane is the one formed by the last edge and the current one
-    aNormal = gp_Dir(Vec1.Crossed(Vec2)); 
+    if(Abs(Vec1.CrossMagnitude(Vec2)) > Precision::Confusion()) {
+      aNormal = gp_Dir(Vec1.Crossed(Vec2)); 
+    }
   }
   return aNormal;
 }
index 2f4b8f4b7ccc2d54f82171c88e4696ad8a8a77d3..a60a8063fbbd40938e5aa9df3bfb71adb985f020 100755 (executable)
@@ -178,6 +178,8 @@ private:
   SOCC_Prs*                          myAnglePrs;
   SOCC_Prs*                          myLengthPrs;
   SOCC_Prs*                          myTextPrs;
+  bool                               myIsUndoRedo;
+  XYZ                                myWorkPoint;
 
 private slots:
   void                               ClickOnOk();
index fab29f562a6d51700cfcbf8e5d619256c8327e24..f10e4a026d6dc8411dab6c51b46cf85d9a47f9e6 100644 (file)
@@ -1961,6 +1961,7 @@ void GeometryGUI::onWindowActivated( SUIT_ViewWindow* win )
 void GeometryGUI::windows( QMap<int, int>& mappa ) const
 {
   mappa.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea );
+  mappa.insert( SalomeApp_Application::WT_NoteBook, Qt::LeftDockWidgetArea );
   mappa.insert( SalomeApp_Application::WT_PyConsole, Qt::BottomDockWidgetArea );
   if ( myCreationInfoWdg )
     mappa.insert( myCreationInfoWdg->getWinID(), Qt::LeftDockWidgetArea );
index ca768f5691cbad1901e774bd4f7ec96d2542c784..c301962e0fde801ec87d1fc53e5ca3a1708bd016 100644 (file)
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
+## \defgroup simplesketcher sketcher - Simplified sketcher API
+#  \{
+#  \details
+#  This module provides simplified access to the 2D sketcher functionality of Geometry module.
+#  
+#  \note This module is deprecated, refer to \ref gsketcher for more details
+#  \}
+
 """
 This module provides the user with a simple python API to realize
 various sketches from the GEOM text user interface.
@@ -60,6 +69,8 @@ except:
     geompyEnable = False
     pass
 
+##
+#  \ingroup simplesketcher
 class Sketcher:
 
     __sketch = None
index 74d835d0aaed5d84e18f4b79c9b9317188578f86..c1956a6b5234c123d18d4fa6175314162705226b 100644 (file)
@@ -729,6 +729,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             self.myStudyId = self.myStudy._get_StudyId()
             self.myBuilder = self.myStudy.NewBuilder()
             self.father = self.myStudy.FindComponent("GEOM")
+            notebook.myStudy = theStudy
             if self.father is None:
                 self.father = self.myBuilder.NewComponent("GEOM")
                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
@@ -12694,12 +12695,17 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         #  @param theNbMax maximum number of Bezier pieces in the resulting
         #         surface.
         #  @param theDegMax maximum degree of the resulting BSpline surface.
-        #  @param theDMax specifies maximum value of the
-        #         GeomPlate_PlateG0Criterion criterion.
+        #  @param theDMax 3D tolerance of initial approximation.
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
         #         publication is switched on, default value is used for result name.
         #  @return New GEOM_Object, containing the created shape.
+        #  @note 3D tolerance of initial approximation represents a tolerance of
+        #        initial plate surface approximation. If this parameter is equal
+        #        to 0 (default value) it is computed. In this case an error of
+        #        initial plate surface computation is used as the approximation
+        #        tolerance. This error represents a maximal distance between
+        #        computed plate surface and given points.
         #
         #  @ref tui_creation_smoothingsurface "Example"
         def MakeSmoothingSurface(self, thelPoints, theNbMax=2, theDegMax=8,
@@ -12713,14 +12719,21 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 theNbMax maximum number of Bezier pieces in the resulting
                          surface.
                 theDegMax maximum degree of the resulting BSpline surface.
-                theDMax specifies maximum value of the
-                        GeomPlate_PlateG0Criterion criterion.
+                theDMax 3D tolerance of initial approximation.
                 theName Object name; when specified, this parameter is used
                         for result publication in the study. Otherwise, if automatic
                         publication is switched on, default value is used for result name.
 
             Returns:
                 New GEOM_Object, containing the created shape.
+
+            Note:
+                3D tolerance of initial approximation represents a tolerance of
+                initial plate surface approximation. If this parameter is equal
+                to 0 (default value) it is computed. In this case an error of
+                initial plate surface computation is used as the approximation
+                tolerance. This error represents a maximal distance between
+                computed plate surface and given points.
             """
             anObj = self.AdvOp.MakeSmoothingSurface(thelPoints, theNbMax,
                                                     theDegMax, theDMax)
index e738c19933d3a861598fef43ac290f060f70bb33..783bfffca5303e43055b84498232295c01838eb9 100644 (file)
@@ -21,7 +21,7 @@
 #  Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
 #  Module : GEOM_SWIG
 
-## @defgroup sketcher sketcher - Wrapper to help the creation of simple sketches
+## @defgroup sketcher gsketcher - Wrapper to help the creation of simple sketches
 #  @{ 
 #  @details
 #  This module provides the user with a simple python API 
index 70e1b83086ede44c7a7e0c4a8336dc8d0a263f66..fa50a5357c56a610d382f9c828b82ce11847c2b7 100644 (file)
@@ -78,7 +78,8 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg (Mode mode, GeometryGUI* theGeometryGUI, QW
     myMode(mode),
     myBusy(false),
     myIsShapeType(false),
-    myIsHiddenMain(false)
+    myIsHiddenMain(false),
+    myWasHiddenMain(true)
 {
   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
 
@@ -192,7 +193,10 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg (Mode mode, GeometryGUI* theGeometryGUI, QW
 GroupGUI_GroupDlg::~GroupGUI_GroupDlg()
 {
   GEOM_Displayer* aDisplayer = getDisplayer();
-  if (myIsHiddenMain) {
+  if (myWasHiddenMain) {
+    aDisplayer->Erase(myMainObj);
+    myIsHiddenMain = true;
+  } else {
     aDisplayer->Display(myMainObj);
     myIsHiddenMain = false;
   }
@@ -238,8 +242,16 @@ void GroupGUI_GroupDlg::Init()
 
         GEOM::GEOM_IGroupOperations_var anOper = GEOM::GEOM_IGroupOperations::_narrow(getOperation());
         myMainObj = anOper->GetMainShape(myGroup);
-        if (!CORBA::is_nil(myMainObj))
+        if (!CORBA::is_nil(myMainObj)) {
           myMainName->setText(GEOMBase::GetName(myMainObj));
+          SALOME_View* view = GEOM_Displayer::GetActiveView();
+          if (view) {
+            CORBA::String_var aMainEntry = myMainObj->GetStudyEntry();
+            Handle(SALOME_InteractiveObject) io =
+              new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO");
+            if (view->isVisible(io)) myWasHiddenMain = false;
+          }
+        }
 
         setShapeType((TopAbs_ShapeEnum)anOper->GetType(myGroup));
 
@@ -309,6 +321,7 @@ void GroupGUI_GroupDlg::ClickOnOk()
   if (ClickOnApply())
     ClickOnCancel();
   setIsApplyAndClose(false);
+  getDisplayer()->UnsetDisplayMode();
 }
 
 //=================================================================================
@@ -520,6 +533,15 @@ void GroupGUI_GroupDlg::SelectionIntoArgument()
           myIsHiddenMain = false;
         }
         myMainObj = anObj;
+        if (!CORBA::is_nil(myMainObj)) {
+          SALOME_View* view = GEOM_Displayer::GetActiveView();
+          if (view) {
+            CORBA::String_var aMainEntry = myMainObj->GetStudyEntry();
+            Handle(SALOME_InteractiveObject) io =
+              new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO");
+            if (view->isVisible(io)) myWasHiddenMain = false;
+          }
+        }
         myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
         // activate sub-shapes selection by default
         myEditCurrentArgument = 0;
index 8b1391f3e0b60d17cc85441dd8f660e1217b0d19..fe43e22213ebbee9a33bb497ed58da0216ec7d16 100644 (file)
@@ -97,6 +97,7 @@ private:
   bool                                myBusy;
   bool                                myIsShapeType;
   bool                                myIsHiddenMain;
+  bool                                myWasHiddenMain;
   GEOM::GEOM_Object_var               myMainObj;
   GEOM::GEOM_Object_var               myGroup;
   GEOM::GEOM_Object_var               myInPlaceObj;