From: mzn Date: Tue, 25 Sep 2018 12:22:26 +0000 (+0300) Subject: Merge branch HELP_DOCUMENTATION_EDITING into master. X-Git-Tag: V9_2_0a1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=db1f629785c83f9691b1707b3fd11a26625c7a26;p=modules%2Fshaper.git Merge branch HELP_DOCUMENTATION_EDITING into --- diff --git a/GitHooks/pre-commit.in b/GitHooks/pre-commit.in index 9f1f96032..02e3d563d 100644 --- a/GitHooks/pre-commit.in +++ b/GitHooks/pre-commit.in @@ -39,4 +39,4 @@ EOF fi # If there are whitespace errors, print the offending file names and fail. -exec git diff-index --check --cached $against -- +exec git diff-index --check --cached $against -- . ':(exclude)*.rst' diff --git a/doc/gui/CMakeLists.txt b/doc/gui/CMakeLists.txt index f66b3e2c8..abdaa6c81 100644 --- a/doc/gui/CMakeLists.txt +++ b/doc/gui/CMakeLists.txt @@ -22,10 +22,18 @@ SET(input ${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in) SET(output ${CMAKE_CURRENT_BINARY_DIR}/conf.py) +SET(DOC_FILES + Introduction.rst + ) + CONFIGURE_FILE(${input} ${output}) #sphinx-build -b html -c doc -D latex_paper_size=a4 -d doc/doctree /dn23/PPGP/vsv/SALOME730/SOURCES/PPGP_SRC/doc doc/html +INSTALL(FILES ${DOC_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + +INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/images DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + INSTALL(CODE " EXECUTE_PROCESS( COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build_index.py ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/doc/gui/Introduction.rst b/doc/gui/Introduction.rst new file mode 100644 index 000000000..00c3a2c31 --- /dev/null +++ b/doc/gui/Introduction.rst @@ -0,0 +1,603 @@ + +.. _introduction: + + +Introduction to SHAPER +====================== + +SHAPER module of SALOME is destined for: + +- import and export of geometrical models in IGES, BREP, STEP and XAO formats; +- parametric construction of geometrical objects using a wide range of functions; + + - creation of complex 2D sections using :ref:`sketchPlugin` with consequent extrusion or revolution (see :ref:`featuresPlugin`); + - construction of model using primitives defined in :ref:`primitivesPlugin`; + - usage of Boolean operations (see :ref:`featuresPlugin`); + +- viewing geometrical objects in the OCC viewer; +- transformation of geometrical objects using various algorithms. + +It is possible to easily set :ref:`parameter_usage` predefined to be used as arguments when objects are created. + +SHAPER module preferences are described in the :ref:`preferences` section of SALOME Help. + +Almost all SHAPER module functionalities are accessible via Python Interface. + +SHAPER module works with one study containing several documents: + +- partset +- one or several parts. + +Only one document can be active. + +New study contains only partset with 7 default constructions which cannot be deleted: + +- one point **Origin** coinciding with origin of coordinate system; +- three axes **OX**, **OY**, **OZ** coinciding with coordinate axes; +- three planes **YOZ**, **XOZ**, **XOY** coinciding with coordinate planes. + +Only points, axis and planes (see :ref:`constructionPlugin`) and sketches (see :ref:`sketchPlugin`) can be added into Partset to be used in any part later. +:ref:`parameter_usage` can be used both in Partset and any Part. + + +New Part can be created as described in :ref:`partPlugin`. + +Double click or pop-up menu can be used to activate existing document. + + +Application desktop +------------------- + +The main window of the application consists of the following components: + +- :ref:`main_menu`; +- :ref:`doc_windows`; +- :ref:`viewer`; +- :ref:`toolbar`; +- status bar. + +.. image:: images/main_window.png + :align: center + +.. centered:: + Main window of SHAPER module + + +.. _main_menu: + +Main menu +--------- + +Main menu provides access to all commands of the application. + +.. image:: images/main_menu.png + :align: center + +.. centered:: + Main menu + +Main menu includes standard Salome items: + +- File; +- Edit; +- View; +- Tools; +- Window; +- Help; + +and items specific for SHAPER module: + +- Part (see :ref:`partPlugin`); +- Sketch (see :ref:`sketchPlugin`); +- Construction (see :ref:`constructionPlugin`); +- Build (see :ref:`buildPlugin`); +- Primitives (see :ref:`primitivesPlugin`); +- GDML (see :ref:`gdmlPlugin`); +- Features (see :ref:`featuresPlugin`); +- Macros. + + .. _toolbar: + +SHAPER toolbar +-------------- + +Application toolbar contains: + +- standard toolbar; +- modules toolbar; +- SHAPER toolbar. + +.. image:: images/toolbar.png + :align: center + +.. centered:: + Toolbars + +SHAPER toolbar duplicates main menu and provides access to all commands of the application. + +SHAPER toolbar is separated into sections: + +- Part; +- Movement; +- Measurement; +- Sketch; +- Construction; +- Build; +- Primitives; +- GDML; +- Features; +- Boolean; +- Collections; +- Fillet; +- Macros. + +Visibility of SHAPER toolbar sections is managed using *View -> Toolbar* :ref:`main_menu` item or toolbar pop-up menu. + + +.. _doc_windows: + +Dock windows +------------ + +Standard dock windows are: + +- :ref:`object_browser` +- :ref:`inspection_panel` +- :ref:`python console` +- :ref:`property_panel` + +Dock windows can be placed in three dock areas using drag-and -drop: + +- left, +- right, +- bottom. + +By default object browser window is placed at the left dock area, Inspection panel at the right dock area and Python console at the bottom dock area of the main window. + +Property Panel is hidden. + +The Property Panel is shown on operation start at left dock area of the main window by default. + +If Object Browser is shown at the same side then they will be tabbed. + +Each dock window can be closed using **Cross** window button and opened again using a corresponding command from *View - Windows* :ref:`main_menu` or alternatively using pop-up menu. + +.. image:: images/popup_menu.png + :align: center + +.. centered:: + Pop-up menu for visibility of windows and toolbars + + +.. _object_browser: + +Object browser +^^^^^^^^^^^^^^ + +Object browser contains all documents created in the current study. + +Each document includes standard branches where created objects are placed. + +Documents with branches are shown in Tree View. + +.. image:: images/object_browser.png + :align: center + +.. centered:: + Object browser. Partset active + + +Partset includes three branches: + +- Parameters; +- Constructions; +- Features + +Part includes the following branches: + +- Parameters; +- Constructions; +- Results; +- Fields; +- Groups; +- Features. + +New part contains only 3 empty branches: + +- Parameters; +- Constructions; +- Results. + +Features are placed one after another in the active document with default names and their results are placed into the corresponding branch. + +Example of default names assigned automatically for :ref:`box_feature` are: + +* **Box_1**, **Box_2**, ... to Feature; +* **Box_1_1**, **Box_2_1**, ... to Result. + +Not default branch is added into Tree View when the first feature of this type is created. + +Note, that result used in feature as argument is removed. + +This child result can be restored using **Recover** feature. + +Each feature, result, construction, group, field, parameter can be renamed using *Rename* pop-up menu command. + +.. image:: images/popup_menu_object_browser_feature.png + :align: center + +.. centered:: + Feature pop-up menu + +.. image:: images/popup_menu_object_browser_result.png + :align: center + +.. centered:: + Result pop-up menu + +.. image:: images/popup_menu_object_browser_construction.png + :align: center + +.. centered:: + Construction pop-up menu + +Order of features can be changed using *Move to the end* pop-up menu command. Selected feature will be moved to the end of feature list. + +Folders can be used to arrange long Tree View for features. + +.. image:: images/object_browser_folder.png + :align: center + +.. centered:: + Object browser with folder Dome. Part_1 active + +*Insert a folder before* pop-up menu command creates a new empty folder before the selected feature. Folder can be renamed. + +Features placed after/before the created folder can be moved into the folder using *Move into the previous folder* / *Move into the next folder* pop-up menu command. + +This allows to decrease length of feature list. + +Features can be removed from folder back using *Move out before the folder* / *Move out after the folder* pop-up menu command. + +*Clean history* pop-up menu command looks for features that do not participate in other features. + +**Clean history** dialog box shows list of unused features. After confirmation by click **Yes** button unused features are removed. + +.. image:: images/clean_history.png + :align: center + +.. centered:: + **Clean history** dialog box + + +*Select result* and *Select parent feature* pop-up menu commands help to navigate along Tree View. + + +Feature together with its result can be deleted using *Delete* pop-up menu command. + +Note that all features using removed feature and their results will be removed simultaneously. + +**Delete feature** dialog box shows list of features to be removed. After confirmation by click **Yes** button all these features are removed. + + +.. image:: images/delete_feature.png + :align: center + +.. centered:: + **Delete feature** dialog box + +.. _property_panel: + +Property panel +^^^^^^^^^^^^^^ + +Property panel consists of two parts: + +- controls container for input of parameters for the current operation; +- buttons panel containing standard buttons: + + .. image:: images/button_ok.png + :align: left + **Ok/Apply** executes operation with defined parameters, + + + .. image:: images/button_cancel.png + :align: left + **Cancel/Close** calls **Abort operation** dialog box to confirm operation abort, + + .. image:: images/button_help.png + :align: left + **Help** calls User's guide opened on page describing the current operation. + +.. image:: images/abort_operation.png + :align: center + +.. centered:: + **Abort operation** dialog box + + +.. image:: images/button_ok.png + :align: left +**OK/Apply** button is disabled if not all input parameters are defined or some errors are found. Error is shown as tooltip and in status bar. + +.. _inspection_panel: + +Inspection panel +^^^^^^^^^^^^^^^^ + +Inspection panel provides the list of types and quantities of all topological entities, composing the selected result, construction or feature. + +.. image:: images/inspection_panel.png + :align: center + +.. centered:: + Inspection panel for default Box + +**Object** displays name of the selected result, construction or feature. + +**Type** characterizes the whole shape. + +The information about Point, Axis or Edge additionally shows coordinates of point / end points. + +.. image:: images/inspection_panel_line.png + :align: center + +.. centered:: + Inspection panel for Axis + + +The information about Plane, Face additionally shows coordinates of center point and direction of normal. + +.. image:: images/inspection_panel_face.png + :align: center + +.. centered:: + Inspection panel for Face + +.. _python console: + +Python console +^^^^^^^^^^^^^^ + +Python console interpreters Python commands entered manually. + +In particular, it is possible to load python script: + +*execfile(r"/dn48/newgeom/data/example.py")* + +Pop-up menu allows: + +- Copy selected text to clipboard; +- Paste text from clipboard to Python console ; +- Clear Python console; +- Dump commands from console into the specified file; +- Start/Stop writing log into the specified file. + + +.. image:: images/python_console_popup.png + :align: center + +.. centered:: + Pop-up menu of Python console + +.. _viewer: + +Viewer +------ + +The application supports one OCC 3D viewer and is able to show only one 3D space. + +This 3D space can be represented in several view windows. New view window can be created using **Clone view** button in viewer toolbar. + +Each of view windows represents its own point of view on the 3D scene. + +This point of view can be modified by user with help of viewer commands like **Panning**, **Zooming**, **Scaling** and so on. + + +.. image:: images/2_viewers.png + :align: center + +.. centered:: + Two view windows + +Description of OCC 3D Viewer architecture and functionality is provided in GUI module user's guide in chapter **OCC 3D Viewer**. + + +.. _parameter_usage: + +Parameters +---------- + +Model parametrization can be done using parameters. + +Parameter can be created in the active partset or part by: + +- :ref:`parameter`; +- :ref:`parameters`; +- :ref:`parameter_expression`. + +Any argument in features can be defined as parameter or expression containing parameters. + +List of features using parameters is given in **Parameters** dialog box: + + .. image:: images/parameters_feature.png + :align: center + +.. centered:: + Parameters dialog box + +If parameter value is changed, then all features where it is used are rebuilt. + +Parameter name should be unique in the active document. + +However, partset and part can have parameters with the same name. If parameter name in Partset and Part are identical, then Part parameter has higher priority and its value will be used in the features of this part. + +In contrast to features (see :ref:`object_browser`), there is an additional option when Delete parameters. + +.. image:: images/delete_parameter.png + :align: center + +.. centered:: + Delete parameter + +After click **Replace** button. selected parameter is removed but parent parameters and features are not removed. Deleted parameter is replaced by its value. + +.. _parameter_expression: + +Create parameter on fly +^^^^^^^^^^^^^^^^^^^^^^^ + +Parameter can be created during feature creation simply writing *variable=expression* in any editbox. + +After validation of feature a new parameter with given name **variable** and value equal to evaluated expression appears in object browser under **Parameters** in the active partset or part. + +.. _preferences: + +SHAPER preferences +------------------ + +Description of General application preferences and **Preferences** dialog box is provided in GUI module user's guide in chapter **Setting Preferences**. + +SHAPER preferences define visualization of objects, visualization during selection, edition. New preferences can be used right after modification or later after activation of SHAPER module. + +To call **Preferences** dialog box: + +#. select in the Main Menu *File - > Preferences* item or +#. use **Ctrl+P** shortcut. + +SHAPER preferences include 4 tabs: + +- :ref:`visualization_preferences`; +- :ref:`plugins_preferences`; +- :ref:`sketch_preferences`; +- :ref:`viewer_preferences`. + +Visualization tab is activated by default when **Preferences** dialog box is opened in active SHAPER module. + +Other tabs are activated by click on tab header. + +.. _visualization_preferences: + +Visualization tab +^^^^^^^^^^^^^^^^^ + +This tab defines presentation of objects displayed in OCC 3D viewer. + +.. image:: images/visualization_preferences.png + :align: center + +.. centered:: + Preferences - Visualization tab + +**Input fields**: + +- **Result color** selects default shading color for objects from **Results** branch; +- **Group color** selects default color for objects from **Groups** branch; +- **Construction color** selects default color for objects from **Constructions** branch; +- **Part color** selects default color for parts shown in Partset; +- **Field color** selects default color for objects from **Fields** branch; +- **Body deflection coefficient** defines default deflection coefficient for objects from **Results** branch. A smaller coefficient provides better quality of a shape in the viewer; +- **Construction deflection coefficient** defines default deflection coefficient for objects from **Constructions** branch. A smaller coefficient provides better quality of a shape in the viewer; +- **Reference shape wireframe color in operation** selects default color used for wireframe visualization of objects used in active operation; +- **Result shape wireframe color in operation** selects default color used for wireframe visualization of result in active operation. Click **See preview** button to show result; +- **Multi selector item color in operation** selects default color used for visualization of objects selected in property panel to distinguish them among all objects used in active operation; +- **Color of removed feature in operation** selects default color used for visualization of sketch entities to be removed during **Trim/Split** operations; +- **Color of sketch plane** selects default shading color for sketch plane; +- **Hidden faces transparency** defines default transparency value for hidden faces; +- **Dimension arrow size** defines default size of arrows for extension line showing dimensional constraint; +- **Dimension font** defines font used for value of dimensional constraint; +- **Dimension value size** defines default size of value for dimensional constraint; +- **Sketch dimension color** defines default color of dimensional constraint; +- **Construction plane color** selects default color for Construction planes; +- **Sketch entity color** selects default color for sketch objects; +- **Sketch external entity color** selects default color for external objects selected as reference during sketch creation/edition; +- **Sketch auxiliary entity color** selects default color for sketch auxiliary objects; +- **Sketch overconsrtaint color** selects default color for sketch with redundant constraints; +- **Sketch fully constraint color** selects default color for sketch with zero degrees of freedom. + +To redefine any color click on the corresponding line to access **Select color** dialog box + +.. image:: images/select_color.png + :align: center + +.. centered:: + **Select color** dialog box + +Preferences for sketch are applicable during sketch creation/edition operation. + +.. _plugins_preferences: + +Plugins tab +^^^^^^^^^^^ +Plugins tab defines folders where plugins and resources are located. + +.. image:: images/plugins_preferences.png + :align: center + +.. centered:: + Preferences - Plugins tab + +**Input fields**: + +- **Default path** selects default folder where plugins are located. Click on **Open** button opens standard **Find directory** dialog box to navigate to desired folder; + +- **Import initial directory** selects default folder where resources are located. Click on **Open** button opens standard **Find directory** dialog box to navigate to desired folder. + +.. image:: images/open_button.png + :align: center + +.. centered:: + **Open** button + +.. image:: images/find_directory.png + :align: center + +.. centered:: + **Find directory** dialog box + + +.. _sketch_preferences: + +Sketch tab +^^^^^^^^^^ + +Sketch tab defines properties of coordinate planes shown for selection of sketch plane when no convenient objects are shown in OCC 3D viewer. + +.. image:: images/sketch_preferences.png + :align: center + +.. centered:: + Preferences - Sketch tab + +**Input fields**: + +- **Size** defines size of coordinate planes; +- **Thickness** defines thickness of coordinate plane borders; +- **Rotate to plane when selected** check-box turns on/off automatic switch the viewer to the top view for the selected sketch plane. + + +.. _viewer_preferences: + +Viewer tab +^^^^^^^^^^ + +Viewer tab defines selection in OCC 3D viewer properties. + +.. image:: images/viewer_preferences.png + :align: center + +.. centered:: + Preferences - Viewer tab + +**Input fields**: + +- **Default Selection** defines objects to be selected by mouse click in OCC 3D viewer: + + - **Faces** check-box turns on/off selection of faces; + - **Edges** check-box turns on/off selection of edges; + - **Vertices** check-box turns on/off selection of vertices; + +- **Selection sensitivity** defines size of area around object in pixels, in which mouse click selects object inside this area: + + - **Vertex** defines selection sensitivity for vertices; + - **Edge** defines selection sensitivity for edges. diff --git a/doc/gui/build_index.py b/doc/gui/build_index.py old mode 100644 new mode 100755 index 343634f6a..155db3582 --- a/doc/gui/build_index.py +++ b/doc/gui/build_index.py @@ -34,6 +34,16 @@ aSrcPath = aSourcesDir + os.sep + "../../src" aConfigPath = aSrcPath + os.sep + "Config/plugins.xml.in" +def findDir(theConfFile): + """Find a name of a directory where the given config file exists""" + aSrcList = os.listdir(aSrcPath) + for aDir in aSrcList: + aPath = aSrcPath + os.sep + aDir + aConfPath = aPath + os.sep + theConfFile + if os.path.isdir(aPath) and (os.path.exists(aConfPath) or os.path.exists(aConfPath + ".in")): + return aDir + return None + ## Find accessible plugins from plugins.xml configuration file aPluginList = [] aDomObj = parse(aConfigPath) @@ -42,16 +52,19 @@ for plugin in aPluginsList: aLibName = plugin.getAttribute("library") if not aLibName: aLibName = plugin.getAttribute("script") + aConfigFile = plugin.getAttribute("configuration") - if aLibName: - aPluginDocDir = aSrcPath + os.sep + aLibName + os.sep + "doc" - aDocDist = aBuildDir + os.sep + aLibName - if os.path.exists(aPluginDocDir): - ## Copy all files to a building directory - if os.path.exists(aDocDist): - shutil.rmtree(aDocDist) - shutil.copytree(aPluginDocDir, aDocDist) - aPluginList.append(aLibName) + if aLibName and aConfigFile: + aLibDir = findDir(aConfigFile) + if not aLibDir is None: + aPluginDocDir = aSrcPath + os.sep + aLibDir + os.sep + "doc" + if os.path.exists(aPluginDocDir): + ## Copy all files to a building directory + aDocDist = aBuildDir + os.sep + aLibName + if os.path.exists(aDocDist): + shutil.rmtree(aDocDist) + shutil.copytree(aPluginDocDir, aDocDist) + aPluginList.append(aLibName) ## Modify index.rst file accordingly aIndexFile = open(aSourcesDir + os.sep + "index.rst.in", 'r') @@ -65,4 +78,4 @@ for aLibName in aPluginList: aNewIndex = open(aBuildDir + os.sep + "index.rst", 'w') aNewIndex.writelines(aIndexLines) -aNewIndex.close() \ No newline at end of file +aNewIndex.close() diff --git a/doc/gui/images/2_viewers.png b/doc/gui/images/2_viewers.png new file mode 100755 index 000000000..62ba6a650 Binary files /dev/null and b/doc/gui/images/2_viewers.png differ diff --git a/doc/gui/images/abort_operation.png b/doc/gui/images/abort_operation.png new file mode 100755 index 000000000..ad64065e7 Binary files /dev/null and b/doc/gui/images/abort_operation.png differ diff --git a/doc/gui/images/button_cancel.png b/doc/gui/images/button_cancel.png new file mode 100644 index 000000000..9af30a263 Binary files /dev/null and b/doc/gui/images/button_cancel.png differ diff --git a/doc/gui/images/button_help.png b/doc/gui/images/button_help.png new file mode 100644 index 000000000..1de706166 Binary files /dev/null and b/doc/gui/images/button_help.png differ diff --git a/doc/gui/images/button_ok.png b/doc/gui/images/button_ok.png new file mode 100644 index 000000000..029713818 Binary files /dev/null and b/doc/gui/images/button_ok.png differ diff --git a/doc/gui/images/clean_history.png b/doc/gui/images/clean_history.png new file mode 100755 index 000000000..3d47be5b8 Binary files /dev/null and b/doc/gui/images/clean_history.png differ diff --git a/doc/gui/images/delete_feature.png b/doc/gui/images/delete_feature.png new file mode 100755 index 000000000..51a6ae2fb Binary files /dev/null and b/doc/gui/images/delete_feature.png differ diff --git a/doc/gui/images/delete_parameter.png b/doc/gui/images/delete_parameter.png new file mode 100755 index 000000000..b0b8aea28 Binary files /dev/null and b/doc/gui/images/delete_parameter.png differ diff --git a/doc/gui/images/find_directory.png b/doc/gui/images/find_directory.png new file mode 100644 index 000000000..c35de8fa3 Binary files /dev/null and b/doc/gui/images/find_directory.png differ diff --git a/doc/gui/images/inspection_panel.png b/doc/gui/images/inspection_panel.png new file mode 100755 index 000000000..cdbbfc8a8 Binary files /dev/null and b/doc/gui/images/inspection_panel.png differ diff --git a/doc/gui/images/inspection_panel_face.png b/doc/gui/images/inspection_panel_face.png new file mode 100755 index 000000000..b70ce14d0 Binary files /dev/null and b/doc/gui/images/inspection_panel_face.png differ diff --git a/doc/gui/images/inspection_panel_line.png b/doc/gui/images/inspection_panel_line.png new file mode 100755 index 000000000..2caef3dd4 Binary files /dev/null and b/doc/gui/images/inspection_panel_line.png differ diff --git a/doc/gui/images/main_menu.png b/doc/gui/images/main_menu.png new file mode 100755 index 000000000..9898ca7ee Binary files /dev/null and b/doc/gui/images/main_menu.png differ diff --git a/doc/gui/images/main_window.png b/doc/gui/images/main_window.png new file mode 100755 index 000000000..c10cdd08d Binary files /dev/null and b/doc/gui/images/main_window.png differ diff --git a/doc/gui/images/object_browser.png b/doc/gui/images/object_browser.png new file mode 100755 index 000000000..488baf9ab Binary files /dev/null and b/doc/gui/images/object_browser.png differ diff --git a/doc/gui/images/object_browser_folder.png b/doc/gui/images/object_browser_folder.png new file mode 100755 index 000000000..7db1aaf47 Binary files /dev/null and b/doc/gui/images/object_browser_folder.png differ diff --git a/doc/gui/images/open_button.png b/doc/gui/images/open_button.png new file mode 100644 index 000000000..21180a2fe Binary files /dev/null and b/doc/gui/images/open_button.png differ diff --git a/doc/gui/images/parameter.png b/doc/gui/images/parameter.png new file mode 100755 index 000000000..96d593948 Binary files /dev/null and b/doc/gui/images/parameter.png differ diff --git a/doc/gui/images/parameters_feature.png b/doc/gui/images/parameters_feature.png new file mode 100755 index 000000000..92a0afb31 Binary files /dev/null and b/doc/gui/images/parameters_feature.png differ diff --git a/doc/gui/images/plugins_preferences.png b/doc/gui/images/plugins_preferences.png new file mode 100755 index 000000000..f82715e7a Binary files /dev/null and b/doc/gui/images/plugins_preferences.png differ diff --git a/doc/gui/images/popup_menu.png b/doc/gui/images/popup_menu.png new file mode 100755 index 000000000..e4e220e46 Binary files /dev/null and b/doc/gui/images/popup_menu.png differ diff --git a/doc/gui/images/popup_menu_object_browser_construction.png b/doc/gui/images/popup_menu_object_browser_construction.png new file mode 100755 index 000000000..ae79255c5 Binary files /dev/null and b/doc/gui/images/popup_menu_object_browser_construction.png differ diff --git a/doc/gui/images/popup_menu_object_browser_feature.png b/doc/gui/images/popup_menu_object_browser_feature.png new file mode 100755 index 000000000..30e40564d Binary files /dev/null and b/doc/gui/images/popup_menu_object_browser_feature.png differ diff --git a/doc/gui/images/popup_menu_object_browser_result.png b/doc/gui/images/popup_menu_object_browser_result.png new file mode 100755 index 000000000..180ca3896 Binary files /dev/null and b/doc/gui/images/popup_menu_object_browser_result.png differ diff --git a/doc/gui/images/python_console_popup.png b/doc/gui/images/python_console_popup.png new file mode 100755 index 000000000..b986b9f20 Binary files /dev/null and b/doc/gui/images/python_console_popup.png differ diff --git a/doc/gui/images/select_color.png b/doc/gui/images/select_color.png new file mode 100755 index 000000000..49e9a2c45 Binary files /dev/null and b/doc/gui/images/select_color.png differ diff --git a/doc/gui/images/sketch_preferences.png b/doc/gui/images/sketch_preferences.png new file mode 100755 index 000000000..ae6ceb0ff Binary files /dev/null and b/doc/gui/images/sketch_preferences.png differ diff --git a/doc/gui/images/toolbar.png b/doc/gui/images/toolbar.png new file mode 100755 index 000000000..12d6af8eb Binary files /dev/null and b/doc/gui/images/toolbar.png differ diff --git a/doc/gui/images/viewer_preferences.png b/doc/gui/images/viewer_preferences.png new file mode 100755 index 000000000..3a368852b Binary files /dev/null and b/doc/gui/images/viewer_preferences.png differ diff --git a/doc/gui/images/visualization_preferences.png b/doc/gui/images/visualization_preferences.png new file mode 100755 index 000000000..25cb63c64 Binary files /dev/null and b/doc/gui/images/visualization_preferences.png differ diff --git a/doc/gui/index.rst.in b/doc/gui/index.rst.in index fea7b2d6f..ba442707e 100644 --- a/doc/gui/index.rst.in +++ b/doc/gui/index.rst.in @@ -6,6 +6,8 @@ Welcome to SHAPER's documentation! ================================== +- :ref:`introduction` + .. toctree:: :titlesonly: :maxdepth: 1 diff --git a/src/BuildPlugin/doc/TUI_compoundFeature.rst b/src/BuildPlugin/doc/TUI_compoundFeature.rst new file mode 100644 index 000000000..22d29f8e8 --- /dev/null +++ b/src/BuildPlugin/doc/TUI_compoundFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_compound: + +Create Compound +=============== + +.. literalinclude:: examples/compound.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/BuildPlugin/doc/TUI_compsolidFeature.rst b/src/BuildPlugin/doc/TUI_compsolidFeature.rst new file mode 100644 index 000000000..ce9307bb8 --- /dev/null +++ b/src/BuildPlugin/doc/TUI_compsolidFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_compsolid: + +Create CompSolid +================ + +.. literalinclude:: examples/compsolid.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/BuildPlugin/doc/TUI_edgeFeature.rst b/src/BuildPlugin/doc/TUI_edgeFeature.rst new file mode 100644 index 000000000..11671f2c4 --- /dev/null +++ b/src/BuildPlugin/doc/TUI_edgeFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_edge: + +Create Edge +=========== + +.. literalinclude:: examples/edge.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/BuildPlugin/doc/TUI_faceFeatures.rst b/src/BuildPlugin/doc/TUI_faceFeatures.rst new file mode 100644 index 000000000..010139a58 --- /dev/null +++ b/src/BuildPlugin/doc/TUI_faceFeatures.rst @@ -0,0 +1,12 @@ + + .. _tui_create_face: + +Create Face +=========== + +.. literalinclude:: examples/face.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/BuildPlugin/doc/TUI_fillingFeature.rst b/src/BuildPlugin/doc/TUI_fillingFeature.rst new file mode 100644 index 000000000..751bafb94 --- /dev/null +++ b/src/BuildPlugin/doc/TUI_fillingFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_filling: + +Create Filling +============== + +.. literalinclude:: examples/filling.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/BuildPlugin/doc/TUI_interpolationFeature.rst b/src/BuildPlugin/doc/TUI_interpolationFeature.rst new file mode 100644 index 000000000..cfcaf78bd --- /dev/null +++ b/src/BuildPlugin/doc/TUI_interpolationFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_interpolation: + +Create Interpolation +==================== + +.. literalinclude:: examples/interpolation.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/BuildPlugin/doc/TUI_polylineFeature.rst b/src/BuildPlugin/doc/TUI_polylineFeature.rst new file mode 100644 index 000000000..1099c4f5c --- /dev/null +++ b/src/BuildPlugin/doc/TUI_polylineFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_polyline: + +Create Polyline +=============== + +.. literalinclude:: examples/polyline.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/BuildPlugin/doc/TUI_shellFeature.rst b/src/BuildPlugin/doc/TUI_shellFeature.rst new file mode 100644 index 000000000..6ee08c997 --- /dev/null +++ b/src/BuildPlugin/doc/TUI_shellFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_shell: + +Create Shell +============ + +.. literalinclude:: examples/shell.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/BuildPlugin/doc/TUI_solidFeature.rst b/src/BuildPlugin/doc/TUI_solidFeature.rst new file mode 100644 index 000000000..e82ba11ca --- /dev/null +++ b/src/BuildPlugin/doc/TUI_solidFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_solid: + +Create Solid +============ + +.. literalinclude:: examples/solid.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/BuildPlugin/doc/TUI_subshapeFeature.rst b/src/BuildPlugin/doc/TUI_subshapeFeature.rst new file mode 100644 index 000000000..10d0f8f80 --- /dev/null +++ b/src/BuildPlugin/doc/TUI_subshapeFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_subshape: + +Create Sub-shapes +================= + +.. literalinclude:: examples/subshapes.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/BuildPlugin/doc/TUI_vertexFeature.rst b/src/BuildPlugin/doc/TUI_vertexFeature.rst new file mode 100644 index 000000000..d1224145e --- /dev/null +++ b/src/BuildPlugin/doc/TUI_vertexFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_vertex: + +Create Vertex +============= + +.. literalinclude:: examples/vertex.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/BuildPlugin/doc/TUI_wireFeature.rst b/src/BuildPlugin/doc/TUI_wireFeature.rst new file mode 100644 index 000000000..d22d216a1 --- /dev/null +++ b/src/BuildPlugin/doc/TUI_wireFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_wire: + +Create Wire +=========== + +.. literalinclude:: examples/wire.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/BuildPlugin/doc/compoundFeature.rst b/src/BuildPlugin/doc/compoundFeature.rst index 13f8fd8cb..c3fc9761c 100644 --- a/src/BuildPlugin/doc/compoundFeature.rst +++ b/src/BuildPlugin/doc/compoundFeature.rst @@ -2,9 +2,46 @@ Compound ======== +The Compound feature creates a compound using already existing shapes in other objects. + +To create compound in the active part: + +#. select in the Main Menu *Build - > Compound* item or +#. click **Compound** button in the toolbar + +.. image:: images/feature_compound.png + :align: center + +.. centered:: + **Compound** button + +The following property panel will be opened: .. image:: images/Compound.png :align: center .. centered:: Create a compound + +Select one or several shapes in a viewer. Selected shapes can be of any type (vertex, edge, face and so on). + +**Apply** button creates compound. + +**Cancel** button cancels operation. + +**TUI Command**: *model.addCompound(Part_doc, Shapes)* + +**Arguments**: Part document + list of shapes. + +Result +"""""" + +The result of the operation will be a compound created from selected shapes: + +.. image:: images/CreateCompound.png + :align: center + +.. centered:: + Result of the operation. + +**See Also** a sample TUI Script of a :ref:`tui_create_compound` operation. diff --git a/src/BuildPlugin/doc/compsolidFeature.rst b/src/BuildPlugin/doc/compsolidFeature.rst index 59428f615..4ec24428a 100644 --- a/src/BuildPlugin/doc/compsolidFeature.rst +++ b/src/BuildPlugin/doc/compsolidFeature.rst @@ -2,9 +2,46 @@ CompSolid ========= +The Compsolid feature creates a compsolid using already existing shapes in other objects. + +To create compsolid in the active part: + +#. select in the Main Menu *Build - > CompSolid* item or +#. click **CompSolid** button in the toolbar + +.. image:: images/feature_compsolid.png + :align: center + +.. centered:: + **CompSolid** button + +The following property panel will be opened: .. image:: images/Compsolid.png :align: center .. centered:: Create a compsolid + +Select one or several shapes in a viewer. + +**Apply** button creates compsolid. + +**Cancel** button cancels operation. + +**TUI Command**: *model.addCompSolid(Part_doc, Shapes)* + +**Arguments**: Part document + list of shapes. + +Result +"""""" + +The result of the operation will be a compsolid created from the selected shapes: + +.. image:: images/CreateCompsolid.png + :align: center + +.. centered:: + Result of the operation. + +**See Also** a sample TUI Script of a :ref:`tui_create_compsolid` operation. diff --git a/src/BuildPlugin/doc/edgeFeature.rst b/src/BuildPlugin/doc/edgeFeature.rst index 707e74219..2fcdf7620 100644 --- a/src/BuildPlugin/doc/edgeFeature.rst +++ b/src/BuildPlugin/doc/edgeFeature.rst @@ -2,9 +2,46 @@ Edge ==== +The Edge feature creates one or several edges using already existing edges in other objects. + +To create edges in the active part: + +#. select in the Main Menu *Build - > Edge* item or +#. click **Edge** button in the toolbar + +.. image:: images/feature_edge.png + :align: center + +.. centered:: + **Edge** button + +The following property panel will be opened: .. image:: images/Edge.png :align: center .. centered:: - Create an edge + Create edges + +Select one or several edges in viewer. + +**Apply** button creates edges. + +**Cancel** button cancels operation. + +**TUI Command**: *model.addEdge(Part_doc, Shapes)* + +**Arguments**: Part document + list of shapes. + +Result +"""""" + +The result of the operation will be set of edges created from selected shapes: + +.. image:: images/CreateEdge.png + :align: center + +.. centered:: + Result of the operation. + +**See Also** a sample TUI Script of a :ref:`tui_create_edge` operation. diff --git a/src/BuildPlugin/doc/examples/compound.py b/src/BuildPlugin/doc/examples/compound.py new file mode 100644 index 000000000..0394678d5 --- /dev/null +++ b/src/BuildPlugin/doc/examples/compound.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Compound_1_objects = [model.selection("FACE", "Box_1_1/Front"), + model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), + model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Right&Box_1_1/Top"), + model.selection("EDGE", "Box_1_1/Back&Box_1_1/Top")] +Compound_1 = model.addCompound(Part_1_doc, Compound_1_objects) +model.do() +model.end() diff --git a/src/BuildPlugin/doc/examples/compsolid.py b/src/BuildPlugin/doc/examples/compsolid.py new file mode 100644 index 000000000..87234f13a --- /dev/null +++ b/src/BuildPlugin/doc/examples/compsolid.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +CompSolid_1 = model.addCompSolid(Part_1_doc, [model.selection("SOLID", "Box_1_1")]) +model.do() +model.end() diff --git a/src/BuildPlugin/doc/examples/edge.py b/src/BuildPlugin/doc/examples/edge.py new file mode 100644 index 000000000..38f025468 --- /dev/null +++ b/src/BuildPlugin/doc/examples/edge.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Edge_1_objects = [model.selection("EDGE", "Box_1_1/Front&Box_1_1/Top"), + model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), + model.selection("EDGE", "Box_1_1/Front&Box_1_1/Left")] +Edge_1 = model.addEdge(Part_1_doc, Edge_1_objects) +model.do() +model.end() diff --git a/src/BuildPlugin/doc/examples/face.py b/src/BuildPlugin/doc/examples/face.py new file mode 100644 index 000000000..fd5304191 --- /dev/null +++ b/src/BuildPlugin/doc/examples/face.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Box_1_1/Top"), + model.selection("FACE", "Box_1_1/Front")]) +model.do() +model.end() diff --git a/src/BuildPlugin/doc/examples/filling.py b/src/BuildPlugin/doc/examples/filling.py new file mode 100644 index 000000000..d912bd387 --- /dev/null +++ b/src/BuildPlugin/doc/examples/filling.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Edges = [model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), + model.selection("EDGE", "Box_1_1/Front&Box_1_1/Top")] +Filling_1 = model.addFilling(Part_1_doc, Edges) +model.do() +model.end() diff --git a/src/BuildPlugin/doc/examples/interpolation.py b/src/BuildPlugin/doc/examples/interpolation.py new file mode 100644 index 000000000..be911ea94 --- /dev/null +++ b/src/BuildPlugin/doc/examples/interpolation.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Interpolation_1_objects = [model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), + model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Right&Box_1_1/Top"), + model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Top"), + model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Top")] +Interpolation_1 = model.addInterpolation(Part_1_doc, Interpolation_1_objects, True, False) +model.do() +model.end() diff --git a/src/BuildPlugin/doc/examples/polyline.py b/src/BuildPlugin/doc/examples/polyline.py new file mode 100644 index 000000000..9596db811 --- /dev/null +++ b/src/BuildPlugin/doc/examples/polyline.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Point_2 = model.addPoint(Part_1_doc, -10, -5, -7) +Vertex_1 = model.addVertex(Part_1_doc, [model.selection("VERTEX", "Point_1")]) +Polyline_1_objects = [model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Bottom"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Right&Box_1_1/Bottom")] +Polyline_1 = model.addPolyline3D(Part_1_doc, Polyline_1_objects, False) +model.do() +model.end() diff --git a/src/BuildPlugin/doc/examples/shell.py b/src/BuildPlugin/doc/examples/shell.py new file mode 100644 index 000000000..7a978c5d1 --- /dev/null +++ b/src/BuildPlugin/doc/examples/shell.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Shell_1 = model.addShell(Part_1_doc, [model.selection("FACE", "Box_1_1/Top"), + model.selection("FACE", "Box_1_1/Front")]) +model.do() +model.end() diff --git a/src/BuildPlugin/doc/examples/solid.py b/src/BuildPlugin/doc/examples/solid.py new file mode 100644 index 000000000..30b690b3d --- /dev/null +++ b/src/BuildPlugin/doc/examples/solid.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Solid_1_objects = [model.selection("FACE", "Box_1_1/Top"), + model.selection("FACE", "Box_1_1/Front"), + model.selection("FACE", "Box_1_1/Left"), + model.selection("FACE", "Box_1_1/Back"), + model.selection("FACE", "Box_1_1/Right"), + model.selection("FACE", "Box_1_1/Bottom")] +Solid_1 = model.addSolid(Part_1_doc, Solid_1_objects) +model.do() +model.end() diff --git a/src/BuildPlugin/doc/examples/subshapes.py b/src/BuildPlugin/doc/examples/subshapes.py new file mode 100644 index 000000000..4f0519ff7 --- /dev/null +++ b/src/BuildPlugin/doc/examples/subshapes.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_1 = Sketch_1.addLine(-56.65008576329333, 13.33962264150944, 9.528301886792452, 66.69811320754719) +SketchLine_1.result().setColor(225, 0, 0) +SketchLine_2 = Sketch_1.addLine(9.528301886792452, 66.69811320754719, 78.47855917667239, -27.54545454545455) +SketchLine_2.result().setColor(225, 0, 0) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) +SketchLine_3 = Sketch_1.addLine(78.47855917667239, -27.54545454545455, 7.795883361921087, -89.2195540308748) +SketchLine_3.result().setColor(225, 0, 0) +SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) +SketchLine_4 = Sketch_1.addLine(7.795883361921087, -89.2195540308748, 12.64665523156088, -20.9622641509434) +SketchLine_4.result().setColor(225, 0, 0) +SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) +SketchLine_5 = Sketch_1.addLine(12.64665523156088, -20.9622641509434, -56.65008576329333, 13.33962264150944) +SketchLine_5.result().setColor(225, 0, 0) +SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint()) +SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_1.startPoint()) +model.do() +Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r-SketchLine_5r")]) +SubShapes_1 = model.addSubShapes(Part_1_doc, model.selection("FACE", "Face_1_1"), [model.selection("EDGE", "Sketch_1/Edge-SketchLine_5"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_4")]) +model.do() +model.end() diff --git a/src/BuildPlugin/doc/examples/vertex.py b/src/BuildPlugin/doc/examples/vertex.py new file mode 100644 index 000000000..ea2979b7f --- /dev/null +++ b/src/BuildPlugin/doc/examples/vertex.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Vertex_1_objects = [model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), + model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Top"), + model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Top"), + model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Bottom"), + model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom")] +Vertex_1 = model.addVertex(Part_1_doc, Vertex_1_objects) +model.do() +model.end() diff --git a/src/BuildPlugin/doc/examples/wire.py b/src/BuildPlugin/doc/examples/wire.py new file mode 100644 index 000000000..36497d8ff --- /dev/null +++ b/src/BuildPlugin/doc/examples/wire.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Wire_1_objects = [model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), + model.selection("EDGE", "Box_1_1/Front&Box_1_1/Top"), + model.selection("EDGE", "Box_1_1/Right&Box_1_1/Top"), + model.selection("EDGE", "Box_1_1/Back&Box_1_1/Top")] +Wire_1 = model.addWire(Part_1_doc, Wire_1_objects) +model.do() +model.end() diff --git a/src/BuildPlugin/doc/faceFeature.rst b/src/BuildPlugin/doc/faceFeature.rst index 2cfcd473a..ea1332265 100644 --- a/src/BuildPlugin/doc/faceFeature.rst +++ b/src/BuildPlugin/doc/faceFeature.rst @@ -2,9 +2,46 @@ Face ==== +The Face feature creates one or several faces using already existing faces in other objects. +To create face in the active part: + +#. select in the Main Menu *Build - > Face* item or +#. click **Face** button in the toolbar + +.. image:: images/feature_face.png + :align: center + +.. centered:: + **Face** button + +The following property panel will be opened: + .. image:: images/Face.png :align: center .. centered:: Create a face + +Select one or several faces in viewer. + +**Apply** button creates faces. + +**Cancel** button cancels operation. + +**TUI Command**: *model.addFace(Part_doc, Shapes)* + +**Arguments**: Part document + list of shapes. + +Result +"""""" + +The result of the operation will be set of faces created from selected shapes: + +.. image:: images/CreateFace.png + :align: center + +.. centered:: + Result of the operation. + +**See Also** a sample TUI Script of a :ref:`tui_create_face` operation. diff --git a/src/BuildPlugin/doc/fillingFeature.rst b/src/BuildPlugin/doc/fillingFeature.rst index 5e5fc9182..dd68b7709 100644 --- a/src/BuildPlugin/doc/fillingFeature.rst +++ b/src/BuildPlugin/doc/fillingFeature.rst @@ -1,10 +1,49 @@ - Filling - ======= +Filling +======= +The Filling feature creates one or several faces using already existing edges or wires in other objects. + +To create filling in the active part: + +#. select in the Main Menu *Build - > Filling* item or +#. click **Filling** button in the toolbar + +.. image:: images/feature_filling.png + :align: center + +.. centered:: + **Filling** button + +The following property panel will be opened: .. image:: images/Filling.png :align: center .. centered:: Create a filling + +Select two or more edges in a viewer. + +**Advanced options** lets to manage filling process. + +**Apply** button creates a filling. + +**Cancel** button cancels operation. + +**TUI Command**: *model.addFilling(Part_doc, Edges)* + +**Arguments**: Part document + list of edges. + +Result +"""""" + +The result of the operation will be set of faces created from selected shapes: + +.. image:: images/CreateFilling.png + :align: center + +.. centered:: + Result of the operation. + +**See Also** a sample TUI Script of a :ref:`tui_create_filling` operation. diff --git a/src/BuildPlugin/doc/images/Compound.png b/src/BuildPlugin/doc/images/Compound.png index a4987cbfe..39d748b6c 100644 Binary files a/src/BuildPlugin/doc/images/Compound.png and b/src/BuildPlugin/doc/images/Compound.png differ diff --git a/src/BuildPlugin/doc/images/Compsolid.png b/src/BuildPlugin/doc/images/Compsolid.png index 502297722..d29ad2a57 100644 Binary files a/src/BuildPlugin/doc/images/Compsolid.png and b/src/BuildPlugin/doc/images/Compsolid.png differ diff --git a/src/BuildPlugin/doc/images/CreateCompound.png b/src/BuildPlugin/doc/images/CreateCompound.png new file mode 100644 index 000000000..3a5391e8a Binary files /dev/null and b/src/BuildPlugin/doc/images/CreateCompound.png differ diff --git a/src/BuildPlugin/doc/images/CreateCompsolid.png b/src/BuildPlugin/doc/images/CreateCompsolid.png new file mode 100644 index 000000000..4b99c3621 Binary files /dev/null and b/src/BuildPlugin/doc/images/CreateCompsolid.png differ diff --git a/src/BuildPlugin/doc/images/CreateEdge.png b/src/BuildPlugin/doc/images/CreateEdge.png new file mode 100644 index 000000000..884c73f58 Binary files /dev/null and b/src/BuildPlugin/doc/images/CreateEdge.png differ diff --git a/src/BuildPlugin/doc/images/CreateFace.png b/src/BuildPlugin/doc/images/CreateFace.png new file mode 100644 index 000000000..4aaaf44c0 Binary files /dev/null and b/src/BuildPlugin/doc/images/CreateFace.png differ diff --git a/src/BuildPlugin/doc/images/CreateFilling.png b/src/BuildPlugin/doc/images/CreateFilling.png new file mode 100644 index 000000000..534a4c865 Binary files /dev/null and b/src/BuildPlugin/doc/images/CreateFilling.png differ diff --git a/src/BuildPlugin/doc/images/CreateInterpolation.png b/src/BuildPlugin/doc/images/CreateInterpolation.png new file mode 100644 index 000000000..4bb8f4ec1 Binary files /dev/null and b/src/BuildPlugin/doc/images/CreateInterpolation.png differ diff --git a/src/BuildPlugin/doc/images/CreatePolyline.png b/src/BuildPlugin/doc/images/CreatePolyline.png new file mode 100644 index 000000000..77107b0cc Binary files /dev/null and b/src/BuildPlugin/doc/images/CreatePolyline.png differ diff --git a/src/BuildPlugin/doc/images/CreateShell.png b/src/BuildPlugin/doc/images/CreateShell.png new file mode 100644 index 000000000..480861c97 Binary files /dev/null and b/src/BuildPlugin/doc/images/CreateShell.png differ diff --git a/src/BuildPlugin/doc/images/CreateSolid.png b/src/BuildPlugin/doc/images/CreateSolid.png new file mode 100644 index 000000000..33e77abac Binary files /dev/null and b/src/BuildPlugin/doc/images/CreateSolid.png differ diff --git a/src/BuildPlugin/doc/images/CreateSubShapes.png b/src/BuildPlugin/doc/images/CreateSubShapes.png new file mode 100644 index 000000000..88d41818f Binary files /dev/null and b/src/BuildPlugin/doc/images/CreateSubShapes.png differ diff --git a/src/BuildPlugin/doc/images/CreateVertex.png b/src/BuildPlugin/doc/images/CreateVertex.png new file mode 100644 index 000000000..602ea7f0f Binary files /dev/null and b/src/BuildPlugin/doc/images/CreateVertex.png differ diff --git a/src/BuildPlugin/doc/images/CreateWire.png b/src/BuildPlugin/doc/images/CreateWire.png new file mode 100644 index 000000000..5c5978fa9 Binary files /dev/null and b/src/BuildPlugin/doc/images/CreateWire.png differ diff --git a/src/BuildPlugin/doc/images/Edge.png b/src/BuildPlugin/doc/images/Edge.png index b04cc69ec..f9e297d00 100644 Binary files a/src/BuildPlugin/doc/images/Edge.png and b/src/BuildPlugin/doc/images/Edge.png differ diff --git a/src/BuildPlugin/doc/images/Face.png b/src/BuildPlugin/doc/images/Face.png index 5bae9ac17..947440c83 100644 Binary files a/src/BuildPlugin/doc/images/Face.png and b/src/BuildPlugin/doc/images/Face.png differ diff --git a/src/BuildPlugin/doc/images/Filling.png b/src/BuildPlugin/doc/images/Filling.png index 6bb76e55e..3000a08c2 100644 Binary files a/src/BuildPlugin/doc/images/Filling.png and b/src/BuildPlugin/doc/images/Filling.png differ diff --git a/src/BuildPlugin/doc/images/Interpolation.png b/src/BuildPlugin/doc/images/Interpolation.png index 1335ae6e0..14967cf1f 100644 Binary files a/src/BuildPlugin/doc/images/Interpolation.png and b/src/BuildPlugin/doc/images/Interpolation.png differ diff --git a/src/BuildPlugin/doc/images/Polyline.png b/src/BuildPlugin/doc/images/Polyline.png index 3aad8ede2..de6bfd38d 100644 Binary files a/src/BuildPlugin/doc/images/Polyline.png and b/src/BuildPlugin/doc/images/Polyline.png differ diff --git a/src/BuildPlugin/doc/images/Shell.png b/src/BuildPlugin/doc/images/Shell.png index 2f552b7ca..1df5cfafa 100644 Binary files a/src/BuildPlugin/doc/images/Shell.png and b/src/BuildPlugin/doc/images/Shell.png differ diff --git a/src/BuildPlugin/doc/images/Solid.png b/src/BuildPlugin/doc/images/Solid.png index 7af53995e..0e767c210 100644 Binary files a/src/BuildPlugin/doc/images/Solid.png and b/src/BuildPlugin/doc/images/Solid.png differ diff --git a/src/BuildPlugin/doc/images/SubShapes.png b/src/BuildPlugin/doc/images/SubShapes.png index 774ead76a..e96fa3fa7 100644 Binary files a/src/BuildPlugin/doc/images/SubShapes.png and b/src/BuildPlugin/doc/images/SubShapes.png differ diff --git a/src/BuildPlugin/doc/images/Vertex.png b/src/BuildPlugin/doc/images/Vertex.png index 38143d486..a1650d3ec 100644 Binary files a/src/BuildPlugin/doc/images/Vertex.png and b/src/BuildPlugin/doc/images/Vertex.png differ diff --git a/src/BuildPlugin/doc/images/Wire.png b/src/BuildPlugin/doc/images/Wire.png index 4b18932af..13ada63fb 100644 Binary files a/src/BuildPlugin/doc/images/Wire.png and b/src/BuildPlugin/doc/images/Wire.png differ diff --git a/src/BuildPlugin/doc/images/feature_compound.png b/src/BuildPlugin/doc/images/feature_compound.png new file mode 100644 index 000000000..800dc6f52 Binary files /dev/null and b/src/BuildPlugin/doc/images/feature_compound.png differ diff --git a/src/BuildPlugin/doc/images/feature_compsolid.png b/src/BuildPlugin/doc/images/feature_compsolid.png new file mode 100644 index 000000000..6fdf0dbf3 Binary files /dev/null and b/src/BuildPlugin/doc/images/feature_compsolid.png differ diff --git a/src/BuildPlugin/doc/images/feature_edge.png b/src/BuildPlugin/doc/images/feature_edge.png new file mode 100644 index 000000000..577cc253b Binary files /dev/null and b/src/BuildPlugin/doc/images/feature_edge.png differ diff --git a/src/BuildPlugin/doc/images/feature_face.png b/src/BuildPlugin/doc/images/feature_face.png new file mode 100644 index 000000000..08ba00469 Binary files /dev/null and b/src/BuildPlugin/doc/images/feature_face.png differ diff --git a/src/BuildPlugin/doc/images/feature_filling.png b/src/BuildPlugin/doc/images/feature_filling.png new file mode 100644 index 000000000..e8a46f662 Binary files /dev/null and b/src/BuildPlugin/doc/images/feature_filling.png differ diff --git a/src/BuildPlugin/doc/images/feature_interpolation.png b/src/BuildPlugin/doc/images/feature_interpolation.png new file mode 100644 index 000000000..9f1e3adff Binary files /dev/null and b/src/BuildPlugin/doc/images/feature_interpolation.png differ diff --git a/src/BuildPlugin/doc/images/feature_polyline.png b/src/BuildPlugin/doc/images/feature_polyline.png new file mode 100644 index 000000000..8ed9356e7 Binary files /dev/null and b/src/BuildPlugin/doc/images/feature_polyline.png differ diff --git a/src/BuildPlugin/doc/images/feature_shell.png b/src/BuildPlugin/doc/images/feature_shell.png new file mode 100644 index 000000000..55373754c Binary files /dev/null and b/src/BuildPlugin/doc/images/feature_shell.png differ diff --git a/src/BuildPlugin/doc/images/feature_solid.png b/src/BuildPlugin/doc/images/feature_solid.png new file mode 100644 index 000000000..84dca6be1 Binary files /dev/null and b/src/BuildPlugin/doc/images/feature_solid.png differ diff --git a/src/BuildPlugin/doc/images/feature_subshapes.png b/src/BuildPlugin/doc/images/feature_subshapes.png new file mode 100644 index 000000000..d0e088891 Binary files /dev/null and b/src/BuildPlugin/doc/images/feature_subshapes.png differ diff --git a/src/BuildPlugin/doc/images/feature_vertex.png b/src/BuildPlugin/doc/images/feature_vertex.png new file mode 100644 index 000000000..62406daff Binary files /dev/null and b/src/BuildPlugin/doc/images/feature_vertex.png differ diff --git a/src/BuildPlugin/doc/images/feature_wire.png b/src/BuildPlugin/doc/images/feature_wire.png new file mode 100644 index 000000000..28fa02523 Binary files /dev/null and b/src/BuildPlugin/doc/images/feature_wire.png differ diff --git a/src/BuildPlugin/doc/interpolationFeature.rst b/src/BuildPlugin/doc/interpolationFeature.rst index 377bc0ad4..8b61969df 100644 --- a/src/BuildPlugin/doc/interpolationFeature.rst +++ b/src/BuildPlugin/doc/interpolationFeature.rst @@ -2,9 +2,58 @@ Interpolation ============= +The Interpolation feature creates curve (wire) using already existing vertices in other objects. + +To create interpolation in the active part: + +#. select in the Main Menu *Build - > Interpolation* item or +#. click **Interpolation** button in the toolbar + +.. image:: images/feature_interpolation.png + :align: center + +.. centered:: + **Interpolation** button + +The following property panel will be opened: .. image:: images/Interpolation.png :align: center .. centered:: Create an interpolation + +Select one or several vertices or points in a viewer. + +- **Closed** makes the interpolation curve closed. + +- **Reorder** reorders selected points to minimize length of the curve. + +- **Tangents** makes start and end of the curve tangent to selected edges. User has to select edges for start and end in corresponded fields. + +**Apply** button creates an interpolation. + +**Cancel** button cancels operation. + +**TUI Command**: + +- *model.addInterpolation(Part_doc, Points, IsClosed, IsReordered)*. + +**Arguments**: Part document + list of points + is closed + is reordered. + +- *model.addInterpolation(Part_doc, Points, StartEdge, EndEdge, IsClosed, IsReordered)*. + +**Arguments**: Part document + list of points + start edge + end edge + is closed + is reordered. + +Result +"""""" + +The result of the operation will be a curve created from selected shapes: + +.. image:: images/CreateInterpolation.png + :align: center + +.. centered:: + Result of the operation. + +**See Also** a sample TUI Script of a :ref:`tui_create_interpolation` operation. diff --git a/src/BuildPlugin/doc/polylineFeature.rst b/src/BuildPlugin/doc/polylineFeature.rst index 9d4a9e6c9..1e08de4e4 100644 --- a/src/BuildPlugin/doc/polylineFeature.rst +++ b/src/BuildPlugin/doc/polylineFeature.rst @@ -2,9 +2,44 @@ Polyline ======== +The feature **Polyline** creates a wire. + +To create a Polyline in the active part: + +#. select in the Main Menu *Build - > Polyline* item or +#. click **Polyline** button in the toolbar + +.. image:: images/feature_polyline.png + :align: center + +.. centered:: + **Polyline** button + +The following property panel appears. .. image:: images/Polyline.png :align: center .. centered:: - Create a polyline + Polyline property panel + +Input fields: + +- **Points and vertices** panel contains list of points and vertices selected in 3D OCC viewer. Polyline consequently connects points; +- **Closed** check-box turns on/off connection of the start and end points to make polyline closed/opened. + +**TUI Commands**: *model.addPolyline3D(Part_1_doc, Polyline_objects, Key)* + +**Arguments**: 1 part+ list of vertices selected in format *model.selection("VERTEX", "Point")* + boolean key defining presence of connection between the start and end points. + +Result +"""""" +Result of operation is closed or open Polyline. + +.. image:: images/CreatePolyline.png + :align: center + +.. centered:: + Polyline + +**See Also** a sample TUI Script of a :ref:`tui_create_polyline` operation. \ No newline at end of file diff --git a/src/BuildPlugin/doc/shellFeature.rst b/src/BuildPlugin/doc/shellFeature.rst index 8c6266564..b9fd21cd0 100644 --- a/src/BuildPlugin/doc/shellFeature.rst +++ b/src/BuildPlugin/doc/shellFeature.rst @@ -2,9 +2,46 @@ Shell ===== +The Shell feature creates a shell using already existing faces in other objects. + +To create shell in the active part: + +#. select in the Main Menu *Build - > Shell* item or +#. click **Shell** button in the toolbar + +.. image:: images/feature_shell.png + :align: center + +.. centered:: + **Shell** button + +The following property panel will be opened: .. image:: images/Shell.png :align: center .. centered:: Create a shell + +Select one or several faces in viewer. + +**Apply** button creates a shell. + +**Cancel** button cancels operation. + +**TUI Command**: *model.addShell(Part_doc, Objects)* + +**Arguments**: Part document + list of shapes. + +Result +"""""" + +The result of the operation will be shell created from selected shapes: + +.. image:: images/CreateShell.png + :align: center + +.. centered:: + Result of the operation. + +**See Also** a sample TUI Script of a :ref:`tui_create_shell` operation. diff --git a/src/BuildPlugin/doc/solidFeature.rst b/src/BuildPlugin/doc/solidFeature.rst index 4e78a1430..63cf6693a 100644 --- a/src/BuildPlugin/doc/solidFeature.rst +++ b/src/BuildPlugin/doc/solidFeature.rst @@ -2,9 +2,46 @@ Solid ===== +The Solid feature creates a solid using already existing faces in other objects. + +To create solid in the active part: + +#. select in the Main Menu *Build - > Solid* item or +#. click **Solid** button in the toolbar + +.. image:: images/feature_solid.png + :align: center + +.. centered:: + **Solid** button + +The following property panel will be opened: .. image:: images/Solid.png :align: center .. centered:: Create a solid + +Select one or several faces in viewer. Selected faces have to define a closed volume + +**Apply** button creates solid. + +**Cancel** button cancels operation. + +**TUI Command**: *model.addSolid(Part_doc, Shapes)* + +**Arguments**: Part document + list of shapes. + +Result +"""""" + +The result of the operation will be a solid created from selected shapes: + +.. image:: images/CreateSolid.png + :align: center + +.. centered:: + Result of the operation. + +**See Also** a sample TUI Script of a :ref:`tui_create_solid` operation. diff --git a/src/BuildPlugin/doc/subShapesFeature.rst b/src/BuildPlugin/doc/subShapesFeature.rst index 174361718..1c5092d3f 100644 --- a/src/BuildPlugin/doc/subShapesFeature.rst +++ b/src/BuildPlugin/doc/subShapesFeature.rst @@ -2,9 +2,51 @@ Sub-shapes ========== +The feature **Sub-shapes** lets to modify selected entity creating a non-manifold topology. It provides: + +* add/remove vertices laying on edges of a wire; +* add/remove edges and vertices laying on a face. + +To create Sub-shapes in the active part: + +#. select in the Main Menu *Build - > Sub-shapes* item or +#. click **Sub-shapes** button in the toolbar + +.. image:: images/feature_subshapes.png + :align: center + +.. centered:: + **Sub-shapes** button + +The following property panel appears. .. image:: images/SubShapes.png :align: center .. centered:: - Create sub-shapes + Sub-shapes property panel + +Input fields: + +- **Shape** panel contains a shape to be modified. Shape is selected in 3D OCC viewer or object browser. For today it has to be wire or face; +- **Sub-shapes** panel contains list of sub-shapes which are already included into result. A sub-shape can be deleted from the list or the list can be extended with new shapes selected in the view. + +**TUI Command**: *model.addSubShapes(Part_doc, shape, sub-shapes)* + +**Arguments**: 1 part + shape in format *model.selection(TYPE, shape)* + list of sub-shapes in format *model.selection(TYPE, subshape)*. + +Result +"""""" +Result replaces original shape with the same one with added/removed sub-shapes. + +.. image:: images/CreateSubShapes.png + :align: center + +.. centered:: + Sub-shapes + +**See Also** a sample TUI Script of a :ref:`tui_create_subshape` operation. + + + + diff --git a/src/BuildPlugin/doc/vertexFeature.rst b/src/BuildPlugin/doc/vertexFeature.rst index dc8cb4c75..e2fdbbe3a 100644 --- a/src/BuildPlugin/doc/vertexFeature.rst +++ b/src/BuildPlugin/doc/vertexFeature.rst @@ -2,9 +2,46 @@ Vertex ====== +The Vertex feature creates one or several vertices using already existing vertices in other objects. + +To create vertices in the active part: + +#. select in the Main Menu *Build - > Vertex* item or +#. click **Vertex** button in the toolbar + +.. image:: images/feature_vertex.png + :align: center + +.. centered:: + **Vertex** button + +The following property panel will be opened: .. image:: images/Vertex.png :align: center .. centered:: - Create a vertex + Create vertices + +Select one or several vertices in viewer. + +**Apply** button creates vertices. + +**Cancel** button cancels operation. + +**TUI Command**: *model.addVertex(Part_doc, Shapes)* + +**Arguments**: Part document + list of shapes. + +Result +"""""" + +The result of the operation will be set of vertices created from selected shapes: + +.. image:: images/CreateVertex.png + :align: center + +.. centered:: + Result of the operation. + +**See Also** a sample TUI Script of a :ref:`tui_create_vertex` operation. diff --git a/src/BuildPlugin/doc/wireFeature.rst b/src/BuildPlugin/doc/wireFeature.rst index a7b22081a..0cf5bc408 100644 --- a/src/BuildPlugin/doc/wireFeature.rst +++ b/src/BuildPlugin/doc/wireFeature.rst @@ -2,9 +2,46 @@ Wire ==== +The Wire feature creates a wire using already existing edges in other objects. + +To create wire in the active part: + +#. select in the Main Menu *Build - > Wire* item or +#. click **Wire** button in the toolbar + +.. image:: images/feature_wire.png + :align: center + +.. centered:: + **Wire** button + +The following property panel will be opened: .. image:: images/Wire.png :align: center .. centered:: Create a wire + +Select one or several edges in viewer. For automatic selection of closed contour starting from a selected edge it is necessary to press **Add contour** button. + +**Apply** button creates wire. + +**Cancel** button cancels operation. + +**TUI Command**: *model.addWire(Part_doc, Shapes)* + +**Arguments**: Part document + list of shapes. + +Result +"""""" + +The result of the operation will be a wire created from selected shapes: + +.. image:: images/CreateWire.png + :align: center + +.. centered:: + Result of the operation. + +**See Also** a sample TUI Script of a :ref:`tui_create_wire` operation. diff --git a/src/BuildPlugin/plugin-Build.xml b/src/BuildPlugin/plugin-Build.xml index e54004fcd..af32a2c62 100644 --- a/src/BuildPlugin/plugin-Build.xml +++ b/src/BuildPlugin/plugin-Build.xml @@ -23,55 +23,55 @@ email : webmaster.salome@opencascade.com + helpfile="vertexFeature.html"> + helpfile="edgeFeature.html"> + helpfile="interpolationFeature.html"> + helpfile="wireFeature.html"> + helpfile="polylineFeature.html"> + helpfile="faceFeature.html"> + helpfile="shellFeature.html"> + helpfile="solidFeature.html"> + helpfile="compsolidFeature.html"> + helpfile="compoundFeature.html"> + helpfile="subShapesFeature.html"> + helpfile="fillingFeature.html"> diff --git a/src/CollectionPlugin/doc/TUI_fieldFeature.rst b/src/CollectionPlugin/doc/TUI_fieldFeature.rst new file mode 100644 index 000000000..6ed23216a --- /dev/null +++ b/src/CollectionPlugin/doc/TUI_fieldFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_create_field: + +Create Field +============ + +.. literalinclude:: examples/field.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/CollectionPlugin/doc/TUI_groupFeature.rst b/src/CollectionPlugin/doc/TUI_groupFeature.rst new file mode 100644 index 000000000..4b5dc61d9 --- /dev/null +++ b/src/CollectionPlugin/doc/TUI_groupFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_create_group: + +Create Group +============ + +.. literalinclude:: examples/group.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/CollectionPlugin/doc/examoles/field.py b/src/CollectionPlugin/doc/examoles/field.py new file mode 100644 index 000000000..f0d917ae7 --- /dev/null +++ b/src/CollectionPlugin/doc/examoles/field.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Field_1 = model.addField(Part_1_doc, 2, "DOUBLE", 2, ["DX", "DY"], [model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Top")]) +Field_1.addStep(0, 0, [[0.1, 0.2], [2.1, 1.7], [3.7, 1.95]]) +Field_1.addStep(1, 31, [[0.1, 0.2], [1.1, 2.1], [0.75, 3.1]]) +model.do() +model.end() diff --git a/src/CollectionPlugin/doc/examoles/group.py b/src/CollectionPlugin/doc/examoles/group.py new file mode 100644 index 000000000..5c42ca401 --- /dev/null +++ b/src/CollectionPlugin/doc/examoles/group.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10) +Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Cone_1_1/Face_1&Cone_1_1/Face_2"), model.selection("EDGE", "Cone_1_1/Face_1")]) +Group_1.setName("edges_cone") +Group_1.result().setName("edges_cone") +model.do() +model.end() diff --git a/src/CollectionPlugin/doc/fieldFeature.rst b/src/CollectionPlugin/doc/fieldFeature.rst index 10b33d42d..efd84d478 100644 --- a/src/CollectionPlugin/doc/fieldFeature.rst +++ b/src/CollectionPlugin/doc/fieldFeature.rst @@ -2,9 +2,69 @@ Field ===== +A field object assigns some values to geometrical entities. These values can be later transferred to mesh entities generated on the geometrical entities during export to MED file in Mesh module. Geometrical fields can be stored in/restored from XAO format files. Note that only integer and double values can be exported into the MED file. -.. image:: images/Field.png +The field can hold several named values (components) per a geometrical entity. + +The field can include several sets of data called steps, each dedicated to a certain time moment. + +To create Field in the active part: + +#. select in the Main Menu *Features - > Field* item or +#. click **Field** button in Shaper toolbar: + +.. image:: images/field.png + :align: center + +.. centered:: + Field button + +The following property panel appears. + +.. image:: images/field_property_panel.png :align: center .. centered:: Create a field + +Input fields: + +- **Type of shapes** selects geometrical entities on which field values will be assigned from drop-down list: + + - Vertices; + - Edges; + - Faces; + - Solids; + - Objects; + - Parts; + +- **Type of field** selects type of field values from drop-down list: + + - Boolean; + - Integer; + - Double; + - String; + +- **Nb. Components** defines number of named values (components) assigned to each geometrical entity; +- **Stamp** sets time stamp for the current time step; +- **Current step** slider navigates through added steps; +- table of values for each step: + + - number of rows depends on number of entities selected in OCC 3D viewer; + - **Default value** row contains values assigned to not selected entities of parent shape with given type; + - number of columns depends on **Nb. Components**; + - to rename component double-click a column header; + +- **Add Step** button adds a new time step; +- **Remove Step** button deletes the current time step. + + +**TUI Command**: *model.addField(Part_1_doc, 2, "DOUBLE", 2, ["DX", "DY"], [model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Top")])* + +**Arguments**: 1 part + integer (number of steps) + text (Type of field) + integer (number of components) + list of text (names of components) + list of objects + +**TUI Command**: *Field_1.addStep(step, stamp, [[0.1, 0.2], [2.1, 1.7], [3.7, 1.95]])* + +**Arguments**: 2 integers + list of lists of values with Type of field + +**See Also** a sample TUI Script of a :ref:`tui_create_field` operation. diff --git a/src/CollectionPlugin/doc/groupFeature.rst b/src/CollectionPlugin/doc/groupFeature.rst index 64b65c6e1..1fbc36dbc 100644 --- a/src/CollectionPlugin/doc/groupFeature.rst +++ b/src/CollectionPlugin/doc/groupFeature.rst @@ -2,9 +2,65 @@ Group ===== +To create Group in the active part: -.. image:: images/Group.png +#. select in the Main Menu *Features - > Group* item or +#. click **Group** button in Shaper toolbar: + +.. image:: images/shape_group.png + :align: center + +.. centered:: + Group button + +The following property panel appears. + +.. image:: images/group_property_panel.png :align: center .. centered:: Create a group + +Input fields: + +- **Name** defines the name of the group, by default, it is **Group_n**. +- **Type** buttons select geometrical entities to be included in group: + + .. image:: images/group_property_panel_vertice.png + :align: left + Vertices; + + .. image:: images/group_property_panel_edge.png + :align: left + Edges; + + .. image:: images/group_property_panel_face.png + :align: left + Faces; + + .. image:: images/group_property_panel_solid.png + :align: left + Solids; + +- List of selected entities of given type. Multiply selection can be done manually in OCC 3D Viewer by mouse click with Shift button pressed or by rectangle selection. + +To delete entities from the list, select them and call pop-up menu *Delete* item. + + +**TUI Command**: *model.addGroup(Part_1_doc, [model.selection("EDGE", "Cone_1_1/Face_1&Cone_1_1/Face_2"), model.selection("EDGE", "Cone_1_1/Face_1")])* + +**Arguments**: 1 part + list of selected entities with type + + +Result +"""""" + +Created Group appears in the view. + +.. image:: images/group_res.png + :align: center + +.. centered:: + Group created + +**See Also** a sample TUI Script of a :ref:`tui_create_group` operation. diff --git a/src/CollectionPlugin/doc/images/Field.png b/src/CollectionPlugin/doc/images/Field.png index 084876976..e9ed8243e 100644 Binary files a/src/CollectionPlugin/doc/images/Field.png and b/src/CollectionPlugin/doc/images/Field.png differ diff --git a/src/CollectionPlugin/doc/images/field_property_panel.png b/src/CollectionPlugin/doc/images/field_property_panel.png new file mode 100644 index 000000000..991410150 Binary files /dev/null and b/src/CollectionPlugin/doc/images/field_property_panel.png differ diff --git a/src/CollectionPlugin/doc/images/group_property_panel.png b/src/CollectionPlugin/doc/images/group_property_panel.png new file mode 100644 index 000000000..4302628d3 Binary files /dev/null and b/src/CollectionPlugin/doc/images/group_property_panel.png differ diff --git a/src/CollectionPlugin/doc/images/group_property_panel_edge.png b/src/CollectionPlugin/doc/images/group_property_panel_edge.png new file mode 100644 index 000000000..9f30b2373 Binary files /dev/null and b/src/CollectionPlugin/doc/images/group_property_panel_edge.png differ diff --git a/src/CollectionPlugin/doc/images/group_property_panel_face.png b/src/CollectionPlugin/doc/images/group_property_panel_face.png new file mode 100644 index 000000000..46a2d476e Binary files /dev/null and b/src/CollectionPlugin/doc/images/group_property_panel_face.png differ diff --git a/src/CollectionPlugin/doc/images/group_property_panel_solid.png b/src/CollectionPlugin/doc/images/group_property_panel_solid.png new file mode 100644 index 000000000..e5e18bb80 Binary files /dev/null and b/src/CollectionPlugin/doc/images/group_property_panel_solid.png differ diff --git a/src/CollectionPlugin/doc/images/group_property_panel_vertice.png b/src/CollectionPlugin/doc/images/group_property_panel_vertice.png new file mode 100644 index 000000000..a7e3cb17c Binary files /dev/null and b/src/CollectionPlugin/doc/images/group_property_panel_vertice.png differ diff --git a/src/CollectionPlugin/doc/images/group_res.png b/src/CollectionPlugin/doc/images/group_res.png new file mode 100644 index 000000000..6bf4a602c Binary files /dev/null and b/src/CollectionPlugin/doc/images/group_res.png differ diff --git a/src/CollectionPlugin/doc/images/shape_group.png b/src/CollectionPlugin/doc/images/shape_group.png new file mode 100644 index 000000000..a00d1a263 Binary files /dev/null and b/src/CollectionPlugin/doc/images/shape_group.png differ diff --git a/src/CollectionPlugin/plugin-Collection.xml b/src/CollectionPlugin/plugin-Collection.xml index fcab1b940..87d7d70ef 100644 --- a/src/CollectionPlugin/plugin-Collection.xml +++ b/src/CollectionPlugin/plugin-Collection.xml @@ -27,7 +27,7 @@ email : webmaster.salome@opencascade.com + helpfile="groupFeature.html"> @@ -35,7 +35,7 @@ email : webmaster.salome@opencascade.com + helpfile="fieldFeature.html"> diff --git a/src/Config/Config_FeatureReader.cpp b/src/Config/Config_FeatureReader.cpp index c76aee821..377cb364e 100644 --- a/src/Config/Config_FeatureReader.cpp +++ b/src/Config/Config_FeatureReader.cpp @@ -183,7 +183,9 @@ void Config_FeatureReader::fillFeature(xmlNodePtr theFeatureNode, getProperty(theFeatureNode, FEATURE_TOOLTIP)); outFeatureMessage->setIcon(getProperty(theFeatureNode, FEATURE_ICON)); outFeatureMessage->setKeysequence(getProperty(theFeatureNode, FEATURE_KEYSEQUENCE)); - outFeatureMessage->setHelpFileName(getProperty(theFeatureNode, HELP_FILE)); + std::string aHelpFile = getProperty(theFeatureNode, HELP_FILE); + if (!aHelpFile.empty()) + outFeatureMessage->setHelpFileName(myLibraryName + "/" + aHelpFile); std::string aGroupName = restoreAttribute(NODE_GROUP, _ID); std::string aWBNName = restoreAttribute(NODE_WORKBENCH, _ID); diff --git a/src/ConnectorPlugin/doc/ConnectorPlugin.rst b/src/ConnectorPlugin/doc/ConnectorPlugin.rst index 7554e8397..f79646f72 100644 --- a/src/ConnectorPlugin/doc/ConnectorPlugin.rst +++ b/src/ConnectorPlugin/doc/ConnectorPlugin.rst @@ -1,3 +1,20 @@ Connector plug-in ================= + +To export Results, Groups, Fields created in active part into GEOM module: + +#. select in the Main Menu *Feature - > Export to GEOM* item or +#. click **Export to GEOM** button in Shaper toolbar: + +.. image:: images/geom_export.png + :align: center + +.. centered:: + Export to GEOM button + +**TUI Command**: *model.exportGEOM(part)* + +**Arguments**: 1 part + +Result can be checked in GEOM module. \ No newline at end of file diff --git a/src/ConnectorPlugin/doc/images/geom_export.png b/src/ConnectorPlugin/doc/images/geom_export.png new file mode 100644 index 000000000..cb8bc6bd9 Binary files /dev/null and b/src/ConnectorPlugin/doc/images/geom_export.png differ diff --git a/src/ConstructionPlugin/doc/ConstructionPlugin.rst b/src/ConstructionPlugin/doc/ConstructionPlugin.rst index 9db76376e..00dff56a9 100644 --- a/src/ConstructionPlugin/doc/ConstructionPlugin.rst +++ b/src/ConstructionPlugin/doc/ConstructionPlugin.rst @@ -4,6 +4,8 @@ Construction plug-in ==================== +Construction plug-in includes features for creation of different constructive objects. It provides following features: + .. toctree:: :titlesonly: :maxdepth: 1 diff --git a/src/ConstructionPlugin/doc/TUI_axisFeature.rst b/src/ConstructionPlugin/doc/TUI_axisFeature.rst new file mode 100644 index 000000000..01587e8b8 --- /dev/null +++ b/src/ConstructionPlugin/doc/TUI_axisFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_axis: + +Create Axis +=========== + +.. literalinclude:: examples/axis.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/ConstructionPlugin/doc/TUI_planeFeature.rst b/src/ConstructionPlugin/doc/TUI_planeFeature.rst new file mode 100644 index 000000000..e3e8684ab --- /dev/null +++ b/src/ConstructionPlugin/doc/TUI_planeFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_plane: + +Create Plane +============ + +.. literalinclude:: examples/plane.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/ConstructionPlugin/doc/TUI_pointFeature.rst b/src/ConstructionPlugin/doc/TUI_pointFeature.rst new file mode 100644 index 000000000..4aec38749 --- /dev/null +++ b/src/ConstructionPlugin/doc/TUI_pointFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_point: + +Create Point +============ + +.. literalinclude:: examples/point.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/ConstructionPlugin/doc/axisFeature.rst b/src/ConstructionPlugin/doc/axisFeature.rst index bb372bbca..5be237cb9 100644 --- a/src/ConstructionPlugin/doc/axisFeature.rst +++ b/src/ConstructionPlugin/doc/axisFeature.rst @@ -1,3 +1,145 @@ Axis ==== + +The feature Axis creates a new constructive axis line. + +Axis is a construction object and it can be created as in a part as in part set. To create an axis: + +#. select in the Main Menu *Construction - > Axis* item or +#. click **Axis** button in the toolbar + +.. image:: images/axis_button.png + :align: center + +.. centered:: + **Axis** button + +There are 6 algorithms for creation of an Axis: + +.. image:: images/axis_dxyz_32x32.png + :align: left +**By three dimensions** creates an axis by dimensions along X, Y, Z axes starting form existing origin. + +.. image:: images/by_two_points_32x32.png + :align: left +**By two points** creates an axis using existing points. + +.. image:: images/axis_by_line_32x32.png + :align: left +**By line** creates an axis using a line. + +.. image:: images/axis_by_line_32x32.png + :align: left +**As an axis of cilindrical face** creates an axis using a cilindrical face. + +.. image:: images/axis_by_line_32x32.png + :align: left +**By plane and point** creates an axis using a plane and point. + +.. image:: images/axis_by_line_32x32.png + :align: left +**By two planes** creates an axis as intersection of two planes. + +By three dimensions +""""""""""""""""""" + +.. image:: images/Axis1.png + :align: center + +.. centered:: + **By dX, dY, dZ values** + +In this case user has to define dX, dY, dZ values of a vector. + +**TUI Commands**: *model.addAxis(Part_doc, 10, 10, 10)* + +**Arguments**: Part + 3 values (dX, dY, dZ values). + +By two points +""""""""""""" + +.. image:: images/Axis2.png + :align: center + +.. centered:: + **By two points** + +In this case user has to select two points or vertices. + +**TUI Commands**: *model.addAxis(Part_doc, model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom"))* + +**Arguments**: Part + 2 vertices. + +By line +""""""" + +.. image:: images/Axis3.png + :align: center + +.. centered:: + **By a line** + +In this case user has to select a linear edge. + +**TUI Commands**: *model.addAxis(Part_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"))* + +**Arguments**: Part + edge. + +As an axis of cilindrical face +"""""""""""""""""""""""""""""" + +.. image:: images/Axis4.png + :align: center + +.. centered:: + **By a cylinder** + +In this case user has to select a cylindrical face. Axis of the cylinder will define an axis object. + +**TUI Commands**: *model.addAxis(Part_doc, model.selection("FACE", "Cylinder_1_1/Face_1"))* + +**Arguments**: Part + cylindrical face. + +By plane and point +"""""""""""""""""" + +.. image:: images/Axis5.png + :align: center + +.. centered:: + **By a plane and point** + +In this case user has to select a point or vertex and plane (or planar face). Axis will be defined as a normal from the point to the plane. + +**TUI Commands**: *model.addAxis(Part_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Right&Box_1_1/Top"))* + +**Arguments**: Part + plane + point. + +By two planes +""""""""""""" + +.. image:: images/Axis6.png + :align: center + +.. centered:: + **By two planes** + +In this case user has to select two planes. Intersection of that planes defines an axis. User can define offset for axis definition from both planes. + +**TUI Commands**: *model.addAxis(Part_doc, model.selection("FACE", "Box_1_1/Top"), 5, False, model.selection("FACE", "Box_1_1/Front"), 3, False)* + +**Arguments**: Part + plane + offcet value + is reversed flag + plane + offcet value + is reversed flag. + +Result +"""""" + +The Result of the operation will be an axis: + +.. image:: images/CreatedAxis.png + :align: center + +.. centered:: + Axis created + +**See Also** a sample TUI Script of a :ref:`tui_create_axis` operation. diff --git a/src/ConstructionPlugin/doc/examples/axis.py b/src/ConstructionPlugin/doc/examples/axis.py new file mode 100644 index 000000000..7072fc265 --- /dev/null +++ b/src/ConstructionPlugin/doc/examples/axis.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Axis_4 = model.addAxis(Part_1_doc, 10, 10, 10) +Axis_5 = model.addAxis(Part_1_doc, model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom")) +Axis_6 = model.addAxis(Part_1_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top")) +Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) +Axis_7 = model.addAxis(Part_1_doc, model.selection("FACE", "Cylinder_1_1/Face_1")) +Axis_8 = model.addAxis(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Right&Box_1_1/Top")) +Axis_9 = model.addAxis(Part_1_doc, model.selection("FACE", "Box_1_1/Top"), 5, False, model.selection("FACE", "Box_1_1/Front"), 3, False) +model.do() +model.end() diff --git a/src/ConstructionPlugin/doc/examples/plane.py b/src/ConstructionPlugin/doc/examples/plane.py new file mode 100644 index 000000000..31580ae1f --- /dev/null +++ b/src/ConstructionPlugin/doc/examples/plane.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Plane_4 = model.addPlane(Part_1_doc, + model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), + model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Top"), + model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Bottom")) +Plane_5 = model.addPlane(Part_1_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), + model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom"), False) +Plane_6 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), 10, False) +Plane_7 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), + model.selection("FACE", "Box_1_1/Right")) +model.do() +model.end() diff --git a/src/ConstructionPlugin/doc/examples/point.py b/src/ConstructionPlugin/doc/examples/point.py new file mode 100644 index 000000000..51465bd3f --- /dev/null +++ b/src/ConstructionPlugin/doc/examples/point.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Point_2 = model.addPoint(Part_1_doc, 50, 50, 50) +Point_3 = model.addPoint(Part_1_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), 0.5, True, False) +Point_4 = model.addPoint(Part_1_doc, model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Top"), model.selection("EDGE", "Box_1_1/Right&Box_1_1/Top")) +Point_5 = model.addPoint(Part_1_doc, model.selection("EDGE", "Box_1_1/Front&Box_1_1/Top"), model.selection("FACE", "Box_1_1/Left"), 10, False) +Point_6 = model.addPoint(Part_1_doc, model.selection("SOLID", "Box_1_1")) +model.do() +model.end() diff --git a/src/ConstructionPlugin/doc/images/Axis1.png b/src/ConstructionPlugin/doc/images/Axis1.png new file mode 100644 index 000000000..b0d5a1a63 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis1.png differ diff --git a/src/ConstructionPlugin/doc/images/Axis2.png b/src/ConstructionPlugin/doc/images/Axis2.png new file mode 100644 index 000000000..f9f534363 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis2.png differ diff --git a/src/ConstructionPlugin/doc/images/Axis3.png b/src/ConstructionPlugin/doc/images/Axis3.png new file mode 100644 index 000000000..ca6dd923b Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis3.png differ diff --git a/src/ConstructionPlugin/doc/images/Axis4.png b/src/ConstructionPlugin/doc/images/Axis4.png new file mode 100644 index 000000000..10cf6c4b7 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis4.png differ diff --git a/src/ConstructionPlugin/doc/images/Axis5.png b/src/ConstructionPlugin/doc/images/Axis5.png new file mode 100644 index 000000000..46cab458e Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis5.png differ diff --git a/src/ConstructionPlugin/doc/images/Axis6.png b/src/ConstructionPlugin/doc/images/Axis6.png new file mode 100644 index 000000000..8d6baa5e4 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis6.png differ diff --git a/src/ConstructionPlugin/doc/images/CreatePoint.png b/src/ConstructionPlugin/doc/images/CreatePoint.png new file mode 100644 index 000000000..a6822c85d Binary files /dev/null and b/src/ConstructionPlugin/doc/images/CreatePoint.png differ diff --git a/src/ConstructionPlugin/doc/images/CreatedAxis.png b/src/ConstructionPlugin/doc/images/CreatedAxis.png new file mode 100644 index 000000000..ba2fc88d1 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/CreatedAxis.png differ diff --git a/src/ConstructionPlugin/doc/images/CreatedPlane.png b/src/ConstructionPlugin/doc/images/CreatedPlane.png new file mode 100644 index 000000000..7c556b357 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/CreatedPlane.png differ diff --git a/src/ConstructionPlugin/doc/images/Plane1.png b/src/ConstructionPlugin/doc/images/Plane1.png new file mode 100644 index 000000000..6adfafbaf Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Plane1.png differ diff --git a/src/ConstructionPlugin/doc/images/Plane2.png b/src/ConstructionPlugin/doc/images/Plane2.png new file mode 100644 index 000000000..23b4c7eea Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Plane2.png differ diff --git a/src/ConstructionPlugin/doc/images/Plane3.png b/src/ConstructionPlugin/doc/images/Plane3.png new file mode 100644 index 000000000..335139565 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Plane3.png differ diff --git a/src/ConstructionPlugin/doc/images/Plane4.png b/src/ConstructionPlugin/doc/images/Plane4.png new file mode 100644 index 000000000..2c53d7a57 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Plane4.png differ diff --git a/src/ConstructionPlugin/doc/images/Point1.png b/src/ConstructionPlugin/doc/images/Point1.png new file mode 100644 index 000000000..f9172860e Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Point1.png differ diff --git a/src/ConstructionPlugin/doc/images/Point2.png b/src/ConstructionPlugin/doc/images/Point2.png new file mode 100644 index 000000000..e272ee752 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Point2.png differ diff --git a/src/ConstructionPlugin/doc/images/Point3.png b/src/ConstructionPlugin/doc/images/Point3.png new file mode 100644 index 000000000..fa9d4c95d Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Point3.png differ diff --git a/src/ConstructionPlugin/doc/images/Point4.png b/src/ConstructionPlugin/doc/images/Point4.png new file mode 100644 index 000000000..8072605cf Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Point4.png differ diff --git a/src/ConstructionPlugin/doc/images/Point5.png b/src/ConstructionPlugin/doc/images/Point5.png new file mode 100644 index 000000000..fe7f84f4c Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Point5.png differ diff --git a/src/ConstructionPlugin/doc/images/axis_button.png b/src/ConstructionPlugin/doc/images/axis_button.png new file mode 100755 index 000000000..015d270bf Binary files /dev/null and b/src/ConstructionPlugin/doc/images/axis_button.png differ diff --git a/src/ConstructionPlugin/doc/images/axis_by_line_32x32.png b/src/ConstructionPlugin/doc/images/axis_by_line_32x32.png new file mode 100644 index 000000000..2a68f3d84 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/axis_by_line_32x32.png differ diff --git a/src/ConstructionPlugin/doc/images/axis_by_plane_and_point_32x32.png b/src/ConstructionPlugin/doc/images/axis_by_plane_and_point_32x32.png new file mode 100644 index 000000000..a280e48cd Binary files /dev/null and b/src/ConstructionPlugin/doc/images/axis_by_plane_and_point_32x32.png differ diff --git a/src/ConstructionPlugin/doc/images/axis_by_two_planes_32x32.png b/src/ConstructionPlugin/doc/images/axis_by_two_planes_32x32.png new file mode 100644 index 000000000..5bdeb9294 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/axis_by_two_planes_32x32.png differ diff --git a/src/ConstructionPlugin/doc/images/axis_dxyz_32x32.png b/src/ConstructionPlugin/doc/images/axis_dxyz_32x32.png new file mode 100644 index 000000000..40d5bf22c Binary files /dev/null and b/src/ConstructionPlugin/doc/images/axis_dxyz_32x32.png differ diff --git a/src/ConstructionPlugin/doc/images/by_two_points_32x32.png b/src/ConstructionPlugin/doc/images/by_two_points_32x32.png new file mode 100644 index 000000000..5f20fb8b7 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/by_two_points_32x32.png differ diff --git a/src/ConstructionPlugin/doc/images/cylindrical_face_32x32.png b/src/ConstructionPlugin/doc/images/cylindrical_face_32x32.png new file mode 100644 index 000000000..e82010154 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/cylindrical_face_32x32.png differ diff --git a/src/ConstructionPlugin/doc/images/plane_button.png b/src/ConstructionPlugin/doc/images/plane_button.png new file mode 100755 index 000000000..1da328269 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/plane_button.png differ diff --git a/src/ConstructionPlugin/doc/images/plane_by_coincident_to_point_24x24.png b/src/ConstructionPlugin/doc/images/plane_by_coincident_to_point_24x24.png new file mode 100755 index 000000000..0cc6b58a3 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/plane_by_coincident_to_point_24x24.png differ diff --git a/src/ConstructionPlugin/doc/images/plane_by_distance_from_other_24x24.png b/src/ConstructionPlugin/doc/images/plane_by_distance_from_other_24x24.png new file mode 100755 index 000000000..bc85b3dd5 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/plane_by_distance_from_other_24x24.png differ diff --git a/src/ConstructionPlugin/doc/images/plane_by_line_and_point_32x32.png b/src/ConstructionPlugin/doc/images/plane_by_line_and_point_32x32.png new file mode 100644 index 000000000..a34f5764c Binary files /dev/null and b/src/ConstructionPlugin/doc/images/plane_by_line_and_point_32x32.png differ diff --git a/src/ConstructionPlugin/doc/images/plane_by_other_plane_32x32.png b/src/ConstructionPlugin/doc/images/plane_by_other_plane_32x32.png new file mode 100644 index 000000000..6e2dda6a4 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/plane_by_other_plane_32x32.png differ diff --git a/src/ConstructionPlugin/doc/images/plane_by_rotation_24x24.png b/src/ConstructionPlugin/doc/images/plane_by_rotation_24x24.png new file mode 100755 index 000000000..1b1bf9e0b Binary files /dev/null and b/src/ConstructionPlugin/doc/images/plane_by_rotation_24x24.png differ diff --git a/src/ConstructionPlugin/doc/images/plane_by_three_points_32x32.png b/src/ConstructionPlugin/doc/images/plane_by_three_points_32x32.png new file mode 100644 index 000000000..b239ef872 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/plane_by_three_points_32x32.png differ diff --git a/src/ConstructionPlugin/doc/images/plane_by_two_parallel_planes_32x32.png b/src/ConstructionPlugin/doc/images/plane_by_two_parallel_planes_32x32.png new file mode 100644 index 000000000..342728e11 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/plane_by_two_parallel_planes_32x32.png differ diff --git a/src/ConstructionPlugin/doc/images/point_button.png b/src/ConstructionPlugin/doc/images/point_button.png new file mode 100755 index 000000000..96149ebf3 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/point_button.png differ diff --git a/src/ConstructionPlugin/doc/images/point_by_distance_on_edge_32x32.png b/src/ConstructionPlugin/doc/images/point_by_distance_on_edge_32x32.png new file mode 100644 index 000000000..121f23953 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/point_by_distance_on_edge_32x32.png differ diff --git a/src/ConstructionPlugin/doc/images/point_by_geometrical_property_32x32.png b/src/ConstructionPlugin/doc/images/point_by_geometrical_property_32x32.png new file mode 100644 index 000000000..e0bfc926a Binary files /dev/null and b/src/ConstructionPlugin/doc/images/point_by_geometrical_property_32x32.png differ diff --git a/src/ConstructionPlugin/doc/images/point_by_intersection_32x32.png b/src/ConstructionPlugin/doc/images/point_by_intersection_32x32.png new file mode 100644 index 000000000..ae3fb7968 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/point_by_intersection_32x32.png differ diff --git a/src/ConstructionPlugin/doc/images/point_by_projection_32x32.png b/src/ConstructionPlugin/doc/images/point_by_projection_32x32.png new file mode 100644 index 000000000..2cc179da6 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/point_by_projection_32x32.png differ diff --git a/src/ConstructionPlugin/doc/images/point_by_xyz_32x32.png b/src/ConstructionPlugin/doc/images/point_by_xyz_32x32.png new file mode 100644 index 000000000..663ba9545 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/point_by_xyz_32x32.png differ diff --git a/src/ConstructionPlugin/doc/planeFeature.rst b/src/ConstructionPlugin/doc/planeFeature.rst index dbe2ac344..eead2aeba 100644 --- a/src/ConstructionPlugin/doc/planeFeature.rst +++ b/src/ConstructionPlugin/doc/planeFeature.rst @@ -1,3 +1,123 @@ Plane ===== + +The feature Plane creates a new constructive plane. + +Plane is a construction object and it can be created as in a part as in part set. To create a plane: + +#. select in the Main Menu *Construction - > Plane* item or +#. click **Point** button in the toolbar + +.. image:: images/plane_button.png + :align: center + +.. centered:: + **Plane** button + +There are 4 algorithms for creation of a Plane: + +.. image:: images/plane_by_three_points_32x32.png + :align: left +**By three points** creates a plane by three points. + +.. image:: images/plane_by_line_and_point_32x32.png + :align: left +**By line and point** creates a plane by a line and a point. + +.. image:: images/plane_by_other_plane_32x32.png + :align: left +**By other plane** creates a plane parallel to another plane. + +.. image:: images/plane_by_two_parallel_planes_32x32.png + :align: left +**By two parallel planes** creates a plane between two parallel planes. + +By three points +""""""""""""""" + +.. image:: images/Plane1.png + :align: center + +.. centered:: + **By three points** + +In this case user has to select three points in a viewer to define a new plane. + +**TUI Commands**: *model.addPlane(Part_doc, model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Bottom"))* + +**Arguments**: Part + 3 vertices. + +By line and point +""""""""""""""""" + +.. image:: images/Plane2.png + :align: center + +.. centered:: + **Line and point** + +In this case user has to select a linear edge and point to define a plane. It is possible to make the new plane perpendicular to the selected edge. + +**TUI Commands**: *model.addPlane(Part_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom"), False)* + +**Arguments**: Part + line + point + is perpendicular to line flag. + +By other plane +"""""""""""""" + +.. image:: images/Plane3.png + :align: center + +.. centered:: + **By other plane** + +In this case user has to select an already existing plane (planar face). There are following possibilities to define a new plane: + +.. image:: images/plane_by_distance_from_other_24x24.png + :align: left + +By distance from the selected plane. + +.. image:: images/plane_by_coincident_to_point_24x24.png + :align: left + +By coincidence to a point. + +.. image:: images/plane_by_rotation_24x24.png + :align: left + +By rotation around an edge on a specified angle. + +**TUI Commands**: *model.addPlane(Part_doc, model.selection("FACE", "Box_1_1/Front"), 10, False)* + +**Arguments**: Part + a plane + offset + is reverse flag. + + +By two parallel planes +"""""""""""""""""""""" + +.. image:: images/Plane4.png + :align: center + +.. centered:: + **By two parallel planes** + +In this case user has to select two parallel planes. A new plane will be defined between them. + +**TUI Commands**: *model.addPlane(Part_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))* + +**Arguments**: Part + 2 planes. + +Result +"""""" + +The Result of the operation will be a plane: + +.. image:: images/CreatedPlane.png + :align: center + +.. centered:: + Plane created + +**See Also** a sample TUI Script of a :ref:`tui_create_plane` operation. diff --git a/src/ConstructionPlugin/doc/pointFeature.rst b/src/ConstructionPlugin/doc/pointFeature.rst index 64f21b167..64b642789 100644 --- a/src/ConstructionPlugin/doc/pointFeature.rst +++ b/src/ConstructionPlugin/doc/pointFeature.rst @@ -1,3 +1,132 @@ Point ===== + +The feature Point creates a new constructive point. + +Point is a construction object and it can be created as in a part as in part set. To create a point: + +#. select in the Main Menu *Construction - > Point* item or +#. click **Point** button in the toolbar + +.. image:: images/point_button.png + :align: center + +.. centered:: + **Point** button + +There are 5 algorithms for creation of a Point: + +.. image:: images/point_by_xyz_32x32.png + :align: left +**By X,Y,Z** creates a point by three coordinates. + +.. image:: images/point_by_distance_on_edge_32x32.png + :align: left +**By distance on edge** creates a point on an edge. + +.. image:: images/point_by_projection_32x32.png + :align: left +**By projection on edge or plane** creates a point projecting of existing point on an edge or plane. + +.. image:: images/point_by_intersection_32x32.png + :align: left +**By intersection of objects** creates a point by intersection of planes or/ and edges. + +.. image:: images/point_by_geometrical_property_32x32.png + :align: left +**By geometrical property of object** creates a point in COG or center of arc or circle. + +By X,Y,Z +"""""""" + +.. image:: images/Point1.png + :align: center + +.. centered:: + **By X,Y,Z coordinates** + +In this case user has to input X, Y, and Z coordinates. + +**TUI Commands**: *model.addPoint(Part_doc, 50, 50, 50)* + +**Arguments**: Part + 3 values (X, Y, Z coordinates). + +By distance on edge +""""""""""""""""""" + +.. image:: images/Point2.png + :align: center + +.. centered:: + **Along an edge** + +In this case user has to select an edge in a viewer and to define a distance along the edge where point will be defined. This distance can be defined as by an absolute value as by relative as a ratio to the edge length. The direction of the edge can be reverced by the corresponded check box. + +**TUI Commands**: *model.addPoint(Part_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), 0.5, True, False)* + +**Arguments**: Part + edge + value + is by ratio flag + to reverce flag. + +By projection on edge or plane +"""""""""""""""""""""""""""""" + +.. image:: images/Point3.png + :align: center + +.. centered:: + **By projection** + +In this case user has to select an existing point or vertex and an edge or face. The new point will be created by projection of the selected point on the edge or face. + +**TUI Commands**: *model.addPoint(Part_doc, model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Top"), model.selection("EDGE", "Box_1_1/Right&Box_1_1/Top"))* + +**Arguments**: Part + vertex + edge (or plane). + +By intersection of objects +"""""""""""""""""""""""""" + +.. image:: images/Point4.png + :align: center + +.. centered:: + **Intersection of objects** + +In this case user has to select: + +#. two edges, +#. edge and plane, +#. three planes + +The new point will be defined by intersection of selected objects. + +**TUI Commands**: *model.addPoint(Part_doc, model.selection("EDGE", "Box_1_1/Front&Box_1_1/Top"), model.selection("FACE", "Box_1_1/Left"), 10, False)* + +**Arguments**: Part + edge + plane (planar face) + offset value + is offcet reversed. + +By geometrical property of object +""""""""""""""""""""""""""""""""" + +.. image:: images/Point5.png + :align: center + +.. centered:: + **By geometrical property** + +In this case the new point can be defined as a center of gravity of selected object or as a center of a circle. User has to select desirable object. + +**TUI Commands**: *model.addPoint(Part_1_doc, model.selection("SOLID", "Box_1_1"))* + +**Arguments**: Part + solid + +Result +"""""" + +The Result of the operation will be a construction point: + +.. image:: images/CreatePoint.png + :align: center + +.. centered:: + Point created + +**See Also** a sample TUI Script of a :ref:`tui_create_point` operation. diff --git a/src/ConstructionPlugin/plugin-Construction.xml b/src/ConstructionPlugin/plugin-Construction.xml index 023015bca..f0d46b5fc 100644 --- a/src/ConstructionPlugin/plugin-Construction.xml +++ b/src/ConstructionPlugin/plugin-Construction.xml @@ -27,7 +27,7 @@ email : webmaster.salome@opencascade.com + helpfile="pointFeature.html"> + helpfile="axisFeature.html"> + helpfile="planeFeature.html"> diff --git a/src/ExchangePlugin/doc/ExchangePlugin.rst b/src/ExchangePlugin/doc/ExchangePlugin.rst index 55bb7b674..518008f09 100644 --- a/src/ExchangePlugin/doc/ExchangePlugin.rst +++ b/src/ExchangePlugin/doc/ExchangePlugin.rst @@ -4,6 +4,8 @@ Exchange plug-in ================ +Exchange plug-in implements features for data exchange. It provides following: + .. toctree:: :titlesonly: :maxdepth: 1 diff --git a/src/ExchangePlugin/doc/TUI_exportFeature.rst b/src/ExchangePlugin/doc/TUI_exportFeature.rst new file mode 100644 index 000000000..49eecc5aa --- /dev/null +++ b/src/ExchangePlugin/doc/TUI_exportFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_export_file: + +Export File +=========== + +.. literalinclude:: examples/export.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/ExchangePlugin/doc/TUI_importFeature.rst b/src/ExchangePlugin/doc/TUI_importFeature.rst new file mode 100644 index 000000000..69ed88ab6 --- /dev/null +++ b/src/ExchangePlugin/doc/TUI_importFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_import_file: + +Import File +=========== + +.. literalinclude:: examples/import.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/ExchangePlugin/doc/dumpFeature.rst b/src/ExchangePlugin/doc/dumpFeature.rst index afdc02407..ab68b076c 100644 --- a/src/ExchangePlugin/doc/dumpFeature.rst +++ b/src/ExchangePlugin/doc/dumpFeature.rst @@ -1,3 +1,43 @@ Dump ==== + +The feature Dump allows to export a current study to a Python script wich dumps process of creation of the study as a sequence of Python commands. + +It is possible to dump current study state into a Python script. To dump a study: + +#. select in the Main Menu *Part - > Dump* item or +#. click **Dump** button in the toolbar. + +.. image:: images/dump.png + :align: center + +.. centered:: + **Dump** button + +The following property panel will be opened: + +.. image:: images/Dump_panel.png + :align: center + +.. centered:: + **Dump property panel** + +In this panel it is necessary to enter a file name directly into input field or press **'...'** button and browse it with help of dump file dialog box: + +.. image:: images/DumpFileDlg.png + :align: center + +.. centered:: + **Dump file dialog box** + +**Apply** button writes the dump file. + +**Cancel** button cancels operation. + +**TUI Command**: Is not supported. + +Result +"""""" + +The Result of the operation is a Python file. diff --git a/src/ExchangePlugin/doc/examples/export.py b/src/ExchangePlugin/doc/examples/export.py new file mode 100644 index 000000000..44e2816a9 --- /dev/null +++ b/src/ExchangePlugin/doc/examples/export.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Export_1 = model.exportToFile(Part_1_doc, "/dn48/newgeom/vsv/test.step", + [model.selection("SOLID", "Box_1_1")]) +model.do() +model.end() diff --git a/src/ExchangePlugin/doc/examples/import.py b/src/ExchangePlugin/doc/examples/import.py new file mode 100644 index 000000000..d8fe5de4a --- /dev/null +++ b/src/ExchangePlugin/doc/examples/import.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Import_1 = model.addImport(Part_1_doc, "/dn48/newgeom/for_gzy/gzy_data/Compound_2.brep") +model.do() +Import_1.setName("Compound_2") +Import_1.result().setName("Compound_2_1") +Import_1.result().subResult(0).setName("Compound_2_1_1") +Import_1.result().subResult(1).setName("Compound_2_1_2") +Import_1.result().subResult(2).setName("Compound_2_1_3") +Import_1.result().subResult(3).setName("Compound_2_1_4") +Import_1.result().subResult(4).setName("Compound_2_1_5") +model.do() +model.end() diff --git a/src/ExchangePlugin/doc/exportFeature.rst b/src/ExchangePlugin/doc/exportFeature.rst index a007d400b..922d0d618 100644 --- a/src/ExchangePlugin/doc/exportFeature.rst +++ b/src/ExchangePlugin/doc/exportFeature.rst @@ -1,3 +1,49 @@ Export ====== + +The feature export allows to export objects from the current study to an external file. + +It is possible to export objects into files in following formats: BREP, STEP, IGES, XAO. To export objects to a file: + +#. select in the Main Menu *Part - > Export* item or +#. click **Export** button in the toolbar. + +.. image:: images/export.png + :align: center + +.. centered:: + **Export** button + +The following property panel will be opened: + +.. image:: images/Export_panel.png + :align: center + +.. centered:: + **Export property panel** + +In this panel it is necessary to select desirable format of export file. It can be **'BREP, STEP, IGES'** or **'XAO'**. In case of first choice the format of exported file will be defined according to file extension. File name and path can be defined in **Export file** field. It can be typed or browsed with help of **'...'** button which opens **Export file** dialog box: + +.. image:: images/ExportFileDlg.png + :align: center + +.. centered:: + **Export file dialog box** + +Selection list in property panel should contain a list of exporting objects which can be selected in a viewer or objects browser. + +**Apply** button exports the file. + +**Cancel** button cancels operation. + +**TUI Command**: *model.exportToFile(Part_doc, FileNameString, ObjectsList)* + +**Arguments**: Part + file name string + list of objects. + +Result +"""""" + +The Result of operation is exported file. There are no any changes in object browser or viewer. + +**See Also** a sample TUI Script of a :ref:`tui_export_file` operation. diff --git a/src/ExchangePlugin/doc/images/DumpFileDlg.png b/src/ExchangePlugin/doc/images/DumpFileDlg.png new file mode 100644 index 000000000..127c3e00d Binary files /dev/null and b/src/ExchangePlugin/doc/images/DumpFileDlg.png differ diff --git a/src/ExchangePlugin/doc/images/Dump_panel.png b/src/ExchangePlugin/doc/images/Dump_panel.png new file mode 100644 index 000000000..7913a59ba Binary files /dev/null and b/src/ExchangePlugin/doc/images/Dump_panel.png differ diff --git a/src/ExchangePlugin/doc/images/ExportFileDlg.png b/src/ExchangePlugin/doc/images/ExportFileDlg.png new file mode 100644 index 000000000..57848ab1a Binary files /dev/null and b/src/ExchangePlugin/doc/images/ExportFileDlg.png differ diff --git a/src/ExchangePlugin/doc/images/Export_panel.png b/src/ExchangePlugin/doc/images/Export_panel.png new file mode 100644 index 000000000..7062e94ff Binary files /dev/null and b/src/ExchangePlugin/doc/images/Export_panel.png differ diff --git a/src/ExchangePlugin/doc/images/FileImported.png b/src/ExchangePlugin/doc/images/FileImported.png new file mode 100644 index 000000000..e7e3b07c1 Binary files /dev/null and b/src/ExchangePlugin/doc/images/FileImported.png differ diff --git a/src/ExchangePlugin/doc/images/Import_panel.png b/src/ExchangePlugin/doc/images/Import_panel.png new file mode 100644 index 000000000..dca34c15b Binary files /dev/null and b/src/ExchangePlugin/doc/images/Import_panel.png differ diff --git a/src/ExchangePlugin/doc/images/OpenFileDlg.png b/src/ExchangePlugin/doc/images/OpenFileDlg.png new file mode 100644 index 000000000..d0d4e4d47 Binary files /dev/null and b/src/ExchangePlugin/doc/images/OpenFileDlg.png differ diff --git a/src/ExchangePlugin/doc/images/dump.png b/src/ExchangePlugin/doc/images/dump.png new file mode 100644 index 000000000..196cf55dd Binary files /dev/null and b/src/ExchangePlugin/doc/images/dump.png differ diff --git a/src/ExchangePlugin/doc/images/export.png b/src/ExchangePlugin/doc/images/export.png new file mode 100644 index 000000000..55ebd4526 Binary files /dev/null and b/src/ExchangePlugin/doc/images/export.png differ diff --git a/src/ExchangePlugin/doc/images/import.png b/src/ExchangePlugin/doc/images/import.png new file mode 100644 index 000000000..c1d417542 Binary files /dev/null and b/src/ExchangePlugin/doc/images/import.png differ diff --git a/src/ExchangePlugin/doc/importFeature.rst b/src/ExchangePlugin/doc/importFeature.rst index b033d5be5..c1c604d7e 100644 --- a/src/ExchangePlugin/doc/importFeature.rst +++ b/src/ExchangePlugin/doc/importFeature.rst @@ -1,3 +1,53 @@ Import ====== + +The feature Import allows to import an external file into a current study. + +It is possible to import files in following formats: BREP, STEP, IGES, XAO. To import a file into active part: + +#. select in the Main Menu *Part - > Import* item or +#. click **Import** button in the toolbar. + +.. image:: images/import.png + :align: center + +.. centered:: + **Import** button + +The following property panel will be opened: + +.. image:: images/Import_panel.png + :align: center + +.. centered:: + **Import property panel** + +In this panel it is possible to enter a file name directly into input field or press **'...'** button and browse it with help of import file dialog box: + +.. image:: images/OpenFileDlg.png + :align: center + +.. centered:: + **Import file dialog box** + +**Apply** button imports the file. + +**Cancel** button cancels operation. + +**TUI Command**: *model.addImport(Part_doc, FileNameString)* + +**Arguments**: Part + file name string. + +Result +"""""" + +The Result of the operation depends on content of imported file. + +.. image:: images/FileImported.png + :align: center + +.. centered:: + Import of BREP file. + +**See Also** a sample TUI Script of a :ref:`tui_import_file` operation. diff --git a/src/ExchangePlugin/plugin-Exchange.xml b/src/ExchangePlugin/plugin-Exchange.xml index cdf7370b0..8377f64eb 100755 --- a/src/ExchangePlugin/plugin-Exchange.xml +++ b/src/ExchangePlugin/plugin-Exchange.xml @@ -23,17 +23,17 @@ email : webmaster.salome@opencascade.com + helpfile="importFeature.html"> + helpfile="exportFeature.html"> + helpfile="dumpFeature.html"> ` + diff --git a/src/FeaturesPlugin/doc/TUI_commonFeature.rst b/src/FeaturesPlugin/doc/TUI_commonFeature.rst new file mode 100644 index 000000000..993773fbe --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_commonFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_common: + +Create Common +============= + +.. literalinclude:: examples/common.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/FeaturesPlugin/doc/TUI_cutFeature.rst b/src/FeaturesPlugin/doc/TUI_cutFeature.rst new file mode 100644 index 000000000..fadc784d8 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_cutFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_cut: + +Create Cut +========== + +.. literalinclude:: examples/cut.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/FeaturesPlugin/doc/TUI_fillFeature.rst b/src/FeaturesPlugin/doc/TUI_fillFeature.rst new file mode 100644 index 000000000..becb9ee28 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_fillFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_fill: + +Create Fill +=========== + +.. literalinclude:: examples/fill.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/FeaturesPlugin/doc/TUI_filletfixedFeature.rst b/src/FeaturesPlugin/doc/TUI_filletfixedFeature.rst new file mode 100644 index 000000000..e573efec2 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_filletfixedFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_fillet1: + +Create Fillet by fixed radius +============================= + +.. literalinclude:: examples/fillet1.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/FeaturesPlugin/doc/TUI_filletvariableFeature.rst b/src/FeaturesPlugin/doc/TUI_filletvariableFeature.rst new file mode 100644 index 000000000..ddcee3c82 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_filletvariableFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_fillet2: + +Create Fillet by variable radius +================================ + +.. literalinclude:: examples/fillet2.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/FeaturesPlugin/doc/TUI_fuseFeature.rst b/src/FeaturesPlugin/doc/TUI_fuseFeature.rst new file mode 100644 index 000000000..ffe84bf7a --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_fuseFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_fuse: + +Create Fuse +=========== + +.. literalinclude:: examples/fuse.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/FeaturesPlugin/doc/TUI_intersectionFeature.rst b/src/FeaturesPlugin/doc/TUI_intersectionFeature.rst new file mode 100644 index 000000000..8eb115b01 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_intersectionFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_intersection: + +Create Intersection +=================== + +.. literalinclude:: examples/intersection.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/FeaturesPlugin/doc/TUI_linearcopyFeature.rst b/src/FeaturesPlugin/doc/TUI_linearcopyFeature.rst new file mode 100644 index 000000000..8b52750e5 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_linearcopyFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_create_linearcopy: + +Create Linear copy +================== + +.. literalinclude:: examples/linearcopy.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/FeaturesPlugin/doc/TUI_partitionFeature.rst b/src/FeaturesPlugin/doc/TUI_partitionFeature.rst new file mode 100644 index 000000000..976354929 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_partitionFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_partition: + +Create Partition +================ + +.. literalinclude:: examples/partition.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/FeaturesPlugin/doc/TUI_pipebinormalFeature.rst b/src/FeaturesPlugin/doc/TUI_pipebinormalFeature.rst new file mode 100644 index 000000000..5b2f289a9 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_pipebinormalFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_binormal_pipe: + +Pipe by object, path and Bi-normal +================================== + +.. literalinclude:: examples/pipe_binormal.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_pipelocationsFeature.rst b/src/FeaturesPlugin/doc/TUI_pipelocationsFeature.rst new file mode 100644 index 000000000..611de087d --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_pipelocationsFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_locations_pipe: + +Pipe by object, path and locations +================================== + +.. literalinclude:: examples/pipe_locations.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_pipesimpleFeature.rst b/src/FeaturesPlugin/doc/TUI_pipesimpleFeature.rst new file mode 100644 index 000000000..b65adf293 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_pipesimpleFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_simple_pipe: + +Pipe by object and path +======================= + +.. literalinclude:: examples/pipe_simple.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_placementFeature.rst b/src/FeaturesPlugin/doc/TUI_placementFeature.rst new file mode 100644 index 000000000..4f46ec6dd --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_placementFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_placement: + +Create Placement +================ + +.. literalinclude:: examples/placement.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/FeaturesPlugin/doc/TUI_rotation3pointsFeature.rst b/src/FeaturesPlugin/doc/TUI_rotation3pointsFeature.rst new file mode 100644 index 000000000..b6af697ee --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_rotation3pointsFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_rotation_3points: + +Rotation by center and points +============================= + +.. literalinclude:: examples/rotation2.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_rotationaxisFeature.rst b/src/FeaturesPlugin/doc/TUI_rotationaxisFeature.rst new file mode 100644 index 000000000..de089c14d --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_rotationaxisFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_rotation_axis: + +Rotation by axis and angle +========================== + +.. literalinclude:: examples/rotation1.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_scaleXYZFeature.rst b/src/FeaturesPlugin/doc/TUI_scaleXYZFeature.rst new file mode 100644 index 000000000..9b9f360b7 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_scaleXYZFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_Scale_XYZ: + +Scale by different factors along axes +===================================== + +.. literalinclude:: examples/scaleXYZ.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_scalefactorFeature.rst b/src/FeaturesPlugin/doc/TUI_scalefactorFeature.rst new file mode 100644 index 000000000..af4e71d96 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_scalefactorFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_Scale_common_factor: + +Scale by one common factor +========================== + +.. literalinclude:: examples/scalefactor.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_smashFeature.rst b/src/FeaturesPlugin/doc/TUI_smashFeature.rst new file mode 100644 index 000000000..ae92c5881 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_smashFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_smash: + +Create Smash +============ + +.. literalinclude:: examples/smash.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/FeaturesPlugin/doc/TUI_symmetryaxisFeature.rst b/src/FeaturesPlugin/doc/TUI_symmetryaxisFeature.rst new file mode 100644 index 000000000..43096341b --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_symmetryaxisFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_symmetry_axis: + +Symmetry through an Axis of symmetry +==================================== + +.. literalinclude:: examples/symmetryaxis.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_symmetryplaneFeature.rst b/src/FeaturesPlugin/doc/TUI_symmetryplaneFeature.rst new file mode 100644 index 000000000..cfafee3c2 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_symmetryplaneFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_symmetry_plane: + +Symmetry through a Plane of symmetry +==================================== + +.. literalinclude:: examples/symmetryplane.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_symmetrypointFeature.rst b/src/FeaturesPlugin/doc/TUI_symmetrypointFeature.rst new file mode 100644 index 000000000..9a121640a --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_symmetrypointFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_symmetry_point: + +Symmetry through a Point of symmetry +==================================== + +.. literalinclude:: examples/symmetrypoint.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_translation2pointsFeature.rst b/src/FeaturesPlugin/doc/TUI_translation2pointsFeature.rst new file mode 100644 index 000000000..b26f8e762 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_translation2pointsFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_translation_2points: + +Translation by 2 points +======================= + +.. literalinclude:: examples/translation2points.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_translationdxdydzFeature.rst b/src/FeaturesPlugin/doc/TUI_translationdxdydzFeature.rst new file mode 100644 index 000000000..e3e273ce8 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_translationdxdydzFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_translation_DXDYDZ: + +Translation by vector +===================== + +.. literalinclude:: examples/translationDXDYDZ.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_translationvectorFeature.rst b/src/FeaturesPlugin/doc/TUI_translationvectorFeature.rst new file mode 100644 index 000000000..70278fa9f --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_translationvectorFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_translation_vector: + +Translation by axis and distance +================================ + +.. literalinclude:: examples/translationvector.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/FeaturesPlugin/doc/TUI_unionFeature.rst b/src/FeaturesPlugin/doc/TUI_unionFeature.rst new file mode 100644 index 000000000..bafb7c45f --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_unionFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_union: + +Create Union +============ + +.. literalinclude:: examples/union.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/FeaturesPlugin/doc/angularCopyFeature.rst b/src/FeaturesPlugin/doc/angularCopyFeature.rst index 3d3fec12c..c17e3acf2 100644 --- a/src/FeaturesPlugin/doc/angularCopyFeature.rst +++ b/src/FeaturesPlugin/doc/angularCopyFeature.rst @@ -2,9 +2,46 @@ Angular copy ============ +The feature **Angular copy** makes a compound of several rotated shapes basing on the initial shape. + +To create Angular copy in the active part: + +#. select in the Main Menu *Part - > Angular copy* item or +#. click **Angular copy** button in the toolbar + +.. image:: images/multirotation.png + :align: center + +.. centered:: + **Angular copy** button + +The following property panel appears. .. image:: images/AngularCopy.png :align: center .. centered:: - Angular copy definition + Angular copy property panel + +Input fields: + +- **Main objects** panel contains shapes to be rotated. Shapes are selected in 3D OCC viewer or object browser; +- **Vector of rotation** defines the axis of rotation. Vector is edge, axis selected in 3D OCC viewer or object browser; +- **Angular Step** check-box turns on/off definition of the angle by which the object is rotated. By default (if the checkbox is not checked), **Angular Step** = 2 * PI / NbTimes; +- **Nb. Copies** defines the number of rotated shape copies in the resulting compound. If **Nb. Copies** = 1, the result contains only the initial shape. + +**TUI Command**: *model.addMultiRotation(Part_doc, [shape], axis, step, Nb)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + axis in format *model.selection(TYPE, shape)*+ real (step value) + integer (Nb. Copies). + +Result +"""""" +Result of cylinder rotation is compound. + +.. image:: images/angularcopy.png + :align: center + +.. centered:: + Angular copy + +**See Also** a sample TUI Script of a :ref:`tui_create_angularcopy` operation. diff --git a/src/FeaturesPlugin/doc/commonFeature.rst b/src/FeaturesPlugin/doc/commonFeature.rst index ff245795b..7324955eb 100644 --- a/src/FeaturesPlugin/doc/commonFeature.rst +++ b/src/FeaturesPlugin/doc/commonFeature.rst @@ -2,9 +2,44 @@ Common ====== +The feature Common implements a boolean operation for extraction of a common part from a set of selected shapes. +To perform a boolean opration Common in the active part: + +#. select in the Main Menu *Features - > Common* item or +#. click **Common** button in the toolbar + +.. image:: images/common_btn.png + :align: center + +.. centered:: + **Common** button + +The following property panel will be opened: + .. image:: images/Common.png :align: center .. centered:: - Common definition + **Common operation** + +- **Main Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be common with tool objects. +- **Tool Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be common with main objects. +- **See preview** button shows a result of the operation. + +**TUI Command**: *model.addCommon(Part_doc, mainObjects, toolObjects)* + +**Arguments**: Part + list of main objects + list of tool objects. + +Result +"""""" + +The Result of the operation will be a shape which is a common for all selected shapes: + +.. image:: images/CreatedCommon.png + :align: center + +.. centered:: + **Common created** + +**See Also** a sample TUI Script of a :ref:`tui_create_common` operation. diff --git a/src/FeaturesPlugin/doc/cutFeature.rst b/src/FeaturesPlugin/doc/cutFeature.rst index e381c7c98..053bfa3a8 100644 --- a/src/FeaturesPlugin/doc/cutFeature.rst +++ b/src/FeaturesPlugin/doc/cutFeature.rst @@ -2,9 +2,44 @@ Cut === +The feature Cut implements a boolean operation to cut tool objects from a main objects. + +To perform a boolean opration Cut in the active part: + +#. select in the Main Menu *Features - > Cut* item or +#. click **Cut** button in the toolbar + +.. image:: images/bool_cut.png + :align: center + +.. centered:: + **Cut** button + +The following property panel will be opened: .. image:: images/Cut.png :align: center .. centered:: - Cut definition + **Cut operation** + +- **Main Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be cut by tool objects. +- **Tool Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be cut main objects. +- **See preview** button shows a result of the operation. + +**TUI Command**: *model.addCut(Part_doc, mainObjects, toolObjects)* + +**Arguments**: Part + list of main objects + list of tool objects. + +Result +"""""" + +The Result of the operation will be a shape which is a cut of tool objects from main objects: + +.. image:: images/CreatedCut.png + :align: center + +.. centered:: + **Cut created** + +**See Also** a sample TUI Script of a :ref:`tui_create_cut` operation. diff --git a/src/FeaturesPlugin/doc/examples/angularcopy.py b/src/FeaturesPlugin/doc/examples/angularcopy.py new file mode 100644 index 000000000..02483c19a --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/angularcopy.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) +AngularCopy_1 = model.addMultiRotation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OY"), 90, 3) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/common.py b/src/FeaturesPlugin/doc/examples/common.py new file mode 100644 index 000000000..a55432e04 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/common.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Cylinder_1 = model.addCylinder(Part_1_doc, + model.selection("VERTEX", "PartSet/Origin"), + model.selection("EDGE", "PartSet/OZ"), 5, 10) +Common_1 = model.addCommon(Part_1_doc, + [model.selection("SOLID", "Cylinder_1_1")], + [model.selection("SOLID", "Box_1_1")]) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/cut.py b/src/FeaturesPlugin/doc/examples/cut.py new file mode 100644 index 000000000..419345fb1 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/cut.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Cylinder_1 = model.addCylinder(Part_1_doc, + model.selection("VERTEX", "PartSet/Origin"), + model.selection("EDGE", "PartSet/OZ"), 5, 10) +Cut_1 = model.addCut(Part_1_doc, + [model.selection("SOLID", "Cylinder_1_1")], + [model.selection("SOLID", "Box_1_1")]) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/fill.py b/src/FeaturesPlugin/doc/examples/fill.py new file mode 100644 index 000000000..866345fa4 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/fill.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Cylinder_1 = model.addCylinder(Part_1_doc, + model.selection("VERTEX", "PartSet/Origin"), + model.selection("EDGE", "PartSet/OZ"), 5, 10) +Fill_1 = model.addFill(Part_1_doc, + [model.selection("SOLID", "Cylinder_1_1")], + [model.selection("SOLID", "Box_1_1")]) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/fillet1.py b/src/FeaturesPlugin/doc/examples/fillet1.py new file mode 100644 index 000000000..67299d876 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/fillet1.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Fillet_1 = model.addFillet(Part_1_doc, [model.selection("FACE", "Box_1_1/Front"), model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top")], 2) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/fillet2.py b/src/FeaturesPlugin/doc/examples/fillet2.py new file mode 100644 index 000000000..a72a7ec78 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/fillet2.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Fillet_1 = model.addFillet(Part_1_doc, [model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top")], 1, 3) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/fuse.py b/src/FeaturesPlugin/doc/examples/fuse.py new file mode 100644 index 000000000..5425569c7 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/fuse.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Cylinder_1 = model.addCylinder(Part_1_doc, + model.selection("VERTEX", "PartSet/Origin"), + model.selection("EDGE", "PartSet/OZ"), 5, 10) +Fuse_1 = model.addFuse(Part_1_doc, + [model.selection("SOLID", "Cylinder_1_1")], + [model.selection("SOLID", "Box_1_1")]) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/intersection.py b/src/FeaturesPlugin/doc/examples/intersection.py new file mode 100644 index 000000000..bdafc79cf --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/intersection.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Cylinder_1 = model.addCylinder(Part_1_doc, + model.selection("VERTEX", "PartSet/Origin"), + model.selection("EDGE", "PartSet/OZ"), 5, 10) +Intersection_1 = model.addIntersection(Part_1_doc, + [model.selection("SOLID", "Cylinder_1_1"), + model.selection("SOLID", "Box_1_1")]) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/linearcopy.py b/src/FeaturesPlugin/doc/examples/linearcopy.py new file mode 100644 index 000000000..5126b8892 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/linearcopy.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sphere_1 = model.addSphere(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), 10) +LinearCopy_1 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "Sphere_1_1")], model.selection("EDGE", "PartSet/OX"), 30, 3, model.selection("EDGE", "PartSet/OY"), 30, 2) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/partition.py b/src/FeaturesPlugin/doc/examples/partition.py new file mode 100644 index 000000000..0243dc08f --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/partition.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Cylinder_1 = model.addCylinder(Part_1_doc, + model.selection("VERTEX", "PartSet/Origin"), + model.selection("EDGE", "PartSet/OZ"), 5, 10) +Partition_1 = model.addPartition(Part_1_doc, + [model.selection("SOLID", "Cylinder_1_1"), model.selection("SOLID", "Box_1_1")]) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/pipe_binormal.py b/src/FeaturesPlugin/doc/examples/pipe_binormal.py new file mode 100644 index 000000000..68fc2bca4 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/pipe_binormal.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ")) +SketchLine_1 = Sketch_1.addLine(72.2418524871355, 29.96679215537161, -69.82505995666611, 29.96679215537161) +SketchLine_1.result().setColor(225, 0, 0) +SketchLine_2 = Sketch_1.addLine(-69.82505995666611, 29.96679215537161, -69.82505995666611, -40.02291624943114) +SketchLine_2.result().setColor(225, 0, 0) +SketchLine_3 = Sketch_1.addLine(-69.82505995666611, -40.02291624943114, 72.2418524871355, -40.02291624943114) +SketchLine_3.result().setColor(225, 0, 0) +SketchLine_4 = Sketch_1.addLine(72.2418524871355, -40.02291624943114, 72.2418524871355, 29.96679215537161) +SketchLine_4.result().setColor(225, 0, 0) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) +SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) +SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) +SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) +SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result()) +SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) +SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) +SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) +model.do() +Point_2 = model.addPoint(Part_1_doc, 0, 100, 40) +Point_3 = model.addPoint(Part_1_doc, 0, 260, 60) +Interpolation_1_objects = [model.selection("VERTEX", "PartSet/Origin"), model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2")] +Interpolation_1 = model.addInterpolation(Part_1_doc, Interpolation_1_objects, False, False) +Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f")]) +Pipe_1 = model.addPipe(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection("EDGE", "Interpolation_1_1"), model.selection("EDGE", "PartSet/OX")) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/pipe_locations.py b/src/FeaturesPlugin/doc/examples/pipe_locations.py new file mode 100644 index 000000000..a059ece20 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/pipe_locations.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/YOZ"), 100, False) +Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Plane_1"), 120, False) +Sketch_1 = model.addSketch(Part_1_doc, model.standardPlane("YOZ")) +SketchCircle_1 = Sketch_1.addCircle(-17.96171526586622, -340.274716981132, 71.31826129521251) +SketchCircle_1.result().setColor(225, 0, 0) +SketchCircle_1.results()[1].setColor(225, 0, 0) +model.do() +Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1")) +SketchCircle_2 = Sketch_2.addCircle(46.42844892447576, -229.9982953588847, 114.4484521366094) +SketchCircle_2.result().setColor(225, 0, 0) +SketchCircle_2.results()[1].setColor(225, 0, 0) +model.do() +Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_2")) +SketchCircle_3 = Sketch_3.addCircle(121.2811188302094, -19.85285601110755, 120.5601403551194) +SketchCircle_3.result().setColor(225, 0, 0) +SketchCircle_3.results()[1].setColor(225, 0, 0) +model.do() +Interpolation_1_objects = [model.selection("VERTEX", "Sketch_1/Vertex-SketchCircle_1"), model.selection("VERTEX", "Sketch_2/Vertex-SketchCircle_2"), model.selection("VERTEX", "Sketch_3/Vertex-SketchCircle_3")] +Interpolation_1 = model.addInterpolation(Part_1_doc, Interpolation_1_objects, False, False) +Edge_1_objects = [model.selection("EDGE", "Sketch_1/Edge-SketchCircle_1_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_2_2"), model.selection("EDGE", "Sketch_3/Edge-SketchCircle_3_2")] +Edge_1 = model.addEdge(Part_1_doc, Edge_1_objects) +Pipe_1_objects_1 = [model.selection("EDGE", "Edge_1_1"), model.selection("EDGE", "Edge_1_2"), model.selection("EDGE", "Edge_1_3")] +Pipe_1 = model.addPipe(Part_1_doc, Pipe_1_objects_1, model.selection("EDGE", "Interpolation_1_1"), []) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/pipe_simple.py b/src/FeaturesPlugin/doc/examples/pipe_simple.py new file mode 100644 index 000000000..5deb47e2c --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/pipe_simple.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- + +from SketchAPI import * + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("YOZ")) +SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False) +SketchPoint_1 = SketchProjection_1.createdFeature() +SketchPoint_1.result().setColor(170, 0, 225) +SketchCircle_1 = Sketch_1.addCircle(0, 0, 40) +SketchCircle_1.result().setColor(225, 0, 0) +SketchCircle_1.results()[1].setColor(225, 0, 0) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.result(), SketchCircle_1.center()) +SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_1.results()[1], 40) +model.do() +Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchCircle_1_2")]) +Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOZ")) +SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "PartSet/OX"), False) +SketchLine_1 = SketchProjection_2.createdFeature() +SketchLine_1.result().setColor(170, 0, 225) +SketchArc_1 = Sketch_2.addArc(30, 0, 0, 0, 40.50885209855912, 28.09918197333542, True) +SketchArc_1.result().setColor(225, 0, 0) +SketchArc_1.results()[1].setColor(225, 0, 0) +SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchLine_1.result(), SketchArc_1.center()) +SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchAPI_Line(SketchLine_1).startPoint(), SketchArc_1.startPoint()) +SketchConstraintRadius_2 = Sketch_2.setRadius(SketchArc_1.results()[1], 30) +model.do() +Pipe_1 = model.addPipe(Part_1_doc, [model.selection("EDGE", "Edge_1_1")], model.selection("EDGE", "Sketch_2/Edge-SketchArc_1_2")) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/placement.py b/src/FeaturesPlugin/doc/examples/placement.py new file mode 100644 index 000000000..d74ab4d23 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/placement.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Sketch_1 = model.addSketch(Part_1_doc, model.selection("FACE", "Box_1_1/Front")) +SketchCircle_1 = Sketch_1.addCircle(20, 6, 3) +model.do() +Extrusion_1 = model.addExtrusion(Part_1_doc, + [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f")], + model.selection(), -10, 0) +Placement_1 = model.addPlacement(Part_1_doc, + [model.selection("SOLID", "Extrusion_1_1")], + model.selection("FACE", "Extrusion_1_1/From_Face_1"), + model.selection("FACE", "Box_1_1/Front"), False, True) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/rotation1.py b/src/FeaturesPlugin/doc/examples/rotation1.py new file mode 100644 index 000000000..a82d443bb --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/rotation1.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10) +Rotation_1 = model.addRotation(Part_1_doc, [model.selection("COMPOUND", "all-in-Cone_1")], model.selection("EDGE", "PartSet/OX"), 120) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/rotation2.py b/src/FeaturesPlugin/doc/examples/rotation2.py new file mode 100644 index 000000000..489541f93 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/rotation2.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10) +Rotation_1 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Cone_1_1")], model.selection("VERTEX", "PartSet/Origin"), model.selection("VERTEX", "Cone_1_1/Face_1&Cone_1_1/Face_3"), model.selection("VERTEX", "Cone_1_1/Face_1&Cone_1_1/Face_2")) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/scaleXYZ.py b/src/FeaturesPlugin/doc/examples/scaleXYZ.py new file mode 100644 index 000000000..0a1a6fec7 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/scaleXYZ.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sphere_1 = model.addSphere(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), 10) +Scale_1 = model.addScale(Part_1_doc, [model.selection("SOLID", "Sphere_1_1")] , model.selection("VERTEX", "PartSet/Origin"), 2 , 3, 4) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/scalefactor.py b/src/FeaturesPlugin/doc/examples/scalefactor.py new file mode 100644 index 000000000..9794ad4ce --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/scalefactor.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) +Scale_1 = model.addScale(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")] , model.selection("VERTEX", "PartSet/Origin"), 2) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/smash.py b/src/FeaturesPlugin/doc/examples/smash.py new file mode 100644 index 000000000..010656759 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/smash.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Cylinder_1 = model.addCylinder(Part_1_doc, + model.selection("VERTEX", "PartSet/Origin"), + model.selection("EDGE", "PartSet/OZ"), 5, 10) +Smash_1 = model.addSmash(Part_1_doc, + [model.selection("SOLID", "Cylinder_1_1")], + [model.selection("SOLID", "Box_1_1")]) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/symmetryaxis.py b/src/FeaturesPlugin/doc/examples/symmetryaxis.py new file mode 100644 index 000000000..3ceb146fe --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/symmetryaxis.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) +Symmetry_1 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "Cylinder_1_1/Face_1"), False) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/symmetryplane.py b/src/FeaturesPlugin/doc/examples/symmetryplane.py new file mode 100644 index 000000000..549c89bfc --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/symmetryplane.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) +Symmetry_1 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("FACE", "Cylinder_1_1/Face_2"), True) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/symmetrypoint.py b/src/FeaturesPlugin/doc/examples/symmetrypoint.py new file mode 100644 index 000000000..e71d7c68e --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/symmetrypoint.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) +Symmetry_1 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("VERTEX", "PartSet/Origin"), True) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/translation2points.py b/src/FeaturesPlugin/doc/examples/translation2points.py new file mode 100644 index 000000000..d06a7ecad --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/translation2points.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10) +Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cone_1_1")], model.selection("VERTEX", "PartSet/Origin"), model.selection("VERTEX", "Cone_1_1/Face_1&Cone_1_1/Face_2")) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/translationDXDYDZ.py b/src/FeaturesPlugin/doc/examples/translationDXDYDZ.py new file mode 100644 index 000000000..d06cf3bcf --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/translationDXDYDZ.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10) +Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cone_1_1")], 10, 20, 50) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/translationvector.py b/src/FeaturesPlugin/doc/examples/translationvector.py new file mode 100644 index 000000000..5ebee45fa --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/translationvector.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10) +Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cone_1_1")], model.selection("EDGE", "Cone_1_1/Face_1"), 40) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/union.py b/src/FeaturesPlugin/doc/examples/union.py new file mode 100644 index 000000000..f5ce125b4 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/union.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_1 = Sketch_1.addLine(71, -15, -32, -15) +SketchLine_2 = Sketch_1.addLine(-32, -15, -32, -56) +SketchLine_3 = Sketch_1.addLine(-32, -56, 71, -56) +SketchLine_4 = Sketch_1.addLine(71, -56, 71, -15) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) +SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) +SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) +SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) +SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result()) +SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) +SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) +SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) +SketchLine_5 = Sketch_1.addLine(3, -15, 36, -56) +SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_5.startPoint(), SketchLine_1.result()) +SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_3.result()) +model.do() +Extrusion_1 = model.addExtrusion(Part_1_doc, + [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_5r"), + model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_3f-SketchLine_4f-SketchLine_5f")], + model.selection(), 10, 0) +Union_1 = model.addUnion(Part_1_doc, + [model.selection("SOLID", "Extrusion_1_1_1"), + model.selection("SOLID", "Extrusion_1_1_2")]) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/fillFeature.rst b/src/FeaturesPlugin/doc/fillFeature.rst index 6e265d85d..40d16ad6d 100644 --- a/src/FeaturesPlugin/doc/fillFeature.rst +++ b/src/FeaturesPlugin/doc/fillFeature.rst @@ -2,9 +2,44 @@ Fill ==== +The feature Fill implements a boolean operation for filling of main objects by parts of tool objects. + +To perform a boolean opration Fill in the active part: + +#. select in the Main Menu *Features - > Fill* item or +#. click **Fill** button in the toolbar + +.. image:: images/bool_fill.png + :align: center + +.. centered:: + **Fill** button + +The following property panel will be opened: .. image:: images/Fill.png :align: center .. centered:: - Fill definition + **Fill operation** + +- **Main Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be cut and filled by tool objects. +- **Tool Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will cut and filled the main objects. +- **See preview** button shows a result of the operation. + +**TUI Command**: *model.addFill(Part_doc, mainObjects, toolObjects)* + +**Arguments**: Part + list of main objects + list of tool objects. + +Result +"""""" + +The Result of the operation will be a shape which is a fill of tool objects with main objects: + +.. image:: images/CreatedFill.png + :align: center + +.. centered:: + **Fill created** + +**See Also** a sample TUI Script of a :ref:`tui_create_fill` operation. diff --git a/src/FeaturesPlugin/doc/filletFeature.rst b/src/FeaturesPlugin/doc/filletFeature.rst index 08343f728..d30e8da2e 100644 --- a/src/FeaturesPlugin/doc/filletFeature.rst +++ b/src/FeaturesPlugin/doc/filletFeature.rst @@ -2,16 +2,92 @@ Fillet ====== +The feature **Fillet** creates fillets on the edges of a shape. -.. image:: images/Fillet.png +To create Fillet in the active part: + +#. select in the Main Menu *Feature - > Fillet* item or +#. click **Fillet** button in the toolbar + +.. image:: images/fillet.png + :align: center + +.. centered:: + **Fillet** button + +There are 2 types of fillet: + + .. image:: images/fillet_fixed_radius.png + :align: left + fillet by fixed radius + + .. image:: images/fillet_var_radius.png + :align: left + fillet by variable radius + +Fillet by fixed radius +---------------------- + +The property panel is shown below. + +.. image:: images/FilletFixed.png :align: center .. centered:: - Fillet by fixed radius + Fillet by fixed radius property panel + +Input fields: + +- **Faces or/and edges** panel contains faces and edges on which fillet is done. All edges of face are subjected to fillet operation. Faces and edges are selected in 3D OCC viewer; +- **Radius** defines fillet radius. + +**TUI Command**: *model.addFillet(Part_doc, [face,edge], radius)* + +**Arguments**: 1 part + list of faces and edges subjected to fillet operation in format *model.selection(TYPE, shape)* + real (radius value). + +Result +"""""" + +Result of **Fillet by fixed radius** is shown below. +.. image:: images/fillet_fix_rad.png + :align: center -.. image:: images/Fillet2.png +.. centered:: + Fillet by fixed radius + +**See Also** a sample TUI Script of a :ref:`tui_create_fillet1` operation. + +Fillet by variable radius +------------------------- + +Alternatively, there is a possibility to create a fillet with a variable radius. + +.. image:: images/FilletVarious.png :align: center .. centered:: - Fillet by varyable radius + Fillet by variable radius + +Input fields: + +- **Faces or/and edges** panel contains faces and edges on which fillet is done. All edges of face are subjected to fillet operation. Faces and edges are selected in 3D OCC viewer; +- **Start radius** defines the fillet radius at the start of the selected edge(s); +- **End radius** defines the fillet radius at the end of the selected edge(s). + +**TUI Command**: *model.addFillet(Part_doc, [face,edge], R1, R2)* + +**Arguments**: part + list of faces and edges subjected to fillet operation in format *model.selection(TYPE, shape)* + 2 reals (start and end radius values). + +Result +"""""" + +Result of **Fillet by variable radius** is shown below. + +.. image:: images/fillet_var_rad.png + :align: center + +.. centered:: + Fillet by variable radius + +**See Also** a sample TUI Script of a :ref:`tui_create_fillet2` operation. diff --git a/src/FeaturesPlugin/doc/fuseFeature.rst b/src/FeaturesPlugin/doc/fuseFeature.rst index 9944cfcc4..c04c1ea8a 100644 --- a/src/FeaturesPlugin/doc/fuseFeature.rst +++ b/src/FeaturesPlugin/doc/fuseFeature.rst @@ -2,9 +2,44 @@ Fuse ==== +The feature Fuse implements a boolean operation for fision of a set of main objects with a set of tool objects. + +To perform a boolean opration Fuse in the active part: + +#. select in the Main Menu *Features - > Fuse* item or +#. click **Fuse** button in the toolbar + +.. image:: images/bool_fuse.png + :align: center + +.. centered:: + **Fuse** button + +The following property panel will be opened: .. image:: images/Fuse.png :align: center .. centered:: - Fuse definition + **Fuse operation** + +- **Main Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be fused with tool objects. +- **Tool Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will fused with main objects. +- **See preview** button shows a result of the operation. + +**TUI Command**: *model.addFuse(Part_doc, mainObjects, toolObjects)* + +**Arguments**: Part + list of main objects + list of tool objects. + +Result +"""""" + +The Result of the operation will be a shape which is a fuse of tool objects with main objects: + +.. image:: images/CreatedFuse.png + :align: center + +.. centered:: + **Fuse created** + +**See Also** a sample TUI Script of a :ref:`tui_create_fuse` operation. diff --git a/src/FeaturesPlugin/doc/images/Common.png b/src/FeaturesPlugin/doc/images/Common.png index a6abdef22..0aaf5351e 100644 Binary files a/src/FeaturesPlugin/doc/images/Common.png and b/src/FeaturesPlugin/doc/images/Common.png differ diff --git a/src/FeaturesPlugin/doc/images/CreatedCommon.png b/src/FeaturesPlugin/doc/images/CreatedCommon.png new file mode 100644 index 000000000..ea27ef656 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/CreatedCommon.png differ diff --git a/src/FeaturesPlugin/doc/images/CreatedCut.png b/src/FeaturesPlugin/doc/images/CreatedCut.png new file mode 100644 index 000000000..0c927fdd9 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/CreatedCut.png differ diff --git a/src/FeaturesPlugin/doc/images/CreatedFill.png b/src/FeaturesPlugin/doc/images/CreatedFill.png new file mode 100644 index 000000000..68b7ac2de Binary files /dev/null and b/src/FeaturesPlugin/doc/images/CreatedFill.png differ diff --git a/src/FeaturesPlugin/doc/images/CreatedFuse.png b/src/FeaturesPlugin/doc/images/CreatedFuse.png new file mode 100644 index 000000000..65c69dde2 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/CreatedFuse.png differ diff --git a/src/FeaturesPlugin/doc/images/CreatedIntersection.png b/src/FeaturesPlugin/doc/images/CreatedIntersection.png new file mode 100644 index 000000000..3ca9179d1 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/CreatedIntersection.png differ diff --git a/src/FeaturesPlugin/doc/images/CreatedPartition.png b/src/FeaturesPlugin/doc/images/CreatedPartition.png new file mode 100644 index 000000000..f1b197934 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/CreatedPartition.png differ diff --git a/src/FeaturesPlugin/doc/images/CreatedPlacement.png b/src/FeaturesPlugin/doc/images/CreatedPlacement.png new file mode 100644 index 000000000..81e2301ee Binary files /dev/null and b/src/FeaturesPlugin/doc/images/CreatedPlacement.png differ diff --git a/src/FeaturesPlugin/doc/images/CreatedSmash.png b/src/FeaturesPlugin/doc/images/CreatedSmash.png new file mode 100644 index 000000000..2e4d296e5 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/CreatedSmash.png differ diff --git a/src/FeaturesPlugin/doc/images/CreatedUnion.png b/src/FeaturesPlugin/doc/images/CreatedUnion.png new file mode 100644 index 000000000..2df9dba24 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/CreatedUnion.png differ diff --git a/src/FeaturesPlugin/doc/images/Cut.png b/src/FeaturesPlugin/doc/images/Cut.png index 7f0f886d4..d971a74b2 100644 Binary files a/src/FeaturesPlugin/doc/images/Cut.png and b/src/FeaturesPlugin/doc/images/Cut.png differ diff --git a/src/FeaturesPlugin/doc/images/Fill.png b/src/FeaturesPlugin/doc/images/Fill.png index 377be10ab..c5e11d29e 100644 Binary files a/src/FeaturesPlugin/doc/images/Fill.png and b/src/FeaturesPlugin/doc/images/Fill.png differ diff --git a/src/FeaturesPlugin/doc/images/Fillet.png b/src/FeaturesPlugin/doc/images/Fillet.png index 7f804075f..3b5a98289 100644 Binary files a/src/FeaturesPlugin/doc/images/Fillet.png and b/src/FeaturesPlugin/doc/images/Fillet.png differ diff --git a/src/FeaturesPlugin/doc/images/Fillet2.png b/src/FeaturesPlugin/doc/images/Fillet2.png deleted file mode 100644 index bc9708ec9..000000000 Binary files a/src/FeaturesPlugin/doc/images/Fillet2.png and /dev/null differ diff --git a/src/FeaturesPlugin/doc/images/FilletFixed.png b/src/FeaturesPlugin/doc/images/FilletFixed.png new file mode 100644 index 000000000..7f804075f Binary files /dev/null and b/src/FeaturesPlugin/doc/images/FilletFixed.png differ diff --git a/src/FeaturesPlugin/doc/images/FilletVarious.png b/src/FeaturesPlugin/doc/images/FilletVarious.png new file mode 100644 index 000000000..bc9708ec9 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/FilletVarious.png differ diff --git a/src/FeaturesPlugin/doc/images/Fuse.png b/src/FeaturesPlugin/doc/images/Fuse.png index f1495f2bf..bf281ea0b 100644 Binary files a/src/FeaturesPlugin/doc/images/Fuse.png and b/src/FeaturesPlugin/doc/images/Fuse.png differ diff --git a/src/FeaturesPlugin/doc/images/Intersection.png b/src/FeaturesPlugin/doc/images/Intersection.png index 6bc0a43db..a1fc6f3aa 100644 Binary files a/src/FeaturesPlugin/doc/images/Intersection.png and b/src/FeaturesPlugin/doc/images/Intersection.png differ diff --git a/src/FeaturesPlugin/doc/images/Partition.png b/src/FeaturesPlugin/doc/images/Partition.png index 6e131f973..101001e39 100644 Binary files a/src/FeaturesPlugin/doc/images/Partition.png and b/src/FeaturesPlugin/doc/images/Partition.png differ diff --git a/src/FeaturesPlugin/doc/images/Placement.png b/src/FeaturesPlugin/doc/images/Placement.png index 4d5beb7c7..b937e6d74 100644 Binary files a/src/FeaturesPlugin/doc/images/Placement.png and b/src/FeaturesPlugin/doc/images/Placement.png differ diff --git a/src/FeaturesPlugin/doc/images/Smash.png b/src/FeaturesPlugin/doc/images/Smash.png index 8ec0ae611..c3f27f19b 100644 Binary files a/src/FeaturesPlugin/doc/images/Smash.png and b/src/FeaturesPlugin/doc/images/Smash.png differ diff --git a/src/FeaturesPlugin/doc/images/Symmetry.png b/src/FeaturesPlugin/doc/images/Symmetry.png index a369a0f81..fdc73b21c 100644 Binary files a/src/FeaturesPlugin/doc/images/Symmetry.png and b/src/FeaturesPlugin/doc/images/Symmetry.png differ diff --git a/src/FeaturesPlugin/doc/images/Union.png b/src/FeaturesPlugin/doc/images/Union.png index b45f8fd50..50b90188b 100644 Binary files a/src/FeaturesPlugin/doc/images/Union.png and b/src/FeaturesPlugin/doc/images/Union.png differ diff --git a/src/FeaturesPlugin/doc/images/bool_cut.png b/src/FeaturesPlugin/doc/images/bool_cut.png new file mode 100644 index 000000000..8f52d3aac Binary files /dev/null and b/src/FeaturesPlugin/doc/images/bool_cut.png differ diff --git a/src/FeaturesPlugin/doc/images/bool_fill.png b/src/FeaturesPlugin/doc/images/bool_fill.png new file mode 100644 index 000000000..5e03aa25e Binary files /dev/null and b/src/FeaturesPlugin/doc/images/bool_fill.png differ diff --git a/src/FeaturesPlugin/doc/images/bool_fuse.png b/src/FeaturesPlugin/doc/images/bool_fuse.png new file mode 100644 index 000000000..b005af12d Binary files /dev/null and b/src/FeaturesPlugin/doc/images/bool_fuse.png differ diff --git a/src/FeaturesPlugin/doc/images/bool_smash.png b/src/FeaturesPlugin/doc/images/bool_smash.png new file mode 100644 index 000000000..6a12a0a76 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/bool_smash.png differ diff --git a/src/FeaturesPlugin/doc/images/common_btn.png b/src/FeaturesPlugin/doc/images/common_btn.png new file mode 100644 index 000000000..c8f86a1a3 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/common_btn.png differ diff --git a/src/FeaturesPlugin/doc/images/fillet.png b/src/FeaturesPlugin/doc/images/fillet.png new file mode 100644 index 000000000..3b5a98289 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/fillet.png differ diff --git a/src/FeaturesPlugin/doc/images/fillet_fixed_radius.png b/src/FeaturesPlugin/doc/images/fillet_fixed_radius.png new file mode 100644 index 000000000..0897bdeb8 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/fillet_fixed_radius.png differ diff --git a/src/FeaturesPlugin/doc/images/fillet_var_radius.png b/src/FeaturesPlugin/doc/images/fillet_var_radius.png new file mode 100644 index 000000000..56e4a78f3 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/fillet_var_radius.png differ diff --git a/src/FeaturesPlugin/doc/images/intersection_btn.png b/src/FeaturesPlugin/doc/images/intersection_btn.png new file mode 100644 index 000000000..bba96f48c Binary files /dev/null and b/src/FeaturesPlugin/doc/images/intersection_btn.png differ diff --git a/src/FeaturesPlugin/doc/images/meas_angle3p_32x32.png b/src/FeaturesPlugin/doc/images/meas_angle3p_32x32.png new file mode 100644 index 000000000..bc40b7a93 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/meas_angle3p_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/meas_angle_32x32.png b/src/FeaturesPlugin/doc/images/meas_angle_32x32.png new file mode 100644 index 000000000..800536f41 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/meas_angle_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/meas_distance_32x32.png b/src/FeaturesPlugin/doc/images/meas_distance_32x32.png new file mode 100644 index 000000000..d9a6d5b4a Binary files /dev/null and b/src/FeaturesPlugin/doc/images/meas_distance_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/meas_length_32x32.png b/src/FeaturesPlugin/doc/images/meas_length_32x32.png new file mode 100644 index 000000000..37ebd09f4 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/meas_length_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/meas_radius_32x32.png b/src/FeaturesPlugin/doc/images/meas_radius_32x32.png new file mode 100644 index 000000000..a3c70fca4 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/meas_radius_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/measurement.png b/src/FeaturesPlugin/doc/images/measurement.png new file mode 100644 index 000000000..c93fa62b2 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/measurement.png differ diff --git a/src/FeaturesPlugin/doc/images/multirotation.png b/src/FeaturesPlugin/doc/images/multirotation.png new file mode 100644 index 000000000..fb82a1e7c Binary files /dev/null and b/src/FeaturesPlugin/doc/images/multirotation.png differ diff --git a/src/FeaturesPlugin/doc/images/multitranslation.png b/src/FeaturesPlugin/doc/images/multitranslation.png new file mode 100644 index 000000000..d0d9c157b Binary files /dev/null and b/src/FeaturesPlugin/doc/images/multitranslation.png differ diff --git a/src/FeaturesPlugin/doc/images/partition_btn.png b/src/FeaturesPlugin/doc/images/partition_btn.png new file mode 100755 index 000000000..eb34d43e6 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/partition_btn.png differ diff --git a/src/FeaturesPlugin/doc/images/pipe.png b/src/FeaturesPlugin/doc/images/pipe.png new file mode 100644 index 000000000..3ce55e8f6 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/pipe.png differ diff --git a/src/FeaturesPlugin/doc/images/pipe_binormal_32x32.png b/src/FeaturesPlugin/doc/images/pipe_binormal_32x32.png new file mode 100644 index 000000000..560183f15 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/pipe_binormal_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/pipe_locations_32x32.png b/src/FeaturesPlugin/doc/images/pipe_locations_32x32.png new file mode 100644 index 000000000..35e409309 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/pipe_locations_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/pipe_simple_32x32.png b/src/FeaturesPlugin/doc/images/pipe_simple_32x32.png new file mode 100644 index 000000000..b746e6c74 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/pipe_simple_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/placement_btn.png b/src/FeaturesPlugin/doc/images/placement_btn.png new file mode 100644 index 000000000..c100a3153 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/placement_btn.png differ diff --git a/src/FeaturesPlugin/doc/images/rotation.png b/src/FeaturesPlugin/doc/images/rotation.png new file mode 100644 index 000000000..cfc31b4ab Binary files /dev/null and b/src/FeaturesPlugin/doc/images/rotation.png differ diff --git a/src/FeaturesPlugin/doc/images/rotation_3pt_32x32.png b/src/FeaturesPlugin/doc/images/rotation_3pt_32x32.png new file mode 100644 index 000000000..e2493da05 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/rotation_3pt_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/rotation_axis_32x32.png b/src/FeaturesPlugin/doc/images/rotation_axis_32x32.png new file mode 100644 index 000000000..cf443b372 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/rotation_axis_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/scale.png b/src/FeaturesPlugin/doc/images/scale.png new file mode 100644 index 000000000..156659c3f Binary files /dev/null and b/src/FeaturesPlugin/doc/images/scale.png differ diff --git a/src/FeaturesPlugin/doc/images/scale_dimensions_32x32.png b/src/FeaturesPlugin/doc/images/scale_dimensions_32x32.png new file mode 100644 index 000000000..b5204f9e8 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/scale_dimensions_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/scale_factor_32x32.png b/src/FeaturesPlugin/doc/images/scale_factor_32x32.png new file mode 100644 index 000000000..b82b643c4 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/scale_factor_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/symmetry.png b/src/FeaturesPlugin/doc/images/symmetry.png new file mode 100644 index 000000000..fdc73b21c Binary files /dev/null and b/src/FeaturesPlugin/doc/images/symmetry.png differ diff --git a/src/FeaturesPlugin/doc/images/symmetry_axis_32x32.png b/src/FeaturesPlugin/doc/images/symmetry_axis_32x32.png new file mode 100644 index 000000000..3873378cf Binary files /dev/null and b/src/FeaturesPlugin/doc/images/symmetry_axis_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/symmetry_plane_32x32.png b/src/FeaturesPlugin/doc/images/symmetry_plane_32x32.png new file mode 100644 index 000000000..ddecb8256 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/symmetry_plane_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/symmetry_point_32x32.png b/src/FeaturesPlugin/doc/images/symmetry_point_32x32.png new file mode 100644 index 000000000..2cda2255a Binary files /dev/null and b/src/FeaturesPlugin/doc/images/symmetry_point_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/translation_2pt_32x32.png b/src/FeaturesPlugin/doc/images/translation_2pt_32x32.png new file mode 100644 index 000000000..5e6860737 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/translation_2pt_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/translation_dxyz_32x32.png b/src/FeaturesPlugin/doc/images/translation_dxyz_32x32.png new file mode 100644 index 000000000..a11f680d6 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/translation_dxyz_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/translation_vector_32x32.png b/src/FeaturesPlugin/doc/images/translation_vector_32x32.png new file mode 100644 index 000000000..2c1a4b2b7 Binary files /dev/null and b/src/FeaturesPlugin/doc/images/translation_vector_32x32.png differ diff --git a/src/FeaturesPlugin/doc/images/union_btn.png b/src/FeaturesPlugin/doc/images/union_btn.png new file mode 100644 index 000000000..268512c9b Binary files /dev/null and b/src/FeaturesPlugin/doc/images/union_btn.png differ diff --git a/src/FeaturesPlugin/doc/intersectionFeature.rst b/src/FeaturesPlugin/doc/intersectionFeature.rst index 21e2be6f0..1b93530f3 100644 --- a/src/FeaturesPlugin/doc/intersectionFeature.rst +++ b/src/FeaturesPlugin/doc/intersectionFeature.rst @@ -2,9 +2,42 @@ Intersection ============ +The feature Intersection implements a boolean operation for intersection of a set of main objects with a set of tool objects. + +To perform a boolean opration Intersection in the active part: + +#. select in the Main Menu *Features - > Intersection* item or +#. click **Intersection** button in the toolbar + +.. image:: images/intersection_btn.png + :align: center + +.. centered:: + **Intersection** button + +The following property panel will be opened: .. image:: images/Intersection.png :align: center .. centered:: - Intersection definition + **Intersection operation** + +**Base Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be intersected. + +**TUI Command**: *model.addIntersection(Part_doc, Objects)* + +**Arguments**: Part + list of objects. + +Result +"""""" + +The Result of the operation will be a shape which is an intersection of selected objects: + +.. image:: images/CreatedIntersection.png + :align: center + +.. centered:: + **Intersection created** + +**See Also** a sample TUI Script of a :ref:`tui_create_intersection` operation. diff --git a/src/FeaturesPlugin/doc/linearCopyFeature.rst b/src/FeaturesPlugin/doc/linearCopyFeature.rst index 38509c3b9..1ff76b982 100644 --- a/src/FeaturesPlugin/doc/linearCopyFeature.rst +++ b/src/FeaturesPlugin/doc/linearCopyFeature.rst @@ -2,9 +2,54 @@ Linear copy =========== +The feature **Linear copy** makes several translations of a selected shape in one or two directions. + +To create Linear copy in the active part: + +#. select in the Main Menu *Part - > Linear copy* item or +#. click **Linear copy** button in the toolbar + +.. image:: images/multitranslation.png + :align: center + +.. centered:: + **Linear copy** button + +The following property panel appears. .. image:: images/LinearCopy.png :align: center .. centered:: - Linear copy + Linear copy property panel + +Input fields: + +- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser; +- **First direction** defines translation in the first direction: + + - **Vector of translation** defines vector along which the object will be translated. Vector is edge, axis selected in 3D OCC viewer or object browser; + - **Step** defines the distance between the shape copies; + - **Nb. Copies** is the number of shape copies; + +- **Second direction** check-box turns on/off translation in the second direction: + + - **Vector of translation** defines vector along which the object will be translated. Vector is edge, axis selected in 3D OCC viewer or object browser; + - **Step** defines the distance between the shape copies; + - **Nb. Copies** defines the number of shape copies. + +**TUI Command**: *model.addMultiTranslation(Part_doc, [shape], axis1, step1, Nb1, axis2, step2, Nb2)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + 2 axis in format *model.selection(TYPE, shape)*+ 2 real (step values) + 2 integers (Nb. Copies). + +Result +"""""" +Result of operation is compound. + +.. image:: images/linearcopy.png + :align: center + +.. centered:: + Linear copy + +**See Also** a sample TUI Script of a :ref:`tui_create_linearcopy` operation. \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/measurementFeature.rst b/src/FeaturesPlugin/doc/measurementFeature.rst index 9f999a097..7fc7b9667 100644 --- a/src/FeaturesPlugin/doc/measurementFeature.rst +++ b/src/FeaturesPlugin/doc/measurementFeature.rst @@ -2,6 +2,51 @@ Measurement =========== +The feature **Measurement** calculates dimensions of sub-elements of a geometrical object (shape). + +The measured dimension is displayed in the property panel and shown in 3D OCC viewer. + +The properties of dimension text and line, such as font, color, arrow size, etc. can be defined in the Preferences :ref:`visualization_preferences`. + +**Apply** button does not generate any result and has the same effect as **Cancel** for this feature. + +To start Measurement in the active part: + +#. select in the Main Menu *Part - > Measurement* item or +#. click **Measurement** button in the toolbar + +.. image:: images/measurement.png + :align: center + +.. centered:: + **Measurement** button + +The following dimensions can be calculated: + + .. image:: images/meas_length_32x32.png + :align: left + edge length + + .. image:: images/meas_distance_32x32.png + :align: left + distance between objects + + .. image:: images/meas_radius_32x32.png + :align: left + radius + + .. image:: images/meas_angle_32x32.png + :align: left + angle between edges + + .. image:: images/meas_angle3p_32x32.png + :align: left + angle by 3 points + +Edge length +----------- + +The length can be measured for straight or curved edge built on two points. .. image:: images/Measurement1.png :align: center @@ -9,15 +54,40 @@ Measurement .. centered:: Edge length +Input fields: + +- **Edge** contains edge to be measured selected in 3D OCC viewer or object browser. +Note, that for curved edges length is displayed only in the property panel. -.. image:: images/Measurement2.png +**TUI Command**: *length =model.measureLength(Part_doc, edge)* + +**Arguments**: part + edge in format *model.selection("EDGE", edge)*. + + +Distance between objects +------------------------ + +**Distance between objects** calculates minimal distance for any pair of shapes: vertex, edge, face, solid. + + .. image:: images/Measurement2.png :align: center .. centered:: Distance between objects +Input fields: + +- **From**, **To** contain shapes between which distance is measured. Shapes are selected in 3D OCC viewer or object browser. +**TUI Command**: *length =model.measureDistance(Part_doc, shape1, shape2)* + +**Arguments**: part + 2 shapes in format *model.selection("TYPE", shape)*. + +Radius +------ + +**Radius** calculates radius for circular edge or cylindrical face. .. image:: images/Measurement3.png :align: center @@ -25,7 +95,19 @@ Measurement .. centered:: Radius +Input fields: + +- **Object** contains shape to be measured selected in 3D OCC viewer or object browser. + +**TUI Command**: *radius = model.measureRadius(Part_doc, shape)* + +**Arguments**: part + shape in format *model.selection("TYPE", shape)*. + +Angle between edges +------------------- + +**Angle between edges** calculates angle between the selected pair of edges in the point of intersection. If there are several points of intersection, then angles are calculated in all points. .. image:: images/Measurement4.png :align: center @@ -33,10 +115,30 @@ Measurement .. centered:: Angle between edges +Input fields: + +- **First Edge**, **Second edge** contain edges between which angle is measured. Edges are selected in 3D OCC viewer or object browser. + +**TUI Command**: *angle = model.measureAngle(Part_doc, edge1, edge2)* + +**Arguments**: part + 2 edges in format *model.selection("EDGE", edge)*. +Angle by 3 points +----------------- + +**Angle by 3 points** calculates angle between the selected three points. The second point is in the corner of the angle. .. image:: images/Measurement5.png :align: center .. centered:: Angle by 3 points + +Input fields: + +- **First point**, **Second point**, **Third point** contain point between which angle is measured. Points are selected in 3D OCC viewer or object browser. + +**TUI Command**: *angle = model.measureAngle(Part_doc, vertex1, vertex2, vertex3)* + +**Arguments**: part + 3 vertices in format *model.selection("VERTEX", vertex)*. + \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/partitionFeature.rst b/src/FeaturesPlugin/doc/partitionFeature.rst index 4b2ac1068..2d64521b2 100644 --- a/src/FeaturesPlugin/doc/partitionFeature.rst +++ b/src/FeaturesPlugin/doc/partitionFeature.rst @@ -2,9 +2,42 @@ Partition ========= +The feature Partition implements a boolean operation for partitioning of a set of selected objects. + +To perform a boolean opration Partition in the active part: + +#. select in the Main Menu *Features - > Partition* item or +#. click **Partition** button in the toolbar + +.. image:: images/partition_btn.png + :align: center + +.. centered:: + **Partition** button + +The following property panel will be opened: .. image:: images/Partition.png :align: center .. centered:: - Partition definition + **Partition operation** + +**Base Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be partitioned. + +**TUI Command**: *model.addPartition(Part_doc, objects)* + +**Arguments**: Part + list of objects. + +Result +"""""" + +The Result of the operation will be a shape which is a partition of selected objects: + +.. image:: images/CreatedPartition.png + :align: center + +.. centered:: + **Partition created** + +**See Also** a sample TUI Script of a :ref:`tui_create_partition` operation. diff --git a/src/FeaturesPlugin/doc/pipeFeature.rst b/src/FeaturesPlugin/doc/pipeFeature.rst index 0ec31da4d..383eca0bb 100644 --- a/src/FeaturesPlugin/doc/pipeFeature.rst +++ b/src/FeaturesPlugin/doc/pipeFeature.rst @@ -2,23 +2,130 @@ Pipe ==== +The feature **Pipe** makes an extruded Pipe shape. + +To create Pipe in the active part: + +#. select in the Main Menu *Features - > Pipe* item or +#. click **Pipe** button in the toolbar + +.. image:: images/pipe.png + :align: center + +.. centered:: + **Pipe** button + +Pipe can be created in three different ways: + + .. image:: images/pipe_simple_32x32.png + :align: left + by object and path + + .. image:: images/pipe_binormal_32x32.png + :align: left + by object, path and Bi-normal + + .. image:: images/pipe_locations_32x32.png + :align: left + by object, path and locations + +Pipe by object and path +----------------------- + +Base Objects are extruded along the Path Object so that the angle between the normal vector to the base shape and the tangent to the path remain constant at any point of the given path. .. image:: images/Pipe1.png :align: center .. centered:: - Pipe by object and path + Pipe by object and path property panel + +Input fields: + +- **Base objects** panel contains shapes to be extruded. Several Base Objects generate several pipes. Shapes (edges, faces, shells) are selected in 3D OCC viewer or object browser; +- **Path object** defines path along which the Base Object will be extruded. **Path object** (edge or wire) is selected in 3D OCC viewer or object browser; + +**TUI Command**: *model.addPipe(Part_doc, [shape], path)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + path in format *model.selection(TYPE, shape)*. + +Result +"""""" + +Result of extrusion of arc along another arc. + +.. image:: images/simplePipe.png + :align: center + +.. centered:: + Pipe by object and path + +**See Also** a sample TUI Script of a :ref:`tui_simple_pipe` operation. +Pipe by object, path and Bi-normal +---------------------------------- + +The pipe is generated to preserve the constant angle between the normal vector to the base shape and the BiNormal vector at any point of the given path. .. image:: images/Pipe2.png :align: center .. centered:: - Pipe by object, path and Bi-normal + Pipe by object, path and Bi-normal property panel + +Input fields: + +- **Base objects** panel contains shapes to be extruded. Several Base Objects generate several pipes. Shapes (edges, faces, shells) are selected in 3D OCC viewer or object browser; +- **Path object** defines path along which the Base Object will be extruded. **Path object** (edge or wire) is selected in 3D OCC viewer or object browser; +- **Bi-Normal** defines the BiNormal Vector. **Bi-Normal** (edge or wire) is selected in 3D OCC viewer or object browser. + +**TUI Command**: *model.addPipe(Part_doc, [shape], path, binormal)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + path in format *model.selection(TYPE, shape)* + binormal in format *model.selection(TYPE, shape)*. + +Result +"""""" + +Result of extrusion of rectangular face along arc. + +.. image:: images/binormalPipe.png + :align: center + +.. centered:: + Pipe by object and path + +**See Also** a sample TUI Script of a :ref:`tui_binormal_pipe` operation. +Pipe by object, path and locations +---------------------------------- + +The pipe is generated to preserve selected profiles at the specified locations along path. .. image:: images/Pipe3.png :align: center .. centered:: - Pipe by object, path and locations + Pipe by object, path and locations property panel + +Input fields: + +- **Base objects** panel contains shapes to be extruded. Shapes (edges, faces, shells) are selected in 3D OCC viewer or object browser; +- **Path object** defines path along which the Base Object will be extruded. **Path object** (edge or wire) is selected in 3D OCC viewer or object browser; +- **Locations** define list of vertices that specify the locations of extruded Base Objects on the resulting Path Object. The number of Base Objects should be equal to the number of Locations. + +**TUI Command**: *model.addPipe(Part_doc, [shape], path, locations)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + path in format *model.selection(TYPE, shape)* + list of locations in format *model.selection(TYPE, shape)*. + +Result +"""""" + +Result of extrusion of 3 circles along arc with specified locations. + +.. image:: images/locationPipe.png + :align: center + +.. centered:: + Pipe by object, path and locations + +**See Also** a sample TUI Script of a :ref:`tui_locations_pipe` operation. \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/placementFeature.rst b/src/FeaturesPlugin/doc/placementFeature.rst index bc45a835e..51d6a0a38 100644 --- a/src/FeaturesPlugin/doc/placementFeature.rst +++ b/src/FeaturesPlugin/doc/placementFeature.rst @@ -2,9 +2,54 @@ Placement ========= +Placement lets to place a one object relatively to another object. To make a placement: + +#. select in the Main Menu *Part - > Placement* item or +#. click **Placement** button in the toolbar + +.. image:: images/placement_btn.png + :align: center + +.. centered:: + **Placement** button + +The following property panel will be opened: .. image:: images/Placement.png :align: center .. centered:: - Placement definition + **Placement operation** + +In this property panel it is necessary: + +- Select objects which will be moved. + +- Select a face, edge or vertex as a start for moving + +- Select a face, edge or vertex as an end of moving + +- Define state of **Reverse** and **Centering** check boxes. + + + +**Apply** button creates the placement. + +**Cancel** button cancels the operation. + +**TUI Command**: *model.addPlacement(Part_doc, placeObjects, startShape, endShape, isReverse, isCentering)* + +**Arguments**: Part + list of objects to move + start shape + end shape + is reverse flag + is centering flag. + +Result +"""""" + +The Result of the operation will be a new placement of selected objects: + +.. image:: images/CreatedPlacement.png + :align: center + +.. centered:: + **Placement created** + +**See Also** a sample TUI Script of a :ref:`tui_create_placement` operation. diff --git a/src/FeaturesPlugin/doc/recoverFeature.rst b/src/FeaturesPlugin/doc/recoverFeature.rst index 7a98e3f7a..8370449c0 100644 --- a/src/FeaturesPlugin/doc/recoverFeature.rst +++ b/src/FeaturesPlugin/doc/recoverFeature.rst @@ -1,4 +1,3 @@ - Recover ======= diff --git a/src/FeaturesPlugin/doc/rotationFeature.rst b/src/FeaturesPlugin/doc/rotationFeature.rst index ff0380d0c..38bef70b9 100644 --- a/src/FeaturesPlugin/doc/rotationFeature.rst +++ b/src/FeaturesPlugin/doc/rotationFeature.rst @@ -2,16 +2,88 @@ Rotation ======== +The feature **Rotation** makes rotation of a selected shape. + +To create Rotation in the active part: + +#. select in the Main Menu *Part - > Rotation* item or +#. click **Rotation** button in the toolbar + +.. image:: images/rotation.png + :align: center + +.. centered:: + **Rotation** button + +Two rotation algorithms are: + + .. image:: images/rotation_axis_32x32.png + :align: left + by axis and angle + + .. image:: images/rotation_3pt_32x32.png + :align: left + by center and 2 points + +Rotation by axis and angle +-------------------------- .. image:: images/Rotation1.png :align: center .. centered:: - Rotation by axis and angle + Rotation by axis and angle property panel + +Input fields: + +- **Main objects** panel contains shapes to be rotated. Shapes are selected in 3D OCC viewer or object browser; +- **Axis** defines the axis of rotation. Vector is edge, axis selected in 3D OCC viewer or object browser; +- **Angle** defines the angle by which the object is rotated. + +**TUI Command**: *model.addRotation(Part_doc, [shape], axis, angle)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + axis in format *model.selection(TYPE, shape)*+ real (angle value). + +Result +"""""" + +Result of operation is rotated initial shape. +.. image:: images/rotation_axis.png + :align: center + +.. centered:: + Rotation by axis and angle + +**See Also** a sample TUI Script of a :ref:`tui_rotation_axis` operation. + +Rotation by center and points +----------------------------- .. image:: images/Rotation2.png :align: center .. centered:: - Rotation by center and points + Rotation by center and 2 points property panel + +Input fields: + +- **Main objects** panel contains shapes to be rotated. Shapes are selected in 3D OCC viewer or object browser; +- **Center point**, **Start point**, **End point** define 3 points or vertices selected in 3D OCC viewer or object browser. Rotation axis will pass through the **Center point** and will be will be orthogonal to a plane defined by three points. Rotation Angle is the angle between two vectors directed from the **Center point** to **Start point** and **End point**. + +**TUI Command**: *model.addRotation(Part_doc, [shape], point1, point2, point3)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + 3 points in format *model.selection(TYPE, shape)*. + +Result +"""""" + +Result of operation is rotated initial shape. + +.. image:: images/rotation_3points.png + :align: center + +.. centered:: + Rotation by center and 2 points + +**See Also** a sample TUI Script of a :ref:`tui_rotation_3points` operation. \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/smashFeature.rst b/src/FeaturesPlugin/doc/smashFeature.rst index dbeb1642b..e9364a3f7 100644 --- a/src/FeaturesPlugin/doc/smashFeature.rst +++ b/src/FeaturesPlugin/doc/smashFeature.rst @@ -2,9 +2,46 @@ Smash ===== +The feature Smash implements a boolean operation for smashing a set of main objects by a set of tool objects. + +To a create boolean opration Smash in the active part: + +#. select in the Main Menu *Features - > Smash* item or +#. click **Smash** button in the toolbar + +.. image:: images/bool_smash.png + :align: center + +.. centered:: + **Smash** button + +The following property panel will be opened: .. image:: images/Smash.png :align: center .. centered:: - Smash definition + **Smash operation** + +Here it is necessary to select main objects and tool objects. + +**Apply** button creates the smash shape. + +**Cancel** button cancels operation. + +**TUI Command**: *model.addSmash(Part_doc, mainObjects, toolObjects)* + +**Arguments**: Part + list of main objects + list of tool objects. + +Result +"""""" + +The Result of the operation will be a shape which is a smash of tool objects from main objects: + +.. image:: images/CreatedSmash.png + :align: center + +.. centered:: + **Smash created** + +**See Also** a sample TUI Script of a :ref:`tui_create_smash` operation. diff --git a/src/FeaturesPlugin/doc/symmetryFeature.rst b/src/FeaturesPlugin/doc/symmetryFeature.rst index dc8150c74..bd2d5eb1b 100644 --- a/src/FeaturesPlugin/doc/symmetryFeature.rst +++ b/src/FeaturesPlugin/doc/symmetryFeature.rst @@ -2,9 +2,125 @@ Symmetry ======== +The feature **Symmetry** makes symmetrical copy of a selected shape. -.. image:: images/Symmetry.png +To create Symmetry in the active part: + +#. select in the Main Menu *Part - > Symmetry* item or +#. click **Symmetry** button in the toolbar + +.. image:: images/symmetry.png + :align: center + +.. centered:: + **Symmetry** button + +Symmetrical copy of an Object can be mirrored in three different ways: + + .. image:: images/symmetry_point_32x32.png + :align: left + through a Point of symmetry + + .. image:: images/symmetry_axis_32x32.png + :align: left + through an Axis of symmetry + + .. image:: images/symmetry_plane_32x32.png + :align: left + through a Plane of symmetry + +Symmetry through a Point of symmetry +------------------------------------ + +.. image:: images/symmetryPoint.png + :align: center + +.. centered:: + Symmetry through a Point of symmetry property panel + +Input fields: + +- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser; +- **Point** defines point of symmetry selected in 3D OCC viewer or object browser; +- **Create a copy** checkbox turns on/off preservation of the initial object. + +**TUI Command**: *model.addSymmetry(Part_doc, [shape], point, copy)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + point in format *model.selection(TYPE, shape)*+ boolean (Create a copy key). + +Result +"""""" + +Result of operation is mirrored initial shape with **Create a copy** = *True*. + +.. image:: images/symmetryPointres.png + :align: center + +.. centered:: + Symmetry through a Point of symmetry + +**See Also** a sample TUI Script of a :ref:`tui_symmetry_point` operation. + +Symmetry through an Axis of symmetry +------------------------------------ + +.. image:: images/symmetryAxis.png :align: center .. centered:: - Symmetry definition + Symmetry through an Axis of symmetry property panel + +Input fields: + +- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser; +- **Axis** defines axis of symmetry selected in 3D OCC viewer or object browser; +- **Create a copy** checkbox turns on/off preservation of the initial object. + +**TUI Command**: *model.addSymmetry(Part_doc, [shape], axis, copy)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + axis in format *model.selection(TYPE, shape)*+ boolean (Create a copy key). + +Result +"""""" + +Result of operation is mirrored initial shape with **Create a copy** = *False*. + +.. image:: images/symmetryAxisres.png + :align: center + +.. centered:: + Symmetry through an Axis of symmetry + +**See Also** a sample TUI Script of a :ref:`tui_symmetry_axis` operation. + +Symmetry through a Plane of symmetry +------------------------------------ + +.. image:: images/symmetryPlane.png + :align: center + +.. centered:: + Symmetry through a Plane of symmetry property panel + +Input fields: + +- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser; +- **Plane** defines plane of symmetry selected in 3D OCC viewer or object browser; +- **Create a copy** checkbox turns on/off preservation of the initial object. + +**TUI Command**: *model.addSymmetry(Part_doc, [shape], plane, copy)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + plane in format *model.selection(TYPE, shape)*+ boolean (Create a copy key). + +Result +"""""" + +Result of operation is mirrored initial shape with **Create a copy** = *False*. + +.. image:: images/symmetryPlaneres.png + :align: center + +.. centered:: + Symmetry through a Plane of symmetry + +**See Also** a sample TUI Script of a :ref:`tui_symmetry_plane` operation. \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/transformationFeature.rst b/src/FeaturesPlugin/doc/transformationFeature.rst index 5e8f204d7..8ca725554 100644 --- a/src/FeaturesPlugin/doc/transformationFeature.rst +++ b/src/FeaturesPlugin/doc/transformationFeature.rst @@ -2,16 +2,93 @@ Scale ===== +The feature **Scale** makes a scaled shape basing on the initial shape. + +To create Scale in the active part: + +#. select in the Main Menu *Features - > Scale* item or +#. click **Scale** button in the toolbar + +.. image:: images/scale.png + :align: center + +.. centered:: + **Scale** button + +Two Scale algorithms are: + + .. image:: images/scale_factor_32x32.png + :align: left + by one common factor + + .. image:: images/scale_dimensions_32x32.png + :align: left + by different factors along axes + +Scale by one common factor +-------------------------- + +Scale by one common factor scales the entire object without modification the geometry of the shape: dimensions change evenly in all three orthogonal directions. .. image:: images/Scale1.png :align: center .. centered:: - Scale: define by a one common factor + Scale by one common factor property panel + +Input fields: + +- **Main objects** panel contains shapes to be scaled. Shapes are selected in 3D OCC viewer or object browser; +- **Center point** defines the point relatively to which the object is scaled. Point is selected in 3D OCC viewer or object browser; +- **Scale factor** defines the multiplier of axial dimensions. If Scale Factor is negative, the object is mirrored through the Central Point. + +**TUI Command**: *model.addScale(Part_doc, [shape], center, factor)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + center point in format *model.selection(TYPE, shape)*+ real (scale factor value). + +Result +"""""" + +Result of operation is transformed initial shape. +.. image:: images/Scale_common_factor.png + :align: center + +.. centered:: + Scale by one common factor + +**See Also** a sample TUI Script of a :ref:`tui_Scale_common_factor` operation. + +Scale by different factors along axes +------------------------------------- + +Scale by different factors along axes is a general transformation, which can modify the geometry, for example, a sphere can be transformed into an ellipsoid. .. image:: images/Scale2.png :align: center .. centered:: - Scale: define by different factors + Scale: define by different factors property panel + +Input fields: + +- **Main objects** panel contains shapes to be scaled. Shapes are selected in 3D OCC viewer or object browser; +- **Center point** defines the point relatively to which the object is scaled. Point is selected in 3D OCC viewer or object browser; +- **Scale factor in X**, **Scale factor in Y**, **Scale factor in Z** define the the multipliers of axial dimensions. If Scale Factor is negative, the object is mirrored through the Central Point. + +**TUI Command**: *model.addScale(Part_doc, [shape], center, factors)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + center point in format *model.selection(TYPE, shape)*+ 3 reals (scale factor values along X. Y, Z axes). + +Result +"""""" + +Result of operation is transformed initial shape. + +.. image:: images/Scale_common_factor.png + :align: center + +.. centered:: + Scale by different factors + +**See Also** a sample TUI Script of a :ref:`tui_Scale_XYZ` operation. \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/translationFeature.rst b/src/FeaturesPlugin/doc/translationFeature.rst index 99ce5db72..b3bbd5edc 100644 --- a/src/FeaturesPlugin/doc/translationFeature.rst +++ b/src/FeaturesPlugin/doc/translationFeature.rst @@ -2,23 +2,126 @@ Translation =========== +The feature **Translation** makes translation of a selected shape. + +To create Translation in the active part: + +#. select in the Main Menu *Part - > Translation* item or +#. click **Translation** button in the toolbar + +.. image:: images/translation_vector_32x32.png + :align: center + +.. centered:: + **Translation** button + +The Vector of translation can be defined in three different ways: + + .. image:: images/translation_vector_32x32.png + :align: left + by by axis and distance + + .. image:: images/translation_dxyz_32x32.png + :align: left + by vector + + .. image:: images/translation_2pt_32x32.png + :align: left + by two points + +Translation by axis and distance +-------------------------------- .. image:: images/Translation1.png :align: center .. centered:: - Translation by axis and distance + Translation by axis and distance property panel + +Input fields: + +- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser; +- **Axis** defines vector along which the object will be translated. Vector is edge, axis selected in 3D OCC viewer or object browser; +- **Distance** defines the distance along the **Vector of translation**. + +**TUI Command**: *model.addTranslation(Part_doc, [shape], axis, dist)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + axis in format *model.selection(TYPE, shape)*+ real (distance value). + +Result +"""""" + +Result of operation is shifted initial shape. + +.. image:: images/translation_vector.png + :align: center + +.. centered:: + Translation by axis and distance + +**See Also** a sample TUI Script of a :ref:`tui_translation_vector` operation. +Translation by vector +--------------------- .. image:: images/Translation2.png :align: center .. centered:: - By vector + Translation by vector property panel +Input fields: + +- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser; +- **DX**, **DY**, **DZ** define vector using coordinates along the axis. + +**TUI Command**: *model.addTranslation(Part_1_doc, [shape], DX, DY, DZ)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + 3 real (coordinate values). + +Result +"""""" + +Result of operation is shifted initial shape. + +.. image:: images/translation_vector.png + :align: center + +.. centered:: + Translation by vector + +**See Also** a sample TUI Script of a :ref:`tui_translation_DXDYDZ` operation. + + +Translation by two points +------------------------- .. image:: images/Translation3.png :align: center .. centered:: - By two points + Translation by two points property panel + +Input fields: + +- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser; +- **Start point** defines start vector point as point or vertex selected in 3D OCC viewer or object browser; +- **End point** defines end vector point as point or vertex selected in 3D OCC viewer or object browser; + +**TUI Command**: *model.addTranslation(Part_doc, [shape], point1, point2)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + 2 points in format *model.selection(TYPE, shape)*. + +Result +"""""" + +Result of operation is shifted initial shape. + +.. image:: images/translation_vector.png + :align: center + +.. centered:: + Translation by two points + +**See Also** a sample TUI Script of a :ref:`tui_translation_2points` operation. + diff --git a/src/FeaturesPlugin/doc/unionFeature.rst b/src/FeaturesPlugin/doc/unionFeature.rst index 6e3d9a2b0..a311dac32 100644 --- a/src/FeaturesPlugin/doc/unionFeature.rst +++ b/src/FeaturesPlugin/doc/unionFeature.rst @@ -2,9 +2,46 @@ Union ===== +The feature Union implements a boolean operation for creation of a uniono of selected objects. + +To a create boolean opration Union in the active part: + +#. select in the Main Menu *Features - > Union* item or +#. click **Union** button in the toolbar + +.. image:: images/union_btn.png + :align: center + +.. centered:: + **Union** button + +The following property panel will be opened: .. image:: images/Union.png :align: center .. centered:: - Union definition + **Union operation** + +Here it is necessary to select some objects. + +**Apply** button creates the union shape. + +**Cancel** button cancels operation. + +**TUI Command**: *model.addUnion(Part_doc, objects)* + +**Arguments**: Part + list of objects. + +Result +"""""" + +The Result of the operation will be a shape which is a union of selected objects: + +.. image:: images/CreatedUnion.png + :align: center + +.. centered:: + **Union created** + +**See Also** a sample TUI Script of a :ref:`tui_create_union` operation. diff --git a/src/FeaturesPlugin/plugin-Features.xml b/src/FeaturesPlugin/plugin-Features.xml index b3a8dcbf2..090e9e5d6 100644 --- a/src/FeaturesPlugin/plugin-Features.xml +++ b/src/FeaturesPlugin/plugin-Features.xml @@ -23,85 +23,85 @@ email : webmaster.salome@opencascade.com + icon="icons/Features/scale.png" helpfile="transformationFeature.html"> + icon="icons/Features/extrusion.png" helpfile="extrusionFeature.html"> + icon="icons/Features/extrusion_cut.png" helpfile="extrusionCutFeature.html"> + icon="icons/Features/extrusion_fuse.png" helpfile="extrusionFuseFeature.html"> + icon="icons/Features/revol.png" helpfile="revolutionFeature.html"> + icon="icons/Features/revol_cut.png" helpfile="revolutionCutFeature.html"> + icon="icons/Features/revol_fuse.png" helpfile="revolutionFuseFeature.html"> + icon="icons/Features/pipe.png" helpfile="pipeFeature.html"> + icon="icons/Features/intersection.png" helpfile="intersectionFeature.html"> + icon="icons/Features/union.png" helpfile="unionFeature.html"> + icon="icons/Features/remove_subshapes.png" helpfile="removeSubShapesFeature.html"> @@ -110,13 +110,13 @@ email : webmaster.salome@opencascade.com + helpfile="recoverFeature.html"> + icon="icons/Features/fillet.png" auto_preview="true" helpfile="filletFeature.html"> + icon="icons/Features/placement.png" helpfile="placementFeature.html"> + icon="icons/Features/movement.png" helpfile="translationFeature.html"> + icon="icons/Features/rotation.png" helpfile="rotationFeature.html"> + icon="icons/Features/symmetry.png" helpfile="symmetryFeature.html"> + icon="icons/Features/multitranslation.png" helpfile="linearCopyFeature.html"> + icon="icons/Features/multirotation.png" helpfile="angularCopyFeature.html"> + icon="icons/Features/measurement.png" helpfile="measurementFeature.html"> diff --git a/src/GDMLPlugin/doc/GDMLPlugin.rst b/src/GDMLPlugin/doc/GDMLPlugin.rst index ae3a4d3b8..47760164f 100644 --- a/src/GDMLPlugin/doc/GDMLPlugin.rst +++ b/src/GDMLPlugin/doc/GDMLPlugin.rst @@ -4,6 +4,8 @@ GDML plug-in ============= +GDML plug-in provides a set of features for creation of geometry primitives using GDML language. It implements following features: + .. toctree:: :titlesonly: :maxdepth: 1 diff --git a/src/GDMLPlugin/doc/TUI_coneFeature.rst b/src/GDMLPlugin/doc/TUI_coneFeature.rst new file mode 100644 index 000000000..d8268fc94 --- /dev/null +++ b/src/GDMLPlugin/doc/TUI_coneFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_conesegment: + +Create Cone +=========== + +.. literalinclude:: examples/cone.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/GDMLPlugin/doc/TUI_ellipsoidFeature.rst b/src/GDMLPlugin/doc/TUI_ellipsoidFeature.rst new file mode 100644 index 000000000..54b85d6b0 --- /dev/null +++ b/src/GDMLPlugin/doc/TUI_ellipsoidFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_ellipsoid: + +Create Cone +=========== + +.. literalinclude:: examples/ellipsoid.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/GDMLPlugin/doc/coneFeature.rst b/src/GDMLPlugin/doc/coneFeature.rst index 5041deccf..d92cb73cd 100644 --- a/src/GDMLPlugin/doc/coneFeature.rst +++ b/src/GDMLPlugin/doc/coneFeature.rst @@ -1,3 +1,49 @@ -Cone -==== +Cone segment +============ + +The feature Cone segment creates a cone or its segment using GDML language. + +To create a Cone segment in the active part: + +#. select in the Main Menu *GDML - > Cone segment* item or +#. click **Cone segment** button in the toolbar. + +.. image:: images/cone_btn.png + :align: center + +.. centered:: + **Cone segment** button + +The following property panel will be opened: + +.. image:: images/Cone_panel.png + :align: center + +.. centered:: + **Cone property panel** + +The property panel contains image which explains meaning of input values: + +- **rmin1, rmax1** - minimal and maximal radiuses of a base of the cone. +- **rmin2, rmax2** - minimal and maximal rediuses of a top of the cone. +- **z** is a heighth of the cone. +- **startphi** is a starting angle of the cone segment. +- **deltaphi** is an angle to end of the cone segment. + +**TUI Command**: *model.addConeSegment(Part_doc, rmin1, rmax1, rmin2, rmax2, z, startphi, deltaphi)* + +**Arguments**: Part + Rmin of base + Rmax of base + Rmin of top + Rmax of top + height + start angle + end angle. + +Result +"""""" + +The Result of the operation will be a SOLID. + +.. image:: images/CreatedCone.png + :align: center + +.. centered:: + Cone created + +**See Also** a sample TUI Script of a :ref:`tui_create_conesegment` operation. diff --git a/src/GDMLPlugin/doc/ellipsoidFeature.rst b/src/GDMLPlugin/doc/ellipsoidFeature.rst index 65ce69e85..3e1501deb 100644 --- a/src/GDMLPlugin/doc/ellipsoidFeature.rst +++ b/src/GDMLPlugin/doc/ellipsoidFeature.rst @@ -1,3 +1,49 @@ Ellipsoid ========= + +The feature Ellipsoid creates a 3d ellipsoid or its part using GDML language. + +To create a Ellipsoid in the active part: + +#. select in the Main Menu *GDML - > Ellipsoid* item or +#. click **Ellipsoid** button in the toolbar. + +.. image:: images/ellips_btn.png + :align: center + +.. centered:: + **Ellipsoid** button + +The following property panel will be opened: + +.. image:: images/Ellipsoid.png + :align: center + +.. centered:: + **Ellipsoid property panel** + +The property panel contains image which explains meaning of input values: + +- **ax** is a size of the ellipsoind along X axis. +- **by** is a size of the ellipsoind along Y axis. +- **cz** is a size of the ellipsoind along Z axis. +- **zcut1** is a z coordinate of a lower cut plane. +- **zcut2** is a z coordinate of a upper cut plane. + +**TUI Command**: *model.addEllipsoid(Part_doc, ax, by, cz)* + +**Arguments**: Part + ax + by + cz. + +Result +"""""" + +The Result of the operation will be a SOLID. + +.. image:: images/CreatedEllipsoid.png + :align: center + +.. centered:: + Ellipsoid created + +**See Also** a sample TUI Script of a :ref:`tui_create_ellipsoid` operation. diff --git a/src/GDMLPlugin/doc/examples/cone.py b/src/GDMLPlugin/doc/examples/cone.py new file mode 100644 index 000000000..4ad110612 --- /dev/null +++ b/src/GDMLPlugin/doc/examples/cone.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +ConeSegment_1 = model.addConeSegment(Part_1_doc, 7, 11, 5, 8, 12, 0 , 270) +model.do() +model.end() diff --git a/src/GDMLPlugin/doc/examples/ellipsoid.py b/src/GDMLPlugin/doc/examples/ellipsoid.py new file mode 100644 index 000000000..68ada19a2 --- /dev/null +++ b/src/GDMLPlugin/doc/examples/ellipsoid.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Ellipsoid_1 = model.addEllipsoid(Part_1_doc, 10, 20, 40) +model.do() +model.end() diff --git a/src/GDMLPlugin/doc/images/Cone_panel.png b/src/GDMLPlugin/doc/images/Cone_panel.png new file mode 100644 index 000000000..8e5a92bd0 Binary files /dev/null and b/src/GDMLPlugin/doc/images/Cone_panel.png differ diff --git a/src/GDMLPlugin/doc/images/CreatedCone.png b/src/GDMLPlugin/doc/images/CreatedCone.png new file mode 100644 index 000000000..9ac9e0fcb Binary files /dev/null and b/src/GDMLPlugin/doc/images/CreatedCone.png differ diff --git a/src/GDMLPlugin/doc/images/CreatedEllipsoid.png b/src/GDMLPlugin/doc/images/CreatedEllipsoid.png new file mode 100644 index 000000000..b94fa85fa Binary files /dev/null and b/src/GDMLPlugin/doc/images/CreatedEllipsoid.png differ diff --git a/src/GDMLPlugin/doc/images/Ellipsoid.png b/src/GDMLPlugin/doc/images/Ellipsoid.png new file mode 100644 index 000000000..c0b5c4f1a Binary files /dev/null and b/src/GDMLPlugin/doc/images/Ellipsoid.png differ diff --git a/src/GDMLPlugin/doc/images/cone_btn.png b/src/GDMLPlugin/doc/images/cone_btn.png new file mode 100644 index 000000000..12378d4ee Binary files /dev/null and b/src/GDMLPlugin/doc/images/cone_btn.png differ diff --git a/src/GDMLPlugin/doc/images/ellips_btn.png b/src/GDMLPlugin/doc/images/ellips_btn.png new file mode 100644 index 000000000..4af212bcd Binary files /dev/null and b/src/GDMLPlugin/doc/images/ellips_btn.png differ diff --git a/src/GDMLPlugin/plugin-GDML.xml b/src/GDMLPlugin/plugin-GDML.xml index 66bc4a0cf..47e3075cc 100644 --- a/src/GDMLPlugin/plugin-GDML.xml +++ b/src/GDMLPlugin/plugin-GDML.xml @@ -23,11 +23,11 @@ email : webmaster.salome@opencascade.com + helpfile="coneFeature.html"> + helpfile="ellipsoidFeature.html"> diff --git a/src/ParametersPlugin/doc/ParametersPlugin.rst b/src/ParametersPlugin/doc/ParametersPlugin.rst index 2963a254d..45555bcbf 100644 --- a/src/ParametersPlugin/doc/ParametersPlugin.rst +++ b/src/ParametersPlugin/doc/ParametersPlugin.rst @@ -4,9 +4,16 @@ Parameters plug-in ================== +The Parameters plug-in includes the following features: + .. toctree:: :titlesonly: :maxdepth: 1 managerFeature.rst parameterFeature.rst + + + + + diff --git a/src/ParametersPlugin/doc/TUI_parameterFeature.rst b/src/ParametersPlugin/doc/TUI_parameterFeature.rst new file mode 100755 index 000000000..bf120a891 --- /dev/null +++ b/src/ParametersPlugin/doc/TUI_parameterFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_parameterFeature: + +Create Parameter +================ + +.. literalinclude:: examples/parameter.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/ParametersPlugin/doc/TUI_parametersFeature.rst b/src/ParametersPlugin/doc/TUI_parametersFeature.rst new file mode 100644 index 000000000..e4f8bc776 --- /dev/null +++ b/src/ParametersPlugin/doc/TUI_parametersFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_parametersFeature: + +Create Parameters +================= + +.. literalinclude:: examples/parameters.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/ParametersPlugin/doc/examples/parameter.py b/src/ParametersPlugin/doc/examples/parameter.py new file mode 100755 index 000000000..7f7f04251 --- /dev/null +++ b/src/ParametersPlugin/doc/examples/parameter.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +model.addParameter(partSet, "angle", "60*3.141/180", "main angle") +model.end() diff --git a/src/ParametersPlugin/doc/examples/parameters.py b/src/ParametersPlugin/doc/examples/parameters.py new file mode 100644 index 000000000..a8060a14d --- /dev/null +++ b/src/ParametersPlugin/doc/examples/parameters.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +model.addParameter(partSet, "angle", "60*3.141/180", "main angle") +model.addParameter(partSet, "height", "200*sin(angle)") +model.end() diff --git a/src/ParametersPlugin/doc/images/Parameter.png b/src/ParametersPlugin/doc/images/Parameter.png deleted file mode 100644 index 67f902ead..000000000 Binary files a/src/ParametersPlugin/doc/images/Parameter.png and /dev/null differ diff --git a/src/ParametersPlugin/doc/images/expression.png b/src/ParametersPlugin/doc/images/expression.png new file mode 100755 index 000000000..158678a87 Binary files /dev/null and b/src/ParametersPlugin/doc/images/expression.png differ diff --git a/src/ParametersPlugin/doc/images/object_browser_parameter.png b/src/ParametersPlugin/doc/images/object_browser_parameter.png new file mode 100755 index 000000000..63698f3d6 Binary files /dev/null and b/src/ParametersPlugin/doc/images/object_browser_parameter.png differ diff --git a/src/ParametersPlugin/doc/images/object_browser_parameters.png b/src/ParametersPlugin/doc/images/object_browser_parameters.png new file mode 100755 index 000000000..25801cb6d Binary files /dev/null and b/src/ParametersPlugin/doc/images/object_browser_parameters.png differ diff --git a/src/ParametersPlugin/doc/images/paper_roll.png b/src/ParametersPlugin/doc/images/paper_roll.png new file mode 100755 index 000000000..fc7a124c9 Binary files /dev/null and b/src/ParametersPlugin/doc/images/paper_roll.png differ diff --git a/src/ParametersPlugin/doc/images/parameter.png b/src/ParametersPlugin/doc/images/parameter.png new file mode 100755 index 000000000..96d593948 Binary files /dev/null and b/src/ParametersPlugin/doc/images/parameter.png differ diff --git a/src/ParametersPlugin/doc/images/parameters.png b/src/ParametersPlugin/doc/images/parameters.png new file mode 100755 index 000000000..4f1e1f66c Binary files /dev/null and b/src/ParametersPlugin/doc/images/parameters.png differ diff --git a/src/ParametersPlugin/doc/images/parameters_down.png b/src/ParametersPlugin/doc/images/parameters_down.png new file mode 100755 index 000000000..dfc36bec2 Binary files /dev/null and b/src/ParametersPlugin/doc/images/parameters_down.png differ diff --git a/src/ParametersPlugin/doc/images/parameters_up.png b/src/ParametersPlugin/doc/images/parameters_up.png new file mode 100755 index 000000000..c6e801735 Binary files /dev/null and b/src/ParametersPlugin/doc/images/parameters_up.png differ diff --git a/src/ParametersPlugin/doc/managerFeature.rst b/src/ParametersPlugin/doc/managerFeature.rst index c32dd48f9..039e9c767 100644 --- a/src/ParametersPlugin/doc/managerFeature.rst +++ b/src/ParametersPlugin/doc/managerFeature.rst @@ -1,10 +1,60 @@ +.. _parameters: + Parameters manager ================== +To create/edit a set of parameters in the active partset or part instead of multiply call: + +#. select in the Main Menu *Part - > Parameters* item or +#. click **Parameters** button in the toolbar: + +.. image:: images/paper_roll.png + :align: center + +.. centered:: + **Parameters** button + +The following dialog box with parameter table appears: + +.. image:: images/parameters.png + :align: center + +.. centered:: + Parameters dialog box + +**Input fields**: + +- **Name** defines parameter name. Name follows the naming rules of the python language for variables; +- **Expression** inputs manually python expression; +- **Result** evaluates expression as real number by python *eval()* function; +- **Comment** contains any text. This field is optional; +- **Add** button adds a new empty string in the end of table. Default **Name** is **, **Expression** is ** +- **Insert** button adds a new empty string before the selected parameter; +- **Delete** button removes the selected parameter from the table; +- **Modify parameter position** button moves the selected parameter + .. image:: images/parameters_up.png + :align: left + up on 1 string in the table, + + .. image:: images/parameters_down.png + :align: left + down on 1 string in the table. + + +**TUI Command**: *model.addParameter(Part_doc, Name, Value, Comment)* + +**Arguments**: 1 Part + 1 string + 1 value + 1 string + +**See Also** a sample TUI Script of a :ref:`tui_parametersFeature` operation. + +Result +------ + +Created parameters and their current values are displayed in the Object Browser, in a special section **Parameters**. -.. image:: images/Manager.png - :align: center +.. image:: images/object_browser_parameters.png + :align: center .. centered:: - Edit parameters with help of parameres manager + **Parameters** in object browser diff --git a/src/ParametersPlugin/doc/parameterFeature.rst b/src/ParametersPlugin/doc/parameterFeature.rst index d8f9025b1..7bbf0b159 100644 --- a/src/ParametersPlugin/doc/parameterFeature.rst +++ b/src/ParametersPlugin/doc/parameterFeature.rst @@ -1,10 +1,55 @@ +.. _parameter: Create parameter ================ +The parameter definition has form *variable=expression*. -.. image:: images/Parameter.png - :align: center +To create parameter in the active partset or part: + +#. select in the Main Menu *Part - > Parameter* item or +#. click **Parameter** button in the toolbar: + +.. image:: images/expression.png + :align: center + +.. centered:: + **Parameter** button + +The following property panel appears. + +.. image:: images/parameter.png + :align: center + +.. centered:: + Parameter property panel + +**Input fields**: + +- .. image:: images/expression.png + :align: left + defines parameter name. Name follows the naming rules of the python language for variables; + +- panel **Expression** evaluates inputted manually expression as real number by python *eval()* function. In the simplest case an expression is a real number. Some standard python modules (like math) are imported by default before evaluation. + +- **Comment** contains any text. This field is optional. + + +The property panel checks validity of the expression. For invalid expression **Apply** button is disabled and error message generated by python interpreter during the evaluation is shown in status bar and in popup of **Apply** button. + +**TUI Command**: *model.addParameter(Part_doc, Name, Value, Comment)* + +**Arguments**: 1 Part + 1 string + 1 value + 1 string + +**See Also** a sample TUI Script of a :ref:`tui_parameterFeature` operation. + +Result +------ + +Created parameter and its current value are displayed in the Object Browser, in a special section **Parameters**. + +.. image:: images/object_browser_parameter.png + :align: center .. centered:: - Create a parameter + **Parameter** in object browser diff --git a/src/ParametersPlugin/plugin-Parameters.xml b/src/ParametersPlugin/plugin-Parameters.xml index f5aff33e0..1b6c7d245 100644 --- a/src/ParametersPlugin/plugin-Parameters.xml +++ b/src/ParametersPlugin/plugin-Parameters.xml @@ -23,7 +23,7 @@ email : webmaster.salome@opencascade.com + helpfile="parameterFeature.html"> @@ -34,7 +34,7 @@ email : webmaster.salome@opencascade.com + helpfile="managerFeature.html"> diff --git a/src/PartSetPlugin/doc/PartSetPlugin.rst b/src/PartSetPlugin/doc/PartSetPlugin.rst index 9dfd89688..70d009b7d 100644 --- a/src/PartSetPlugin/doc/PartSetPlugin.rst +++ b/src/PartSetPlugin/doc/PartSetPlugin.rst @@ -2,4 +2,70 @@ .. _partPlugin: Part plug-in -============= +============ + +New Part +-------- + +To create a New Part: + +#. select in the Main Menu *Part - > New part* item or +#. click **New part** button in Shaper toolbar: + +.. image:: images/new_part.png + :align: center + +.. centered:: + New part button + +**TUI Command**: *model.addPart(partSet)* + +**Arguments**: 1 partset + +Result +"""""" + +Created empty part is activated and appears in the object browser. + +**See Also** a sample TUI Script of a :ref:`tui_create_part` operation. + +Duplicate Part +-------------- + +To duplicate active Part: + +#. select in the Main Menu *Part - > Duplicate part* item or +#. click **Duplicate part** button in Shaper toolbar: + +.. image:: images/duplicate.png + :align: center + +.. centered:: + Duplicate part button + +Result +"""""" + +Created copied part is activated and appears in the object browser. + +Copied part contains all objects existing in the source part. + +Remove Part +----------- + +To remove active Part: + +#. select in the Main Menu *Part - > Remove part* item or +#. click **Remove part** button in Shaper toolbar: + +.. image:: images/remove.png + :align: center + +.. centered:: + Remove part button + +Result +"""""" + +Selected part is removed together with all its objects. + diff --git a/src/PartSetPlugin/doc/TUI_new_partFeature.rst b/src/PartSetPlugin/doc/TUI_new_partFeature.rst new file mode 100644 index 000000000..b3c198aae --- /dev/null +++ b/src/PartSetPlugin/doc/TUI_new_partFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_create_part: + +Create Part +=========== + +.. literalinclude:: examples/new_part.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/PartSetPlugin/doc/examples/new_part.py b/src/PartSetPlugin/doc/examples/new_part.py new file mode 100644 index 000000000..296a13707 --- /dev/null +++ b/src/PartSetPlugin/doc/examples/new_part.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +model.do() +model.end() diff --git a/src/PartSetPlugin/doc/images/duplicate.png b/src/PartSetPlugin/doc/images/duplicate.png new file mode 100644 index 000000000..228db95bc Binary files /dev/null and b/src/PartSetPlugin/doc/images/duplicate.png differ diff --git a/src/PartSetPlugin/doc/images/new_part.png b/src/PartSetPlugin/doc/images/new_part.png new file mode 100644 index 000000000..673326683 Binary files /dev/null and b/src/PartSetPlugin/doc/images/new_part.png differ diff --git a/src/PartSetPlugin/doc/images/remove.png b/src/PartSetPlugin/doc/images/remove.png new file mode 100644 index 000000000..f5359d7bc Binary files /dev/null and b/src/PartSetPlugin/doc/images/remove.png differ diff --git a/src/PrimitivesPlugin/doc/PrimitivesPlugin.rst b/src/PrimitivesPlugin/doc/PrimitivesPlugin.rst index 1ed4d79f6..b8d75b488 100644 --- a/src/PrimitivesPlugin/doc/PrimitivesPlugin.rst +++ b/src/PrimitivesPlugin/doc/PrimitivesPlugin.rst @@ -4,6 +4,8 @@ Primitives plug-in ================== +The Primitives plug-in contains features dedicated to creation of geometrical primitives. Result of each feature is a solid. The plug-in includes the following features: + .. toctree:: :titlesonly: :maxdepth: 1 diff --git a/src/PrimitivesPlugin/doc/TUI_boxFeature.rst b/src/PrimitivesPlugin/doc/TUI_boxFeature.rst new file mode 100644 index 000000000..78ae3ad40 --- /dev/null +++ b/src/PrimitivesPlugin/doc/TUI_boxFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_box: + +Create Box +========== + +.. literalinclude:: examples/box.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/PrimitivesPlugin/doc/TUI_coneFeature.rst b/src/PrimitivesPlugin/doc/TUI_coneFeature.rst new file mode 100644 index 000000000..aa95fa132 --- /dev/null +++ b/src/PrimitivesPlugin/doc/TUI_coneFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_cone: + +Create / Cone +============= + +.. literalinclude:: examples/cone.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/PrimitivesPlugin/doc/TUI_cylinderFeature.rst b/src/PrimitivesPlugin/doc/TUI_cylinderFeature.rst new file mode 100644 index 000000000..9256a9d66 --- /dev/null +++ b/src/PrimitivesPlugin/doc/TUI_cylinderFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_cylinder: + +Create /Cylinder +================ + +.. literalinclude:: examples/cylinder.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/PrimitivesPlugin/doc/TUI_sphereFeature.rst b/src/PrimitivesPlugin/doc/TUI_sphereFeature.rst new file mode 100644 index 000000000..f4012bcce --- /dev/null +++ b/src/PrimitivesPlugin/doc/TUI_sphereFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_sphere: + +Create / Sphere +=============== + +.. literalinclude:: examples/sphere.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/PrimitivesPlugin/doc/TUI_torusFeature.rst b/src/PrimitivesPlugin/doc/TUI_torusFeature.rst new file mode 100644 index 000000000..3a46e0b0d --- /dev/null +++ b/src/PrimitivesPlugin/doc/TUI_torusFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_torus: + +Create / Torus +============= + +.. literalinclude:: examples/torus.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/PrimitivesPlugin/doc/boxFeature.rst b/src/PrimitivesPlugin/doc/boxFeature.rst index 7ae1d7253..b1eb661dd 100644 --- a/src/PrimitivesPlugin/doc/boxFeature.rst +++ b/src/PrimitivesPlugin/doc/boxFeature.rst @@ -1,17 +1,74 @@ +.. _box_feature: Box === +The feature Box creates a box solid. -.. image:: images/Box1.png - :align: center +To create a Box in the active part: + +#. select in the Main Menu *Primitives - > Box* item or +#. click **Box** button in the toolbar: + +.. image:: images/box.png + :align: center .. centered:: - Create a box by dimensions + **Box** button + +There are 2 algorithms for creation of a Box: + +.. image:: images/box_2pt_32x32.png + :align: left +**By dimensions** + +.. image:: images/box_dxyz_32x32.png + :align: left +**By two points** + + +By dimensions +""""""""""""" + +Box is created by dimensions along X, Y, Z axis starting from the origin. + +.. image:: images/Box_dimensions.png + :align: center + +Input fields: +- **DX**, **DY**, **DZ** define sizes of the box along corresponding coordinate axes. -.. image:: images/Box2.png - :align: center +**TUI Command**: *model.addBox(Part_doc, DX, DY, DZ)* + +**Arguments**: Part + 3 real values (dimensions at origin). + +By two points +""""""""""""" + +Box is created by two points of the box diagonal. + +.. image:: images/Box_2points.png + :align: center + +Input fields: + +- **Point 1** and **Point 2** define diagonal points of the box selected in 3D OCC viewer or object browser. + +**TUI Command**: *model.addBox(Part_doc, point1, point2)* + +**Arguments**: Part + 2 selected points (opposite vertices of the box) + +Result +"""""" + +The edges of the created boxes are parallel to the coordinate axes. + +.. image:: images/Boxes.png + :align: center + .. centered:: - Create a box by two points + Boxes created + +**See Also** a sample TUI Script of a :ref:`tui_create_box` operation. \ No newline at end of file diff --git a/src/PrimitivesPlugin/doc/coneFeature.rst b/src/PrimitivesPlugin/doc/coneFeature.rst index 118d42dbd..6c8a272fa 100644 --- a/src/PrimitivesPlugin/doc/coneFeature.rst +++ b/src/PrimitivesPlugin/doc/coneFeature.rst @@ -2,9 +2,51 @@ Cone ==== +The feature Cone creates a cone solid. + +To create a Cone in the active part: + +#. select in the Main Menu *Primitives - > Cone* item or +#. click **Cone** button in the toolbar + +.. image:: images/Cone_button.png + :align: center + +.. centered:: + **Cone** button + +The following property panel appears. .. image:: images/Cone.png :align: center .. centered:: - Create a cone + Cone property panel + +Input fields: + +- **Point** defines center of the cone base selected in 3D OCC viewer or object browser; +- **Vector** defines the axis of the cone selected in 3D OCC viewer or object browser; +- Dimensions: + - **Base Radius**; + - **Top radius**; + - **Height**. + +**TUI Command**: *model.addCone(Part_doc, Point, Axis, Radius1, Radius2, Height)* + +**Arguments**: Part + 1 vertex + 1 vector + 3 real values (base and top radii, heght). + +Result +"""""" + +If both radii are non-zero, then the cone will be truncated. + +If the radii are equal, the Cylinder will be created instead of cone. + +.. image:: images/Cone_res.png + :align: center + +.. centered:: + Cone created + +**See Also** a sample TUI Script of a :ref:`tui_create_cone` operation. diff --git a/src/PrimitivesPlugin/doc/cylinderFeature.rst b/src/PrimitivesPlugin/doc/cylinderFeature.rst index e5f18db01..d04badfb8 100644 --- a/src/PrimitivesPlugin/doc/cylinderFeature.rst +++ b/src/PrimitivesPlugin/doc/cylinderFeature.rst @@ -2,16 +2,78 @@ Cylinder ======== +The feature Cylinder creates a cylinder solid. -.. image:: images/Cylinder1.png - :align: center +To create a Cylinder in the active part: + +#. select in the Main Menu *Primitives - > Cylinder* item or +#. click **Cylinder** button in the toolbar + +.. image:: images/Cylinder_button.png + :align: center .. centered:: - Create a cylinder + **Cylinder** button + +There are 2 algorithms for creation of a Cylinder: +.. image:: images/cylinder_32x32.png + :align: left +**Cylinder** creates a cylinder. -.. image:: images/Cylinder2.png - :align: center +.. image:: images/cylinder_portion_32x32.png + :align: left +**Portion of cylinder** creates one segment of cylinder. +Cylinder +"""""""" + +.. image:: images/Cylinder.png + :align: center + .. centered:: - Create a sector of cylinder + **Cylinder** property panel + +Input fields: + +- **Point** defines center of the cylinder base selected in 3D OCC viewer or object browser; +- **Vector** defines the axis of the cylinder selected in 3D OCC viewer or object browser; +- Dimensions: + - **Radius**; + - **Height**. + +**TUI Commands**: + +* *model.addCylinder(Part_doc, Point, Axis, Radius, Height)* + +**Arguments**: Part + 1 vertex +1 vector + 2 real values (radius, height). + +Portion of cylinder +""""""""""""""""""" + +.. image:: images/Portion_cylinder.png + :align: center + +.. centered:: + **Portion of cylinder** property panel + +Input fields for ***Portion of cylinder** tab includes in addition **Angle** to create a portion of cylinder. + +**TUI Commands**: + +* *model.addCylinder(Part_doc, Point, Axis, Radius, Height,Angle)* + +**Arguments**: 1 Part + 1 vertex +1 vector + 3 real values (radius, height and angle). + +Result +"""""" + +Example is shown below. + +.. image:: images/Cylinders.png + :align: center + +.. centered:: + Cylinders created + +**See Also** a sample TUI Script of a :ref:`tui_create_cylinder` operation. diff --git a/src/PrimitivesPlugin/doc/examples/box.py b/src/PrimitivesPlugin/doc/examples/box.py new file mode 100644 index 000000000..0b9b5e665 --- /dev/null +++ b/src/PrimitivesPlugin/doc/examples/box.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +Point_2 = model.addPoint(Part_1_doc, 20, 30, 40) +Point_3 = model.addPoint(Part_1_doc, 40, 40, 50) +Box_2 = model.addBox(Part_1_doc, model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2")) +model.do() +model.end() diff --git a/src/PrimitivesPlugin/doc/examples/cone.py b/src/PrimitivesPlugin/doc/examples/cone.py new file mode 100644 index 000000000..fe66a9688 --- /dev/null +++ b/src/PrimitivesPlugin/doc/examples/cone.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10) +model.do() +model.end() diff --git a/src/PrimitivesPlugin/doc/examples/cylinder.py b/src/PrimitivesPlugin/doc/examples/cylinder.py new file mode 100644 index 000000000..7c7c2bf4a --- /dev/null +++ b/src/PrimitivesPlugin/doc/examples/cylinder.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) +Cylinder_2 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "Cylinder_1_1/Face_1&Cylinder_1_1/Face_2"), model.selection("EDGE", "PartSet/OX"), 5, 10, 45) +model.do() +model.end() diff --git a/src/PrimitivesPlugin/doc/examples/sphere.py b/src/PrimitivesPlugin/doc/examples/sphere.py new file mode 100644 index 000000000..ec35791dd --- /dev/null +++ b/src/PrimitivesPlugin/doc/examples/sphere.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sphere_1 = model.addSphere(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), 10) +model.do() +model.end() diff --git a/src/PrimitivesPlugin/doc/examples/torus.py b/src/PrimitivesPlugin/doc/examples/torus.py new file mode 100755 index 000000000..2603cdaac --- /dev/null +++ b/src/PrimitivesPlugin/doc/examples/torus.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Torus_1 = model.addTorus(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 15, 3) +model.do() +model.end() diff --git a/src/PrimitivesPlugin/doc/images/Box1.png b/src/PrimitivesPlugin/doc/images/Box1.png deleted file mode 100644 index 6f5fcf739..000000000 Binary files a/src/PrimitivesPlugin/doc/images/Box1.png and /dev/null differ diff --git a/src/PrimitivesPlugin/doc/images/Box2.png b/src/PrimitivesPlugin/doc/images/Box2.png deleted file mode 100644 index 0c861e1a6..000000000 Binary files a/src/PrimitivesPlugin/doc/images/Box2.png and /dev/null differ diff --git a/src/PrimitivesPlugin/doc/images/Box_2points.png b/src/PrimitivesPlugin/doc/images/Box_2points.png new file mode 100644 index 000000000..c8f88fff4 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Box_2points.png differ diff --git a/src/PrimitivesPlugin/doc/images/Box_button.png b/src/PrimitivesPlugin/doc/images/Box_button.png new file mode 100644 index 000000000..aaa604aad Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Box_button.png differ diff --git a/src/PrimitivesPlugin/doc/images/Box_dimensions.png b/src/PrimitivesPlugin/doc/images/Box_dimensions.png new file mode 100644 index 000000000..8fee3ead8 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Box_dimensions.png differ diff --git a/src/PrimitivesPlugin/doc/images/Boxes.png b/src/PrimitivesPlugin/doc/images/Boxes.png new file mode 100644 index 000000000..dec906f11 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Boxes.png differ diff --git a/src/PrimitivesPlugin/doc/images/Cone_button.png b/src/PrimitivesPlugin/doc/images/Cone_button.png new file mode 100755 index 000000000..ae5491d43 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Cone_button.png differ diff --git a/src/PrimitivesPlugin/doc/images/Cone_res.png b/src/PrimitivesPlugin/doc/images/Cone_res.png new file mode 100755 index 000000000..6ad50cce9 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Cone_res.png differ diff --git a/src/PrimitivesPlugin/doc/images/Cylinder.png b/src/PrimitivesPlugin/doc/images/Cylinder.png new file mode 100644 index 000000000..046ffae7b Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Cylinder.png differ diff --git a/src/PrimitivesPlugin/doc/images/Cylinder1.png b/src/PrimitivesPlugin/doc/images/Cylinder1.png deleted file mode 100644 index 046ffae7b..000000000 Binary files a/src/PrimitivesPlugin/doc/images/Cylinder1.png and /dev/null differ diff --git a/src/PrimitivesPlugin/doc/images/Cylinder2.png b/src/PrimitivesPlugin/doc/images/Cylinder2.png deleted file mode 100644 index 19f484475..000000000 Binary files a/src/PrimitivesPlugin/doc/images/Cylinder2.png and /dev/null differ diff --git a/src/PrimitivesPlugin/doc/images/Cylinder_button.png b/src/PrimitivesPlugin/doc/images/Cylinder_button.png new file mode 100644 index 000000000..fcc6c918a Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Cylinder_button.png differ diff --git a/src/PrimitivesPlugin/doc/images/Cylinders.png b/src/PrimitivesPlugin/doc/images/Cylinders.png new file mode 100644 index 000000000..9c5bb84c9 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Cylinders.png differ diff --git a/src/PrimitivesPlugin/doc/images/Portion_cylinder.png b/src/PrimitivesPlugin/doc/images/Portion_cylinder.png new file mode 100644 index 000000000..b88fb513e Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Portion_cylinder.png differ diff --git a/src/PrimitivesPlugin/doc/images/Sphere.png b/src/PrimitivesPlugin/doc/images/Sphere.png index a88b7a59b..6798a66ac 100644 Binary files a/src/PrimitivesPlugin/doc/images/Sphere.png and b/src/PrimitivesPlugin/doc/images/Sphere.png differ diff --git a/src/PrimitivesPlugin/doc/images/Sphere_button.png b/src/PrimitivesPlugin/doc/images/Sphere_button.png new file mode 100644 index 000000000..fb13d34b0 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Sphere_button.png differ diff --git a/src/PrimitivesPlugin/doc/images/Sphere_res.png b/src/PrimitivesPlugin/doc/images/Sphere_res.png new file mode 100644 index 000000000..5cb5dc051 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Sphere_res.png differ diff --git a/src/PrimitivesPlugin/doc/images/Torus_button.png b/src/PrimitivesPlugin/doc/images/Torus_button.png new file mode 100755 index 000000000..c1e0c2156 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Torus_button.png differ diff --git a/src/PrimitivesPlugin/doc/images/Torus_res.png b/src/PrimitivesPlugin/doc/images/Torus_res.png new file mode 100644 index 000000000..661c3c559 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Torus_res.png differ diff --git a/src/PrimitivesPlugin/doc/images/box.png b/src/PrimitivesPlugin/doc/images/box.png new file mode 100644 index 000000000..2b0757b05 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/box.png differ diff --git a/src/PrimitivesPlugin/doc/images/box_2pt_32x32.png b/src/PrimitivesPlugin/doc/images/box_2pt_32x32.png new file mode 100644 index 000000000..1294e0391 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/box_2pt_32x32.png differ diff --git a/src/PrimitivesPlugin/doc/images/box_dxyz_32x32.png b/src/PrimitivesPlugin/doc/images/box_dxyz_32x32.png new file mode 100644 index 000000000..297c9a8e4 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/box_dxyz_32x32.png differ diff --git a/src/PrimitivesPlugin/doc/images/cylinder_32x32.png b/src/PrimitivesPlugin/doc/images/cylinder_32x32.png new file mode 100644 index 000000000..6de9c1c6b Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/cylinder_32x32.png differ diff --git a/src/PrimitivesPlugin/doc/images/cylinder_portion_32x32.png b/src/PrimitivesPlugin/doc/images/cylinder_portion_32x32.png new file mode 100644 index 000000000..790d6abe9 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/cylinder_portion_32x32.png differ diff --git a/src/PrimitivesPlugin/doc/sphereFeature.rst b/src/PrimitivesPlugin/doc/sphereFeature.rst index cb731b3c2..a89235d70 100644 --- a/src/PrimitivesPlugin/doc/sphereFeature.rst +++ b/src/PrimitivesPlugin/doc/sphereFeature.rst @@ -2,9 +2,45 @@ Sphere ====== +The feature Sphere creates a sphere solid. + +To create a Sphere in the active part: + +#. select in the Main Menu *Primitives - > Sphere* item or +#. click **Sphere** button in the toolbar + +.. image:: images/Sphere_button.png + :align: center + +.. centered:: + **Sphere** button + +The following property panel appears. .. image:: images/Sphere.png :align: center .. centered:: - Create a sphere + Sphere property panel + +Input fields: + +- **Point** defines center of the sphere selected in 3D OCC viewer or object browser; +- **Radius** defines the radius. + +**TUI Command**: *model.addSphere(Part_doc, Point, Radius)*. + +**Arguments**: Part + 1 vertex + 1 real value (radius). + +Result +"""""" + +Example is shown below. + +.. image:: images/Sphere_res.png + :align: center + +.. centered:: + Sphere created + +**See Also** a sample TUI Script of a :ref:`tui_create_sphere` operation. diff --git a/src/PrimitivesPlugin/doc/torusFeature.rst b/src/PrimitivesPlugin/doc/torusFeature.rst index 6b5be953a..9d3e02242 100644 --- a/src/PrimitivesPlugin/doc/torusFeature.rst +++ b/src/PrimitivesPlugin/doc/torusFeature.rst @@ -2,9 +2,49 @@ Torus ===== +The feature Torus creates a torus solid. + +To create a Torus in the active part: + +#. select in the Main Menu *Primitives - > Torus* item or +#. click **Torus** button in the toolbar + +.. image:: images/Torus_button.png + :align: center + +.. centered:: + **Torus** button + +The following property panel appears. .. image:: images/Torus.png :align: center .. centered:: - Create a torus + Torus + +Input fields: + +- **Point** defines center of the torus base selected in 3D OCC viewer or object browser; +- **Vector** defines the axis of the torus selected in 3D OCC viewer or object browser; +- Dimensions: + - **Radius**; + - **Ring radius**. + +**TUI Command**: *model.addTorus(Part_doc, Point, Axis, Radius1, Radius2)* + +**Arguments**: Part + 1 vertex + 1 vector + 2 real values (first and second radii). + +Result +"""""" + +Example is shown below. + +.. image:: images/Torus_res.png + :align: center + +.. centered:: + Torus created + +**See Also** a sample TUI Script of a :ref:`tui_create_torus` operation. + diff --git a/src/PrimitivesPlugin/plugin-Primitives.xml b/src/PrimitivesPlugin/plugin-Primitives.xml index a4e85ce55..c7d5a4b62 100644 --- a/src/PrimitivesPlugin/plugin-Primitives.xml +++ b/src/PrimitivesPlugin/plugin-Primitives.xml @@ -23,31 +23,31 @@ email : webmaster.salome@opencascade.com + helpfile="boxFeature.html"> + helpfile="cylinderFeature.html"> + helpfile="sphereFeature.html"> + helpfile="torusFeature.html"> + helpfile="coneFeature.html"> diff --git a/src/PythonAddons/doc/addons_Features.rst b/src/PythonAddons/doc/addons_Features.rst new file mode 100644 index 000000000..26ba489c2 --- /dev/null +++ b/src/PythonAddons/doc/addons_Features.rst @@ -0,0 +1,23 @@ + +Python addons +============= + +User can create his own custom features. + +Corresponding folder should be created for each feature at *../sources/src/PythonAddons/macros*. + +Feature description includes 4 files: + +- widget.xml with description of property panel, +- __init__.py, +- feature.py with python commands, +- icon.png with image of button in toolbar (file is located at sub-folder /icons). + +Two examples of custom features already created are: + +.. toctree:: + :titlesonly: + :maxdepth: 1 + + boxFeature.rst + rectangleFeature.rst diff --git a/src/PythonAddons/doc/boxFeature.rst b/src/PythonAddons/doc/boxFeature.rst new file mode 100644 index 000000000..0d3674083 --- /dev/null +++ b/src/PythonAddons/doc/boxFeature.rst @@ -0,0 +1,48 @@ + +Box +=== + +Custom files for feature **Box** are: + +- empty __init__.py, +- :ref:`create_custom_box_py`, +- :ref:`create_custom_box_xml`, +- icon.png located at sub-folder */icons*. + +.. image:: images/box_ico.png + :align: center + +.. centered:: + File icon.png + +The custom feature **Box** creates a box solid by extrusion of rectangle. + +To create a Box in the active part: + +#. select in the Main Menu *Macros - > Box* item or +#. click **Box** button in the Macros toolbar corresponding to file icon.png: + +The following property panel appears. + +.. image:: images/box_property_panel.png + :align: center + +.. centered:: + Create a box + +Input fields: + +- **Width**, **Length**, **Height** are sizes of the box along corresponding coordinate axes. The box will be created starting from the origin. + +Result +"""""" + +The Result of operation will be Extrusion and Sketch. + +The edges of the box will be parallel to the coordinate axes. + +.. image:: images/Boxes.png + :align: center + +.. centered:: + Box created \ No newline at end of file diff --git a/src/PythonAddons/doc/examples/box/feature.py b/src/PythonAddons/doc/examples/box/feature.py new file mode 100644 index 000000000..72fc83d53 --- /dev/null +++ b/src/PythonAddons/doc/examples/box/feature.py @@ -0,0 +1,147 @@ +## Copyright (C) 2014-2017 CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + +"""Box macro-feature +Authors: Renaud Nedelec - Daniel Brunier-Coulin +Copyright (C) 2014-20xx CEA/DEN, EDF R&D +""" + +from salome.shaper import model +from salome.shaper import geom + + +class BoxFeature(model.Feature): + """An example of Box feature implementation. + + BoxFeature() -> Box + """ + +# Initializations + + def __init__(self): + """x.__init__(...) initializes x; see x.__class__.__doc__ for signature""" + model.Feature.__init__(self) + + @staticmethod + def ID(): + """Return Id of the feature.""" + return "Box_script" + + @staticmethod + def WIDTH_ID(): + """Returns ID of Width parameter.""" + return "width" + + @staticmethod + def LENGTH_ID(): + """Returns ID of Length parameter.""" + return "length" + + @staticmethod + def HEIGHT_ID(): + """Returns ID of Height parameter.""" + return "height" + + def getKind(self): + """Override Feature.getKind()""" + return BoxFeature.ID() + + +# Creation of the box at default size + + def initAttributes(self): + """Override Feature.initAttributes()""" + # Creating the input arguments of the feature + self.addRealInput(self.WIDTH_ID()) + self.addRealInput(self.LENGTH_ID()) + self.addRealInput(self.HEIGHT_ID()) + + # Creating the base of the box with unit values + mypart = model.activeDocument() + xoy = model.defaultPlane("XOY") + + # A base of the geometry + self.base = model.addSketch(mypart, xoy) + + p1 = geom.Pnt2d(0, 0) + p2 = geom.Pnt2d(0, 1) + p3 = geom.Pnt2d(1, 1) + p4 = geom.Pnt2d(1, 0) + + line = model.addPolygon(self.base, p1, p2, p3, p4) + + self.base.setFixed(line[0].startPoint()) + self.base.setVertical(line[0]) + + # Setting the size of the base with default values + # Width + self.width = self.base.setLength(line[3], 50) # Keeps the constraint for edition + # Length + self.length = self.base.setLength(line[0], 50) # Keeps the constraint for edition + + # Keeping the rectangle + self.base.setParallel(line[0], line[2]) + self.base.setParallel(line[1], line[3]) + self.base.setPerpendicular(line[0], line[3]) + + # execute sketch + mypart.setCurrentFeature(self.base.feature(), False) + model.updateFeatures() + + # Creating the extrusion (the box) at default size + # A box result + self.box = model.addExtrusion(mypart, self.base.selectFace(), 50) + +# Edition of the box at user size + + def execute(self): + """F.execute() -- execute the feature""" + # Retrieving the user inputs + width = self.real(self.WIDTH_ID()) + length = self.real(self.LENGTH_ID()) + height = self.real(self.HEIGHT_ID()) + + # Editing the box + if width.text() == "": + self.base.setValue(self.width, width.value()) + else: + self.base.setValue(self.width, width.text()) + + if length.text() == "": + self.base.setValue(self.length, length.value()) + else: + self.base.setValue(self.length, length.text()) + + if (height.text() == ""): + self.box.setSize(height.value()) + else: + self.box.setSize(height.text()) + + # Publishing the result: not needed for Macro feature + # self.addResult( self.box.result() ) + + def isMacro(self): + """Override Feature.initAttributes(). + F.isMacro() -> True + + Box feature is macro: removes itself on the creation transaction + finish. + """ + return True diff --git a/src/PythonAddons/doc/examples/box/widget.xml b/src/PythonAddons/doc/examples/box/widget.xml new file mode 100644 index 000000000..f45e45410 --- /dev/null +++ b/src/PythonAddons/doc/examples/box/widget.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/PythonAddons/doc/examples/rectangle/feature.py b/src/PythonAddons/doc/examples/rectangle/feature.py new file mode 100644 index 000000000..2407a4d11 --- /dev/null +++ b/src/PythonAddons/doc/examples/rectangle/feature.py @@ -0,0 +1,207 @@ +## Copyright (C) 2014-2017 CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + +""" +Macro-feature to produce rectangle in the sketcher +Author: Artem ZHIDKOV +Copyright (C) 2016-20xx CEA/DEN, EDF R&D +""" + +from salome.shaper import model +import ModelAPI +import GeomDataAPI + +class SketchPlugin_Rectangle(model.Feature): + """ + Implementation of rectangle creation. + + It produced 2 horizontal lines and 2 vertical lines connected by coincidence constraints + """ + +# Initializations + + def __init__(self): + """x.__init__(...) initializes x; see x.__class__.__doc__ for signature""" + model.Feature.__init__(self) + + @staticmethod + def ID(): + """Rectangle feature kind.""" + return "SketchRectangle" + + @staticmethod + def START_ID(): + """Returns ID of first corner.""" + return "RectStartPoint" + + @staticmethod + def END_ID(): + """Returns ID of second corner.""" + return "RectEndPoint" + + @staticmethod + def AUXILIARY_ID(): + """Returns whether the rectangle is accessory.""" + return "Auxiliary" + + @staticmethod + def LINES_LIST_ID(): + """Returns ID of list containing lines created.""" + return "RectangleList" + + def getKind(self): + """Override Feature.getKind()""" + return SketchPlugin_Rectangle.ID() + + +# Initialization of the rectangle + + def initAttributes(self): + """Override Feature.initAttributes()""" + # Flag whether the rectangle is accessory + self.data().addAttribute(self.AUXILIARY_ID(), ModelAPI.ModelAPI_AttributeBoolean_typeId()) + # Creating corners of the rectangle + self.data().addAttribute(self.START_ID(), GeomDataAPI.GeomDataAPI_Point2D_typeId()) + self.data().addAttribute(self.END_ID(), GeomDataAPI.GeomDataAPI_Point2D_typeId()) + # Creating list to store lines + self.data().addAttribute(self.LINES_LIST_ID(), ModelAPI.ModelAPI_AttributeRefList_typeId()) + ModelAPI.ModelAPI_Session.get().validators().registerNotObligatory(self.getKind(), self.LINES_LIST_ID()) + + def isMacro(self): + """ + Override Feature.isMacro(). + Rectangle feature is macro: removes itself on the creation transaction finish. + """ + return True + +# Edition of the rectangle + + def execute(self): + # Retrieving list of already created lines + aLinesList = self.reflist(self.LINES_LIST_ID()) + aNbLines = aLinesList.size() + if aNbLines == 1: + # Create 1-4 lines to compose the rectangle + for i in range (0, 3): + aLine = self.__sketch.addFeature("SketchLine") + aLinesList.append(aLine) + self.updateLines() + aNbLines = aLinesList.size() + # Create constraints to keep the rectangle + for i in range (0, aNbLines): + aLine = ModelAPI.objectToFeature(aLinesList.object(i)) + # connect neighbor lines by coincidence + iPrev = i - 1 + if iPrev < 0: + iPrev = aNbLines - 1 + aPrevLine = ModelAPI.objectToFeature(aLinesList.object(iPrev)) + aCoincidence = self.__sketch.addFeature("SketchConstraintCoincidence") + aRefAttrA = aCoincidence.refattr("ConstraintEntityA") + aRefAttrB = aCoincidence.refattr("ConstraintEntityB") + aRefAttrA.setAttr(aPrevLine.attribute("EndPoint")) + aRefAttrB.setAttr(aLine.attribute("StartPoint")) + # Flags which show horizontal or vertical constraint is build for correponding line + self.__isHV = [False, False, False, False] + # Update coordinates of created lines + self.updateLines() + # Add horizontal and vertical constraint for the lines which already have result + for i in range (0, aNbLines): + if self.__isHV[i]: + continue + aLine = ModelAPI.objectToFeature(aLinesList.object(i)) + aLineResult = aLine.lastResult() + if aLineResult is None: + continue + aHVName = "SketchConstraintHorizontal" + if i % 2 == 1: + aHVName = "SketchConstraintVertical" + aHVConstraint = self.__sketch.addFeature(aHVName) + aRefAttrA = aHVConstraint.refattr("ConstraintEntityA") + aRefAttrA.setObject(aLine.lastResult()) + self.__isHV[i] = True + + def attributeChanged(self, theID): + if theID == self.START_ID() or theID == self.END_ID(): + # Search the sketch containing this rectangle + self.__sketch = None + aRefs = self.data().refsToMe(); + for iter in aRefs: + aFeature = ModelAPI.objectToFeature(iter.owner()) + if aFeature.getKind() == "Sketch": + self.__sketch = ModelAPI.featureToCompositeFeature(aFeature) + break + + aLinesList = self.reflist(self.LINES_LIST_ID()) + aNbLines = aLinesList.size() + if aNbLines == 0: + # Create first line to be able to create a coincidence with selected point/feature + for i in range (0, 1): + aLine = self.__sketch.addFeature("SketchLine") + aLinesList.append(aLine) + + aStartPoint = GeomDataAPI.geomDataAPI_Point2D(self.attribute(self.START_ID())) + aEndPoint = GeomDataAPI.geomDataAPI_Point2D(self.attribute(self.END_ID())) + if aStartPoint.isInitialized() and aEndPoint.isInitialized(): + self.updateLines() + else: + self.updateStartPoint() + if theID == self.AUXILIARY_ID(): + anAuxiliary = self.data().boolean(self.AUXILIARY_ID()).value() + aLinesList = self.reflist(self.LINES_LIST_ID()) + aNbLines = aLinesList.size() + # Update coordinates of rectangle lines + for i in range (0, aNbLines): + aLine = ModelAPI.objectToFeature(aLinesList.object(i)) + aLine.data().boolean("Auxiliary").setValue(anAuxiliary) + + + def updateLines(self): + # Retrieving list of already created lines + aLinesList = self.reflist(self.LINES_LIST_ID()) + aNbLines = aLinesList.size() + aStartPoint = GeomDataAPI.geomDataAPI_Point2D(self.attribute(self.START_ID())) + aEndPoint = GeomDataAPI.geomDataAPI_Point2D(self.attribute(self.END_ID())) + aX = [aStartPoint.x(), aStartPoint.x(), aEndPoint.x(), aEndPoint.x()] + aY = [aStartPoint.y(), aEndPoint.y(), aEndPoint.y(), aStartPoint.y()] + anAuxiliary = self.data().boolean(self.AUXILIARY_ID()).value() + + # Update coordinates of rectangle lines + for i in range (0, aNbLines): + aLine = ModelAPI.objectToFeature(aLinesList.object(i)) + aLineStart = GeomDataAPI.geomDataAPI_Point2D(aLine.attribute("StartPoint")) + aLineEnd = GeomDataAPI.geomDataAPI_Point2D(aLine.attribute("EndPoint")) + aLineStart.setValue(aX[i-1], aY[i-1]) + aLineEnd.setValue(aX[i], aY[i]) + aLine.data().boolean("Auxiliary").setValue(anAuxiliary) + + def updateStartPoint(self): + # Retrieving list of already created lines + aLinesList = self.reflist(self.LINES_LIST_ID()) + aNbLines = aLinesList.size() + + aStartPoint = GeomDataAPI.geomDataAPI_Point2D(self.attribute(self.START_ID())) + aX = aStartPoint.x() + aY = aStartPoint.y() + + # Update coordinates of rectangle lines + for i in range (0, aNbLines): + aLine = ModelAPI.objectToFeature(aLinesList.object(i)) + aLineStart = GeomDataAPI.geomDataAPI_Point2D(aLine.attribute("EndPoint")) + aLineStart.setValue(aX, aY) diff --git a/src/PythonAddons/doc/examples/rectangle/widget.xml b/src/PythonAddons/doc/examples/rectangle/widget.xml new file mode 100644 index 000000000..45d5ef793 --- /dev/null +++ b/src/PythonAddons/doc/examples/rectangle/widget.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + diff --git a/src/PythonAddons/doc/images/box_ico.png b/src/PythonAddons/doc/images/box_ico.png new file mode 100644 index 000000000..104a1edde Binary files /dev/null and b/src/PythonAddons/doc/images/box_ico.png differ diff --git a/src/PythonAddons/doc/images/rectangle.png b/src/PythonAddons/doc/images/rectangle.png new file mode 100644 index 000000000..b98a99162 Binary files /dev/null and b/src/PythonAddons/doc/images/rectangle.png differ diff --git a/src/PythonAddons/doc/pyFile_boxFeature.rst b/src/PythonAddons/doc/pyFile_boxFeature.rst new file mode 100644 index 000000000..dd2f5fa21 --- /dev/null +++ b/src/PythonAddons/doc/pyFile_boxFeature.rst @@ -0,0 +1,11 @@ + + .. _create_custom_box_py: + +File feature.py +=============== + +.. literalinclude:: examples/box/feature.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/PythonAddons/doc/pyFile_rectangleFeature.rst b/src/PythonAddons/doc/pyFile_rectangleFeature.rst new file mode 100644 index 000000000..bbe2eafdb --- /dev/null +++ b/src/PythonAddons/doc/pyFile_rectangleFeature.rst @@ -0,0 +1,11 @@ + + .. _create_custom_rectangle_py: + +File feature.py +=============== + +.. literalinclude:: examples/rectangle/feature.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/PythonAddons/doc/rectangleFeature.rst b/src/PythonAddons/doc/rectangleFeature.rst new file mode 100644 index 000000000..98b9247ae --- /dev/null +++ b/src/PythonAddons/doc/rectangleFeature.rst @@ -0,0 +1,18 @@ + +Rectangle +========= + +Custom files for feature **Rectangle** are: + +- empty __init__.py, +- :ref:`create_custom_rectangle_py`, +- :ref:`create_custom_rectangle_xml`, +- icon.png located at sub-folder */icons*. + +.. image:: images/rectangle.png + :align: center + +.. centered:: + File icon.png + +Description of custom feature :ref:`create_sketch_rectangle` is given in Sketch plug-in. \ No newline at end of file diff --git a/src/PythonAddons/doc/xmlFile_boxFeature.rst b/src/PythonAddons/doc/xmlFile_boxFeature.rst new file mode 100644 index 000000000..cd3e5c872 --- /dev/null +++ b/src/PythonAddons/doc/xmlFile_boxFeature.rst @@ -0,0 +1,11 @@ + + .. _create_custom_box_xml: + +File widget.xml +=============== + +.. literalinclude:: examples/box/widget.xml + :linenos: + :language: html + +:download:`Download this script ` \ No newline at end of file diff --git a/src/PythonAddons/doc/xmlFile_rectangleFeature.rst b/src/PythonAddons/doc/xmlFile_rectangleFeature.rst new file mode 100644 index 000000000..1901d9629 --- /dev/null +++ b/src/PythonAddons/doc/xmlFile_rectangleFeature.rst @@ -0,0 +1,11 @@ + + .. _create_custom_rectangle_xml: + +File widget.xml +=============== + +.. literalinclude:: examples/rectangle/widget.xml + :linenos: + :language: html + +:download:`Download this script ` \ No newline at end of file diff --git a/src/PythonAddons/macros/box/widget.xml b/src/PythonAddons/macros/box/widget.xml index 51d5a0c07..f45e45410 100644 --- a/src/PythonAddons/macros/box/widget.xml +++ b/src/PythonAddons/macros/box/widget.xml @@ -23,7 +23,8 @@ email : webmaster.salome@opencascade.com - + diff --git a/src/PythonAddons/macros/rectangle/widget.xml b/src/PythonAddons/macros/rectangle/widget.xml index 5b36b6d0c..45d5ef793 100644 --- a/src/PythonAddons/macros/rectangle/widget.xml +++ b/src/PythonAddons/macros/rectangle/widget.xml @@ -29,7 +29,7 @@ email : webmaster.salome@opencascade.com + helpfile="rectangleFeature.html"> Sketch* item or +#. click **Sketch** button in Sketch toolbar: + +.. image:: images/SketchButton.png + :align: center .. centered:: - Start sketcher + **Sketch** button + +First define a plane on which to create a sketch: + +.. image:: images/PlaneDefinition.png + :align: center + +- specify plane size (equal to 25 in the example above) +- then select the appropriate plane in the viewer +Note that in case if there are no convenient objects for plane selection are +displayed in the viewer - coordinate planes will be suggested for selection: +.. image:: images/CoordinatePlanes.png + :align: center -.. image:: images/SketchProperties.png - :align: center +After the plane for sketch is selected the following property panel will be opened: + +.. image:: images/SketchPanel.png + :align: center .. centered:: - Sketcher properies panel + Sketch general panel + +- **Reversed** check box - allows reversing the sketch plane normal +- **Set plane view** button - switches the viewer to the top view for the sketch plane +- **Show geometrical constraints** check box - turns on/off geometrical constraints displaying +- **Show dimensional constraints** check box - turns on/off dimensional constraints displaying +- **Show existing expressions** check box - turns on/off expressions displaying + +Now it is possible: + +- create :ref:`sketch objects ` +- create :ref:`constraints ` +- perform :ref:`sketch operations ` + +To apply or cancel sketch creation use apply and cancel buttons from the +Sketch panel as well as equivalent buttons from Sketch toolbar. + +The Result of operation will be a COMPOUND. Result node in the object tree is located in +**Constructions** folder. + +Name is assigned automatically: **Sketch_1**, **Sketch_2**, ... both for Feature and Result. + +**TUI Command**: *Sketch_1 = model.addSketch(PartOrPartSet, plane)* +**Arguments**: Part or PartSet + plane. + +.. _sketch_objects: Sketch objects -------------- +The plug-in includes the following features for creation of 2D objects: + .. toctree:: :maxdepth: 1 - arcFeature.rst - circleFeature.rst - ellipseFeature.rst - lineFeature.rst pointFeature.rst + lineFeature.rst + rectangleFeature.rst + circleFeature.rst + arcFeature.rst + +.. _sketch_constraints: Constraints ----------- +Constraints are available and viewable during sketch creation or editing. + +The goal of constrains creation is to fix a sketch geometry, i.e. set degrees of freedom to zero. + +If all degrees of freedom are eliminated, the sketch is fixed and displayed with green color. + +.. image:: images/Sketch_fixed.png + :align: center + +.. centered:: + Fixed Sketch + +If any degrees of freedom remain unsolved, the sketch is under-constrained and displayed with red color. + +.. image:: images/Sketch_underconstrained.png + :align: center + +.. centered:: + Underconstrained Sketch + +The plug-in includes the following constraints: + .. toctree:: :maxdepth: 1 - angleFeature.rst - coincedenceFeature.rst - collinearFeature.rst distanceFeature.rst - equalFeature.rst horizontalDistFeature.rst - horizontalFeature.rst + verticalDistFeature.rst lengthFeature.rst - middleFeature.rst + angleFeature.rst + radiusFeature.rst + horizontalFeature.rst + verticalFeature.rst + fixedFeature.rst parallelFeature.rst perpendicularFeature.rst - radiusFeature.rst - rigidFeature.rst tangentFeature.rst - verticalDistFeature.rst - verticalFeature.rst + coincedentFeature.rst + middleFeature.rst + equalFeature.rst + collinearFeature.rst + +.. _sketch_operations: Operations ---------- +The plug-in includes the following operations: + .. toctree:: :maxdepth: 1 filletFeature.rst + splitFeature.rst + trimFeature.rst + projectionFeature.rst intersectionFeature.rst mirrorFeature.rst - projectionFeature.rst - rotationFeature.rst - splitFeature.rst translationFeature.rst - trimFeature.rst + rotationFeature.rst diff --git a/src/SketchPlugin/doc/TUI_angle.rst b/src/SketchPlugin/doc/TUI_angle.rst new file mode 100644 index 000000000..8b067f6c7 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_angle.rst @@ -0,0 +1,11 @@ + + .. _tui_create_angle: + +Create Angle constraint +======================= + +.. literalinclude:: examples/angle.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_arcFeature.rst b/src/SketchPlugin/doc/TUI_arcFeature.rst new file mode 100644 index 000000000..93259c839 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_arcFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_create_arc: + +Create Skecth Arc +================= + +.. literalinclude:: examples/arc.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_circleFeature.rst b/src/SketchPlugin/doc/TUI_circleFeature.rst new file mode 100644 index 000000000..c6f4ceff0 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_circleFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_create_circle: + +Create Skecth Circle +==================== + +.. literalinclude:: examples/circle.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_coincident.rst b/src/SketchPlugin/doc/TUI_coincident.rst new file mode 100644 index 000000000..579d600ff --- /dev/null +++ b/src/SketchPlugin/doc/TUI_coincident.rst @@ -0,0 +1,11 @@ + + .. _tui_create_coincident: + +Create Coincident constraint +============================ + +.. literalinclude:: examples/coincident.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_collinear.rst b/src/SketchPlugin/doc/TUI_collinear.rst new file mode 100644 index 000000000..f840ae6e7 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_collinear.rst @@ -0,0 +1,11 @@ + + .. _tui_create_collinear: + +Create Collinear constraint +=========================== + +.. literalinclude:: examples/collinear.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_distance.rst b/src/SketchPlugin/doc/TUI_distance.rst new file mode 100644 index 000000000..260369b42 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_distance.rst @@ -0,0 +1,11 @@ + + .. _tui_create_distance: + +Create Distance constraint +========================== + +.. literalinclude:: examples/distance.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_equal.rst b/src/SketchPlugin/doc/TUI_equal.rst new file mode 100644 index 000000000..1a61814f1 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_equal.rst @@ -0,0 +1,11 @@ + + .. _tui_create_equal: + +Create Equal constraint +======================= + +.. literalinclude:: examples/equal.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_fillet.rst b/src/SketchPlugin/doc/TUI_fillet.rst new file mode 100644 index 000000000..a533910e6 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_fillet.rst @@ -0,0 +1,11 @@ + + .. _tui_create_fillet: + +Create Fillet +============= + +.. literalinclude:: examples/fillet.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_fixed.rst b/src/SketchPlugin/doc/TUI_fixed.rst new file mode 100644 index 000000000..1c8b471e5 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_fixed.rst @@ -0,0 +1,11 @@ + + .. _tui_create_fixed: + +Create Fixed constraint +======================= + +.. literalinclude:: examples/fixed.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_hdistance.rst b/src/SketchPlugin/doc/TUI_hdistance.rst new file mode 100644 index 000000000..fc300376c --- /dev/null +++ b/src/SketchPlugin/doc/TUI_hdistance.rst @@ -0,0 +1,11 @@ + + .. _tui_create_hdistance: + +Create Horizontal Distance constraint +===================================== + +.. literalinclude:: examples/hdistance.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_horizontal.rst b/src/SketchPlugin/doc/TUI_horizontal.rst new file mode 100644 index 000000000..2ccbead63 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_horizontal.rst @@ -0,0 +1,11 @@ + + .. _tui_create_horizontal: + +Create Horizontal constraint +============================ + +.. literalinclude:: examples/horizontal.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_intersection.rst b/src/SketchPlugin/doc/TUI_intersection.rst new file mode 100644 index 000000000..88ad75240 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_intersection.rst @@ -0,0 +1,11 @@ + + .. _tui_create_intersection: + +Create Intersection +=================== + +.. literalinclude:: examples/intersection.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_length.rst b/src/SketchPlugin/doc/TUI_length.rst new file mode 100644 index 000000000..368851c6e --- /dev/null +++ b/src/SketchPlugin/doc/TUI_length.rst @@ -0,0 +1,11 @@ + + .. _tui_create_length: + +Create Length constraint +======================== + +.. literalinclude:: examples/length.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_lineFeature.rst b/src/SketchPlugin/doc/TUI_lineFeature.rst new file mode 100644 index 000000000..f4c180999 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_lineFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_create_line: + +Create Skecth Line +================== + +.. literalinclude:: examples/line.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_middle.rst b/src/SketchPlugin/doc/TUI_middle.rst new file mode 100644 index 000000000..4f87ed86f --- /dev/null +++ b/src/SketchPlugin/doc/TUI_middle.rst @@ -0,0 +1,11 @@ + + .. _tui_create_middle: + +Create Middle point constraint +============================== + +.. literalinclude:: examples/middle.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_mirror.rst b/src/SketchPlugin/doc/TUI_mirror.rst new file mode 100644 index 000000000..e1c504211 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_mirror.rst @@ -0,0 +1,11 @@ + + .. _tui_create_mirror: + +Create Mirror copy +================== + +.. literalinclude:: examples/mirror.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_parallel.rst b/src/SketchPlugin/doc/TUI_parallel.rst new file mode 100644 index 000000000..428900eb5 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_parallel.rst @@ -0,0 +1,11 @@ + + .. _tui_create_parallel: + +Create Parallel constraint +========================== + +.. literalinclude:: examples/parallel.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_perpendicular.rst b/src/SketchPlugin/doc/TUI_perpendicular.rst new file mode 100644 index 000000000..78abd1d3c --- /dev/null +++ b/src/SketchPlugin/doc/TUI_perpendicular.rst @@ -0,0 +1,11 @@ + + .. _tui_create_perpendicular: + +Create Perpendicular constraint +========================== + +.. literalinclude:: examples/perpendicular.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_pointFeature.rst b/src/SketchPlugin/doc/TUI_pointFeature.rst new file mode 100644 index 000000000..37f66f7f9 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_pointFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_create_point: + +Create Skecth Point +=================== + +.. literalinclude:: examples/point.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_projection.rst b/src/SketchPlugin/doc/TUI_projection.rst new file mode 100644 index 000000000..6fa3f8419 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_projection.rst @@ -0,0 +1,11 @@ + + .. _tui_create_projection: + +Create Projection +================= + +.. literalinclude:: examples/projection.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_radius.rst b/src/SketchPlugin/doc/TUI_radius.rst new file mode 100644 index 000000000..45d2ad033 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_radius.rst @@ -0,0 +1,11 @@ + + .. _tui_create_radius: + +Create Radius constraint +======================== + +.. literalinclude:: examples/radius.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_rectangleFeature.rst b/src/SketchPlugin/doc/TUI_rectangleFeature.rst new file mode 100644 index 000000000..9298af6b9 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_rectangleFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_create_rectangle: + +Create Skecth Rectangle +======================= + +.. literalinclude:: examples/rectangle.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_rotation.rst b/src/SketchPlugin/doc/TUI_rotation.rst new file mode 100644 index 000000000..5186a41b2 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_rotation.rst @@ -0,0 +1,11 @@ + + .. _tui_create_rotation: + +Create Angular copy +=================== + +.. literalinclude:: examples/rotation.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_split.rst b/src/SketchPlugin/doc/TUI_split.rst new file mode 100644 index 000000000..b78f82ee0 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_split.rst @@ -0,0 +1,11 @@ + + .. _tui_create_split: + +Create Split +============ + +.. literalinclude:: examples/split.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_tangent.rst b/src/SketchPlugin/doc/TUI_tangent.rst new file mode 100644 index 000000000..17f10f2a6 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_tangent.rst @@ -0,0 +1,11 @@ + + .. _tui_create_tangent: + +Create Tangent constraint +========================= + +.. literalinclude:: examples/tangent.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_translation.rst b/src/SketchPlugin/doc/TUI_translation.rst new file mode 100644 index 000000000..7273d3b1e --- /dev/null +++ b/src/SketchPlugin/doc/TUI_translation.rst @@ -0,0 +1,11 @@ + + .. _tui_create_translation: + +Create Linear copy +================== + +.. literalinclude:: examples/translation.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_trim.rst b/src/SketchPlugin/doc/TUI_trim.rst new file mode 100644 index 000000000..90f35528c --- /dev/null +++ b/src/SketchPlugin/doc/TUI_trim.rst @@ -0,0 +1,11 @@ + + .. _tui_create_trim: + +Create Trim +=========== + +.. literalinclude:: examples/trim.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_vdistance.rst b/src/SketchPlugin/doc/TUI_vdistance.rst new file mode 100644 index 000000000..38b38f3ed --- /dev/null +++ b/src/SketchPlugin/doc/TUI_vdistance.rst @@ -0,0 +1,11 @@ + + .. _tui_create_vdistance: + +Create Vertical Distance constraint +===================================== + +.. literalinclude:: examples/vdistance.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_vertical.rst b/src/SketchPlugin/doc/TUI_vertical.rst new file mode 100644 index 000000000..8ed40ecce --- /dev/null +++ b/src/SketchPlugin/doc/TUI_vertical.rst @@ -0,0 +1,11 @@ + + .. _tui_create_vertical: + +Create Vertical constraint +========================== + +.. literalinclude:: examples/vertical.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/angleFeature.rst b/src/SketchPlugin/doc/angleFeature.rst index 004f80781..624e1220d 100644 --- a/src/SketchPlugin/doc/angleFeature.rst +++ b/src/SketchPlugin/doc/angleFeature.rst @@ -2,9 +2,88 @@ Angle constraint ================ +Angle constraint fixes angle between two lines. -.. image:: images/Angle.png - :align: center +| Angle between two lines is thought of as an angle between two vectors. +| So each line is treated as a vector with starting point equal to the line start point +and terminal point equal to the line end point. + +To create Angle constraint in the active Sketch: + +#. select in the Main Menu *Sketch - > Angle* item or +#. click **Angle** button in Sketch toolbar: + +.. image:: images/angle_constr.png + :align: center + +.. centered:: + **Angle** button + +Property panel: + +.. image:: images/Angle_panel.png + :align: center + +Input fields: + +- **Line 1** is the first line selected in the view +- **Line 2** is the second line selected in the view +- **Value** is an angle between the lines, could be modified to set the desirable value +- **Angle type** is a type of angle measurement + .. image:: images/angle_direct.png + :align: left + **Direct** is an angle type measured directly between two lines. + + .. image:: images/angle_complementary.png + :align: left + **Complementary** zzzzzzzz. + + .. image:: images/angle_backward.png + :align: left + **Backward** zzzzzzzz. +- **Text location** is a position of the angle value label relating to angle line (in the view) + .. image:: images/location_left.png + :align: left + **Left** inserts text at the left of the angle line. + + .. image:: images/location_automatic.png + :align: left + **Automatic** inserts text at the middle of the angle line if it has enough length, otherwise - to the left. + + .. image:: images/location_right.png + :align: left + **Right** inserts text to the right of the angle line. + +When both lines are selected angle value is displayed in the property panel and in the view. + +When creating the constraint, after selection of two lines at the first time: + +- drag the angle presentation in the view to the desired position (by move mouse and click once) +- set desirable angle value in the input field in the view and press **Enter** or just press **Enter** to keep the current angle + +.. image:: images/Angle_field_view.png + :align: center .. centered:: - Create an angle constraint + Angle input in the view + +**TUI Command**: + +- *Sketch_1.setAngle(Line1, Line2, Value)* +- *Sketch_1.setAngleComplementary(Line1, Line2, Value)* +- *Sketch_1.setAngleBackward(Line1, Line2, Value)* + +**Arguments**: 2 lines + angle value + +Result +"""""" + +Created Angle appears in the view. + +.. image:: images/Angle_res.png + :align: center + +.. centered:: + Angle created + +**See Also** a sample TUI Script of a :ref:`tui_create_angle` operation. \ No newline at end of file diff --git a/src/SketchPlugin/doc/arcFeature.rst b/src/SketchPlugin/doc/arcFeature.rst index a830d1874..9e5c258e0 100644 --- a/src/SketchPlugin/doc/arcFeature.rst +++ b/src/SketchPlugin/doc/arcFeature.rst @@ -2,23 +2,93 @@ Arc === +The feature Arc creates an arc segment in the current Sketch. -.. image:: images/Arc1.png - :align: center +To add new Arc to the Sketch: + +#. select in the Main Menu *Sketch - > Arc* item or +#. click **Arc** button in Sketch toolbar: + +.. image:: images/arc.png + :align: center .. centered:: - Create arc by center and two points + **Arc** button +There are 3 algorithms for creation of an Arc: -.. image:: images/Arc2.png - :align: center +.. image:: images/arc_base_32x32.png + :align: left +**By center and two points** creates an arc segment with the given center passing from the start point to the end point on the circumference. -.. centered:: - Create arc by three points +.. image:: images/arc_3pt_32x32.png + :align: left +**By three points** creates an arc segment passing from the start point to end point through another point on the circumference. + +.. image:: images/arc_tang_32x32.png + :align: left +**By tangent point and end point** creates an arc segment with the tangent point and the end point. + +By center and two points +"""""""""""""""""""""""" + +.. image:: images/Arc_panel_base.png + :align: center + +Click in the view once to set the center point, then move the mouse and click a second time to set the start point +and finally move the mouse and click a third time to set the last passed point. + +- When entering a center or start point by selecting either a point or a segment, a Coincident constraint is created. +- When entering an end point by selecting a segment, a Coincident constraint is created. +- When entering an end point, only segments are selectable. + +**TUI Command**: *Sketch_1.addArc(CenterX, CenterY, StartX, StartY, EndX, EndY, Inversed)* + +**Arguments**: 7 values (coordinates of the center, the start, the end, inversed flag (if true - build arc from end to start)). + +By three points +""""""""""""""" + +.. image:: images/Arc_panel_3pt.png + :align: center +Click in the view once to set the start point, then move the mouse and click a second time to set the end point +and finally move the mouse and click a third time to set the passed point. -.. image:: images/Arc3.png - :align: center +- When entering a start or end point by selecting either a point or a segment, a Coincident constraint is created. +- When entering a passing point by selecting a point, a Coincident constraint is created. +- When entering a passing point by selecting a segment, a Tangent constraint is created. + +**TUI Command**: *Sketch_1.addArc(StartX, StartY, EndX, EndY, PassedX, PassedY)* + +**Arguments**: 6 values (coordinates of the start, end and passed points). + +By tangent point and point +"""""""""""""""""""""""""" + +.. image:: images/Arc_panel_tang.png + :align: center + +Select point on segement in the view to set the tangent point, then move the mouse and click to set the end point. +Tangent point by itself is a start point. The edge on which it lies will be tangent to the arc. + +- When entering a tangent point by selecting a point on segment, a Tangent constraint is created. +- When entering an end point by selecting a segment, a Coincident constraint is created. +- When entering an end point, only segments are selectable. + +**TUI Command**: *Sketch_1.addArc(TangetPoint, EndX, EndY, Inversed)* + +**Arguments**: 4 values (reference to tangent point, coordinates of end point, inversed flag (if true - build arc from end to start)). + +Result +"""""" + +Created arc appears in the view. + +.. image:: images/Arc_res.png + :align: center .. centered:: - Create arc as tangent to an edge + Circle created + +**See Also** a sample TUI Script of a :ref:`tui_create_arc` operation. \ No newline at end of file diff --git a/src/SketchPlugin/doc/circleFeature.rst b/src/SketchPlugin/doc/circleFeature.rst index d0dc3f9e5..fa1abb235 100644 --- a/src/SketchPlugin/doc/circleFeature.rst +++ b/src/SketchPlugin/doc/circleFeature.rst @@ -2,16 +2,85 @@ Circle ====== +The feature Circle creates a circle in the current Sketch. -.. image:: images/Circle1.png - :align: center +To add new Circle to the Sketch: + +#. select in the Main Menu *Sketch - > Circle* item or +#. click **Circle** button in Sketch toolbar: + +.. image:: images/circle.png + :align: center .. centered:: - Create circle by center and point + **Circle** button + +There are 2 algorithms for creation of a Circle: + +.. image:: images/circle_pt_rad_32x32.png + :align: left +**By center and passed point** creates a circle with the given center passing through the given point. + +.. image:: images/circle_3pt_32x32.png + :align: left +**By three points** creates a circle passing through the given three points. + +By center and passed point +"""""""""""""""""""""""""" + +.. image:: images/Circle_panel_pt_rad.png + :align: center + +Click in the view once to set the center point, then move the mouse and click a second time to set the passed point. + +- When entering a center point by selecting either a point or a segment, a Coincident constraint is created. +- When entering a passing point by selecting a point, a Coincident constraint is also created. +- When entering a passing point by selecting a segment, a Tangent constraint is created. + +**TUI Command**: *Sketch_1.addCircle(CenterX, CenterY, PassedX, PassedY)* + +**Arguments**: 4 values (coordinates of the center and the passed point). + +By three points +""""""""""""""" + +.. image:: images/Circle_panel_3pt.png + :align: center +Click in the view once to set the first passed point, then move the mouse and click a second time to set the second passed point +and finally move the mouse and click a third time to set the last passed point. -.. image:: images/Circle2.png - :align: center +- When entering a passing point by selecting a point, a Coincident constraint is created. +- When entering a passing point by selecting a segment, a Tangent constraint is created. + +**TUI Command**: *Sketch_1.addCircle(X1, Y1, X2, Y2, X3, Y3)* + +**Arguments**: 6 values (coordinates of three points). + +Property panel in edition context +""""""""""""""""""""""""""""""""" + +The following property panel appears when the user selects an existing circle. + +.. image:: images/Circle_panel_edit.png + :align: center + +Note that the edition property panel doesn't show the creation algorithm used. + +The panel shows: + +- center coordinates and radius (read-only). +- auxiliary flag (could be modified). + +Result +"""""" + +Created circle appears in the view. + +.. image:: images/Circle_res.png + :align: center .. centered:: - Create circle by tree points + Circle created + +**See Also** a sample TUI Script of a :ref:`tui_create_circle` operation. diff --git a/src/SketchPlugin/doc/coincedenceFeature.rst b/src/SketchPlugin/doc/coincedenceFeature.rst deleted file mode 100644 index e29792a44..000000000 --- a/src/SketchPlugin/doc/coincedenceFeature.rst +++ /dev/null @@ -1,10 +0,0 @@ - -Coincidence constraint -====================== - - -.. image:: images/Coincident.png - :align: center - -.. centered:: - Create a coincedence constraint diff --git a/src/SketchPlugin/doc/coincedentFeature.rst b/src/SketchPlugin/doc/coincedentFeature.rst new file mode 100644 index 000000000..68117925a --- /dev/null +++ b/src/SketchPlugin/doc/coincedentFeature.rst @@ -0,0 +1,47 @@ + +Coincident constraint +===================== + +Coincident constraint makes two points to be coincident, or one point to lie on a line or circumference of a circle (or an arc). + +To create Coincident in the active Sketch: + +#. select in the Main Menu *Sketch - > Coincident* item or +#. click **Coincident** button in Sketch toolbar: + +.. image:: images/coincedence.png + :align: center + +.. centered:: + **Coincident** button + +Property panel: + +.. image:: images/Coincident_panel.png + :align: center + +Input fields: + +- **First object** is a point, a line, a circle or an arc selected in the view. +- **Second object** is a point, a line, a circle or an arc selected in the view. + +Note that one of two objects should be a point (i.e. a point, a line or an arc end point, a center of a circle or an arc). + +After the objects are selected the point becomes yellow colored in the view. + +**TUI Command**: *Sketch_1.setCoincident(Object1, Object2)* + +**Arguments**: 2 objects (one of them is a point, the second one is a point, a circle, an arc or a line) + +Result +"""""" + +Created Coincident constraint appears in the view. + +.. image:: images/Coincident_res.png + :align: center + +.. centered:: + Coincident constraint created + +**See Also** a sample TUI Script of a :ref:`tui_create_coincident` operation. \ No newline at end of file diff --git a/src/SketchPlugin/doc/collinearFeature.rst b/src/SketchPlugin/doc/collinearFeature.rst index 1a43b42a7..f8346dd26 100644 --- a/src/SketchPlugin/doc/collinearFeature.rst +++ b/src/SketchPlugin/doc/collinearFeature.rst @@ -2,9 +2,45 @@ Collinear constraint ==================== +Collinear constraint makes to lines collinear. -.. image:: images/Colinear.png - :align: center +To create Collinear in the active Sketch: + +#. select in the Main Menu *Sketch - > Collinear* item or +#. click **Collinear** button in Sketch toolbar: + +.. image:: images/collinear.png + :align: center .. centered:: - Create a collinear constraint + **Collinear** button + +Property panel: + +.. image:: images/Collinear_panel.png + :align: center + +Input fields: + +- **First line** is the first line selected in the view. +- **Second line** is the second line selected in the view. + +| After the lines are selected they becomes translated as to be collinear. +| The lines are marked with the special sign. + +**TUI Command**: *Sketch_1.setCollinear(Line1, Line2)* + +**Arguments**: 2 line objects + +Result +"""""" + +Created Collinear constraint appears in the view. + +.. image:: images/Collinear_res.png + :align: center + +.. centered:: + Collinear constraint created + +**See Also** a sample TUI Script of a :ref:`tui_create_collinear` operation. diff --git a/src/SketchPlugin/doc/distanceFeature.rst b/src/SketchPlugin/doc/distanceFeature.rst index dd52e8f63..32b8eef37 100644 --- a/src/SketchPlugin/doc/distanceFeature.rst +++ b/src/SketchPlugin/doc/distanceFeature.rst @@ -2,9 +2,71 @@ Distance constraint =================== +Distance constraint fixes distance between two objects. -.. image:: images/Distance.png - :align: center +The constraint can be defined between such objects as point, line, line or arc end point, center of circle or arc. + +To create Distance constraint in the active Sketch: + +#. select in the Main Menu *Sketch - > Distance* item or +#. click **Distance** button in Sketch toolbar: + +.. image:: images/distance.png + :align: center .. centered:: - Create a distance constraint + **Distance** button + +Property panel: + +.. image:: images/Distance_panel.png + :align: center + +Input fields: + +- **First object** is the first object selected in the view +- **Second object** is the second object selected in the view +- **Value** is a distance between the objects, could be modified to set the desirable value +- **Text location** is a position of the distance value label relating to extension line (in the view) + .. image:: images/location_left.png + :align: left + **Left** inserts text at the left of the distance extension line. + + .. image:: images/location_automatic.png + :align: left + **Automatic** inserts text at the middle of the distance extension line if it has enough length, otherwise - to the left. + + .. image:: images/location_right.png + :align: left + **Right** inserts text to the right of the distance extension line. +- **Keep orientation** fixes the relative position between selected objects + +When both objects are selected distance value is displayed in the property panel and in the view. + +When creating the constraint, after selection of two objects at the first time: + +- drag the distance presentation in the view to the desired position (by move mouse and click once) +- set desirable distance value in the input field in the view and press **Enter** or just press **Enter** to keep the current distance + +.. image:: images/Distance_field_view.png + :align: center + +.. centered:: + Distance input in the view + +**TUI Command**: *Sketch_1.setDistance(FirstObject, SecondObject, Value, KeepOrientation)* + +**Arguments**: 2 objects + distance value + keep orientation flag + +Result +"""""" + +Created Distance appears in the view. + +.. image:: images/Distance_res.png + :align: center + +.. centered:: + Distance created + +**See Also** a sample TUI Script of a :ref:`tui_create_distance` operation. diff --git a/src/SketchPlugin/doc/equalFeature.rst b/src/SketchPlugin/doc/equalFeature.rst index 3f76374fb..a36796896 100644 --- a/src/SketchPlugin/doc/equalFeature.rst +++ b/src/SketchPlugin/doc/equalFeature.rst @@ -2,9 +2,48 @@ Equal constraint ================ +| Equal constraint makes lines, circles or arcs of equal size. +| Lines becomes of equal length, circles and arcs - of equal radius. -.. image:: images/Equal.png - :align: center +To create Equal in the active Sketch: + +#. select in the Main Menu *Sketch - > Equal* item or +#. click **Equal** button in Sketch toolbar: + +.. image:: images/equal.png + :align: center + +.. centered:: + **Equal** button + +Property panel: + +.. image:: images/Equal_panel.png + :align: center + +Input fields: + +- **First object** is a line, a circle or an arc selected in the view. +- **Second object** is a line, a circle or an arc selected in the view. + +Note that a line could be equal to a line only, a circle - to a circle or an arc. + +| After the objects are selected the object sizes become equal. +| The equal objects are marked with **=** sign. + +**TUI Command**: *Sketch_1.setEqual(Object1, Object2)* + +**Arguments**: 2 objects (2 lines, 2 arcs, 2 circles or circle and arc) + +Result +"""""" + +Created Equal constraint appears in the view. + +.. image:: images/Equal_res.png + :align: center .. centered:: - Create an equal constraint + Equal constraint created + +**See Also** a sample TUI Script of a :ref:`tui_create_equal` operation. \ No newline at end of file diff --git a/src/SketchPlugin/doc/examples/angle.py b/src/SketchPlugin/doc/examples/angle.py new file mode 100644 index 000000000..d7b558ce1 --- /dev/null +++ b/src/SketchPlugin/doc/examples/angle.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_1 = Sketch_1.addLine(55.1, 13.0, 6.42, 35.5) +SketchLine_2 = Sketch_1.addLine(50.2, 22.4, 36.8, 58.8) +SketchConstraintAngle_1 = Sketch_1.setAngle(SketchLine_2.result(), SketchLine_1.result(), 45) +model.do() +model.end() \ No newline at end of file diff --git a/src/SketchPlugin/doc/examples/arc.py b/src/SketchPlugin/doc/examples/arc.py new file mode 100644 index 000000000..d9ee44a6e --- /dev/null +++ b/src/SketchPlugin/doc/examples/arc.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) +SketchArc_1 = Sketch_1.addArc(6.0, 6.2, 5.2, 34.3, 34.0, 7.7, True) +SketchArc_2 = Sketch_1.addArc(8.1, 56.7, 58.2, 6.6, 44.8, 69.2) +SketchLine_3 = Sketch_1.addLine(25.0, 109.4, 68.1, 153.6) +SketchLine_3.setAuxiliary(True) +SketchArc_3 = Sketch_1.addArc(SketchLine_3.startPoint(), 92.1, 34.0, True) +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/circle.py b/src/SketchPlugin/doc/examples/circle.py new file mode 100644 index 000000000..c51911609 --- /dev/null +++ b/src/SketchPlugin/doc/examples/circle.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchCircle_1 = Sketch_1.addCircle(38.6, 47.5, 31.5) +SketchCircle_2 = Sketch_1.addCircle(0.0, 14.1, 15.0, 0.1, 17.2, 19.9) +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/coincident.py b/src/SketchPlugin/doc/examples/coincident.py new file mode 100644 index 000000000..1ee8ad041 --- /dev/null +++ b/src/SketchPlugin/doc/examples/coincident.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchCircle_1 = Sketch_1.addCircle(34, 28, 12) +SketchLine_1 = Sketch_1.addLine(41, 45, 61, 72) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchCircle_1.results()[1], SketchLine_1.startPoint()) +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/collinear.py b/src/SketchPlugin/doc/examples/collinear.py new file mode 100644 index 000000000..eabe2b48c --- /dev/null +++ b/src/SketchPlugin/doc/examples/collinear.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_1 = Sketch_1.addLine(6, 25, 20, 40) +SketchLine_2 = Sketch_1.addLine(44, 26, 80, 61) +SketchConstraintCollinear_1 = Sketch_1.setCollinear(SketchLine_1.result(), SketchLine_2.result()) +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/distance.py b/src/SketchPlugin/doc/examples/distance.py new file mode 100644 index 000000000..b0e79ebe1 --- /dev/null +++ b/src/SketchPlugin/doc/examples/distance.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchCircle_1 = Sketch_1.addCircle(24.1, 24.5, 18.2) +SketchLine_1 = Sketch_1.addLine(54.3, 93.4, 91.2, 56.4) +SketchConstraintDistance_1 = Sketch_1.setDistance(SketchCircle_1.center(), SketchLine_1.result(), 70.0, True) +model.do() +model.end() \ No newline at end of file diff --git a/src/SketchPlugin/doc/examples/equal.py b/src/SketchPlugin/doc/examples/equal.py new file mode 100644 index 000000000..fe2c230c1 --- /dev/null +++ b/src/SketchPlugin/doc/examples/equal.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchCircle_1 = Sketch_1.addCircle(27, 25, 5) +SketchArc_1 = Sketch_1.addArc(55.58, 56.8, 70.53, 54.47, 65.76, 67.99, True) +SketchConstraintEqual_1 = Sketch_1.setEqual(SketchCircle_1.results()[1], SketchArc_1.results()[1]) +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/fillet.py b/src/SketchPlugin/doc/examples/fillet.py new file mode 100644 index 000000000..252756105 --- /dev/null +++ b/src/SketchPlugin/doc/examples/fillet.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_1 = Sketch_1.addLine(7, 46, 63, 20) +SketchLine_2 = Sketch_1.addLine(63, 20, 55, 85) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) +Fillet_1 = Sketch_1.setFillet(SketchLine_1.endPoint()) +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/fixed.py b/src/SketchPlugin/doc/examples/fixed.py new file mode 100644 index 000000000..cf43168b7 --- /dev/null +++ b/src/SketchPlugin/doc/examples/fixed.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchCircle_1 = Sketch_1.addCircle(38.7, 43.3, 29.29) +SketchConstraintRigid_1 = Sketch_1.setFixed(SketchCircle_1.results()[1]) +model.do() +model.end() \ No newline at end of file diff --git a/src/SketchPlugin/doc/examples/hdistance.py b/src/SketchPlugin/doc/examples/hdistance.py new file mode 100644 index 000000000..dfdf7672c --- /dev/null +++ b/src/SketchPlugin/doc/examples/hdistance.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchCircle_1 = Sketch_1.addCircle(24.1, 24.5, 18.2) +SketchLine_1 = Sketch_1.addLine(54.3, 93.4, 91.2, 56.4) +SketchConstraintDistanceHorizontal_1 = Sketch_1.setHorizontalDistance(SketchCircle_1.center(), SketchLine_1.startPoint(), 30) +model.do() +model.end() \ No newline at end of file diff --git a/src/SketchPlugin/doc/examples/horizontal.py b/src/SketchPlugin/doc/examples/horizontal.py new file mode 100644 index 000000000..1e79c717c --- /dev/null +++ b/src/SketchPlugin/doc/examples/horizontal.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_1 = Sketch_1.addLine(14.5, 16.0, 71.0, 62.0) +SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result()) +model.do() +model.end() \ No newline at end of file diff --git a/src/SketchPlugin/doc/examples/intersection.py b/src/SketchPlugin/doc/examples/intersection.py new file mode 100644 index 000000000..1ce58436d --- /dev/null +++ b/src/SketchPlugin/doc/examples/intersection.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() + +Point_2 = model.addPoint(Part_1_doc, 10, 10, -10) +Point_3 = model.addPoint(Part_1_doc, 70, 70, 50) +Polyline_1 = model.addPolyline3D(Part_1_doc, [model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2")], False) + +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchIntersectionPoint_1 = Sketch_1.addIntersectionPoint(model.selection("EDGE", "Polyline_1_1/Edge_1"), True) + +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/length.py b/src/SketchPlugin/doc/examples/length.py new file mode 100644 index 000000000..7a5295846 --- /dev/null +++ b/src/SketchPlugin/doc/examples/length.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_1 = Sketch_1.addLine(14.6, 14.2, 59.4, 61.9) +SketchLine_1.result().setColor(225, 0, 0) +SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_1.result(), 65.5) +model.do() +model.end() \ No newline at end of file diff --git a/src/SketchPlugin/doc/examples/line.py b/src/SketchPlugin/doc/examples/line.py new file mode 100644 index 000000000..fb92ca217 --- /dev/null +++ b/src/SketchPlugin/doc/examples/line.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_1 = Sketch_1.addLine(64.5, 87.9, -33.4, -42.6) +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/middle.py b/src/SketchPlugin/doc/examples/middle.py new file mode 100644 index 000000000..8eed6b6b8 --- /dev/null +++ b/src/SketchPlugin/doc/examples/middle.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchCircle_1 = Sketch_1.addCircle(16, 54, 10) +SketchLine_1 = Sketch_1.addLine(10, 10, 80, 80) +SketchConstraintMiddle_1 = Sketch_1.setMiddlePoint(SketchCircle_1.center(), SketchLine_1.result()) +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/mirror.py b/src/SketchPlugin/doc/examples/mirror.py new file mode 100644 index 000000000..a5d8c1994 --- /dev/null +++ b/src/SketchPlugin/doc/examples/mirror.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() + +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchCircle_1 = Sketch_1.addCircle(25, 25, 11) +SketchLine_1 = Sketch_1.addLine(9, 78, 78, 9) + +SketchConstraintMirror_1 = Sketch_1.addMirror(SketchLine_1.result(), [SketchCircle_1.results()[1]]) + +model.do() +model.end() \ No newline at end of file diff --git a/src/SketchPlugin/doc/examples/parallel.py b/src/SketchPlugin/doc/examples/parallel.py new file mode 100644 index 000000000..bf8e9a946 --- /dev/null +++ b/src/SketchPlugin/doc/examples/parallel.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_1 = Sketch_1.addLine(13, 58, 69, 75) +SketchLine_2 = Sketch_1.addLine(12, 38, 73, 23) +SketchConstraintParallel_1 = Sketch_1.setParallel(SketchLine_1.result(), SketchLine_2.result()) +model.do() +model.end() \ No newline at end of file diff --git a/src/SketchPlugin/doc/examples/perpendicular.py b/src/SketchPlugin/doc/examples/perpendicular.py new file mode 100644 index 000000000..ca084717a --- /dev/null +++ b/src/SketchPlugin/doc/examples/perpendicular.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_1 = Sketch_1.addLine(13, 58, 69, 75) +SketchLine_2 = Sketch_1.addLine(12, 38, 73, 23) +SketchConstraintParallel_1 = Sketch_1.setPerpendicular(SketchLine_1.result(), SketchLine_2.result()) +model.do() +model.end() \ No newline at end of file diff --git a/src/SketchPlugin/doc/examples/point.py b/src/SketchPlugin/doc/examples/point.py new file mode 100644 index 000000000..64389e9d1 --- /dev/null +++ b/src/SketchPlugin/doc/examples/point.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchPoint_1 = Sketch_1.addPoint(42.6, 19.0) +model.do() +model.end() \ No newline at end of file diff --git a/src/SketchPlugin/doc/examples/projection.py b/src/SketchPlugin/doc/examples/projection.py new file mode 100644 index 000000000..3b485c00a --- /dev/null +++ b/src/SketchPlugin/doc/examples/projection.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() + +Point_2 = model.addPoint(Part_1_doc, 10, 10, -10) +Point_3 = model.addPoint(Part_1_doc, 70, 70, 50) +Polyline_1 = model.addPolyline3D(Part_1_doc, [model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2")], False) + +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchIntersectionPoint_1 = Sketch_1.addProjection(model.selection("EDGE", "Polyline_1_1/Edge_1"), True) + +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/radius.py b/src/SketchPlugin/doc/examples/radius.py new file mode 100644 index 000000000..e7af76ae1 --- /dev/null +++ b/src/SketchPlugin/doc/examples/radius.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchCircle_1 = Sketch_1.addCircle(35, 50, 25) +SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_1.results()[1], 25) +model.do() +model.end() \ No newline at end of file diff --git a/src/SketchPlugin/doc/examples/rectangle.py b/src/SketchPlugin/doc/examples/rectangle.py new file mode 100644 index 000000000..31055cd1c --- /dev/null +++ b/src/SketchPlugin/doc/examples/rectangle.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +Rectangle_1 = Sketch_1.addRectangle(5.5, 8.5, 31.3, 78.9) +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/rotation.py b/src/SketchPlugin/doc/examples/rotation.py new file mode 100644 index 000000000..88210d0b6 --- /dev/null +++ b/src/SketchPlugin/doc/examples/rotation.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() + +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchPoint_1 = Sketch_1.addPoint(45, 45) +SketchCircle_1 = Sketch_1.addCircle(35, 25, 8) + +SketchMultiRotation_1 = Sketch_1.addRotation([SketchCircle_1.results()[1]], SketchPoint_1.coordinates(), 270, 4, True) +[SketchCircle_2, SketchCircle_3, SketchCircle_4] = SketchMultiRotation_1.rotated() + +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/split.py b/src/SketchPlugin/doc/examples/split.py new file mode 100644 index 000000000..78c9ddadb --- /dev/null +++ b/src/SketchPlugin/doc/examples/split.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model +from salome.shaper import geom + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) + +SketchCircle_1 = Sketch_1.addCircle(44, 44, 29) + +SketchPoint_1 = Sketch_1.addPoint(15, 44) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchCircle_1.results()[1]) +SketchPoint_2 = Sketch_1.addPoint(44, 73) +SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchCircle_1.results()[1]) +SketchPoint_3 = Sketch_1.addPoint(64, 23) +SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchPoint_3.coordinates(), SketchCircle_1.results()[1]) + +GeomPoint = geom.Pnt2d(22, 65) +Sketch_1.addSplit(SketchCircle_1, GeomPoint) + +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/tangent.py b/src/SketchPlugin/doc/examples/tangent.py new file mode 100644 index 000000000..56d268684 --- /dev/null +++ b/src/SketchPlugin/doc/examples/tangent.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchCircle_1 = Sketch_1.addCircle(30, 30, 15) +SketchLine_1 = Sketch_1.addLine(10, 80, 80, 27) +SketchConstraintTangent_1 = Sketch_1.setTangent(SketchCircle_1.results()[1], SketchLine_1.result()) +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/translation.py b/src/SketchPlugin/doc/examples/translation.py new file mode 100644 index 000000000..f5b14977f --- /dev/null +++ b/src/SketchPlugin/doc/examples/translation.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() + +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchCircle_1 = Sketch_1.addCircle(12, 12, 6.5) +SketchPoint_1 = Sketch_1.addPoint(13, 50) +SketchPoint_2 = Sketch_1.addPoint(30, 70) + +SketchMultiTranslation_1 = Sketch_1.addTranslation([SketchCircle_1.results()[1]], SketchPoint_1.coordinates(), SketchPoint_2.coordinates(), 4) +[SketchCircle_2, SketchCircle_3, SketchCircle_4] = SketchMultiTranslation_1.translated() + +model.do() +model.end() \ No newline at end of file diff --git a/src/SketchPlugin/doc/examples/trim.py b/src/SketchPlugin/doc/examples/trim.py new file mode 100644 index 000000000..a3ba96ba2 --- /dev/null +++ b/src/SketchPlugin/doc/examples/trim.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model +from salome.shaper import geom + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) + +SketchCircle_1 = Sketch_1.addCircle(40, 45, 30) + +SketchPoint_1 = Sketch_1.addPoint(20, 70) +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchCircle_1.results()[1]) + +SketchLine_1 = Sketch_1.addLine(17, 7, 80, 70) + +GeomPoint = geom.Pnt2d(47, 75) +Sketch_1.addTrim(SketchCircle_1, GeomPoint) + +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/vdistance.py b/src/SketchPlugin/doc/examples/vdistance.py new file mode 100644 index 000000000..51d74e882 --- /dev/null +++ b/src/SketchPlugin/doc/examples/vdistance.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchCircle_1 = Sketch_1.addCircle(24.1, 24.5, 18.2) +SketchLine_1 = Sketch_1.addLine(62.3, 85.1, 91.2, 56.4) +SketchConstraintDistanceVertical_1 = Sketch_1.setVerticalDistance(SketchCircle_1.center(), SketchLine_1.startPoint(), 75.5) +model.do() +model.end() \ No newline at end of file diff --git a/src/SketchPlugin/doc/examples/vertical.py b/src/SketchPlugin/doc/examples/vertical.py new file mode 100644 index 000000000..e54a6d4c5 --- /dev/null +++ b/src/SketchPlugin/doc/examples/vertical.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_1 = Sketch_1.addLine(15.5, 14.5, 71.0, 62.8) +SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_1.result()) +model.do() +model.end() \ No newline at end of file diff --git a/src/SketchPlugin/doc/filletFeature.rst b/src/SketchPlugin/doc/filletFeature.rst index ea7850060..313406530 100644 --- a/src/SketchPlugin/doc/filletFeature.rst +++ b/src/SketchPlugin/doc/filletFeature.rst @@ -2,9 +2,53 @@ Fillet ====== +| The Fillet operation rounds the corner formed by intersection of two sketch elements in a coincident point. +| The operation trims the elements at the intersection and creates a tangent arc between them. -.. image:: images/Fillet.png +To create Fillet in the active Sketch: + +#. select in the Main Menu *Sketch - > Fillet* item or +#. click **Fillet** button in Sketch toolbar: + +.. image:: images/fillet.png + :align: center + +.. centered:: + **Fillet** button + +Property panel: + +.. image:: images/Fillet_panel.png :align: center .. centered:: - Create a fillet + Fillet + +Input fields: + +- **Point** is the coincident point of two intersecting lines (or a line and an arc) selected in the view. + +After the point is selected Fillet preview appears in the view. + +**TUI Command**: + +- *Sketch_1.setFillet(Point)* + + **Arguments**: coincident point + +- *Sketch_1.setFilletWithRadius(Point, Radius)* + + **Arguments**: coincident point and fillet radius + +Result +"""""" + +Created Fillet appears in the view. + +.. image:: images/Fillet_res.png + :align: center + +.. centered:: + Fillet created + +**See Also** a sample TUI Script of a :ref:`tui_create_fillet` operation. \ No newline at end of file diff --git a/src/SketchPlugin/doc/fixedFeature.rst b/src/SketchPlugin/doc/fixedFeature.rst new file mode 100644 index 000000000..849ba4ed5 --- /dev/null +++ b/src/SketchPlugin/doc/fixedFeature.rst @@ -0,0 +1,52 @@ + +Fixed constraint +================ + +Fixed constraint fixes objects position and size. + +The constraint can be defined for such objects as point, line, line or arc end point, center of circle or arc, whole circle or arc. + +To create Fixed constraint in the active Sketch: + +#. select in the Main Menu *Sketch - > Fixed* item or +#. click **Fixed** button in Sketch toolbar: + +.. image:: images/fixed.png + :align: center + +.. centered:: + **Fixed** button + +Property panel: + +.. image:: images/Fixed_panel.png + :align: center + +Input fields: + +- **Object** is the object selected in the view. + +After the object is selected anchor sign will be added close to it in the view. + +Selection rules: + +- Selection of end point on the line, center of circle or arc - fixes only the selected point. +- To fix the whole line the segment between endpoints should be selected. +- To fix the whole circle or arc the circumference should be selected. + +**TUI Command**: *Sketch_1.setFixed(Object)* + +**Arguments**: 1 object + +Result +"""""" + +Created Fixed constraint appears in the view. + +.. image:: images/Fixed_res.png + :align: center + +.. centered:: + Fixed constraint created + +**See Also** a sample TUI Script of a :ref:`tui_create_fixed` operation. diff --git a/src/SketchPlugin/doc/horizontalDistFeature.rst b/src/SketchPlugin/doc/horizontalDistFeature.rst index 3150c0f6b..f6981cb2a 100644 --- a/src/SketchPlugin/doc/horizontalDistFeature.rst +++ b/src/SketchPlugin/doc/horizontalDistFeature.rst @@ -2,9 +2,70 @@ Horizontal distance constraint ============================== +Horizontal Distance constraint fixes distance between two points along the horizontal axis. -.. image:: images/HorizontalDist.png - :align: center +The constraint can be defined between two points such as point object, line or arc end point, center of circle or arc. + +To create Horizontal Distance constraint in the active Sketch: + +#. select in the Main Menu *Sketch - > Horizontal Distance* item or +#. click **Horizontal Distance** button in Sketch toolbar: + +.. image:: images/distance_h.png + :align: center .. centered:: - Create horizontal distance constraint + **Horizontal Distance** button + +Property panel: + +.. image:: images/HorizontalDistance_panel.png + :align: center + +Input fields: + +- **First point** is the first point selected in the view +- **Second point** is the second point selected in the view +- **Value** is a distance between the objects, could be modified to set the desirable value +- **Text location** is a position of the distance value label relating to extension line (in the view) + .. image:: images/location_left.png + :align: left + **Left** inserts text at the left of the distance extension line. + + .. image:: images/location_automatic.png + :align: left + **Automatic** inserts text at the middle of the distance extension line if it has enough length, otherwise - to the left. + + .. image:: images/location_right.png + :align: left + **Right** inserts text to the right of the distance extension line. + +When both objects are selected horizontal distance value is displayed in the property panel and in the view. + +When creating the constraint, after selection of two objects at the first time: + +- drag the horizontal distance presentation in the view to the desired position (by move mouse and click once) +- set desirable horizontal distance value in the input field in the view and press **Enter** or just press **Enter** to keep the current distance + +.. image:: images/HorizontalDistance_field_view.png + :align: center + +.. centered:: + Horizontal Distance input in the view + +**TUI Command**: *Sketch_1.setHorizontalDistance(FirstObject, SecondObject, Value)* + +**Arguments**: 2 objects + horizontal distance value + +Result +"""""" + +Created Horizontal Distance appears in the view. + +.. image:: images/HorizontalDistance_res.png + :align: center + +.. centered:: + Horizontal Distance created + +**See Also** a sample TUI Script of a :ref:`tui_create_hdistance` operation. \ No newline at end of file diff --git a/src/SketchPlugin/doc/horizontalFeature.rst b/src/SketchPlugin/doc/horizontalFeature.rst index 8b29c33b9..12ab024fe 100644 --- a/src/SketchPlugin/doc/horizontalFeature.rst +++ b/src/SketchPlugin/doc/horizontalFeature.rst @@ -2,9 +2,44 @@ Horizontal constraint ===================== +Horizontal constraint fixes lines to lie parallel to the horizontal axis. -.. image:: images/Horizontal.png - :align: center +To create Horizontal constraint in the active Sketch: + +#. select in the Main Menu *Sketch - > Horizontal* item or +#. click **Horizontal** button in Sketch toolbar: + +.. image:: images/horisontal.png + :align: center .. centered:: - Create a horizontal constaint + **Horizontal** button + +Property panel: + +.. image:: images/Horizontal_panel.png + :align: center + +Input fields: + +- **Line** is the line selected in the view. + +| After the line is selected it becomes parallel to the horizontal axis in the view. +| **H** sign added above the line. + +**TUI Command**: *Sketch_1.setHorizontal(LineObject)* + +**Arguments**: 1 line object + +Result +"""""" + +Created Horizontal constraint appears in the view. + +.. image:: images/Horizontal_res.png + :align: center + +.. centered:: + Horizontal constraint created + +**See Also** a sample TUI Script of a :ref:`tui_create_horizontal` operation. \ No newline at end of file diff --git a/src/SketchPlugin/doc/images/Angle.png b/src/SketchPlugin/doc/images/Angle.png deleted file mode 100644 index f781cb476..000000000 Binary files a/src/SketchPlugin/doc/images/Angle.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/Angle_field_view.png b/src/SketchPlugin/doc/images/Angle_field_view.png new file mode 100644 index 000000000..0e89b26c4 Binary files /dev/null and b/src/SketchPlugin/doc/images/Angle_field_view.png differ diff --git a/src/SketchPlugin/doc/images/Angle_panel.png b/src/SketchPlugin/doc/images/Angle_panel.png new file mode 100644 index 000000000..b5c99e894 Binary files /dev/null and b/src/SketchPlugin/doc/images/Angle_panel.png differ diff --git a/src/SketchPlugin/doc/images/Angle_res.png b/src/SketchPlugin/doc/images/Angle_res.png new file mode 100644 index 000000000..ecae78f4b Binary files /dev/null and b/src/SketchPlugin/doc/images/Angle_res.png differ diff --git a/src/SketchPlugin/doc/images/AngularCopy.png b/src/SketchPlugin/doc/images/AngularCopy.png deleted file mode 100644 index 879631404..000000000 Binary files a/src/SketchPlugin/doc/images/AngularCopy.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/Arc1.png b/src/SketchPlugin/doc/images/Arc1.png deleted file mode 100644 index f05a75e5f..000000000 Binary files a/src/SketchPlugin/doc/images/Arc1.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/Arc2.png b/src/SketchPlugin/doc/images/Arc2.png deleted file mode 100644 index 17ece66a9..000000000 Binary files a/src/SketchPlugin/doc/images/Arc2.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/Arc3.png b/src/SketchPlugin/doc/images/Arc3.png deleted file mode 100644 index ba8d07c44..000000000 Binary files a/src/SketchPlugin/doc/images/Arc3.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/Arc_panel_3pt.png b/src/SketchPlugin/doc/images/Arc_panel_3pt.png new file mode 100644 index 000000000..089d50730 Binary files /dev/null and b/src/SketchPlugin/doc/images/Arc_panel_3pt.png differ diff --git a/src/SketchPlugin/doc/images/Arc_panel_base.png b/src/SketchPlugin/doc/images/Arc_panel_base.png new file mode 100644 index 000000000..9a5b9ed4a Binary files /dev/null and b/src/SketchPlugin/doc/images/Arc_panel_base.png differ diff --git a/src/SketchPlugin/doc/images/Arc_panel_tang.png b/src/SketchPlugin/doc/images/Arc_panel_tang.png new file mode 100644 index 000000000..ca0205401 Binary files /dev/null and b/src/SketchPlugin/doc/images/Arc_panel_tang.png differ diff --git a/src/SketchPlugin/doc/images/Arc_res.png b/src/SketchPlugin/doc/images/Arc_res.png new file mode 100644 index 000000000..b23a9022b Binary files /dev/null and b/src/SketchPlugin/doc/images/Arc_res.png differ diff --git a/src/SketchPlugin/doc/images/Circle1.png b/src/SketchPlugin/doc/images/Circle1.png deleted file mode 100644 index 86c3d9cea..000000000 Binary files a/src/SketchPlugin/doc/images/Circle1.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/Circle2.png b/src/SketchPlugin/doc/images/Circle2.png deleted file mode 100644 index 34c206d93..000000000 Binary files a/src/SketchPlugin/doc/images/Circle2.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/Circle_panel_3pt.png b/src/SketchPlugin/doc/images/Circle_panel_3pt.png new file mode 100644 index 000000000..c837accbf Binary files /dev/null and b/src/SketchPlugin/doc/images/Circle_panel_3pt.png differ diff --git a/src/SketchPlugin/doc/images/Circle_panel_edit.png b/src/SketchPlugin/doc/images/Circle_panel_edit.png new file mode 100644 index 000000000..c9983f2ec Binary files /dev/null and b/src/SketchPlugin/doc/images/Circle_panel_edit.png differ diff --git a/src/SketchPlugin/doc/images/Circle_panel_pt_rad.png b/src/SketchPlugin/doc/images/Circle_panel_pt_rad.png new file mode 100644 index 000000000..e171e58fe Binary files /dev/null and b/src/SketchPlugin/doc/images/Circle_panel_pt_rad.png differ diff --git a/src/SketchPlugin/doc/images/Circle_res.png b/src/SketchPlugin/doc/images/Circle_res.png new file mode 100644 index 000000000..deb8280e7 Binary files /dev/null and b/src/SketchPlugin/doc/images/Circle_res.png differ diff --git a/src/SketchPlugin/doc/images/Coincident.png b/src/SketchPlugin/doc/images/Coincident.png deleted file mode 100644 index ae64f016f..000000000 Binary files a/src/SketchPlugin/doc/images/Coincident.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/Coincident_panel.png b/src/SketchPlugin/doc/images/Coincident_panel.png new file mode 100644 index 000000000..f690641b3 Binary files /dev/null and b/src/SketchPlugin/doc/images/Coincident_panel.png differ diff --git a/src/SketchPlugin/doc/images/Coincident_res.png b/src/SketchPlugin/doc/images/Coincident_res.png new file mode 100644 index 000000000..030585735 Binary files /dev/null and b/src/SketchPlugin/doc/images/Coincident_res.png differ diff --git a/src/SketchPlugin/doc/images/Colinear.png b/src/SketchPlugin/doc/images/Colinear.png deleted file mode 100644 index 3a09d12e0..000000000 Binary files a/src/SketchPlugin/doc/images/Colinear.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/Collinear_panel.png b/src/SketchPlugin/doc/images/Collinear_panel.png new file mode 100644 index 000000000..98a1c40e2 Binary files /dev/null and b/src/SketchPlugin/doc/images/Collinear_panel.png differ diff --git a/src/SketchPlugin/doc/images/Collinear_res.png b/src/SketchPlugin/doc/images/Collinear_res.png new file mode 100644 index 000000000..88f1daaed Binary files /dev/null and b/src/SketchPlugin/doc/images/Collinear_res.png differ diff --git a/src/SketchPlugin/doc/images/CoordinatePlanes.png b/src/SketchPlugin/doc/images/CoordinatePlanes.png new file mode 100644 index 000000000..c72d5da6e Binary files /dev/null and b/src/SketchPlugin/doc/images/CoordinatePlanes.png differ diff --git a/src/SketchPlugin/doc/images/Distance.png b/src/SketchPlugin/doc/images/Distance.png index 2ef362b39..7676548da 100644 Binary files a/src/SketchPlugin/doc/images/Distance.png and b/src/SketchPlugin/doc/images/Distance.png differ diff --git a/src/SketchPlugin/doc/images/Distance_field_view.png b/src/SketchPlugin/doc/images/Distance_field_view.png new file mode 100644 index 000000000..6290be94a Binary files /dev/null and b/src/SketchPlugin/doc/images/Distance_field_view.png differ diff --git a/src/SketchPlugin/doc/images/Distance_panel.png b/src/SketchPlugin/doc/images/Distance_panel.png new file mode 100644 index 000000000..27d66efc9 Binary files /dev/null and b/src/SketchPlugin/doc/images/Distance_panel.png differ diff --git a/src/SketchPlugin/doc/images/Distance_res.png b/src/SketchPlugin/doc/images/Distance_res.png new file mode 100644 index 000000000..e7273711b Binary files /dev/null and b/src/SketchPlugin/doc/images/Distance_res.png differ diff --git a/src/SketchPlugin/doc/images/Equal.png b/src/SketchPlugin/doc/images/Equal.png index af8f97ec9..e8873c0a4 100644 Binary files a/src/SketchPlugin/doc/images/Equal.png and b/src/SketchPlugin/doc/images/Equal.png differ diff --git a/src/SketchPlugin/doc/images/Equal_panel.png b/src/SketchPlugin/doc/images/Equal_panel.png new file mode 100644 index 000000000..c9518eaf4 Binary files /dev/null and b/src/SketchPlugin/doc/images/Equal_panel.png differ diff --git a/src/SketchPlugin/doc/images/Equal_res.png b/src/SketchPlugin/doc/images/Equal_res.png new file mode 100644 index 000000000..32f84470f Binary files /dev/null and b/src/SketchPlugin/doc/images/Equal_res.png differ diff --git a/src/SketchPlugin/doc/images/Fillet.png b/src/SketchPlugin/doc/images/Fillet.png index 8abbb8140..05e9b2abd 100644 Binary files a/src/SketchPlugin/doc/images/Fillet.png and b/src/SketchPlugin/doc/images/Fillet.png differ diff --git a/src/SketchPlugin/doc/images/Fillet_panel.png b/src/SketchPlugin/doc/images/Fillet_panel.png new file mode 100644 index 000000000..866b314f7 Binary files /dev/null and b/src/SketchPlugin/doc/images/Fillet_panel.png differ diff --git a/src/SketchPlugin/doc/images/Fillet_res.png b/src/SketchPlugin/doc/images/Fillet_res.png new file mode 100644 index 000000000..82933a88a Binary files /dev/null and b/src/SketchPlugin/doc/images/Fillet_res.png differ diff --git a/src/SketchPlugin/doc/images/Fixed.png b/src/SketchPlugin/doc/images/Fixed.png index 554189b4c..d5085325d 100644 Binary files a/src/SketchPlugin/doc/images/Fixed.png and b/src/SketchPlugin/doc/images/Fixed.png differ diff --git a/src/SketchPlugin/doc/images/Fixed_panel.png b/src/SketchPlugin/doc/images/Fixed_panel.png new file mode 100644 index 000000000..6228dde72 Binary files /dev/null and b/src/SketchPlugin/doc/images/Fixed_panel.png differ diff --git a/src/SketchPlugin/doc/images/Fixed_res.png b/src/SketchPlugin/doc/images/Fixed_res.png new file mode 100644 index 000000000..0470891f9 Binary files /dev/null and b/src/SketchPlugin/doc/images/Fixed_res.png differ diff --git a/src/SketchPlugin/doc/images/Horizontal.png b/src/SketchPlugin/doc/images/Horizontal.png deleted file mode 100644 index f44695c12..000000000 Binary files a/src/SketchPlugin/doc/images/Horizontal.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/HorizontalDist.png b/src/SketchPlugin/doc/images/HorizontalDist.png deleted file mode 100644 index 29789230b..000000000 Binary files a/src/SketchPlugin/doc/images/HorizontalDist.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/HorizontalDistance_field_view.png b/src/SketchPlugin/doc/images/HorizontalDistance_field_view.png new file mode 100644 index 000000000..b9bdc9aff Binary files /dev/null and b/src/SketchPlugin/doc/images/HorizontalDistance_field_view.png differ diff --git a/src/SketchPlugin/doc/images/HorizontalDistance_panel.png b/src/SketchPlugin/doc/images/HorizontalDistance_panel.png new file mode 100644 index 000000000..c204cdca6 Binary files /dev/null and b/src/SketchPlugin/doc/images/HorizontalDistance_panel.png differ diff --git a/src/SketchPlugin/doc/images/HorizontalDistance_res.png b/src/SketchPlugin/doc/images/HorizontalDistance_res.png new file mode 100644 index 000000000..f50453a00 Binary files /dev/null and b/src/SketchPlugin/doc/images/HorizontalDistance_res.png differ diff --git a/src/SketchPlugin/doc/images/Horizontal_panel.png b/src/SketchPlugin/doc/images/Horizontal_panel.png new file mode 100644 index 000000000..506bebd47 Binary files /dev/null and b/src/SketchPlugin/doc/images/Horizontal_panel.png differ diff --git a/src/SketchPlugin/doc/images/Horizontal_res.png b/src/SketchPlugin/doc/images/Horizontal_res.png new file mode 100644 index 000000000..679d5f48b Binary files /dev/null and b/src/SketchPlugin/doc/images/Horizontal_res.png differ diff --git a/src/SketchPlugin/doc/images/Intersection.png b/src/SketchPlugin/doc/images/Intersection.png index 9382871e1..5dc34484f 100644 Binary files a/src/SketchPlugin/doc/images/Intersection.png and b/src/SketchPlugin/doc/images/Intersection.png differ diff --git a/src/SketchPlugin/doc/images/Intersection_panel.png b/src/SketchPlugin/doc/images/Intersection_panel.png new file mode 100644 index 000000000..681989225 Binary files /dev/null and b/src/SketchPlugin/doc/images/Intersection_panel.png differ diff --git a/src/SketchPlugin/doc/images/Intersection_res.png b/src/SketchPlugin/doc/images/Intersection_res.png new file mode 100644 index 000000000..b63473d00 Binary files /dev/null and b/src/SketchPlugin/doc/images/Intersection_res.png differ diff --git a/src/SketchPlugin/doc/images/Length.png b/src/SketchPlugin/doc/images/Length.png index cd4f8618e..8bdb113d5 100644 Binary files a/src/SketchPlugin/doc/images/Length.png and b/src/SketchPlugin/doc/images/Length.png differ diff --git a/src/SketchPlugin/doc/images/Length_field_view.png b/src/SketchPlugin/doc/images/Length_field_view.png new file mode 100644 index 000000000..ccee662f5 Binary files /dev/null and b/src/SketchPlugin/doc/images/Length_field_view.png differ diff --git a/src/SketchPlugin/doc/images/Length_panel.png b/src/SketchPlugin/doc/images/Length_panel.png new file mode 100644 index 000000000..f92f7ba79 Binary files /dev/null and b/src/SketchPlugin/doc/images/Length_panel.png differ diff --git a/src/SketchPlugin/doc/images/Length_res.png b/src/SketchPlugin/doc/images/Length_res.png new file mode 100644 index 000000000..e5ab5f5d7 Binary files /dev/null and b/src/SketchPlugin/doc/images/Length_res.png differ diff --git a/src/SketchPlugin/doc/images/Line.png b/src/SketchPlugin/doc/images/Line.png index 2f48eee17..53dbb0820 100644 Binary files a/src/SketchPlugin/doc/images/Line.png and b/src/SketchPlugin/doc/images/Line.png differ diff --git a/src/SketchPlugin/doc/images/Line_panel.png b/src/SketchPlugin/doc/images/Line_panel.png new file mode 100644 index 000000000..e5381398e Binary files /dev/null and b/src/SketchPlugin/doc/images/Line_panel.png differ diff --git a/src/SketchPlugin/doc/images/Line_res.png b/src/SketchPlugin/doc/images/Line_res.png new file mode 100644 index 000000000..61de79e87 Binary files /dev/null and b/src/SketchPlugin/doc/images/Line_res.png differ diff --git a/src/SketchPlugin/doc/images/LinearCopy.png b/src/SketchPlugin/doc/images/LinearCopy.png deleted file mode 100644 index d92cd6425..000000000 Binary files a/src/SketchPlugin/doc/images/LinearCopy.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/Linear_panel.png b/src/SketchPlugin/doc/images/Linear_panel.png new file mode 100644 index 000000000..e123452ca Binary files /dev/null and b/src/SketchPlugin/doc/images/Linear_panel.png differ diff --git a/src/SketchPlugin/doc/images/Linear_res.png b/src/SketchPlugin/doc/images/Linear_res.png new file mode 100644 index 000000000..38b7f303d Binary files /dev/null and b/src/SketchPlugin/doc/images/Linear_res.png differ diff --git a/src/SketchPlugin/doc/images/MiddlePoint.png b/src/SketchPlugin/doc/images/MiddlePoint.png index 45de38df6..af1252161 100644 Binary files a/src/SketchPlugin/doc/images/MiddlePoint.png and b/src/SketchPlugin/doc/images/MiddlePoint.png differ diff --git a/src/SketchPlugin/doc/images/Middlepoint_panel.png b/src/SketchPlugin/doc/images/Middlepoint_panel.png new file mode 100644 index 000000000..ea306951c Binary files /dev/null and b/src/SketchPlugin/doc/images/Middlepoint_panel.png differ diff --git a/src/SketchPlugin/doc/images/Middlepoint_res.png b/src/SketchPlugin/doc/images/Middlepoint_res.png new file mode 100644 index 000000000..8eed3309d Binary files /dev/null and b/src/SketchPlugin/doc/images/Middlepoint_res.png differ diff --git a/src/SketchPlugin/doc/images/Mirror.png b/src/SketchPlugin/doc/images/Mirror.png index a74beaa16..01c7ef4f6 100644 Binary files a/src/SketchPlugin/doc/images/Mirror.png and b/src/SketchPlugin/doc/images/Mirror.png differ diff --git a/src/SketchPlugin/doc/images/Mirror_panel.png b/src/SketchPlugin/doc/images/Mirror_panel.png new file mode 100644 index 000000000..632482566 Binary files /dev/null and b/src/SketchPlugin/doc/images/Mirror_panel.png differ diff --git a/src/SketchPlugin/doc/images/Mirror_res.png b/src/SketchPlugin/doc/images/Mirror_res.png new file mode 100644 index 000000000..53043538c Binary files /dev/null and b/src/SketchPlugin/doc/images/Mirror_res.png differ diff --git a/src/SketchPlugin/doc/images/Parallel.png b/src/SketchPlugin/doc/images/Parallel.png index 057126a12..8d152d3be 100644 Binary files a/src/SketchPlugin/doc/images/Parallel.png and b/src/SketchPlugin/doc/images/Parallel.png differ diff --git a/src/SketchPlugin/doc/images/Parallel_panel.png b/src/SketchPlugin/doc/images/Parallel_panel.png new file mode 100644 index 000000000..64d7e3b65 Binary files /dev/null and b/src/SketchPlugin/doc/images/Parallel_panel.png differ diff --git a/src/SketchPlugin/doc/images/Parallel_res.png b/src/SketchPlugin/doc/images/Parallel_res.png new file mode 100644 index 000000000..c1d01a714 Binary files /dev/null and b/src/SketchPlugin/doc/images/Parallel_res.png differ diff --git a/src/SketchPlugin/doc/images/Perpendicular.png b/src/SketchPlugin/doc/images/Perpendicular.png index 8e119691c..1fb695c6a 100644 Binary files a/src/SketchPlugin/doc/images/Perpendicular.png and b/src/SketchPlugin/doc/images/Perpendicular.png differ diff --git a/src/SketchPlugin/doc/images/Perpendicular_panel.png b/src/SketchPlugin/doc/images/Perpendicular_panel.png new file mode 100644 index 000000000..0747cff0c Binary files /dev/null and b/src/SketchPlugin/doc/images/Perpendicular_panel.png differ diff --git a/src/SketchPlugin/doc/images/Perpendicular_res.png b/src/SketchPlugin/doc/images/Perpendicular_res.png new file mode 100644 index 000000000..af1f71310 Binary files /dev/null and b/src/SketchPlugin/doc/images/Perpendicular_res.png differ diff --git a/src/SketchPlugin/doc/images/PlaneDefinition.png b/src/SketchPlugin/doc/images/PlaneDefinition.png new file mode 100644 index 000000000..02e0fb877 Binary files /dev/null and b/src/SketchPlugin/doc/images/PlaneDefinition.png differ diff --git a/src/SketchPlugin/doc/images/Point.png b/src/SketchPlugin/doc/images/Point.png index c4691b68e..96149ebf3 100644 Binary files a/src/SketchPlugin/doc/images/Point.png and b/src/SketchPlugin/doc/images/Point.png differ diff --git a/src/SketchPlugin/doc/images/Point_panel.png b/src/SketchPlugin/doc/images/Point_panel.png new file mode 100644 index 000000000..7017b16ce Binary files /dev/null and b/src/SketchPlugin/doc/images/Point_panel.png differ diff --git a/src/SketchPlugin/doc/images/Point_res.png b/src/SketchPlugin/doc/images/Point_res.png new file mode 100644 index 000000000..47b87c3bb Binary files /dev/null and b/src/SketchPlugin/doc/images/Point_res.png differ diff --git a/src/SketchPlugin/doc/images/Projection.png b/src/SketchPlugin/doc/images/Projection.png index 403cc74fc..aa59f6964 100644 Binary files a/src/SketchPlugin/doc/images/Projection.png and b/src/SketchPlugin/doc/images/Projection.png differ diff --git a/src/SketchPlugin/doc/images/Projection_panel.png b/src/SketchPlugin/doc/images/Projection_panel.png new file mode 100644 index 000000000..349ad73a5 Binary files /dev/null and b/src/SketchPlugin/doc/images/Projection_panel.png differ diff --git a/src/SketchPlugin/doc/images/Projection_res.png b/src/SketchPlugin/doc/images/Projection_res.png new file mode 100644 index 000000000..07e63b9ca Binary files /dev/null and b/src/SketchPlugin/doc/images/Projection_res.png differ diff --git a/src/SketchPlugin/doc/images/Radius_field_view.png b/src/SketchPlugin/doc/images/Radius_field_view.png new file mode 100644 index 000000000..eee0829d2 Binary files /dev/null and b/src/SketchPlugin/doc/images/Radius_field_view.png differ diff --git a/src/SketchPlugin/doc/images/Radius_panel.png b/src/SketchPlugin/doc/images/Radius_panel.png new file mode 100644 index 000000000..98febd8aa Binary files /dev/null and b/src/SketchPlugin/doc/images/Radius_panel.png differ diff --git a/src/SketchPlugin/doc/images/Radius_res.png b/src/SketchPlugin/doc/images/Radius_res.png new file mode 100644 index 000000000..561a9a720 Binary files /dev/null and b/src/SketchPlugin/doc/images/Radius_res.png differ diff --git a/src/SketchPlugin/doc/images/Rectangle.png b/src/SketchPlugin/doc/images/Rectangle.png index 2bb9f9151..b98a99162 100644 Binary files a/src/SketchPlugin/doc/images/Rectangle.png and b/src/SketchPlugin/doc/images/Rectangle.png differ diff --git a/src/SketchPlugin/doc/images/Rectangle_panel.png b/src/SketchPlugin/doc/images/Rectangle_panel.png new file mode 100644 index 000000000..a2267a4ed Binary files /dev/null and b/src/SketchPlugin/doc/images/Rectangle_panel.png differ diff --git a/src/SketchPlugin/doc/images/Rectangle_res.png b/src/SketchPlugin/doc/images/Rectangle_res.png new file mode 100644 index 000000000..475c9a3c6 Binary files /dev/null and b/src/SketchPlugin/doc/images/Rectangle_res.png differ diff --git a/src/SketchPlugin/doc/images/Rotation_panel.png b/src/SketchPlugin/doc/images/Rotation_panel.png new file mode 100644 index 000000000..aa279e1a2 Binary files /dev/null and b/src/SketchPlugin/doc/images/Rotation_panel.png differ diff --git a/src/SketchPlugin/doc/images/Rotation_res.png b/src/SketchPlugin/doc/images/Rotation_res.png new file mode 100644 index 000000000..17cfbd27f Binary files /dev/null and b/src/SketchPlugin/doc/images/Rotation_res.png differ diff --git a/src/SketchPlugin/doc/images/SketchButton.png b/src/SketchPlugin/doc/images/SketchButton.png new file mode 100644 index 000000000..d97a8497b Binary files /dev/null and b/src/SketchPlugin/doc/images/SketchButton.png differ diff --git a/src/SketchPlugin/doc/images/SketchPanel.png b/src/SketchPlugin/doc/images/SketchPanel.png new file mode 100644 index 000000000..c22a957b9 Binary files /dev/null and b/src/SketchPlugin/doc/images/SketchPanel.png differ diff --git a/src/SketchPlugin/doc/images/Sketch_fixed.png b/src/SketchPlugin/doc/images/Sketch_fixed.png new file mode 100644 index 000000000..ce5577c84 Binary files /dev/null and b/src/SketchPlugin/doc/images/Sketch_fixed.png differ diff --git a/src/SketchPlugin/doc/images/Sketch_underconstrained.png b/src/SketchPlugin/doc/images/Sketch_underconstrained.png new file mode 100644 index 000000000..852396f87 Binary files /dev/null and b/src/SketchPlugin/doc/images/Sketch_underconstrained.png differ diff --git a/src/SketchPlugin/doc/images/Split.png b/src/SketchPlugin/doc/images/Split.png index 871ce3b4c..f3f3ff486 100644 Binary files a/src/SketchPlugin/doc/images/Split.png and b/src/SketchPlugin/doc/images/Split.png differ diff --git a/src/SketchPlugin/doc/images/Split_panel.png b/src/SketchPlugin/doc/images/Split_panel.png new file mode 100644 index 000000000..a941fe361 Binary files /dev/null and b/src/SketchPlugin/doc/images/Split_panel.png differ diff --git a/src/SketchPlugin/doc/images/Split_res.png b/src/SketchPlugin/doc/images/Split_res.png new file mode 100644 index 000000000..4032cb28a Binary files /dev/null and b/src/SketchPlugin/doc/images/Split_res.png differ diff --git a/src/SketchPlugin/doc/images/Split_segment_sel.png b/src/SketchPlugin/doc/images/Split_segment_sel.png new file mode 100644 index 000000000..2e8f33a0f Binary files /dev/null and b/src/SketchPlugin/doc/images/Split_segment_sel.png differ diff --git a/src/SketchPlugin/doc/images/Tangent.png b/src/SketchPlugin/doc/images/Tangent.png index 6e0d3c9b2..ec54eae31 100644 Binary files a/src/SketchPlugin/doc/images/Tangent.png and b/src/SketchPlugin/doc/images/Tangent.png differ diff --git a/src/SketchPlugin/doc/images/Tangent_panel.png b/src/SketchPlugin/doc/images/Tangent_panel.png new file mode 100644 index 000000000..bdffcd075 Binary files /dev/null and b/src/SketchPlugin/doc/images/Tangent_panel.png differ diff --git a/src/SketchPlugin/doc/images/Tangent_res.png b/src/SketchPlugin/doc/images/Tangent_res.png new file mode 100644 index 000000000..bd931cdd3 Binary files /dev/null and b/src/SketchPlugin/doc/images/Tangent_res.png differ diff --git a/src/SketchPlugin/doc/images/Trim.png b/src/SketchPlugin/doc/images/Trim.png index ac7646666..9a5a2592e 100644 Binary files a/src/SketchPlugin/doc/images/Trim.png and b/src/SketchPlugin/doc/images/Trim.png differ diff --git a/src/SketchPlugin/doc/images/Trim_panel.png b/src/SketchPlugin/doc/images/Trim_panel.png new file mode 100644 index 000000000..a356ab4b1 Binary files /dev/null and b/src/SketchPlugin/doc/images/Trim_panel.png differ diff --git a/src/SketchPlugin/doc/images/Trim_res.png b/src/SketchPlugin/doc/images/Trim_res.png new file mode 100644 index 000000000..a36a0d1f8 Binary files /dev/null and b/src/SketchPlugin/doc/images/Trim_res.png differ diff --git a/src/SketchPlugin/doc/images/Trim_segment_sel.png b/src/SketchPlugin/doc/images/Trim_segment_sel.png new file mode 100644 index 000000000..7cec3d202 Binary files /dev/null and b/src/SketchPlugin/doc/images/Trim_segment_sel.png differ diff --git a/src/SketchPlugin/doc/images/Vertical.png b/src/SketchPlugin/doc/images/Vertical.png index ba157a938..430386c98 100644 Binary files a/src/SketchPlugin/doc/images/Vertical.png and b/src/SketchPlugin/doc/images/Vertical.png differ diff --git a/src/SketchPlugin/doc/images/VerticalDist.png b/src/SketchPlugin/doc/images/VerticalDist.png deleted file mode 100644 index fcea0d2f7..000000000 Binary files a/src/SketchPlugin/doc/images/VerticalDist.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/VerticalDistance_field_view.png b/src/SketchPlugin/doc/images/VerticalDistance_field_view.png new file mode 100644 index 000000000..1c72a7148 Binary files /dev/null and b/src/SketchPlugin/doc/images/VerticalDistance_field_view.png differ diff --git a/src/SketchPlugin/doc/images/VerticalDistance_panel.png b/src/SketchPlugin/doc/images/VerticalDistance_panel.png new file mode 100644 index 000000000..9397c7ea0 Binary files /dev/null and b/src/SketchPlugin/doc/images/VerticalDistance_panel.png differ diff --git a/src/SketchPlugin/doc/images/VerticalDistance_res.png b/src/SketchPlugin/doc/images/VerticalDistance_res.png new file mode 100644 index 000000000..e911a08f7 Binary files /dev/null and b/src/SketchPlugin/doc/images/VerticalDistance_res.png differ diff --git a/src/SketchPlugin/doc/images/Vertical_panel.png b/src/SketchPlugin/doc/images/Vertical_panel.png new file mode 100644 index 000000000..fe75e7e88 Binary files /dev/null and b/src/SketchPlugin/doc/images/Vertical_panel.png differ diff --git a/src/SketchPlugin/doc/images/Vertical_res.png b/src/SketchPlugin/doc/images/Vertical_res.png new file mode 100644 index 000000000..b5994bdc0 Binary files /dev/null and b/src/SketchPlugin/doc/images/Vertical_res.png differ diff --git a/src/SketchPlugin/doc/images/angle_backward.png b/src/SketchPlugin/doc/images/angle_backward.png new file mode 100644 index 000000000..d052d805f Binary files /dev/null and b/src/SketchPlugin/doc/images/angle_backward.png differ diff --git a/src/SketchPlugin/doc/images/angle_complementary.png b/src/SketchPlugin/doc/images/angle_complementary.png new file mode 100644 index 000000000..aa613906a Binary files /dev/null and b/src/SketchPlugin/doc/images/angle_complementary.png differ diff --git a/src/SketchPlugin/doc/images/angle_constr.png b/src/SketchPlugin/doc/images/angle_constr.png new file mode 100644 index 000000000..e0c46dfa3 Binary files /dev/null and b/src/SketchPlugin/doc/images/angle_constr.png differ diff --git a/src/SketchPlugin/doc/images/angle_direct.png b/src/SketchPlugin/doc/images/angle_direct.png new file mode 100644 index 000000000..95c18e840 Binary files /dev/null and b/src/SketchPlugin/doc/images/angle_direct.png differ diff --git a/src/SketchPlugin/doc/images/angle_up_32x32.png b/src/SketchPlugin/doc/images/angle_up_32x32.png new file mode 100644 index 000000000..b8194b883 Binary files /dev/null and b/src/SketchPlugin/doc/images/angle_up_32x32.png differ diff --git a/src/SketchPlugin/doc/images/angle_up_full_32x32.png b/src/SketchPlugin/doc/images/angle_up_full_32x32.png new file mode 100644 index 000000000..3fc714c59 Binary files /dev/null and b/src/SketchPlugin/doc/images/angle_up_full_32x32.png differ diff --git a/src/SketchPlugin/doc/images/arc.png b/src/SketchPlugin/doc/images/arc.png new file mode 100644 index 000000000..fef024583 Binary files /dev/null and b/src/SketchPlugin/doc/images/arc.png differ diff --git a/src/SketchPlugin/doc/images/arc_3pt_32x32.png b/src/SketchPlugin/doc/images/arc_3pt_32x32.png new file mode 100644 index 000000000..584fa594a Binary files /dev/null and b/src/SketchPlugin/doc/images/arc_3pt_32x32.png differ diff --git a/src/SketchPlugin/doc/images/arc_base_32x32.png b/src/SketchPlugin/doc/images/arc_base_32x32.png new file mode 100644 index 000000000..c36df3056 Binary files /dev/null and b/src/SketchPlugin/doc/images/arc_base_32x32.png differ diff --git a/src/SketchPlugin/doc/images/arc_tang_32x32.png b/src/SketchPlugin/doc/images/arc_tang_32x32.png new file mode 100644 index 000000000..cfec981e7 Binary files /dev/null and b/src/SketchPlugin/doc/images/arc_tang_32x32.png differ diff --git a/src/SketchPlugin/doc/images/circle.png b/src/SketchPlugin/doc/images/circle.png new file mode 100644 index 000000000..6f311635d Binary files /dev/null and b/src/SketchPlugin/doc/images/circle.png differ diff --git a/src/SketchPlugin/doc/images/circle_3pt_32x32.png b/src/SketchPlugin/doc/images/circle_3pt_32x32.png new file mode 100644 index 000000000..d7ed5b227 Binary files /dev/null and b/src/SketchPlugin/doc/images/circle_3pt_32x32.png differ diff --git a/src/SketchPlugin/doc/images/circle_pt_rad_32x32.png b/src/SketchPlugin/doc/images/circle_pt_rad_32x32.png new file mode 100644 index 000000000..6a8b7e7fa Binary files /dev/null and b/src/SketchPlugin/doc/images/circle_pt_rad_32x32.png differ diff --git a/src/SketchPlugin/doc/images/coincedence.png b/src/SketchPlugin/doc/images/coincedence.png new file mode 100644 index 000000000..ee775389b Binary files /dev/null and b/src/SketchPlugin/doc/images/coincedence.png differ diff --git a/src/SketchPlugin/doc/images/collinear.png b/src/SketchPlugin/doc/images/collinear.png new file mode 100644 index 000000000..d96834f31 Binary files /dev/null and b/src/SketchPlugin/doc/images/collinear.png differ diff --git a/src/SketchPlugin/doc/images/distance_h.png b/src/SketchPlugin/doc/images/distance_h.png new file mode 100644 index 000000000..b88db2102 Binary files /dev/null and b/src/SketchPlugin/doc/images/distance_h.png differ diff --git a/src/SketchPlugin/doc/images/distance_v.png b/src/SketchPlugin/doc/images/distance_v.png new file mode 100644 index 000000000..027a384d5 Binary files /dev/null and b/src/SketchPlugin/doc/images/distance_v.png differ diff --git a/src/SketchPlugin/doc/images/horisontal.png b/src/SketchPlugin/doc/images/horisontal.png new file mode 100644 index 000000000..63ea87d02 Binary files /dev/null and b/src/SketchPlugin/doc/images/horisontal.png differ diff --git a/src/SketchPlugin/doc/images/location_automatic.png b/src/SketchPlugin/doc/images/location_automatic.png new file mode 100644 index 000000000..88730b3b5 Binary files /dev/null and b/src/SketchPlugin/doc/images/location_automatic.png differ diff --git a/src/SketchPlugin/doc/images/location_left.png b/src/SketchPlugin/doc/images/location_left.png new file mode 100644 index 000000000..e963b8d92 Binary files /dev/null and b/src/SketchPlugin/doc/images/location_left.png differ diff --git a/src/SketchPlugin/doc/images/location_right.png b/src/SketchPlugin/doc/images/location_right.png new file mode 100644 index 000000000..cdb855141 Binary files /dev/null and b/src/SketchPlugin/doc/images/location_right.png differ diff --git a/src/SketchPlugin/doc/images/radius_constr.png b/src/SketchPlugin/doc/images/radius_constr.png new file mode 100644 index 000000000..83fabad43 Binary files /dev/null and b/src/SketchPlugin/doc/images/radius_constr.png differ diff --git a/src/SketchPlugin/doc/images/rotate.png b/src/SketchPlugin/doc/images/rotate.png new file mode 100644 index 000000000..fd51d76f1 Binary files /dev/null and b/src/SketchPlugin/doc/images/rotate.png differ diff --git a/src/SketchPlugin/doc/images/translate.png b/src/SketchPlugin/doc/images/translate.png new file mode 100644 index 000000000..5ecdb5192 Binary files /dev/null and b/src/SketchPlugin/doc/images/translate.png differ diff --git a/src/SketchPlugin/doc/images/translate_32x32.png b/src/SketchPlugin/doc/images/translate_32x32.png new file mode 100644 index 000000000..20391da43 Binary files /dev/null and b/src/SketchPlugin/doc/images/translate_32x32.png differ diff --git a/src/SketchPlugin/doc/images/translate_full_32x32.png b/src/SketchPlugin/doc/images/translate_full_32x32.png new file mode 100644 index 000000000..1fd53d9d7 Binary files /dev/null and b/src/SketchPlugin/doc/images/translate_full_32x32.png differ diff --git a/src/SketchPlugin/doc/intersectionFeature.rst b/src/SketchPlugin/doc/intersectionFeature.rst index f0998acaf..0a648d095 100644 --- a/src/SketchPlugin/doc/intersectionFeature.rst +++ b/src/SketchPlugin/doc/intersectionFeature.rst @@ -2,9 +2,52 @@ Intersection ============ +| The Intersection operation creates intersection of a 3D edge and the sketch plane. +| The result of intersection is a point. -.. image:: images/Intersection.png +To create Intersection in the active Sketch: + +#. select in the Main Menu *Sketch - > Intersection* item or +#. click **Intersection** button in Sketch toolbar: + +.. image:: images/intersection.png + :align: center + +.. centered:: + **Intersection** button + +Property panel: + +.. image:: images/Intersection_panel.png :align: center .. centered:: - Create an intersection + Intersection + +Input fields: + +- **Object** is the 3D edge to intersect with the sketch plane. +- **Include into the sketch result** option defines whether to include the intersection point into the sketch result. + +**TUI Command**: + +- *Sketch_1.addIntersectionPoint(Edge, IncludeIntoResult)* + + **Arguments**: Edge and include into the result flag + +- *Sketch_1.addIntersectionPoint(EdgeName, IncludeIntoResult)* + + **Arguments**: Edge name and include into the result flag + +Result +"""""" + +Created Intersection appears in the view. + +.. image:: images/Intersection_res.png + :align: center + +.. centered:: + Intersection created (purple point) + +**See Also** a sample TUI Script of a :ref:`tui_create_intersection` operation. diff --git a/src/SketchPlugin/doc/lengthFeature.rst b/src/SketchPlugin/doc/lengthFeature.rst index f4197f5cb..c74ec6ccd 100644 --- a/src/SketchPlugin/doc/lengthFeature.rst +++ b/src/SketchPlugin/doc/lengthFeature.rst @@ -2,9 +2,67 @@ Length constraint ================= +Length constraint fixes length of lines such as standalone line or rectangle side. -.. image:: images/Length.png - :align: center +To create Length constraint in the active Sketch: + +#. select in the Main Menu *Sketch - > Length* item or +#. click **Length** button in Sketch toolbar: + +.. image:: images/length.png + :align: center + +.. centered:: + **Length** button + +Property panel: + +.. image:: images/Length_panel.png + :align: center + +Input fields: + +- **Line** is the the line object selected in the view +- **Value** is a line length, could be modified to set the desirable value +- **Text location** is a position of the length value label relating to extension line (in the view) + .. image:: images/location_left.png + :align: left + **Left** inserts text at the left of the length extension line. + + .. image:: images/location_automatic.png + :align: left + **Automatic** inserts text at the middle of the length extension line if it has enough length, otherwise - to the left. + + .. image:: images/location_right.png + :align: left + **Right** inserts text to the right of the length extension line. + +When the line is selected length value is displayed in the property panel and in the view. + +When creating the constraint, after selection of a line at the first time: + +- drag the length presentation in the view to the desired position (by move mouse and click once) +- set desirable length value in the input field in the view and press **Enter** or just press **Enter** to keep the current length + +.. image:: images/Length_field_view.png + :align: center .. centered:: - Create a length constraint + Length input in the view + +**TUI Command**: *Sketch_1.setLength(LineObject, Value)* + +**Arguments**: line + length value + +Result +"""""" + +Created Length appears in the view. + +.. image:: images/Length_res.png + :align: center + +.. centered:: + Length created + +**See Also** a sample TUI Script of a :ref:`tui_create_length` operation. diff --git a/src/SketchPlugin/doc/lineFeature.rst b/src/SketchPlugin/doc/lineFeature.rst index a18275976..a832a7e13 100644 --- a/src/SketchPlugin/doc/lineFeature.rst +++ b/src/SketchPlugin/doc/lineFeature.rst @@ -2,9 +2,45 @@ Line ==== +The feature Line creates a line segment by two points in the current Sketch. -.. image:: images/Line.png +To add new Line to the Sketch: + +#. select in the Main Menu *Sketch - > Line* item or +#. click **Line** button in Sketch toolbar: + +.. image:: images/line.png + :align: center + +.. centered:: + **Line** button + +The following property panel appears. + +.. image:: images/Line_panel.png :align: center .. centered:: - Create a line + Line + +Pick 2 points (start and end) in the view to create a Line. In the case of click on an existing object constraint for +the point will be created automatically. + +Start and end points coordinates are displayed in the property panel. + +**TUI Command**: *Sketch_1.addLine(X1, Y1, X2, Y2)* + +**Arguments**: 4 values (coordinates of the start and end points). + +Result +"""""" + +Created line appears in the view. + +.. image:: images/Line_res.png + :align: center + +.. centered:: + Line created + +**See Also** a sample TUI Script of a :ref:`tui_create_line` operation. diff --git a/src/SketchPlugin/doc/middleFeature.rst b/src/SketchPlugin/doc/middleFeature.rst index 075b57a46..75ff8a765 100644 --- a/src/SketchPlugin/doc/middleFeature.rst +++ b/src/SketchPlugin/doc/middleFeature.rst @@ -1,10 +1,48 @@ -Middle constraint -================= +Middle point constraint +======================= +Middle point constraint makes one point to lie in the middle of a line. -.. image:: images/MiddlePoint.png - :align: center +To create Middle point in the active Sketch: + +#. select in the Main Menu *Sketch - > Middle point* item or +#. click **Middle point** button in Sketch toolbar: + +.. image:: images/middlepoint.png + :align: center + +.. centered:: + **Middle point** button + +Property panel: + +.. image:: images/Middlepoint_panel.png + :align: center + +Input fields: + +- **First object** is a point or a line selected in the view. +- **Second object** is a point or a line selected in the view. + +Note that one of two objects should be a line and another one a point (i.e. a point, a line or an arc end point, a center of a circle or an arc). + +| After the objects are selected the point becomes located in the middle of the line. +| The middle point are marked with the special sign. + +**TUI Command**: *Sketch_1.setMiddlePoint(Point, Line)* + +**Arguments**: 2 objects (the first is a point, the second one is a line) + +Result +"""""" + +Created Middle point constraint appears in the view. + +.. image:: images/Middlepoint_res.png + :align: center .. centered:: - Create a middle constraint + Middle point constraint created + +**See Also** a sample TUI Script of a :ref:`tui_create_middle` operation. diff --git a/src/SketchPlugin/doc/mirrorFeature.rst b/src/SketchPlugin/doc/mirrorFeature.rst index 5910ebaf7..cf577cf7e 100644 --- a/src/SketchPlugin/doc/mirrorFeature.rst +++ b/src/SketchPlugin/doc/mirrorFeature.rst @@ -1,10 +1,49 @@ -Mirror -====== +Mirror copy +=========== +Mirror copy operation mirrors sketch entities across a line. -.. image:: images/Mirror.png +To create Mirror copy in the active Sketch: + +#. select in the Main Menu *Sketch - > Mirror copy* item or +#. click **Mirror copy** button in Sketch toolbar: + +.. image:: images/mirror.png + :align: center + +.. centered:: + **Mirror copy** button + +Property panel: + +.. image:: images/Mirror_panel.png :align: center .. centered:: - Create a mirror + Mirror copy + +Input fields: + +- **Mirror line** is the mirror line selected in the view. +- **Segments** is the list of segments (lines, circles, arcs) selected in the view. + +**TUI Command**: *Sketch_1.addMirror(MirrorLine, Objects)* + +**Arguments**: Mirror line and a list of objects + +Result +"""""" + +Created Mirror copy appears in the view. + +| The original and a mirror copy objects are marked with the special sign. +| Copy object is drawn with a thinner line. + +.. image:: images/Mirror_res.png + :align: center + +.. centered:: + Mirror copy created + +**See Also** a sample TUI Script of a :ref:`tui_create_mirror` operation. \ No newline at end of file diff --git a/src/SketchPlugin/doc/parallelFeature.rst b/src/SketchPlugin/doc/parallelFeature.rst index 5886038dd..2aaa933a6 100644 --- a/src/SketchPlugin/doc/parallelFeature.rst +++ b/src/SketchPlugin/doc/parallelFeature.rst @@ -2,9 +2,44 @@ Parallel constraint =================== +Parallel constraint fixes two lines to lie parallel to one another. -.. image:: images/Parallel.png - :align: center +To create Parallel in the active Sketch: + +#. select in the Main Menu *Sketch - > Parallel* item or +#. click **Parallel** button in Sketch toolbar: + +.. image:: images/parallel.png + :align: center .. centered:: - Create a parallel constraint + **Parallel** button + +Property panel: + +.. image:: images/Parallel_panel.png + :align: center + +Input fields: + +- **First line** is the first line selected in the view. +- **Second line** is the second line selected in the view. + +After the lines are selected **||** sign will be added to each of them in the view. + +**TUI Command**: *Sketch_1.setParallel(Line1, Line2)* + +**Arguments**: 2 line objects + +Result +"""""" + +Created Parallel constraint appears in the view. + +.. image:: images/Parallel_res.png + :align: center + +.. centered:: + Parallel constraint created + +**See Also** a sample TUI Script of a :ref:`tui_create_parallel` operation. \ No newline at end of file diff --git a/src/SketchPlugin/doc/perpendicularFeature.rst b/src/SketchPlugin/doc/perpendicularFeature.rst index 3c4119688..a14512206 100644 --- a/src/SketchPlugin/doc/perpendicularFeature.rst +++ b/src/SketchPlugin/doc/perpendicularFeature.rst @@ -2,9 +2,44 @@ Perpendicular constraint ======================== +Perpendicular constraint fixes two lines to lie at 90 degrees to one another. -.. image:: images/Perpendicular.png - :align: center +To create Perpendicular in the active Sketch: + +#. select in the Main Menu *Sketch - > Perpendicular* item or +#. click **Perpendicular** button in Sketch toolbar: + +.. image:: images/perpendicular.png + :align: center .. centered:: - Create a perpendicular constraint + **Perpendicular** button + +Property panel: + +.. image:: images/Perpendicular_panel.png + :align: center + +Input fields: + +- **First line** is the first line selected in the view. +- **Second line** is the second line selected in the view. + +After the lines are selected the special sign will be added to each of them in the view. + +**TUI Command**: *Sketch_1.setPerpendicular(Line1, Line2)* + +**Arguments**: 2 line objects + +Result +"""""" + +Created Perpendicular constraint appears in the view. + +.. image:: images/Perpendicular_res.png + :align: center + +.. centered:: + Perpendicular constraint created + +**See Also** a sample TUI Script of a :ref:`tui_create_perpendicular` operation. diff --git a/src/SketchPlugin/doc/pointFeature.rst b/src/SketchPlugin/doc/pointFeature.rst index b344fcce0..369251fef 100644 --- a/src/SketchPlugin/doc/pointFeature.rst +++ b/src/SketchPlugin/doc/pointFeature.rst @@ -2,9 +2,45 @@ Point ===== +The feature Point creates a point in the current Sketch. -.. image:: images/Point.png +To add new Point to the Sketch: + +#. select in the Main Menu *Sketch - > Point* item or +#. click **Point** button in Sketch toolbar: + +.. image:: images/point.png + :align: center + +.. centered:: + **Point** button + +The following property panel appears. + +.. image:: images/Point_panel.png :align: center .. centered:: - Create a point + Point + +Clicking in the view creates a point preview. In the case of click on an existing object constraint for +the point will be created automatically. + +The point coordinates are displayed in the property panel. + +**TUI Command**: *Sketch_1.addPoint(X, Y)* + +**Arguments**: 2 values (coordinates on the Sketch plane). + +Result +"""""" + +Created point appears in the view. + +.. image:: images/Point_res.png + :align: center + +.. centered:: + Point created + +**See Also** a sample TUI Script of a :ref:`tui_create_point` operation. \ No newline at end of file diff --git a/src/SketchPlugin/doc/projectionFeature.rst b/src/SketchPlugin/doc/projectionFeature.rst index 27f83721e..03d281ae6 100644 --- a/src/SketchPlugin/doc/projectionFeature.rst +++ b/src/SketchPlugin/doc/projectionFeature.rst @@ -2,9 +2,52 @@ Projection ========== +| The Projection operation creates projection of 3D edge or vertex onto the sketch plane. +| The result of projection is a line. -.. image:: images/Projection.png +To create Projection in the active Sketch: + +#. select in the Main Menu *Sketch - > Projection* item or +#. click **Projection** button in Sketch toolbar: + +.. image:: images/projection.png + :align: center + +.. centered:: + **Projection** button + +Property panel: + +.. image:: images/Projection_panel.png :align: center .. centered:: - Create a projection + Projection + +Input fields: + +- **Object** is the 3D object (edge or vertex) to project onto the sketch plane. +- **Include into the sketch result** option defines whether to include the projection line into the sketch result. + +**TUI Command**: + +- *Sketch_1.addProjection(EdgeOrVertex, IncludeIntoResult)* + + **Arguments**: edge or vertex and include into the result flag + +- *Sketch_1.addProjection(EdgeOrVertexName, IncludeIntoResult)* + + **Arguments**: edge or vertex name and include into the result flag + +Result +"""""" + +Created Projection appears in the view. + +.. image:: images/Projection_res.png + :align: center + +.. centered:: + Projection created (purple line) + +**See Also** a sample TUI Script of a :ref:`tui_create_projection` operation. \ No newline at end of file diff --git a/src/SketchPlugin/doc/radiusFeature.rst b/src/SketchPlugin/doc/radiusFeature.rst index 6613ad95e..9cc3b472f 100644 --- a/src/SketchPlugin/doc/radiusFeature.rst +++ b/src/SketchPlugin/doc/radiusFeature.rst @@ -2,9 +2,67 @@ Radius constraint ================= +Radius constraint fixes radius of circle or arc. -.. image:: images/Radius.png - :align: center +To create Radius constraint in the active Sketch: + +#. select in the Main Menu *Sketch - > Radius* item or +#. click **Radius** button in Sketch toolbar: + +.. image:: images/radius_constr.png + :align: center + +.. centered:: + **Radius** button + +Property panel: + +.. image:: images/Radius_panel.png + :align: center + +Input fields: + +- **Circle or Arc** is the circe or arc circumference selected in the view +- **Value** is a radius of the selected object, could be modified to set the desirable value +- **Text location** is a position of the radius value label relating to extension line (in the view) + .. image:: images/location_left.png + :align: left + **Left** inserts text at the left of the radius extension line. + + .. image:: images/location_automatic.png + :align: left + **Automatic** inserts text at the middle of the radius extension line if it has enough length, otherwise - to the left. + + .. image:: images/location_right.png + :align: left + **Right** inserts text to the right of the radius extension line. + +When circle or arc is selected radius value is displayed in the property panel and in the view. + +When creating the constraint, after selection of the circle or arc at the first time : + +- drag the radius presentation in the view to the desired position (by move mouse and click once) +- set desirable radius value in the input field in the view and press **Enter** or just press **Enter** to keep the current radius + +.. image:: images/Radius_field_view.png + :align: center .. centered:: - Create a radius constraint + Radius input in the view + +**TUI Command**: *Sketch_1.setRadius(CircleOrArc, Value)* + +**Arguments**: circle or arc circumference object + radius value + +Result +"""""" + +Created Radius appears in the view. + +.. image:: images/Radius_res.png + :align: center + +.. centered:: + Radius created + +**See Also** a sample TUI Script of a :ref:`tui_create_radius` operation. diff --git a/src/SketchPlugin/doc/rectangleFeature.rst b/src/SketchPlugin/doc/rectangleFeature.rst index c2afc1802..3e90a11d7 100644 --- a/src/SketchPlugin/doc/rectangleFeature.rst +++ b/src/SketchPlugin/doc/rectangleFeature.rst @@ -1,10 +1,50 @@ + .. _create_sketch_rectangle: Rectangle ========= +The feature Rectangle creates a rectangle by two opposite points in the current Sketch. -.. image:: images/Rectangle.png +The result is represented in the form of four Lines which compose a rectangle. +Two of the lines have Vertical constraint and two others have Horizontal constraint. + +To add new Rectangle to the Sketch: + +#. select in the Main Menu *Sketch - > Rectangle* item or +#. click **Rectangle** button in Sketch toolbar: + +.. image:: images/rectangle.png + :align: center + +.. centered:: + **Rectangle** button + +The following property panel appears. + +.. image:: images/Rectangle_panel.png :align: center .. centered:: - Create a rectangle + Rectangle + +Click in the view once to set the first corner, then move the mouse and click a second time to set the opposite corner. +In the case of click on an existing object constraint for the point will be created automatically. + +Start and end points coordinates are displayed in the property panel. + +**TUI Command**: *Sketch_1.addRectangle(X1, Y1, X2, Y2)* + +**Arguments**: 4 values (coordinates of the start and end points). + +Result +"""""" + +Created rectangle appears in the view. + +.. image:: images/Rectangle_res.png + :align: center + +.. centered:: + Rectangle created + +**See Also** a sample TUI Script of a :ref:`tui_create_rectangle` operation. \ No newline at end of file diff --git a/src/SketchPlugin/doc/rigidFeature.rst b/src/SketchPlugin/doc/rigidFeature.rst deleted file mode 100644 index e920e4785..000000000 --- a/src/SketchPlugin/doc/rigidFeature.rst +++ /dev/null @@ -1,10 +0,0 @@ - -Fixed constraint -================ - - -.. image:: images/Fixed.png - :align: center - -.. centered:: - Create a fixed constraint diff --git a/src/SketchPlugin/doc/rotationFeature.rst b/src/SketchPlugin/doc/rotationFeature.rst index db5b219db..592417d04 100644 --- a/src/SketchPlugin/doc/rotationFeature.rst +++ b/src/SketchPlugin/doc/rotationFeature.rst @@ -2,9 +2,62 @@ Angular copy ============ +Angular copy operation creates one or multiple copies of the skecth entities by rotation relative to a specified center point. -.. image:: images/AngularCopy.png +To create Angular copy in the active Sketch: + +#. select in the Main Menu *Sketch - > Angular copy* item or +#. click **Angular copy** button in Sketch toolbar: + +.. image:: images/rotate.png + :align: center + +.. centered:: + **Angular copy** button + +Property panel: + +.. image:: images/Rotation_panel.png :align: center .. centered:: - Create an angular copy + Angular copy + +Input fields: + +- **Segments** is the list of segments (lines, circles, arcs) selected in the view. +- **Center of rotation** is the center point selected in the view. +- **Full angle/Single angle** option: + + .. image:: images/angle_up_full_32x32.png + :align: left + **Full angle**: angle step of rotation is equal to the defined angle divided by the number of copies (total number minus one). + + .. image:: images/angle_up_full_32x32.png + :align: left + **Single angle**: angle step of rotation is equal to the defined angle. + +- **Angle** is the angle of rotation. +- **Reversed** defines rotation direction. If checked - in clockwise direction, otherwise - in a counterclockwise direction. +- **Total number of objects** is the total number of objects including the original one. + + +**TUI Command**: *Sketch_1.addRotation(Objects, CenterPoint, Angle, NumberOfObjects, FullValue, Reversed)* + +**Arguments**: list of objects + center point + angle + number of objects + full value flag + reversed flag + +Result +"""""" + +Created Angular copy appears in the view. + +| The original and an angular copy objects are marked with the special sign. +| Copy objects are drawn with a thinner line. + +.. image:: images/Rotation_res.png + :align: center + +.. centered:: + Angular copy created + +**See Also** a sample TUI Script of a :ref:`tui_create_rotation` operation. diff --git a/src/SketchPlugin/doc/splitFeature.rst b/src/SketchPlugin/doc/splitFeature.rst index 1f3beaf1e..19680abf0 100644 --- a/src/SketchPlugin/doc/splitFeature.rst +++ b/src/SketchPlugin/doc/splitFeature.rst @@ -2,9 +2,54 @@ Split ===== +| The Split operation splits sketch curve into multiple segments. +| The curve should have points lying on it. +| Open curves (line or arc) require one or more points to split with; closed curves (circle) require two or more points. -.. image:: images/Split.png +To create Split in the active Sketch: + +#. select in the Main Menu *Sketch - > Split* item or +#. click **Split** button in Sketch toolbar: + +.. image:: images/split.png + :align: center + +.. centered:: + **Split** button + +Property panel: + +.. image:: images/Split_panel.png :align: center .. centered:: - Split a line + Split + +Input fields: + +- **Segment** is used to select a segment to be split off in the view. + +The selected segment is highlighted in the view: + +.. image:: images/Split_segment_sel.png + :align: center + +.. centered:: + The segment to split off + +**TUI Command**: *Sketch_1.addSplit(Feature, PositionPoint)* + +**Arguments**: feature (line, arc or circle) and position point (a point on or closest to the segment to split off) + +Result +"""""" + +Created Split appears in the view. + +.. image:: images/Split_res.png + :align: center + +.. centered:: + Split created + +**See Also** a sample TUI Script of a :ref:`tui_create_split` operation. \ No newline at end of file diff --git a/src/SketchPlugin/doc/tangentFeature.rst b/src/SketchPlugin/doc/tangentFeature.rst index feb048afb..11903d6c1 100644 --- a/src/SketchPlugin/doc/tangentFeature.rst +++ b/src/SketchPlugin/doc/tangentFeature.rst @@ -2,9 +2,46 @@ Tangent constraint ================== +Tangent constraint fixes a circle (or an arc) and a line so that a line is tangent to a circle (or an arc). -.. image:: images/Tangent.png - :align: center +To create Tangent in the active Sketch: + +#. select in the Main Menu *Sketch - > Tangent* item or +#. click **Tangent** button in Sketch toolbar: + +.. image:: images/tangent.png + :align: center + +.. centered:: + **Tangent** button + +Property panel: + +.. image:: images/Tangent_panel.png + :align: center + +Input fields: + +- **First object** is a line, a circle or an arc selected in the view. +- **Second object** is a line, a circle or an arc selected in the view. + +Note that one of two objects should be a line. + +After the objects are selected the special sign will be added close to the tangency point in the view. + +**TUI Command**: *Sketch_1.setTangent(Line, CircleOrArc)* + +**Arguments**: 2 objects (the first is a line, the second one is a circle or an arc) + +Result +"""""" + +Created Tangent constraint appears in the view. + +.. image:: images/Tangent_res.png + :align: center .. centered:: - Create a tangent constraint + Tangent constraint created + +**See Also** a sample TUI Script of a :ref:`tui_create_tangent` operation. diff --git a/src/SketchPlugin/doc/translationFeature.rst b/src/SketchPlugin/doc/translationFeature.rst index 90b89ce66..6221fd823 100644 --- a/src/SketchPlugin/doc/translationFeature.rst +++ b/src/SketchPlugin/doc/translationFeature.rst @@ -2,9 +2,60 @@ Linear copy =========== +Linear copy operation creates one or multiple copies of the skecth entities along a vector defined by two points. -.. image:: images/LinearCopy.png +To create Linear copy in the active Sketch: + +#. select in the Main Menu *Sketch - > Linear copy* item or +#. click **Linear copy** button in Sketch toolbar: + +.. image:: images/translate.png + :align: center + +.. centered:: + **Linear copy** button + +Property panel: + +.. image:: images/Linear_panel.png :align: center .. centered:: - Create a linear copy + Linear copy + +Input fields: + +- **Segments** is the list of segments (lines, circles, arcs) selected in the view. +- **Single value/Full value** option: + + .. image:: images/translate_32x32.png + :align: left + **Single value**: step of translation is equal to the distance between the start and the end point. + + .. image:: images/translate_full_32x32.png + :align: left + **Full value**: distance from the originals to the farthest copies is equal to the distance between the start and the end point. +- **Start point** is the initial point of translation vector. +- **End point** is the terminal point of translation vector. +- **Total number of objects** is the total number of objects including the original one. + + +**TUI Command**: *Sketch_1.addTranslation(Objects, Point1, Point2, NumberOfObjects, FullValue)* + +**Arguments**: list of objects + start and end points + number of objects + full value flag + +Result +"""""" + +Created Linear copy appears in the view. + +| The original and a linear copy objects are marked with the special sign. +| Copy objects are drawn with a thinner line. + +.. image:: images/Linear_res.png + :align: center + +.. centered:: + Linear copy created + +**See Also** a sample TUI Script of a :ref:`tui_create_translation` operation. diff --git a/src/SketchPlugin/doc/trimFeature.rst b/src/SketchPlugin/doc/trimFeature.rst index 8ed752135..bb08e517a 100644 --- a/src/SketchPlugin/doc/trimFeature.rst +++ b/src/SketchPlugin/doc/trimFeature.rst @@ -2,9 +2,54 @@ Trim ==== +| The Trim operation trims away the specified segment of the curve. +| The curve should have points lying on it or intersections with other curves. +| Open curves (line or arc) require one or more points; closed curves (circle) require two or more points. -.. image:: images/Trim.png +To create Trim in the active Sketch: + +#. select in the Main Menu *Sketch - > Trim* item or +#. click **Trim** button in Sketch toolbar: + +.. image:: images/trim.png + :align: center + +.. centered:: + **Trim** button + +Property panel: + +.. image:: images/Trim_panel.png :align: center .. centered:: - Trim a line + Trim + +Input fields: + +- **Segment** is used to select a segment to remove in the view. + +The selected segment is highlighted in the view: + +.. image:: images/Trim_segment_sel.png + :align: center + +.. centered:: + The segment to remove + +**TUI Command**: *Sketch_1.addTrim(Feature, PositionPoint)* + +**Arguments**: feature (line, arc or circle) and position point (a point on or closest to the segment to remove) + +Result +"""""" + +Created Trim appears in the view. + +.. image:: images/Trim_res.png + :align: center + +.. centered:: + Trim created + +**See Also** a sample TUI Script of a :ref:`tui_create_trim` operation. diff --git a/src/SketchPlugin/doc/verticalDistFeature.rst b/src/SketchPlugin/doc/verticalDistFeature.rst index 9fb6991b9..6a512e325 100644 --- a/src/SketchPlugin/doc/verticalDistFeature.rst +++ b/src/SketchPlugin/doc/verticalDistFeature.rst @@ -2,9 +2,70 @@ Vertical distance constraint ============================ +Vertical Distance constraint fixes distance between two points along the vertical axis. -.. image:: images/VerticalDist.png - :align: center +The constraint can be defined between two points such as point object, line or arc end point, center of circle or arc. + +To create Vertical Distance constraint in the active Sketch: + +#. select in the Main Menu *Sketch - > Vertical Distance* item or +#. click **Vertical Distance** button in Sketch toolbar: + +.. image:: images/distance_v.png + :align: center .. centered:: - Create a vertical distance constraint + **Vertical Distance** button + +Property panel: + +.. image:: images/VerticalDistance_panel.png + :align: center + +Input fields: + +- **First point** is the first point selected in the view +- **Second point** is the second point selected in the view +- **Value** is a distance between the objects, could be modified to set the desirable value +- **Text location** is a position of the distance value label relating to extension line (in the view) + .. image:: images/location_left.png + :align: left + **Left** inserts text at the left of the distance extension line. + + .. image:: images/location_automatic.png + :align: left + **Automatic** inserts text at the middle of the distance extension line if it has enough length, otherwise - to the left. + + .. image:: images/location_right.png + :align: left + **Right** inserts text to the right of the distance extension line. + +When both objects are selected vertical distance value is displayed in the property panel and in the view. + +When creating the constraint, after selection of two objects at the first time: + +- drag the Vertical distance presentation in the view to the desired position (by move mouse and click once) +- set desirable vertical distance value in the input field in the view and press **Enter** or just press **Enter** to keep the current distance + +.. image:: images/VerticalDistance_field_view.png + :align: center + +.. centered:: + Vertical Distance input in the view + +**TUI Command**: *Sketch_1.setVerticalDistance(FirstObject, SecondObject, Value)* + +**Arguments**: 2 objects + vertical distance value + +Result +"""""" + +Created Vertical Distance appears in the view. + +.. image:: images/VerticalDistance_res.png + :align: center + +.. centered:: + Vertical Distance created + +**See Also** a sample TUI Script of a :ref:`tui_create_vdistance` operation. diff --git a/src/SketchPlugin/doc/verticalFeature.rst b/src/SketchPlugin/doc/verticalFeature.rst index 61b76aae6..4de7dfe8e 100644 --- a/src/SketchPlugin/doc/verticalFeature.rst +++ b/src/SketchPlugin/doc/verticalFeature.rst @@ -2,9 +2,44 @@ Vertical constraint =================== +Vertical constraint fixes lines to lie parallel to the vertical axis. -.. image:: images/Vertical.png - :align: center +To create Vertical constraint in the active Sketch: + +#. select in the Main Menu *Sketch - > Vertical* item or +#. click **Vertical** button in Sketch toolbar: + +.. image:: images/vertical.png + :align: center .. centered:: - Create a vertical constraint + **Vertical** button + +Property panel: + +.. image:: images/Vertical_panel.png + :align: center + +Input fields: + +- **Line** is the line selected in the view. + +| After the line is selected it becomes parallel to the vertical axis in the view. +| **V** sign added above the line. + +**TUI Command**: *Sketch_1.setVertical(LineObject)* + +**Arguments**: 1 line object + +Result +"""""" + +Created Vertical constraint appears in the view. + +.. image:: images/Vertical_res.png + :align: center + +.. centered:: + Vertical constraint created + +**See Also** a sample TUI Script of a :ref:`tui_create_vertical` operation. \ No newline at end of file diff --git a/src/SketchPlugin/plugin-Sketch.xml b/src/SketchPlugin/plugin-Sketch.xml index 82656539a..f90172408 100644 --- a/src/SketchPlugin/plugin-Sketch.xml +++ b/src/SketchPlugin/plugin-Sketch.xml @@ -41,7 +41,7 @@ email : webmaster.salome@opencascade.com + helpfile="SketchPlugin.html"> @@ -52,7 +52,7 @@ email : webmaster.salome@opencascade.com + helpfile="pointFeature.html"> @@ -60,7 +60,7 @@ email : webmaster.salome@opencascade.com + helpfile="lineFeature.html"> + helpfile="circleFeature.html"> + helpfile="arcFeature.html"> + helpfile="filletFeature.html"> + helpfile="splitFeature.html"> + helpfile="trimFeature.html"> + helpfile="ellipseFeature.html"> + helpfile="projectionFeature.html"> + helpfile="intersectionFeature.html"> + helpfile="mirrorFeature.html"> @@ -531,7 +531,7 @@ email : webmaster.salome@opencascade.com + helpfile="translationFeature.html"> + helpfile="rotationFeature.html"> + helpfile="distanceFeature.html">