From: vsr Date: Mon, 21 Jul 2008 13:51:52 +0000 (+0000) Subject: Merge from V4_1_0_maintainance branch (from tag mergeto_BR_QT4_Dev_08Jul08) X-Git-Tag: V5_1_0a1~40 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2bd6b8908ecce0ff295eede38a1b3abd474c603e;p=modules%2Fgeom.git Merge from V4_1_0_maintainance branch (from tag mergeto_BR_QT4_Dev_08Jul08) --- diff --git a/build_configure b/build_configure index 27672f14d..91598ae7d 100755 --- a/build_configure +++ b/build_configure @@ -33,10 +33,10 @@ fi for option do case $option in - -with-ihm | --with-ihm) + -with-gui | --with-gui) GEOM_WITH_GUI="yes" break;; - -without-ihm | --without-ihm | -with-ihm=no | --with-ihm=no) + -without-gui | --without-gui | -with-gui=no | --with-gui=no) GEOM_WITH_GUI="no" break;; esac diff --git a/configure.ac b/configure.ac index f119c8cdb..89c723bb7 100644 --- a/configure.ac +++ b/configure.ac @@ -369,6 +369,7 @@ AC_OUTPUT([ \ ./doc/salome/gui/Makefile \ ./doc/salome/gui/GEOM/doxyfile \ ./doc/salome/gui/GEOM/doxyfile_py \ + ./doc/salome/gui/GEOM/doxyfile_tui \ ./doc/salome/tui/Makefile \ ./doc/salome/tui/GEOM/doxyfile \ ./doc/salome/tui/GEOM/sources/static/tree.js \ diff --git a/doc/salome/gui/GEOM/doxyfile.in b/doc/salome/gui/GEOM/doxyfile.in index 75b0c99aa..2aa344fd9 100755 --- a/doc/salome/gui/GEOM/doxyfile.in +++ b/doc/salome/gui/GEOM/doxyfile.in @@ -18,7 +18,9 @@ WARNINGS = YES #--------------------------------------------------------------------------- INPUT = @srcdir@/input FILE_PATTERNS = *.doc +EXCLUDE = IMAGE_PATH = @srcdir@/images +EXAMPLE_PATH = @top_srcdir@/src/GEOM_SWIG #--------------------------------------------------------------------------- #HTML related options @@ -46,4 +48,5 @@ GENERATE_RTF = NO #--------------------------------------------------------------------------- #External reference options #--------------------------------------------------------------------------- -TAGFILES = geompy_doc.tag=./geompy_doc \ No newline at end of file +TAGFILES = geompy_doc.tag=./geompy_doc +ALLEXTERNALS = NO diff --git a/doc/salome/gui/GEOM/doxyfile_py.in b/doc/salome/gui/GEOM/doxyfile_py.in index 88df45eb8..26ae2c4db 100755 --- a/doc/salome/gui/GEOM/doxyfile_py.in +++ b/doc/salome/gui/GEOM/doxyfile_py.in @@ -80,6 +80,7 @@ EXAMPLE_RECURSIVE = NO INPUT = @top_srcdir@/src/GEOM_SWIG FILE_PATTERNS = geompyDC.py IMAGE_PATH = @srcdir@/images +EXAMPLE_PATH = @top_srcdir@/src/GEOM_SWIG RECURSIVE = NO #--------------------------------------------------------------------------- @@ -142,3 +143,4 @@ DOT_CLEANUP = YES #External reference options #--------------------------------------------------------------------------- GENERATE_TAGFILE = geompy_doc.tag +TAGFILES = tui_examples.tag=./.. diff --git a/doc/salome/gui/GEOM/doxyfile_tui.in b/doc/salome/gui/GEOM/doxyfile_tui.in new file mode 100755 index 000000000..90133c080 --- /dev/null +++ b/doc/salome/gui/GEOM/doxyfile_tui.in @@ -0,0 +1,50 @@ +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = "Geometry Module Reference Manual v.@VERSION@" +OUTPUT_DIRECTORY = ./ +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +TAB_SIZE = 5 + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES + +#--------------------------------------------------------------------------- +#Input related options +#--------------------------------------------------------------------------- +INPUT = @srcdir@/input +FILE_PATTERNS = tui_*.doc +IMAGE_PATH = @srcdir@/images +EXAMPLE_PATH = @top_srcdir@/src/GEOM_SWIG + +#--------------------------------------------------------------------------- +#HTML related options +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = ./ +HTML_HEADER = @srcdir@/static/header.html +HTML_FOOTER = @srcdir@/static/footer.html +#HTML_STYLESHEET = @srcdir@/static/doxygen.css +TOC_EXPAND = YES +DISABLE_INDEX = NO +GENERATE_TREEVIEW = YES +TREEVIEW_WIDTH = 300 + +#--------------------------------------------------------------------------- +#LaTeX related option +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO + +#--------------------------------------------------------------------------- +#RTF related options +#--------------------------------------------------------------------------- +GENERATE_RTF = NO + +#--------------------------------------------------------------------------- +#External reference options +#--------------------------------------------------------------------------- +GENERATE_TAGFILE = tui_examples.tag diff --git a/doc/salome/gui/GEOM/files/introduction_to_geom.htm b/doc/salome/gui/GEOM/files/introduction_to_geom.htm deleted file mode 100755 index d39bc391f..000000000 --- a/doc/salome/gui/GEOM/files/introduction_to_geom.htm +++ /dev/null @@ -1,143 +0,0 @@ - - - - - -Introduction to GEOM - - - - - - - - - - - - -

Introduction to Geometry

- -

Geometry module - of SALOME is destined for:

- -

 

- - - -

 

- - --- - - - -
-
    - -
  • Creation of basic geometrical objects

  • - -
  • Construction of primitives

  • - -
  • Building shapes

  • - -
  • Generation of complex shapes

  • - -
  • Working with groups

  • - -
  • Geometrical repairing of objects

  • - -
  • Geometrical boolean operations

  • - -
  • Geometrical transformations

  • - -
  • Building by blocks

  • -
-

 

-

- -

 

- - - - diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image27.gif b/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image27.gif deleted file mode 100755 index 216da7531..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image27.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image29.gif b/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image29.gif deleted file mode 100755 index 5ee22f391..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image29.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image30.gif b/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image30.gif deleted file mode 100755 index a83d6d108..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image30.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image31.gif b/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image31.gif deleted file mode 100755 index 82a696852..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image31.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image32.gif b/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image32.gif deleted file mode 100755 index f74b5f036..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image32.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image33.gif b/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image33.gif deleted file mode 100755 index 72dd5f5cc..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image33.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image34.gif b/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image34.gif deleted file mode 100755 index ed0f4522d..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image34.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_booleangui_functions.htm b/doc/salome/gui/GEOM/files/salome2_sp3_booleangui_functions.htm deleted file mode 100755 index ff110b02c..000000000 --- a/doc/salome/gui/GEOM/files/salome2_sp3_booleangui_functions.htm +++ /dev/null @@ -1,159 +0,0 @@ - - - - - -Using Boolean Operations - - - - - - - - - - - - - -

Using Boolean Operations

- -

 

- -

You can use the following - boolean operations for construction of more complex geometrical objects - (2D & 3D elements) :

- -

 

- - - - - -

 

- -

There is a general TUI command covering - all these operations, which can be used alongside with separate commands - for each operation.

- -

geompy.MakeBoolean(Shape1, - Shape2, Operation), where Shape1 is the first argument and Shape2 - is the second argument of Boolean operation, Operation is a type of the - Boolean operation (1 – Common, 2 – Cut, 3 – Fuse, 4 – Section).

- -

 

- -

Our TUI - Scripts provide you with useful examples of the use of Boolean - Operations.

- -

 

- - - - diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image1.gif b/doc/salome/gui/GEOM/files/salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image1.gif deleted file mode 100755 index 129d17d63..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image1.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image2.gif b/doc/salome/gui/GEOM/files/salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image2.gif deleted file mode 100755 index 56ec71d40..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image2.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image3.gif b/doc/salome/gui/GEOM/files/salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image3.gif deleted file mode 100755 index d210eb981..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image3.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image4.gif b/doc/salome/gui/GEOM/files/salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image4.gif deleted file mode 100755 index 3372d41c4..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image4.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image56.gif b/doc/salome/gui/GEOM/files/salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image56.gif deleted file mode 100755 index d7adb4c4e..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image56.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image57.gif b/doc/salome/gui/GEOM/files/salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image57.gif deleted file mode 100755 index 4f7986042..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image57.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image58.gif b/doc/salome/gui/GEOM/files/salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image58.gif deleted file mode 100755 index 178eb6403..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image58.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image59.gif b/doc/salome/gui/GEOM/files/salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image59.gif deleted file mode 100755 index 18fa56742..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image59.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_geomtoolsgui_functions.htm b/doc/salome/gui/GEOM/files/salome2_sp3_geomtoolsgui_functions.htm deleted file mode 100755 index de5df125d..000000000 --- a/doc/salome/gui/GEOM/files/salome2_sp3_geomtoolsgui_functions.htm +++ /dev/null @@ -1,146 +0,0 @@ - - - - - -Importing and exporting geometrical objects - - - - - - - - - - - - -

Importing/exporting geometrical objects

- -

In Geometry module you - can import and export geometrical objects from/into BREP, IGES, STEP files. The mechanisms of import and export - are implemented via plug-ins, which gives you the opportunity to expand - the range of available formats by adding more plug-ins (for example, CATIA - 5).  

- -  - -

To import geometrical objects from a BREP, IGES, STEP file:

- -

 

- -

From the File - menu choose Import. In - the opening dialog box Import - select the required format of the file for importation and search for - a *.brep, *.iges or *.step  file. -

- -

 

- -

- -

 

- -

Select the required file and click Open. Your file will be imported in - the module and its contents (geometrical object) will be displayed in - the Object Browser.

- -

 

- -

 

- -

To export geometrical objects into a BREP, IGES, STEP file:

- -

 

- -

Select the object you wish to export, then - from the File menu choose Export. In the opening dialog box Export define the required format, - the name and the location of the file for exportation. -

- -

 

- -

- -

 

- -

Click Save - to confirm your exportation.  

- - - - diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions.htm b/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions.htm deleted file mode 100755 index acb24e686..000000000 --- a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions.htm +++ /dev/null @@ -1,483 +0,0 @@ - - - - - -Using Measurement Tools - - - - - - - - - - - - - -

Using measurement tools

- -

Measurement tools in GEOM are necessary for getting different - data concerning created or imported geometrical objects. They are:

- -

 

- - - -

 

- -

Our TUI Scripts - show how to use Measurement Tools - with  TUI - commands.

- -

 

- -

To use measurement tools:

- -

 

- -

In the main menu select Measures - submenu.

- -

 

- -

 

- -

  Point coordinates

- -

 

- -

Returns the - coordinates of a point.

- -

 

- -

Result: Point - coordinates (X, Y, Z) in 3D space in the form of Python Tuple.

- -

TUI command: - geompy.PointCoordinates(Point), - where Point is a point whose coordinates are inquired.

- -

 

- -

- -

 

- -

 

- -

Basic properties -

- -

 

- -

Returns the properties (Length, Surface & - Volume) for the selected geometrical object.

- -

 

- -

Result: Display - Length, Surface & Volume in the form of Python Tuple.

- -

TUI command: - geompy.BasicProperties(Shape), - where Shape is a shape whose properties are inquired.

- -

 

- -

- -

 

- -

 

- -

- Center of mass

- -

 

- -

Calculates and returns the coordinates of the - gravity center for the selected geometrical object.

- -

 

- -

Result: GEOM_Object - (vertex).

- -

TUI Command: - geompy.MakeCDG(Shape), where - Shape is the shape for which a center of gravity is computed.

- -

 

- -

- -

 

- -

 

- -

Inertia -

- -

 

- -

Returns the axis of inertia for the selected - geometrical object.

- -

 

- -

Result: Displays - the matrix and moments of inertia in the form of Python Tuple (I11, I12, - I13,

- -

 I21, - I22, I23,

- -

 I31, - I32, I33,

- -

 Ix, - Iy, Iz).

- -

 

- -

TUI command: - geompy.Inertia(Shape), where - Shape is a shape for which a matrix of inertia and moment of inertia are - returned.

- -

 

- -

- -

 

- -

 

- -

Bounding - box

- -

 

- -

Returns the dimensions of the bounding box - for the selected geometrical object.

- -

 

- -

Result: Displays - the dimensions of the bounding box of a geometrical object in the form - of Python Tuple (Xmin, Xmax, Ymin, Ymax, Zmin, Zmax).

- -

TUI command: geompy.BoundingBox(Shape), where Shape is a shape for which a bounding - box is computed.

- -

 

- -

- -

 

- -

 

- -

Min. distance

- -

 

- -

Returns the minimum distance between two geometrical - objects.

- -

 

- -

TUI command: geompy.MinDistance(Shape1, - Shape2), where Shape1 and Shape2 - are shapes between which the minimal distance computed.

- -

 

- -

- -

 

- -

 

- -

- Tolerance

- -

 

- -

Returns the maximum and the minimum tolerance - for the selected geometrical object.

- -

 

- -

Result: Displays - the tolerance values (FaceMinTol, FaceMaxTol, EgdeMinTol, EgdeMaxTol, - VertexMinTol, VertexMaxTol).

- -

TUI command: geompy.Tolerance(Shape), where Shape is a shape for which minimal - and maximal tolerances are returned.

- -

 

- -

- -

 

- -

 

- -

WhatIs -

- -

 

- -

Displays types and quantities of all elements - composing the selected geometrical object.

- -

 

- -

TUI command: - geompy.WhatIs(Shape), where Shape - is a shape from which a description is returned.

- -

 

- -

- -

 

- -

 

- -

Check -

- -

 

- -

Checks the topology of the selected geometrical - object and returns True if it is valid. Check - also geometry checkbox allows to test the geometry as well.

- -

 

- -

Result: Boolean.

- -

TUI Command: - geompy.(theShape, theIsCheckGeom - = 0), where is shape which is checked for validity.

- -

 

- -

- -

 

- -

 

- -

Check compound - of blocks

- -

 

- -

Checks whether a shape is a compound of glued - blocks. To be considered as a compound of blocks, the given shape must - satisfy the following conditions:

- - - -

 

- -

Informs of the following possible errors:

- - - -

 

- -

Result: Boolean; - highlight in the viewer.

- -

TUI Command: - geompy.CheckCompoundOfBlocks(Compound). - Checks if the shape is - a valid compound of blocks. If it is true, then the validity flag is returned, - and encountered errors are printed in the python console.

- -

 

- -

- -

 

- - - - diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image71.gif b/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image71.gif deleted file mode 100755 index 02e4c8ff8..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image71.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image72.gif b/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image72.gif deleted file mode 100755 index 1aebb4f08..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image72.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image73.gif b/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image73.gif deleted file mode 100755 index f11323ae3..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image73.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image74.gif b/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image74.gif deleted file mode 100755 index c429db810..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image74.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image75.gif b/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image75.gif deleted file mode 100755 index 1c8dd915f..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image75.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image76.gif b/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image76.gif deleted file mode 100755 index 7968c6143..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image76.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image77.gif b/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image77.gif deleted file mode 100755 index a2db5a6e1..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image77.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image78.gif b/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image78.gif deleted file mode 100755 index 8de970b29..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image78.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image87.gif b/doc/salome/gui/GEOM/files/salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image87.gif deleted file mode 100755 index 03b8391c3..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image87.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image88.gif b/doc/salome/gui/GEOM/files/salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image88.gif deleted file mode 100755 index e38dcabd8..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image88.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image89.gif b/doc/salome/gui/GEOM/files/salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image89.gif deleted file mode 100755 index 7a9aaadb4..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image89.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image90.gif b/doc/salome/gui/GEOM/files/salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image90.gif deleted file mode 100755 index 716e51b9f..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image90.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image100.gif b/doc/salome/gui/GEOM/files/salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image100.gif deleted file mode 100755 index 871c6f09b..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image100.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image101.gif b/doc/salome/gui/GEOM/files/salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image101.gif deleted file mode 100755 index ffdbac7e8..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image101.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image102.gif b/doc/salome/gui/GEOM/files/salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image102.gif deleted file mode 100755 index 7e683cc04..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image102.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image103.gif b/doc/salome/gui/GEOM/files/salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image103.gif deleted file mode 100755 index 9aa79cf8c..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image103.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image99.gif b/doc/salome/gui/GEOM/files/salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image99.gif deleted file mode 100755 index 0f4889b96..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image99.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_repairgui_functions_salome2_sp3_repairgui_functions_image119.gif b/doc/salome/gui/GEOM/files/salome2_sp3_repairgui_functions_salome2_sp3_repairgui_functions_image119.gif deleted file mode 100755 index d4b54ec3c..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_repairgui_functions_salome2_sp3_repairgui_functions_image119.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_repairgui_functions_salome2_sp3_repairgui_functions_image121.gif b/doc/salome/gui/GEOM/files/salome2_sp3_repairgui_functions_salome2_sp3_repairgui_functions_image121.gif deleted file mode 100755 index b39eb2034..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_repairgui_functions_salome2_sp3_repairgui_functions_image121.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_repairgui_functions_salome2_sp3_repairgui_functions_image122.gif b/doc/salome/gui/GEOM/files/salome2_sp3_repairgui_functions_salome2_sp3_repairgui_functions_image122.gif deleted file mode 100755 index 3917bf3e2..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_repairgui_functions_salome2_sp3_repairgui_functions_image122.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image128.gif b/doc/salome/gui/GEOM/files/salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image128.gif deleted file mode 100755 index 7a140ed93..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image128.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image129.gif b/doc/salome/gui/GEOM/files/salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image129.gif deleted file mode 100755 index d3fdead87..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image129.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image131.gif b/doc/salome/gui/GEOM/files/salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image131.gif deleted file mode 100755 index 2059e9d9d..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image131.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image132.gif b/doc/salome/gui/GEOM/files/salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image132.gif deleted file mode 100755 index 29aaddb0a..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image132.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image133.gif b/doc/salome/gui/GEOM/files/salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image133.gif deleted file mode 100755 index d55ff89b3..000000000 Binary files a/doc/salome/gui/GEOM/files/salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image133.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/geompy_doc/classgeompyDC_1_1geompyDC.html b/doc/salome/gui/GEOM/geompy_doc/classgeompyDC_1_1geompyDC.html deleted file mode 100644 index 60cc4ce43..000000000 --- a/doc/salome/gui/GEOM/geompy_doc/classgeompyDC_1_1geompyDC.html +++ /dev/null @@ -1,9410 +0,0 @@ - - - - - - Main Page - - - - -  - - - - -

geompyDC.geompyDC Class Reference

Inheritance diagram for geompyDC.geompyDC:

Inheritance graph
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

def __init__
def init_geom
def SubShapeName
 Get name for sub-shape aSubObj of shape aMainObj.
def addToStudy
 Publish in study aShape with name aName.
def addToStudyInFather
 Publish in study aShape with name aName as sub-object of previously published aFather.
def MakeVertex
 Create point by three coordinates.
def MakeVertexWithRef
 Create a point, distant from the referenced point on the given distances along the coordinate axes.
def MakeVertexOnCurve
 Create a point, corresponding to the given parameter on the given curve.
def MakeTangentOnCurve
 Create a tangent, corresponding to the given parameter on the given curve.
def MakeVectorDXDYDZ
 Create a vector with the given components.
def MakeVector
 Create a vector between two points.
def MakeLine
 Create a line, passing through the given point and parrallel to the given direction.
def MakeLineTwoPnt
 Create a line, passing through the given points.
def MakePlane
 Create a plane, passing through the given point and normal to the given vector.
def MakePlaneThreePnt
 Create a plane, passing through the three given points.
def MakePlaneFace
 Create a plane, similar to the existing one, but with another size of representing face.
def MakeMarker
 Create a local coordinate system.
def MakeMarkerPntTwoVec
 Create a local coordinate system.
def MakeArc
 Create an arc of circle, passing through three given points.
def MakeArcCenter
 Create an arc of circle from a center and 2 points.
def MakeCircle
 Create a circle with given center, normal vector and radius.
def MakeCircleThreePnt
 Create a circle, passing through three given points.
def MakeEllipse
 Create an ellipse with given center, normal vector and radiuses.
def MakePolyline
 Create a polyline on the set of points.
def MakeBezier
 Create bezier curve on the set of points.
def MakeInterpol
 Create B-Spline curve on the set of points.
def MakeSketcher
 Create a sketcher (wire or face), following the textual description, passed through theCommand argument.
def MakeSketcherOnPlane
 Create a sketcher (wire or face), following the textual description, passed through theCommand argument.
def MakeBox
 Create a box by coordinates of two opposite vertices.
def MakeBoxDXDYDZ
 Create a box with specified dimensions along the coordinate axes and with edges, parallel to the coordinate axes.
def MakeBoxTwoPnt
 Create a box with two specified opposite vertices, and with edges, parallel to the coordinate axes.
def MakeCylinder
 Create a cylinder with given base point, axis, radius and height.
def MakeCylinderRH
 Create a cylinder with given radius and height at the origin of coordinate system.
def MakeSpherePntR
 Create a sphere with given center and radius.
def MakeSphere
 Create a sphere with given center and radius.
def MakeSphereR
 Create a sphere with given radius at the origin of coordinate system.
def MakeCone
 Create a cone with given base point, axis, height and radiuses.
def MakeConeR1R2H
 Create a cone with given height and radiuses at the origin of coordinate system.
def MakeTorus
 Create a torus with given center, normal vector and radiuses.
def MakeTorusRR
 Create a torus with given radiuses at the origin of coordinate system.
def MakePrism
 Create a shape by extrusion of the base shape along a vector, defined by two points.
def MakePrismVecH
 Create a shape by extrusion of the base shape along the vector, i.e.
def MakePipe
 Create a shape by extrusion of the base shape along the path shape.
def MakeRevolution
 Create a shape by revolution of the base shape around the axis on the given angle, i.e.
def MakeThruSections
 Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
def MakePipeWithDifferentSections
 Create a shape by extrusion of the profile shape along the path shape.
def MakePipeWithShellSections
 Create a shape by extrusion of the profile shape along the path shape.
def MakeEdge
 Create a linear edge with specified ends.
def MakeWire
 Create a wire from the set of edges and wires.
def MakeFace
 Create a face on the given wire.
def MakeFaceWires
 Create a face on the given wires set.
def MakeFaces
 Shortcut to MakeFaceWires().
def MakeShell
 Create a shell from the set of faces and shells.
def MakeSolid
 Create a solid, bounded by the given shells.
def MakeCompound
 Create a compound of the given shapes.
def NumberOfFaces
 Gives quantity of faces in the given shape.
def NumberOfEdges
 Gives quantity of edges in the given shape.
def ChangeOrientation
 Reverses an orientation the given shape.
def OrientationChange
 Shortcut to ChangeOrientation().
def GetFreeFacesIDs
 Retrieve all free faces from the given shape.
def GetSharedShapes
 Get all sub-shapes of theShape1 of the given type, shared with theShape2.
def GetShapesOnPlane
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified plane by the certain way, defined through theState parameter.
def GetShapesOnPlaneIDs
 Works like the above method, but returns list of sub-shapes indices.
def GetShapesOnPlaneWithLocation
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified plane by the certain way, defined through theState parameter.
def GetShapesOnPlaneWithLocationIDs
 Works like the above method, but returns list of sub-shapes indices.
def GetShapesOnCylinder
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified cylinder by the certain way, defined through theState parameter.
def GetShapesOnCylinderIDs
 Works like the above method, but returns list of sub-shapes indices.
def GetShapesOnSphere
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified sphere by the certain way, defined through theState parameter.
def GetShapesOnSphereIDs
 Works like the above method, but returns list of sub-shapes indices.
def GetShapesOnQuadrangle
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified quadrangle by the certain way, defined through theState parameter.
def GetShapesOnQuadrangleIDs
 Works like the above method, but returns list of sub-shapes indices.
def GetShapesOnBox
 Find in theShape all sub-shapes of type theShapeType, situated relatively the specified theBox by the certain way, defined through theState parameter.
def GetShapesOnBoxIDs
 Works like the above method, but returns list of sub-shapes indices.
def GetInPlace
 Get sub-shape(s) of theShapeWhere, which are coincident with theShapeWhat or could be a part of it.
def GetSame
 Get sub-shape of theShapeWhere, which is equal to theShapeWhat.
def GetSubShape
 Obtain a composite sub-shape of <aShape>, composed from sub-shapes of <aShape>, selected by their unique IDs inside <aShape>.
def GetSubShapeID
 Obtain unique ID of sub-shape <aSubShape> inside <aShape>.
def SubShapeAll
 Explode a shape on subshapes of a given type.
def SubShapeAllIDs
 Explode a shape on subshapes of a given type.
def SubShapeAllSorted
 Explode a shape on subshapes of a given type.
def SubShapeAllSortedIDs
 Explode a shape on subshapes of a given type.
def SubShape
 Obtain a compound of sub-shapes of <aShape>, selected by they indices in list of all sub-shapes of type <aType>.
def SubShapeSorted
 Obtain a compound of sub-shapes of <aShape>, selected by they indices in sorted list of all sub-shapes of type <aType>.
def ProcessShape
 Apply a sequence of Shape Healing operators to the given object.
def SuppressFaces
 Remove faces from the given object (shape).
def MakeSewing
 Sewing of some shapes into single shape.
def Sew
 Sewing of the given object.
def SuppressInternalWires
 Remove internal wires and edges from the given object (face).
def SuppressHoles
 Remove internal closed contours (holes) from the given object.
def CloseContour
 Close an open wire.
def DivideEdge
 Addition of a point to a given edge object.
def ChangeOrientationShell
 Change orientation of the given object.
def ChangeOrientationShellCopy
 Change orientation of the given object.
def GetFreeBoundary
 Get a list of wires (wrapped in GEOM_Object-s), that constitute a free boundary of the given shape.
def MakeCopy
 Create a copy of the given object.
def MakeFilling
 Create a filling from the given compound of contours.
def MakeGlueFaces
 Replace coincident faces in theShape by one face.
def GetGlueFaces
 Find coincident faces in theShape for possible gluing.
def MakeGlueFacesByList
 Replace coincident faces in theShape by one face in compliance with given list of faces.
def MakeBoolean
 Perform one of boolean operations on two given shapes.
def MakeCommon
 Shortcut to MakeBoolean(s1, s2, 1).
def MakeCut
 Shortcut to MakeBoolean(s1, s2, 2).
def MakeFuse
 Shortcut to MakeBoolean(s1, s2, 3).
def MakeSection
 Shortcut to MakeBoolean(s1, s2, 4).
def MakePartition
 Perform partition operation.
def MakePartitionNonSelfIntersectedShape
 Perform partition operation.
def Partition
 Shortcut to MakePartition().
def MakeHalfPartition
 Perform partition of the Shape with the Plane.
def MakeTranslationTwoPoints
 Translate the given object along the vector, specified by its end points, creating its copy before the translation.
def MakeTranslation
 Translate the given object along the vector, specified by its components, creating its copy before the translation.
def MakeTranslationVector
 Translate the given object along the given vector, creating its copy before the translation.
def MakeRotation
 Rotate the given object around the given axis on the given angle, creating its copy before the rotatation.
def MakeRotationThreePoints
 Rotate given object around vector perpendicular to plane containing three points, creating its copy before the rotatation.
def MakeScaleTransform
 Scale the given object by the factor, creating its copy before the scaling.
def MakeMirrorByPlane
 Create an object, symmetrical to the given one relatively the given plane.
def MakeMirrorByAxis
 Create an object, symmetrical to the given one relatively the given axis.
def MakeMirrorByPoint
 Create an object, symmetrical to the given one relatively the given point.
def MakePosition
 Modify the Location of the given object by LCS, creating its copy before the setting.
def MakeOffset
 Create new object as offset of the given one.
def MakeMultiTranslation1D
 Translate the given object along the given vector a given number times.
def MakeMultiTranslation2D
 Conseqently apply two specified translations to theObject specified number of times.
def MultiRotate1D
 Rotate the given object around the given axis a given number times.
def MultiRotate2D
 Rotate the given object around the given axis on the given angle a given number times and multi-translate each rotation result.
def MakeMultiRotation1D
 The same, as MultiRotate1D(), but axis is given by direction and point.
def MakeMultiRotation2D
 The same, as MultiRotate2D(), but axis is given by direction and point.
def MakeFilletAll
 Perform a fillet on all edges of the given shape.
def MakeFillet
 Perform a fillet on the specified edges/faces of the given shape.
def MakeChamferAll
 Perform a symmetric chamfer on all edges of the given shape.
def MakeChamferEdge
 Perform a chamfer on edges, common to the specified faces, with distance D1 on the Face1.
def MakeChamferFaces
 Perform a chamfer on all edges of the specified faces, with distance D1 on the first specified face (if several for one edge).
def MakeChamfer
 Shortcut to MakeChamferEdge() and MakeChamferFaces().
def Archimede
 Perform an Archimde operation on the given shape with given parameters.
def PointCoordinates
 Get point coordinates.
def BasicProperties
 Get summarized length of all wires, area of surface and volume of the given shape.
def BoundingBox
 Get parameters of bounding box of the given shape.
def Inertia
 Get inertia matrix and moments of inertia of theShape.
def MinDistance
 Get minimal distance between the given shapes.
def Tolerance
 Get min and max tolerances of sub-shapes of theShape.
def WhatIs
 Obtain description of the given shape (number of sub-shapes of each type).
def MakeCDG
 Get a point, situated at the centre of mass of theShape.
def CheckShape
 Check a topology of the given shape.
def GetPosition
 Get position (LCS) of theShape.
def KindOfShape
 Get kind of theShape.
def Import
 Import a shape from the BREP or IGES or STEP file (depends on given format) with given name.
def ImportBREP
 Shortcut to Import() for BREP format.
def ImportIGES
 Shortcut to Import() for IGES format.
def ImportSTEP
 Shortcut to Import() for STEP format.
def Export
 Export the given shape into a file with given name.
def ExportBREP
 Shortcut to Export() for BREP format.
def ExportIGES
 Shortcut to Export() for IGES format.
def ExportSTEP
 Shortcut to Export() for STEP format.
def MakeQuad
 Create a quadrangle face from four edges.
def MakeQuad2Edges
 Create a quadrangle face on two edges.
def MakeQuad4Vertices
 Create a quadrangle face with specified corners.
def MakeHexa
 Create a hexahedral solid, bounded by the six given faces.
def MakeHexa2Faces
 Create a hexahedral solid between two given faces.
def GetPoint
 Get a vertex, found in the given shape by its coordinates.
def GetEdge
 Get an edge, found in the given shape by two given vertices.
def GetEdgeNearPoint
 Find an edge of the given shape, which has minimal distance to the given point.
def GetFaceByPoints
 Returns a face, found in the given shape by four given corner vertices.
def GetFaceByEdges
 Get a face of block, found in the given shape by two given edges.
def GetOppositeFace
 Find a face, opposite to the given one in the given block.
def GetFaceNearPoint
 Find a face of the given shape, which has minimal distance to the given point.
def GetFaceByNormale
 Find a face of block, whose outside normale has minimal angle with the given vector.
def CheckCompoundOfBlocks
 Check, if the compound of blocks is given.
def RemoveExtraEdges
 Remove all seam and degenerated edges from theShape.
def CheckAndImprove
 Check, if the given shape is a blocks compound.
def MakeBlockExplode
 Get all the blocks, contained in the given compound.
def GetBlockNearPoint
 Find block, containing the given point inside its volume or on boundary.
def GetBlockByParts
 Find block, containing all the elements, passed as the parts, or maximum quantity of them.
def GetBlocksByParts
 Return all blocks, containing all the elements, passed as the parts.
def MakeMultiTransformation1D
 Multi-transformate block and glue the result.
def MakeMultiTransformation2D
 Multi-transformate block and glue the result.
def Propagate
 Build all possible propagation groups.
def CreateGroup
 Creates a new group which will store sub shapes of theMainShape.
def AddObject
 Adds a sub object with ID theSubShapeId to the group.
def RemoveObject
 Removes a sub object with ID theSubShapeId from the group.
def UnionList
 Adds to the group all the given shapes.
def UnionIDs
 Works like the above method, but argument theSubShapes here is a list of sub-shapes indices.
def DifferenceList
 Removes from the group all the given shapes.
def DifferenceIDs
 Works like the above method, but argument theSubShapes here is a list of sub-shapes indices.
def GetObjectIDs
 Returns a list of sub objects ID stored in the group.
def GetType
 Returns a type of sub objects stored in the group.
def GetMainShape
 Returns a main shape associated with the group.
def GetEdgesByLength
 Create group of edges of theShape, whose length is in range [min_length, max_length].
def SelectEdges
 Create group of edges of selected shape, whose length is in range [min_length, max_length].
def addPath
 Add Path to load python scripts from.

Data Fields

 myBuilder
 myStudyId
 father
 BasicOp
 CurvesOp
 PrimOp
 ShapesOp
 HealOp
 InsertOp
 BoolOp
 TrsfOp
 LocalOp
 MeasuOp
 BlocksOp
 GroupOp
 myStudy
-

Member Function Documentation

- -
-
- - - - - - - - - -
def geompyDC.geompyDC.__init__ (  self  ) 
-
-
- -

- -

-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.init_geom (  self,
  theStudy 
)
-
-
- -

- -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.SubShapeName (  self,
  aSubObj,
  aMainObj 
)
-
-
- -

-Example: see GEOM_TestAll.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.addToStudy (  self,
  aShape,
  aName 
)
-
-
- -

-Example: see GEOM_TestAll.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.addToStudyInFather (  self,
  aFather,
  aShape,
  aName 
)
-
-
- -

-Example: see GEOM_TestAll.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeVertex (  self,
  theX,
  theY,
  theZ 
)
-
-
- -

-

Parameters:
- - - - -
theX The X coordinate of the point.
theY The Y coordinate of the point.
theZ The Z coordinate of the point.
-
-
Returns:
New GEOM_Object, containing the created point.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeVertexWithRef (  self,
  theReference,
  theX,
  theY,
  theZ 
)
-
-
- -

-

Parameters:
- - - - - -
theReference The referenced point.
theX Displacement from the referenced point along OX axis.
theY Displacement from the referenced point along OY axis.
theZ Displacement from the referenced point along OZ axis.
-
-
Returns:
New GEOM_Object, containing the created point.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeVertexOnCurve (  self,
  theRefCurve,
  theParameter 
)
-
-
- -

-

Parameters:
- - - -
theRefCurve The referenced curve.
theParameter Value of parameter on the referenced curve.
-
-
Returns:
New GEOM_Object, containing the created point.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeTangentOnCurve (  self,
  theRefCurve,
  theParameter 
)
-
-
- -

-

Parameters:
- - - -
theRefCurve The referenced curve.
theParameter Value of parameter on the referenced curve.
-
-
Returns:
New GEOM_Object, containing the created tangent.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeVectorDXDYDZ (  self,
  theDX,
  theDY,
  theDZ 
)
-
-
- -

-

Parameters:
- - - - -
theDX X component of the vector.
theDY Y component of the vector.
theDZ Z component of the vector.
-
-
Returns:
New GEOM_Object, containing the created vector.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeVector (  self,
  thePnt1,
  thePnt2 
)
-
-
- -

-

Parameters:
- - - -
thePnt1 Start point for the vector.
thePnt2 End point for the vector.
-
-
Returns:
New GEOM_Object, containing the created vector.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeLine (  self,
  thePnt,
  theDir 
)
-
-
- -

-

Parameters:
- - - -
thePnt Point. The resulting line will pass through it.
theDir Direction. The resulting line will be parallel to it.
-
-
Returns:
New GEOM_Object, containing the created line.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeLineTwoPnt (  self,
  thePnt1,
  thePnt2 
)
-
-
- -

-

Parameters:
- - - -
thePnt1 First of two points, defining the line.
thePnt2 Second of two points, defining the line.
-
-
Returns:
New GEOM_Object, containing the created line.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakePlane (  self,
  thePnt,
  theVec,
  theTrimSize 
)
-
-
- -

-

Parameters:
- - - - -
thePnt Point, the plane has to pass through.
theVec Vector, defining the plane normal direction.
theTrimSize Half size of a side of quadrangle face, representing the plane.
-
-
Returns:
New GEOM_Object, containing the created plane.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakePlaneThreePnt (  self,
  thePnt1,
  thePnt2,
  thePnt3,
  theTrimSize 
)
-
-
- -

-

Parameters:
- - - - - -
thePnt1 First of three points, defining the plane.
thePnt2 Second of three points, defining the plane.
thePnt3 Fird of three points, defining the plane.
theTrimSize Half size of a side of quadrangle face, representing the plane.
-
-
Returns:
New GEOM_Object, containing the created plane.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakePlaneFace (  self,
  theFace,
  theTrimSize 
)
-
-
- -

-

Parameters:
- - - -
theFace Referenced plane or LCS(Marker).
theTrimSize New half size of a side of quadrangle face, representing the plane.
-
-
Returns:
New GEOM_Object, containing the created plane.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeMarker (  self,
  OX,
  OY,
  OZ,
  XDX,
  XDY,
  XDZ,
  YDX,
  YDY,
  YDZ 
)
-
-
- -

-

Parameters:
- - - - -
OX,OY,OZ Three coordinates of coordinate system origin.
XDX,XDY,XDZ Three components of OX direction
YDX,YDY,YDZ Three components of OY direction
-
-
Returns:
New GEOM_Object, containing the created coordinate system.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeMarkerPntTwoVec (  self,
  theOrigin,
  theXVec,
  theYVec 
)
-
-
- -

-

Parameters:
- - - - -
theOrigin Point of coordinate system origin.
theXVec Vector of X direction
theYVec Vector of Y direction
-
-
Returns:
New GEOM_Object, containing the created coordinate system.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeArc (  self,
  thePnt1,
  thePnt2,
  thePnt3 
)
-
-
- -

-

Parameters:
- - - - -
thePnt1 Start point of the arc.
thePnt2 Middle point of the arc.
thePnt3 End point of the arc.
-
-
Returns:
New GEOM_Object, containing the created arc.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeArcCenter (  self,
  thePnt1,
  thePnt2,
  thePnt3,
  theSense 
)
-
-
- -

-

Parameters:
- - - - -
thePnt1 Center of the arc
thePnt2 Start point of the arc. (Gives also the radius of the arc)
thePnt3 End point of the arc (Gives also a direction)
-
-
Returns:
New GEOM_Object, containing the created arc.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeCircle (  self,
  thePnt,
  theVec,
  theR 
)
-
-
- -

-

Parameters:
- - - - -
thePnt Circle center.
theVec Vector, normal to the plane of the circle.
theR Circle radius.
-
-
Returns:
New GEOM_Object, containing the created circle.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeCircleThreePnt (  self,
  thePnt1,
  thePnt2,
  thePnt3 
)
-
-
- -

-

Parameters:
- - -
thePnt1,thePnt2,thePnt3 Points, defining the circle.
-
-
Returns:
New GEOM_Object, containing the created circle.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeEllipse (  self,
  thePnt,
  theVec,
  theRMajor,
  theRMinor 
)
-
-
- -

-

Parameters:
- - - - - -
thePnt Ellipse center.
theVec Vector, normal to the plane of the ellipse.
theRMajor Major ellipse radius.
theRMinor Minor ellipse radius.
-
-
Returns:
New GEOM_Object, containing the created ellipse.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakePolyline (  self,
  thePoints 
)
-
-
- -

-

Parameters:
- - -
thePoints Sequence of points for the polyline.
-
-
Returns:
New GEOM_Object, containing the created polyline.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeBezier (  self,
  thePoints 
)
-
-
- -

-

Parameters:
- - -
thePoints Sequence of points for the bezier curve.
-
-
Returns:
New GEOM_Object, containing the created bezier curve.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeInterpol (  self,
  thePoints 
)
-
-
- -

-

Parameters:
- - -
thePoints Sequence of points for the B-Spline curve.
-
-
Returns:
New GEOM_Object, containing the created B-Spline curve.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeSketcher (  self,
  theCommand,
  theWorkingPlane = [0 
)
-
-
- -

-
- Edges of the resulting wire or face will be arcs of circles and/or linear segments.
- Format of the description string have to be the following:

-"Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"

-Where:

    -
  • x1, y1 are coordinates of the first sketcher point (zero by default),
  • CMD is one of
      -
    • "R angle" : Set the direction by angle
    • "D dx dy" : Set the direction by DX & DY
    -
    -
      -
    • "TT x y" : Create segment by point at X & Y
    • "T dx dy" : Create segment by point with DX & DY
    • "L length" : Create segment by direction & Length
    • "IX x" : Create segment by direction & Intersect. X
    • "IY y" : Create segment by direction & Intersect. Y
    -
    -
      -
    • "C radius length" : Create arc by direction, radius and length(in degree)
    -
    -
      -
    • "WW" : Close Wire (to finish)
    • "WF" : Close Wire and build face (to finish)
    -
-

-

Parameters:
- - - -
theCommand String, defining the sketcher in local coordinates of the working plane.
theWorkingPlane Nine double values, defining origin, OZ and OX directions of the working plane.
-
-
Returns:
New GEOM_Object, containing the created wire.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeSketcherOnPlane (  self,
  theCommand,
  theWorkingPlane 
)
-
-
- -

-
- For format of the description string see the previous method.
-

Parameters:
- - - -
theCommand String, defining the sketcher in local coordinates of the working plane.
theWorkingPlane Planar Face or LCS(Marker) of the working plane.
-
-
Returns:
New GEOM_Object, containing the created wire.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeBox (  self,
  x1,
  y1,
  z1,
  x2,
  y2,
  z2 
)
-
-
- -

-Example: see GEOM_TestAll.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeBoxDXDYDZ (  self,
  theDX,
  theDY,
  theDZ 
)
-
-
- -

-Center of the box will be at point (DX/2, DY/2, DZ/2).

Parameters:
- - - - -
theDX Length of Box edges, parallel to OX axis.
theDY Length of Box edges, parallel to OY axis.
theDZ Length of Box edges, parallel to OZ axis.
-
-
Returns:
New GEOM_Object, containing the created box.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeBoxTwoPnt (  self,
  thePnt1,
  thePnt2 
)
-
-
- -

-

Parameters:
- - - -
thePnt1 First of two opposite vertices.
thePnt2 Second of two opposite vertices.
-
-
Returns:
New GEOM_Object, containing the created box.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeCylinder (  self,
  thePnt,
  theAxis,
  theR,
  theH 
)
-
-
- -

-

Parameters:
- - - - - -
thePnt Central point of cylinder base.
theAxis Cylinder axis.
theR Cylinder radius.
theH Cylinder height.
-
-
Returns:
New GEOM_Object, containing the created cylinder.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeCylinderRH (  self,
  theR,
  theH 
)
-
-
- -

-Axis of the cylinder will be collinear to the OZ axis of the coordinate system.

Parameters:
- - - -
theR Cylinder radius.
theH Cylinder height.
-
-
Returns:
New GEOM_Object, containing the created cylinder.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeSpherePntR (  self,
  thePnt,
  theR 
)
-
-
- -

-

Parameters:
- - - -
thePnt Sphere center.
theR Sphere radius.
-
-
Returns:
New GEOM_Object, containing the created sphere.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeSphere (  self,
  x,
  y,
  z,
  theR 
)
-
-
- -

-

Parameters:
- - - -
x,y,z Coordinates of sphere center.
theR Sphere radius.
-
-
Returns:
New GEOM_Object, containing the created sphere.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeSphereR (  self,
  theR 
)
-
-
- -

-

Parameters:
- - -
theR Sphere radius.
-
-
Returns:
New GEOM_Object, containing the created sphere.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeCone (  self,
  thePnt,
  theAxis,
  theR1,
  theR2,
  theH 
)
-
-
- -

-

Parameters:
- - - - - -
thePnt Central point of the first cone base.
theAxis Cone axis.
theR1 Radius of the first cone base.
theR2 Radius of the second cone base.
-
-
Note:
If both radiuses are non-zero, the cone will be truncated.

-If the radiuses are equal, a cylinder will be created instead.

-
Parameters:
- - -
theH Cone height.
-
-
Returns:
New GEOM_Object, containing the created cone.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeConeR1R2H (  self,
  theR1,
  theR2,
  theH 
)
-
-
- -

-Axis of the cone will be collinear to the OZ axis of the coordinate system.

Parameters:
- - - -
theR1 Radius of the first cone base.
theR2 Radius of the second cone base.
-
-
Note:
If both radiuses are non-zero, the cone will be truncated.

-If the radiuses are equal, a cylinder will be created instead.

-
Parameters:
- - -
theH Cone height.
-
-
Returns:
New GEOM_Object, containing the created cone.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeTorus (  self,
  thePnt,
  theVec,
  theRMajor,
  theRMinor 
)
-
-
- -

-

Parameters:
- - - - - -
thePnt Torus central point.
theVec Torus axis of symmetry.
theRMajor Torus major radius.
theRMinor Torus minor radius.
-
-
Returns:
New GEOM_Object, containing the created torus.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeTorusRR (  self,
  theRMajor,
  theRMinor 
)
-
-
- -

-

Parameters:
- - - -
theRMajor Torus major radius.
theRMinor Torus minor radius.
-
-
Returns:
New GEOM_Object, containing the created torus.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakePrism (  self,
  theBase,
  thePoint1,
  thePoint2 
)
-
-
- -

-

Parameters:
- - - - -
theBase Base shape to be extruded.
thePoint1 First end of extrusion vector.
thePoint2 Second end of extrusion vector.
-
-
Returns:
New GEOM_Object, containing the created prism.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakePrismVecH (  self,
  theBase,
  theVec,
  theH 
)
-
-
- -

-all the space, transfixed by the base shape during its translation along the vector on the given distance.

Parameters:
- - - - -
theBase Base shape to be extruded.
theVec Direction of extrusion.
theH Prism dimension along theVec.
-
-
Returns:
New GEOM_Object, containing the created prism.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakePipe (  self,
  theBase,
  thePath 
)
-
-
- -

-The path shape can be a wire or an edge.

Parameters:
- - - -
theBase Base shape to be extruded.
thePath Path shape to extrude the base shape along it.
-
-
Returns:
New GEOM_Object, containing the created pipe.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeRevolution (  self,
  theBase,
  theAxis,
  theAngle 
)
-
-
- -

-all the space, transfixed by the base shape during its rotation around the axis on the given angle.

Parameters:
- - - - -
theBase Base shape to be rotated.
theAxis Rotation axis.
theAngle Rotation angle in radians.
-
-
Returns:
New GEOM_Object, containing the created revolution.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeThruSections (  self,
  theSeqSections,
  theModeSolid,
  thePreci,
  theRuled 
)
-
-
- -

-

Parameters:
- - - - - -
theSeqSections - set of specified sections.
theModeSolid - mode defining building solid or shell
thePreci - precision 3D used for smoothing by default 1.e-6
theRuled - mode defining type of the result surfaces (ruled or smoothed).
-
-
Returns:
New GEOM_Object, containing the created shell or solid.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakePipeWithDifferentSections (  self,
  theSeqBases,
  theLocations,
  thePath,
  theWithContact,
  theWithCorrection 
)
-
-
- -

-The path shape can be a wire or an edge. the several profiles can be specified in the several locations of path.

Parameters:
- - - - - - -
theSeqBases - list of Bases shape to be extruded.
theLocations - list of locations on the path corresponding specified list of the Bases shapes. Number of locations should be equal to number of bases or list of locations can be empty.
thePath - Path shape to extrude the base shape along it.
theWithContact - the mode defining that the section is translated to be in contact with the spine.
- WithCorrection - defining that the section is rotated to be orthogonal to the spine tangent in the correspondent point
-
-
Returns:
New GEOM_Object, containing the created pipe.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakePipeWithShellSections (  self,
  theSeqBases,
  theSeqSubBases,
  theLocations,
  thePath,
  theWithContact,
  theWithCorrection 
)
-
-
- -

-The path shape can be a shell or a face. the several profiles can be specified in the several locations of path.

Parameters:
- - - - - - - -
theSeqBases - list of Bases shape to be extruded.
theSeqSubBases - list of corresponding subshapes of section shapes.
theLocations - list of locations on the path corresponding specified list of the Bases shapes. Number of locations should be equal to number of bases or list of locations can be empty.
thePath - Path shape to extrude the base shape along it.
theWithContact - the mode defining that the section is translated to be in contact with the spine.
- WithCorrection - defining that the section is rotated to be orthogonal to the spine tangent in the correspondent point
-
-
Returns:
New GEOM_Object, containing the created solids.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeEdge (  self,
  thePnt1,
  thePnt2 
)
-
-
- -

-

Parameters:
- - - -
thePnt1 Point for the first end of edge.
thePnt2 Point for the second end of edge.
-
-
Returns:
New GEOM_Object, containing the created edge.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeWire (  self,
  theEdgesAndWires 
)
-
-
- -

-

Parameters:
- - -
theEdgesAndWires List of edges and/or wires.
-
-
Returns:
New GEOM_Object, containing the created wire.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeFace (  self,
  theWire,
  isPlanarWanted 
)
-
-
- -

-

Parameters:
- - - -
theWire closed Wire or Edge to build the face on.
isPlanarWanted If TRUE, only planar face will be built. If impossible, NULL object will be returned.
-
-
Returns:
New GEOM_Object, containing the created face.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeFaceWires (  self,
  theWires,
  isPlanarWanted 
)
-
-
- -

-

Parameters:
- - - -
theWires List of closed wires or edges to build the face on.
isPlanarWanted If TRUE, only planar face will be built. If impossible, NULL object will be returned.
-
-
Returns:
New GEOM_Object, containing the created face.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeFaces (  self,
  theWires,
  isPlanarWanted 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeShell (  self,
  theFacesAndShells 
)
-
-
- -

-

Parameters:
- - -
theFacesAndShells List of faces and/or shells.
-
-
Returns:
New GEOM_Object, containing the created shell.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeSolid (  self,
  theShells 
)
-
-
- -

-

Parameters:
- - -
theShells Sequence of bounding shells.
-
-
Returns:
New GEOM_Object, containing the created solid.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeCompound (  self,
  theShapes 
)
-
-
- -

-

Parameters:
- - -
theShapes List of shapes to put in compound.
-
-
Returns:
New GEOM_Object, containing the created compound.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.NumberOfFaces (  self,
  theShape 
)
-
-
- -

-

Parameters:
- - -
theShape Shape to count faces of.
-
-
Returns:
Quantity of faces.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.NumberOfEdges (  self,
  theShape 
)
-
-
- -

-

Parameters:
- - -
theShape Shape to count edges of.
-
-
Returns:
Quantity of edges.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.ChangeOrientation (  self,
  theShape 
)
-
-
- -

-

Parameters:
- - -
theShape Shape to be reversed.
-
-
Returns:
The reversed copy of theShape.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.OrientationChange (  self,
  theShape 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetFreeFacesIDs (  self,
  theShape 
)
-
-
- -

-Free face is a face, which is not shared between two shells of the shape.

Parameters:
- - -
theShape Shape to find free faces in.
-
-
Returns:
List of IDs of all free faces, contained in theShape.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetSharedShapes (  self,
  theShape1,
  theShape2,
  theShapeType 
)
-
-
- -

-

Parameters:
- - - - -
theShape1 Shape to find sub-shapes in.
theShape2 Shape to find shared sub-shapes with.
theShapeType Type of sub-shapes to be retrieved.
-
-
Returns:
List of sub-shapes of theShape1, shared with theShape2.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetShapesOnPlane (  self,
  theShape,
  theShapeType,
  theAx1,
  theState 
)
-
-
- -

-

Parameters:
- - - - - -
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved.
theAx1 Vector (or line, or linear edge), specifying normal direction and location of the plane to find shapes on.
theState The state of the subshapes to find. It can be one of ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
-
-
Returns:
List of all found sub-shapes.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetShapesOnPlaneIDs (  self,
  theShape,
  theShapeType,
  theAx1,
  theState 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetShapesOnPlaneWithLocation (  self,
  theShape,
  theShapeType,
  theAx1,
  thePnt,
  theState 
)
-
-
- -

-

Parameters:
- - - - - - -
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved.
theAx1 Vector (or line, or linear edge), specifying normal direction of the plane to find shapes on.
thePnt Point specifying location of the plane to find shapes on.
theState The state of the subshapes to find. It can be one of ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
-
-
Returns:
List of all found sub-shapes.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetShapesOnPlaneWithLocationIDs (  self,
  theShape,
  theShapeType,
  theAx1,
  thePnt,
  theState 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetShapesOnCylinder (  self,
  theShape,
  theShapeType,
  theAxis,
  theRadius,
  theState 
)
-
-
- -

-

Parameters:
- - - - - - -
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved.
theAxis Vector (or line, or linear edge), specifying axis of the cylinder to find shapes on.
theRadius Radius of the cylinder to find shapes on.
theState The state of the subshapes to find. It can be one of ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
-
-
Returns:
List of all found sub-shapes.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetShapesOnCylinderIDs (  self,
  theShape,
  theShapeType,
  theAxis,
  theRadius,
  theState 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetShapesOnSphere (  self,
  theShape,
  theShapeType,
  theCenter,
  theRadius,
  theState 
)
-
-
- -

-

Parameters:
- - - - - - -
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved.
theCenter Point, specifying center of the sphere to find shapes on.
theRadius Radius of the sphere to find shapes on.
theState The state of the subshapes to find. It can be one of ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
-
-
Returns:
List of all found sub-shapes.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetShapesOnSphereIDs (  self,
  theShape,
  theShapeType,
  theCenter,
  theRadius,
  theState 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetShapesOnQuadrangle (  self,
  theShape,
  theShapeType,
  theTopLeftPoint,
  theTopRigthPoint,
  theBottomLeftPoint,
  theBottomRigthPoint,
  theState 
)
-
-
- -

-

Parameters:
- - - - - - - - -
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved.
theTopLeftPoint Point, specifying top left corner of a quadrangle
theTopRigthPoint Point, specifying top right corner of a quadrangle
theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
theState The state of the subshapes to find. It can be one of ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
-
-
Returns:
List of all found sub-shapes.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetShapesOnQuadrangleIDs (  self,
  theShape,
  theShapeType,
  theTopLeftPoint,
  theTopRigthPoint,
  theBottomLeftPoint,
  theBottomRigthPoint,
  theState 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetShapesOnBox (  self,
  theBox,
  theShape,
  theShapeType,
  theState 
)
-
-
- -

-

Parameters:
- - - - - -
theBox Shape for relative comparing.
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved.
theState The state of the subshapes to find. It can be one of ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
-
-
Returns:
List of all found sub-shapes.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetShapesOnBoxIDs (  self,
  theBox,
  theShape,
  theShapeType,
  theState 
)
-
-
- -

- -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetInPlace (  self,
  theShapeWhere,
  theShapeWhat 
)
-
-
- -

-

Parameters:
- - - -
theShapeWhere Shape to find sub-shapes of.
theShapeWhat Shape, specifying what to find.
-
-
Returns:
Group of all found sub-shapes or a single found sub-shape.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetSame (  self,
  theShapeWhere,
  theShapeWhat 
)
-
-
- -

-

Parameters:
- - - -
theShapeWhere Shape to find sub-shape of.
theShapeWhat Shape, specifying what to find.
-
-
Returns:
New GEOM_Object for found sub-shape.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetSubShape (  self,
  aShape,
  ListOfID 
)
-
-
- -

-Example: see GEOM_TestAll.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetSubShapeID (  self,
  aShape,
  aSubShape 
)
-
-
- -

-Example: see GEOM_TestAll.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.SubShapeAll (  self,
  aShape,
  aType 
)
-
-
- -

-

Parameters:
- - - -
theShape Shape to be exploded.
theShapeType Type of sub-shapes to be retrieved.
-
-
Returns:
List of sub-shapes of type theShapeType, contained in theShape.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.SubShapeAllIDs (  self,
  aShape,
  aType 
)
-
-
- -

-

Parameters:
- - - -
theShape Shape to be exploded.
theShapeType Type of sub-shapes to be retrieved.
-
-
Returns:
List of IDs of sub-shapes.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.SubShapeAllSorted (  self,
  aShape,
  aType 
)
-
-
- -

-Sub-shapes will be sorted by coordinates of their gravity centers.

Parameters:
- - - -
theShape Shape to be exploded.
theShapeType Type of sub-shapes to be retrieved.
-
-
Returns:
List of sub-shapes of type theShapeType, contained in theShape.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.SubShapeAllSortedIDs (  self,
  aShape,
  aType 
)
-
-
- -

-Sub-shapes will be sorted by coordinates of their gravity centers.

Parameters:
- - - -
theShape Shape to be exploded.
theShapeType Type of sub-shapes to be retrieved.
-
-
Returns:
List of IDs of sub-shapes.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.SubShape (  self,
  aShape,
  aType,
  ListOfInd 
)
-
-
- -

-Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]

-Example: see GEOM_TestAll.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.SubShapeSorted (  self,
  aShape,
  aType,
  ListOfInd 
)
-
-
- -

-Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]

-Example: see GEOM_TestAll.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.ProcessShape (  self,
  theShape,
  theOperators,
  theParameters,
  theValues 
)
-
-
- -

-

Parameters:
- - - - - -
theShape Shape to be processed.
theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
theParameters List of names of parameters ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
theValues List of values of parameters, in the same order as parameters are listed in theParameters list.
-
-
Returns:
New GEOM_Object, containing processed shape.
-Example: see GEOM_TestHealing.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.SuppressFaces (  self,
  theObject,
  theFaces 
)
-
-
- -

-

Parameters:
- - - -
theObject Shape to be processed.
theFaces Indices of faces to be removed, if EMPTY then the method removes ALL faces of the given object.
-
-
Returns:
New GEOM_Object, containing processed shape.
-Example: see GEOM_TestHealing.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeSewing (  self,
  ListShape,
  theTolerance 
)
-
-
- -

-Example: see GEOM_TestHealing.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.Sew (  self,
  theObject,
  theTolerance 
)
-
-
- -

-

Parameters:
- - - -
theObject Shape to be processed.
theTolerance Required tolerance value.
-
-
Returns:
New GEOM_Object, containing processed shape.
-Example: see MakeSewing() above -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.SuppressInternalWires (  self,
  theObject,
  theWires 
)
-
-
- -

-

Parameters:
- - - -
theObject Shape to be processed.
theWires Indices of wires to be removed, if EMPTY then the method removes ALL internal wires of the given object.
-
-
Returns:
New GEOM_Object, containing processed shape.
-Example: see GEOM_TestHealing.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.SuppressHoles (  self,
  theObject,
  theWires 
)
-
-
- -

-

Parameters:
- - - -
theObject Shape to be processed.
theWires Indices of wires to be removed, if EMPTY then the method removes ALL internal holes of the given object
-
-
Returns:
New GEOM_Object, containing processed shape.
-Example: see GEOM_TestHealing.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.CloseContour (  self,
  theObject,
  theWires,
  isCommonVertex 
)
-
-
- -

-

Parameters:
- - - - -
theObject Shape to be processed.
theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape, if -1, then theObject itself is a wire.
isCommonVertex If TRUE : closure by creation of a common vertex, If FALS : closure by creation of an edge between ends.
-
-
Returns:
New GEOM_Object, containing processed shape.
-Example: see GEOM_TestHealing.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.DivideEdge (  self,
  theObject,
  theEdgeIndex,
  theValue,
  isByParameter 
)
-
-
- -

-

Parameters:
- - - - - -
theObject Shape to be processed.
theEdgeIndex Index of edge to be divided within theObject's shape, if -1, then theObject itself is the edge.
theValue Value of parameter on edge or length parameter, depending on isByParameter.
isByParameter If TRUE : theValue is treated as a curve parameter [0..1], if FALSE : theValue is treated as a length parameter [0..1]
-
-
Returns:
New GEOM_Object, containing processed shape.
-Example: see GEOM_TestHealing.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.ChangeOrientationShell (  self,
  theObject 
)
-
-
- -

-

Parameters:
- - -
theObject Shape to be processed. given shape
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.ChangeOrientationShellCopy (  self,
  theObject 
)
-
-
- -

-

Parameters:
- - -
theObject Shape to be processed.
-
-
Returns:
New GEOM_Object, containing processed shape.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetFreeBoundary (  self,
  theObject 
)
-
-
- -

-

Parameters:
- - -
theObject Shape to get free boundary of.
-
-
Returns:
[status, theClosedWires, theOpenWires] status: FALSE, if an error(s) occured during the method execution. theClosedWires: Closed wires on the free boundary of the given shape. theOpenWires: Open wires on the free boundary of the given shape.
-Example: see GEOM_TestHealing.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeCopy (  self,
  theOriginal 
)
-
-
- -

-Example: see GEOM_TestAll.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeFilling (  self,
  theShape,
  theMinDeg,
  theMaxDeg,
  theTol2D,
  theTol3D,
  theNbIter 
)
-
-
- -

-

Parameters:
- - - - - - - -
theShape the compound of contours
theMinDeg a minimal degree
theMaxDeg a maximal degree
theTol2D a 2d tolerance
theTol3D a 3d tolerance
theNbIter a number of iteration
-
-
Returns:
New GEOM_Object, containing the created filling surface.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeGlueFaces (  self,
  theShape,
  theTolerance 
)
-
-
- -

-

Parameters:
- - - -
theShape Initial shape.
theTolerance Maximum distance between faces, which can be considered as coincident.
-
-
Returns:
New GEOM_Object, containing a copy of theShape without coincident faces.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetGlueFaces (  self,
  theShape,
  theTolerance 
)
-
-
- -

-

Parameters:
- - - -
theShape Initial shape.
theTolerance Maximum distance between faces, which can be considered as coincident.
-
-
Returns:
ListOfGO.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeGlueFacesByList (  self,
  theShape,
  theTolerance,
  theFaces 
)
-
-
- -

-

Parameters:
- - - - -
theShape Initial shape.
theTolerance Maximum distance between faces, which can be considered as coincident.
theFaces List of faces for gluing.
-
-
Returns:
New GEOM_Object, containing a copy of theShape without some faces.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeBoolean (  self,
  theShape1,
  theShape2,
  theOperation 
)
-
-
- -

-

Parameters:
- - - - -
theShape1 First argument for boolean operation.
theShape2 Second argument for boolean operation.
theOperation Indicates the operation to be done: 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
-
-
Returns:
New GEOM_Object, containing the result shape.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeCommon (  self,
  s1,
  s2 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeCut (  self,
  s1,
  s2 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeFuse (  self,
  s1,
  s2 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeSection (  self,
  s1,
  s2 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakePartition (  self,
  ListShapes,
  ListTools = [],
  ListKeepInside = [],
  ListRemoveInside = [],
  Limit = ShapeType["SHAPE"],
  RemoveWebs = 0,
  ListMaterials = [] 
)
-
-
- -

-

Parameters:
- - - - -
ListShapes Shapes to be intersected.
ListTools Shapes to intersect theShapes. !!!NOTE: Each compound from ListShapes and ListTools will be exploded in order to avoid possible intersection between shapes from this compound.
Limit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
-
-After implementation new version of PartitionAlgo (October 2006) other parameters are ignored by current functionality. They are kept in this function only for support old versions. Ignored parameters:
Parameters:
- - - - - -
ListKeepInside Shapes, outside which the results will be deleted. Each shape from theKeepInside must belong to theShapes also.
ListRemoveInside Shapes, inside which the results will be deleted. Each shape from theRemoveInside must belong to theShapes also.
RemoveWebs If TRUE, perform Glue 3D algorithm.
ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
-
-
Returns:
New GEOM_Object, containing the result shapes.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakePartitionNonSelfIntersectedShape (  self,
  ListShapes,
  ListTools = [],
  ListKeepInside = [],
  ListRemoveInside = [],
  Limit = ShapeType["SHAPE"],
  RemoveWebs = 0,
  ListMaterials = [] 
)
-
-
- -

-This method may be useful if it is needed to make a partition for compound contains nonintersected shapes. Performance will be better since intersection between shapes from compound is not performed.

-Description of all parameters as in previous method MakePartition()

-!!!NOTE: Passed compounds (via ListShapes or via ListTools) have to consist of nonintersecting shapes.

-

Returns:
New GEOM_Object, containing the result shapes.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.Partition (  self,
  ListShapes,
  ListTools = [],
  ListKeepInside = [],
  ListRemoveInside = [],
  Limit = ShapeType["SHAPE"],
  RemoveWebs = 0,
  ListMaterials = [] 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeHalfPartition (  self,
  theShape,
  thePlane 
)
-
-
- -

-

Parameters:
- - - -
theShape Shape to be intersected.
thePlane Tool shape, to intersect theShape.
-
-
Returns:
New GEOM_Object, containing the result shape.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeTranslationTwoPoints (  self,
  theObject,
  thePoint1,
  thePoint2 
)
-
-
- -

-

Parameters:
- - - - -
theObject The object to be translated.
thePoint1 Start point of translation vector.
thePoint2 End point of translation vector.
-
-
Returns:
New GEOM_Object, containing the translated object.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeTranslation (  self,
  theObject,
  theDX,
  theDY,
  theDZ 
)
-
-
- -

-

Parameters:
- - - -
theObject The object to be translated.
theDX,theDY,theDZ Components of translation vector.
-
-
Returns:
New GEOM_Object, containing the translated object.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeTranslationVector (  self,
  theObject,
  theVector 
)
-
-
- -

-

Parameters:
- - - -
theObject The object to be translated.
theVector The translation vector.
-
-
Returns:
New GEOM_Object, containing the translated object.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeRotation (  self,
  theObject,
  theAxis,
  theAngle 
)
-
-
- -

-

Parameters:
- - - - -
theObject The object to be rotated.
theAxis Rotation axis.
theAngle Rotation angle in radians.
-
-
Returns:
New GEOM_Object, containing the rotated object.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeRotationThreePoints (  self,
  theObject,
  theCentPoint,
  thePoint1,
  thePoint2 
)
-
-
- -

-

Parameters:
- - - - -
theObject The object to be rotated.
theCentPoint central point - the axis is the vector perpendicular to the plane containing the three points.
thePoint1 and thePoint2 - in a perpendicular plan of the axis.
-
-
Returns:
New GEOM_Object, containing the rotated object.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeScaleTransform (  self,
  theObject,
  thePoint,
  theFactor 
)
-
-
- -

-

Parameters:
- - - - -
theObject The object to be scaled.
thePoint Center point for scaling.
theFactor Scaling factor value.
-
-
Returns:
New GEOM_Object, containing the scaled shape.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeMirrorByPlane (  self,
  theObject,
  thePlane 
)
-
-
- -

-

Parameters:
- - - -
theObject The object to be mirrored.
thePlane Plane of symmetry.
-
-
Returns:
New GEOM_Object, containing the mirrored shape.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeMirrorByAxis (  self,
  theObject,
  theAxis 
)
-
-
- -

-

Parameters:
- - - -
theObject The object to be mirrored.
theAxis Axis of symmetry.
-
-
Returns:
New GEOM_Object, containing the mirrored shape.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeMirrorByPoint (  self,
  theObject,
  thePoint 
)
-
-
- -

-

Parameters:
- - - -
theObject The object to be mirrored.
thePoint Point of symmetry.
-
-
Returns:
New GEOM_Object, containing the mirrored shape.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakePosition (  self,
  theObject,
  theStartLCS,
  theEndLCS 
)
-
-
- -

-

Parameters:
- - - - -
theObject The object to be displaced.
theStartLCS Coordinate system to perform displacement from it. If theStartLCS is NULL, displacement will be performed from global CS. If theObject itself is used as theStartLCS, its location will be changed to theEndLCS.
theEndLCS Coordinate system to perform displacement to it.
-
-
Returns:
New GEOM_Object, containing the displaced shape.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeOffset (  self,
  theObject,
  theOffset 
)
-
-
- -

-

Parameters:
- - - -
theObject The base object for the offset.
theOffset Offset value.
-
-
Returns:
New GEOM_Object, containing the offset object.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeMultiTranslation1D (  self,
  theObject,
  theVector,
  theStep,
  theNbTimes 
)
-
-
- -

-

Parameters:
- - - - - -
theObject The object to be translated.
theVector Direction of the translation.
theStep Distance to translate on.
theNbTimes Quantity of translations to be done.
-
-
Returns:
New GEOM_Object, containing compound of all the shapes, obtained after each translation.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeMultiTranslation2D (  self,
  theObject,
  theVector1,
  theStep1,
  theNbTimes1,
  theVector2,
  theStep2,
  theNbTimes2 
)
-
-
- -

-

Parameters:
- - - - - - - - -
theObject The object to be translated.
theVector1 Direction of the first translation.
theStep1 Step of the first translation.
theNbTimes1 Quantity of translations to be done along theVector1.
theVector2 Direction of the second translation.
theStep2 Step of the second translation.
theNbTimes2 Quantity of translations to be done along theVector2.
-
-
Returns:
New GEOM_Object, containing compound of all the shapes, obtained after each translation.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MultiRotate1D (  self,
  theObject,
  theAxis,
  theNbTimes 
)
-
-
- -

-Rotation angle will be 2*PI/theNbTimes.

Parameters:
- - - - -
theObject The object to be rotated.
theAxis The rotation axis.
theNbTimes Quantity of rotations to be done.
-
-
Returns:
New GEOM_Object, containing compound of all the shapes, obtained after each rotation.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MultiRotate2D (  self,
  theObject,
  theAxis,
  theAngle,
  theNbTimes1,
  theStep,
  theNbTimes2 
)
-
-
- -

-Translation direction passes through center of gravity of rotated shape and its projection on the rotation axis.

Parameters:
- - - - - - - -
theObject The object to be rotated.
theAxis Rotation axis.
theAngle Rotation angle in graduces.
theNbTimes1 Quantity of rotations to be done.
theStep Translation distance.
theNbTimes2 Quantity of translations to be done.
-
-
Returns:
New GEOM_Object, containing compound of all the shapes, obtained after each transformation.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeMultiRotation1D (  self,
  aShape,
  aDir,
  aPoint,
  aNbTimes 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeMultiRotation2D (  self,
  aShape,
  aDir,
  aPoint,
  anAngle,
  nbtimes1,
  aStep,
  nbtimes2 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeFilletAll (  self,
  theShape,
  theR 
)
-
-
- -

-

Parameters:
- - - -
theShape Shape, to perform fillet on.
theR Fillet radius.
-
-
Returns:
New GEOM_Object, containing the result shape.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeFillet (  self,
  theShape,
  theR,
  theShapeType,
  theListShapes 
)
-
-
- -

-

Parameters:
- - - - - -
theShape Shape, to perform fillet on.
theR Fillet radius.
theShapeType Type of shapes in <theListShapes>.
theListShapes Global indices of edges/faces to perform fillet on.
-
-
Note:
Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
-
Returns:
New GEOM_Object, containing the result shape.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeChamferAll (  self,
  theShape,
  theD 
)
-
-
- -

-

Parameters:
- - - -
theShape Shape, to perform chamfer on.
theD Chamfer size along each face.
-
-
Returns:
New GEOM_Object, containing the result shape.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeChamferEdge (  self,
  theShape,
  theD1,
  theD2,
  theFace1,
  theFace2 
)
-
-
- -

-

Parameters:
- - - - - -
theShape Shape, to perform chamfer on.
theD1 Chamfer size along theFace1.
theD2 Chamfer size along theFace2.
theFace1,theFace2 Global indices of two faces of theShape.
-
-
Note:
Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
-
Returns:
New GEOM_Object, containing the result shape.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeChamferFaces (  self,
  theShape,
  theD1,
  theD2,
  theFaces 
)
-
-
- -

-

Parameters:
- - - - - -
theShape Shape, to perform chamfer on.
theD1 Chamfer size along face from theFaces. If both faces, connected to the edge, are in theFaces, theD1 will be get along face, which is nearer to theFaces beginning.
theD2 Chamfer size along another of two faces, connected to the edge.
theFaces Sequence of global indices of faces of theShape.
-
-
Note:
Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
-
Returns:
New GEOM_Object, containing the result shape.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeChamfer (  self,
  aShape,
  d1,
  d2,
  aShapeType,
  ListShape 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.Archimede (  self,
  theShape,
  theWeight,
  theWaterDensity,
  theMeshDeflection 
)
-
-
- -

-The object presenting the resulting face is returned.

Parameters:
- - - - - -
theShape Shape to be put in water.
theWeight Weight og the shape.
theWaterDensity Density of the water.
theMeshDeflection Deflection of the mesh, using to compute the section.
-
-
Returns:
New GEOM_Object, containing a section of theShape by a plane, corresponding to water level.
-Example: see GEOM_TestAll.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.PointCoordinates (  self,
  Point 
)
-
-
- -

-

Returns:
[x, y, z]
-Example: see GEOM_TestMeasures.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.BasicProperties (  self,
  theShape 
)
-
-
- -

-

Parameters:
- - -
theShape Shape to define properties of.
-
-
Returns:
[theLength, theSurfArea, theVolume] theLength: Summarized length of all wires of the given shape. theSurfArea: Area of surface of the given shape. theVolume: Volume of the given shape.
-Example: see GEOM_TestMeasures.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.BoundingBox (  self,
  theShape 
)
-
-
- -

-

Parameters:
- - -
theShape Shape to obtain bounding box of.
-
-
Returns:
[Xmin,Xmax, Ymin,Ymax, Zmin,Zmax] Xmin,Xmax: Limits of shape along OX axis. Ymin,Ymax: Limits of shape along OY axis. Zmin,Zmax: Limits of shape along OZ axis.
-Example: see GEOM_TestMeasures.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.Inertia (  self,
  theShape 
)
-
-
- -

-

Parameters:
- - -
theShape Shape to calculate inertia of.
-
-
Returns:
[I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz] I(1-3)(1-3): Components of the inertia matrix of the given shape. Ix,Iy,Iz: Moments of inertia of the given shape.
-Example: see GEOM_TestMeasures.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MinDistance (  self,
  theShape1,
  theShape2 
)
-
-
- -

-

Parameters:
- - -
theShape1,theShape2 Shapes to find minimal distance between.
-
-
Returns:
Value of the minimal distance between the given shapes.
-Example: see GEOM_TestMeasures.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.Tolerance (  self,
  theShape 
)
-
-
- -

-

Parameters:
- - -
theShape Shape, to get tolerances of.
-
-
Returns:
[FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax] FaceMin,FaceMax: Min and max tolerances of the faces. EdgeMin,EdgeMax: Min and max tolerances of the edges. VertMin,VertMax: Min and max tolerances of the vertices.
-Example: see GEOM_TestMeasures.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.WhatIs (  self,
  theShape 
)
-
-
- -

-

Parameters:
- - -
theShape Shape to be described.
-
-
Returns:
Description of the given shape.
-Example: see GEOM_TestMeasures.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeCDG (  self,
  theShape 
)
-
-
- -

-

Parameters:
- - -
theShape Shape to define centre of mass of.
-
-
Returns:
New GEOM_Object, containing the created point.
-Example: see GEOM_TestMeasures.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.CheckShape (  self,
  theShape,
  theIsCheckGeom = 0 
)
-
-
- -

-

Parameters:
- - - -
theShape Shape to check validity of.
theIsCheckGeom If FALSE, only the shape's topology will be checked, if TRUE, the shape's geometry will be checked also.
-
-
Returns:
TRUE, if the shape "seems to be valid". If theShape is invalid, prints a description of problem.
-Example: see GEOM_TestMeasures.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetPosition (  self,
  theShape 
)
-
-
- -

-Origin of the LCS is situated at the shape's center of mass. Axes of the LCS are obtained from shape's location or, if the shape is a planar face, from position of its plane.

-

Parameters:
- - -
theShape Shape to calculate position of.
-
-
Returns:
[Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz]. Ox,Oy,Oz: Coordinates of shape's LCS origin. Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction. Xx,Xy,Xz: Coordinates of shape's LCS X direction.
-Example: see GEOM_TestMeasures.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.KindOfShape (  self,
  theShape 
)
-
-
- -

-

Parameters:
- - -
theShape Shape to get a kind of.
-
-
Returns:
Returns a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration and a list of parameters, describing the shape.
-
Note:
Concrete meaning of each value, returned via theIntegers or theDoubles list depends on the kind of the shape. The full list of possible outputs is:
-geompy.kind.COMPOUND nb_solids nb_faces nb_edges nb_vertices geompy.kind.COMPSOLID nb_solids nb_faces nb_edges nb_vertices

-geompy.kind.SHELL geompy.info.CLOSED nb_faces nb_edges nb_vertices geompy.kind.SHELL geompy.info.UNCLOSED nb_faces nb_edges nb_vertices

-geompy.kind.WIRE geompy.info.CLOSED nb_edges nb_vertices geompy.kind.WIRE geompy.info.UNCLOSED nb_edges nb_vertices

-geompy.kind.SPHERE xc yc zc R geompy.kind.CYLINDER xb yb zb dx dy dz R H geompy.kind.BOX xc yc zc ax ay az geompy.kind.ROTATED_BOX xc yc zc zx zy zz xx xy xz ax ay az geompy.kind.TORUS xc yc zc dx dy dz R_1 R_2 geompy.kind.CONE xb yb zb dx dy dz R_1 R_2 H geompy.kind.POLYHEDRON nb_faces nb_edges nb_vertices geompy.kind.SOLID nb_faces nb_edges nb_vertices

-geompy.kind.SPHERE2D xc yc zc R geompy.kind.CYLINDER2D xb yb zb dx dy dz R H geompy.kind.TORUS2D xc yc zc dx dy dz R_1 R_2 geompy.kind.CONE2D xc yc zc dx dy dz R_1 R_2 H geompy.kind.DISK_CIRCLE xc yc zc dx dy dz R geompy.kind.DISK_ELLIPSE xc yc zc dx dy dz R_1 R_2 geompy.kind.POLYGON xo yo zo dx dy dz nb_edges nb_vertices geompy.kind.PLANE xo yo zo dx dy dz geompy.kind.PLANAR xo yo zo dx dy dz nb_edges nb_vertices geompy.kind.FACE nb_edges nb_vertices

-geompy.kind.CIRCLE xc yc zc dx dy dz R geompy.kind.ARC_CIRCLE xc yc zc dx dy dz R x1 y1 z1 x2 y2 z2 geompy.kind.ELLIPSE xc yc zc dx dy dz R_1 R_2 geompy.kind.ARC_ELLIPSE xc yc zc dx dy dz R_1 R_2 x1 y1 z1 x2 y2 z2 geompy.kind.LINE xo yo zo dx dy dz geompy.kind.SEGMENT x1 y1 z1 x2 y2 z2 geompy.kind.EDGE nb_vertices

-geompy.kind.VERTEX x y z

-Example: see GEOM_TestMeasures.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.Import (  self,
  theFileName,
  theFormatName 
)
-
-
- -

-

Parameters:
- - - -
theFileName The file, containing the shape.
theFormatName Specify format for the file reading. Available formats can be obtained with InsertOp.ImportTranslators() method.
-
-
Returns:
New GEOM_Object, containing the imported shape.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.ImportBREP (  self,
  theFileName 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.ImportIGES (  self,
  theFileName 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.ImportSTEP (  self,
  theFileName 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.Export (  self,
  theObject,
  theFileName,
  theFormatName 
)
-
-
- -

-

Parameters:
- - - - -
theObject Shape to be stored in the file.
theFileName Name of the file to store the given shape in.
theFormatName Specify format for the shape storage. Available formats can be obtained with InsertOp.ImportTranslators() method.
-
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.ExportBREP (  self,
  theObject,
  theFileName 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.ExportIGES (  self,
  theObject,
  theFileName 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.ExportSTEP (  self,
  theObject,
  theFileName 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeQuad (  self,
  E1,
  E2,
  E3,
  E4 
)
-
-
- -

-Order of Edges is not important. It is not necessary that edges share the same vertex.

Parameters:
- - -
E1,E2,E3,E4 Edges for the face bound.
-
-
Returns:
New GEOM_Object, containing the created face.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeQuad2Edges (  self,
  E1,
  E2 
)
-
-
- -

-The missing edges will be built by creating the shortest ones.

Parameters:
- - -
E1,E2 Two opposite edges for the face.
-
-
Returns:
New GEOM_Object, containing the created face.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeQuad4Vertices (  self,
  V1,
  V2,
  V3,
  V4 
)
-
-
- -

-The missing edges will be built by creating the shortest ones.

Parameters:
- - -
V1,V2,V3,V4 Corner vertices for the face.
-
-
Returns:
New GEOM_Object, containing the created face.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeHexa (  self,
  F1,
  F2,
  F3,
  F4,
  F5,
  F6 
)
-
-
- -

-Order of faces is not important. It is not necessary that Faces share the same edge.

Parameters:
- - -
F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
-
-
Returns:
New GEOM_Object, containing the created solid.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeHexa2Faces (  self,
  F1,
  F2 
)
-
-
- -

-The missing faces will be built by creating the smallest ones.

Parameters:
- - -
F1,F2 Two opposite faces for the hexahedral solid.
-
-
Returns:
New GEOM_Object, containing the created solid.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetPoint (  self,
  theShape,
  theX,
  theY,
  theZ,
  theEpsilon 
)
-
-
- -

-

Parameters:
- - - - -
theShape Block or a compound of blocks.
theX,theY,theZ Coordinates of the sought vertex.
theEpsilon Maximum allowed distance between the resulting vertex and point with the given coordinates.
-
-
Returns:
New GEOM_Object, containing the found vertex.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetEdge (  self,
  theShape,
  thePoint1,
  thePoint2 
)
-
-
- -

-

Parameters:
- - - -
theShape Block or a compound of blocks.
thePoint1,thePoint2 Points, close to the ends of the desired edge.
-
-
Returns:
New GEOM_Object, containing the found edge.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetEdgeNearPoint (  self,
  theShape,
  thePoint 
)
-
-
- -

-

Parameters:
- - - -
theShape Block or a compound of blocks.
thePoint Point, close to the desired edge.
-
-
Returns:
New GEOM_Object, containing the found edge.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetFaceByPoints (  self,
  theShape,
  thePoint1,
  thePoint2,
  thePoint3,
  thePoint4 
)
-
-
- -

-

Parameters:
- - - -
theShape Block or a compound of blocks.
thePoint1-thePoint4 Points, close to the corners of the desired face.
-
-
Returns:
New GEOM_Object, containing the found face.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetFaceByEdges (  self,
  theShape,
  theEdge1,
  theEdge2 
)
-
-
- -

-

Parameters:
- - - -
theShape Block or a compound of blocks.
theEdge1,theEdge2 Edges, close to the edges of the desired face.
-
-
Returns:
New GEOM_Object, containing the found face.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetOppositeFace (  self,
  theBlock,
  theFace 
)
-
-
- -

-

Parameters:
- - - -
theBlock Must be a hexahedral solid.
theFace Face of theBlock, opposite to the desired face.
-
-
Returns:
New GEOM_Object, containing the found face.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetFaceNearPoint (  self,
  theShape,
  thePoint 
)
-
-
- -

-

Parameters:
- - - -
theShape Block or a compound of blocks.
thePoint Point, close to the desired face.
-
-
Returns:
New GEOM_Object, containing the found face.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetFaceByNormale (  self,
  theBlock,
  theVector 
)
-
-
- -

-

Parameters:
- - - -
theShape Block or a compound of blocks.
theVector Vector, close to the normale of the desired face.
-
-
Returns:
New GEOM_Object, containing the found face.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.CheckCompoundOfBlocks (  self,
  theCompound 
)
-
-
- -

-To be considered as a compound of blocks, the given shape must satisfy the following conditions:

    -
  • Each element of the compound should be a Block (6 faces and 12 edges).
  • A connection between two Blocks should be an entire quadrangle face or an entire edge.
  • The compound should be connexe.
  • The glue between two quadrangle faces should be applied.
    Parameters:
    - - -
    theCompound The compound to check.
    -
    -
    Returns:
    TRUE, if the given shape is a compound of blocks. If theCompound is not valid, prints all discovered errors.
    -Example: see GEOM_Spanner.py
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.RemoveExtraEdges (  self,
  theShape 
)
-
-
- -

-Unite faces and edges, sharing one surface. It means that this faces must have references to one C++ surface object (handle).

Parameters:
- - -
theShape The compound or single solid to remove irregular edges from.
-
-
Returns:
Improved shape.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.CheckAndImprove (  self,
  theShape 
)
-
-
- -

-Fix all detected errors.

Note:
Single block can be also fixed by this method.
-
Parameters:
- - -
theCompound The compound to check and improve.
-
-
Returns:
Improved compound.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeBlockExplode (  self,
  theCompound,
  theMinNbFaces,
  theMaxNbFaces 
)
-
-
- -

-

Parameters:
- - - - -
theCompound The compound to explode.
theMinNbFaces If solid has lower number of faces, it is not a block.
theMaxNbFaces If solid has higher number of faces, it is not a block.
-
-
Note:
If theMaxNbFaces = 0, the maximum number of faces is not restricted.
-
Returns:
List of GEOM_Objects, containing the retrieved blocks.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetBlockNearPoint (  self,
  theCompound,
  thePoint 
)
-
-
- -

-

Parameters:
- - - -
theCompound Compound, to find block in.
thePoint Point, close to the desired block. If the point lays on boundary between some blocks, we return block with nearest center.
-
-
Returns:
New GEOM_Object, containing the found block.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetBlockByParts (  self,
  theCompound,
  theParts 
)
-
-
- -

-

Parameters:
- - - -
theCompound Compound, to find block in.
theParts List of faces and/or edges and/or vertices to be parts of the found block.
-
-
Returns:
New GEOM_Object, containing the found block.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetBlocksByParts (  self,
  theCompound,
  theParts 
)
-
-
- -

-

Parameters:
- - - -
theCompound Compound, to find blocks in.
theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
-
-
Returns:
List of GEOM_Objects, containing the found blocks.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeMultiTransformation1D (  self,
  Block,
  DirFace1,
  DirFace2,
  NbTimes 
)
-
-
- -

-Transformation is defined so, as to superpose direction faces.

Parameters:
- - - - - -
Block Hexahedral solid to be multi-transformed.
DirFace1 ID of First direction face.
DirFace2 ID of Second direction face.
NbTimes Quantity of transformations to be done.
-
-
Note:
Unique ID of sub-shape can be obtained, using method GetSubShapeID().
-
Returns:
New GEOM_Object, containing the result shape.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.MakeMultiTransformation2D (  self,
  Block,
  DirFace1U,
  DirFace2U,
  NbTimesU,
  DirFace1V,
  DirFace2V,
  NbTimesV 
)
-
-
- -

-

Parameters:
- - - - - -
Block Hexahedral solid to be multi-transformed.
DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
NbTimesU,NbTimesV Quantity of transformations to be done.
-
-
Returns:
New GEOM_Object, containing the result shape.
-Example: see GEOM_Spanner.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.Propagate (  self,
  theShape 
)
-
-
- -

-Propagation group is a set of all edges, opposite to one (main) edge of this group directly or through other opposite edges. Notion of Opposite Edge make sence only on quadrangle face.

Parameters:
- - -
theShape Shape to build propagation groups on.
-
-
Returns:
List of GEOM_Objects, each of them is a propagation group.
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.CreateGroup (  self,
  theMainShape,
  theShapeType 
)
-
-
- -

-

Parameters:
- - - -
theMainShape is a GEOM object on which the group is selected
theShapeType defines a shape type of the group
-
-
Returns:
a newly created GEOM group
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.AddObject (  self,
  theGroup,
  theSubShapeID 
)
-
-
- -

-

Parameters:
- - - -
theGroup is a GEOM group to which the new sub shape is added
theSubShapeID is a sub shape ID in the main object.
-
-
Note:
Use method GetSubShapeID() to get an unique ID of the sub shape
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.RemoveObject (  self,
  theGroup,
  theSubShapeID 
)
-
-
- -

-

Parameters:
- - - -
theGroup is a GEOM group from which the new sub shape is removed
theSubShapeID is a sub shape ID in the main object.
-
-
Note:
Use method GetSubShapeID() to get an unique ID of the sub shape
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.UnionList (  self,
  theGroup,
  theSubShapes 
)
-
-
- -

-No errors, if some shapes are alredy included.

Parameters:
- - - -
theGroup is a GEOM group to which the new sub shapes are added.
theSubShapes is a list of sub shapes to be added.
-
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.UnionIDs (  self,
  theGroup,
  theSubShapes 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.DifferenceList (  self,
  theGroup,
  theSubShapes 
)
-
-
- -

-No errors, if some shapes are not included.

Parameters:
- - - -
theGroup is a GEOM group from which the sub-shapes are removed.
theSubShapes is a list of sub-shapes to be removed.
-
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.DifferenceIDs (  self,
  theGroup,
  theSubShapes 
)
-
-
- -

-Example: see GEOM_TestOthers.py -

-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetObjectIDs (  self,
  theGroup 
)
-
-
- -

-

Parameters:
- - -
theGroup is a GEOM group for which a list of IDs is requested
-
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetType (  self,
  theGroup 
)
-
-
- -

-

Parameters:
- - -
theGroup is a GEOM group which type is returned.
-
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetMainShape (  self,
  theGroup 
)
-
-
- -

-

Parameters:
- - -
theGroup is a GEOM group for which a main shape object is requested
-
-
Returns:
a GEOM object which is a main shape for theGroup
-Example: see GEOM_TestOthers.py -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.GetEdgesByLength (  self,
  theShape,
  min_length,
  max_length,
  include_min = 1,
  include_max = 1 
)
-
-
- -

-If include_min/max == 0, edges with length == min/max_length will not be included in result. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.SelectEdges (  self,
  min_length,
  max_length,
  include_min = 1,
  include_max = 1 
)
-
-
- -

-If include_min/max == 0, edges with length == min/max_length will not be included in result. -

-

- -

-
- - - - - - - - - - - - - - - - - - -
def geompyDC.geompyDC.addPath (  self,
  Path 
)
-
-
- -

- -

-

-


Field Documentation

- -
- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- -
- -

- -

-

- -

- - diff --git a/doc/salome/gui/GEOM/geompy_doc/classgeompyDC_1_1geompyDC__inherit__graph.jpg b/doc/salome/gui/GEOM/geompy_doc/classgeompyDC_1_1geompyDC__inherit__graph.jpg deleted file mode 100644 index b635532c1..000000000 Binary files a/doc/salome/gui/GEOM/geompy_doc/classgeompyDC_1_1geompyDC__inherit__graph.jpg and /dev/null differ diff --git a/doc/salome/gui/GEOM/geompy_doc/classgeompyDC_1_1info.html b/doc/salome/gui/GEOM/geompy_doc/classgeompyDC_1_1info.html deleted file mode 100644 index dc220ec43..000000000 --- a/doc/salome/gui/GEOM/geompy_doc/classgeompyDC_1_1info.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - Main Page - - - - -  - - - - -

geompyDC.info Class Reference

- - - - - - - - -

Static Public Attributes

int UNKNOWN = 0
int CLOSED = 1
int UNCLOSED = 2
-

Field Documentation

- -
-
- - - - -
int geompyDC.info.UNKNOWN = 0 [static]
-
-
- -

- -

-

- -

-
- - - - -
int geompyDC.info.CLOSED = 1 [static]
-
-
- -

- -

-

- -

-
- - - - -
int geompyDC.info.UNCLOSED = 2 [static]
-
-
- -

- -

-

- -

- - diff --git a/doc/salome/gui/GEOM/geompy_doc/doxygen.css b/doc/salome/gui/GEOM/geompy_doc/doxygen.css deleted file mode 100644 index dc9da5220..000000000 --- a/doc/salome/gui/GEOM/geompy_doc/doxygen.css +++ /dev/null @@ -1,218 +0,0 @@ -H1 { - text-align: center; - font-family: Geneva, Arial, Helvetica, sans-serif; -} -H2 { - font-family: Geneva, Arial, Helvetica, sans-serif; -} -CAPTION { font-weight: bold } -DIV.qindex { - width: 100%; - background-color: #eeeeff; - border: 1px solid #B0B0B0; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 120%; -} -A.qindex { - text-decoration: none; - font-weight: bold; - color: #1A419D; - padding: 2px; -} -A.qindex:visited { - text-decoration: none; - font-weight: bold; - color: #1A419D - padding: 2px; -} -A.qindex:hover { - text-decoration: none; - background-color: #ddddff; - padding: 2px; -} -A.qindexHL { - text-decoration: none; - font-weight: bold; - background-color: #6666cc; - color: #ffffff; - padding: 2px 6px; - border: 1px double #9295C2; -} -A.qindexHL:hover { - text-decoration: none; - background-color: #6666cc; - color: #ffffff; - padding: 2px 6px; -} -A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } -A.el { text-decoration: none; font-weight: bold } -A.elRef { font-weight: bold } -A.code { text-decoration: none; font-weight: normal; color: #1A419D} -A.codeRef { font-weight: normal; color: #1A419D} -A:hover { text-decoration: none; background-color: #f2f2ff } -DL.el { margin-left: -1cm } -PRE.fragment { - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - margin-top: 4px; - margin-bottom: 4px; - margin-left: 2px; - margin-right: 8px; - padding-left: 6px; - padding-right: 6px; - padding-top: 4px; - padding-bottom: 4px; -} -DIV.fragment { - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - padding: 6px; -} -DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } -TD.md { background-color: #F4F4FB; font-weight: bold; } -TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; } -TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; } -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold; - font-family: Geneva, Arial, Helvetica, sans-serif; -} -DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller } -BODY { - background: white; - color: black; - margin-right: 20px; - margin-left: 20px; -} -TD.indexkey { - background-color: #eeeeff; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TD.indexvalue { - background-color: #eeeeff; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TR.memlist { - background-color: #f0f0f0; -} -P.formulaDsp { text-align: center; } -IMG.formulaDsp { } -IMG.formulaInl { vertical-align: middle; } -SPAN.keyword { color: #008000 } -SPAN.keywordtype { color: #604020 } -SPAN.keywordflow { color: #e08000 } -SPAN.comment { color: #800000 } -SPAN.preprocessor { color: #806020 } -SPAN.stringliteral { color: #002080 } -SPAN.charliteral { color: #008080 } -.mdTable { - border: 1px solid #868686; - background-color: #F4F4FB; -} -.mdRow { - padding: 8px 10px; -} -.mdescLeft { - font-size: smaller; - font-style: italic; - background-color: #FAFAFA; - padding-left: 8px; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.mdescRight { - font-size: smaller; - font-style: italic; - background-color: #FAFAFA; - padding-left: 4px; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; - padding-bottom: 0px; - padding-right: 8px; -} -.memItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-style: solid; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-family: Geneva, Arial, Helvetica, sans-serif; - font-size: 12px; -} -.memItemRight { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-style: solid; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-family: Geneva, Arial, Helvetica, sans-serif; - font-size: 13px; -} -.search { color: #003399; - font-weight: bold; -} -FORM.search { - margin-bottom: 0px; - margin-top: 0px; -} -INPUT.search { font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #eeeeff; -} -TD.tiny { font-size: 75%; -} -a { - color: #252E78; -} -a:visited { - color: #3D2185; -} diff --git a/doc/salome/gui/GEOM/geompy_doc/namespacegeompy.html b/doc/salome/gui/GEOM/geompy_doc/namespacegeompy.html deleted file mode 100644 index 5a7d6e1a2..000000000 --- a/doc/salome/gui/GEOM/geompy_doc/namespacegeompy.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - Main Page - - - - -  - - - -

Package geompy

-

-

-For available methods please see documentation of -geompyDC class, -implemented in geompyDC.py script. -All methods of geompyDC class are accessible via geompy namespace, for example "box = geompy.MakeBoxDXDYDZ(10.,20.,30.)". -

- - - - - -

Variables

tuple geom = lcc.FindOrLoadComponent("FactoryServer", "GEOM")
-


Variable Documentation

- -
-
- - - - -
tuple geompy.geom = lcc.FindOrLoadComponent("FactoryServer", "GEOM") [static]
-
-
- -

- -

-

- -

- - diff --git a/doc/salome/gui/GEOM/geompy_doc/namespacegeompyDC.html b/doc/salome/gui/GEOM/geompy_doc/namespacegeompyDC.html deleted file mode 100644 index 313f21f5c..000000000 --- a/doc/salome/gui/GEOM/geompy_doc/namespacegeompyDC.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - Main Page - - - - -  - - - -

Package geompyDC

-

- - - - - - - - - - - - -

Data Structures

class  info
class  geompyDC

Variables

dictionary ShapeType = {"COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
 kind = GEOM.GEOM_IKindOfShape
-


Variable Documentation

- -
-
- - - - -
dictionary geompyDC.ShapeType = {"COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8} [static]
-
-
- -

- -

-

- -

-
- - - - -
geompyDC.kind = GEOM.GEOM_IKindOfShape [static]
-
-
- -

- -

-

- -

- - diff --git a/doc/salome/gui/GEOM/images/arc.png b/doc/salome/gui/GEOM/images/arc.png index 260a5fb7d..02f1ffcb1 100755 Binary files a/doc/salome/gui/GEOM/images/arc.png and b/doc/salome/gui/GEOM/images/arc.png differ diff --git a/doc/salome/gui/GEOM/images/arc2.png b/doc/salome/gui/GEOM/images/arc2.png index 2bced2ae0..1d9c84fbe 100644 Binary files a/doc/salome/gui/GEOM/images/arc2.png and b/doc/salome/gui/GEOM/images/arc2.png differ diff --git a/doc/salome/gui/GEOM/images/archimede.png b/doc/salome/gui/GEOM/images/archimede.png index cd620020e..e5cba0196 100755 Binary files a/doc/salome/gui/GEOM/images/archimede.png and b/doc/salome/gui/GEOM/images/archimede.png differ diff --git a/doc/salome/gui/GEOM/images/block1.png b/doc/salome/gui/GEOM/images/block1.png index 71a93b0c9..a5b8499af 100755 Binary files a/doc/salome/gui/GEOM/images/block1.png and b/doc/salome/gui/GEOM/images/block1.png differ diff --git a/doc/salome/gui/GEOM/images/block2.png b/doc/salome/gui/GEOM/images/block2.png index c66dd7f02..14ddedb2b 100755 Binary files a/doc/salome/gui/GEOM/images/block2.png and b/doc/salome/gui/GEOM/images/block2.png differ diff --git a/doc/salome/gui/GEOM/images/block3.png b/doc/salome/gui/GEOM/images/block3.png index 61aad9b43..dd8f35677 100755 Binary files a/doc/salome/gui/GEOM/images/block3.png and b/doc/salome/gui/GEOM/images/block3.png differ diff --git a/doc/salome/gui/GEOM/images/block4.png b/doc/salome/gui/GEOM/images/block4.png index d0661b6e9..d1f6e3aef 100755 Binary files a/doc/salome/gui/GEOM/images/block4.png and b/doc/salome/gui/GEOM/images/block4.png differ diff --git a/doc/salome/gui/GEOM/images/block5.png b/doc/salome/gui/GEOM/images/block5.png index 9810f6f0d..3ee5b9cd9 100755 Binary files a/doc/salome/gui/GEOM/images/block5.png and b/doc/salome/gui/GEOM/images/block5.png differ diff --git a/doc/salome/gui/GEOM/images/bool1.png b/doc/salome/gui/GEOM/images/bool1.png index 3f997a772..5b05a8bab 100755 Binary files a/doc/salome/gui/GEOM/images/bool1.png and b/doc/salome/gui/GEOM/images/bool1.png differ diff --git a/doc/salome/gui/GEOM/images/bool2.png b/doc/salome/gui/GEOM/images/bool2.png index 4e9b96862..5f828f851 100755 Binary files a/doc/salome/gui/GEOM/images/bool2.png and b/doc/salome/gui/GEOM/images/bool2.png differ diff --git a/doc/salome/gui/GEOM/images/bool3.png b/doc/salome/gui/GEOM/images/bool3.png index af409a15e..298cb37ad 100755 Binary files a/doc/salome/gui/GEOM/images/bool3.png and b/doc/salome/gui/GEOM/images/bool3.png differ diff --git a/doc/salome/gui/GEOM/images/box1.png b/doc/salome/gui/GEOM/images/box1.png index 812027dcf..eced7ebdb 100755 Binary files a/doc/salome/gui/GEOM/images/box1.png and b/doc/salome/gui/GEOM/images/box1.png differ diff --git a/doc/salome/gui/GEOM/images/box2.png b/doc/salome/gui/GEOM/images/box2.png index 85a737afb..bdc9d3ba1 100755 Binary files a/doc/salome/gui/GEOM/images/box2.png and b/doc/salome/gui/GEOM/images/box2.png differ diff --git a/doc/salome/gui/GEOM/images/chamfer1.png b/doc/salome/gui/GEOM/images/chamfer1.png index fdbe02fbd..b8fb545a6 100755 Binary files a/doc/salome/gui/GEOM/images/chamfer1.png and b/doc/salome/gui/GEOM/images/chamfer1.png differ diff --git a/doc/salome/gui/GEOM/images/chamfer2.png b/doc/salome/gui/GEOM/images/chamfer2.png index 24d6e124e..8cbb2fe66 100755 Binary files a/doc/salome/gui/GEOM/images/chamfer2.png and b/doc/salome/gui/GEOM/images/chamfer2.png differ diff --git a/doc/salome/gui/GEOM/images/chamfer3.png b/doc/salome/gui/GEOM/images/chamfer3.png index 801f8db2f..ebad692cd 100755 Binary files a/doc/salome/gui/GEOM/images/chamfer3.png and b/doc/salome/gui/GEOM/images/chamfer3.png differ diff --git a/doc/salome/gui/GEOM/images/chamfer4.png b/doc/salome/gui/GEOM/images/chamfer4.png index 14476b447..4b777e25b 100755 Binary files a/doc/salome/gui/GEOM/images/chamfer4.png and b/doc/salome/gui/GEOM/images/chamfer4.png differ diff --git a/doc/salome/gui/GEOM/images/changeorientation.png b/doc/salome/gui/GEOM/images/changeorientation.png index 95322ed69..7fa95688a 100755 Binary files a/doc/salome/gui/GEOM/images/changeorientation.png and b/doc/salome/gui/GEOM/images/changeorientation.png differ diff --git a/doc/salome/gui/GEOM/images/circle1.png b/doc/salome/gui/GEOM/images/circle1.png index 21933a545..8eae9abbe 100755 Binary files a/doc/salome/gui/GEOM/images/circle1.png and b/doc/salome/gui/GEOM/images/circle1.png differ diff --git a/doc/salome/gui/GEOM/images/circle2.png b/doc/salome/gui/GEOM/images/circle2.png index 77299521c..b850069b7 100755 Binary files a/doc/salome/gui/GEOM/images/circle2.png and b/doc/salome/gui/GEOM/images/circle2.png differ diff --git a/doc/salome/gui/GEOM/images/circle3.png b/doc/salome/gui/GEOM/images/circle3.png index 39aa5b1ba..5b3101cf7 100755 Binary files a/doc/salome/gui/GEOM/images/circle3.png and b/doc/salome/gui/GEOM/images/circle3.png differ diff --git a/doc/salome/gui/GEOM/images/cone1.png b/doc/salome/gui/GEOM/images/cone1.png index f5a95922a..d74bf2689 100755 Binary files a/doc/salome/gui/GEOM/images/cone1.png and b/doc/salome/gui/GEOM/images/cone1.png differ diff --git a/doc/salome/gui/GEOM/images/cone2.png b/doc/salome/gui/GEOM/images/cone2.png index 1b0582140..52e2c2f33 100755 Binary files a/doc/salome/gui/GEOM/images/cone2.png and b/doc/salome/gui/GEOM/images/cone2.png differ diff --git a/doc/salome/gui/GEOM/images/curve.png b/doc/salome/gui/GEOM/images/curve.png index a9541de0a..41c7c5d6e 100755 Binary files a/doc/salome/gui/GEOM/images/curve.png and b/doc/salome/gui/GEOM/images/curve.png differ diff --git a/doc/salome/gui/GEOM/images/cylinder1.png b/doc/salome/gui/GEOM/images/cylinder1.png index 71b619df8..82f1190d8 100755 Binary files a/doc/salome/gui/GEOM/images/cylinder1.png and b/doc/salome/gui/GEOM/images/cylinder1.png differ diff --git a/doc/salome/gui/GEOM/images/cylinder2.png b/doc/salome/gui/GEOM/images/cylinder2.png index ee6ed12e6..a4eafbbd8 100755 Binary files a/doc/salome/gui/GEOM/images/cylinder2.png and b/doc/salome/gui/GEOM/images/cylinder2.png differ diff --git a/doc/salome/gui/GEOM/images/dialog.png b/doc/salome/gui/GEOM/images/dialog.png index 63f984b75..eb01ee118 100755 Binary files a/doc/salome/gui/GEOM/images/dialog.png and b/doc/salome/gui/GEOM/images/dialog.png differ diff --git a/doc/salome/gui/GEOM/images/editgroup.png b/doc/salome/gui/GEOM/images/editgroup.png index db3e23575..2286fd98a 100755 Binary files a/doc/salome/gui/GEOM/images/editgroup.png and b/doc/salome/gui/GEOM/images/editgroup.png differ diff --git a/doc/salome/gui/GEOM/images/ellipse.png b/doc/salome/gui/GEOM/images/ellipse.png index 0888b5021..6bce2c247 100755 Binary files a/doc/salome/gui/GEOM/images/ellipse.png and b/doc/salome/gui/GEOM/images/ellipse.png differ diff --git a/doc/salome/gui/GEOM/images/extrusion1.png b/doc/salome/gui/GEOM/images/extrusion1.png index 44a182225..c278fdf9e 100755 Binary files a/doc/salome/gui/GEOM/images/extrusion1.png and b/doc/salome/gui/GEOM/images/extrusion1.png differ diff --git a/doc/salome/gui/GEOM/images/extrusion2.png b/doc/salome/gui/GEOM/images/extrusion2.png index 53dbe7d72..f2037ffcd 100755 Binary files a/doc/salome/gui/GEOM/images/extrusion2.png and b/doc/salome/gui/GEOM/images/extrusion2.png differ diff --git a/doc/salome/gui/GEOM/images/fillet1.png b/doc/salome/gui/GEOM/images/fillet1.png index 7fd3db53f..19bed231e 100755 Binary files a/doc/salome/gui/GEOM/images/fillet1.png and b/doc/salome/gui/GEOM/images/fillet1.png differ diff --git a/doc/salome/gui/GEOM/images/fillet2.png b/doc/salome/gui/GEOM/images/fillet2.png index 2eab8754b..860060552 100755 Binary files a/doc/salome/gui/GEOM/images/fillet2.png and b/doc/salome/gui/GEOM/images/fillet2.png differ diff --git a/doc/salome/gui/GEOM/images/fillet3.png b/doc/salome/gui/GEOM/images/fillet3.png index 6e46e05dd..f24a41a68 100755 Binary files a/doc/salome/gui/GEOM/images/fillet3.png and b/doc/salome/gui/GEOM/images/fillet3.png differ diff --git a/doc/salome/gui/GEOM/images/filling.png b/doc/salome/gui/GEOM/images/filling.png index 1fb29455c..ec5e68658 100755 Binary files a/doc/salome/gui/GEOM/images/filling.png and b/doc/salome/gui/GEOM/images/filling.png differ diff --git a/doc/salome/gui/GEOM/images/geomcreategroup.png b/doc/salome/gui/GEOM/images/geomcreategroup.png index f51ab22fd..ea1e533ee 100755 Binary files a/doc/salome/gui/GEOM/images/geomcreategroup.png and b/doc/salome/gui/GEOM/images/geomcreategroup.png differ diff --git a/doc/salome/gui/GEOM/images/glue1.png b/doc/salome/gui/GEOM/images/glue1.png index 54fa5bf6e..11f81e2a8 100644 Binary files a/doc/salome/gui/GEOM/images/glue1.png and b/doc/salome/gui/GEOM/images/glue1.png differ diff --git a/doc/salome/gui/GEOM/images/glue2.png b/doc/salome/gui/GEOM/images/glue2.png index 475e54f65..b0b2072f0 100644 Binary files a/doc/salome/gui/GEOM/images/glue2.png and b/doc/salome/gui/GEOM/images/glue2.png differ diff --git a/doc/salome/gui/GEOM/images/image2.jpg b/doc/salome/gui/GEOM/images/image2.jpg index ddfeaa1fb..a449b15ca 100755 Binary files a/doc/salome/gui/GEOM/images/image2.jpg and b/doc/salome/gui/GEOM/images/image2.jpg differ diff --git a/doc/salome/gui/GEOM/images/line1.png b/doc/salome/gui/GEOM/images/line1.png index 139809a00..2e7f300b4 100755 Binary files a/doc/salome/gui/GEOM/images/line1.png and b/doc/salome/gui/GEOM/images/line1.png differ diff --git a/doc/salome/gui/GEOM/images/line2.png b/doc/salome/gui/GEOM/images/line2.png index f5d68da42..f7773729e 100755 Binary files a/doc/salome/gui/GEOM/images/line2.png and b/doc/salome/gui/GEOM/images/line2.png differ diff --git a/doc/salome/gui/GEOM/images/measures3.png b/doc/salome/gui/GEOM/images/measures3.png index 9a55aad4a..8dfa07ab7 100755 Binary files a/doc/salome/gui/GEOM/images/measures3.png and b/doc/salome/gui/GEOM/images/measures3.png differ diff --git a/doc/salome/gui/GEOM/images/measures8.png b/doc/salome/gui/GEOM/images/measures8.png index 94bed3271..bddf1a2d7 100755 Binary files a/doc/salome/gui/GEOM/images/measures8.png and b/doc/salome/gui/GEOM/images/measures8.png differ diff --git a/doc/salome/gui/GEOM/images/measures8a.png b/doc/salome/gui/GEOM/images/measures8a.png new file mode 100644 index 000000000..8f27b1148 Binary files /dev/null and b/doc/salome/gui/GEOM/images/measures8a.png differ diff --git a/doc/salome/gui/GEOM/images/mtrans1.png b/doc/salome/gui/GEOM/images/mtrans1.png index 7dfe730c3..e2219b4c6 100755 Binary files a/doc/salome/gui/GEOM/images/mtrans1.png and b/doc/salome/gui/GEOM/images/mtrans1.png differ diff --git a/doc/salome/gui/GEOM/images/mtrans2.png b/doc/salome/gui/GEOM/images/mtrans2.png index 62b35bb0c..433fb8ea7 100755 Binary files a/doc/salome/gui/GEOM/images/mtrans2.png and b/doc/salome/gui/GEOM/images/mtrans2.png differ diff --git a/doc/salome/gui/GEOM/images/mtransf1.png b/doc/salome/gui/GEOM/images/mtransf1.png index 207e920f9..696bcb371 100755 Binary files a/doc/salome/gui/GEOM/images/mtransf1.png and b/doc/salome/gui/GEOM/images/mtransf1.png differ diff --git a/doc/salome/gui/GEOM/images/mtransf2.png b/doc/salome/gui/GEOM/images/mtransf2.png index 3435f0f8c..4f1330e92 100755 Binary files a/doc/salome/gui/GEOM/images/mtransf2.png and b/doc/salome/gui/GEOM/images/mtransf2.png differ diff --git a/doc/salome/gui/GEOM/images/mtransf3.png b/doc/salome/gui/GEOM/images/mtransf3.png index 628d8b0a6..9c55f2abd 100755 Binary files a/doc/salome/gui/GEOM/images/mtransf3.png and b/doc/salome/gui/GEOM/images/mtransf3.png differ diff --git a/doc/salome/gui/GEOM/images/mtransf4.png b/doc/salome/gui/GEOM/images/mtransf4.png index cbe904444..fe29c2fe8 100755 Binary files a/doc/salome/gui/GEOM/images/mtransf4.png and b/doc/salome/gui/GEOM/images/mtransf4.png differ diff --git a/doc/salome/gui/GEOM/images/neo-isos.png b/doc/salome/gui/GEOM/images/neo-isos.png index dbbcf8ef5..907d3f679 100755 Binary files a/doc/salome/gui/GEOM/images/neo-isos.png and b/doc/salome/gui/GEOM/images/neo-isos.png differ diff --git a/doc/salome/gui/GEOM/images/neo-localcs1.png b/doc/salome/gui/GEOM/images/neo-localcs1.png index 9bdacafa2..5e8924e18 100755 Binary files a/doc/salome/gui/GEOM/images/neo-localcs1.png and b/doc/salome/gui/GEOM/images/neo-localcs1.png differ diff --git a/doc/salome/gui/GEOM/images/neo-localcs2.png b/doc/salome/gui/GEOM/images/neo-localcs2.png index 3fc54a67c..8333ead31 100755 Binary files a/doc/salome/gui/GEOM/images/neo-localcs2.png and b/doc/salome/gui/GEOM/images/neo-localcs2.png differ diff --git a/doc/salome/gui/GEOM/images/neo-localcs3.png b/doc/salome/gui/GEOM/images/neo-localcs3.png index 01c8e24fa..9ff809f47 100755 Binary files a/doc/salome/gui/GEOM/images/neo-localcs3.png and b/doc/salome/gui/GEOM/images/neo-localcs3.png differ diff --git a/doc/salome/gui/GEOM/images/neo-mrot1.png b/doc/salome/gui/GEOM/images/neo-mrot1.png index 6cf2ab91b..c7d32b73a 100755 Binary files a/doc/salome/gui/GEOM/images/neo-mrot1.png and b/doc/salome/gui/GEOM/images/neo-mrot1.png differ diff --git a/doc/salome/gui/GEOM/images/neo-mrot2.png b/doc/salome/gui/GEOM/images/neo-mrot2.png index e2f37e052..fae72a160 100755 Binary files a/doc/salome/gui/GEOM/images/neo-mrot2.png and b/doc/salome/gui/GEOM/images/neo-mrot2.png differ diff --git a/doc/salome/gui/GEOM/images/neo-obj1.png b/doc/salome/gui/GEOM/images/neo-obj1.png index 88a7a8b8a..1bb1b357b 100755 Binary files a/doc/salome/gui/GEOM/images/neo-obj1.png and b/doc/salome/gui/GEOM/images/neo-obj1.png differ diff --git a/doc/salome/gui/GEOM/images/neo-obj2.png b/doc/salome/gui/GEOM/images/neo-obj2.png index c940eaa38..6891c32ef 100755 Binary files a/doc/salome/gui/GEOM/images/neo-obj2.png and b/doc/salome/gui/GEOM/images/neo-obj2.png differ diff --git a/doc/salome/gui/GEOM/images/neo-obj3.png b/doc/salome/gui/GEOM/images/neo-obj3.png index d773938e2..9a63967da 100755 Binary files a/doc/salome/gui/GEOM/images/neo-obj3.png and b/doc/salome/gui/GEOM/images/neo-obj3.png differ diff --git a/doc/salome/gui/GEOM/images/neo-obj4.png b/doc/salome/gui/GEOM/images/neo-obj4.png index 5ac05dc6c..710ba1114 100755 Binary files a/doc/salome/gui/GEOM/images/neo-obj4.png and b/doc/salome/gui/GEOM/images/neo-obj4.png differ diff --git a/doc/salome/gui/GEOM/images/neo-obj5.png b/doc/salome/gui/GEOM/images/neo-obj5.png index e1579f082..28b0b5680 100755 Binary files a/doc/salome/gui/GEOM/images/neo-obj5.png and b/doc/salome/gui/GEOM/images/neo-obj5.png differ diff --git a/doc/salome/gui/GEOM/images/neo-obj6.png b/doc/salome/gui/GEOM/images/neo-obj6.png index b6b3be440..4d5afa1d2 100755 Binary files a/doc/salome/gui/GEOM/images/neo-obj6.png and b/doc/salome/gui/GEOM/images/neo-obj6.png differ diff --git a/doc/salome/gui/GEOM/images/neo-obj7.png b/doc/salome/gui/GEOM/images/neo-obj7.png index 15dfa2376..6d5058f38 100755 Binary files a/doc/salome/gui/GEOM/images/neo-obj7.png and b/doc/salome/gui/GEOM/images/neo-obj7.png differ diff --git a/doc/salome/gui/GEOM/images/neo-scetcher1.png b/doc/salome/gui/GEOM/images/neo-scetcher1.png index 7130e8b08..6f4e73363 100755 Binary files a/doc/salome/gui/GEOM/images/neo-scetcher1.png and b/doc/salome/gui/GEOM/images/neo-scetcher1.png differ diff --git a/doc/salome/gui/GEOM/images/neo-scetcher2.png b/doc/salome/gui/GEOM/images/neo-scetcher2.png index 330e1e3a3..4164d40f2 100755 Binary files a/doc/salome/gui/GEOM/images/neo-scetcher2.png and b/doc/salome/gui/GEOM/images/neo-scetcher2.png differ diff --git a/doc/salome/gui/GEOM/images/neo-section.png b/doc/salome/gui/GEOM/images/neo-section.png index 0d58ad244..e6aa9d99a 100755 Binary files a/doc/salome/gui/GEOM/images/neo-section.png and b/doc/salome/gui/GEOM/images/neo-section.png differ diff --git a/doc/salome/gui/GEOM/images/neo-transparency.png b/doc/salome/gui/GEOM/images/neo-transparency.png index ec1fb7f70..ed9f54952 100755 Binary files a/doc/salome/gui/GEOM/images/neo-transparency.png and b/doc/salome/gui/GEOM/images/neo-transparency.png differ diff --git a/doc/salome/gui/GEOM/images/normaletoface.png b/doc/salome/gui/GEOM/images/normaletoface.png index 5f8a34399..cb48bc19e 100755 Binary files a/doc/salome/gui/GEOM/images/normaletoface.png and b/doc/salome/gui/GEOM/images/normaletoface.png differ diff --git a/doc/salome/gui/GEOM/images/partition1.png b/doc/salome/gui/GEOM/images/partition1.png index 440dc3c55..17d176372 100755 Binary files a/doc/salome/gui/GEOM/images/partition1.png and b/doc/salome/gui/GEOM/images/partition1.png differ diff --git a/doc/salome/gui/GEOM/images/partition2.png b/doc/salome/gui/GEOM/images/partition2.png index a67ec9d8b..8cdc108eb 100755 Binary files a/doc/salome/gui/GEOM/images/partition2.png and b/doc/salome/gui/GEOM/images/partition2.png differ diff --git a/doc/salome/gui/GEOM/images/pipe.png b/doc/salome/gui/GEOM/images/pipe.png index e773731d2..32185beed 100755 Binary files a/doc/salome/gui/GEOM/images/pipe.png and b/doc/salome/gui/GEOM/images/pipe.png differ diff --git a/doc/salome/gui/GEOM/images/plane1.png b/doc/salome/gui/GEOM/images/plane1.png index 47a9b8bcd..10b420283 100755 Binary files a/doc/salome/gui/GEOM/images/plane1.png and b/doc/salome/gui/GEOM/images/plane1.png differ diff --git a/doc/salome/gui/GEOM/images/plane2.png b/doc/salome/gui/GEOM/images/plane2.png index f4b880b44..f6c50d7d9 100755 Binary files a/doc/salome/gui/GEOM/images/plane2.png and b/doc/salome/gui/GEOM/images/plane2.png differ diff --git a/doc/salome/gui/GEOM/images/plane3.png b/doc/salome/gui/GEOM/images/plane3.png index 1727e3bb0..e48916cc8 100755 Binary files a/doc/salome/gui/GEOM/images/plane3.png and b/doc/salome/gui/GEOM/images/plane3.png differ diff --git a/doc/salome/gui/GEOM/images/point1.png b/doc/salome/gui/GEOM/images/point1.png index e359819c5..b519719f9 100755 Binary files a/doc/salome/gui/GEOM/images/point1.png and b/doc/salome/gui/GEOM/images/point1.png differ diff --git a/doc/salome/gui/GEOM/images/point2.png b/doc/salome/gui/GEOM/images/point2.png index df151abfa..6dfa2ec3e 100755 Binary files a/doc/salome/gui/GEOM/images/point2.png and b/doc/salome/gui/GEOM/images/point2.png differ diff --git a/doc/salome/gui/GEOM/images/point3.png b/doc/salome/gui/GEOM/images/point3.png index 14e9827c7..a96107496 100755 Binary files a/doc/salome/gui/GEOM/images/point3.png and b/doc/salome/gui/GEOM/images/point3.png differ diff --git a/doc/salome/gui/GEOM/images/point4.png b/doc/salome/gui/GEOM/images/point4.png index b29de102c..fe6eb8a6a 100755 Binary files a/doc/salome/gui/GEOM/images/point4.png and b/doc/salome/gui/GEOM/images/point4.png differ diff --git a/doc/salome/gui/GEOM/images/point5.png b/doc/salome/gui/GEOM/images/point5.png new file mode 100755 index 000000000..1ad2ed7d8 Binary files /dev/null and b/doc/salome/gui/GEOM/images/point5.png differ diff --git a/doc/salome/gui/GEOM/images/remove_extra_edges.png b/doc/salome/gui/GEOM/images/remove_extra_edges.png index 50538dd4b..bbf6904f6 100644 Binary files a/doc/salome/gui/GEOM/images/remove_extra_edges.png and b/doc/salome/gui/GEOM/images/remove_extra_edges.png differ diff --git a/doc/salome/gui/GEOM/images/repair1.png b/doc/salome/gui/GEOM/images/repair1.png index 2b47fa5a4..597f374b4 100755 Binary files a/doc/salome/gui/GEOM/images/repair1.png and b/doc/salome/gui/GEOM/images/repair1.png differ diff --git a/doc/salome/gui/GEOM/images/repair2.png b/doc/salome/gui/GEOM/images/repair2.png index 488a6a4c9..4b4772224 100755 Binary files a/doc/salome/gui/GEOM/images/repair2.png and b/doc/salome/gui/GEOM/images/repair2.png differ diff --git a/doc/salome/gui/GEOM/images/repair3.png b/doc/salome/gui/GEOM/images/repair3.png index 4c2a41f90..02123804c 100755 Binary files a/doc/salome/gui/GEOM/images/repair3.png and b/doc/salome/gui/GEOM/images/repair3.png differ diff --git a/doc/salome/gui/GEOM/images/repair4.png b/doc/salome/gui/GEOM/images/repair4.png index 2af7cbabb..9eeea7561 100755 Binary files a/doc/salome/gui/GEOM/images/repair4.png and b/doc/salome/gui/GEOM/images/repair4.png differ diff --git a/doc/salome/gui/GEOM/images/repair5.png b/doc/salome/gui/GEOM/images/repair5.png index b99fbcbaf..9eeea7561 100755 Binary files a/doc/salome/gui/GEOM/images/repair5.png and b/doc/salome/gui/GEOM/images/repair5.png differ diff --git a/doc/salome/gui/GEOM/images/repair6.png b/doc/salome/gui/GEOM/images/repair6.png index 5123d1f84..7b3d71338 100755 Binary files a/doc/salome/gui/GEOM/images/repair6.png and b/doc/salome/gui/GEOM/images/repair6.png differ diff --git a/doc/salome/gui/GEOM/images/repair8.png b/doc/salome/gui/GEOM/images/repair8.png index f0016836e..bc7d75149 100755 Binary files a/doc/salome/gui/GEOM/images/repair8.png and b/doc/salome/gui/GEOM/images/repair8.png differ diff --git a/doc/salome/gui/GEOM/images/restore-ss-OB-cut.png b/doc/salome/gui/GEOM/images/restore-ss-OB-cut.png new file mode 100644 index 000000000..51b5a4fb4 Binary files /dev/null and b/doc/salome/gui/GEOM/images/restore-ss-OB-cut.png differ diff --git a/doc/salome/gui/GEOM/images/restore-ss-OB.png b/doc/salome/gui/GEOM/images/restore-ss-OB.png new file mode 100644 index 000000000..4db07ebfa Binary files /dev/null and b/doc/salome/gui/GEOM/images/restore-ss-OB.png differ diff --git a/doc/salome/gui/GEOM/images/restore-ss-cut.png b/doc/salome/gui/GEOM/images/restore-ss-cut.png new file mode 100644 index 000000000..971ea9038 Binary files /dev/null and b/doc/salome/gui/GEOM/images/restore-ss-cut.png differ diff --git a/doc/salome/gui/GEOM/images/restore-ss-dialog.png b/doc/salome/gui/GEOM/images/restore-ss-dialog.png new file mode 100644 index 000000000..a1f39feb6 Binary files /dev/null and b/doc/salome/gui/GEOM/images/restore-ss-dialog.png differ diff --git a/doc/salome/gui/GEOM/images/restore-ss-viewer-after.png b/doc/salome/gui/GEOM/images/restore-ss-viewer-after.png new file mode 100644 index 000000000..d25b113d1 Binary files /dev/null and b/doc/salome/gui/GEOM/images/restore-ss-viewer-after.png differ diff --git a/doc/salome/gui/GEOM/images/restore-ss-viewer-before.png b/doc/salome/gui/GEOM/images/restore-ss-viewer-before.png new file mode 100644 index 000000000..4fa5b1319 Binary files /dev/null and b/doc/salome/gui/GEOM/images/restore-ss-viewer-before.png differ diff --git a/doc/salome/gui/GEOM/images/restore-ss-viewer-cut.png b/doc/salome/gui/GEOM/images/restore-ss-viewer-cut.png new file mode 100644 index 000000000..d745bce1f Binary files /dev/null and b/doc/salome/gui/GEOM/images/restore-ss-viewer-cut.png differ diff --git a/doc/salome/gui/GEOM/images/revolution.png b/doc/salome/gui/GEOM/images/revolution.png index 68761025a..113c34b3d 100755 Binary files a/doc/salome/gui/GEOM/images/revolution.png and b/doc/salome/gui/GEOM/images/revolution.png differ diff --git a/doc/salome/gui/GEOM/images/scale_transformsn3.png b/doc/salome/gui/GEOM/images/scale_transformsn3.png new file mode 100644 index 000000000..c7f8adbd6 Binary files /dev/null and b/doc/salome/gui/GEOM/images/scale_transformsn3.png differ diff --git a/doc/salome/gui/GEOM/images/scale_transformsn4.png b/doc/salome/gui/GEOM/images/scale_transformsn4.png new file mode 100644 index 000000000..fafa6f084 Binary files /dev/null and b/doc/salome/gui/GEOM/images/scale_transformsn4.png differ diff --git a/doc/salome/gui/GEOM/images/shapesonshape.png b/doc/salome/gui/GEOM/images/shapesonshape.png new file mode 100755 index 000000000..d79fcab66 Binary files /dev/null and b/doc/salome/gui/GEOM/images/shapesonshape.png differ diff --git a/doc/salome/gui/GEOM/images/shonshex1.png b/doc/salome/gui/GEOM/images/shonshex1.png new file mode 100755 index 000000000..7a1c97ea1 Binary files /dev/null and b/doc/salome/gui/GEOM/images/shonshex1.png differ diff --git a/doc/salome/gui/GEOM/images/shonshex2.png b/doc/salome/gui/GEOM/images/shonshex2.png new file mode 100755 index 000000000..7d16db9b5 Binary files /dev/null and b/doc/salome/gui/GEOM/images/shonshex2.png differ diff --git a/doc/salome/gui/GEOM/images/sphere1.png b/doc/salome/gui/GEOM/images/sphere1.png index 377f1c9ce..ba8bbc011 100755 Binary files a/doc/salome/gui/GEOM/images/sphere1.png and b/doc/salome/gui/GEOM/images/sphere1.png differ diff --git a/doc/salome/gui/GEOM/images/sphere2.png b/doc/salome/gui/GEOM/images/sphere2.png index dd2cadb1f..f01e3921f 100755 Binary files a/doc/salome/gui/GEOM/images/sphere2.png and b/doc/salome/gui/GEOM/images/sphere2.png differ diff --git a/doc/salome/gui/GEOM/images/torus1.png b/doc/salome/gui/GEOM/images/torus1.png index 28e18afa0..0be160866 100755 Binary files a/doc/salome/gui/GEOM/images/torus1.png and b/doc/salome/gui/GEOM/images/torus1.png differ diff --git a/doc/salome/gui/GEOM/images/torus2.png b/doc/salome/gui/GEOM/images/torus2.png index 8877f1c37..bbbf5c076 100755 Binary files a/doc/salome/gui/GEOM/images/torus2.png and b/doc/salome/gui/GEOM/images/torus2.png differ diff --git a/doc/salome/gui/GEOM/images/transformation1.png b/doc/salome/gui/GEOM/images/transformation1.png index 8dbf8fe11..714d44cf5 100755 Binary files a/doc/salome/gui/GEOM/images/transformation1.png and b/doc/salome/gui/GEOM/images/transformation1.png differ diff --git a/doc/salome/gui/GEOM/images/transformation10.png b/doc/salome/gui/GEOM/images/transformation10.png index 0847a5e03..e2645d483 100755 Binary files a/doc/salome/gui/GEOM/images/transformation10.png and b/doc/salome/gui/GEOM/images/transformation10.png differ diff --git a/doc/salome/gui/GEOM/images/transformation10a.png b/doc/salome/gui/GEOM/images/transformation10a.png new file mode 100644 index 000000000..80ca6239b Binary files /dev/null and b/doc/salome/gui/GEOM/images/transformation10a.png differ diff --git a/doc/salome/gui/GEOM/images/transformation11.png b/doc/salome/gui/GEOM/images/transformation11.png index b78acec2e..b7e9d19db 100755 Binary files a/doc/salome/gui/GEOM/images/transformation11.png and b/doc/salome/gui/GEOM/images/transformation11.png differ diff --git a/doc/salome/gui/GEOM/images/transformation2.png b/doc/salome/gui/GEOM/images/transformation2.png index 569752740..3bfd31927 100755 Binary files a/doc/salome/gui/GEOM/images/transformation2.png and b/doc/salome/gui/GEOM/images/transformation2.png differ diff --git a/doc/salome/gui/GEOM/images/transformation3.png b/doc/salome/gui/GEOM/images/transformation3.png index 96a1f1e36..c12389d88 100755 Binary files a/doc/salome/gui/GEOM/images/transformation3.png and b/doc/salome/gui/GEOM/images/transformation3.png differ diff --git a/doc/salome/gui/GEOM/images/transformation4.png b/doc/salome/gui/GEOM/images/transformation4.png index 323c3d0ae..de013f80c 100755 Binary files a/doc/salome/gui/GEOM/images/transformation4.png and b/doc/salome/gui/GEOM/images/transformation4.png differ diff --git a/doc/salome/gui/GEOM/images/transformation4a.png b/doc/salome/gui/GEOM/images/transformation4a.png index 64d2d4149..746bcbcea 100644 Binary files a/doc/salome/gui/GEOM/images/transformation4a.png and b/doc/salome/gui/GEOM/images/transformation4a.png differ diff --git a/doc/salome/gui/GEOM/images/transformation5.png b/doc/salome/gui/GEOM/images/transformation5.png index 8d1cf9254..9b405c811 100755 Binary files a/doc/salome/gui/GEOM/images/transformation5.png and b/doc/salome/gui/GEOM/images/transformation5.png differ diff --git a/doc/salome/gui/GEOM/images/transformation6.png b/doc/salome/gui/GEOM/images/transformation6.png index 3e3828bd8..356c8e632 100755 Binary files a/doc/salome/gui/GEOM/images/transformation6.png and b/doc/salome/gui/GEOM/images/transformation6.png differ diff --git a/doc/salome/gui/GEOM/images/transformation7.png b/doc/salome/gui/GEOM/images/transformation7.png index 03a16fe01..d6a38de33 100755 Binary files a/doc/salome/gui/GEOM/images/transformation7.png and b/doc/salome/gui/GEOM/images/transformation7.png differ diff --git a/doc/salome/gui/GEOM/images/transformation8.png b/doc/salome/gui/GEOM/images/transformation8.png index 77d030385..35f3a92ff 100755 Binary files a/doc/salome/gui/GEOM/images/transformation8.png and b/doc/salome/gui/GEOM/images/transformation8.png differ diff --git a/doc/salome/gui/GEOM/images/transformation9.png b/doc/salome/gui/GEOM/images/transformation9.png index c7f6194d3..9901b6cfb 100755 Binary files a/doc/salome/gui/GEOM/images/transformation9.png and b/doc/salome/gui/GEOM/images/transformation9.png differ diff --git a/doc/salome/gui/GEOM/images/translation3.png b/doc/salome/gui/GEOM/images/translation3.png new file mode 100644 index 000000000..ea45b8214 Binary files /dev/null and b/doc/salome/gui/GEOM/images/translation3.png differ diff --git a/doc/salome/gui/GEOM/images/vector1.png b/doc/salome/gui/GEOM/images/vector1.png index 46e3b20f3..608ec73ad 100755 Binary files a/doc/salome/gui/GEOM/images/vector1.png and b/doc/salome/gui/GEOM/images/vector1.png differ diff --git a/doc/salome/gui/GEOM/images/vector2.png b/doc/salome/gui/GEOM/images/vector2.png index bb5c64c56..2e4316a57 100755 Binary files a/doc/salome/gui/GEOM/images/vector2.png and b/doc/salome/gui/GEOM/images/vector2.png differ diff --git a/doc/salome/gui/GEOM/images/workplane4.png b/doc/salome/gui/GEOM/images/workplane4.png index 00835eb54..38e6be82c 100755 Binary files a/doc/salome/gui/GEOM/images/workplane4.png and b/doc/salome/gui/GEOM/images/workplane4.png differ diff --git a/doc/salome/gui/GEOM/images/workplane5.png b/doc/salome/gui/GEOM/images/workplane5.png index 925ac573b..d884244e9 100755 Binary files a/doc/salome/gui/GEOM/images/workplane5.png and b/doc/salome/gui/GEOM/images/workplane5.png differ diff --git a/doc/salome/gui/GEOM/images/workplane6.png b/doc/salome/gui/GEOM/images/workplane6.png index 1f65862f8..ade190ea2 100755 Binary files a/doc/salome/gui/GEOM/images/workplane6.png and b/doc/salome/gui/GEOM/images/workplane6.png differ diff --git a/doc/salome/gui/GEOM/input/basic_operations.doc b/doc/salome/gui/GEOM/input/basic_operations.doc index a0dc155af..87269b01e 100644 --- a/doc/salome/gui/GEOM/input/basic_operations.doc +++ b/doc/salome/gui/GEOM/input/basic_operations.doc @@ -5,6 +5,7 @@ */ \ No newline at end of file diff --git a/doc/salome/gui/GEOM/input/chamfer_operation.doc b/doc/salome/gui/GEOM/input/chamfer_operation.doc index 53e114094..890fd01a9 100644 --- a/doc/salome/gui/GEOM/input/chamfer_operation.doc +++ b/doc/salome/gui/GEOM/input/chamfer_operation.doc @@ -20,7 +20,7 @@ Dimension (radius) of the chamfer. \n In the algorithms below there exist two ways to define the \b Dimension of the Chamfer -\n Firstly the \b Dimension can be defined via \b D1 and \D2, which +\n Firstly the \b Dimension can be defined via \b D1 and \b D2, which represent the offset on the first and the second face forming the edge. \n Secondly the \b Dimension can be defined via \b D, which represents diff --git a/doc/salome/gui/GEOM/input/check_free_boundaries_operation.doc b/doc/salome/gui/GEOM/input/check_free_boundaries_operation.doc deleted file mode 100644 index f586dde4a..000000000 --- a/doc/salome/gui/GEOM/input/check_free_boundaries_operation.doc +++ /dev/null @@ -1,29 +0,0 @@ -/*! - -\page check_free_boundaries_operation_page Check Free Boundaries - -\n To Check Free Boundaries in the Main Menu select Repair - > Check Free Boundaries. - -\n This operation detects wires and edges that are not shared between -two faces and are considered a shape's boundary. This control highlights them. - -\n The \b Result will be a \b GEOM_Object. - -\n TUI Command: (NoError, ClosedWires, OpenWires) = -geompy.GetFreeBoundary(Shape), where \em Shape is a shape to be -checked, \em NoError is false if an error occurred while checking free -boundaries, \em ClosedWires is a list of closed free boundary wires, -\em OpenWires is a list of open free boundary wires. - -\image html repair9.png - -\n Example: - -\image html free_boudaries1.png - -\image html free_boudaries2.png - -Our TUI Scripts provide you with useful examples of the use of -\ref tui_check_free_boundaries "Repairing Operations". - -*/ diff --git a/doc/salome/gui/GEOM/input/check_free_faces_operation.doc b/doc/salome/gui/GEOM/input/check_free_faces_operation.doc deleted file mode 100644 index acf9d5428..000000000 --- a/doc/salome/gui/GEOM/input/check_free_faces_operation.doc +++ /dev/null @@ -1,27 +0,0 @@ -/*! - -\page check_free_faces_operation_page Check Free Faces - -\n To Check Free Faces in the Main Menu select Repair - > Check Free Faces. -\n This operation highlights all free faces from a given shape. A free -face is a face which is not shared between two objects of the shape. - -\n \b NOTE: This functionality works only in VTK viewer. - -\n The \b Result will be a \b GEOM_Object (a list of IDs of all free -faces, containing in the shape). -\n TUI Command: GetFreeFacesIDs(Shape), where \em Shape is -a shape to be checked. - -\image html repair10.png - -\n Example: - -\image html free_faces1.png - -\image html free_faces2.png - -Our TUI Scripts provide you with useful examples of the use of -\ref tui_check_free_faces "Repairing Operations". - -*/ diff --git a/doc/salome/gui/GEOM/input/common_operation.doc b/doc/salome/gui/GEOM/input/common_operation.doc index 21cd27749..689d762e4 100644 --- a/doc/salome/gui/GEOM/input/common_operation.doc +++ b/doc/salome/gui/GEOM/input/common_operation.doc @@ -9,6 +9,8 @@ \n The \b Result will be any \b GEOM_Object. \n TUI Command: geompy.MakeCommon(s1, s2) \n Arguments: Name + 2 shapes. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html bool2.png diff --git a/doc/salome/gui/GEOM/input/creating_compound.doc b/doc/salome/gui/GEOM/input/creating_compound.doc index 30d685ba1..2fdb43263 100644 --- a/doc/salome/gui/GEOM/input/creating_compound.doc +++ b/doc/salome/gui/GEOM/input/creating_compound.doc @@ -10,6 +10,8 @@ Entity - > Build - > Compound. \n TUI Command: geompy.MakeCompound(ListOfShape) \n Arguments: Name + List of shapes. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html neo-obj7.png @@ -20,4 +22,4 @@ Entity - > Build - > Compound. Our TUI Scripts provide you with useful examples of creation of \ref tui_creation_compound "Advanced Geometric Objects". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/creating_filling.doc b/doc/salome/gui/GEOM/input/creating_filling.doc index 4600408d5..fc5e0c97d 100644 --- a/doc/salome/gui/GEOM/input/creating_filling.doc +++ b/doc/salome/gui/GEOM/input/creating_filling.doc @@ -4,15 +4,24 @@ To generate a \b Filling in the Main Menu select New Entity - > Generation - > Filling -\n To create a curving face using several edges you need to define the -Edges Compound, \b Minimum and Maximum Degree, \b -Tolerance for \b 2D and for \b 3D , the Number of Iterations -and Approximation. +To create a curving face using several edges you need to define the +following parameters: +\n Edges Compound - the list of edges used for creation of the +surface; +\n \b Minimum and Maximum Degree of equation of the resulting BSpline or Besier curves describing the surface; +\n \b Tolerance for \b 2D and for \b 3D - minimum distance between the +created surface and the reference edge; +\n Number of +Iterations - defines the maximum number of iterations. The iterations are repeated until the required tolerance is reached. So, a greater number of iterations allows producing a better surface. +\n Approximation - if checked, BSpline curves are generated in the process of surface construction (using GeomAPI_PointsToBSplineSurface functionality). By default the surface is created using Besier curves. The usage of Approximation makes the algorithm work slower, but allows building the +surface for rather complex cases. + \n The \b Result of the operation will be a GEOM_Object (face). -\n TUI Command: geompy.MakeFilling(Edges, MinDegree, -MaxDegree, Tol2D, Tol3D, NbIter, isApprox) -\n Arguments: Name + 1 Compound of edges + 2 Values (min. and max degree of result BSpline surface) + 2 Values (2D and 3D precision to reach) + 1 Value (number of iterations of approximaion algorithm) + 1 Flag (to select one of algorithms). +\n TUI Command: geompy.MakeFilling(Edges, MinDegree, MaxDegree, Tol2D, Tol3D, NbIter) +\n Arguments: Name + 1 List of edges + 6 Parameters +(Min. degree, Max. degree, Number of iterations, 2D tolerance, 3D +tolerance, Number of iterations, Appro). \image html filling.png diff --git a/doc/salome/gui/GEOM/input/creating_point.doc b/doc/salome/gui/GEOM/input/creating_point.doc index 5e1703270..9b4600a92 100644 --- a/doc/salome/gui/GEOM/input/creating_point.doc +++ b/doc/salome/gui/GEOM/input/creating_point.doc @@ -5,7 +5,7 @@ To create a \b Point in the Main Menu select New Entity - > Basic - > Point -\n There are four algorithms to create a \b Point in the 3D space. +\n There are five algorithms to create a \b Point in the 3D space. \n Each time the \b Result of the operation will be a GEOM_Object (vertex). @@ -34,13 +34,24 @@ position of the point on the given edge. \image html point3.png -\n Finally, we can define a point by intersection of two \b Lines. +\n Fourthly, we can define a point by intersection of two \b Lines. \n TUI Command: geompy.MakePointOnLinesIntersection(myLine1,myLine2). \n Arguments: Name + 2 lines \image html point4.png Example: +\n Finally, we can define a point by a \b Face and two Parameters: U and \b V +indicating its position on the Face, ranging from 0.0 to 1.0. For example, (0.5; 0.5) means that the +point is located in the middle of the face. +\n TUI Command: geompy.MakeVertexOnSurface(myFace,myUParameter,myVParameter). +\n Arguments: Name + 1 face + 2 Parameters defining the +position of the point on the given face. + +\image html point5.png + +Example: + \image html points.png Our TUI Scripts provide you with useful examples of creation of diff --git a/doc/salome/gui/GEOM/input/creating_shell.doc b/doc/salome/gui/GEOM/input/creating_shell.doc index 7c87d3d22..d825f44a7 100644 --- a/doc/salome/gui/GEOM/input/creating_shell.doc +++ b/doc/salome/gui/GEOM/input/creating_shell.doc @@ -5,11 +5,11 @@ To create a \b Shell in the Main Menu select New Entity - > Build - > Shell -\n You can create a \b Shell from a list of faces and (or) shells. +\n You can create a \b Shell from a compound of faces or a list of faces or shells. \n The \b Result will be a \b GEOM_Object (shell). \n TUI Command: geompy.MakeShell(ListOfShape) -\n Arguments: Name + List of faces having connected edges. +\n Arguments: Name + Compound of faces or List of faces having connected edges. \image html neo-obj5.png diff --git a/doc/salome/gui/GEOM/input/cut_operation.doc b/doc/salome/gui/GEOM/input/cut_operation.doc index 1ccc84b0a..52184128c 100644 --- a/doc/salome/gui/GEOM/input/cut_operation.doc +++ b/doc/salome/gui/GEOM/input/cut_operation.doc @@ -7,6 +7,8 @@ \n This operation cuts a shape with another one. \n The \b Result will be any \b GEOM_Object. \n Arguments: Name + 2 shapes. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \n Dialog Box: diff --git a/doc/salome/gui/GEOM/input/fuse_operation.doc b/doc/salome/gui/GEOM/input/fuse_operation.doc index 5eb168bcd..95bfd9006 100644 --- a/doc/salome/gui/GEOM/input/fuse_operation.doc +++ b/doc/salome/gui/GEOM/input/fuse_operation.doc @@ -8,8 +8,10 @@ \n This operation creates a shape from two shapes. \n The \b Result will be any \b GEOM_Object. -\n Arguments: Name + 2 shapes. \n TUI Command: geompy.MakeFuse(s1, s2) +\n Arguments: Name + 2 shapes. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html bool1.png diff --git a/doc/salome/gui/GEOM/input/geompy.doc b/doc/salome/gui/GEOM/input/geompy.doc index cde054cb5..f35e6c16b 100644 --- a/doc/salome/gui/GEOM/input/geompy.doc +++ b/doc/salome/gui/GEOM/input/geompy.doc @@ -2,6 +2,11 @@ \page geompy_page Python Interface geompy.py -\n Please, see \ref geompyDC::geompyDC "documentation for geompy.py" +\n Please, see +structured documentation for geompy.py, +where all package functionality is separated in groups by purpose. -*/ \ No newline at end of file +\n Also you can find any function in the \ref geompyDC::geompyDC +"linear documentation for geompy.py". + +*/ diff --git a/doc/salome/gui/GEOM/input/glue_faces_operation.doc b/doc/salome/gui/GEOM/input/glue_faces_operation.doc index 340f4afa7..f940075d5 100644 --- a/doc/salome/gui/GEOM/input/glue_faces_operation.doc +++ b/doc/salome/gui/GEOM/input/glue_faces_operation.doc @@ -9,11 +9,14 @@ given tolerance value. \n The \b Result will be a \b GEOM_Object. -\n TUI Command: geompy.MakeGlueFaces(theShape, -theTolerance), where \em theShape is a compound of solids to be -glued, \em theTolerance is a maximum distance between two faces, which can -be considered as coincident. +\n TUI Command: + geompy.MakeGlueFaces(theShape,theTolerance), + where \em theShape is a compound of solids to be glued, \em + theTolerance is a maximum distance between two faces, which can be + considered as coincident. \n Arguments: Name + Compound of solids + Tolerance value. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html glue1.png diff --git a/doc/salome/gui/GEOM/input/index.doc b/doc/salome/gui/GEOM/input/index.doc index 45eb2ac65..f32498681 100644 --- a/doc/salome/gui/GEOM/input/index.doc +++ b/doc/salome/gui/GEOM/input/index.doc @@ -63,6 +63,7 @@
  • \ref boolean_operations_page
  • +
  • \ref restore_presentation_parameters_page
  • \subpage using_measurement_tools_page
  • \subpage geompy_page
  • @@ -131,6 +131,12 @@
  • \ref tui_repairing_operations_page
  • \ref tui_measurement_tools_page
  • +
  • \ref tui_swig_examples_page
  • + diff --git a/doc/salome/gui/GEOM/input/mirror_operation.doc b/doc/salome/gui/GEOM/input/mirror_operation.doc index f852902b0..188e7292a 100644 --- a/doc/salome/gui/GEOM/input/mirror_operation.doc +++ b/doc/salome/gui/GEOM/input/mirror_operation.doc @@ -14,6 +14,8 @@ otherwise it will be removed. \n Firstly an \b Object can be mirrored through a \b Point of symmetry \n TUI Command: geompy.MakeMirrorByPoint(Object, Point) \n Arguments: Name + one or several objects + 1 vertex. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html transformation7.png @@ -25,6 +27,8 @@ otherwise it will be removed. symmetry \n TUI Command: geompy.MakeMirrorByAxis(Object, Axis) \n Arguments: Name + one or several objects + 1 vector. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html transformation8.png @@ -35,6 +39,8 @@ symmetry \n Finally an \b Object can be mirrored through a \b Plane of symmetry \n TUI Command: geompy.MakeMirrorByPlane(Shape, Plane) \n Arguments: Name + one or several objects + 1 plane +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html transformation9.png diff --git a/doc/salome/gui/GEOM/input/modify_location_operation.doc b/doc/salome/gui/GEOM/input/modify_location_operation.doc index c25e0875c..87c958845 100644 --- a/doc/salome/gui/GEOM/input/modify_location_operation.doc +++ b/doc/salome/gui/GEOM/input/modify_location_operation.doc @@ -12,6 +12,8 @@ with the origin of the Local Coordinate System. \n Create a copy checkbox allows to keep the initial objects, otherwise they will be removed. \n Arguments: Name + one or several objects + End Coordinate System. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html transformation5.png @@ -31,6 +33,8 @@ the coordinates of the End LSC. otherwise it will be removed. \n Arguments: Name + one or several objects + Start Coordinate System + End Coordinate System. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html transformation6.png diff --git a/doc/salome/gui/GEOM/input/offset_operation.doc b/doc/salome/gui/GEOM/input/offset_operation.doc index d2b4b6766..a72ccb0c7 100644 --- a/doc/salome/gui/GEOM/input/offset_operation.doc +++ b/doc/salome/gui/GEOM/input/offset_operation.doc @@ -15,6 +15,8 @@ where Shape is a shape(s) which has to be an offset, Offset is a value of the offset. \n Arguments: Name + Object (face(s), shell(s), solid(s)) + Offset value +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html transformation11.png diff --git a/doc/salome/gui/GEOM/input/partition.doc b/doc/salome/gui/GEOM/input/partition.doc index 7dfc5310d..e8399e3c9 100644 --- a/doc/salome/gui/GEOM/input/partition.doc +++ b/doc/salome/gui/GEOM/input/partition.doc @@ -23,6 +23,8 @@ only to support the old scripts. \n Arguments: Name + 2 lists of shapes (the shapes from the first list will be intersected with the shapes from the second list) + reconstruction limit. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html partition1.png @@ -37,6 +39,8 @@ Plane), where \em Shapes are a list of Shapes to be intersected and \em Plane is a Tool shape, to intersect the \em Shapes. \n Arguments: Name + a list of shapes which will be intersected + 1 cutting plane. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html partition2.png @@ -49,4 +53,4 @@ and \em Plane is a Tool shape, to intersect the \em Shapes. Our TUI Scripts provide you with useful examples of the use of \ref tui_partition "Basic Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/remove_extra_edges_operation.doc b/doc/salome/gui/GEOM/input/remove_extra_edges_operation.doc index 3be4c4d3b..ad32a93b7 100644 --- a/doc/salome/gui/GEOM/input/remove_extra_edges_operation.doc +++ b/doc/salome/gui/GEOM/input/remove_extra_edges_operation.doc @@ -10,6 +10,8 @@ shape and unites faces and edges, sharing one surface. \n TUI Command: geompy.RemoveExtraEdges(theShape), there theShape is a compound or a single solid to remove irregular edges from. \n Arguments: Name + one shape. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html remove_extra_edges.png @@ -21,4 +23,4 @@ there theShape is a compound or a single solid to remove irregular edge \image html remove_extra_edges2.png
    Improved shape
    -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/restore_presentation_parameters.doc b/doc/salome/gui/GEOM/input/restore_presentation_parameters.doc new file mode 100644 index 000000000..5460457d6 --- /dev/null +++ b/doc/salome/gui/GEOM/input/restore_presentation_parameters.doc @@ -0,0 +1,57 @@ +/*! + +\page restore_presentation_parameters_page Restore presentation parameters and a tree of subshapes + +\n This functionality allows the operation result to inherit colour +and subshapes from its arguments. + +\n To activate this functionality, check in "Set +presentation parameters and subshapes from arguments" checkbox in the +corresponding dialog. + +\n For example, there exist two objects: Box_1 with two published +faces and Cylinder_1 with free published edges. + +\image html restore-ss-viewer-before.png + +First, we examine the case when the resulting shape corresponds to one argument (after transformation, +after the boolean operation Cut, or after the partiton with one object shape). + +We create a Cut of Box_1 with Cylinder_1. + +\image html restore-ss-cut.png + +The resulting shape inherits the subshapes and the colour of Box_1. + +\image html restore-ss-viewer-cut.png + +Second, we examine the case when the resulting shape is composed from multiple arguments +(after all boolean operations, except for Cut, or after the partition with +several object shapes, or if the resulting shape is a compound). + +We create a Common of Box_1 and Cylinder_1. + +\image html restore-ss-dialog.png + +\n The resulting object is created with several subshapes that correspond to the +operation arguments and their published subshapes. The resulting shape +has a default colour, but its subshapes inherit colors corresponding +to arguments and their subshapes. + +\image html restore-ss-viewer-after.png + + +Please, note that when the resulting shape corresponds to one +argument, the inherited subshapes depend directly on the resulting shape. + +\image html restore-ss-OB-cut.png + +When the resulting shape is composed from multiple arguments, the +inherited subshapes depend on the arguments. + +\image html restore-ss-OB.png + +\n You can also call this functionality from your python scripts. +See our TUI Scripts for \ref tui_restore_prs_params "example". + +*/ diff --git a/doc/salome/gui/GEOM/input/rotation_operation.doc b/doc/salome/gui/GEOM/input/rotation_operation.doc index e546f002b..789441833 100644 --- a/doc/salome/gui/GEOM/input/rotation_operation.doc +++ b/doc/salome/gui/GEOM/input/rotation_operation.doc @@ -12,6 +12,8 @@ be rotated, an \b Axis of rotation and an \b Angle of rotation. \n TUI Command: geompy.MakeRotation(Shape, Axis, Angle) \n Arguments: Name + one or several objects + 1 vector for direction of rotation + 1 angle. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html transformation4.png @@ -27,6 +29,8 @@ this case rotation \b Angle is the angle between two vectors directed from the first point to the second and to the third. \n TUI Command: geompy.MakeRotationThreePoints(Shape, CentralPoint, Point1, Point2) \n Arguments: 1 shape + 3 points. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html transformation4a.png diff --git a/doc/salome/gui/GEOM/input/scale_operation.doc b/doc/salome/gui/GEOM/input/scale_operation.doc index 65d8d9583..ed5b94fc6 100644 --- a/doc/salome/gui/GEOM/input/scale_operation.doc +++ b/doc/salome/gui/GEOM/input/scale_operation.doc @@ -7,20 +7,40 @@ \n This operation creates a scaled shape basing on the initial shape. For this, you need to define the \b Shape to be scaled, the -Central Point of scale and the Scale Factor. +Central Point of scale and the Scale Factor(s). \n The \b Result will be a \b GEOM_Object. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". + +\image html transformation10.png \n TUI Command: geompy.MakeScaleTransform(Shape, CenterOfScale, Factor) \n Arguments: Name + 1 shape(s) + 1 vertex + 1 Scale Factor. -\image html transformation10.png +\image html transformation10a.png +\n TUI Command: geompy.MakeScaleAlongAxes(Shape, CenterOfScale, FactorX, FactorY, FactorZ) +\n Arguments: Name + 1 shape(s) + 1 vertex + 3 Scale Factors. + +\note If Central Point is not defined, the scaling will be +performed relatively the origin of global coordinate system. -\n Example: +\note Scaling by a factor is a simple transformation, it does not modify +geometry of the shape, while scaling by different factors along axes +is a general transformation, which can modify geometry, for example, a +circle can be transformed into an ellipse. + +\n Example of simple scaling: \image html scale_transformsn1.png \image html scale_transformsn2.png +\n Example of scaling on different factors along axes: + +\image html scale_transformsn3.png + +\image html scale_transformsn4.png + Our TUI Scripts provide you with useful examples of the use of -\ref tui_scale "Transformation Operations". +\ref tui_scale "Scale Transformation" and of \ref swig_scale "Scale Along Axes Transformation" -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/section_operation.doc b/doc/salome/gui/GEOM/input/section_operation.doc index 911b76545..4d64a5a6e 100644 --- a/doc/salome/gui/GEOM/input/section_operation.doc +++ b/doc/salome/gui/GEOM/input/section_operation.doc @@ -10,6 +10,8 @@ \n The \b Result will be any \b GEOM_Object (EDGE or WIRE). \n TUI Command: geompy.MakeSection(s1, s2) \n Arguments: Name + 2 shapes. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html neo-section.png diff --git a/doc/salome/gui/GEOM/input/shapesonshape.doc b/doc/salome/gui/GEOM/input/shapesonshape.doc new file mode 100755 index 000000000..3e9e20494 --- /dev/null +++ b/doc/salome/gui/GEOM/input/shapesonshape.doc @@ -0,0 +1,35 @@ +/*! + +\page shapesonshape_page Get Shapes on Shape + +This operation is a special case of Explode operation. It produces a group of sub-shapes of the explosed shape, which are located in a definite way relatively another reference shape. + +To use this operation, select in the Main Menu Operations -> Get Shapes on Shape. The following dialog box will appear. + +\image html shapesonshape.png + + + +Example: + +In the images below the box is the exploded shape and the cylinder is the reference shape. In the first image the edge IN the reference cylinder is highlighted in red, in the second the edges OUT of the reference cylinder are highlighted. + +\image html shonshex1.png +\image html shonshex2.png + + +*/ diff --git a/doc/salome/gui/GEOM/input/transforming_geom_objs.doc b/doc/salome/gui/GEOM/input/transforming_geom_objs.doc index 487387388..3daec5a37 100644 --- a/doc/salome/gui/GEOM/input/transforming_geom_objs.doc +++ b/doc/salome/gui/GEOM/input/transforming_geom_objs.doc @@ -45,11 +45,10 @@
  • \ref sewing_operation_page
  • \ref glue_faces_operation_page
  • \ref add_point_on_edge_operation_page
  • -
  • \ref check_free_boundaries_operation_page
  • -
  • \ref check_free_faces_operation_page
  • \ref change_orientation_operation_page
  • \ref remove_extra_edges_operation_page
  • +
  • \subpage restore_presentation_parameters_page
  • -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/translation_operation.doc b/doc/salome/gui/GEOM/input/translation_operation.doc index caf1fd7a8..120e3877c 100644 --- a/doc/salome/gui/GEOM/input/translation_operation.doc +++ b/doc/salome/gui/GEOM/input/translation_operation.doc @@ -17,6 +17,8 @@ axes. DZ), where Shape is a shape to be translated, DX, DY, DZ are components of translation vector. \n Arguments: Name + one or several objects + 3 values (coordinates). +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html transformation1.png @@ -24,12 +26,18 @@ components of translation vector. of the vector. \n TUI Command: geompy.MakeTranslationTwoPoints(Object, Point1, Point2) \n Arguments: Name + one or several objects + 2 vertices +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html transformation2.png -\n Finally you can define an \b Object and the vector +\n Finally you can define an \b Object and the vector. The object will be translated by the length of the vector. \n TUI Command: geompy.MakeTranslationVector(Object, Vector) +\n Activate Distance checkbox and Distance field allow defining the custom distance of translation. +\n TUI Command for translation by vector and custom distance: geompy.MakeTranslationVectorDistance(Object, Vector, Distance) \n Arguments: Name + one or several objects + 1 vector. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html transformation3.png diff --git a/doc/salome/gui/GEOM/input/tui_basic_operations.doc b/doc/salome/gui/GEOM/input/tui_basic_operations.doc index 14f7c07f9..1250c128d 100644 --- a/doc/salome/gui/GEOM/input/tui_basic_operations.doc +++ b/doc/salome/gui/GEOM/input/tui_basic_operations.doc @@ -79,4 +79,62 @@ gg.createAndDisplayGO(id_archimede) gg.setDisplayMode(id_archimede,1) \endcode -*/ \ No newline at end of file +\anchor tui_restore_prs_params +

    Restore presentation parameters and subshapes

    + +\code +import geompy +import GEOM + +# create a box and a cylinder +box = geompy.MakeBoxDXDYDZ(200, 200, 200) +cyl = geompy.MakeCylinderRH(100, 300) + +# create translated box +vec = geompy.MakeVectorDXDYDZ(100, 50, 0) +tra = geompy.MakeTranslationVector(box, vec) + +# create partition objects +partition1 = geompy.MakePartition([box, cyl]) +partition2 = geompy.MakePartition([box], [cyl]) +partition3 = geompy.MakePartition([box], [tra]) + +# set colours +box.SetColor(SALOMEDS.Color(1,0,0)) +cyl.SetColor(SALOMEDS.Color(0,1,0)) + +# add objects in the study +geompy.addToStudy(box, "Box") +geompy.addToStudy(cyl, "Cylinder") +geompy.addToStudy(vec, "Vector") +geompy.addToStudy(tra, "Translation") +geompy.addToStudy(partition1, "Partition_1") +geompy.addToStudy(partition2, "Partition_2") +geompy.addToStudy(partition3, "Partition_3") + +# Restore presentation parameters and subshapes +# different methods can be used to find the subshapes in the result: +# GetInPlace, GetSame, GetInPlaceByHistory, GetShapesOnShape. +# By default, GetInPlace method is used (GEOM.FSM_GetInPlace) +geompy.RestoreSubShapes(partition1) + +geompy.RestoreSubShapes(partition2, [], GEOM.FSM_GetInPlace) + +# The list of arguments can be used to avoid restoring all arguments, +# but restore only the passed. +geompy.RestoreSubShapes(partition3, [tra], GEOM.FSM_GetInPlaceByHistory) + +# To find subshapes in a transformed shape only one method could be +# used: pass GEOM.FSM_Transformed for that. +# True passed for the last argument, means that the transformed shape +# will inherit colour and subshapes from its first argument (see above +# MakeTranslation). +geompy.RestoreSubShapes(tra, [], GEOM.FSM_Transformed, True) + +# Also we could do this directly with method addToStudy: +partition4 = geompy.MakePartition([box, tra]) +geompy.addToStudy(partition4, "Partition_4", True, [], + GEOM.FSM_GetInPlaceByHistory, False) +\endcode + +*/ diff --git a/doc/salome/gui/GEOM/input/tui_boolean_operations.doc b/doc/salome/gui/GEOM/input/tui_boolean_operations.doc index f88047f48..60563757c 100644 --- a/doc/salome/gui/GEOM/input/tui_boolean_operations.doc +++ b/doc/salome/gui/GEOM/input/tui_boolean_operations.doc @@ -24,20 +24,24 @@ cylinder = geompy.MakeCylinder(p1, v, radius1, height) sphere = geompy.MakeSphereR(40) # fuse -fuse = geompy.MakeFuse(cylinder, sphere) +fuse1 = geompy.MakeFuse(cylinder, sphere) +fuse2 = geompy.MakeBoolean(cylinder, sphere, 3) # add objects in the study id_cylinder = geompy.addToStudy(cylinder, "Cylinder") id_sphere = geompy.addToStudy(sphere, "Sphere") -id_fuse = geompy.addToStudy(fuse, "Fuse") +id_fuse1 = geompy.addToStudy(fuse1, "Fuse_1") +id_fuse2 = geompy.addToStudy(fuse2, "Fuse_2") # display results gg.createAndDisplayGO(id_cylinder) gg.setDisplayMode(id_cylinder,1) gg.createAndDisplayGO(id_sphere) gg.setDisplayMode(id_sphere,1) -gg.createAndDisplayGO(id_fuse) -gg.setDisplayMode(id_fuse,1) +gg.createAndDisplayGO(id_fuse1) +gg.setDisplayMode(id_fuse1,1) +gg.createAndDisplayGO(id_fuse2) +gg.setDisplayMode(id_fuse2,1) \endcode \anchor tui_common @@ -104,7 +108,7 @@ gg.createAndDisplayGO(id_cut) gg.setDisplayMode(id_cut,1) \endcode -\anchor tui_section +\anchor tui_section

    Section

    \code @@ -136,4 +140,4 @@ gg.createAndDisplayGO(id_section) gg.setDisplayMode(id_section,1) \endcode -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/tui_complex_objs.doc b/doc/salome/gui/GEOM/input/tui_complex_objs.doc index 29813a9a6..2f4fa5076 100644 --- a/doc/salome/gui/GEOM/input/tui_complex_objs.doc +++ b/doc/salome/gui/GEOM/input/tui_complex_objs.doc @@ -45,12 +45,14 @@ face2 = geompy.MakeFace(wire2, isPlanarWanted) # create prisms prism1 = geompy.MakePrism(face2, p1, p5) prism2 = geompy.MakePrismVecH(face1, vector, 50) +prism3 = geompy.MakePrismVecH2Ways(face1, vector, 50) # add objects in the study id_face1 = geompy.addToStudy(face1,"Face1") id_face2 = geompy.addToStudy(face2,"Face2") id_prism1 = geompy.addToStudy(prism1,"Prism1") id_prism2 = geompy.addToStudy(prism2,"Prism2") +id_prism3 = geompy.addToStudy(prism3,"Prism3") # display cylinders gg.createAndDisplayGO(id_face1) @@ -61,6 +63,8 @@ gg.createAndDisplayGO(id_prism1) gg.setDisplayMode(id_prism1,1) gg.createAndDisplayGO(id_prism2) gg.setDisplayMode(id_prism2,1) +gg.createAndDisplayGO(id_prism3) +gg.setDisplayMode(id_prism3,1) \endcode \anchor tui_creation_revolution @@ -186,4 +190,357 @@ gg.createAndDisplayGO(id_pipe) gg.setDisplayMode(id_pipe,1) \endcode -*/ \ No newline at end of file +\anchor tui_creation_pipe_with_diff_sec +

    Creation of a PipeWithDifferentSections

    + +\code +import geompy +import salome +gg = salome.ImportComponentGUI("GEOM") + +Wire_1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 100 0:R 0:C 100 90:T 0 200", [0, 0, 0, 0, 0, 1, 1, 0, -0]) +edges = geompy.SubShapeAll(Wire_1, geompy.ShapeType["EDGE"]) +vertices = geompy.SubShapeAll(Wire_1, geompy.ShapeType["VERTEX"]) + +# create sections +circles=[] +circles.append(geompy.MakeCircle(vertices[0], edges[0], 20)) +circles.append(geompy.MakeCircle(vertices[1], edges[0], 40)) +circles.append(geompy.MakeCircle(vertices[2], edges[2], 30)) +circles.append(geompy.MakeCircle(vertices[3], edges[2], 20)) + +# create pipe +Pipe = geompy.MakePipeWithDifferentSections(circles, vertices, Wire_1, 0, 0) + +# add objects in the study +geompy.addToStudy(circles[0], "circles1") +geompy.addToStudy(circles[1], "circles2") +geompy.addToStudy(circles[2], "circles3") +geompy.addToStudy(circles[3], "circles4") +id_wire = geompy.addToStudy(Wire_1, "Path") +id_pipe = geompy.addToStudy(Pipe, "Pipe") + +# display the wire(path) and the pipe +gg.createAndDisplayGO(id_wire) +gg.createAndDisplayGO(id_pipe) +gg.setDisplayMode(id_pipe,1) +\endcode + +\anchor tui_creation_pipe_with_shell_sec +

    Creation of a PipeWithShellSections

    + +\code +import geompy +import salome +gg = salome.ImportComponentGUI("GEOM") + +# create path +WirePath = geompy.MakeSketcher("Sketcher:F 0 0:TT 100 0:R 0:C 100 90:T 0 200", [0, 0, 0, 0, 0, 1, 1, 0, -0]) + +#======================================================= +# Create shell sections +#======================================================= +ps = [Vertex_1,Vertex_2,Vertex_3,Vertex_4] +theLocations = [Vertex_1, Vertex_2, Vertex_3, Vertex_4] +VC = geompy.MakeCompound(theLocations) +geompy.addToStudy(VC,"VC") +vs = [Edge_1,Edge_1,Edge_3,Edge_3] +hs = [20,40,30,20] +shells = [] +subbases = [] + +# 1 section +c0 = geompy.PointCoordinates(ps[0]) +c1 = geompy.PointCoordinates(ps[1]) +nx = c1[0] - c0[0] +ny = c1[1] - c0[1] +nz = c1[2] - c0[2] + +faces = [] +f1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 20 0:TT 20 20:TT 0 20:WF", + [c0[0], c0[1], c0[2], nx, ny, nz, 0, 0, 1]) +f2 = geompy.MakeSketcher("Sketcher:F 0 0:TT 0 20:TT -20 20:TT -20 0:WF", + [c0[0], c0[1], c0[2], nx, ny, nz, 0, 0, 1]) +f3 = geompy.MakeSketcher("Sketcher:F 0 0:TT -20 0:TT -20 -20:TT 0 -20:WF", + [c0[0], c0[1], c0[2], nx, ny, nz, 0, 0, 1]) +f4 = geompy.MakeSketcher("Sketcher:F 0 0:TT 0 -20:TT 20 -20:TT 20 0:WF", + [c0[0], c0[1], c0[2], nx, ny, nz, 0, 0, 1]) +faces.append(f1) +faces.append(f2) +faces.append(f3) +faces.append(f4) +shell = geompy.MakeSewing(faces,1.e-6) +shells.append(shell) +faces = geompy.SubShapeAllSorted(shell, geompy.ShapeType["FACE"]) +subbases.append(faces[0]) + +# 2 section +faces = [] + +w = geompy.MakeSketcher("Sketcher:F 20 20:TT 0 20:TT 0 0:TT 20 0", + [c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1]) +[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"]) +arc = MakeArc(w,3,-1) +w = geompy.MakeWire([e1,e2,e3,arc]) +f1 = geompy.MakeFace(w,1) + +w = geompy.MakeSketcher("Sketcher:F -20 0:TT 0 0:TT 0 20:TT -20 20", + [c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1]) +[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"]) +arc = MakeArc(w,3,-1) +w = geompy.MakeWire([e1,e2,e3,arc]) +f2 = geompy.MakeFace(w,1) + +w = geompy.MakeSketcher("Sketcher:F 20 0:TT 0 0:TT 0 -20:TT 20 -20", + [c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1]) +[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"]) +arc = MakeArc(w,3,-1) +w = geompy.MakeWire([e1,e2,e3,arc]) +f3 = geompy.MakeFace(w,1) + +w = geompy.MakeSketcher("Sketcher:F -20 -20:TT 0 -20:TT 0 0:TT -20 0", + [c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1]) +[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"]) +arc = MakeArc(w,3,-1) +w = geompy.MakeWire([e1,e2,e3,arc]) +f4 = geompy.MakeFace(w,1) + +faces.append(f1) +faces.append(f2) +faces.append(f3) +faces.append(f4) +shell = geompy.MakeSewing(faces,1.e-6) +shells.append(shell) +faces = geompy.SubShapeAllSorted(shell, geompy.ShapeType["FACE"]) +subbases.append(faces[0]) + +# 3 section +faces = [] +c2 = geompy.PointCoordinates(ps[2]) +c3 = geompy.PointCoordinates(ps[3]) +nx = c3[0] - c2[0] +ny = c3[1] - c2[1] +nz = c3[2] - c2[2] + +w = geompy.MakeSketcher("Sketcher:F 20 20:TT 0 20:TT 0 0:TT 20 0", + [c2[0], c2[1], c2[2], nx, ny, nz, 0, 0, 1]) +[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"]) +arc = MakeArc(w,3,1) +w = geompy.MakeWire([e1,e2,e3,arc]) +f1 = geompy.MakeFace(w,1) + +w = geompy.MakeSketcher("Sketcher:F -20 0:TT 0 0:TT 0 20:TT -20 20", + [c2[0], c2[1], c2[2], nx, ny, nz, 0, 0, 1]) +[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"]) +arc = MakeArc(w,3,1) +w = geompy.MakeWire([e1,e2,e3,arc]) +f2 = geompy.MakeFace(w,1) + +w = geompy.MakeSketcher("Sketcher:F 20 0:TT 0 0:TT 0 -20:TT 20 -20", + [c2[0], c2[1], c2[2], nx, ny, nz, 0, 0, 1]) +[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"]) +arc = MakeArc(w,3,1) +w = geompy.MakeWire([e1,e2,e3,arc]) +f3 = geompy.MakeFace(w,1) + +w = geompy.MakeSketcher("Sketcher:F -20 -20:TT 0 -20:TT 0 0:TT -20 0", + [c2[0], c2[1], c2[2], nx, ny, nz, 0, 0, 1]) +[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"]) +arc = MakeArc(w,3,1) +w = geompy.MakeWire([e1,e2,e3,arc]) +f4 = geompy.MakeFace(w,1) + +faces.append(f1) +faces.append(f2) +faces.append(f3) +faces.append(f4) +shell = geompy.MakeSewing(faces,1.e-6) +shells.append(shell) +faces = geompy.SubShapeAllSorted(shell, geompy.ShapeType["FACE"]) +subbases.append(faces[2]) + +# 4 section +faces = [] + +kk = 4 +dx = c3[0] - nx/kk +dy = c3[1] - ny/kk +dz = c3[2] - nz/kk +rad = math.sqrt(nx*nx+ny*ny+nz*nz) +vc = geompy.MakeVertex(dx,dy,dz) +sph = geompy.MakeSpherePntR(vc,rad/kk) +shellsph = geompy.SubShapeAll(sph, geompy.ShapeType["SHELL"]) + +fs = [] +vec = geompy.MakeVectorDXDYDZ(0,0,1) +ff = geompy.MakePlane(ps[3],vec,40) +fs.append(ff) +vp = geompy.MakeVertex(c3[0],c3[1],c3[2]+20) +ff = geompy.MakePlane(vp,vec,40) +fs.append(ff) +vp = geompy.MakeVertex(c3[0],c3[1],c3[2]-20) +ff = geompy.MakePlane(vp,vec,40) +fs.append(ff) +vec = geompy.MakeVectorDXDYDZ(1,0,0) +ff = geompy.MakePlane(ps[3],vec,40) +fs.append(ff) +vp = geompy.MakeVertex(c3[0]+20,c3[1],c3[2]) +ff = geompy.MakePlane(vp,vec,40) +fs.append(ff) +vp = geompy.MakeVertex(c3[0]-20,c3[1],c3[2]) +ff = geompy.MakePlane(vp,vec,40) +fs.append(ff) +aPartition = geompy.MakePartition(shellsph,fs) +fs = geompy.SubShapeAllSorted(aPartition, geompy.ShapeType["FACE"]) + +faces.append(fs[0]) +faces.append(fs[1]) +faces.append(fs[2]) +faces.append(fs[3]) +shell = geompy.MakeSewing(faces,1.e-6) +shells.append(shell) +faces = geompy.SubShapeAllSorted(shell, geompy.ShapeType["FACE"]) + + +#=========================================================== +# Create Pipe +#=========================================================== +subbases = [] +Pipe = geompy.MakePipeWithShellSections(shells, subbases, theLocations, WirePath, + theWithContact=0, theWithCorrection=0) + +# add objects in the study +resc = geompy.MakeCompound(shells) +id_sec = geompy.addToStudy(resc,"sections") +id_wire = geompy.addToStudy(WirePath,"WirePath") +id_pipe = geompy.addToStudy(Pipe, "Pipe") + +# display the wire(path), sections and the pipe +gg.createAndDisplayGO(id_wire) +gg.createAndDisplayGO(id_sec) +gg.createAndDisplayGO(id_pipe) +gg.setDisplayMode(id_pipe,1) +\endcode + + +\anchor tui_creation_pipe_without_path +

    Creation of a PipeShellsWithoutPath

    + +\code +import geompy +import math +import salome +gg = salome.ImportComponentGUI("GEOM") + +# Add a section based on quadrangles +# ---------------------------------- +def section(s, p1, p2=None, p3=None, p4=None): + if p2==None: + q = p1 + else: + q = geompy.MakeQuad4Vertices(p1, p2, p3, p4) + pass + s.append(q) + publish(q, "section") + return q + + +# find distance between two points +# ------------------------------- +def Dist(p1,p2): + c1 = geompy.PointCoordinates(p1) + c2 = geompy.PointCoordinates(p2) + return math.sqrt( (c2[0]-c1[0])*(c2[0]-c1[0]) + + (c2[1]-c1[1])*(c2[1]-c1[1]) + + (c2[2]-c1[2])*(c2[2]-c1[2]) ) + + +# return middle point +# ------------------------------- +def MiddleVert(p1,p2): + c1 = geompy.PointCoordinates(p1) + c2 = geompy.PointCoordinates(p2) + return geompy.MakeVertex( (c2[0]+c1[0])/2, (c2[1]+c1[1])/2, (c2[2]+c1[2])/2 ) + + +# Complex section +# result - 16 quads from lines +# pnt - point from path +# vec - direction from path +def MakeComplexSect(pnt,vec,rmax,rmin,nb): + dang = 1.0/nb/2 + cmax = geompy.MakeCircle(pnt,vec,rmax) + cmin = geompy.MakeCircle(pnt,vec,rmin) + faces = [] + for i in range(0,2*nb,2): + p1 = geompy.MakeVertexOnCurve(cmin,dang*i) + p2 = geompy.MakeVertexOnCurve(cmax,dang*(i+1)) + p3 = geompy.MakeVertexOnCurve(cmin,dang*(i+2)) + f = geompy.MakeQuad4Vertices(pnt,p1,p2,p3) + faces.append(f) + pass + shell = geompy.MakeSewing(faces,1.e-6) + return shell + + +#======================================================= +# Create simple path and recieve points +# for section creation +#======================================================= +WirePath = geompy.MakeSketcher("Sketcher:F 0 0:T 60 0:T 40 0:R 0:C 100 90:", + [0, 0, 0, 0, 0, 1, 1, 0, 0]) +vs = geompy.SubShapeAll(WirePath, geompy.ShapeType["VERTEX"]) + +#======================================================= +# Create shell sections +#======================================================= +shells = [] +subbases = [] +locs = [] + +# 1 section +shell = MakeComplexSect(vs[0], geompy.MakeVectorDXDYDZ(1,0,0), 60, 40, 16) +shells.append(shell) +vs1 = geompy.SubShapeAllSorted(shell,geompy.ShapeType["VERTEX"]) +locs.append(vs1[17]) + +# 2 section +shell = MakeComplexSect(vs[1], geompy.MakeVectorDXDYDZ(1,0,0), 80, 30, 16) +shells.append(shell) +vs2 = geompy.SubShapeAllSorted(shell,geompy.ShapeType["VERTEX"]) +locs.append(vs2[17]) + +# 3 section +shell = MakeComplexSect(vs[2], geompy.MakeVectorDXDYDZ(1,0,0), 60, 40, 16) +shells.append(shell) +vs3 = geompy.SubShapeAllSorted(shell,geompy.ShapeType["VERTEX"]) +locs.append(vs3[17]) + +# 4 section +shell = MakeComplexSect(vs[3], geompy.MakeVectorDXDYDZ(0,1,0), 40, 35, 16) +shells.append(shell) +vs4 = geompy.SubShapeAllSorted(shell,geompy.ShapeType["VERTEX"]) +locs.append(vs4[17]) + + +#=========================================================== +# Create Pipe +#=========================================================== + +Pipe = geompy.MakePipeShellsWithoutPath(shells,locs) + +# add objects in the study +resc = geompy.MakeCompound(shells) +id_sec = geompy.addToStudy(resc,"sections") +resl = geompy.MakeCompound(locs) +id_loc = geompy.addToStudy(resl,"locations") +id_pipe = geompy.addToStudy(Pipe, "Pipe") + +# display the sections, locations and pipe +gg.createAndDisplayGO(id_sec) +gg.createAndDisplayGO(id_loc) +gg.createAndDisplayGO(id_pipe) +gg.setDisplayMode(id_pipe,1) +\endcode + +*/ diff --git a/doc/salome/gui/GEOM/input/tui_measurement_tools.doc b/doc/salome/gui/GEOM/input/tui_measurement_tools.doc index 27483708d..ff70d793a 100644 --- a/doc/salome/gui/GEOM/input/tui_measurement_tools.doc +++ b/doc/salome/gui/GEOM/input/tui_measurement_tools.doc @@ -23,7 +23,7 @@ if IsEqual(coords[0], 15.) and IsEqual(coords[1], 23.) and IsEqual(coords[2], 80 else : print "Coordinates of point must be (15, 23, 80), but returned (", print coords[0], ", ", coords[1], ", ", coords[2], ")" - pass + pass \endcode

    Basic Properties

    @@ -68,7 +68,7 @@ else: dy = math.sqrt((coords[1] - 15)*(coords[1] - 15)) dz = math.sqrt((coords[2] - 50)*(coords[2] - 50)) if dx > 1e-7 or dy > 1e-7 or dz > 1e-7: - print "But must be (50, 15, 50)" + print "But must be (50, 15, 50)" \endcode

    Inertia

    @@ -85,7 +85,7 @@ print " (", In[0], ", ", In[1], ", ", In[2], ")" print " (", In[3], ", ", In[4], ", ", In[5], ")" print " (", In[6], ", ", In[7], ", ", In[8], ")" print "Main moments of inertia of box 100x30x100:" -print " Ix = ", In[9], ", Iy = ", In[10], ", Iz = ", In[11] +print " Ix = ", In[9], ", Iy = ", In[10], ", Iz = ", In[11] \endcode

    Check Free Boundaries

    @@ -217,7 +217,7 @@ id_cut_without_f_2 = geompy.addToStudy(cut_without_f_2, "Cut without f_2") # display the results gg.createAndDisplayGO(id_cut_without_f_2) -gg.setDisplayMode(id_cut_without_f_2,1) +gg.setDisplayMode(id_cut_without_f_2,1) \endcode @@ -233,7 +233,7 @@ bb = geompy.BoundingBox(box) print "\nBounding Box of box 100x30x100:" print " Xmin = ", bb[0], ", Xmax = ", bb[1] print " Ymin = ", bb[2], ", Ymax = ", bb[3] -print " Zmin = ", bb[4], ", Zmax = ", bb[5] +print " Zmin = ", bb[4], ", Zmax = ", bb[5] \endcode

    Minimal Distance

    @@ -245,9 +245,9 @@ import geompy box1 = geompy.MakeBoxDXDYDZ(100,30,100) box2 = geompy.MakeBox(105,0,0,200,30,100) min_dist = geompy.MinDistance(box1,box2) -print "\nMinimal distance between box1 and box2 = ", min_dist +print "\nMinimal distance between box1 and box2 = ", min_dist \endcode - +

    Tolerance

    \code @@ -262,7 +262,7 @@ print " Face max. tolerance: ", Toler[1] print " Edge min. tolerance: ", Toler[2] print " Edge max. tolerance: ", Toler[3] print " Vertex min. tolerance: ", Toler[4] -print " Vertex max. tolerance: ", Toler[5] +print " Vertex max. tolerance: ", Toler[5] \endcode

    Angle

    @@ -286,6 +286,13 @@ if math.fabs(Angle - 45.0) > 1e-05: print " Error: returned angle is", Angle, "while must be 45.0" pass +Angle = geompy.GetAngleRadians(OX, OXY) + +print "\nAngle between OX and OXY in radians = ", Angle +if math.fabs(Angle - math.pi/4) > 1e-05: + print " Error: returned angle is", Angle, "while must be pi/4" + pass + # not in one plane OXY_shift = geompy.MakeTranslation(OXY,10,-10,20) Angle = geompy.GetAngle(OX, OXY_shift) @@ -309,7 +316,6 @@ if (math.fabs(Angle + 1.0) > 1e-6 or geompy.MeasuOp.IsDone()): \endcode -

    What Is

    \code @@ -319,7 +325,7 @@ import geompy box = geompy.MakeBoxDXDYDZ(100,30,100) Descr = geompy.WhatIs(box) print "\nBox 100x30x100 description:" -print Descr +print Descr \endcode

    Check Shape

    @@ -333,9 +339,9 @@ IsValid = geompy.CheckShape(box) if IsValid == 0: raise RuntimeError, "Invalid box created" else: - print "\nBox is valid" + print "\nBox is valid" \endcode - +

    Check Compound of Blocks

    \code @@ -357,7 +363,7 @@ IsValid = geompy.CheckCompoundOfBlocks(glue) if IsValid == 0: raise RuntimeError, "Invalid compound created" else: - print "\nCompound is valid" + print "\nCompound is valid" \endcode */ diff --git a/doc/salome/gui/GEOM/input/tui_primitives.doc b/doc/salome/gui/GEOM/input/tui_primitives.doc index 827825605..441ac464c 100644 --- a/doc/salome/gui/GEOM/input/tui_primitives.doc +++ b/doc/salome/gui/GEOM/input/tui_primitives.doc @@ -64,7 +64,7 @@ id_cylinder2 = geompy.addToStudy(cylinder2,"Cylinder2") gg.createAndDisplayGO(id_cylinder1) gg.setDisplayMode(id_cylinder1,1) gg.createAndDisplayGO(id_cylinder2) -gg.setDisplayMode(id_cylinder2,1) +gg.setDisplayMode(id_cylinder2,1) \endcode \anchor tui_creation_sphere @@ -97,10 +97,10 @@ gg.setDisplayMode(id_sphere1,1) gg.createAndDisplayGO(id_sphere2) gg.setDisplayMode(id_sphere2,1) gg.createAndDisplayGO(id_sphere3) -gg.setDisplayMode(id_sphere3,1) +gg.setDisplayMode(id_sphere3,1) \endcode -\anchor tui_creation_torus +\anchor tui_creation_torus

    Creation of a Torus

    \code @@ -125,7 +125,7 @@ id_torus2 = geompy.addToStudy(torus2,"Torus2") gg.createAndDisplayGO(id_torus1) gg.setDisplayMode(id_torus1,1) gg.createAndDisplayGO(id_torus2) -gg.setDisplayMode(id_torus2,1) +gg.setDisplayMode(id_torus2,1) \endcode \anchor tui_creation_cone @@ -153,7 +153,7 @@ id_cone2 = geompy.addToStudy(cone2,"Cone2") gg.createAndDisplayGO(id_cone1) gg.setDisplayMode(id_cone1,1) gg.createAndDisplayGO(id_cone2) -gg.setDisplayMode(id_cone2,1) +gg.setDisplayMode(id_cone2,1) \endcode -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/tui_scripts.doc b/doc/salome/gui/GEOM/input/tui_scripts.doc index 08195e67f..0f2d65686 100644 --- a/doc/salome/gui/GEOM/input/tui_scripts.doc +++ b/doc/salome/gui/GEOM/input/tui_scripts.doc @@ -3,26 +3,32 @@ \page tui_scripts_page TUI Scripts -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/tui_swig_examples.doc b/doc/salome/gui/GEOM/input/tui_swig_examples.doc new file mode 100644 index 000000000..43b003d42 --- /dev/null +++ b/doc/salome/gui/GEOM/input/tui_swig_examples.doc @@ -0,0 +1,11 @@ +/*! + +\page tui_swig_examples_page Examples, generated from GEOM_SWIG test scripts + + + +*/ diff --git a/doc/salome/gui/GEOM/input/tui_test_all.doc b/doc/salome/gui/GEOM/input/tui_test_all.doc new file mode 100644 index 000000000..caeae7be8 --- /dev/null +++ b/doc/salome/gui/GEOM/input/tui_test_all.doc @@ -0,0 +1,75 @@ +/*! + +\page tui_test_all_page GEOM_TestAll.py + +\anchor swig_All +

    GEOM_TestAll.py

    + +\dontinclude GEOM_TestAll.py +\skipline def TestAll + +\until vxyz + +\anchor swig_MakeMarker +\until cs3 + +\until MakePlaneThreePnt + +\anchor swig_MakeArc +\until MakeArcCenter + +\anchor swig_MakeCircle +\until Circle2 + +\until MakeVertexOnCurve + +\anchor swig_MakeVertexOnLinesIntersection +\until p_on_l1l2 + +\anchor swig_MakeTangentOnCurve +\until tan_on_arc + +\until MakeCompound + +\anchor swig_MakeVertexOnSurface +\until p_on_face + +\until S = geompy.MakeRotation + +\anchor swig_MakeLineTwoFaces +\until Line3 + +\anchor swig_all_advanced +\until MakeSewing + +\anchor swig_all_trsf +\until RotatPnt + +\anchor swig_scale +\until Scale4 + +\anchor swig_all_trsf_more +\until MakeOffset + +\anchor swig_ChangeOrientation +\until ChangeOrientation + +\anchor swig_FilletChamfer +\until End of Local operations + +\anchor swig_all_patterns +\until MultiRot2D + +\anchor swig_all_measure +\until "CheckShape(Prism) = " + +\anchor swig_all_partition +\until Partition1 + +\anchor swig_all_addtostudy +\until id_Partition1 + +\anchor swig_all_decompose +\until print "DONE" + +*/ diff --git a/doc/salome/gui/GEOM/input/tui_test_others.doc b/doc/salome/gui/GEOM/input/tui_test_others.doc new file mode 100644 index 000000000..32d3c8b21 --- /dev/null +++ b/doc/salome/gui/GEOM/input/tui_test_others.doc @@ -0,0 +1,159 @@ +/*! + +\page tui_test_others_page GEOM_TestOthers.py + +\anchor swig_TestOthers +

    GEOM_TestOthers.py

    + +\dontinclude GEOM_TestOthers.py + +\skipline import os + +\anchor swig_Import_Export +\until print "OK" + +\until id_w3 + +\anchor swig_MakeFaces +\until id_f12 + +\until TestExportImport + +\anchor swig_OrientationChange +\until id_Orientation + +\anchor swig_MakeCommon +\until id_Section + +\anchor swig_Partition +\until id_Partition + +\anchor swig_MakeMultiRotation +\until id_MultiRot2D + +\anchor swig_MakeFilletAll +\until id_MakeFilletAll + +\anchor swig_MakeChamferAll +\until id_MakeChamferAll + +\anchor swig_MakeChamfer +\until id_MakeChamfer + +\anchor swig_NumberOfFaces +\until Bad number of faces + +\anchor swig_NumberOfEdges +\until Bad number of edges + +\anchor swig_MakeBlockExplode +\until id_MakeBlockExplode + +\anchor swig_CheckCompoundOfBlocks +\until The Box is VALID + +\anchor swig_GetSame +\until id_Cone_ss + +\anchor swig_CreateGroup +\until id_CreateGroup + +\anchor swig_AddObject +\until Now contains + +\anchor swig_UnionList +\until Now contains + +\anchor swig_RemoveObject +\until Now contains + +\anchor swig_DifferenceList +\until Now contains + +\anchor swig_GetObjectIDs +\until print " ", ObjectID + +\anchor swig_GetMainShape +\until BoxCopy + +\anchor swig_DifferenceIDs +\until Now contains + +\anchor swig_UnionIDs +\until print " ", ObjectID + +\anchor swig_GetType +\until Type of elements + +\until freeFaces, "freeFaces" + +\anchor swig_RemoveExtraEdges +\until "freeFacesWithoutExtra" + +\anchor swig_GetSharedShapes +\until "sharedFace" + +\anchor swig_CheckAndImprove +\until "blocksComp" + +\anchor swig_Propagate +\until "propagation chain" + +\anchor swig_GetPoint +\until blocksComp (-50, -50, -50) + +\anchor swig_GetEdgeNearPoint +\until edge near point + +\anchor swig_GetBlockByParts +\until "b0 image" + +\anchor swig_GetShapesOnPlane +\until Face on Plane + +\anchor swig_GetShapesOnPlaneIDs +\until Group of faces + +\anchor swig_GetShapesOnPlaneWithLocation +\until Edge on Plane + +\anchor swig_GetShapesOnPlaneWithLocationIDs +\until group_edges_on_pln, grname + +\anchor swig_GetShapesOnCylinder +\until Edge out of Cylinder + +\anchor swig_GetShapesOnCylinderIDs +\until Group of edges + +\anchor swig_GetShapesOnSphere +\until Vertex on Sphere + +\anchor swig_GetShapesOnSphereIDs +\until Group of vertices + +\anchor swig_GetShapesOnQuadrangle +\until Error in GetShapesOnQuadrangle + +\anchor swig_GetShapesOnQuadrangleIDs +\until Group of vertices + +\anchor swig_GetShapesOnBox +\until "Error in GetShapesOnBox()" + +\anchor swig_GetShapesOnBoxIDs +\until Group of faces + +\anchor swig_GetShapesOnShape +\until "Error in GetShapesOnShape()" + +\anchor swig_GetShapesOnShapeAsCompound +\until (as compound) + +\anchor swig_GetShapesOnShapeIDs +\until "Error in GetShapesOnShapeIDs()" + +\anchor swig_GetInPlace +\until #END + +*/ diff --git a/doc/salome/gui/GEOM/input/tui_test_spanner.doc b/doc/salome/gui/GEOM/input/tui_test_spanner.doc new file mode 100644 index 000000000..5c9df4651 --- /dev/null +++ b/doc/salome/gui/GEOM/input/tui_test_spanner.doc @@ -0,0 +1,41 @@ +/*! + +\page tui_test_spanner_page GEOM_Spanner.py + +\anchor swig_Spanner +

    GEOM_Spanner.py

    + +\dontinclude GEOM_Spanner.py +\skipline def MakeSpanner + +\until vxy + +\anchor swig_MakeQuad4Vertices +\until id_face11 + +\anchor swig_MakeTranslationTwoPoints +\until id_face12 + +\anchor swig_MakeHexa2Faces +\until id_block1 + +\until p_15_10_1 + +\anchor swig_GetFaceNearPoint +\until id_face31 + +\until not a hexahedral + +\anchor swig_SubShapeAllSorted +\until ii + 1 + +\anchor swig_MakeHexa +\until id_block3 + +\anchor swig_GetOppositeFace +\until id_face41 + +\anchor spanner_continue +\until return Spanner + +*/ diff --git a/doc/salome/gui/GEOM/input/tui_transformation_operations.doc b/doc/salome/gui/GEOM/input/tui_transformation_operations.doc index a05846a79..a4863b537 100644 --- a/doc/salome/gui/GEOM/input/tui_transformation_operations.doc +++ b/doc/salome/gui/GEOM/input/tui_transformation_operations.doc @@ -27,12 +27,14 @@ cylinder = geompy.MakeCylinder(p1, v, radius1, height) translation1 = geompy.MakeTranslationTwoPoints(cylinder, p1, p3) translation2 = geompy.MakeTranslation(cylinder, 40, 40, 0) translation3 = geompy.MakeTranslationVector(cylinder, vt) +translation4 = geompy.MakeTranslationVectorDistance(cylinder, vt, 200) # add objects in the study id_cylinder = geompy.addToStudy(cylinder, "Cylinder") id_translation1 = geompy.addToStudy(translation1, "Translation1") id_translation2 = geompy.addToStudy(translation2, "Translation2") id_translation3 = geompy.addToStudy(translation3, "Translation3") +id_translation4 = geompy.addToStudy(translation4, "Translation4") # display the results gg.createAndDisplayGO(id_cylinder) @@ -43,6 +45,8 @@ gg.createAndDisplayGO(id_translation2) gg.setDisplayMode(id_translation2,1) gg.createAndDisplayGO(id_translation3) gg.setDisplayMode(id_translation3,1) +gg.createAndDisplayGO(id_translation4) +gg.setDisplayMode(id_translation4,1) \endcode \anchor tui_rotation @@ -461,4 +465,4 @@ gg.createAndDisplayGO(id_chamfer_all) gg.setDisplayMode(id_chamfer_all,1) \endcode -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/using_measurement_tools.doc b/doc/salome/gui/GEOM/input/using_measurement_tools.doc index d7dbee6bf..ec1a69f0d 100644 --- a/doc/salome/gui/GEOM/input/using_measurement_tools.doc +++ b/doc/salome/gui/GEOM/input/using_measurement_tools.doc @@ -1,223 +1,238 @@ -/*! - -\page using_measurement_tools_page Using measurement tools - -\n Measurement tools in GEOM are necessary for getting different data -concerning created or imported geometrical objects. They are: - - - -\n Our TUI Scripts show how to use -\ref tui_measurement_tools_page "Measurement Tools" with TUI -commands. - -\n To use measurement tools: -\par -In the Main menu select \b Measures submenu. - -\anchor point_coord_anchor -

    Point coordinates

    - -\n Returns the coordinates of a point. - -\n Result: Point coordinates (X, Y, Z) in 3D space in the form of Python Tuple. -\n TUI Command: geompy.PointCoordinates(Point), -where \em Point is a point whose coordinates are inquired. - -\image html measures1.png - -\anchor basic_prop_anchor -

    Basic properties

    - -\n Returns the properties (Length, Surface & Volume) for the selected -geometrical object. - -\n Result: Display Length, Surface & Volume in the form of -Python Tuple. -\n TUI Command: geompy.BasicProperties(Shape), where -\em Shape is a shape whose properties are inquired. - -\image html neo-basicprop.png - -\anchor center_mass_anchor -

    Center of mass

    - -\n Calculates and returns the coordinates of the gravity center for -the selected geometrical object. - -\n Result: GEOM_Object (vertex). -\n TUI Command: geompy.MakeCDG(Shape), where \em Shape is -the shape for which a center of gravity is computed. - -\image html measures3.png - -\anchor inertia_anchor -

    Inertia

    - -Returns the axial moments of inertia for the selected geometrical object. - -\n Result: Displays the matrix of the own moments of inertia and -the relative moments of inertia in the form of Python Tuple -
    (I11, I12, I13,
    -
    I21, I22, I23,
    -
    I31, I32, I33,
    -
    Ix, Iy, Iz).
    -\n TUI Command: geompy.Inertia(Shape), where \em Shape is -a shape for which the own matrix of inertia and the relative moments of inertia are -returned. - -\image html measures4.png - -\anchor normale_anchor -

    Normal to a Face

    - -\n Calculates the normal vector to the selected \b Face. The \b Point -is a point of the \Face, where the Normal should be calculated. - -\image html normaletoface.png - -\anchor boundaries_anchor -

    Check Free Boundaries

    - -\n Detects and highlights wires and edges that are not shared between -two faces and are considered a shape's boundary. - -\n TUI Command: (NoError, ClosedWires, OpenWires) = -geompy.GetFreeBoundary(Shape), where \em Shape is a shape to be -checked, \em NoError is false if an error occurred while checking free -boundaries, \em ClosedWires is a list of closed free boundary wires, -\em OpenWires is a list of open free boundary wires. - -\image html repair9.png - -\anchor faces_anchor -

    Check Free Faces

    - -\n Highlights all free faces of a given shape. A free -face is a face which is not shared between two objects of the shape. - -\n \b NOTE: This functionality works only in VTK viewer. - -\n \b Result: a list of IDs of all free faces, containing in the shape. -\n TUI Command: GetFreeFacesIDs(Shape), where \em Shape is -a shape to be checked. - -\image html repair10.png - -\anchor bounding_box_anchor -

    Bounding box

    - -\n Returns the dimensions of the bounding box for the selected -geometrical object. - -\n Result: Displays the dimensions of the bounding box of a -geometrical object in the form of Python Tuple (Xmin, Xmax, Ymin, -Ymax, Zmin, Zmax). -\n TUI Command: geompy.BoundingBox(Shape), where \em Shape -is a shape for which a bounding box is computed. - -\image html measures5.png - -\anchor min_distance_anchor -

    Min. distance

    - -\n Returns the minimum distance between two geometrical objects and -the coordinates of the vector of distance and shows the vector in the viewer. - -\n TUI Command: geompy.MinDistance(Shape1, Shape2), -where \em Shape1 and \em Shape2 are shapes between which the minimal -distance is computed. - -\image html distance.png - -\anchor angle_anchor -

    Angle

    - -\n Returns the angle between two lines or linear edges -\n TUI Command: geompy.GetAngle(shape1, shape2), where -Shape1 and Shape2 are shapes between which the angle is computed. - -\image html angle.png - -\anchor tolerance_anchor -

    Tolerance

    - -\n Returns the maximum and the minimum tolerance for the selected -geometrical object. - -\n Result: Displays the tolerance values (FaceMinTol, -FaceMaxTol, EgdeMinTol, EgdeMaxTol, VertexMinTol, VertexMaxTol). -\n TUI Command: geompy.Tolerance(Shape), where \em Shape -is a shape for which minimal and maximal tolerances are returned. - -\image html new-tolerance.png - -\anchor whatis_anchor -

    WhatIs

    - -\n Displays types and quantities of all elements composing the -selected geometrical object. - -\n TUI Command: geompy.WhatIs(Shape), where \em Shape is a -shape from which a description is returned. - -\image html measures8.png - -\anchor check_anchor -

    Check

    - -\n Checks the topology of the selected geometrical object and returns -True if it is valid. Check also geometry checkbox allows to test the -geometry as well. - -\n Result: Boolean. -\n TUI Command: geompy.(theShape, theIsCheckGeom = 0), -where is theShape is the shape checked for validity. - -\image html measures9.png - -\anchor check_compound_anchor -

    Check compound of blocks

    - -\n Checks whether a shape is a compound of glued blocks. To be -considered as a compound of blocks, the given shape must satisfy the -following conditions: - - -\n Informs of the following possible errors: - - -\n Result: Boolean; highlight in the viewer. -\n TUI Command: -geompy.CheckCompoundOfBlocks(Compound). Checks if the shape -is a valid compound of blocks. If it is true, then the validity flag -is returned, and encountered errors are printed in the python console. - -\image html measures10.png - -*/ +/*! + +\page using_measurement_tools_page Using measurement tools + +\n Measurement tools in GEOM are necessary for getting different data +concerning created or imported geometrical objects. They are: + + + +\n Our TUI Scripts show how to use +\ref tui_measurement_tools_page "Measurement Tools" with TUI +commands. + +\n To use measurement tools: +\par +In the Main menu select \b Measures submenu. + +\anchor point_coord_anchor +

    Point coordinates

    + +\n Returns the coordinates of a point. + +\n Result: Point coordinates (X, Y, Z) in 3D space in the form of Python Tuple. +\n TUI Command: geompy.PointCoordinates(Point), +where \em Point is a point whose coordinates are inquired. + +\image html measures1.png + +\anchor basic_prop_anchor +

    Basic properties

    + +\n Returns the properties (Length, Surface & Volume) for the selected +geometrical object. + +\n Result: Display Length, Surface & Volume in the form of +Python Tuple. +\n TUI Command: geompy.BasicProperties(Shape), where +\em Shape is a shape whose properties are inquired. + +\image html neo-basicprop.png + +\anchor center_mass_anchor +

    Center of mass

    + +\n Calculates and returns the coordinates of the gravity center for +the selected geometrical object. + +\n Result: GEOM_Object (vertex). +\n TUI Command: geompy.MakeCDG(Shape), where \em Shape is +the shape for which a center of gravity is computed. + +\image html measures3.png + +\anchor inertia_anchor +

    Inertia

    + +Returns the axial moments of inertia for the selected geometrical object. + +\n Result: Displays the matrix of the own moments of inertia and +the relative moments of inertia in the form of Python Tuple +
    (I11, I12, I13,
    +
    I21, I22, I23,
    +
    I31, I32, I33,
    +
    Ix, Iy, Iz).
    +\n TUI Command: geompy.Inertia(Shape), where \em Shape is +a shape for which the own matrix of inertia and the relative moments of inertia are +returned. + +\image html measures4.png + +\anchor normale_anchor +

    Normal to a Face

    + +\n Calculates the normal vector to the selected \b Face. The \b Point +is a point of the \b Face, where the Normal should be calculated. + +\image html normaletoface.png + +\anchor boundaries_anchor +

    Check Free Boundaries

    + +\n Detects and highlights wires and edges that are not shared between +two faces and are considered a shape's boundary. + +\n TUI Command: (NoError, ClosedWires, OpenWires) = +geompy.GetFreeBoundary(Shape), where \em Shape is a shape to be +checked, \em NoError is false if an error occurred while checking free +boundaries, \em ClosedWires is a list of closed free boundary wires, +\em OpenWires is a list of open free boundary wires. + +\image html repair9.png + +\anchor faces_anchor +

    Check Free Faces

    + +\n Highlights all free faces of a given shape. A free +face is a face which is not shared between two objects of the shape. + +\n \b NOTE: This functionality works only in VTK viewer. + +\n \b Result: a list of IDs of all free faces, containing in the shape. +\n TUI Command: GetFreeFacesIDs(Shape), where \em Shape is +a shape to be checked. + +\image html repair10.png + +\anchor bounding_box_anchor +

    Bounding box

    + +\n Returns the dimensions of the bounding box for the selected +geometrical object. + +\n Result: Displays the dimensions of the bounding box of a +geometrical object in the form of Python Tuple (Xmin, Xmax, Ymin, +Ymax, Zmin, Zmax). +\n TUI Command: geompy.BoundingBox(Shape), where \em Shape +is a shape for which a bounding box is computed. + +\image html measures5.png + +\anchor min_distance_anchor +

    Min. distance

    + +\n Returns the minimum distance between two geometrical objects and +the coordinates of the vector of distance and shows the vector in the viewer. + +\n TUI Command: geompy.MinDistance(Shape1, Shape2), +where \em Shape1 and \em Shape2 are shapes between which the minimal +distance is computed. + +\image html distance.png + +\anchor angle_anchor +

    Angle

    + +\n Returns the angle between two lines or linear edges in degrees +\n TUI Command: geompy.GetAngle(shape1, shape2), where +Shape1 and Shape2 are shapes between which the angle is computed. +Another TUI command is geompy.GetAngleRadians(shape1,shape2), +which returns the value of angle in radians. + +\image html angle.png + +\anchor tolerance_anchor +

    Tolerance

    + +\n Returns the maximum and the minimum tolerance for the selected +geometrical object. + +\n Result: Displays the tolerance values (FaceMinTol, +FaceMaxTol, EgdeMinTol, EgdeMaxTol, VertexMinTol, VertexMaxTol). +\n TUI Command: geompy.Tolerance(Shape), where \em Shape +is a shape for which minimal and maximal tolerances are returned. + +\image html new-tolerance.png + +\anchor whatis_anchor +

    WhatIs

    + +\n General information about the selected geometrical object is the +list of types and quantities of all topological entities, composing +the shape. + +\n TUI Command: geompy.WhatIs(Shape), where \em Shape is a +shape from which a description is returned. + +\image html measures8.png + +\n Kind of Shape field characterises the +whole shape. If there is no additional information available for the +shape, Basic Properties button will be disabled, otherwise it +will show a dialog with information about +dimensions, position, orientation and other parameters of the shape. + +\n TUI Command: geompy.KindOfShape(Shape), where \em Shape is a +shape from which a description is returned. + +\image html measures8a.png + +\anchor check_anchor +

    Check

    + +\n Checks the topology of the selected geometrical object and returns +True if it is valid. Check also geometry checkbox allows to test the +geometry as well. + +\n Result: Boolean. +\n TUI Command: geompy.CheckShape(theShape, theIsCheckGeom = 0), +where \em theShape is the shape checked for validity. + +\image html measures9.png + +\anchor check_compound_anchor +

    Check compound of blocks

    + +\n Checks whether a shape is a compound of glued blocks. To be +considered as a compound of blocks, the given shape must satisfy the +following conditions: + + +\n Informs of the following possible errors: + + +\n Result: Boolean; highlight in the viewer. +\n TUI Command: +geompy.CheckCompoundOfBlocks(Compound). Checks if the shape +is a valid compound of blocks. If it is true, then the validity flag +is returned, and encountered errors are printed in the python console. + +\image html measures10.png + +*/ + diff --git a/doc/salome/gui/GEOM/input/working_with_groups.doc b/doc/salome/gui/GEOM/input/working_with_groups.doc index ed0909498..5e5a814a4 100644 --- a/doc/salome/gui/GEOM/input/working_with_groups.doc +++ b/doc/salome/gui/GEOM/input/working_with_groups.doc @@ -19,29 +19,45 @@ menu select New entity > Group > Create In this Menu: +group. If the Second Shape is used, the elements are added +according to Select Sub Shapes setting. To delete elements +from the list, select them and click \b Remove button. + + +
  • Finally, confirm your selection by clicking Apply and Close + (also closes the Menu) or \b Apply (leaves the Menu open for +creation of other groups), or skip it by clicking \b Close button. +
  • \n The Result of the operation will be a \b GEOM_Object. diff --git a/doc/salome/gui/GEOM/pics/angle.png b/doc/salome/gui/GEOM/pics/angle.png deleted file mode 100755 index fbe753880..000000000 Binary files a/doc/salome/gui/GEOM/pics/angle.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/arc.png b/doc/salome/gui/GEOM/pics/arc.png deleted file mode 100755 index 260a5fb7d..000000000 Binary files a/doc/salome/gui/GEOM/pics/arc.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/arc2.png b/doc/salome/gui/GEOM/pics/arc2.png deleted file mode 100644 index 2bced2ae0..000000000 Binary files a/doc/salome/gui/GEOM/pics/arc2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/archimede.png b/doc/salome/gui/GEOM/pics/archimede.png deleted file mode 100755 index cd620020e..000000000 Binary files a/doc/salome/gui/GEOM/pics/archimede.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/archimedesn1.png b/doc/salome/gui/GEOM/pics/archimedesn1.png deleted file mode 100755 index 402092052..000000000 Binary files a/doc/salome/gui/GEOM/pics/archimedesn1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/archimedesn2.png b/doc/salome/gui/GEOM/pics/archimedesn2.png deleted file mode 100755 index b3b84b155..000000000 Binary files a/doc/salome/gui/GEOM/pics/archimedesn2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/archimedesn3.png b/doc/salome/gui/GEOM/pics/archimedesn3.png deleted file mode 100755 index da57c0fb9..000000000 Binary files a/doc/salome/gui/GEOM/pics/archimedesn3.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/arcsn.png b/doc/salome/gui/GEOM/pics/arcsn.png deleted file mode 100755 index 4131e41f5..000000000 Binary files a/doc/salome/gui/GEOM/pics/arcsn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/arcsn1.png b/doc/salome/gui/GEOM/pics/arcsn1.png deleted file mode 100644 index 564f12edf..000000000 Binary files a/doc/salome/gui/GEOM/pics/arcsn1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/arcsn2.png b/doc/salome/gui/GEOM/pics/arcsn2.png deleted file mode 100644 index f2bec5d29..000000000 Binary files a/doc/salome/gui/GEOM/pics/arcsn2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/bezier.png b/doc/salome/gui/GEOM/pics/bezier.png deleted file mode 100755 index 3c0e8df2b..000000000 Binary files a/doc/salome/gui/GEOM/pics/bezier.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/block1.png b/doc/salome/gui/GEOM/pics/block1.png deleted file mode 100755 index 71a93b0c9..000000000 Binary files a/doc/salome/gui/GEOM/pics/block1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/block2.png b/doc/salome/gui/GEOM/pics/block2.png deleted file mode 100755 index c66dd7f02..000000000 Binary files a/doc/salome/gui/GEOM/pics/block2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/block3.png b/doc/salome/gui/GEOM/pics/block3.png deleted file mode 100755 index 61aad9b43..000000000 Binary files a/doc/salome/gui/GEOM/pics/block3.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/block4.png b/doc/salome/gui/GEOM/pics/block4.png deleted file mode 100755 index d0661b6e9..000000000 Binary files a/doc/salome/gui/GEOM/pics/block4.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/block5.png b/doc/salome/gui/GEOM/pics/block5.png deleted file mode 100755 index 9810f6f0d..000000000 Binary files a/doc/salome/gui/GEOM/pics/block5.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/block_explodesn.png b/doc/salome/gui/GEOM/pics/block_explodesn.png deleted file mode 100755 index 372de3f20..000000000 Binary files a/doc/salome/gui/GEOM/pics/block_explodesn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/bool1.png b/doc/salome/gui/GEOM/pics/bool1.png deleted file mode 100755 index 3f997a772..000000000 Binary files a/doc/salome/gui/GEOM/pics/bool1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/bool2.png b/doc/salome/gui/GEOM/pics/bool2.png deleted file mode 100755 index 4e9b96862..000000000 Binary files a/doc/salome/gui/GEOM/pics/bool2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/bool3.png b/doc/salome/gui/GEOM/pics/bool3.png deleted file mode 100755 index af409a15e..000000000 Binary files a/doc/salome/gui/GEOM/pics/bool3.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/box1.png b/doc/salome/gui/GEOM/pics/box1.png deleted file mode 100755 index 812027dcf..000000000 Binary files a/doc/salome/gui/GEOM/pics/box1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/box2.png b/doc/salome/gui/GEOM/pics/box2.png deleted file mode 100755 index 85a737afb..000000000 Binary files a/doc/salome/gui/GEOM/pics/box2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/boxes.png b/doc/salome/gui/GEOM/pics/boxes.png deleted file mode 100755 index f2fad497e..000000000 Binary files a/doc/salome/gui/GEOM/pics/boxes.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/chamfer1.png b/doc/salome/gui/GEOM/pics/chamfer1.png deleted file mode 100755 index fdbe02fbd..000000000 Binary files a/doc/salome/gui/GEOM/pics/chamfer1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/chamfer2.png b/doc/salome/gui/GEOM/pics/chamfer2.png deleted file mode 100755 index 24d6e124e..000000000 Binary files a/doc/salome/gui/GEOM/pics/chamfer2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/chamfer3.png b/doc/salome/gui/GEOM/pics/chamfer3.png deleted file mode 100755 index 801f8db2f..000000000 Binary files a/doc/salome/gui/GEOM/pics/chamfer3.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/chamfer4.png b/doc/salome/gui/GEOM/pics/chamfer4.png deleted file mode 100755 index 14476b447..000000000 Binary files a/doc/salome/gui/GEOM/pics/chamfer4.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/chamfer_all.png b/doc/salome/gui/GEOM/pics/chamfer_all.png deleted file mode 100755 index c398cb0c5..000000000 Binary files a/doc/salome/gui/GEOM/pics/chamfer_all.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/chamfer_edge.png b/doc/salome/gui/GEOM/pics/chamfer_edge.png deleted file mode 100755 index 8ed8fc005..000000000 Binary files a/doc/salome/gui/GEOM/pics/chamfer_edge.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/chamfer_faces.png b/doc/salome/gui/GEOM/pics/chamfer_faces.png deleted file mode 100755 index 961cf0386..000000000 Binary files a/doc/salome/gui/GEOM/pics/chamfer_faces.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/changeorientation.png b/doc/salome/gui/GEOM/pics/changeorientation.png deleted file mode 100755 index 95322ed69..000000000 Binary files a/doc/salome/gui/GEOM/pics/changeorientation.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/circle1.png b/doc/salome/gui/GEOM/pics/circle1.png deleted file mode 100755 index 840a25973..000000000 Binary files a/doc/salome/gui/GEOM/pics/circle1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/circle2.png b/doc/salome/gui/GEOM/pics/circle2.png deleted file mode 100755 index 7500eaf2c..000000000 Binary files a/doc/salome/gui/GEOM/pics/circle2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/circle3.png b/doc/salome/gui/GEOM/pics/circle3.png deleted file mode 100755 index 39aa5b1ba..000000000 Binary files a/doc/salome/gui/GEOM/pics/circle3.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/circles.png b/doc/salome/gui/GEOM/pics/circles.png deleted file mode 100755 index dc367ce8b..000000000 Binary files a/doc/salome/gui/GEOM/pics/circles.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/colorsn.png b/doc/salome/gui/GEOM/pics/colorsn.png deleted file mode 100755 index f0c440147..000000000 Binary files a/doc/salome/gui/GEOM/pics/colorsn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/commonsn.png b/doc/salome/gui/GEOM/pics/commonsn.png deleted file mode 100755 index e5c0c4131..000000000 Binary files a/doc/salome/gui/GEOM/pics/commonsn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/compoundsn.png b/doc/salome/gui/GEOM/pics/compoundsn.png deleted file mode 100755 index 33e1012ed..000000000 Binary files a/doc/salome/gui/GEOM/pics/compoundsn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/cone1.png b/doc/salome/gui/GEOM/pics/cone1.png deleted file mode 100755 index f5a95922a..000000000 Binary files a/doc/salome/gui/GEOM/pics/cone1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/cone2.png b/doc/salome/gui/GEOM/pics/cone2.png deleted file mode 100755 index 1b0582140..000000000 Binary files a/doc/salome/gui/GEOM/pics/cone2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/cones.png b/doc/salome/gui/GEOM/pics/cones.png deleted file mode 100755 index 4c8108ce1..000000000 Binary files a/doc/salome/gui/GEOM/pics/cones.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/curve.png b/doc/salome/gui/GEOM/pics/curve.png deleted file mode 100755 index a9541de0a..000000000 Binary files a/doc/salome/gui/GEOM/pics/curve.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/cutsn.png b/doc/salome/gui/GEOM/pics/cutsn.png deleted file mode 100755 index eda9bb712..000000000 Binary files a/doc/salome/gui/GEOM/pics/cutsn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/cylinder1.png b/doc/salome/gui/GEOM/pics/cylinder1.png deleted file mode 100755 index 71b619df8..000000000 Binary files a/doc/salome/gui/GEOM/pics/cylinder1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/cylinder2.png b/doc/salome/gui/GEOM/pics/cylinder2.png deleted file mode 100755 index ee6ed12e6..000000000 Binary files a/doc/salome/gui/GEOM/pics/cylinder2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/cylinders.png b/doc/salome/gui/GEOM/pics/cylinders.png deleted file mode 100755 index fc0d43276..000000000 Binary files a/doc/salome/gui/GEOM/pics/cylinders.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/dialog.png b/doc/salome/gui/GEOM/pics/dialog.png deleted file mode 100755 index 63f984b75..000000000 Binary files a/doc/salome/gui/GEOM/pics/dialog.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/disp_mode1sn.png b/doc/salome/gui/GEOM/pics/disp_mode1sn.png deleted file mode 100755 index b5b7e8ff2..000000000 Binary files a/doc/salome/gui/GEOM/pics/disp_mode1sn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/disp_mode2sn.png b/doc/salome/gui/GEOM/pics/disp_mode2sn.png deleted file mode 100755 index 362232739..000000000 Binary files a/doc/salome/gui/GEOM/pics/disp_mode2sn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/distance.png b/doc/salome/gui/GEOM/pics/distance.png deleted file mode 100755 index 141ec8e5a..000000000 Binary files a/doc/salome/gui/GEOM/pics/distance.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/edgesn.png b/doc/salome/gui/GEOM/pics/edgesn.png deleted file mode 100755 index 9de8df9ef..000000000 Binary files a/doc/salome/gui/GEOM/pics/edgesn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/editgroup.png b/doc/salome/gui/GEOM/pics/editgroup.png deleted file mode 100755 index db3e23575..000000000 Binary files a/doc/salome/gui/GEOM/pics/editgroup.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/ellipse.png b/doc/salome/gui/GEOM/pics/ellipse.png deleted file mode 100755 index 0888b5021..000000000 Binary files a/doc/salome/gui/GEOM/pics/ellipse.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/ellipsesn.png b/doc/salome/gui/GEOM/pics/ellipsesn.png deleted file mode 100755 index 1c421541d..000000000 Binary files a/doc/salome/gui/GEOM/pics/ellipsesn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/extrusion1.png b/doc/salome/gui/GEOM/pics/extrusion1.png deleted file mode 100755 index 673e86325..000000000 Binary files a/doc/salome/gui/GEOM/pics/extrusion1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/extrusion2.png b/doc/salome/gui/GEOM/pics/extrusion2.png deleted file mode 100755 index b56dc5d49..000000000 Binary files a/doc/salome/gui/GEOM/pics/extrusion2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/facesn1.png b/doc/salome/gui/GEOM/pics/facesn1.png deleted file mode 100755 index c78703a11..000000000 Binary files a/doc/salome/gui/GEOM/pics/facesn1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/facesn2.png b/doc/salome/gui/GEOM/pics/facesn2.png deleted file mode 100755 index 59403a08c..000000000 Binary files a/doc/salome/gui/GEOM/pics/facesn2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/facesn3.png b/doc/salome/gui/GEOM/pics/facesn3.png deleted file mode 100755 index 7c95d1156..000000000 Binary files a/doc/salome/gui/GEOM/pics/facesn3.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/fillet1.png b/doc/salome/gui/GEOM/pics/fillet1.png deleted file mode 100755 index 7fd3db53f..000000000 Binary files a/doc/salome/gui/GEOM/pics/fillet1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/fillet2.png b/doc/salome/gui/GEOM/pics/fillet2.png deleted file mode 100755 index 2eab8754b..000000000 Binary files a/doc/salome/gui/GEOM/pics/fillet2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/fillet3.png b/doc/salome/gui/GEOM/pics/fillet3.png deleted file mode 100755 index 6e46e05dd..000000000 Binary files a/doc/salome/gui/GEOM/pics/fillet3.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/fillet_all.png b/doc/salome/gui/GEOM/pics/fillet_all.png deleted file mode 100755 index c1650b907..000000000 Binary files a/doc/salome/gui/GEOM/pics/fillet_all.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/fillet_edge.png b/doc/salome/gui/GEOM/pics/fillet_edge.png deleted file mode 100755 index 9572abb79..000000000 Binary files a/doc/salome/gui/GEOM/pics/fillet_edge.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/fillet_prism.png b/doc/salome/gui/GEOM/pics/fillet_prism.png deleted file mode 100755 index 3a44a07e6..000000000 Binary files a/doc/salome/gui/GEOM/pics/fillet_prism.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/filling.png b/doc/salome/gui/GEOM/pics/filling.png deleted file mode 100755 index 418c22431..000000000 Binary files a/doc/salome/gui/GEOM/pics/filling.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/filling_compoundsn.png b/doc/salome/gui/GEOM/pics/filling_compoundsn.png deleted file mode 100755 index 9d3846b2b..000000000 Binary files a/doc/salome/gui/GEOM/pics/filling_compoundsn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/fillingsn.png b/doc/salome/gui/GEOM/pics/fillingsn.png deleted file mode 100755 index 2446e89d5..000000000 Binary files a/doc/salome/gui/GEOM/pics/fillingsn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/free_boudaries1.png b/doc/salome/gui/GEOM/pics/free_boudaries1.png deleted file mode 100755 index 20c29f965..000000000 Binary files a/doc/salome/gui/GEOM/pics/free_boudaries1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/free_boudaries2.png b/doc/salome/gui/GEOM/pics/free_boudaries2.png deleted file mode 100755 index 1523fe911..000000000 Binary files a/doc/salome/gui/GEOM/pics/free_boudaries2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/free_faces1.png b/doc/salome/gui/GEOM/pics/free_faces1.png deleted file mode 100755 index 530d8440b..000000000 Binary files a/doc/salome/gui/GEOM/pics/free_faces1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/free_faces2.png b/doc/salome/gui/GEOM/pics/free_faces2.png deleted file mode 100755 index 7526bd17c..000000000 Binary files a/doc/salome/gui/GEOM/pics/free_faces2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/fusesn1.png b/doc/salome/gui/GEOM/pics/fusesn1.png deleted file mode 100755 index e0118cbd2..000000000 Binary files a/doc/salome/gui/GEOM/pics/fusesn1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/fusesn2.png b/doc/salome/gui/GEOM/pics/fusesn2.png deleted file mode 100755 index f8a2b0108..000000000 Binary files a/doc/salome/gui/GEOM/pics/fusesn2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/geomcreategroup.png b/doc/salome/gui/GEOM/pics/geomcreategroup.png deleted file mode 100755 index f51ab22fd..000000000 Binary files a/doc/salome/gui/GEOM/pics/geomcreategroup.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/geomexport.png b/doc/salome/gui/GEOM/pics/geomexport.png deleted file mode 100755 index c37713941..000000000 Binary files a/doc/salome/gui/GEOM/pics/geomexport.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/geomimport.png b/doc/salome/gui/GEOM/pics/geomimport.png deleted file mode 100755 index 516a819bd..000000000 Binary files a/doc/salome/gui/GEOM/pics/geomimport.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/glue_faces1.png b/doc/salome/gui/GEOM/pics/glue_faces1.png deleted file mode 100755 index 787c9b0d6..000000000 Binary files a/doc/salome/gui/GEOM/pics/glue_faces1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/glue_faces2.png b/doc/salome/gui/GEOM/pics/glue_faces2.png deleted file mode 100755 index d33661367..000000000 Binary files a/doc/salome/gui/GEOM/pics/glue_faces2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/interpol.png b/doc/salome/gui/GEOM/pics/interpol.png deleted file mode 100755 index ac77ddfa3..000000000 Binary files a/doc/salome/gui/GEOM/pics/interpol.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/isos_u12_v12sn.png b/doc/salome/gui/GEOM/pics/isos_u12_v12sn.png deleted file mode 100755 index 10a13ce4b..000000000 Binary files a/doc/salome/gui/GEOM/pics/isos_u12_v12sn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/line.png b/doc/salome/gui/GEOM/pics/line.png deleted file mode 100755 index 3c931a1e9..000000000 Binary files a/doc/salome/gui/GEOM/pics/line.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/lines.png b/doc/salome/gui/GEOM/pics/lines.png deleted file mode 100755 index de12c1122..000000000 Binary files a/doc/salome/gui/GEOM/pics/lines.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/measures1.png b/doc/salome/gui/GEOM/pics/measures1.png deleted file mode 100755 index 6d5d698b4..000000000 Binary files a/doc/salome/gui/GEOM/pics/measures1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/measures10.png b/doc/salome/gui/GEOM/pics/measures10.png deleted file mode 100755 index 33023cc49..000000000 Binary files a/doc/salome/gui/GEOM/pics/measures10.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/measures3.png b/doc/salome/gui/GEOM/pics/measures3.png deleted file mode 100755 index 9a55aad4a..000000000 Binary files a/doc/salome/gui/GEOM/pics/measures3.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/measures4.png b/doc/salome/gui/GEOM/pics/measures4.png deleted file mode 100755 index ea243e888..000000000 Binary files a/doc/salome/gui/GEOM/pics/measures4.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/measures5.png b/doc/salome/gui/GEOM/pics/measures5.png deleted file mode 100755 index a323426e6..000000000 Binary files a/doc/salome/gui/GEOM/pics/measures5.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/measures8.png b/doc/salome/gui/GEOM/pics/measures8.png deleted file mode 100755 index 94bed3271..000000000 Binary files a/doc/salome/gui/GEOM/pics/measures8.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/measures9.png b/doc/salome/gui/GEOM/pics/measures9.png deleted file mode 100755 index 7d42d2935..000000000 Binary files a/doc/salome/gui/GEOM/pics/measures9.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/mirror_axissn1.png b/doc/salome/gui/GEOM/pics/mirror_axissn1.png deleted file mode 100755 index 86be83e7a..000000000 Binary files a/doc/salome/gui/GEOM/pics/mirror_axissn1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/mirror_axissn2.png b/doc/salome/gui/GEOM/pics/mirror_axissn2.png deleted file mode 100755 index 6009fa7cf..000000000 Binary files a/doc/salome/gui/GEOM/pics/mirror_axissn2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/mirror_planesn1.png b/doc/salome/gui/GEOM/pics/mirror_planesn1.png deleted file mode 100755 index 969f0e0f4..000000000 Binary files a/doc/salome/gui/GEOM/pics/mirror_planesn1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/mirror_planesn2.png b/doc/salome/gui/GEOM/pics/mirror_planesn2.png deleted file mode 100755 index e9eb4966d..000000000 Binary files a/doc/salome/gui/GEOM/pics/mirror_planesn2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/mirror_pointsn1.png b/doc/salome/gui/GEOM/pics/mirror_pointsn1.png deleted file mode 100755 index 675b0bff1..000000000 Binary files a/doc/salome/gui/GEOM/pics/mirror_pointsn1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/mirror_pointsn2.png b/doc/salome/gui/GEOM/pics/mirror_pointsn2.png deleted file mode 100755 index ab6235906..000000000 Binary files a/doc/salome/gui/GEOM/pics/mirror_pointsn2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/mtrans1.png b/doc/salome/gui/GEOM/pics/mtrans1.png deleted file mode 100755 index 7dfe730c3..000000000 Binary files a/doc/salome/gui/GEOM/pics/mtrans1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/mtrans2.png b/doc/salome/gui/GEOM/pics/mtrans2.png deleted file mode 100755 index 62b35bb0c..000000000 Binary files a/doc/salome/gui/GEOM/pics/mtrans2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/mtransf1.png b/doc/salome/gui/GEOM/pics/mtransf1.png deleted file mode 100755 index 207e920f9..000000000 Binary files a/doc/salome/gui/GEOM/pics/mtransf1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/mtransf2.png b/doc/salome/gui/GEOM/pics/mtransf2.png deleted file mode 100755 index 3435f0f8c..000000000 Binary files a/doc/salome/gui/GEOM/pics/mtransf2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/mtransf3.png b/doc/salome/gui/GEOM/pics/mtransf3.png deleted file mode 100755 index 628d8b0a6..000000000 Binary files a/doc/salome/gui/GEOM/pics/mtransf3.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/mtransf4.png b/doc/salome/gui/GEOM/pics/mtransf4.png deleted file mode 100755 index cbe904444..000000000 Binary files a/doc/salome/gui/GEOM/pics/mtransf4.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/multi_rotation1d1.png b/doc/salome/gui/GEOM/pics/multi_rotation1d1.png deleted file mode 100755 index 4085f434b..000000000 Binary files a/doc/salome/gui/GEOM/pics/multi_rotation1d1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/multi_rotation1d2.png b/doc/salome/gui/GEOM/pics/multi_rotation1d2.png deleted file mode 100755 index 8089092a8..000000000 Binary files a/doc/salome/gui/GEOM/pics/multi_rotation1d2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/multi_rotation2d1.png b/doc/salome/gui/GEOM/pics/multi_rotation2d1.png deleted file mode 100755 index 1bdd25302..000000000 Binary files a/doc/salome/gui/GEOM/pics/multi_rotation2d1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/multi_rotation2d2.png b/doc/salome/gui/GEOM/pics/multi_rotation2d2.png deleted file mode 100755 index aa61ca606..000000000 Binary files a/doc/salome/gui/GEOM/pics/multi_rotation2d2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/multi_transformationsn1d.png b/doc/salome/gui/GEOM/pics/multi_transformationsn1d.png deleted file mode 100755 index dfcc440ae..000000000 Binary files a/doc/salome/gui/GEOM/pics/multi_transformationsn1d.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/multi_transformationsn2d.png b/doc/salome/gui/GEOM/pics/multi_transformationsn2d.png deleted file mode 100755 index f0fc1279c..000000000 Binary files a/doc/salome/gui/GEOM/pics/multi_transformationsn2d.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/multi_translation1dsn.png b/doc/salome/gui/GEOM/pics/multi_translation1dsn.png deleted file mode 100755 index 436a8169a..000000000 Binary files a/doc/salome/gui/GEOM/pics/multi_translation1dsn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/multi_translation2dsn.png b/doc/salome/gui/GEOM/pics/multi_translation2dsn.png deleted file mode 100755 index f44c8520e..000000000 Binary files a/doc/salome/gui/GEOM/pics/multi_translation2dsn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/multi_translation_initialsn.png b/doc/salome/gui/GEOM/pics/multi_translation_initialsn.png deleted file mode 100755 index 0b7b70afe..000000000 Binary files a/doc/salome/gui/GEOM/pics/multi_translation_initialsn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-basicprop.png b/doc/salome/gui/GEOM/pics/neo-basicprop.png deleted file mode 100755 index 2a9d7ca2a..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-basicprop.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-detect2.png b/doc/salome/gui/GEOM/pics/neo-detect2.png deleted file mode 100755 index f0dabe311..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-detect2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-isos.png b/doc/salome/gui/GEOM/pics/neo-isos.png deleted file mode 100755 index dbbcf8ef5..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-isos.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-localcs1.png b/doc/salome/gui/GEOM/pics/neo-localcs1.png deleted file mode 100755 index 9bdacafa2..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-localcs1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-localcs2.png b/doc/salome/gui/GEOM/pics/neo-localcs2.png deleted file mode 100755 index 3fc54a67c..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-localcs2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-localcs3.png b/doc/salome/gui/GEOM/pics/neo-localcs3.png deleted file mode 100755 index 01c8e24fa..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-localcs3.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-materials.png b/doc/salome/gui/GEOM/pics/neo-materials.png deleted file mode 100755 index 66917490c..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-materials.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-mrot1.png b/doc/salome/gui/GEOM/pics/neo-mrot1.png deleted file mode 100755 index 6cf2ab91b..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-mrot1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-mrot2.png b/doc/salome/gui/GEOM/pics/neo-mrot2.png deleted file mode 100755 index e2f37e052..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-mrot2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-obj1.png b/doc/salome/gui/GEOM/pics/neo-obj1.png deleted file mode 100755 index 88a7a8b8a..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-obj1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-obj2.png b/doc/salome/gui/GEOM/pics/neo-obj2.png deleted file mode 100755 index c940eaa38..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-obj2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-obj3.png b/doc/salome/gui/GEOM/pics/neo-obj3.png deleted file mode 100755 index d773938e2..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-obj3.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-obj4.png b/doc/salome/gui/GEOM/pics/neo-obj4.png deleted file mode 100755 index db5d49715..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-obj4.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-obj5.png b/doc/salome/gui/GEOM/pics/neo-obj5.png deleted file mode 100755 index e1579f082..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-obj5.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-obj6.png b/doc/salome/gui/GEOM/pics/neo-obj6.png deleted file mode 100755 index b6b3be440..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-obj6.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-obj7.png b/doc/salome/gui/GEOM/pics/neo-obj7.png deleted file mode 100755 index 15dfa2376..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-obj7.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-point2.png b/doc/salome/gui/GEOM/pics/neo-point2.png deleted file mode 100755 index 3bc59b860..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-point2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-scetcher1.png b/doc/salome/gui/GEOM/pics/neo-scetcher1.png deleted file mode 100755 index 7130e8b08..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-scetcher1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-scetcher2.png b/doc/salome/gui/GEOM/pics/neo-scetcher2.png deleted file mode 100755 index 330e1e3a3..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-scetcher2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-section.png b/doc/salome/gui/GEOM/pics/neo-section.png deleted file mode 100755 index 0d58ad244..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-section.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/neo-transparency.png b/doc/salome/gui/GEOM/pics/neo-transparency.png deleted file mode 100755 index ec1fb7f70..000000000 Binary files a/doc/salome/gui/GEOM/pics/neo-transparency.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/new-tolerance.png b/doc/salome/gui/GEOM/pics/new-tolerance.png deleted file mode 100755 index 796115ba9..000000000 Binary files a/doc/salome/gui/GEOM/pics/new-tolerance.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/normaletoface.png b/doc/salome/gui/GEOM/pics/normaletoface.png deleted file mode 100755 index 51bc43a8f..000000000 Binary files a/doc/salome/gui/GEOM/pics/normaletoface.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/offsetsn.png b/doc/salome/gui/GEOM/pics/offsetsn.png deleted file mode 100755 index 6404310e0..000000000 Binary files a/doc/salome/gui/GEOM/pics/offsetsn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/partition1.png b/doc/salome/gui/GEOM/pics/partition1.png deleted file mode 100755 index 20b22d296..000000000 Binary files a/doc/salome/gui/GEOM/pics/partition1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/partition2.png b/doc/salome/gui/GEOM/pics/partition2.png deleted file mode 100755 index a67ec9d8b..000000000 Binary files a/doc/salome/gui/GEOM/pics/partition2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/partitionsn1.png b/doc/salome/gui/GEOM/pics/partitionsn1.png deleted file mode 100755 index fa8404de4..000000000 Binary files a/doc/salome/gui/GEOM/pics/partitionsn1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/partitionsn2.png b/doc/salome/gui/GEOM/pics/partitionsn2.png deleted file mode 100755 index b7480a4fa..000000000 Binary files a/doc/salome/gui/GEOM/pics/partitionsn2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/pipe.png b/doc/salome/gui/GEOM/pics/pipe.png deleted file mode 100755 index e773731d2..000000000 Binary files a/doc/salome/gui/GEOM/pics/pipe.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/pipe_wire_edgesn.png b/doc/salome/gui/GEOM/pics/pipe_wire_edgesn.png deleted file mode 100755 index 4424b6bf1..000000000 Binary files a/doc/salome/gui/GEOM/pics/pipe_wire_edgesn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/pipesn.png b/doc/salome/gui/GEOM/pics/pipesn.png deleted file mode 100755 index 11ac1096b..000000000 Binary files a/doc/salome/gui/GEOM/pics/pipesn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/plane1.png b/doc/salome/gui/GEOM/pics/plane1.png deleted file mode 100755 index 47a9b8bcd..000000000 Binary files a/doc/salome/gui/GEOM/pics/plane1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/plane2.png b/doc/salome/gui/GEOM/pics/plane2.png deleted file mode 100755 index f4b880b44..000000000 Binary files a/doc/salome/gui/GEOM/pics/plane2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/plane3.png b/doc/salome/gui/GEOM/pics/plane3.png deleted file mode 100755 index 1727e3bb0..000000000 Binary files a/doc/salome/gui/GEOM/pics/plane3.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/plane_on_face.png b/doc/salome/gui/GEOM/pics/plane_on_face.png deleted file mode 100755 index 5df8823cd..000000000 Binary files a/doc/salome/gui/GEOM/pics/plane_on_face.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/planes1.png b/doc/salome/gui/GEOM/pics/planes1.png deleted file mode 100755 index c9a594cee..000000000 Binary files a/doc/salome/gui/GEOM/pics/planes1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/point1.png b/doc/salome/gui/GEOM/pics/point1.png deleted file mode 100755 index 39bca25f4..000000000 Binary files a/doc/salome/gui/GEOM/pics/point1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/point3.png b/doc/salome/gui/GEOM/pics/point3.png deleted file mode 100755 index 0a2e325c6..000000000 Binary files a/doc/salome/gui/GEOM/pics/point3.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/points.png b/doc/salome/gui/GEOM/pics/points.png deleted file mode 100755 index 547b277fd..000000000 Binary files a/doc/salome/gui/GEOM/pics/points.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/polyline.png b/doc/salome/gui/GEOM/pics/polyline.png deleted file mode 100755 index bd259e120..000000000 Binary files a/doc/salome/gui/GEOM/pics/polyline.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/prisms_basessn.png b/doc/salome/gui/GEOM/pics/prisms_basessn.png deleted file mode 100755 index d6a070083..000000000 Binary files a/doc/salome/gui/GEOM/pics/prisms_basessn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/prismssn.png b/doc/salome/gui/GEOM/pics/prismssn.png deleted file mode 100755 index 80c9af357..000000000 Binary files a/doc/salome/gui/GEOM/pics/prismssn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/repair1.png b/doc/salome/gui/GEOM/pics/repair1.png deleted file mode 100755 index 2b47fa5a4..000000000 Binary files a/doc/salome/gui/GEOM/pics/repair1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/repair10.png b/doc/salome/gui/GEOM/pics/repair10.png deleted file mode 100755 index c3c77164a..000000000 Binary files a/doc/salome/gui/GEOM/pics/repair10.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/repair2.png b/doc/salome/gui/GEOM/pics/repair2.png deleted file mode 100755 index 488a6a4c9..000000000 Binary files a/doc/salome/gui/GEOM/pics/repair2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/repair3.png b/doc/salome/gui/GEOM/pics/repair3.png deleted file mode 100755 index 4c2a41f90..000000000 Binary files a/doc/salome/gui/GEOM/pics/repair3.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/repair4.png b/doc/salome/gui/GEOM/pics/repair4.png deleted file mode 100755 index 2af7cbabb..000000000 Binary files a/doc/salome/gui/GEOM/pics/repair4.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/repair5.png b/doc/salome/gui/GEOM/pics/repair5.png deleted file mode 100755 index b99fbcbaf..000000000 Binary files a/doc/salome/gui/GEOM/pics/repair5.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/repair6.png b/doc/salome/gui/GEOM/pics/repair6.png deleted file mode 100755 index 5123d1f84..000000000 Binary files a/doc/salome/gui/GEOM/pics/repair6.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/repair7.png b/doc/salome/gui/GEOM/pics/repair7.png deleted file mode 100755 index 2b553b9fd..000000000 Binary files a/doc/salome/gui/GEOM/pics/repair7.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/repair8.png b/doc/salome/gui/GEOM/pics/repair8.png deleted file mode 100755 index f0016836e..000000000 Binary files a/doc/salome/gui/GEOM/pics/repair8.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/repair9.png b/doc/salome/gui/GEOM/pics/repair9.png deleted file mode 100755 index 7f5d4f5c3..000000000 Binary files a/doc/salome/gui/GEOM/pics/repair9.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/revolution.png b/doc/salome/gui/GEOM/pics/revolution.png deleted file mode 100755 index c02c859b1..000000000 Binary files a/doc/salome/gui/GEOM/pics/revolution.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/revolutionsn.png b/doc/salome/gui/GEOM/pics/revolutionsn.png deleted file mode 100755 index 7242c6710..000000000 Binary files a/doc/salome/gui/GEOM/pics/revolutionsn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/rotationsn1.png b/doc/salome/gui/GEOM/pics/rotationsn1.png deleted file mode 100755 index 697dcdedf..000000000 Binary files a/doc/salome/gui/GEOM/pics/rotationsn1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/rotationsn2.png b/doc/salome/gui/GEOM/pics/rotationsn2.png deleted file mode 100755 index 741d00c90..000000000 Binary files a/doc/salome/gui/GEOM/pics/rotationsn2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/scale_transformsn1.png b/doc/salome/gui/GEOM/pics/scale_transformsn1.png deleted file mode 100755 index 5af390922..000000000 Binary files a/doc/salome/gui/GEOM/pics/scale_transformsn1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/scale_transformsn2.png b/doc/salome/gui/GEOM/pics/scale_transformsn2.png deleted file mode 100755 index fa76d4158..000000000 Binary files a/doc/salome/gui/GEOM/pics/scale_transformsn2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/sectionsn.png b/doc/salome/gui/GEOM/pics/sectionsn.png deleted file mode 100755 index 8e636ee91..000000000 Binary files a/doc/salome/gui/GEOM/pics/sectionsn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/shellsn.png b/doc/salome/gui/GEOM/pics/shellsn.png deleted file mode 100755 index c7f22f323..000000000 Binary files a/doc/salome/gui/GEOM/pics/shellsn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/solidsn.png b/doc/salome/gui/GEOM/pics/solidsn.png deleted file mode 100755 index 297fc068c..000000000 Binary files a/doc/salome/gui/GEOM/pics/solidsn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/sphere1.png b/doc/salome/gui/GEOM/pics/sphere1.png deleted file mode 100755 index 377f1c9ce..000000000 Binary files a/doc/salome/gui/GEOM/pics/sphere1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/sphere2.png b/doc/salome/gui/GEOM/pics/sphere2.png deleted file mode 100755 index dd2cadb1f..000000000 Binary files a/doc/salome/gui/GEOM/pics/sphere2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/spheres.png b/doc/salome/gui/GEOM/pics/spheres.png deleted file mode 100755 index 2b79050f0..000000000 Binary files a/doc/salome/gui/GEOM/pics/spheres.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/supp_int_wires1.png b/doc/salome/gui/GEOM/pics/supp_int_wires1.png deleted file mode 100755 index 5f760560e..000000000 Binary files a/doc/salome/gui/GEOM/pics/supp_int_wires1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/supp_int_wires2.png b/doc/salome/gui/GEOM/pics/supp_int_wires2.png deleted file mode 100755 index e6dc3142a..000000000 Binary files a/doc/salome/gui/GEOM/pics/supp_int_wires2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/suppress_faces1.png b/doc/salome/gui/GEOM/pics/suppress_faces1.png deleted file mode 100755 index 7534ebeee..000000000 Binary files a/doc/salome/gui/GEOM/pics/suppress_faces1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/suppress_faces2.png b/doc/salome/gui/GEOM/pics/suppress_faces2.png deleted file mode 100755 index d38a4add3..000000000 Binary files a/doc/salome/gui/GEOM/pics/suppress_faces2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/torus1.png b/doc/salome/gui/GEOM/pics/torus1.png deleted file mode 100755 index 28e18afa0..000000000 Binary files a/doc/salome/gui/GEOM/pics/torus1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/torus2.png b/doc/salome/gui/GEOM/pics/torus2.png deleted file mode 100755 index 8877f1c37..000000000 Binary files a/doc/salome/gui/GEOM/pics/torus2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/toruses.png b/doc/salome/gui/GEOM/pics/toruses.png deleted file mode 100755 index 721bae271..000000000 Binary files a/doc/salome/gui/GEOM/pics/toruses.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/transformation1.png b/doc/salome/gui/GEOM/pics/transformation1.png deleted file mode 100755 index 8dbf8fe11..000000000 Binary files a/doc/salome/gui/GEOM/pics/transformation1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/transformation10.png b/doc/salome/gui/GEOM/pics/transformation10.png deleted file mode 100755 index 0847a5e03..000000000 Binary files a/doc/salome/gui/GEOM/pics/transformation10.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/transformation11.png b/doc/salome/gui/GEOM/pics/transformation11.png deleted file mode 100755 index b78acec2e..000000000 Binary files a/doc/salome/gui/GEOM/pics/transformation11.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/transformation2.png b/doc/salome/gui/GEOM/pics/transformation2.png deleted file mode 100755 index 569752740..000000000 Binary files a/doc/salome/gui/GEOM/pics/transformation2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/transformation3.png b/doc/salome/gui/GEOM/pics/transformation3.png deleted file mode 100755 index 96a1f1e36..000000000 Binary files a/doc/salome/gui/GEOM/pics/transformation3.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/transformation4.png b/doc/salome/gui/GEOM/pics/transformation4.png deleted file mode 100755 index 323c3d0ae..000000000 Binary files a/doc/salome/gui/GEOM/pics/transformation4.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/transformation4a.png b/doc/salome/gui/GEOM/pics/transformation4a.png deleted file mode 100644 index 64d2d4149..000000000 Binary files a/doc/salome/gui/GEOM/pics/transformation4a.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/transformation5.png b/doc/salome/gui/GEOM/pics/transformation5.png deleted file mode 100755 index 8d1cf9254..000000000 Binary files a/doc/salome/gui/GEOM/pics/transformation5.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/transformation6.png b/doc/salome/gui/GEOM/pics/transformation6.png deleted file mode 100755 index 3e3828bd8..000000000 Binary files a/doc/salome/gui/GEOM/pics/transformation6.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/transformation7.png b/doc/salome/gui/GEOM/pics/transformation7.png deleted file mode 100755 index 03a16fe01..000000000 Binary files a/doc/salome/gui/GEOM/pics/transformation7.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/transformation8.png b/doc/salome/gui/GEOM/pics/transformation8.png deleted file mode 100755 index 77d030385..000000000 Binary files a/doc/salome/gui/GEOM/pics/transformation8.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/transformation9.png b/doc/salome/gui/GEOM/pics/transformation9.png deleted file mode 100755 index c7f6194d3..000000000 Binary files a/doc/salome/gui/GEOM/pics/transformation9.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/translationsn1.png b/doc/salome/gui/GEOM/pics/translationsn1.png deleted file mode 100755 index 42e008cb3..000000000 Binary files a/doc/salome/gui/GEOM/pics/translationsn1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/translationsn2.png b/doc/salome/gui/GEOM/pics/translationsn2.png deleted file mode 100755 index 01d695937..000000000 Binary files a/doc/salome/gui/GEOM/pics/translationsn2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/transparencysn.png b/doc/salome/gui/GEOM/pics/transparencysn.png deleted file mode 100755 index 0b3638ed1..000000000 Binary files a/doc/salome/gui/GEOM/pics/transparencysn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/vector1.png b/doc/salome/gui/GEOM/pics/vector1.png deleted file mode 100755 index 46e3b20f3..000000000 Binary files a/doc/salome/gui/GEOM/pics/vector1.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/vector2.png b/doc/salome/gui/GEOM/pics/vector2.png deleted file mode 100755 index bb5c64c56..000000000 Binary files a/doc/salome/gui/GEOM/pics/vector2.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/vectors.png b/doc/salome/gui/GEOM/pics/vectors.png deleted file mode 100755 index bb8e7c5ab..000000000 Binary files a/doc/salome/gui/GEOM/pics/vectors.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/wiresn.png b/doc/salome/gui/GEOM/pics/wiresn.png deleted file mode 100755 index 623ae3b58..000000000 Binary files a/doc/salome/gui/GEOM/pics/wiresn.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/workplane4.png b/doc/salome/gui/GEOM/pics/workplane4.png deleted file mode 100755 index 00835eb54..000000000 Binary files a/doc/salome/gui/GEOM/pics/workplane4.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/workplane5.png b/doc/salome/gui/GEOM/pics/workplane5.png deleted file mode 100755 index 925ac573b..000000000 Binary files a/doc/salome/gui/GEOM/pics/workplane5.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/pics/workplane6.png b/doc/salome/gui/GEOM/pics/workplane6.png deleted file mode 100755 index 1f65862f8..000000000 Binary files a/doc/salome/gui/GEOM/pics/workplane6.png and /dev/null differ diff --git a/doc/salome/gui/GEOM/whdata/whftdata.js b/doc/salome/gui/GEOM/whdata/whftdata.js deleted file mode 100755 index addf26223..000000000 --- a/doc/salome/gui/GEOM/whdata/whftdata.js +++ /dev/null @@ -1,25 +0,0 @@ -// WebHelp 5.10.001 -var gTEA = new Array(); -function aTE(sTopicTitle, sTopicURL) -{ - var len = gTEA.length; - gTEA[len] = new topicEntry(sTopicTitle, sTopicURL); -} - -function topicEntry(sTopicTitle, sTopicURL) -{ - this.sTopicTitle = sTopicTitle; - this.sTopicURL = sTopicURL; -} - -function window_OnLoad() -{ - if (parent && parent != this) { - if (parent.putFtsTData) - { - parent.putFtsTData(gTEA); - } - } -} - -window.onload = window_OnLoad; \ No newline at end of file diff --git a/doc/salome/gui/GEOM/whdata/whftdata0.htm b/doc/salome/gui/GEOM/whdata/whftdata0.htm deleted file mode 100755 index acfb3af6b..000000000 --- a/doc/salome/gui/GEOM/whdata/whftdata0.htm +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - diff --git a/doc/salome/gui/GEOM/whdata/whfts.htm b/doc/salome/gui/GEOM/whdata/whfts.htm deleted file mode 100755 index 292e30479..000000000 --- a/doc/salome/gui/GEOM/whdata/whfts.htm +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - diff --git a/doc/salome/gui/GEOM/whdata/whfts.js b/doc/salome/gui/GEOM/whdata/whfts.js deleted file mode 100755 index 54246f693..000000000 --- a/doc/salome/gui/GEOM/whdata/whfts.js +++ /dev/null @@ -1,40 +0,0 @@ -// WebHelp 5.10.001 -var gaFileMapping = new Array(); -var gaFileTopicMapping = new Array(); - -function fileMapping(sStartKey, sEndKey, sFileName) -{ - this.sStartKey = sStartKey; - this.sEndKey = sEndKey; - this.sFileName = sFileName; - this.aFtsKeys = null; -} - -function fileTopicMapping(nIdBegin, nIdEnd, sFileName) -{ - this.nBegin = nIdBegin; - this.nEnd = nIdEnd; - this.sFileName = sFileName; - this.aTopics = null; -} - - -function iWM(sStartKey, sEndKey, sFileName) -{ - gaFileMapping[gaFileMapping.length] = new fileMapping(sStartKey, sEndKey, sFileName); -} - -function window_OnLoad() -{ - if (parent && parent != this && parent.ftsReady) - { - parent.ftsReady(gaFileMapping, gaFileTopicMapping); - } -} - -function iTM(nIdBegin, nIdEnd, sFileName) -{ - gaFileTopicMapping[gaFileTopicMapping.length] = new fileTopicMapping(nIdBegin, nIdEnd, sFileName); -} - -window.onload = window_OnLoad; diff --git a/doc/salome/gui/GEOM/whdata/whfwdata.js b/doc/salome/gui/GEOM/whdata/whfwdata.js deleted file mode 100755 index 8340b59d5..000000000 --- a/doc/salome/gui/GEOM/whdata/whfwdata.js +++ /dev/null @@ -1,37 +0,0 @@ -// WebHelp 5.10.001 -var gWEA = new Array(); -function aWE() -{ - var len = gWEA.length; - gWEA[len] = new ftsEntry(aWE.arguments); -} - -function ftsEntry(fn_arguments) -{ - if (fn_arguments.length && fn_arguments.length >= 1) - { - this.sItemName = fn_arguments[0]; - this.aTopics = null; - var nLen = fn_arguments.length; - if (nLen > 1) - { - this.aTopics = new Array(); - for (var i = 0; i < nLen - 1; i ++ ) - { - this.aTopics[i] = fn_arguments[i + 1]; - } - } - } -} - -function window_OnLoad() -{ - if (parent && parent != this) { - if (parent.putFtsWData) - { - parent.putFtsWData(gWEA); - } - } -} - -window.onload = window_OnLoad; \ No newline at end of file diff --git a/doc/salome/gui/GEOM/whdata/whfwdata0.htm b/doc/salome/gui/GEOM/whdata/whfwdata0.htm deleted file mode 100755 index 290ddb8d8..000000000 --- a/doc/salome/gui/GEOM/whdata/whfwdata0.htm +++ /dev/null @@ -1,1379 +0,0 @@ - - - - - - - - - - - diff --git a/doc/salome/gui/GEOM/whdata/whgdata.js b/doc/salome/gui/GEOM/whdata/whgdata.js deleted file mode 100755 index e38a107b5..000000000 --- a/doc/salome/gui/GEOM/whdata/whgdata.js +++ /dev/null @@ -1,26 +0,0 @@ -// WebHelp 5.10.001 -var gIEA = new Array(); -function aGE(sName, sDef) -{ - var len = gIEA.length; - gIEA[len] = new gloEntry(sName, sDef); -} - -function gloEntry(sName, sDef) -{ - this.sName = sName; - this.sDef = sDef; - this.nNKOff = 0; -} - -function window_OnLoad() -{ - if (parent && parent != this) { - if (parent.putData) - { - parent.putData(gIEA); - } - } -} - -window.onload = window_OnLoad; \ No newline at end of file diff --git a/doc/salome/gui/GEOM/whdata/whgdata0.htm b/doc/salome/gui/GEOM/whdata/whgdata0.htm deleted file mode 100755 index 3865725f4..000000000 --- a/doc/salome/gui/GEOM/whdata/whgdata0.htm +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - diff --git a/doc/salome/gui/GEOM/whdata/whglo.htm b/doc/salome/gui/GEOM/whdata/whglo.htm deleted file mode 100755 index 9d7ac79f1..000000000 --- a/doc/salome/gui/GEOM/whdata/whglo.htm +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/doc/salome/gui/GEOM/whdata/whglo.js b/doc/salome/gui/GEOM/whdata/whglo.js deleted file mode 100755 index c34fb24b2..000000000 --- a/doc/salome/gui/GEOM/whdata/whglo.js +++ /dev/null @@ -1,34 +0,0 @@ -// WebHelp 5.10.001 -var gaFileMapping = new Array(); -function fileMapping(sBK, sEK, sFileName, nNum) -{ - this.sBK = sBK; - this.sEK = sEK; - this.sFileName = sFileName; - this.aKs = null; - this.nNum = nNum; - this.oUsedItems = null; -} - - -function iFM(sBK, sEK, sFileName, nNum) -{ - var i = gaFileMapping.length; - gaFileMapping[i] = new fileMapping(sBK, sEK, sFileName, nNum); - if (i == 0) { - gaFileMapping[i].nTotal = nNum; - } - else { - gaFileMapping[i].nTotal = nNum + gaFileMapping[i - 1].nTotal; - } -} - -function window_OnLoad() -{ - if (parent && parent != this && parent.projReady) - { - parent.projReady(gaFileMapping); - } -} - -window.onload = window_OnLoad; diff --git a/doc/salome/gui/GEOM/whdata/whidata.js b/doc/salome/gui/GEOM/whdata/whidata.js deleted file mode 100755 index a92184730..000000000 --- a/doc/salome/gui/GEOM/whdata/whidata.js +++ /dev/null @@ -1,89 +0,0 @@ -// WebHelp 5.10.001 -// const strings -var gIEA = new Array(); -function aIE() -{ - var len = gIEA.length; - gIEA[len] = new indexEntry(aIE.arguments); -} - -function topic(sName, sURL) -{ - this.sName = sName; - this.sURL = sURL; -} - -function indexEntry(fn_arguments) -{ - if (fn_arguments.length && fn_arguments.length >= 3) - { - this.nType = fn_arguments[0]; - this.nPKOff = 0; - this.nNKOff = fn_arguments[1]; - this.sName = fn_arguments[2]; - this.aTopics = null; - var nLen = fn_arguments.length; - if (Math.floor(nLen / 2) * 2 == nLen) - { - this.sTarget = fn_arguments[3]; - if (nLen > 5) - { - this.aTopics = new Array(); - for (var i = 0; i < (nLen - 5)/2; i++) - { - this.aTopics[i] = new topic(fn_arguments[i * 2 + 4], fn_arguments[i * 2 + 5]); - } - } - - } - else - { - if (nLen > 4) - { - this.aTopics = new Array(); - for (var i = 0; i < (nLen - 4)/2; i++) - { - this.aTopics[i] = new topic(fn_arguments[i * 2 + 3], fn_arguments[i * 2 + 4]); - } - } - } - } -} - -function getIndexTopicMappingList(nItemIndex) -{ - var sTopics = ""; - if (gIEA.length > nItemIndex) - { - if (gIEA[nItemIndex].aTopics) - { - var i = 0; - var nLen = gIEA[nItemIndex].aTopics.length; - for (i = 0; i < nLen; i ++) - { - sTopics += "," + gIEA[nItemIndex].aTopics[i]; - } - } - } - return sTopics; -} - -function window_OnLoad() -{ - if (parent && parent != this) { - if (parent.putData) - { - for (var i = 0; i < gIEA.length; i ++ ) - { - if (gIEA[i].nNKOff != 0 && i + gIEA[i].nNKOff + 1 < gIEA.length) - { - - gIEA[i + gIEA[i].nNKOff + 1].nPKOff = gIEA[i].nNKOff; - } - } - parent.putData(gIEA); - } - } -} - -window.onload = window_OnLoad; \ No newline at end of file diff --git a/doc/salome/gui/GEOM/whdata/whidx.htm b/doc/salome/gui/GEOM/whdata/whidx.htm deleted file mode 100755 index a049a96f9..000000000 --- a/doc/salome/gui/GEOM/whdata/whidx.htm +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/doc/salome/gui/GEOM/whdata/whidx.js b/doc/salome/gui/GEOM/whdata/whidx.js deleted file mode 100755 index c34fb24b2..000000000 --- a/doc/salome/gui/GEOM/whdata/whidx.js +++ /dev/null @@ -1,34 +0,0 @@ -// WebHelp 5.10.001 -var gaFileMapping = new Array(); -function fileMapping(sBK, sEK, sFileName, nNum) -{ - this.sBK = sBK; - this.sEK = sEK; - this.sFileName = sFileName; - this.aKs = null; - this.nNum = nNum; - this.oUsedItems = null; -} - - -function iFM(sBK, sEK, sFileName, nNum) -{ - var i = gaFileMapping.length; - gaFileMapping[i] = new fileMapping(sBK, sEK, sFileName, nNum); - if (i == 0) { - gaFileMapping[i].nTotal = nNum; - } - else { - gaFileMapping[i].nTotal = nNum + gaFileMapping[i - 1].nTotal; - } -} - -function window_OnLoad() -{ - if (parent && parent != this && parent.projReady) - { - parent.projReady(gaFileMapping); - } -} - -window.onload = window_OnLoad; diff --git a/doc/salome/gui/GEOM/whdata/whtdata.js b/doc/salome/gui/GEOM/whdata/whtdata.js deleted file mode 100755 index 0558e198c..000000000 --- a/doc/salome/gui/GEOM/whdata/whtdata.js +++ /dev/null @@ -1,64 +0,0 @@ -// WebHelp 5.10.001 -var gTEA = new Array(); -function aTE() -{ - gTEA[gTEA.length] = new tocEntry(aTE.arguments); -} - -function tocEntry(fn_arguments) -{ - if (fn_arguments.length < 3) - { - alert ("data format wrong!!!"); - return; - } - - this.nType = fn_arguments[0]; - this.nContents = fn_arguments[1]; - this.sItemName = fn_arguments[2]; - - if (this.nType == 1 || this.nType == 2 || this.nType == 16) - { - if (fn_arguments.length > 3) - { - this.sItemURL = fn_arguments[3]; - if (fn_arguments.length > 4) - { - this.sTarget = fn_arguments[4]; - if (fn_arguments.length > 5) - this.sIconRef = fn_arguments[5]; - } - } - } - if (this.nType == 4 || this.nType == 8) - { - if (fn_arguments.length > 3) - { - this.sRefURL = fn_arguments[3]; - if (this.nType == 4) - { - if(this.sRefURL.lastIndexOf("/")!=this.sRefURL.length-1) - this.sRefURL+="/"; - } - if (fn_arguments.length > 4) - { - this.sItemURL = fn_arguments[4]; - if (fn_arguments.length > 5) - { - this.sTarget = fn_arguments[5]; - if (fn_arguments.length > 6) - this.sIconRef = fn_arguments[6]; - } - } - } - } -} - - -function window_OnLoad() -{ - if (parent && parent != this && parent.putData) { - parent.putData(gTEA); - } -} -window.onload = window_OnLoad; \ No newline at end of file diff --git a/doc/salome/gui/GEOM/whdata/whtdata0.htm b/doc/salome/gui/GEOM/whdata/whtdata0.htm deleted file mode 100755 index 159c80a3c..000000000 --- a/doc/salome/gui/GEOM/whdata/whtdata0.htm +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - diff --git a/doc/salome/gui/GEOM/whdata/whtoc.htm b/doc/salome/gui/GEOM/whdata/whtoc.htm deleted file mode 100755 index 459c3e311..000000000 --- a/doc/salome/gui/GEOM/whdata/whtoc.htm +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/doc/salome/gui/GEOM/whdata/whtoc.js b/doc/salome/gui/GEOM/whdata/whtoc.js deleted file mode 100755 index 62de5a132..000000000 --- a/doc/salome/gui/GEOM/whdata/whtoc.js +++ /dev/null @@ -1,31 +0,0 @@ -// WebHelp 5.10.001 -// const strings -var gaProj = new Array(); -var gsRoot = ""; - -function setRoot(sRoot) -{ - gsRoot = sRoot -} - -function aPE(sProjPath, sRootPath) -{ - gaProj[gaProj.length] = new tocProjEntry(sProjPath, sRootPath); -} - -function tocProjEntry(sProjPath, sRootPath) -{ - if(sProjPath.lastIndexOf("/")!=sProjPath.length-1) - sProjPath+="/"; - this.sPPath = sProjPath; - this.sRPath = sRootPath; -} - - -function window_OnLoad() -{ - if (parent && parent != this && parent.projReady) { - parent.projReady(gsRoot, gaProj); - } -} -window.onload = window_OnLoad; \ No newline at end of file diff --git a/doc/salome/gui/GEOM/whgdata/whexpbar.gif b/doc/salome/gui/GEOM/whgdata/whexpbar.gif deleted file mode 100755 index e677dc6f1..000000000 Binary files a/doc/salome/gui/GEOM/whgdata/whexpbar.gif and /dev/null differ diff --git a/doc/salome/gui/GEOM/whgdata/whlstf0.htm b/doc/salome/gui/GEOM/whgdata/whlstf0.htm deleted file mode 100755 index cda409010..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstf0.htm +++ /dev/null @@ -1,46 +0,0 @@ - - -Search Words List - - - - - - - -

    - - -100x30x100
    1d 1 2
    1e 1 2
    2d 1 2 3 4 5 6
    3d 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
    -

    -able 1 2
    absolute
    absolutely
    access
    accessed
    accessible 1 2 3 4 5 6
    accordance 1 2
    according
    add 1 2 3 4 5 6 7 8 9 10 11 12 13 14
    added 1 2
    adding 1 2
    addobject 1 2
    addtostudy 1 2 3 4 5 6 7 8 9 10 11 12 13
    addtostudyinfather 1 2
    advance 1 2 3
    advanced 1 2 3 4 5 6 7
    algorithm 1 2 3 4
    algorithms 1 2 3 4 5 6 7 8 9 10 11 12
    all_faces
    allow
    allows 1 2 3 4 5 6 7 8 9 10 11 12 13 14
    along 1 2 3 4 5 6 7 8
    alongside
    already
    although
    angle 1 2 3 4 5 6 7
    another 1 2 3 4 5 6
    any 1 2 3 4 5
    appear
    appeared
    append 1 2
    applicable
    applied 1 2
    apply 1 2 3
    applying 1 2
    approximation
    arc 1 2 3 4 5 6 7 8
    arc1
    arc2
    archimede 1 2
    arcs 1 2
    area 1 2
    argument 1 2 3
    arguments 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
    around 1 2 3
    automatically 1 2 3
    available 1 2 3 4 5 6 7 8 9 10
    axes 1 2 3 4
    axis 1 2 3 4 5 6 7 8 9 10 11 12
    -

    -b 1 2 3
    background
    base 1 2 3 4 5 6 7 8 9
    based
    baseshape
    basic 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
    basicproperties 1 2
    basing 1 2
    basis 1 2
    bb
    before 1 2 3
    beginning
    being
    belongs
    below
    besier
    bezier 1 2 3
    black
    block 1 2 3 4 5
    blocks 1 2 3 4 5 6 7 8 9 10
    bmp 1 2
    boolean 1 2 3 4 5 6 7 8 9
    both 1 2 3 4
    boudaries
    boundaries 1 2 3 4
    boundary 1 2 3
    bounded 1 2
    bounding 1 2
    boundingbox 1 2
    box 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
    box_tr1
    box_tr2
    box1 1 2 3
    box2 1 2 3
    box3
    boxes 1 2 3


    >> - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstf1.htm b/doc/salome/gui/GEOM/whgdata/whlstf1.htm deleted file mode 100755 index a8e27edb7..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstf1.htm +++ /dev/null @@ -1,43 +0,0 @@ - - -Search Words List - - - - - - - -

    <<

    -

    -brackets
    breaks
    brep 1 2 3 4
    browser 1 2 3 4
    bspline
    bsplinerestriction
    bsplines
    build 1 2 3 4 5 6 7 8 9
    building 1 2 3 4
    builds 1 2 3
    button 1 2 3 4 5 6
    buttons
    bypassing
    -

    -c 1 2 3
    c0
    c1
    c2
    cad 1 2
    camera
    cascade
    case 1 2 3
    cases
    catia
    center 1 2 3 4 5 6 7 8 9 10 11 12
    centerofscale
    centers
    central 1 2 3 4
    certain 1 2
    chain
    chamfer 1 2
    chamfer_all
    chamfer_e
    chamfer_f
    chamfer_f1
    change 1 2 3 4 5
    changes
    changing 1 2 3 4
    check 1 2 3 4 5 6 7
    check_box
    checkandimprove
    checkbox 1 2 3 4 5 6
    checkcompoundofblocks 1 2
    checked 1 2 3 4 5
    checking 1 2 3
    checks
    checkshape 1 2 3
    choices
    choose 1 2 3
    circle 1 2
    circle1
    circle2
    circles 1 2
    click 1 2 3 4 5
    clicking 1 2 3
    clipping
    clone
    close 1 2 3
    closecontour 1 2
    closed 1 2 3 4
    closedwires 1 2
    closes 1 2
    closure
    cm
    cn
    coincide
    coincident
    coincidental
    coincides
    collinear 1 2
    color 1 2 3 4
    command 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
    commands 1 2 3 4 5 6 7 8 9
    common 1 2 3 4 5 6
    complex 1 2 3 4 5 6 7 8
    components 1 2 3 4 5
    composed
    composing
    compound 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
    compsolid 1 2 3
    compsolids
    compute
    computed
    concerning
    conditions
    cone 1 2 3
    cone1
    cone2
    cones
    confirm 1 2
    conical
    connected 1 2 3 4 5
    connection
    consequently
    considered 1 2 3
    console
    constraints
    constructed 1 2
    construction 1 2 3 4 5 6
    contain
    contained
    containing
    contains 1 2
    contents 1 2 3
    continuities
    continuity
    continuity2d
    continuity3d
    continuous
    contour 1 2
    conversion
    converts
    coordinate 1 2 3 4 5 6 7 8 9 10
    coordinates 1 2 3 4 5 6 7 8 9 10 11 12 13 14
    coords
    copy 1 2 3 4
    corner
    corners 1 2
    correction
    corrects
    correspond 1 2
    corresponding 1 2
    correspondingly 1 2
    count
    coupled
    covering


    >> - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstf10.htm b/doc/salome/gui/GEOM/whgdata/whlstf10.htm deleted file mode 100755 index 537af78aa..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstf10.htm +++ /dev/null @@ -1,43 +0,0 @@ - - -Search Words List - - - - - - - -

    <<

    -

    -right 1 2 3 4
    rise
    rot1d
    rot2d
    rotate 1 2 3
    rotated 1 2 3
    rotates 1 2
    rotation 1 2 3 4 5
    ruling
    runtimeerror 1 2
    -

    -s 1 2 3 4 5 6 7 8 9 10 11
    s1 1 2 3
    s2 1 2 3
    salome 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
    same 1 2 3 4 5
    sameparameter
    satisfy
    save
    saved
    saves
    scale 1 2
    scaled
    scene
    scripts 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
    search
    second 1 2 3 4 5 6 7 8
    secondly 1 2 3 4 5 6 7 8 9 10 11 12 13
    section 1 2 3 4 5
    see 1 2 3
    seems
    segment
    segments 1 2
    select 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
    selected 1 2 3 4 5 6 7 8 9 10
    selecting 1 2 3
    selection 1 2 3 4
    sense
    separate
    serve
    serving 1 2 3
    set 1 2 3 4 5 6
    setcolor 1 2
    setdisplaymode 1 2 3 4 5 6 7 8 9 10 11 12 13
    setting 1 2 3
    settransparency 1 2 3 4 5
    sew
    sewed
    sewing 1 2
    sg 1 2 3 4
    shading 1 2
    shape 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
    shape1 1 2
    shape2 1 2
    shapelistcompound
    shapes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
    shapes_of_given_type
    shapetype 1 2 3 4 5 6
    shapetypeedge
    shapetypeface
    shared
    sharp
    shell 1 2 3 4 5 6 7 8
    shells 1 2 3 4 5 6 7
    shift 1 2 3
    shifted
    short 1 2
    shortcut
    should 1 2 3 4 5
    show 1 2
    shown
    shows


    >> - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstf11.htm b/doc/salome/gui/GEOM/whgdata/whlstf11.htm deleted file mode 100755 index e03381b30..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstf11.htm +++ /dev/null @@ -1,43 +0,0 @@ - - -Search Words List - - - - - - - -

    <<

    -

    -side
    signed
    similar
    simple 1 2 3
    simply
    single
    six 1 2
    size 1 2 3
    sketch
    sketcher 1 2 3
    sketcher1 1 2
    sketcher2 1 2
    sketcher3
    sketchers
    skip
    small 1 2
    so 1 2
    solid 1 2 3 4 5 6 7 8 9 10 11 12 13 14
    solid1
    solid2
    solids 1 2 3
    sorted
    sorts
    source
    space 1 2 3 4 5 6
    specific
    specified 1 2 3 4 5 6 7 8 9 10 11
    specify
    specifying
    sphere 1 2 3 4 5 6
    sphere1
    sphere2
    sphere3
    spheres
    spline 1 2
    split
    splitangle
    splitclosedfaces
    splitcontinuity
    splits 1 2
    splitting
    spots
    sqrt
    stage
    standard 1 2
    start 1 2 3 4
    started
    starting 1 2 3
    step 1 2 3 4 5
    step1
    step2
    still
    strictly
    string
    strips
    study 1 2 3 4 5 6 7 8 9 10 11
    sub 1 2 3 4 5
    sub_shape_id
    subfacelist
    submenu
    subshape 1 2
    subshapeall
    subshapeallids
    subshapeallsorted 1 2 3 4 5
    subshapeallsortedids
    subshapeid
    subshapes 1 2
    subshapesorted
    subtraction
    successfully
    sup_faces
    suppress 1 2 3 4
    suppresses
    suppressfaces 1 2
    suppressholes 1 2
    suppressinternalwires 1 2
    surface 1 2 3 4 5 6 7
    surfacecontinuity
    surfacemode
    surfaces
    symmetric
    symmetrical 1 2
    symmetry
    system 1 2 3 4 5 6 7
    systems 1 2
    -

    -t 1 2 3 4 5
    take
    tangent
    tangential
    tangents
    target 1 2
    technology
    tetrahedral
    textual 1 2
    th
    theendlcs
    them 1 2 3 4 5 6 7
    theobject
    therefore
    theshape 1 2
    thestartlcs
    thetolerance
    third
    three 1 2 3 4 5 6 7 8 9 10 11 12 13
    thus 1 2
    time 1 2
    times 1 2 3
    tobezier
    together
    tol2d 1 2
    tol3d 1 2
    toler
    tolerance 1 2 3 4 5 6 7
    tolerance2d
    tolerance3d 1 2
    tolerances
    tool
    toolbar
    tools 1 2
    top_face
    top_face_ind
    torus 1 2
    torus1
    torus2
    toruses
    tr1d
    tr2d
    transform 1 2
    transformate
    transformation 1 2 3 4 5 6 7 8 9 10 11 12 13 14
    transformations 1 2 3
    transformed 1 2
    transforms
    translate 1 2
    translated 1 2 3
    translates 1 2
    translation 1 2 3 4
    translation1
    translation2
    translation3
    translations 1 2 3
    transparency 1 2 3
    transparent 1 2
    triangles
    trihedron
    trimsize 1 2 3
    true 1 2 3 4 5
    truncated
    try


    >> - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstf12.htm b/doc/salome/gui/GEOM/whgdata/whlstf12.htm deleted file mode 100755 index 18c099123..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstf12.htm +++ /dev/null @@ -1,47 +0,0 @@ - - -Search Words List - - - - - - - -

    <<

    -

    -tt 1 2
    tui 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
    tuple
    two 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
    type 1 2 3 4 5 6 7 8
    types 1 2
    -

    -u
    underlying 1 2
    unionlist
    up 1 2
    update
    updateobjbrowser 1 2 3
    upper
    used 1 2
    useful 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
    user 1 2 3 4
    using 1 2 3 4 5 6 7 8 9 10 11 12 13
    -

    -v 1 2 3 4
    v1
    v2
    v3
    v4
    val
    valid 1 2 3
    validity
    value 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
    values 1 2 3 4 5 6 7 8 9 10 11 12 13 14
    variety
    various
    vector 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
    vector_arc 1 2
    vector1 1 2
    vector1_arc1
    vector1_arc2
    vector2 1 2
    vector2_arc1
    vector2_arc2
    vector3
    vectors 1 2 3 4 5 6 7
    versa
    vertex 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
    vertex_n
    vertex1
    vertex2
    vertexmaxtol
    vertexmintol
    vertices 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
    via 1 2 3 4 5 6 7 8 9
    vice
    view 1 2
    viewer 1 2 3 4 5 6 7 8 9 10 11 12 13 14
    viewing 1 2 3
    views
    visible
    visualize
    volume 1 2
    vr
    vrot1d
    vt
    vtr1d
    vtr2d
    vxy 1 2 3 4 5
    vxyz
    vz
    -

    -w_0


    >> - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstf13.htm b/doc/salome/gui/GEOM/whgdata/whlstf13.htm deleted file mode 100755 index 355c2d788..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstf13.htm +++ /dev/null @@ -1,46 +0,0 @@ - - -Search Words List - - - - - - - -

    <<

    -

    -wantplanarface
    water
    waterdensity 1 2
    way 1 2 3 4 5 6
    ways 1 2 3
    weight 1 2
    well
    wf
    what
    whatis 1 2
    whether
    while 1 2 3 4 5
    whose 1 2
    wide 1 2
    will 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
    wire 1 2 3 4 5 6 7 8 9 10 11 12 13 14
    wire_close
    wire_name
    wire1
    wire2
    wireframe 1 2
    wires 1 2 3 4 5 6 7 8 9 10 11 12
    wish 1 2 3
    within 1 2 3
    without
    work 1 2
    working 1 2 3 4 5
    workingplane
    works
    ww 1 2
    -

    -x 1 2 3 4 5 6 7 8 9
    x1
    x2
    xdx
    xdy
    xdz
    xmax 1 2
    xmin 1 2
    xoy
    xyz
    xz_face
    xz_face_ind
    -

    -y 1 2 3 4 5 6 7 8
    y1
    y2
    ydx
    ydy
    ydz
    ymax 1 2
    ymin 1 2
    your 1 2 3 4 5 6 7 8 9
    yourselves
    yz_face
    yz_face_ind
    -

    -z 1 2 3 4 5 6 7
    z1
    z2
    zero
    zmax 1 2
    zmin 1 2
    zoom


    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstf2.htm b/doc/salome/gui/GEOM/whgdata/whlstf2.htm deleted file mode 100755 index 66be35686..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstf2.htm +++ /dev/null @@ -1,43 +0,0 @@ - - -Search Words List - - - - - - - -

    <<

    -

    -create 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
    createanddisplaygo 1 2 3 4 5 6 7 8 9 10 11 12 13
    created 1 2 3 4 5 6 7 8 9
    creategroup 1 2
    creates 1 2 3 4 5 6 7 8 9 10
    creation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
    cross
    cs
    cs1
    cs2
    cube
    current 1 2
    currently 1 2 3 4
    curvature
    curve 1 2 3 4
    curve2dmode
    curve3dmode
    curvecontinuity
    curves 1 2 3 4 5
    curving
    cut 1 2 3 4
    cut_without_f_2
    cuts 1 2
    cutting
    cylinder 1 2 3 4 5 6
    cylinders
    cylindrical
    -

    -d 1 2 3
    d1 1 2
    d2 1 2
    data
    data_dir
    default 1 2 3 4 5
    define 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
    defined 1 2
    defines 1 2
    defining 1 2 3
    definite 1 2
    definition
    deflection
    degenerated
    degree 1 2
    degrees 1 2
    delete
    deleted
    density
    depending
    depends
    derivatives
    descr
    description 1 2 3 4 5
    designed
    destination
    destined 1 2
    detect 1 2
    detection
    detects
    developed
    dialog 1 2 3 4 5 6 7 8
    differencelist
    different 1 2
    dimension 1 2 3
    dimensions 1 2 3 4
    dir 1 2
    dir1
    dir2
    direction 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
    directions 1 2 3
    directly
    dirfaceid1
    dirfaceid1u
    dirfaceid1v
    dirfaceid2
    dirfaceid2u
    dirfaceid2v
    display 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
    displayed 1 2 3 4 5
    displayonly
    displays
    distance 1 2 3 4 5
    divide
    divided 1 2
    divideedge 1 2
    doesn 1 2
    don 1 2 3 4
    done 1 2
    double 1 2 3 4
    doubles
    down
    downward
    drag
    drawn
    drop
    dropsmalledges


    >> - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstf3.htm b/doc/salome/gui/GEOM/whgdata/whlstf3.htm deleted file mode 100755 index 8c653842a..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstf3.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words List - - - - - - - -

    <<

    -

    -du
    dump 1 2
    duplicate
    dx 1 2 3 4 5
    dy 1 2 3 4 5
    dz 1 2 3 4
    -

    -e
    e1
    e2
    e3
    e4
    easier
    edge 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
    edge_ind
    edge_points
    edge1
    edge2
    edge3
    edge4
    edgeid
    edges 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
    edit
    editing
    egdemaxtol
    egdemintol
    either 1 2
    element 1 2 3
    elementary
    elements 1 2 3 4 5
    ellipse 1 2
    else 1 2
    empty 1 2
    encountered
    end 1 2 3 4 5 6 7 8 9
    ending
    ends 1 2
    enter
    entire
    entity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
    equal 1 2 3
    erase
    eraseall
    eraseonly
    error 1 2
    errors 1 2
    etc 1 2
    example 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
    examples 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
    except
    existing 1 2 3
    expand
    explode 1 2 3 4
    exploded 1 2
    explodes
    export 1 2 3
    exportation
    exporting
    exports 1 2
    extended
    extra
    extracted
    extruded 1 2
    extrusion
    -

    -f 1 2
    f_2
    f_ind_1
    f_ind_2
    f1
    f1_id
    f2
    f3
    f4
    f5
    f6
    face 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
    face_name
    face_rot
    face1 1 2 3
    face2 1 2 3
    face3
    faceid
    facemaxtol
    facemintol
    faces 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
    factor 1 2
    failed 1 2
    false


    >> - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstf4.htm b/doc/salome/gui/GEOM/whgdata/whlstf4.htm deleted file mode 100755 index 7699ba2b5..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstf4.htm +++ /dev/null @@ -1,43 +0,0 @@ - - -Search Words List - - - - - - - -

    <<

    -

    -file
    files
    fill
    filled 1 2
    fillet 1 2 3
    filletall
    fillets
    filling 1 2 3 4
    final
    finally 1 2 3 4 5 6
    first 1 2 3 4 5 6 7 8 9
    firstly 1 2 3 4 5 6 7 8 9 10 11 12 13
    fit
    fix
    fixes
    fixfacesize
    fixing
    fixshape 1 2
    flag
    flight_solid
    following 1 2 3 4 5 6 7
    format 1 2 3
    formats 1 2 3
    four 1 2 3
    frame
    free 1 2 3 4 5
    functionalities
    functionality 1 2 3
    functions 1 2 3 4
    fuse 1 2 3 4
    fuse_id
    -

    -g1
    g2
    gap
    gcs
    general 1 2
    generate 1 2 3
    generation 1 2 3 4 5 6
    geom 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
    geom_object 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
    geom_objects 1 2 3 4
    geometric 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
    geometrical 1 2 3 4 5 6 7 8 9 10 11 12 13 14
    geometry 1 2 3 4 5 6
    geompy 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
    get 1 2 3 4
    getenv
    getfacenearpoint
    getfreeboundary 1 2
    getfreefacesids 1 2
    getobjectids
    getsubshape
    getsubshapeid 1 2 3
    getsubshapeindex
    getting
    gg 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
    given 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
    gives
    giving 1 2 3 4
    global 1 2 3
    glue 1 2 3 4 5
    glued 1 2
    glues
    good
    gravity 1 2 3 4
    greater
    group 1 2 3
    group_n
    group1
    groups 1 2 3 4 5 6 7


    >> - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstf5.htm b/doc/salome/gui/GEOM/whgdata/whlstf5.htm deleted file mode 100755 index 1691b48db..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstf5.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words List - - - - - - - -

    <<

    -

    - - -handling
    having 1 2
    height 1 2 3 4 5 6
    here
    hexagonal
    hexahedral 1 2 3
    hexahedron
    hide 1 2
    hides
    hiding
    highlight
    highlights
    holding
    holes 1 2
    how
    -

    -i 1 2 3 4
    i11
    i12
    i13
    i21
    i22
    i23
    i31
    i32
    i33
    id 1 2 3 4 5 6 7 8 9 10 11
    id_arc
    id_archimede
    id_axis
    id_bezier
    id_box 1 2 3 4
    id_box_tr1
    id_box_tr2
    id_box1 1 2
    id_box2 1 2
    id_box3
    id_chamfer_all
    id_chamfer_e
    id_chamfer_f
    id_chamfer_f1
    id_circle1
    id_circle2
    id_common
    id_compound 1 2 3
    id_cone1
    id_cone2
    id_cs1
    id_cs2
    id_cut 1 2
    id_cut_without_f_2
    id_cylinder 1 2
    id_divide
    id_edge 1 2 3
    id_edge1
    id_edge2
    id_edge3
    id_edge4
    id_ellipse
    id_face 1 2 3
    id_face_rot
    id_face1 1 2
    id_face2 1 2
    id_face3
    id_fillet
    id_filletall
    id_filling
    id_fuse
    id_glue
    id_group1
    id_importbrep
    id_interpol
    id_line1
    id_line2
    id_make_block_explode
    id_mirror1
    id_mirror2
    id_mirror3
    id_offset
    id_p_on_arc
    id_p0
    id_p1 1 2
    id_p100
    id_p2 1 2
    id_p3 1 2
    id_p4 1 2 3
    id_partition1
    id_partition2
    id_partition3
    id_pipe
    id_plane 1 2
    id_plane1
    id_plane2
    id_plane3
    id_polyline
    id_position
    id_prism
    id_prism1
    id_prism2
    id_ps
    id_px
    id_py
    id_pz
    id_qface1
    id_qface2
    id_qface3
    id_result
    id_revolution
    id_rot1d
    id_rot2d
    id_rotation
    id_scale
    id_section
    id_sewing
    id_shape
    id_shell
    id_sketcher1
    id_sketcher2
    id_solid
    id_solid1
    id_solid2
    id_sphere
    id_sphere1
    id_sphere2
    id_sphere3
    id_torus1
    id_torus2
    id_tr1d
    id_tr2d
    id_translation1
    id_translation2
    id_translation3
    id_vector
    id_vector1
    id_vector2
    id_vector3
    id_vr
    id_vxy
    id_wire 1 2 3
    id_wire_close
    idlist 1 2
    idlist_e
    idlist_f
    ids 1 2 3 4 5 6
    if 1 2 3 4 5 6 7 8 9 10 11 12 13 14
    iges 1 2 3
    image 1 2 3 4
    implemented
    implies
    imply
    import 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
    importation
    importbrep
    importcomponentgui 1 2 3 4 5 6 7 8 9 10 11 12 13 14
    imported 1 2 3
    importing
    impossible
    improve


    >> - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstf6.htm b/doc/salome/gui/GEOM/whgdata/whlstf6.htm deleted file mode 100755 index 2ae988521..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstf6.htm +++ /dev/null @@ -1,49 +0,0 @@ - - -Search Words List - - - - - - - -

    <<

    -

    -included
    increased
    independent
    index
    indexes
    indicate
    indicating
    indices 1 2 3 4
    inertia 1 2
    informs
    initial 1 2 3 4 5 6
    inner
    inquired
    ins
    inserted
    inside
    instead
    integer
    integers 1 2
    interactively
    intermediate
    internal 1 2
    interpol
    interpolated
    intersect
    intersected
    intersection
    introduction 1 2 3
    invalid 1 2 3
    invert
    invisible
    isbyparameter
    iscommonvertex
    isolines 1 2
    isometric
    isos
    isplanarface
    isplanarwanted 1 2 3 4
    issuccess
    isvalid 1 2
    iterations
    itself
    ix 1 2
    iy 1 2
    iz 1 2
    -

    -joined
    jpeg 1 2
    jpg 1 2
    junction
    just
    -

    -k
    keep 1 2 3 4 5
    keyboard
    ko
    -

    -l 1 2
    last 1 2
    lcs 1 2
    lcs1
    lcs2
    least
    leaves
    left 1 2 3
    len
    length 1 2 3 4
    lie 1 2
    limit
    line 1 2 3 4
    line1
    line2
    linear
    lines 1 2
    list 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
    listchains
    listoffaceid
    listofgeomshapes
    listofid
    listofind
    listofkeepinside
    listofmaterials
    listofremoveinside
    listofshape 1 2 3 4 5 6
    listofshapes 1 2
    listoftools
    listofwireid
    listshapes
    ll
    local 1 2 3 4 5
    localcs1
    localcs2
    localop
    located
    location 1 2 3 4
    locking
    lsc
    lying 1 2
    -

    -magnitude
    main 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
    mainshape
    major 1 2
    make 1 2 3 4 5 6
    make_block_explode
    makearc 1 2 3 4 5 6 7
    makebezier 1 2
    makeblockexplode 1 2
    makeboolean 1 2
    makebox 1 2 3 4 5 6
    makeboxdxdydz 1 2 3 4 5 6
    makeboxtwopnt 1 2 3 4
    makecdg 1 2
    makechamfer
    makechamferall 1 2
    makechamferedge 1 2
    makechamferfaces 1 2
    makecircle 1 2
    makecirclethreepnt 1 2
    makecommon 1 2
    makecompound 1 2 3 4 5
    makecone 1 2 3
    makeconer1r2h 1 2
    makecut 1 2
    makecylinder 1 2 3 4
    makecylinderrh
    makeedge 1 2 3 4 5
    makeellipse 1 2
    makeface 1 2 3 4 5 6 7
    makefaces 1 2
    makefacewires 1 2
    makefillet 1 2
    makefilletall 1 2
    makefilling 1 2
    makefuse 1 2
    makegluefaces 1 2 3
    makehalfpartition 1 2
    makehexa 1 2
    makehexa2faces 1 2
    makeinterpol 1 2
    makeline 1 2
    makelinetwopnt 1 2
    makemarker 1 2
    makemirrorbyaxis 1 2
    makemirrorbyplane 1 2
    makemirrorbypoint 1 2
    makemultirotation1d
    makemultirotation2d
    makemultitransformation1d 1 2
    makemultitransformation2d 1 2
    makemultitranslation1d 1 2
    makemultitranslation2d 1 2
    makeoffset 1 2
    makepartition 1 2
    makepipe 1 2
    makeplane 1 2 3
    makeplaneface 1 2
    makeplanethreepnt 1 2 3
    makepolyline 1 2
    makeposition 1 2
    makeprism 1 2 3
    makeprismvech 1 2 3 4
    makequad 1 2
    makequad2edges 1 2
    makequad4vertices 1 2
    makerevolution 1 2
    makerotation 1 2 3
    makes 1 2 3 4 5
    makescaletransform 1 2
    makesection 1 2
    makesewing 1 2
    makeshell 1 2
    makesketcher 1 2 3
    makesketcheronplane
    makesolid 1 2
    makesphere 1 2 3
    makespherepntr
    makespherer 1 2 3 4
    maketorus 1 2
    maketorusrr 1 2
    maketranslation 1 2 3
    maketranslationtwopoints 1 2
    maketranslationvector 1 2
    makevector 1 2 3 4 5 6 7 8 9
    makevectordxdydz 1 2 3 4
    makevertex 1 2 3 4 5 6 7 8 9 10 11 12 13 14
    makevertexoncurve 1 2
    makevertexwithref 1 2
    makewire 1 2 3 4 5 6 7
    manually
    marked
    mass
    masses
    materials
    math 1 2 3
    matrix 1 2
    max 1 2 3 4
    maxdeg
    maxdegree
    maximal 1 2 3
    maximum 1 2 3 4
    maxnbfaces
    maxtolerance
    maxtolerance3d


    >> - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstf7.htm b/doc/salome/gui/GEOM/whgdata/whlstf7.htm deleted file mode 100755 index ae1ba0212..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstf7.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words List - - - - - - - -

    <<

    -

    -meaning
    means 1 2 3
    measurement 1 2
    measures
    mechanisms
    meet
    memorise
    mentioned
    menu 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
    merge
    mesh 1 2 3
    meshes
    meshing 1 2
    meshingdeflection 1 2
    method
    middle 1 2
    min 1 2 3 4
    min_dist
    mindeg
    mindegree
    mindistance 1 2
    minimal 1 2 3 4
    minimum 1 2 3
    minnbfaces
    minor 1 2
    mirror 1 2
    mirror1
    mirror2
    mirror3
    mirrored
    mode 1 2 3 4 5 6
    modeled
    models 1 2
    modes
    modified
    modifies 1 2
    modify 1 2
    module 1 2 3 4
    moment
    moments 1 2
    mouse 1 2
    move
    moved
    much
    multi 1 2 3 4 5
    multirotate1d 1 2
    multirotate2d 1 2
    multitude
    must 1 2 3 4 5
    -

    -n
    name 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
    names
    nb 1 2 3 4
    nb_sub
    nbiter 1 2
    nbounding
    nbox
    nbsplitpoints
    nbtimes 1 2 3
    nbtimes1 1 2
    nbtimes2 1 2
    nbtimesu
    nbtimesv
    ncentre
    ncompound
    necessarily
    necessary 1 2 3 4 5
    need 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
    needed
    negative
    neighbouring
    new 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
    newly
    ninertia
    nminimal
    nodes
    noerror
    none
    normal 1 2 3 4 5 6
    note
    nothing
    notions
    nth
    number 1 2 3 4 5 6 7 8 9 10 11 12 13
    numbers
    -

    -object 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
    objects 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
    obtain 1 2 3
    obtained


    >> - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstf8.htm b/doc/salome/gui/GEOM/whgdata/whlstf8.htm deleted file mode 100755 index 4fe7761c0..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstf8.htm +++ /dev/null @@ -1,43 +0,0 @@ - - -Search Words List - - - - - - - -

    <<

    -

    -occ 1 2 3 4 5 6 7 8 9 10
    occurred
    offset 1 2
    ok 1 2 3 4
    old
    one 1 2 3 4 5 6 7 8 9 10 11 12 13
    opaque
    open 1 2 3 4 5 6
    opening
    opens
    openwires 1 2
    operation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
    operations 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
    operator
    operators 1 2
    opportunity
    opposite
    optimization 1 2
    option
    options
    order
    orientate
    orientation
    oriented
    origin 1 2 3 4 5 6 7 8
    os
    otherwise 1 2 3 4 5 6
    our 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
    out 1 2
    outside
    ox 1 2
    oy
    oz 1 2 3 4
    -

    -p
    p_25_25_50
    p_25_50_25
    p_50_25_25
    p_on_arc
    p0 1 2 3 4 5 6 7 8
    p1 1 2 3 4 5 6 7 8
    p10
    p100
    p11
    p12
    p13
    p2 1 2 3 4 5 6 7 8
    p200 1 2
    p3 1 2 3 4 5 6
    p4 1 2 3 4
    p5 1 2 3 4
    p50
    p6 1 2
    p7 1 2
    p70
    p8 1 2
    p9
    panning
    parallel 1 2 3 4
    parameter 1 2 3 4
    parameterization
    parameters 1 2 3 4 5 6 7 8 9
    parametric
    paramter
    part 1 2 3
    partition 1 2
    partition1
    partition2
    partition3
    parts
    passed
    passes 1 2 3 4
    passing
    path 1 2
    pathshape
    perform 1 2 3
    performed
    perpendicular
    pi 1 2 3
    picture
    pipe 1 2
    place
    placed
    places
    planar 1 2 3 4 5
    plane 1 2 3 4 5 6 7 8 9 10
    plane1
    plane2
    plane3
    planes 1 2 3
    plug
    plunged


    >> - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstf9.htm b/doc/salome/gui/GEOM/whgdata/whlstf9.htm deleted file mode 100755 index e6bc71836..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstf9.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words List - - - - - - - -

    <<

    -

    -png 1 2
    point 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
    point1 1 2 3 4 5 6 7 8 9 10 11
    point2 1 2 3 4 5 6 7 8 9 10 11
    point3 1 2 3 4 5
    point4 1 2
    point5
    pointcoordinates 1 2
    points 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
    polyline 1 2
    pop 1 2
    position 1 2 3 4 5 6
    positional
    positions
    possibilities
    possibility
    possible 1 2 3 4 5
    precision 1 2
    predefined
    presentation
    press
    pressed
    presumes
    preview
    previous 1 2
    primitives 1 2 3 4 5 6 7 8
    print 1 2
    printed
    prism 1 2 3 4 5
    prism_edges
    prism_faces 1 2
    prism1
    prism2
    prisms 1 2
    problems
    process 1 2
    processed 1 2 3 4
    processes
    processing 1 2
    processshape 1 2
    produce 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
    program
    projection
    projections
    propagate 1 2
    propagation 1 2
    properties 1 2
    proportional
    props
    provide 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
    providing
    ps
    put
    px 1 2 3 4 5
    pxy
    pxyz 1 2 3
    py 1 2 3 4 5
    py1
    python
    pz 1 2 3 4 5 6
    -

    -qface1
    qface2
    qface3
    qface4
    qface5
    qface6
    qface7
    qface8
    quadrangle 1 2 3 4
    -

    -r 1 2 3
    radio
    radius 1 2 3 4 5 6 7 8 9 10 11
    radius1 1 2 3 4 5
    radius2 1 2
    radius3
    radiuses 1 2 3 4
    radiusmajor 1 2
    radiusminor 1 2
    raise 1 2 3
    range 1 2 3 4 5 6
    recent
    reconstruction
    redefine
    reduce
    reference 1 2
    refreshes
    regarding
    relative
    relatively
    relevant
    remain 1 2
    remainder
    remote
    remove 1 2 3 4 5
    removed 1 2 3 4 5 6 7 8 9
    removeobject 1 2
    removes 1 2 3
    removewebs
    removing
    rename
    repair 1 2 3 4 5 6 7 8 9 10
    repairing 1 2 3 4 5 6 7 8 9 10 11 12 13
    repetition 1 2
    repetitions
    representation
    represented
    representing 1 2
    represents
    required 1 2
    requireddegree
    requirednbsegments
    requires
    res
    reset
    resizes
    respect 1 2
    restore
    restores
    restriction
    result 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
    resultant
    resulting 1 2 3 4 5
    results 1 2 3 4 5 6
    retrieves
    return
    returned 1 2 3
    returning
    returns 1 2 3 4 5
    reverse 1 2
    revolution 1 2 3


    >> - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl0.htm b/doc/salome/gui/GEOM/whgdata/whlstfl0.htm deleted file mode 100755 index a8d6ceb56..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl0.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ { {D {E {D ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl1.htm b/doc/salome/gui/GEOM/whgdata/whlstfl1.htm deleted file mode 100755 index 3ddd0ea89..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl1.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ AB AC AD AL AN AP AR AU AV AX ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl10.htm b/doc/salome/gui/GEOM/whgdata/whlstfl10.htm deleted file mode 100755 index c098d325e..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl10.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ JO JP JU ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl11.htm b/doc/salome/gui/GEOM/whgdata/whlstfl11.htm deleted file mode 100755 index 4547492c4..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl11.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ K KE KO ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl12.htm b/doc/salome/gui/GEOM/whgdata/whlstfl12.htm deleted file mode 100755 index 07c629bc7..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl12.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ L LA LC LE LI LL LO LS LY ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl13.htm b/doc/salome/gui/GEOM/whgdata/whlstfl13.htm deleted file mode 100755 index fa383d41a..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl13.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ MA ME MI MO MU ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl14.htm b/doc/salome/gui/GEOM/whgdata/whlstfl14.htm deleted file mode 100755 index 60532d353..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl14.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ N NA NB NC NE NI NM NO NT NU ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl15.htm b/doc/salome/gui/GEOM/whgdata/whlstfl15.htm deleted file mode 100755 index 68165a4f0..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl15.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ OB OC OF OK OL ON OP OR OS OT OU OX OY OZ ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl16.htm b/doc/salome/gui/GEOM/whgdata/whlstfl16.htm deleted file mode 100755 index eda34ce91..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl16.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ P PA PE PI PL PN PO PR PS PU PX PY PZ ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl17.htm b/doc/salome/gui/GEOM/whgdata/whlstfl17.htm deleted file mode 100755 index a4abf7108..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl17.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ QF QU ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl18.htm b/doc/salome/gui/GEOM/whgdata/whlstfl18.htm deleted file mode 100755 index e11002aa0..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl18.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ R RA RE RI RO RU ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl19.htm b/doc/salome/gui/GEOM/whgdata/whlstfl19.htm deleted file mode 100755 index 0a710d8a9..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl19.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ S SA SC SE SG SH SI SK SM SO SP SQ ST SU SY ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl2.htm b/doc/salome/gui/GEOM/whgdata/whlstfl2.htm deleted file mode 100755 index b122abd54..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl2.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ B BA BB BE BL BM BO BR BS BU BY ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl20.htm b/doc/salome/gui/GEOM/whgdata/whlstfl20.htm deleted file mode 100755 index 095ab4760..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl20.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ T TA TE TH TI TO TR TT TU TW TY ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl21.htm b/doc/salome/gui/GEOM/whgdata/whlstfl21.htm deleted file mode 100755 index 1d1f4d32b..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl21.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ U UN UP US ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl22.htm b/doc/salome/gui/GEOM/whgdata/whlstfl22.htm deleted file mode 100755 index ca8764f6b..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl22.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ V VA VE VI VO VR VT VX VZ ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl23.htm b/doc/salome/gui/GEOM/whgdata/whlstfl23.htm deleted file mode 100755 index 57d263d57..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl23.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ W WA WE WF WH WI WO WW ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl24.htm b/doc/salome/gui/GEOM/whgdata/whlstfl24.htm deleted file mode 100755 index c0564aa39..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl24.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ X XD XM XO XY XZ ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl25.htm b/doc/salome/gui/GEOM/whgdata/whlstfl25.htm deleted file mode 100755 index 2d94192b0..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl25.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ Y YD YM YO YZ ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl26.htm b/doc/salome/gui/GEOM/whgdata/whlstfl26.htm deleted file mode 100755 index c096d46be..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl26.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ Z ZE ZM ZO ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl3.htm b/doc/salome/gui/GEOM/whgdata/whlstfl3.htm deleted file mode 100755 index 819f2db3e..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl3.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ C CA CE CH CI CL CM CN CO CR CS CU CY ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl4.htm b/doc/salome/gui/GEOM/whgdata/whlstfl4.htm deleted file mode 100755 index 4f958b9c2..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl4.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ D DA DE DI DO DR DU DX DY DZ ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl5.htm b/doc/salome/gui/GEOM/whgdata/whlstfl5.htm deleted file mode 100755 index 6436a8110..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl5.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ E EA ED EG EI EL EM EN EQ ER ET EX ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl6.htm b/doc/salome/gui/GEOM/whgdata/whlstfl6.htm deleted file mode 100755 index aeeed420f..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl6.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ F FA FI FL FO FR FU ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl7.htm b/doc/salome/gui/GEOM/whgdata/whlstfl7.htm deleted file mode 100755 index 8f8665a31..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl7.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ G GA GC GE GG GI GL GO GR ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl8.htm b/doc/salome/gui/GEOM/whgdata/whlstfl8.htm deleted file mode 100755 index 124e38af9..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl8.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ HA HE HI HO ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstfl9.htm b/doc/salome/gui/GEOM/whgdata/whlstfl9.htm deleted file mode 100755 index c8ce4cd0e..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstfl9.htm +++ /dev/null @@ -1,45 +0,0 @@ - - -Search Words letter - - - - - - - - - -

    ^ I ID IF IG IM IN IS IT IX IY IZ ^

    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstg0.htm b/doc/salome/gui/GEOM/whgdata/whlstg0.htm deleted file mode 100755 index 193fb7c67..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstg0.htm +++ /dev/null @@ -1,75 +0,0 @@ - - -Glossary words list - - - - - - - -

    Cell

    -

    Element of a mesh. Cells are determined by their connectivity. They can have 0,1,2 or 3 dimension.

    -

    Component

    -

    One integer or real value can correspond to each component of a field and to each entity of a mesh

    -

    Descendant connectivity

    -

    It is a description of the entities of the mesh with dimension N. This description is made by an ordered list of geometrical entities (nodes, edges, or faces) with dimension N-1.

    -

    Edge

    -

    An edge of a volumetric or surface mesh. It is composed of 2 or 3 nodes (2 vertex nodes and optionally one middle node).

    -

    Entity of a mesh

    -

    Geometrical component of the mesh: node, cell, face and edge. Faces and edges are only intermediate entities allowing to define the cells in descendant connectivity.

    -

    Equivalence

    -

    Equivalence represents a list of correspondance 2 by 2 of the entities of the same dimension.

    -

    Face

    -

    Face of a volumetrical cell (triangle, quadrangle).

    -

    Family

    -

    Entities of a mesh are described by a certain number  of characteristics (boundary conditions, groups membership). Families represent classes equivalent to these characteristics (two entities of a mesh can belong to the same family if they have the same characteristics). Every family is determined by a set of attributes and a list of groups membership.

    -

    Field

    -

    Field consists of one or several scalar components. One definite type is associated to the given field and the values corresponding to different components are all of the same type.

    -

    Field profile

    -

    Fields can be defined only on one part of the mesh. Profile  of the field or profile of the component of a field indicates which entities of the mesh contain values.

    -

    Group

    -

    Unordered set of entities of a mesh. One entity can belong to  several groups.

    -

    Mesh

    -

    Mesh is described by its geometry: list of nodes and list of cells which constitute this mesh. Supplementary information is added with the help of families (initial, boundary conditions).

    -

    Nodal connectivity

    -

    It is a description of an entity of the mesh by an ordered list of nodes constituting this entity.

    -

    Node

    -

    Node can be an isolated node of a mesh, a vertex or middle node of an edge. A node is associated to a point.

    -

    Point

    -

    Geometrical entity determined by its coordinates in the space.

    -

    Reference connectivity

    -

    For each type of entity of a mesh, reference connectivity define the topology of an entity.

    -

    Result

    -

    List of fields referring to one mesh.

    -

    Study

    -

    Study represents a chain of sequences of calculations.

    -



    - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlsti0.htm b/doc/salome/gui/GEOM/whgdata/whlsti0.htm deleted file mode 100755 index 32e2c7fd9..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlsti0.htm +++ /dev/null @@ -1,39 +0,0 @@ - - - -Index words list - - - - - - - - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt0.htm b/doc/salome/gui/GEOM/whgdata/whlstt0.htm deleted file mode 100755 index 98e3b2c07..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt0.htm +++ /dev/null @@ -1,51 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt1.htm b/doc/salome/gui/GEOM/whgdata/whlstt1.htm deleted file mode 100755 index 71d6e3159..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt1.htm +++ /dev/null @@ -1,58 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -    Introduction to Geometry
    -    Importing/exporting geometrical objects
    -    Creating geometrical objects
    -    Viewing geometrical objects
    -    Transforming geometrical objects
    -    Using measurement tools
    -    TUI Scripts
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt10.htm b/doc/salome/gui/GEOM/whgdata/whlstt10.htm deleted file mode 100755 index 204cdfe22..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt10.htm +++ /dev/null @@ -1,68 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -    Introduction to Geometry
    -    Importing/exporting geometrical objects
    -    Creating geometrical objects
    -    Viewing geometrical objects
    -    Transforming geometrical objects
    -       Basic Operations
    -       Boolean Operations
    -          Using boolean operations
    -          Fuse
    -          Common
    -          Cut
    -          Section
    -       Transformation Operations
    -       Blocks Operations
    -       Repairing Operations
    -    Using measurement tools
    -    TUI Scripts
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt11.htm b/doc/salome/gui/GEOM/whgdata/whlstt11.htm deleted file mode 100755 index 1a34a2504..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt11.htm +++ /dev/null @@ -1,73 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -    Introduction to Geometry
    -    Importing/exporting geometrical objects
    -    Creating geometrical objects
    -    Viewing geometrical objects
    -    Transforming geometrical objects
    -       Basic Operations
    -       Boolean Operations
    -       Transformation Operations
    -          Translation
    -          Rotation
    -          Modify the Location
    -          Mirror Image
    -          Scale Transform
    -          Offset Surface
    -          Multi Translation
    -          Multi Rotation
    -          Fillet
    -          Chamfer
    -       Blocks Operations
    -       Repairing Operations
    -    Using measurement tools
    -    TUI Scripts
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt12.htm b/doc/salome/gui/GEOM/whgdata/whlstt12.htm deleted file mode 100755 index af8e2ab44..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt12.htm +++ /dev/null @@ -1,66 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -    Introduction to Geometry
    -    Importing/exporting geometrical objects
    -    Creating geometrical objects
    -    Viewing geometrical objects
    -    Transforming geometrical objects
    -       Basic Operations
    -       Boolean Operations
    -       Transformation Operations
    -       Blocks Operations
    -          Multi Transformation
    -          Explode on Blocks
    -          Propagate
    -       Repairing Operations
    -    Using measurement tools
    -    TUI Scripts
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt13.htm b/doc/salome/gui/GEOM/whgdata/whlstt13.htm deleted file mode 100755 index a6ad5342f..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt13.htm +++ /dev/null @@ -1,73 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -    Introduction to Geometry
    -    Importing/exporting geometrical objects
    -    Creating geometrical objects
    -    Viewing geometrical objects
    -    Transforming geometrical objects
    -       Basic Operations
    -       Boolean Operations
    -       Transformation Operations
    -       Blocks Operations
    -       Repairing Operations
    -          Shape Processing
    -          Suppress Faces
    -          Close Contour
    -          Suppress Internal Wires
    -          Suppress Holes
    -          Sewing
    -          Glue Faces
    -          Add Point on Edge
    -          Check Free Boundaries
    -          Check Free Faces
    -    Using measurement tools
    -    TUI Scripts
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt14.htm b/doc/salome/gui/GEOM/whgdata/whlstt14.htm deleted file mode 100755 index 90141801a..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt14.htm +++ /dev/null @@ -1,63 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -    Introduction to Geometry
    -    Importing/exporting geometrical objects
    -    Creating geometrical objects
    -    Viewing geometrical objects
    -    Transforming geometrical objects
    -    Using measurement tools
    -    TUI Scripts
    -       Viewing Geometrical Objects
    -       Creating Geometric Objects
    -       Transformation
    -       Measurement Tools
    -       Python interface geompy.py
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt15.htm b/doc/salome/gui/GEOM/whgdata/whlstt15.htm deleted file mode 100755 index a55c4689c..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt15.htm +++ /dev/null @@ -1,69 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -    Introduction to Geometry
    -    Importing/exporting geometrical objects
    -    Creating geometrical objects
    -    Viewing geometrical objects
    -    Transforming geometrical objects
    -    Using measurement tools
    -    TUI Scripts
    -       Viewing Geometrical Objects
    -       Creating Geometric Objects
    -          Basic Geometrical Objects
    -          Primitives
    -          Complex Objects
    -          Working with Groups
    -          Building by Blocks
    -          Sketcher
    -          Advanced Geometrical Objects
    -       Transformation
    -       Measurement Tools
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt16.htm b/doc/salome/gui/GEOM/whgdata/whlstt16.htm deleted file mode 100755 index 941a0790c..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt16.htm +++ /dev/null @@ -1,67 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -    Introduction to Geometry
    -    Importing/exporting geometrical objects
    -    Creating geometrical objects
    -    Viewing geometrical objects
    -    Transforming geometrical objects
    -    Using measurement tools
    -    TUI Scripts
    -       Viewing Geometrical Objects
    -       Creating Geometric Objects
    -       Transformation
    -          Basic Operations
    -          Boolean Operations
    -          Transformation Operations
    -          Blocks Operations
    -          Repairing Operations
    -       Measurement Tools
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt2.htm b/doc/salome/gui/GEOM/whgdata/whlstt2.htm deleted file mode 100755 index 7ec8d9f9f..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt2.htm +++ /dev/null @@ -1,65 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -    Introduction to Geometry
    -    Importing/exporting geometrical objects
    -    Creating geometrical objects
    -       Creating Basic Geometric Objects
    -       Creating Primitives
    -       Creating Complex Objects
    -       Working with groups
    -       Building by blocks
    -       Sketcher
    -       Creating Advanced Geometrical Objects
    -    Viewing geometrical objects
    -    Transforming geometrical objects
    -    Using measurement tools
    -    TUI Scripts
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt3.htm b/doc/salome/gui/GEOM/whgdata/whlstt3.htm deleted file mode 100755 index 80435d67b..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt3.htm +++ /dev/null @@ -1,75 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -    Introduction to Geometry
    -    Importing/exporting geometrical objects
    -    Creating geometrical objects
    -       Creating Basic Geometric Objects
    -          Point
    -          Line
    -          Circle
    -          Ellipse
    -          Arc
    -          Curve
    -          Vector
    -          Plane
    -          Working Plane
    -          Local Coordinate System
    -       Creating Primitives
    -       Creating Complex Objects
    -       Working with groups
    -       Building by blocks
    -       Sketcher
    -       Creating Advanced Geometrical Objects
    -    Viewing geometrical objects
    -    Transforming geometrical objects
    -    Using measurement tools
    -    TUI Scripts
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt4.htm b/doc/salome/gui/GEOM/whgdata/whlstt4.htm deleted file mode 100755 index 53e8bf275..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt4.htm +++ /dev/null @@ -1,70 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -    Introduction to Geometry
    -    Importing/exporting geometrical objects
    -    Creating geometrical objects
    -       Creating Basic Geometric Objects
    -       Creating Primitives
    -          Box
    -          Cylinder
    -          Sphere
    -          Torus
    -          Cone
    -       Creating Complex Objects
    -       Working with groups
    -       Building by blocks
    -       Sketcher
    -       Creating Advanced Geometrical Objects
    -    Viewing geometrical objects
    -    Transforming geometrical objects
    -    Using measurement tools
    -    TUI Scripts
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt5.htm b/doc/salome/gui/GEOM/whgdata/whlstt5.htm deleted file mode 100755 index 12c834bc5..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt5.htm +++ /dev/null @@ -1,69 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -    Introduction to Geometry
    -    Importing/exporting geometrical objects
    -    Creating geometrical objects
    -       Creating Basic Geometric Objects
    -       Creating Primitives
    -       Creating Complex Objects
    -          Extrusion
    -          Revolution
    -          Filling
    -          Pipe
    -       Working with groups
    -       Building by blocks
    -       Sketcher
    -       Creating Advanced Geometrical Objects
    -    Viewing geometrical objects
    -    Transforming geometrical objects
    -    Using measurement tools
    -    TUI Scripts
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt6.htm b/doc/salome/gui/GEOM/whgdata/whlstt6.htm deleted file mode 100755 index 39a238c00..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt6.htm +++ /dev/null @@ -1,72 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -    Introduction to Geometry
    -    Importing/exporting geometrical objects
    -    Creating geometrical objects
    -       Creating Basic Geometric Objects
    -       Creating Primitives
    -       Creating Complex Objects
    -       Working with groups
    -       Building by blocks
    -       Sketcher
    -       Creating Advanced Geometrical Objects
    -          Explode
    -          Edge
    -          Wire
    -          Face
    -          Shell
    -          Solid
    -          Compound
    -    Viewing geometrical objects
    -    Transforming geometrical objects
    -    Using measurement tools
    -    TUI Scripts
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt7.htm b/doc/salome/gui/GEOM/whgdata/whlstt7.htm deleted file mode 100755 index 90cd66b4b..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt7.htm +++ /dev/null @@ -1,64 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -    Introduction to Geometry
    -    Importing/exporting geometrical objects
    -    Creating geometrical objects
    -    Viewing geometrical objects
    -       Viewing Geometrical Objects
    -       OCC 3D Viewer
    -       Display Mode
    -       Color
    -       Transparency
    -       Isolines
    -    Transforming geometrical objects
    -    Using measurement tools
    -    TUI Scripts
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt8.htm b/doc/salome/gui/GEOM/whgdata/whlstt8.htm deleted file mode 100755 index 582722826..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt8.htm +++ /dev/null @@ -1,63 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -    Introduction to Geometry
    -    Importing/exporting geometrical objects
    -    Creating geometrical objects
    -    Viewing geometrical objects
    -    Transforming geometrical objects
    -       Basic Operations
    -       Boolean Operations
    -       Transformation Operations
    -       Blocks Operations
    -       Repairing Operations
    -    Using measurement tools
    -    TUI Scripts
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whlstt9.htm b/doc/salome/gui/GEOM/whgdata/whlstt9.htm deleted file mode 100755 index 59e42a136..000000000 --- a/doc/salome/gui/GEOM/whgdata/whlstt9.htm +++ /dev/null @@ -1,65 +0,0 @@ - - - -Content - - - - - - - - - - -
    -

    - Geometry module
    -    Introduction to Geometry
    -    Importing/exporting geometrical objects
    -    Creating geometrical objects
    -    Viewing geometrical objects
    -    Transforming geometrical objects
    -       Basic Operations
    -          Partition
    -          Archimede
    -       Boolean Operations
    -       Transformation Operations
    -       Blocks Operations
    -       Repairing Operations
    -    Using measurement tools
    -    TUI Scripts
    -

    - -
    -

    -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whnvf30.htm b/doc/salome/gui/GEOM/whgdata/whnvf30.htm deleted file mode 100755 index 7cff7ce54..000000000 --- a/doc/salome/gui/GEOM/whgdata/whnvf30.htm +++ /dev/null @@ -1,13 +0,0 @@ - - - -toc frame - - - - - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whnvf31.htm b/doc/salome/gui/GEOM/whgdata/whnvf31.htm deleted file mode 100755 index 91a985f9f..000000000 --- a/doc/salome/gui/GEOM/whgdata/whnvf31.htm +++ /dev/null @@ -1,15 +0,0 @@ - - - -Index frame - - - - - - - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whnvf32.htm b/doc/salome/gui/GEOM/whgdata/whnvf32.htm deleted file mode 100755 index bc2231fbf..000000000 --- a/doc/salome/gui/GEOM/whgdata/whnvf32.htm +++ /dev/null @@ -1,15 +0,0 @@ - - - -search frame - - - - - - - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whnvf33.htm b/doc/salome/gui/GEOM/whgdata/whnvf33.htm deleted file mode 100755 index 6c091d828..000000000 --- a/doc/salome/gui/GEOM/whgdata/whnvf33.htm +++ /dev/null @@ -1,15 +0,0 @@ - - - -Glossary frame - - - - - - - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whnvl31.htm b/doc/salome/gui/GEOM/whgdata/whnvl31.htm deleted file mode 100755 index e29abc01c..000000000 --- a/doc/salome/gui/GEOM/whgdata/whnvl31.htm +++ /dev/null @@ -1,43 +0,0 @@ - - - -Index Letters - - - - - - - - - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whnvl32.htm b/doc/salome/gui/GEOM/whgdata/whnvl32.htm deleted file mode 100755 index c76e9d162..000000000 --- a/doc/salome/gui/GEOM/whgdata/whnvl32.htm +++ /dev/null @@ -1,72 +0,0 @@ - - - -Search Letters - - - - - - - - -

    - # - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whnvl33.htm b/doc/salome/gui/GEOM/whgdata/whnvl33.htm deleted file mode 100755 index d6f20c33c..000000000 --- a/doc/salome/gui/GEOM/whgdata/whnvl33.htm +++ /dev/null @@ -1,72 +0,0 @@ - - - -Glossary Letters - - - - - - - - -

    - # - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z -

    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whnvp30.htm b/doc/salome/gui/GEOM/whgdata/whnvp30.htm deleted file mode 100755 index 0c9cb814b..000000000 --- a/doc/salome/gui/GEOM/whgdata/whnvp30.htm +++ /dev/null @@ -1,16 +0,0 @@ - - - - Content Navigation Pane - - - - - - - - - - \ No newline at end of file diff --git a/doc/salome/gui/GEOM/whgdata/whnvp31.htm b/doc/salome/gui/GEOM/whgdata/whnvp31.htm deleted file mode 100755 index 87921c0b7..000000000 --- a/doc/salome/gui/GEOM/whgdata/whnvp31.htm +++ /dev/null @@ -1,16 +0,0 @@ - - - - Index Navigation Pane - - - - - - - - - - \ No newline at end of file diff --git a/doc/salome/gui/GEOM/whgdata/whnvp32.htm b/doc/salome/gui/GEOM/whgdata/whnvp32.htm deleted file mode 100755 index 90697b01f..000000000 --- a/doc/salome/gui/GEOM/whgdata/whnvp32.htm +++ /dev/null @@ -1,16 +0,0 @@ - - - - Search Navigation Pane - - - - - - - - - - \ No newline at end of file diff --git a/doc/salome/gui/GEOM/whgdata/whnvp33.htm b/doc/salome/gui/GEOM/whgdata/whnvp33.htm deleted file mode 100755 index 8351bcbea..000000000 --- a/doc/salome/gui/GEOM/whgdata/whnvp33.htm +++ /dev/null @@ -1,16 +0,0 @@ - - - - Glossary Navigation Pane - - - - - - - - - - \ No newline at end of file diff --git a/doc/salome/gui/GEOM/whgdata/whnvt30.htm b/doc/salome/gui/GEOM/whgdata/whnvt30.htm deleted file mode 100755 index ec1bb840f..000000000 --- a/doc/salome/gui/GEOM/whgdata/whnvt30.htm +++ /dev/null @@ -1,47 +0,0 @@ - - - -Content Navigation Tab - - - - - - - - - - - -
    - -
    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whnvt31.htm b/doc/salome/gui/GEOM/whgdata/whnvt31.htm deleted file mode 100755 index e17d82548..000000000 --- a/doc/salome/gui/GEOM/whgdata/whnvt31.htm +++ /dev/null @@ -1,45 +0,0 @@ - - - -Index Navigation Tab - - - - - - - - - - - -
    - -
    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whnvt32.htm b/doc/salome/gui/GEOM/whgdata/whnvt32.htm deleted file mode 100755 index d63892533..000000000 --- a/doc/salome/gui/GEOM/whgdata/whnvt32.htm +++ /dev/null @@ -1,45 +0,0 @@ - - - -Search Navigation Tab - - - - - - - - - - - -
    - -
    - - - - diff --git a/doc/salome/gui/GEOM/whgdata/whnvt33.htm b/doc/salome/gui/GEOM/whgdata/whnvt33.htm deleted file mode 100755 index af63a0257..000000000 --- a/doc/salome/gui/GEOM/whgdata/whnvt33.htm +++ /dev/null @@ -1,45 +0,0 @@ - - - -Glossary Navigation Tab - - - - - - - - - - - -
    - -
    - - - - diff --git a/doc/salome/gui/GEOM/whxdata/whftdata0.xml b/doc/salome/gui/GEOM/whxdata/whftdata0.xml deleted file mode 100755 index 0f5be19c9..000000000 --- a/doc/salome/gui/GEOM/whxdata/whftdata0.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/salome/gui/GEOM/whxdata/whfts.xml b/doc/salome/gui/GEOM/whxdata/whfts.xml deleted file mode 100755 index 3146b8080..000000000 --- a/doc/salome/gui/GEOM/whxdata/whfts.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/doc/salome/gui/GEOM/whxdata/whfwdata0.xml b/doc/salome/gui/GEOM/whxdata/whfwdata0.xml deleted file mode 100755 index da0b6c7d6..000000000 --- a/doc/salome/gui/GEOM/whxdata/whfwdata0.xml +++ /dev/null @@ -1,1365 +0,0 @@ - - - 0,3,4,5,6,8,11,18,37,40,44,46,56,57,59,65,68,74,76,33, - 59, - 18, - 4, - 44, - 0,2,3,4,5,6,8,9,10,11,14,15,18,20,23,25,26,27,28,29,34,35,37,39,40,43,44,45,46,47,48,49,53,54,55,56,57,58,59,60,61,62,64,65,67,68,70,72,74,75,76,77,31,82,83, - 3,18,37,44,57,68,74, - 3,4,5,18,37,44,46,59,68,74, - 3,74, - 4, - 44, - 44, - 44, - 33, - 8, - 59, - 59, - 8,18,44,57,68, - 3,8,37,59,68, - 11, - 57, - 3, - 59,65,68, - 44, - 5,74, - 44,59, - 50,5,7,14,17,18,21,22,23,24,27,28,36,37,40,41,42,44,47,48,49,53,59,63,67,74,75,77,31,78,82, - 3,6,18,37,57,59,68,74, - 3,4,5,40,44,46,59,74, - 74, - 11, - 74, - 44, - 3,5,6,57,74, - 37,44,59,68, - 5,35,59,65,74,31, - 1,2,5,7,11,14,18,20,37,40,44,48,55,56,59,61,67,74,75,31,78, - 3,8,11,18,37,44,57,59,68,74, - 37,68, - 44, - 11, - 59, - 44, - 6,8,57,59,74, - 14,21,35,43,51,55,56,59,65,71,31,33,78,79,81,83, - 50,37,40,44,48,67,74,31, - 6,8,18,37,57,59,74, - 59, - 57,59, - 0,3,11,18,35,37,40,32,44,56,59,67,68,74, - 3,5,8,11,18,37,44,59,68,74,76, - 4, - 6,57,59, - 50,5,44,33, - 18,37,59,74, - 59, - 37,44,59, - 3,8,37,57,59,68,74, - 44, - 44,59,68,74, - 37,44,67, - 65,67, - 51,67, - 67, - 76, - 51,79, - 7,16,29,42,70, - 0, - 0,15, - 15,40,32,83, - 0,3,4,5,6,8,18,37,40,57,59,68,74,83, - 40,83, - 3,4,5,6,8,11,18,37,40,57,59,68,74, - 5,59, - 7,19,24,28,29,37,66,69,70,80, - 7,14,20,21,23,28,43,46,55,56,61,67,70,77,78,82, - 59, - 50,9,26,43,45,46,47,51,53,61,64,65,67,72,75,33,79, - 7,9,46,49,52,54,74,75, - 31, - 40, - 46, - 47,59,60,61,65,67,74, - 22,42,55,56,70,74, - 43,53,61,65,75, - 43,74,83, - 79,83, - 18,37,74, - 9,65, - 52, - 65,79, - 65, - 1,3,18,37,59,67,68,74, - 18, - 18, - 2,4, - 44,51, - 0,1,2,50,7,9,10,14,15,17,19,20,21,22,23,24,25,26,27,28,29,34,35,36,39,41,42,43,45,46,47,48,49,52,53,54,55,56,58,60,61,62,63,64,66,67,69,70,71,72,73,75,77,31,78,80,82,83, - 47,51,60,74, - 50,43,79, - 0,50,15,32,51,67,71,72,73,83, - 7,43,49,51,75, - 18,20,23,43,45,46,47,60,61,74,33, - 3,21,65, - 79, - 20,23,28,43,47,51,54,59,60,62,65,75,77, - 54, - 28,51, - 1,2,3,4,14,21,25,38,30,42,43,44,53,55,56,67,33,78,82, - 44,33, - 44, - 24, - 59,65,67, - 59, - 9, - 50, - 21, - 3,21,65, - 79, - 50,5,8,27,38,30,44,48,58,33, - 51,79, - 6,17,22,36,38,30,63,31,33, - 7,20,48,49,65, - 59, - 8,37,44,51,33, - 12,59,64,72, - 12,59,73, - 44,33, - 4,50,5,7,11,16,22,27,40,32,44,51,53,57,59,65,67,73,74,76,33,80,83, - 5, - 5, - 44,57,59, - 44,57,59, - 57, - 65, - 58, - 38,32,30,59, - 32,43,79,80, - 65, - 65, - 50,5,8,19,24,29,38,30,53,58,66,69,80, - 43,51,54,64,72,80,83, - 50, - 37,65,68, - 65, - 65, - 65, - 38,30, - 43,33, - 82, - 50,43,48,61,73, - 51, - 32, - 51, - 7,14,20,25,44,46,47,51,67,70,74,77,33, - 26, - 62, - 20,23,61,62,65, - 61, - 65,83, - 5, - 9,74, - 74, - 74, - 74, - 74, - 10,11,16,41,51,76,79,81, - 10, - 12,13,27,29,44,59,65,73,33, - 5, - 10,45,46,47,61,72,75,33, - 44,33, - 44,59,33, - 21, - 27,32,43,51,53, - 3,14,67, - 3, - 3, - 16,32,51,54,79,81,83, - 51, - 51, - 12,15,59,65,69,83, - 15,59, - 12,59, - 15, - 44, - 65, - 46, - 39, - 65, - 20,23, - 11,16,79,81, - 0,1,2,50,7,9,10,12,13,14,15,16,17,19,20,21,23,24,25,26,27,28,29,34,35,36,39,42,43,45,46,47,48,49,52,53,54,55,56,58,60,61,62,63,64,65,66,67,69,70,71,72,73,75,76,77,31,33,78,79,80,81,83, - 6,9,15,17,74,31, - 18,28,35,38,30,54,60,31, - 3,18,67,75, - 50,10,33, - 50,5,17,18,19,22,26,27,35,36,37,39,44,47,49,52,59,63,33, - 26,28,54,60, - 37, - 2,33, - 20,57,59, - 33, - 33, - 57, - 57, - 32,83, - 65, - 9,29,66,33,80, - 33, - 74, - 15,39,33, - 33, - 50, - 50,69, - 21,38,30,43,51,31, - 0,13,15,58, - 40,32,51, - 65, - 65, - 65, - 65, - 65, - 15,59, - 65, - 65, - 44, - 7,20,23,26,43,44,46,51,55,56,67,70,74,75,77,33,78,82, - 10,45,46,61,75, - 65, - 7,8, - 65, - 65, - 2,12,21,24,27, - 59, - 67, - 31, - 1,2,3,4,50,5,6,7,8,9,10,14,15,18,19,20,21,23,24,25,26,28,29,34,35,36,37,40,42,43,44,45,46,47,51,54,55,56,57,59,60,61,62,63,66,67,68,69,70,74,75,77,33,78,79,80,82,83, - 3,4,5,6,8,11,18,37,40,57,59,68,74, - 40,83, - 1,3,7,14,15,18,19,20,21,23,24,25,28,29,35,37,38,40,30,42,54,55,56,57,59,60,66,69,70,77,78,80,83, - 5, - 51, - 74, - 74, - 46, - 7,42,51,53,67,70, - 3,21,35,65,67, - 65, - 65, - 65, - 65, - 6,17,22,53,59,31, - 59, - 6,20,23,57,59,74, - 18,57, - 57, - 57, - 65, - 9,59,65, - 9,74, - 9,74, - 33, - 59, - 44, - 51,56,67,79,83, - 1,7,9,14,20,21,23,25,26,27,28,34,35,32,42,43,47,48,49,51,54,55,56,60,61,62,65,67,70,75,77,78,82,83, - 72, - 54, - 2, - 61, - 33, - 35,60,65,67, - 83, - 2, - 48,65, - 65, - 44, - 79, - 50,44,67,68,33, - 83, - 38,30, - 67, - 79, - 12,64,72, - 65, - 51, - 50,22,32,65,67,76,80,83, - 40, - 45,33, - 7,9,23,28,47,33, - 47,49, - 49, - 49, - 43,61, - 2,14,20,25,28,43,47,48,49,51,60,61,65,67,77, - 48, - 48, - 48, - 48, - 48, - 48, - 3,4,5,6,8,11,16,18,37,40,32,41,51,57,59,64,68,72,74,76,33,79,81,83, - 79, - 39,44,52,65,33, - 0,59, - 0,59, - 79, - 40,51, - 7,10,15,28,49,51,70, - 47,48,49,67,76, - 83, - 51, - 51, - 51, - 65, - 65, - 65, - 51,79, - 51, - 7,44,67,75,78, - 7,44,67,75,78, - 7,44,75,78, - 44,53,65, - 50, - 50, - 50, - 50, - 83, - 0,1,50,7,8,9,12,14,15,18,21,24,25,26,28,34,35,37,42,44,54,56,58,59,60,65,66,67,74,33,78,80,81, - 59, - 59, - 8, - 8, - 8, - 8, - 0, - 83, - 33, - 33, - 50,46, - 15,29,67,31,33,79,83, - 50, - 3,25, - 44,59, - 72,73, - 33, - 1,15,28,46,59,65,67,74,75,78, - 83, - 33, - 1,50,7,14,19,20,21,23,24,25,26,28,29,35,42,43,54,55,56,60,66,67,69,70,77,78,80,82,83, - 20,65,67, - 79, - 79, - 79, - 12,40,33, - 26,53,65, - 0,1,2,50,7,9,10,12,13,14,15,16,17,19,20,21,22,23,24,25,27,28,29,34,35,36,39,32,41,42,43,45,46,47,48,49,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,69,70,71,72,73,75,76,77,31,78,80,81,83, - 73, - 67,83, - 32, - 5,26,27,37, - 38,32,30,51,79, - 32, - 51, - 33, - 27, - 54,60, - 28,54, - 37,68, - 59, - 74, - 74, - 50, - 59, - 50, - 50, - 50, - 50, - 50, - 44, - 2,3,50,5,8,9,10,13,15,18,26,27,28,29,34,35,37,39,40,44,48,52,53,54,55,59,60,65,66,67,68,71,73,74,33,82, - 59, - 59, - 9,18,37, - 9,18,37, - 37, - 40, - 33, - 33, - 62,74, - 44,59, - 12, - 53, - 10, - 16,18,35,32,79,81, - 72, - 9,34,74, - 74, - 45,46,55,56,75,82,83, - 7,14,20,23,24,28,43,45,46,48,49,53,55,56,61,65,68,70,75,77,31,78,82, - 51, - 65, - 65, - 59,65, - 33, - 59, - 65,67,68,76,31,33,83, - 38,32,30,51,79, - 50,8,65, - 51, - 12,13,59,64,72, - 38,30,51,74, - 50, - 51,53,67,83, - 6,11,36,31, - 11, - 65, - 65, - 15, - 46, - 50,31, - 28,35,54, - 28,35,38,30,54,60, - 3,4,5,6,8,11,18,37,40,44,57,58,59,68,74,33, - 0,1,2,50,7,9,12,13,14,15,17,19,20,21,22,23,24,25,26,27,28,29,34,35,36,39,42,45,47,48,49,52,53,54,55,56,58,60,61,62,63,64,65,66,67,69,70,71,72,73,75,77,33,78,80,83, - 1,50,14,19,21,24,25,28,29,35,42,54,55,56,60,65,66,69,78,79,80, - 3,11,17,37,38,32,30,47,51,53,31,33,79,81,83, - 38,32,30,51,59,65,33, - 0,1,2,3,4,50,5,6,7,8,9,10,11,12,14,15,17,18,19,20,21,23,24,25,26,27,28,29,34,35,36,37,39,40,42,43,44,45,46,47,48,49,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,77,31,33,78,80,83, - 5,44,59,74,33, - 59, - 5, - 12,59, - 13,59, - 83, - 59, - 5,40,59,74, - 3,4,5,6,8,11,16,18,37,40,44,57,59,68,74,76,81, - 14,25,32,55,65, - 3,5,8,9,13,18,23,26,27,29,34,37,39,42,47,52,56,59,65,68,74,77,33, - 46,51, - 5,39,44,59,33, - 51, - 26,44,47,33, - 51, - 5,38,40,30,51,58,83, - 83, - 40, - 79, - 83, - 65,66, - 6,20,23,28,57,59,74, - 83, - 8, - 50,8,48, - 50, - 51,79, - 12,33, - 59,72, - 80, - 33, - 18,37,40,53,59,65, - 33, - 33, - 33, - 33, - 33, - 33, - 33, - 33, - 33, - 0,13,15,16,26,48,59,71,72,73,74,76,79,81,83, - 3, - 4, - 74, - 3, - 4,5,59,74, - 5, - 5, - 57,59, - 57,59, - 57, - 74, - 74, - 74, - 74, - 3, - 3, - 6, - 5,18,37,59, - 57, - 57, - 74, - 74, - 6,59, - 59, - 6,74, - 57, - 57, - 59, - 18,37,59, - 8, - 8, - 8, - 8, - 3, - 3,59,68, - 59, - 18,37, - 18,37, - 37, - 18, - 74, - 74, - 6, - 59, - 40, - 59, - 3, - 3, - 3, - 5, - 74, - 74, - 74, - 74, - 59, - 3, - 3, - 3,8,74, - 3, - 3,8,74, - 3,8, - 3,8,74, - 4, - 4, - 4, - 18, - 4,74, - 3, - 3, - 3, - 3, - 74, - 74, - 18, - 18, - 3, - 3, - 3, - 8, - 8, - 8, - 59, - 18, - 74, - 74, - 74, - 74, - 74, - 6, - 59, - 59, - 37, - 68, - 68, - 37, - 8, - 8, - 6, - 57, - 57, - 57, - 57, - 57, - 74, - 74, - 74, - 74, - 74, - 3, - 3, - 3, - 18, - 74, - 3, - 18,37,59, - 59, - 59,74, - 74, - 74, - 0,10,12,15,20,29,40,44,51,59,65,72,73,33, - 38,32,30, - 53, - 5, - 45,51,74,79, - 65, - 32, - 53, - 65, - 3,4,5,6,8,11,18,37,38,40,32,30,44,57,59,68,74,33, - 32, - 59, - 3,4,5,6,8,11,18,37,40,44,57,59,68,74, - 29, - 32,52, - 40, - 15, - 17, - 26,83, - 9,26,59, - 49,56, - 44,33, - 33, - 10,45,46,47,61,62,75, - 33, - 15, - 20, - 48, - 27,48, - 27, - 50, - 59,73, - 3, - 21, - 53, - 53, - 50,38,30, - 44,59,65, - 51, - 76, - 10, - 0, - 15, - 44, - 79, - 41,79, - 51, - 37, - 3,18,29,68, - 59, - 44,59, - 35, - 15, - 44,33, - 44,33, - 44,33, - 65, - 51,79, - 51,79, - 65, - 50, - 65, - 45,46,61,75,83, - 83, - 59, - 37,68, - 24,43, - 43,46, - 46, - 46, - 21, - 10,83, - 46,51,79, - 59, - 0,44,67,33, - 1,14, - 53, - 2,3,42,43,67,83, - 3, - 3, - 67, - 3,9,12,13,15,19,21,26,29,35,40,53,58,59,64,65,66,67,69,71,72,73,74,80,83, - 5, - 9, - 71, - 71, - 26, - 53, - 53, - 53, - 19,21,53,64,66,69,80, - 53, - 72, - 34, - 51, - 43,46,52,55,67,74,82, - 46, - 46, - 51,56, - 32,43,46,74, - 10,51, - 46, - 67,73, - 65, - 0,1,2,50,7,9,10,12,13,14,15,17,19,20,21,22,23,24,25,26,27,28,29,34,35,36,39,42,43,44,45,46,47,48,49,52,53,54,55,56,58,60,61,62,63,64,65,66,67,69,70,71,72,73,75,77,33,78,80,82,83, - 83, - 25,77, - 5,6,9,44,48,49,59,74,75,83, - 5, - 1,3,18,37,59,68,74, - 3,21, - 5,27, - 11,31, - 7,11,44,57,59,74, - 5,7,44,57,59,74, - 4,7,40,57, - 44,33, - 74, - 9,74, - 9,74, - 9,74, - 3,14, - 3,14, - 6,17, - 5,18,19,37,44,59, - 20,57,59, - 20,57, - 6,59, - 6,23,57,59,74, - 23,57, - 8,18,24,37,59, - 3,25, - 3,18,29,37,59,68,74, - 29,37, - 18,35, - 34,74, - 34,74, - 6,36, - 39,44,59, - 4,53, - 50,8, - 50,8, - 3,21, - 3,42, - 3,42, - 43,74, - 45,74, - 45,74, - 45,74, - 47, - 47, - 5,48, - 5,48, - 49,74, - 49,74, - 52,74, - 4,53, - 18,54, - 3,4,55, - 3,55, - 3,55,74, - 3,21, - 46,74, - 18,28,37, - 18,28,59,74, - 50,8, - 50,8, - 50,8, - 18,60, - 59,61,74, - 61,74, - 62,74, - 6,63, - 59,64, - 37,66, - 37,67,68, - 68, - 37,69, - 5,6,11,57,70, - 57, - 57,77, - 57,77, - 18,37,74,75, - 74,75, - 74,75, - 3,6,18,37,57,59,68,74,78, - 3,4,18,78, - 3,4,5,6,8,18,37,40,44,56,57,59,68,74, - 3,56, - 3,56, - 3,18,37,59,68,74,80, - 51,83, - 51, - 44,33, - 44,59,74, - 44,33, - 27,35,44,65, - 5, - 18, - 35, - 27,65,33, - 27,35,39,65,33, - 27, - 65, - 65, - 52,56,67,81, - 33, - 44,33, - 32, - 65, - 51, - 50, - 0,1,2,50,7,9,10,12,13,14,15,16,17,19,20,21,22,23,24,25,26,27,28,29,34,35,36,39,32,41,42,43,45,46,47,48,49,52,53,54,55,56,58,60,61,62,63,64,65,66,67,69,70,71,72,73,75,77,33,78,79,80,81,82,83, - 65, - 2,50,51,79, - 2,4, - 46, - 1,56, - 27,35,44,33, - 44, - 5, - 18, - 35, - 44,33, - 27,29,44,33, - 27,35,65,33, - 27, - 25,77, - 45,74, - 74, - 74, - 74, - 0,11,15,65,79,81, - 2,38,30, - 15,46, - 46,74, - 38,32,30,51,79, - 44,33, - 51,79, - 46,49, - 83, - 5,47,48,49,74, - 47,74, - 47,74, - 58, - 44,47,49,72,33, - 65, - 0,1,2,50,7,9,10,14,15,17,19,20,21,22,23,24,25,28,29,34,35,36,39,32,42,43,45,46,47,48,49,52,53,54,55,56,60,62,63,64,65,66,69,70,71,72,73,75,77,78,79,80,82,83, - 5,7,42,70, - 26, - 18,35, - 44, - 44, - 65, - 47,48,49, - 47,49, - 47,49, - 48, - 48, - 44, - 44, - 7,9,26,28,29,34,35,47,49,54,60,62,65,70,75, - 65, - 9,34,65,67,33, - 15,61, - 52, - 65, - 1,50,7,14,15,19,20,21,23,24,25,26,28,29,35,42,43,51,53,54,55,56,60,66,67,69,70,74,77,78,79,80,82,83, - 44, - 44, - 21, - 12, - 44, - 3,10,14,25,52,55,77, - 20, - 29, - 50, - 65, - 27,35,41,47,48,49,52,59,64,65,72,74,79, - 48, - 1,2,3,4,5,6,8,9,10,11,14,16,17,18,19,21,24,25,26,28,29,34,35,37,38,40,32,30,42,43,45,46,47,51,52,53,54,55,56,57,58,59,60,61,65,66,68,69,73,74,75,31,33,78,79,80,81,83, - 26,44,46,65, - 0,9,15,34,51,71,72,73,79,83, - 12, - 52,74, - 43,44,59,83, - 53,56, - 0,15,22,47,48,49,56,59,65,67,82, - 76, - 12,15,32,51,59,83, - 12,59, - 0,1,2,4,50,5,6,7,9,10,12,13,14,15,17,20,21,22,23,25,26,27,28,34,35,36,38,39,30,42,45,46,47,48,49,52,53,54,55,56,58,59,60,61,62,63,64,65,67,70,71,72,73,74,75,77,31,78,83, - 59,65, - 32, - 7, - 38,30, - 79,81, - 65, - 50, - 51, - 10,51, - 7,20,23,43,51,70,77,78, - 61, - 59, - 0,15,45,46,61,75, - 0,1,2,50,7,9,12,13,14,15,16,17,19,20,21,22,23,24,25,27,28,29,34,35,36,39,42,45,46,47,48,49,52,53,54,55,56,58,60,61,62,63,64,65,66,67,69,70,71,72,73,75,76,77,31,33,78,80,81,83, - 51,65, - 10, - 43,67, - 43, - 20,23,43,67, - 57, - 5, - 5, - 5, - 3, - 3,4,8,18,37,40,57,59,74, - 3,6,8,18,37,57,59,68,74, - 8, - 3, - 8, - 3,6,8,18,37,57,59,68,74, - 4,40, - 3,8,18,37,59,68,74, - 3,8,18,74, - 3,8,18,74, - 3, - 8,18, - 8,18, - 57, - 8,18, - 8, - 51, - 7,42,65, - 0,15,56,65, - 4,16,35,53,59,65,67,76,79,81, - 65, - 65, - 0, - 17,20,51, - 4,53, - 4, - 4, - 4, - 53, - 5,21,42,44,47,55,61,67, - 18,54, - 54, - 4,26,51,74, - 67, - 47,59,74, - 46, - 18,54, - 46,51,65, - 2,3,4,45,51,53,55,61,67,74,82,83, - 29,67,68,74,82, - 3, - 3, - 3, - 32, - 2, - 51,79, - 0,1,3,4,50,7,8,14,15,18,20,21,23,24,25,28,37,40,42,43,44,45,47,51,52,55,56,59,61,62,65,67,68,70,74,75,77,33,78,83, - 1,3,7,8,14,24,28,42,55,61,75,78, - 1,3,7,8,14,24,28,42,55,61,75,78, - 1,3,8,14,55, - 3,8, - 3, - 44,33, - 3,21, - 16,81, - 0,46,51,56,65,74,82, - 65, - 29, - 65, - 5,21,58,65,33, - 59,64, - 67, - 53, - 43,51, - 79, - 51, - 65,67, - 7,20,23,38,30,57,70,77, - 44,59,33, - 18,28,37,59,74, - 74, - 37,74, - 18, - 18, - 65, - 15,59,65,71, - 59,65, - 2,9,15,17,22,27,34,36,45,47,48,49,52,53,58,61,62,63,64,65,71,74,75, - 40, - 10, - 47,82, - 44, - 5,58, - 5,58, - 44,33, - 65, - 0,1,2,50,7,9,12,13,14,15,16,17,19,20,21,22,23,24,25,27,28,29,34,35,36,39,42,45,46,47,48,49,51,52,53,54,55,56,58,60,61,62,63,64,65,66,67,69,70,71,72,73,75,76,77,31,78,80,81,83, - 59, - 2, - 3,18,37,59,74, - 74, - 18,37,74, - 3,18,37,59,74, - 59, - 33, - 3,4,18,37,59,74, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 50,8,55,33, - 33, - 34,37,68, - 83, - 3,9,14,20,23,25,34,67,70,74,77, - 3,20,25,77, - 6,20,57,59,74, - 20,57, - 57, - 25,77, - 25,77, - 40,44,59, - 0,26,38,32,30,76, - 79, - 53, - 79, - 65, - 43,56, - 79, - 56, - 67, - 81, - 51,53,81, - 46, - 51, - 40,45,46,51,59,61,65,71,72,73,75,83, - 40,83, - 53, - 79, - 0,10,12,13,15,38,39,30,59,64,65,71,72,73, - 47,49, - 51,55, - 51, - 32,65, - 65, - 65, - 59, - 51, - 51, - 39,67, - 51, - 65, - 0,1,2,4,50,5,6,7,9,10,12,13,14,15,17,19,20,21,22,23,24,25,26,27,28,29,34,35,36,39,42,45,47,48,49,51,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,77,33,78,80,83, - 65, - 13, - 26,27,44,51,33,83, - 10,47,61, - 18,60,65, - 16,46,79,81, - 65, - 74, - 74, - 47,51,60,61,74, - 47,51,59,61,74, - 74, - 74, - 65, - 44,59, - 12,14,15,18,37,48,59,62,71,72,73,83, - 17,36,63, - 17,36,63, - 3,4,5,6,8,11,18,37,38,40,30,44,57,59,68,74, - 47,65,67,74,83, - 65, - 33, - 32,51, - 62,74, - 51, - 0,1,2,50,7,9,12,13,14,15,16,17,19,20,21,22,23,24,25,27,28,29,34,35,36,39,42,45,46,47,48,49,52,53,54,55,56,58,60,61,62,63,64,65,66,67,69,70,71,72,73,75,76,77,31,33,78,80,81,83, - 46,51,81, - 32, - 7,14,20,23,28,43,45,46,48,49,53,55,56,61,65,68,70,75,77,31,78,82, - 2,6,51,63,31, - 59, - 65,67, - 0,1,2,4,7,9,10,12,13,14,15,16,17,19,20,21,22,23,24,25,26,27,28,29,34,35,36,39,40,32,42,43,45,46,47,48,49,51,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,69,70,71,72,73,75,77,33,78,79,80,81,82,83, - 34,67,82,83, - 31, - 21,28,54,60, - 0,15,27,29,37,47,51,52,56,82, - 11,16, - 3,4,5,6,8,11,18,37,57,59,68,74,81, - 3,11,37,68,74,76, - 59,64, - 5,40,59,79, - 79,81, - 0,2,4,9,10,12,13,15,17,19,22,26,28,34,35,36,37,38,39,40,30,41,44,45,46,47,49,51,52,53,54,58,59,60,61,62,63,64,65,71,72,73,74,75,76,33,79,83, - 31,33, - 31,33, - 18,37, - 26, - 34,37,40,59,74,83, - 74, - 74, - 13, - 65, - 13,19,37,52,66,69,81, - 50,10,28,37,52,53,54,60,66,69, - 46,56,80,83, - 16,81, - 29, - 42,71,72,33, - 51,33, - 43, - 55, - 52, - 43, - 47,48,49, - 53, - 29, - 50,8, - 9,55,65, - 37,67,68, - 37, - 37,68, - 37,68, - 37, - 83, - 51,65, - 29,46, - 50,7,8,20,23,26,28,37,48,52,53,54,60,69,70,77, - 8, - 8, - 26, - 60, - 14,21,55,56,33,78, - 0,7,9,15,34,43,48,59,65,73,74, - 50, - 0,61, - 5,6,11,57,70,74, - 57, - 57, - 57, - 3,21, - 0,65, - 65, - 65, - 65, - 65, - 44, - 50, - 16,79, - 1,28,46,67,75,78, - 38,32,30,47,49, - 49, - 49, - 65, - 67, - 51, - 65, - 3,4,5,6,8,18,37,57,59,68,74, - 26,51,59,72,83, - 59, - 40, - 33, - 26,83, - 26, - 26, - 26,37,40,59,74, - 26, - 83, - 26, - 46, - 44, - 59, - 53, - 59,71,72,73, - 59,71, - 59,72, - 59,73, - 29,35,44,52,65,74,33, - 65, - 65, - 74, - 45,74, - 45, - 20,23,43,46,55,70,74,82, - 7,10,28,40,51,70, - 65, - 65,67, - 65, - 27,67, - 51, - 33, - 50, - 67,68, - 65, - 46, - 33, - 7,26,51,65,71,80,83, - 46, - 67, - 39,59,33, - 46, - 39, - 7,61, - 1,3,14,18,21,37,43,45,55,56,61,68,74,82, - 65,76, - 21,47,49,56,74, - 65, - 83, - 44, - 18,35, - 18,35, - 15,35,39,44,59,65,33, - 65, - 59,65, - 44,53,33, - 51,54, - 5, - 5, - 33, - 57,77, - 57, - 57, - 57, - 74, - 74, - 5,17,48,62,74, - 5, - 5,9,34,38,30,45,46,47,48,49,51,52,61,62,74,75, - 46,47,49,52,74,75, - 47,48,49,74,75, - 74, - 74, - 74, - 11,76,79, - 76,81, - 51, - 51, - 3,4,55, - 0,15,59,33, - 20, - 29, - 37,68, - 0,1,2,50,7,9,10,12,13,14,15,16,17,19,20,21,22,23,24,25,26,27,28,29,34,35,36,39,42,43,45,46,47,48,49,52,53,54,55,56,58,60,61,62,63,64,65,66,67,69,70,71,72,73,75,76,77,31,33,78,79,80,81,83, - 33, - 0,3,4,50,7,8,9,13,17,18,20,24,36,37,39,40,46,47,48,49,53,61,65,68,70,74,77,33,82,83, - 21,26,27,53,65,67,31,33,83, - 65, - 10,51, - 15,65, - 40, - 16,20,81, - 79, - 5,40,59, - 2,50,15,26,27,35,38,30,46,48,51,65,67,73,76,31,33,83, - 0,1,2,50,7,9,12,13,14,15,16,17,19,20,21,22,23,24,25,27,28,29,34,35,36,39,42,45,46,47,48,49,52,53,54,55,56,58,60,61,62,63,64,65,66,67,69,70,71,72,73,75,76,77,31,78,79,80,81,83, - 6,57,59,74, - 50, - 50, - 50, - 50, - 0, - 44, - 44, - 44,59,33, - 33, - 0,2,7,9,15,20,23,28,34,39,41,43,44,46,47,49,52,55,59,60,64,65,67,70,75,77,33,78, - 26, - 65, - 3,4,6,14,18,20,23,25,28,37,42,43,45,47,49,55,57,59,60,61,65,67,68,74,75,77,78,82, - 3,68, - 3,18, - 18, - 18, - 3,18, - 18, - 18, - 18, - 65, - 53, - 3,4,6,14,15,18,20,23,24,25,28,37,44,45,54,55,56,57,59,60,62,70,74,77,33, - 56, - 24, - 24, - 33, - 33, - 1,3,50,5,7,8,15,18,24,26,28,37,40,42,55,57,59,68,74,75,78, - 50,7,29,32,42,51,67,70, - 65, - 0,9,11,15,34,43,51,71,72,73,33,79,80,81,83, - 51, - 51, - 44,33, - 74, - 74, - 74, - 74, - 74, - 3,18,37,59,74, - 4, - 74, - 59, - 59, - 2, - 2,4, - 7,26,28,42,45,47,70,83, - 2,4, - 65,33, - 68, - 44, - 44,33, - 33, - 12,18,37,44,65,81, - 29,33, - 38,30, - 0,1,2,50,7,9,10,12,13,14,15,17,19,20,21,22,23,24,25,26,27,28,29,34,35,36,39,32,42,45,46,47,48,49,51,52,53,54,55,56,58,60,61,62,63,64,65,66,67,69,70,71,72,73,75,77,78,80,83, - 3,50,12,15,18,26,28,29,37,44,54,59,60,67,68,72,73,74,80, - 59, - 59, - 18, - 18, - 79,81, - 10,26,32,51, - 15,41,79, - 59, - 38,30,47,51,65,67,82,83, - 67, - 37,68, - 3,7,25,43,46,56,67,70,33, - 7, - 7, - 43, - 43, - 43, - 44,33, - 44,33, - 67, - 82, - 5, - 5, - 3,7,25,43,56,67,70,33, - 7, - 7, - 43, - 43, - 43, - 44,33, - 44,33, - 16,32,64,72,79,82,83, - 5, - 5, - 2,3,7,43,56,70,33, - 7, - 7, - 20, - 44,33, - 44,33, - 51, - - diff --git a/doc/salome/gui/GEOM/whxdata/whgdata0.xml b/doc/salome/gui/GEOM/whxdata/whgdata0.xml deleted file mode 100755 index b0993a043..000000000 --- a/doc/salome/gui/GEOM/whxdata/whgdata0.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/salome/gui/GEOM/whxdata/whglo.xml b/doc/salome/gui/GEOM/whxdata/whglo.xml deleted file mode 100755 index ac67056d3..000000000 --- a/doc/salome/gui/GEOM/whxdata/whglo.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/doc/salome/gui/GEOM/whxdata/whidx.xml b/doc/salome/gui/GEOM/whxdata/whidx.xml deleted file mode 100755 index 44f05e5be..000000000 --- a/doc/salome/gui/GEOM/whxdata/whidx.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/doc/salome/gui/GEOM/whxdata/whtdata0.xml b/doc/salome/gui/GEOM/whxdata/whtdata0.xml deleted file mode 100755 index 9f521a7b6..000000000 --- a/doc/salome/gui/GEOM/whxdata/whtdata0.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/salome/gui/GEOM/whxdata/whtoc.xml b/doc/salome/gui/GEOM/whxdata/whtoc.xml deleted file mode 100755 index 871ec25b9..000000000 --- a/doc/salome/gui/GEOM/whxdata/whtoc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/doc/salome/gui/Makefile.am b/doc/salome/gui/Makefile.am index dec4ee81c..dc15d1047 100644 --- a/doc/salome/gui/Makefile.am +++ b/doc/salome/gui/Makefile.am @@ -35,6 +35,8 @@ doxygen=@DOXYGEN@ # usr_docs: cd ./GEOM; \ + echo "Running doxygen in directory: "`pwd`; \ + $(doxygen) ./doxyfile_tui; \ echo "Processing geompyDC.py file: "; \ $(doxygen) ./doxyfile_py; \ cd ./geompy_doc; \ @@ -43,7 +45,9 @@ usr_docs: sed 's/\([^s1e]\)geompyDC\|^geompyDC/\1geompy/g' $${filen} > ./tmp1; \ sed 's/geompy\.geompy/geompy/g' ./tmp1 > ./tmp; \ rm -f tmp1; \ - mv -f tmp $${filen}; \ + sed 's/geompy::geompy/geompy/g' ./tmp > ./tmp1; \ + rm -f tmp; \ + mv -f tmp1 $${filen}; \ done; \ cd ..; \ echo "Running doxygen in directory: "`pwd`; \ diff --git a/idl/GEOM_Gen.idl b/idl/GEOM_Gen.idl index 4c30ee600..26a9368dc 100644 --- a/idl/GEOM_Gen.idl +++ b/idl/GEOM_Gen.idl @@ -11,8 +11,8 @@ // 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 +// 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 @@ -36,7 +36,7 @@ module GEOM * Topological types of shapes (like Open Cascade types) */ enum shape_type { COMPOUND, COMPSOLID, SOLID, SHELL, - FACE, WIRE, EDGE, VERTEX, SHAPE }; + FACE, WIRE, EDGE, VERTEX, SHAPE }; /*! @@ -76,6 +76,32 @@ module GEOM ST_ONIN }; + /*! + * Kind of method to find inside one main shape some subshapes, + * corresponding to other given shape (its argument) + * Is used in functions GEOM_Gen.RestoreSubShapes() + */ + enum find_shape_method + { + /*! Use GetInPlace functionality. Suits all cases, except transformations */ + FSM_GetInPlace, + + /*! To be used only for transformation result, to find subshapes of argument. + * Only this method can be used after transformation. + */ + FSM_Transformed, + + /*! To find only shared subshapes, not modified by the operation */ + FSM_GetSame, + + /*! Use GetShapesOnShape method (can work only on solids) */ + FSM_GetShapesOnShape, + + /*! Use GetInPlaceByHistory method (can work only after Partition) */ + FSM_GetInPlaceByHistory + }; + + typedef sequence string_array; typedef sequence short_array; typedef sequence ListOfLong; @@ -287,6 +313,18 @@ module GEOM GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve, in double theParameter); + /*! + * Create a point, corresponding to the given parameters on the + * given surface. + * \param theRefSurf The referenced surface. + * \param theUParameter Value of U-parameter on the referenced surface. + * \param theVParameter Value of V-parameter on the referenced surface. + * \return New GEOM_Object, containing the created point. + */ + GEOM_Object MakePointOnSurface (in GEOM_Object theRefSurf, + in double theUParameter, + in double theVParameter); + /*! * Create a point, on two lines intersection. * \param theRefLine1, theRefLine2 The referenced lines. @@ -294,13 +332,13 @@ module GEOM */ GEOM_Object MakePointOnLinesIntersection (in GEOM_Object theRefLine1, in GEOM_Object theRefLine2); - + /*! * Create a vector, corresponding to tangent to the given parameter on the given curve. * \param theRefCurve The referenced curve. * \param theParameter Value of parameter on the referenced curve.This value should be have value * \between 0. and 1.. Value of 0. corresponds first parameter of curve value 1. corresponds - * \last parameter of curve. + * \last parameter of curve. * \return New GEOM_Object, containing the created point. */ GEOM_Object MakeTangentOnCurve (in GEOM_Object theRefCurve, @@ -394,11 +432,11 @@ module GEOM GEOM_Object MakeMarker (in double theOX , in double theOY , in double theOZ, in double theXDX, in double theXDY, in double theXDZ, in double theYDX, in double theYDY, in double theYDZ); - + /*! * Create a tangent plane to specified face in the point with specified parameters. * Values of parameters should be between 0. and 1.0 - * \param theFace - face for which tangent plane shuold be built. + * \param theFace - face for which tangent plane shuold be built. * \param theParameterU - value of parameter by U * \param theParameterV - value of parameter Vthe * \param theTrimSize - defines sizes of created face @@ -474,6 +512,20 @@ module GEOM GEOM_Object TranslateVectorCopy (in GEOM_Object theObject, in GEOM_Object theVector); + /*! + * Translate the given object along the given vector on given distance, + * creating its copy before the translation. + * \param theObject The object to be translated. + * \param theVector Translation vector, giving a direction. + * \param theDistance Translation distance, giving a distance. + * \param theCope Translation copy, creating its copy if true. + * \return New GEOM_Object, containing the translated object. + */ + GEOM_Object TranslateVectorDistance (in GEOM_Object theObject, + in GEOM_Object theVector, + in double theDistance, + in boolean theCopy); + /*! * Translate the given object along the given vector a given number times * \param theObject The object to be translated. @@ -683,6 +735,33 @@ module GEOM GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint, in double theFactor); + /*! + * Scale the given object by different factors along coordinate axes. + * \param theObject The object to be scaled. + * \param thePoint Center point for scaling. + * \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis. + * \return theObject. + */ + GEOM_Object ScaleShapeAlongAxes (in GEOM_Object theObject, + in GEOM_Object thePoint, + in double theFactorX, + in double theFactorY, + in double theFactorZ); + + /*! + * Scale the given object by different factors along coordinate axes, + * creating its copy before the scaling. + * \param theObject The object to be scaled. + * \param thePoint Center point for scaling. + * \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis. + * \return New GEOM_Object, containing the scaled shape. + */ + GEOM_Object ScaleShapeAlongAxesCopy (in GEOM_Object theObject, + in GEOM_Object thePoint, + in double theFactorX, + in double theFactorY, + in double theFactorZ); + /*! * Modify the Location of the given object by LCS. * \param theObject The object to be displaced. @@ -937,7 +1016,7 @@ module GEOM in GEOM_Object thePath, in boolean theWithContact , in boolean theWithCorrection ); - + /*! * Create a shape by extrusion of the profile shape along * the path shape. The path shape can be a shell or a face. @@ -1271,7 +1350,7 @@ module GEOM in long theShapeType, in GEOM_Object theAx1, in shape_state theState); - + /*! * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively * the specified plane by the certain way, defined through \a theState parameter. @@ -1279,7 +1358,7 @@ module GEOM * \param theShapeType Type of sub-shapes to be retrieved. * \param theAx1 Vector (or line, or linear edge), specifying normal * direction of the plane to find shapes on. - * \param thePnt Point specifying location of the plane to find shapes on. + * \param thePnt Point specifying location of the plane to find shapes on. * \param theState The state of the subshapes to find. * \return List of IDs of all found sub-shapes. */ @@ -1368,6 +1447,45 @@ module GEOM in long theShapeType, in shape_state theState); + /*! + * \brief Find subshapes complying with given status + * \param theCheckShape - the shape to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \return List of IDs of all found sub-shapes. + */ + ListOfLong GetShapesOnShapeIDs (in GEOM_Object theCheckShape, + in GEOM_Object theShape, + in short theShapeType, + in shape_state theState); + + /*! + * \brief Find subshapes complying with given status + * \param theCheckShape - the shape to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \return List of all found sub-shapes. + */ + ListOfGO GetShapesOnShape (in GEOM_Object theCheckShape, + in GEOM_Object theShape, + in short theShapeType, + in shape_state theState); + + /*! + * \brief Find subshapes complying with given status + * \param theCheckShape - the shape to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \return compound includes all found sub-shapes. + */ + GEOM_Object GetShapesOnShapeAsCompound (in GEOM_Object theCheckShape, + in GEOM_Object theShape, + in short theShapeType, + in shape_state theState); + /*! * Get sub-shape(s) of \a theShapeWhere, which are * coincident with \a theShapeWhat or could be a part of it. @@ -2037,7 +2155,7 @@ module GEOM GEOM_Object MakeChamferEdge (in GEOM_Object theShape, in double theD1, in double theD2, in long theFace1, in long theFace2); - /*! + /*! * The Same but with params theD = Chamfer Lenght * and theAngle = Chamfer Angle (Angle in radians) */ @@ -2061,7 +2179,7 @@ module GEOM GEOM_Object MakeChamferFaces (in GEOM_Object theShape, in double theD1, in double theD2, in ListOfLong theFaces); - /*! + /*! * The Same but with params theD = Chamfer Lenght * and theAngle = Chamfer Angle (Angle in radians) */ @@ -2080,7 +2198,7 @@ module GEOM GEOM_Object MakeChamferEdges (in GEOM_Object theShape, in double theD1, in double theD2, in ListOfLong theEdges); - /*! + /*! * The Same but with params theD = Chamfer Lenght * and theAngle = Chamfer Angle (Angle in radians) */ @@ -2490,6 +2608,59 @@ module GEOM * Get point coordinates */ void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z); + + /*! + * Get radius of curvature of curve in the point determinated by param + * \param theShape - curve. + * \param theParam - parameter on curve + * \return Value of curvature. + */ + double CurveCurvatureByParam (in GEOM_Object theShape, in double theParam); + + /*! + * Get radius of curvature of curve in the given point + * \param theShape - curve. + * \param thePoint - point + * \return Value of curvature. + */ + double CurveCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint); + + /*! + * Get max radius of curvature of surface in the point determinated by params + * \param theShape - surface. + * \param theUParam - U-parameter on surface + * \param theVParam - V-parameter on surface + * \return Value of curvature. + */ + double MaxSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam, + in double theVParam); + + /*! + * Get max radius of curvature of surface in the given point + * \param theShape - surface. + * \param thePoint - point + * \return Value of curvature. + */ + double MaxSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint); + + /*! + * Get min radius of curvature of surface in the point determinated by params + * \param theShape - surface. + * \param theUParam - U-parameter on surface + * \param theVParam - V-parameter on surface + * \return Value of curvature. + */ + double MinSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam, + in double theVParam); + + /*! + * Get min radius of curvature of surface in the given point + * \param theShape - surface. + * \param thePoint - point + * \return Value of curvature. + */ + double MinSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint); + }; @@ -2586,7 +2757,7 @@ module GEOM void Redo (in long theStudyID); /*! - * Publishing manangement + * Publishing management * Adds in theStudy a object theObject under with a name theName, * if theFather is not NULL the object is placed under thFather's SObject. * Returns a SObject where theObject is placed @@ -2596,6 +2767,45 @@ module GEOM in string theName, in GEOM_Object theFather); + /*! + * Publish sub-shapes, standing for arguments and sub-shapes of arguments + * To be used from python scripts out of geompy.addToStudy (non-default usage) + * \param theStudy the study, in which theObject is published already, + * and in which the arguments will be published + * \param theObject published GEOM object, arguments of which will be published + * \param theArgs list of GEOM_Object, operation arguments to be published. + * If this list is empty, all operation arguments will be published + * \param theFindMethod method to search subshapes, corresponding to arguments and + * their subshapes. Value from enumeration GEOM::find_shape_method. + * \param theInheritFirstArg set properties of the first argument for \a theObject. + * Do not publish subshapes in place of arguments, but only + * in place of subshapes of the first argument, + * because the whole shape corresponds to the first argument. + * Mainly to be used after transformations, but it also can be + * usefull after partition with one object shape, and some other + * operations, where only the first argument has to be considered. + * If theObject has only one argument shape, this flag is automatically + * considered as True, not regarding really passed value. + * \return True in case of success, False otherwise. + */ + boolean RestoreSubShapesO (in SALOMEDS::Study theStudy, + in GEOM_Object theObject, + in ListOfGO theArgs, + in find_shape_method theFindMethod, + in boolean theInheritFirstArg); + + /*! + * Publish sub-shapes, standing for arguments and sub-shapes of arguments + * To be used from GUI and from geompy.addToStudy. + * Work like the above method, but accepts study object theSObject instead of GEOM_Object. + * \param theSObject study object, referencing GEOM object, arguments of which will be published + */ + boolean RestoreSubShapesSO (in SALOMEDS::Study theStudy, + in SALOMEDS::SObject theSObject, + in ListOfGO theArgs, + in find_shape_method theFindMethod, + in boolean theInheritFirstArg); + /*! * Methods to access interfaces for objects creation and transformation */ diff --git a/idl/GEOM_Superv.idl b/idl/GEOM_Superv.idl index 98d819daf..d0f2f4034 100644 --- a/idl/GEOM_Superv.idl +++ b/idl/GEOM_Superv.idl @@ -249,6 +249,10 @@ module GEOM in GEOM_Object theVector) ; GEOM_Object TranslateVectorCopy (in GEOM_Object theObject, in GEOM_Object theVector) ; + GEOM_Object TranslateVectorDistance (in GEOM_Object theObject, + in GEOM_Object theVector, + in double theDistance, + in boolean theCopy) ; GEOM_Object MultiTranslate1D (in GEOM_Object theObject, in GEOM_Object theVector, in double theStep, @@ -305,6 +309,16 @@ module GEOM GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint, in double theFactor) ; + GEOM_Object ScaleShapeAlongAxes (in GEOM_Object theObject, + in GEOM_Object thePoint, + in double theFactorX, + in double theFactorY, + in double theFactorZ); + GEOM_Object ScaleShapeAlongAxesCopy (in GEOM_Object theObject, + in GEOM_Object thePoint, + in double theFactorX, + in double theFactorY, + in double theFactorZ); GEOM_Object PositionShape (in GEOM_Object theObject, in GEOM_Object theStartLCS, in GEOM_Object theEndLCS) ; @@ -342,6 +356,15 @@ module GEOM long NumberOfEdges (in GEOM_Object theShape) ; GEOM_Object ChangeOrientation (in GEOM_Object theShape) ; + GEOM_List GetShapesOnShape (in GEOM_Object theCheckShape, + in GEOM_Object theShape, + in short theShapeType, + in shape_state theState); + GEOM_Object GetShapesOnShapeAsCompound (in GEOM_Object theCheckShape, + in GEOM_Object theShape, + in short theShapeType, + in shape_state theState); + //-----------------------------------------------------------// // BlocksOperations // //-----------------------------------------------------------// diff --git a/resources/Makefile.am b/resources/Makefile.am index 817529dfa..5773224e3 100644 --- a/resources/Makefile.am +++ b/resources/Makefile.am @@ -114,6 +114,7 @@ planeworkingvector.png \ planeworkingorigin.png \ point2.png \ pointonedge.png \ +pointonface.png \ point_line_intersection.png \ polyline.png \ prism.png \ @@ -122,10 +123,12 @@ revol.png \ rotate.png \ rotatepnt.png \ scale.png \ +scale_along_axes.png \ section.png \ select1.png \ sewing.png \ shading.png \ +shapesonshape.png \ sketch.png \ sphere.png \ spheredxyz.png \ diff --git a/resources/pointonface.png b/resources/pointonface.png new file mode 100755 index 000000000..fa0f8cb42 Binary files /dev/null and b/resources/pointonface.png differ diff --git a/resources/scale_along_axes.png b/resources/scale_along_axes.png new file mode 100644 index 000000000..06a38911c Binary files /dev/null and b/resources/scale_along_axes.png differ diff --git a/resources/shapesonshape.png b/resources/shapesonshape.png new file mode 100755 index 000000000..05ac19352 Binary files /dev/null and b/resources/shapesonshape.png differ diff --git a/src/BasicGUI/BasicGUI_ArcDlg.cxx b/src/BasicGUI/BasicGUI_ArcDlg.cxx index 50a0104be..4446ed790 100644 --- a/src/BasicGUI/BasicGUI_ArcDlg.cxx +++ b/src/BasicGUI/BasicGUI_ArcDlg.cxx @@ -367,6 +367,24 @@ static bool isEqual( const GEOM::GEOM_Object_var& thePnt1, const GEOM::GEOM_Obje //================================================================================= bool BasicGUI_ArcDlg::isValid( QString& msg ) { + switch (getConstructorId()) { + case 0: + { + if (Group3Pnts->LineEdit1->text().trimmed().isEmpty() || + Group3Pnts->LineEdit2->text().trimmed().isEmpty() || + Group3Pnts->LineEdit3->text().trimmed().isEmpty()) + return false; + break; + } + case 1: + { + if (Group3Pnts2->LineEdit1->text().trimmed().isEmpty() || + Group3Pnts2->LineEdit2->text().trimmed().isEmpty() || + Group3Pnts2->LineEdit3->text().trimmed().isEmpty()) + return false; + break; + } + } return !myPoint1->_is_nil() && !myPoint2->_is_nil() && !myPoint3->_is_nil() && !isEqual( myPoint1, myPoint2 ) && !isEqual( myPoint1, myPoint3 ) && !isEqual( myPoint2, myPoint3 ); } diff --git a/src/BasicGUI/BasicGUI_CurveDlg.cxx b/src/BasicGUI/BasicGUI_CurveDlg.cxx index cf5023b5f..a3e278ad1 100644 --- a/src/BasicGUI/BasicGUI_CurveDlg.cxx +++ b/src/BasicGUI/BasicGUI_CurveDlg.cxx @@ -295,7 +295,8 @@ void BasicGUI_CurveDlg::SelectionIntoArgument() //Find Object in study _PTR(SObject) obj ( aDStudy->FindObjectID( anIt.Value()->getEntry() ) ); bool inStudy = false; - for (_PTR(ChildIterator) iit ( aDStudy->NewChildIterator( obj ) ); iit->More(); iit->Next() ) { + _PTR(ChildIterator) iit( aDStudy->NewChildIterator( obj ) ); + for (; iit->More() && !inStudy; iit->Next()) { _PTR(SObject) child( iit->Value() ); QString aChildName = child->GetName().c_str(); if ( aChildName == aName ) { diff --git a/src/BasicGUI/BasicGUI_PointDlg.cxx b/src/BasicGUI/BasicGUI_PointDlg.cxx index 47d1bf705..59b1121cc 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.cxx +++ b/src/BasicGUI/BasicGUI_PointDlg.cxx @@ -65,6 +65,7 @@ BasicGUI_PointDlg::BasicGUI_PointDlg( GeometryGUI* theGeometryGUI, QWidget* pare QPixmap image2( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); QPixmap image3( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_POINT_REF" ) ) ); QPixmap image4( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_POINT_LINES") ) ); + QPixmap image5( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_POINT_FACE" ) ) ); setWindowTitle( tr( "GEOM_POINT_TITLE" ) ); @@ -75,6 +76,8 @@ BasicGUI_PointDlg::BasicGUI_PointDlg( GeometryGUI* theGeometryGUI, QWidget* pare mainFrame()->RadioButton3->setIcon( image1 ); mainFrame()->RadioButton4->show(); mainFrame()->RadioButton4->setIcon( image4 ); + mainFrame()->RadioButton5->show(); + mainFrame()->RadioButton5->setIcon( image5 ); GroupXYZ = new DlgRef_3Spin( centralWidget() ); GroupXYZ->GroupBox1->setTitle( tr( "GEOM_COORDINATES" ) ); @@ -88,6 +91,13 @@ BasicGUI_PointDlg::BasicGUI_PointDlg( GeometryGUI* theGeometryGUI, QWidget* pare GroupOnCurve->TextLabel2->setText( tr( "GEOM_PARAMETER" ) ); GroupOnCurve->PushButton1->setIcon( image2 ); + GroupOnSurface = new DlgRef_1Sel2Spin( centralWidget() ); + GroupOnSurface->GroupBox1->setTitle( tr( "GEOM_PARAM_POINT" ) ); + GroupOnSurface->TextLabel1->setText( tr( "GEOM_FACE" ) ); + GroupOnSurface->TextLabel2->setText( tr( "GEOM_UPARAMETER" ) ); + GroupOnSurface->TextLabel3->setText( tr( "GEOM_VPARAMETER" ) ); + GroupOnSurface->PushButton1->setIcon( image2 ); + GroupRefPoint = new DlgRef_1Sel3Spin( centralWidget() ); GroupRefPoint->GroupBox1->setTitle( tr( "GEOM_REF_POINT" ) ); GroupRefPoint->TextLabel1->setText( tr( "GEOM_POINT" ) ); @@ -119,6 +129,7 @@ BasicGUI_PointDlg::BasicGUI_PointDlg( GeometryGUI* theGeometryGUI, QWidget* pare layout->setMargin( 0 ); layout->setSpacing( 6 ); layout->addWidget( GroupXYZ ); layout->addWidget( GroupOnCurve ); + layout->addWidget( GroupOnSurface ); layout->addWidget( GroupRefPoint ); layout->addWidget( GroupLineIntersection ); layout->addWidget( myCoordGrp ); @@ -137,8 +148,7 @@ BasicGUI_PointDlg::BasicGUI_PointDlg( GeometryGUI* theGeometryGUI, QWidget* pare myY->setPalette( aPal ); myZ->setPalette( aPal ); - // setHelpFileName( "create_point_page.html" ); - setHelpFileName( "point.htm" ); + setHelpFileName( "create_point_page.html" ); Init(); } @@ -160,6 +170,7 @@ BasicGUI_PointDlg::~BasicGUI_PointDlg() void BasicGUI_PointDlg::Init() { GroupOnCurve->LineEdit1->setReadOnly( true ); + GroupOnSurface->LineEdit1->setReadOnly( true ); GroupRefPoint->LineEdit1->setReadOnly( true ); GroupLineIntersection->LineEdit1->setReadOnly( true ); GroupLineIntersection->LineEdit2->setReadOnly( true ); @@ -193,6 +204,11 @@ void BasicGUI_PointDlg::Init() initSpinBox( GroupOnCurve->SpinBox_DX, 0., 1., step, 3 ); // VSR:TODO : DBL_DIGITS_DISPLAY GroupOnCurve->SpinBox_DX->setValue( 0.5 ); + initSpinBox( GroupOnSurface->SpinBox_DX, 0., 1., step, 3 ); // VSR:TODO : DBL_DIGITS_DISPLAY + GroupOnSurface->SpinBox_DX->setValue( 0.5 ); + initSpinBox( GroupOnSurface->SpinBox_DY, 0., 1., step, 3 ); // VSR:TODO : DBL_DIGITS_DISPLAY + GroupOnSurface->SpinBox_DY->setValue( 0.5 ); + /* signals and slots connections */ connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) ); connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ); @@ -205,18 +221,23 @@ void BasicGUI_PointDlg::Init() connect( GroupOnCurve->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); connect( GroupOnCurve->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); + connect( GroupOnSurface->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); + connect( GroupOnSurface->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); + connect( GroupLineIntersection->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); connect( GroupLineIntersection->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); connect( GroupLineIntersection->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); connect( GroupLineIntersection->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); - connect( GroupOnCurve->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); - connect( GroupXYZ->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); - connect( GroupXYZ->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); - connect( GroupXYZ->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); - connect( GroupRefPoint->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); - connect( GroupRefPoint->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); - connect( GroupRefPoint->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); + connect( GroupOnCurve->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); + connect( GroupOnSurface->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); + connect( GroupOnSurface->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); + connect( GroupXYZ->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); + connect( GroupXYZ->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); + connect( GroupXYZ->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); + connect( GroupRefPoint->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); + connect( GroupRefPoint->SpinBox_DY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); + connect( GroupRefPoint->SpinBox_DZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) ); connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); @@ -242,6 +263,8 @@ void BasicGUI_PointDlg::SetDoubleSpinBoxStep( double step ) GroupRefPoint->SpinBox_DX->setSingleStep(step); GroupRefPoint->SpinBox_DY->setSingleStep(step); GroupRefPoint->SpinBox_DZ->setSingleStep(step); + GroupOnSurface->SpinBox_DX->setSingleStep(step); + GroupOnSurface->SpinBox_DY->setSingleStep(step); } @@ -261,6 +284,7 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId) GroupRefPoint->hide(); GroupOnCurve->hide(); GroupLineIntersection->hide(); + GroupOnSurface->hide(); myCoordGrp->hide(); @@ -278,6 +302,7 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId) GroupXYZ->hide(); GroupOnCurve->hide(); GroupLineIntersection->hide(); + GroupOnSurface->hide(); GroupRefPoint->show(); @@ -295,6 +320,7 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId) GroupXYZ->hide(); GroupRefPoint->hide(); GroupLineIntersection->hide(); + GroupOnSurface->hide(); GroupOnCurve->show(); @@ -314,12 +340,31 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId) GroupXYZ->hide(); GroupRefPoint->hide(); GroupOnCurve->hide(); + GroupOnSurface->hide(); myCoordGrp->hide(); GroupLineIntersection->show(); break; } + case 4: + { + myEditCurrentArgument = GroupOnSurface->LineEdit1; + myEditCurrentArgument->setText( "" ); + myFace = GEOM::GEOM_Object::_nil(); + + localSelection( GEOM::GEOM_Object::_nil(), TopAbs_FACE ); + + GroupXYZ->hide(); + GroupRefPoint->hide(); + GroupOnCurve->hide(); + GroupLineIntersection->hide(); + + GroupOnSurface->show(); + + myCoordGrp->show(); + break; + } } myX->setText( "" ); @@ -368,12 +413,13 @@ void BasicGUI_PointDlg::SelectionIntoArgument() { const int id = getConstructorId(); - if ( ( id == 1 || id == 2 ) && myEditCurrentArgument != 0 ) { + if ( ( id == 1 || id == 2 || id == 4 ) && myEditCurrentArgument != 0 ) + { myEditCurrentArgument->setText( "" ); myX->setText( "" ); myY->setText( "" ); myZ->setText( "" ); - myRefPoint = myEdge = GEOM::GEOM_Object::_nil(); + myRefPoint = myEdge = myFace = GEOM::GEOM_Object::_nil(); } if ( IObjectCount() == 1 ) { @@ -388,6 +434,8 @@ void BasicGUI_PointDlg::SelectionIntoArgument() TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX; if ( id == 2 || id == 3 ) aNeedType = TopAbs_EDGE; + else if ( id == 4 ) + aNeedType = TopAbs_FACE; LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr(); TColStd_IndexedMapOfInteger aMap; @@ -444,6 +492,11 @@ void BasicGUI_PointDlg::SelectionIntoArgument() myEditCurrentArgument->setText( aName ); } } + else if ( id == 4 ) + { + myFace = aSelectedObject; + GroupOnSurface->LineEdit1->setText( aName ); + } } } @@ -491,6 +544,13 @@ void BasicGUI_PointDlg::SetEditCurrentArgument() localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE ); } + else if ( send == GroupOnSurface->PushButton1 ) + { + GroupOnSurface->LineEdit1->setFocus(); + myEditCurrentArgument = GroupOnSurface->LineEdit1; + + localSelection( GEOM::GEOM_Object::_nil(), TopAbs_FACE ); + } else if ( send == GroupLineIntersection->PushButton1 ) { GroupLineIntersection->LineEdit1->setFocus(); myEditCurrentArgument = GroupLineIntersection->LineEdit1; @@ -558,6 +618,27 @@ double BasicGUI_PointDlg::getParameter() const return GroupOnCurve->SpinBox_DX->value(); } + +//================================================================================= +// funcion : getUParameter() +// purpose : +//================================================================================= +double BasicGUI_PointDlg::getUParameter() const +{ + return GroupOnSurface->SpinBox_DX->value(); +} + + +//================================================================================= +// funcion : getVParameter() +// purpose : +//================================================================================= +double BasicGUI_PointDlg::getVParameter() const +{ + return GroupOnSurface->SpinBox_DY->value(); +} + + //================================================================================= // function : OnPointSelected // purpose : @@ -597,6 +678,8 @@ bool BasicGUI_PointDlg::isValid( QString& /*msg*/ ) return !myEdge->_is_nil(); else if ( id == 3 ) return ( !myLine1->_is_nil() && !myLine2->_is_nil() ); + else if ( id == 4 ) + return !myFace->_is_nil(); return false; } @@ -642,11 +725,18 @@ bool BasicGUI_PointDlg::execute( ObjectList& objects ) MakePointOnLinesIntersection( myLine1, myLine2 ); res = true; break; + case 4 : + anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )-> + MakePointOnSurface( myFace, getUParameter(), getVParameter() ); + res = true; + break; } - if ( getConstructorId() == 1 || getConstructorId() == 2 ) { + if ( getConstructorId() == 1 || getConstructorId() == 2 || + getConstructorId() == 4 ) { TopoDS_Shape aShape; - if ( GEOMBase::GetShape( anObj, aShape ) && !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) { + if ( GEOMBase::GetShape( anObj, aShape ) && !aShape.IsNull() && + aShape.ShapeType() == TopAbs_VERTEX ) { gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) ); myX->setText( QString( "%1" ).arg( aPnt.X() ) ); myY->setText( QString( "%1" ).arg( aPnt.Y() ) ); @@ -687,6 +777,9 @@ void BasicGUI_PointDlg::addSubshapesToStudy() objMap[GroupLineIntersection->LineEdit1->text()] = myLine1; objMap[GroupLineIntersection->LineEdit2->text()] = myLine2; break; + case 4: + objMap[GroupOnSurface->LineEdit1->text()] = myFace; + break; } addSubshapesToFather( objMap ); } diff --git a/src/BasicGUI/BasicGUI_PointDlg.h b/src/BasicGUI/BasicGUI_PointDlg.h index 35d558126..5f36db2e1 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.h +++ b/src/BasicGUI/BasicGUI_PointDlg.h @@ -32,6 +32,7 @@ class DlgRef_1Sel1Spin; class DlgRef_3Spin; class DlgRef_2Sel; class DlgRef_1Sel3Spin; +class DlgRef_1Sel2Spin; class QLineEdit; class QGroupBox; @@ -65,9 +66,12 @@ private: void Init(); void enterEvent( QEvent* ); double getParameter() const; + double getUParameter() const; + double getVParameter() const; private: GEOM::GEOM_Object_var myEdge; + GEOM::GEOM_Object_var myFace; GEOM::GEOM_Object_var myRefPoint; GEOM::GEOM_Object_var myLine1; GEOM::GEOM_Object_var myLine2; @@ -76,6 +80,7 @@ private: DlgRef_1Sel3Spin* GroupRefPoint; DlgRef_1Sel1Spin* GroupOnCurve; DlgRef_2Sel* GroupLineIntersection; + DlgRef_1Sel2Spin* GroupOnSurface; QGroupBox* myCoordGrp; QLineEdit* myX; diff --git a/src/BooleanGUI/BooleanGUI_Dialog.cxx b/src/BooleanGUI/BooleanGUI_Dialog.cxx index d5b5d1832..cb5ca5b10 100644 --- a/src/BooleanGUI/BooleanGUI_Dialog.cxx +++ b/src/BooleanGUI/BooleanGUI_Dialog.cxx @@ -129,6 +129,8 @@ BooleanGUI_Dialog::~BooleanGUI_Dialog() //================================================================================= void BooleanGUI_Dialog::Init() { + mainFrame()->GroupBoxPublish->show(); + /* init variables */ myEditCurrentArgument = myGroup->LineEdit1; @@ -292,9 +294,25 @@ bool BooleanGUI_Dialog::execute( ObjectList& objects ) { GEOM::GEOM_Object_var anObj; - anObj = GEOM::GEOM_IBooleanOperations::_narrow( getOperation() )->MakeBoolean( myObject1, myObject2, myOperation ); + anObj = GEOM::GEOM_IBooleanOperations::_narrow( getOperation() )-> + MakeBoolean( myObject1, myObject2, myOperation ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); return true; } + +//================================================================================= +// function : restoreSubShapes +// purpose : +//================================================================================= +void BooleanGUI_Dialog::restoreSubShapes( SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject ) +{ + if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) { + // empty list of arguments means that all arguments should be restored + getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(), + /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame + /*theInheritFirstArg=*/myOperation == BooleanGUI::CUT ); // ? false + } +} diff --git a/src/BooleanGUI/BooleanGUI_Dialog.h b/src/BooleanGUI/BooleanGUI_Dialog.h index 0bae5abf6..619a695c9 100644 --- a/src/BooleanGUI/BooleanGUI_Dialog.h +++ b/src/BooleanGUI/BooleanGUI_Dialog.h @@ -48,6 +48,7 @@ protected: virtual GEOM::GEOM_IOperations_ptr createOperation(); virtual bool isValid( QString& ); virtual bool execute( ObjectList& ); + virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr ); private: void Init(); diff --git a/src/BuildGUI/BuildGUI_CompoundDlg.cxx b/src/BuildGUI/BuildGUI_CompoundDlg.cxx index 95718c83a..eecd87a8b 100644 --- a/src/BuildGUI/BuildGUI_CompoundDlg.cxx +++ b/src/BuildGUI/BuildGUI_CompoundDlg.cxx @@ -100,6 +100,8 @@ void BuildGUI_CompoundDlg::Init() myOkShapes = false; + mainFrame()->GroupBoxPublish->show(); + /* signals and slots connections */ connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); @@ -233,3 +235,18 @@ bool BuildGUI_CompoundDlg::execute( ObjectList& objects ) return true; } + +//================================================================================= +// function : restoreSubShapes +// purpose : +//================================================================================= +void BuildGUI_CompoundDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject ) +{ + if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) { + // empty list of arguments means that all arguments should be restored + getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(), + /*theFindMethod=*/GEOM::FSM_GetSame, // ? GEOM::FSM_GetInPlace + /*theInheritFirstArg=*/false ); + } +} diff --git a/src/BuildGUI/BuildGUI_CompoundDlg.h b/src/BuildGUI/BuildGUI_CompoundDlg.h index 6c48beb4d..d973dd020 100644 --- a/src/BuildGUI/BuildGUI_CompoundDlg.h +++ b/src/BuildGUI/BuildGUI_CompoundDlg.h @@ -47,6 +47,7 @@ protected: virtual GEOM::GEOM_IOperations_ptr createOperation(); virtual bool isValid( QString& ); virtual bool execute( ObjectList& ); + virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr ); private: void Init(); diff --git a/src/BuildGUI/BuildGUI_ShellDlg.cxx b/src/BuildGUI/BuildGUI_ShellDlg.cxx index 6ed4eb690..229dce6c8 100644 --- a/src/BuildGUI/BuildGUI_ShellDlg.cxx +++ b/src/BuildGUI/BuildGUI_ShellDlg.cxx @@ -105,7 +105,12 @@ void BuildGUI_ShellDlg::Init() TColStd_MapOfInteger aMap; aMap.Add( GEOM_SHELL ); aMap.Add( GEOM_FACE ); - globalSelection( aMap ); + aMap.Add( GEOM_COMPOUNDFILTER ); + + QList aSubShapes; + aSubShapes.append( GEOM_FACE ); + globalSelection( aMap, aSubShapes ); + /* signals and slots connections */ connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); @@ -183,7 +188,12 @@ void BuildGUI_ShellDlg::SetEditCurrentArgument() TColStd_MapOfInteger aMap; aMap.Add( GEOM_SHELL ); aMap.Add( GEOM_FACE ); - globalSelection( aMap ); + aMap.Add( GEOM_COMPOUNDFILTER ); + + QList aSubShapes; + aSubShapes.append( GEOM_FACE ); + globalSelection( aMap, aSubShapes ); + myEditCurrentArgument = GroupShell->LineEdit1; myEditCurrentArgument->setFocus(); @@ -203,7 +213,11 @@ void BuildGUI_ShellDlg::ActivateThisDialog() TColStd_MapOfInteger aMap; aMap.Add( GEOM_SHELL ); aMap.Add( GEOM_FACE ); - globalSelection( aMap ); + aMap.Add( GEOM_COMPOUNDFILTER ); + + QList aSubShapes; + aSubShapes.append( GEOM_FACE ); + globalSelection( aMap, aSubShapes ); } diff --git a/src/DlgRef/DlgRef.cxx b/src/DlgRef/DlgRef.cxx index 8acd7cc9e..434faf86e 100644 --- a/src/DlgRef/DlgRef.cxx +++ b/src/DlgRef/DlgRef.cxx @@ -317,6 +317,20 @@ DlgRef_2Sel1Spin::~DlgRef_2Sel1Spin() { } +////////////////////////////////////////// +// DlgRef_2Sel2List +////////////////////////////////////////// + +DlgRef_2Sel2List::DlgRef_2Sel2List( QWidget* parent, Qt::WindowFlags f ) +: QWidget( parent, f ) +{ + setupUi( this ); +} + +DlgRef_2Sel2List::~DlgRef_2Sel2List() +{ +} + ////////////////////////////////////////// // DlgRef_2Sel2Spin1Check ////////////////////////////////////////// @@ -487,7 +501,37 @@ DlgRef_3Sel3Spin1Check::~DlgRef_3Sel3Spin1Check() void DlgRef_3Sel3Spin1Check::ShowRows( int fromRow, int toRow, bool toShow ) { - const int maxRows = 6; + const int maxRows = 7; + + if ( toRow >= fromRow && fromRow >= 0 && toRow <= maxRows ) { + int c = gridLayout1->count(); + for ( int i = 0; i < c; i++ ) { + QWidget* w = gridLayout1->itemAt( i )->widget(); + int row, col, rowspan, colspan; + gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan ); + if ( w && row >= fromRow && row <= toRow ) + w->setVisible( toShow ); + } + } +} + +////////////////////////////////////////// +// DlgRef_3Sel3Spin2Check +////////////////////////////////////////// + +DlgRef_3Sel3Spin2Check::DlgRef_3Sel3Spin2Check( QWidget* parent, Qt::WindowFlags f ) +: QWidget( parent, f ) +{ + setupUi( this ); +} + +DlgRef_3Sel3Spin2Check::~DlgRef_3Sel3Spin2Check() +{ +} + +void DlgRef_3Sel3Spin2Check::ShowRows( int fromRow, int toRow, bool toShow ) +{ + const int maxRows = 8; if ( toRow >= fromRow && fromRow >= 0 && toRow <= maxRows ) { int c = gridLayout1->count(); @@ -649,9 +693,22 @@ DlgRef_Skeleton::~DlgRef_Skeleton() QString DlgRef::PrintDoubleValue( double theValue, int thePrecision ) { + const double prec = 1e-12; + QString aRes; aRes.setNum( theValue, 'g', thePrecision ); + if ( prec > 0 ) { + int p = 0; + while ( p < thePrecision ) { + aRes.setNum( theValue, 'g', p++ ); + double v = aRes.toDouble(); + double err = qAbs( theValue - v ); + if ( err > 0 && err <= prec ) + break; + } + } + // remove trailing zeroes QString delim( "." ); diff --git a/src/DlgRef/DlgRef.h b/src/DlgRef/DlgRef.h index f3f42a6cf..0fe826fcb 100644 --- a/src/DlgRef/DlgRef.h +++ b/src/DlgRef/DlgRef.h @@ -370,6 +370,22 @@ public: ~DlgRef_2Sel1Spin(); }; +////////////////////////////////////////// +// DlgRef_2Sel2List +////////////////////////////////////////// + +#include "ui_DlgRef_2Sel2List_QTD.h" + +class DLGREF_EXPORT DlgRef_2Sel2List : public QWidget, + public Ui::DlgRef_2Sel2List_QTD +{ + Q_OBJECT + +public: + DlgRef_2Sel2List( QWidget* = 0, Qt::WindowFlags = 0 ); + ~DlgRef_2Sel2List(); +}; + ////////////////////////////////////////// // DlgRef_2Sel2Spin1Check ////////////////////////////////////////// @@ -564,6 +580,24 @@ public: void ShowRows( int, int, bool = true ); }; +////////////////////////////////////////// +// DlgRef_3Sel3Spin2Check +////////////////////////////////////////// + +#include "ui_DlgRef_3Sel3Spin2Check_QTD.h" + +class DLGREF_EXPORT DlgRef_3Sel3Spin2Check : public QWidget, + public Ui::DlgRef_3Sel3Spin2Check_QTD +{ + Q_OBJECT + +public: + DlgRef_3Sel3Spin2Check( QWidget* = 0, Qt::WindowFlags = 0 ); + ~DlgRef_3Sel3Spin2Check(); + + void ShowRows( int, int, bool = true ); +}; + ////////////////////////////////////////// // DlgRef_3Sel4Spin2Check ////////////////////////////////////////// diff --git a/src/DlgRef/DlgRef_2Sel2List_QTD.ui b/src/DlgRef/DlgRef_2Sel2List_QTD.ui new file mode 100644 index 000000000..b54bca512 --- /dev/null +++ b/src/DlgRef/DlgRef_2Sel2List_QTD.ui @@ -0,0 +1,166 @@ + + DlgRef_2Sel2List_QTD + + + + 0 + 0 + 128 + 144 + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + 0 + 0 + + + + TL1 + + + false + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + 0 + 0 + + + + TL2 + + + false + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + 0 + 0 + + + + TL3 + + + false + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + TL4 + + + false + + + + + + + + 0 + 0 + + + + + + + + + + + qPixmapFromMimeSource + + PushButton1 + LineEdit1 + PushButton2 + LineEdit2 + ComboBox1 + + + + diff --git a/src/DlgRef/DlgRef_3Sel3Spin2Check_QTD.ui b/src/DlgRef/DlgRef_3Sel3Spin2Check_QTD.ui new file mode 100644 index 000000000..e2c68c662 --- /dev/null +++ b/src/DlgRef/DlgRef_3Sel3Spin2Check_QTD.ui @@ -0,0 +1,230 @@ + + DlgRef_3Sel3Spin2Check_QTD + + + + 0 + 0 + 120 + 242 + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + 0 + 0 + + + + TL1 + + + false + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + 0 + 0 + + + + TL2 + + + false + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + 0 + 0 + + + + TL3 + + + false + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + 0 + 0 + + + + TL4 + + + false + + + + + + + + + + + 0 + 0 + + + + TL5 + + + false + + + + + + + + + + + 0 + 0 + + + + TL6 + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + qPixmapFromMimeSource + + + QtxDoubleSpinBox + QDoubleSpinBox +
    QtxDoubleSpinBox.h
    +
    +
    + + PushButton1 + LineEdit1 + PushButton2 + LineEdit2 + PushButton3 + LineEdit3 + SpinBox1 + SpinBox2 + SpinBox3 + CheckBox1 + CheckBox2 + + + +
    diff --git a/src/DlgRef/DlgRef_4Sel1Spin2Check_QTD.ui b/src/DlgRef/DlgRef_4Sel1Spin2Check_QTD.ui index 07bda88d6..43217034f 100644 --- a/src/DlgRef/DlgRef_4Sel1Spin2Check_QTD.ui +++ b/src/DlgRef/DlgRef_4Sel1Spin2Check_QTD.ui @@ -5,8 +5,8 @@ 0 0 - 188 - 194 + 131 + 196 @@ -14,16 +14,16 @@ - 9 + 0 - 9 + 0 - 9 + 0 - 9 + 0 6 diff --git a/src/DlgRef/DlgRef_Skeleton_QTD.ui b/src/DlgRef/DlgRef_Skeleton_QTD.ui index d8d765a2a..02624d442 100644 --- a/src/DlgRef/DlgRef_Skeleton_QTD.ui +++ b/src/DlgRef/DlgRef_Skeleton_QTD.ui @@ -5,34 +5,16 @@ 0 0 - 380 - 182 + 364 + 217 - - 9 - - - 9 - - - 9 - - - 9 - - - 6 - - - 6 - - - + + 0 @@ -40,42 +22,49 @@ - Result name + - - 6 - - - 9 - - - 9 - - - 9 - - - 9 - - + - Name + - - false + + + + + + - + + + + + + + + + + + + + + + + + + + - - + + 0 @@ -102,28 +91,39 @@ 9 - + - - - - - - + + false - - - - - + + + + + + + + + 0 + 0 + + + + + + + + + + - + @@ -132,7 +132,7 @@ - + @@ -206,19 +206,10 @@ - - - - - 0 - 0 - - - - + CheckBoxRestoreSS buttonOk buttonApply buttonCancel @@ -227,6 +218,7 @@ RadioButton2 RadioButton3 RadioButton4 + RadioButton5 ResultName diff --git a/src/DlgRef/Makefile.am b/src/DlgRef/Makefile.am index ab8a5db8f..a88a95ac4 100644 --- a/src/DlgRef/Makefile.am +++ b/src/DlgRef/Makefile.am @@ -59,6 +59,7 @@ UIC_FILES = \ ui_DlgRef_2Sel1List_QTD.h \ ui_DlgRef_2Sel1Spin2Check_QTD.h \ ui_DlgRef_2Sel1Spin_QTD.h \ + ui_DlgRef_2Sel2List_QTD.h \ ui_DlgRef_2Sel2Spin1Check_QTD.h \ ui_DlgRef_2Sel2Spin_QTD.h \ ui_DlgRef_2Sel3Spin2Rb_QTD.h \ @@ -71,6 +72,7 @@ UIC_FILES = \ ui_DlgRef_3Sel1Check_QTD.h \ ui_DlgRef_3Sel1Spin_QTD.h \ ui_DlgRef_3Sel3Spin1Check_QTD.h \ + ui_DlgRef_3Sel3Spin2Check_QTD.h \ ui_DlgRef_3Sel4Spin2Check_QTD.h \ ui_DlgRef_3Sel_QTD.h \ ui_DlgRef_3Spin1Check_QTD.h \ diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.cxx b/src/EntityGUI/EntityGUI_SketcherDlg.cxx index 2a41dab97..88dc29012 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_SketcherDlg.cxx @@ -1413,7 +1413,9 @@ void EntityGUI_SketcherDlg::displayPreview( GEOM::GEOM_Object_ptr object, const bool append, const bool activate, const bool update, - const double lineWidth ) + const double lineWidth, + const int displayMode, + const int color ) { // Set color for preview shape getDisplayer()->SetColor( Quantity_NOC_RED ); diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.h b/src/EntityGUI/EntityGUI_SketcherDlg.h index 8f5fd48ae..33270e819 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.h +++ b/src/EntityGUI/EntityGUI_SketcherDlg.h @@ -91,7 +91,9 @@ private: const bool = false, const bool = false, const bool = true, - const double = -1 ); + const double = -1, + const int = -1, + const int = -1); bool createShapes( GEOM::GEOM_Object_ptr, TopoDS_Shape&, diff --git a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx index 4f466c745..7d1a465b5 100644 --- a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx +++ b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx @@ -220,6 +220,7 @@ void EntityGUI_SubShapeDlg::SelectionIntoArgument() if ( !GEOMBase::GetTopoFromSelection( selectedIO(), S ) || S.IsNull() || S.ShapeType() == TopAbs_VERTEX ) { + myObject = GEOM::GEOM_Object::_nil(); updateButtonState(); return; } @@ -520,9 +521,8 @@ GEOM::GEOM_IOperations_ptr EntityGUI_SubShapeDlg::createOperation() bool EntityGUI_SubShapeDlg::isValid( QString& msg ) { bool isOk = false; - Handle(SALOME_InteractiveObject) IO = firstIObject(); - Standard_Boolean testResult; - myObject = GEOMBase::ConvertIOinGEOMObject( IO, testResult ); + Standard_Boolean testResult; + GEOM::GEOM_Object_var anObj = GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult ); if ( !testResult || myObject->_is_nil() ) { updateButtonState(); return isOk; @@ -531,11 +531,7 @@ bool EntityGUI_SubShapeDlg::isValid( QString& msg ) if ( isAllSubShapes() ) isOk = true; else if ( IObjectCount() == 1 ) { - Standard_Boolean aResult = Standard_False; - GEOM::GEOM_Object_var anObj = - GEOMBase::ConvertIOinGEOMObject( firstIObject(), aResult ); - - if ( aResult && !anObj->_is_nil() ) { + if ( testResult && !anObj->_is_nil() ) { TColStd_IndexedMapOfInteger aMapIndex; myGeomGUI->getApp()->selectionMgr()->GetIndexes( firstIObject(), aMapIndex ); isOk = aMapIndex.Extent() > 0; diff --git a/src/GEOM/GEOM_Engine.cxx b/src/GEOM/GEOM_Engine.cxx index 335f53435..2db3accd0 100644 --- a/src/GEOM/GEOM_Engine.cxx +++ b/src/GEOM/GEOM_Engine.cxx @@ -447,7 +447,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID, aNode = Itr.Value(); aFunction = GEOM_Function::GetFunction(aNode->Label()); if(aFunction.IsNull()) { - cout << "Null function !!!!" << endl; + MESSAGE ( "Null function !!!!" ); continue; } ProcessFunction(aFunction, aScript, aMap); diff --git a/src/GEOM/GEOM_PythonDump.cxx b/src/GEOM/GEOM_PythonDump.cxx index 41b9c184f..14c84dc8b 100644 --- a/src/GEOM/GEOM_PythonDump.cxx +++ b/src/GEOM/GEOM_PythonDump.cxx @@ -117,7 +117,7 @@ namespace GEOM TDF_Tool::TagList(theObj1->GetEntry(), aTags1); TDF_Tool::TagList(theObj2->GetEntry(), aTags2); TColStd_ListIteratorOfListOfInteger aListIter1(aTags1), aListIter2(aTags2); - for (; aListIter1.More(); aListIter1.Next()) { + for (; aListIter1.More(); aListIter1.Next(), aListIter2.Next()) { if (!aListIter2.More()) return theObj1; // anObj1 is stored under anObj2 diff --git a/src/GEOM/geom.cxx b/src/GEOM/geom.cxx index 8ac0deb96..c73e82e77 100644 --- a/src/GEOM/geom.cxx +++ b/src/GEOM/geom.cxx @@ -32,6 +32,8 @@ #include #include +#include "utilities.h" + //================================================================================== // function : main() MAIN // purpose : @@ -70,19 +72,19 @@ int main(int argc, char** argv) orb->destroy(); } catch(CORBA::SystemException&) { - cerr << "Caught CORBA::SystemException." << endl; + INFOS ( "Caught CORBA::SystemException." ); } catch(CORBA::Exception&) { - cerr << "Caught CORBA::Exception." << endl; + INFOS ( "Caught CORBA::Exception." ); } catch(omniORB::fatalException& fe) { - cerr << "Caught omniORB::fatalException:" << endl; - cerr << " file: " << fe.file() << endl; - cerr << " line: " << fe.line() << endl; - cerr << " msg: " << fe.errmsg() << endl; + INFOS ( "Caught omniORB::fatalException:" ); + INFOS ( " file: " << fe.file() ); + INFOS ( " line: " << fe.line() ); + INFOS ( " msg: " << fe.errmsg() ); } catch(...) { - cerr << "Caught unknown exception." << endl; + INFOS ( "Caught unknown exception." ); } return 0; } diff --git a/src/GEOMAlgo/BlockFix_UnionEdges.cxx b/src/GEOMAlgo/BlockFix_UnionEdges.cxx index 667375123..1cdb061a2 100644 --- a/src/GEOMAlgo/BlockFix_UnionEdges.cxx +++ b/src/GEOMAlgo/BlockFix_UnionEdges.cxx @@ -56,6 +56,7 @@ #include #include +#include "utilities.h" //======================================================================= //function : BlockFix_UnionEdges() @@ -109,7 +110,7 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges, } } if(aChain.Length()1) { // second step: union edges with various curves - cout<<"can not make analitical union => make approximation"< make approximation"); TopoDS_Wire W; B.MakeWire(W); for(j=1; j<=aChain.Length(); j++) { diff --git a/src/GEOMBase/GEOMBase_Helper.cxx b/src/GEOMBase/GEOMBase_Helper.cxx index d2c9cfdeb..f8d619119 100755 --- a/src/GEOMBase/GEOMBase_Helper.cxx +++ b/src/GEOMBase/GEOMBase_Helper.cxx @@ -489,6 +489,18 @@ void GEOMBase_Helper::globalSelection( const TColStd_MapOfInteger& theModes, getDisplayer()->GlobalSelection( theModes, update ); } +//================================================================ +// Function : globalSelection +// Purpose : Activate selection of subshapes. Set selection filters +// in accordance with mode. theMode is from GEOMImpl_Types +//================================================================ +void GEOMBase_Helper::globalSelection( const TColStd_MapOfInteger& theModes, + const QList& subShapes, + const bool update ) +{ + getDisplayer()->GlobalSelection( theModes, update, &subShapes ); +} + //================================================================ // Function : addInStudy // Purpose : Add object in study @@ -502,10 +514,33 @@ void GEOMBase_Helper::addInStudy( GEOM::GEOM_Object_ptr theObj, const char* theN if ( !aStudy || theObj->_is_nil() ) return; + SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy(aStudy); + GEOM::GEOM_Object_ptr aFatherObj = getFather( theObj ); - getGeomEngine()->AddInStudy(GeometryGUI::ClientStudyToStudy(aStudy), - theObj, theName, aFatherObj); + SALOMEDS::SObject_var aSO = + getGeomEngine()->AddInStudy(aStudyDS, theObj, theName, aFatherObj); + + // Each dialog is responsible for this method implementation, + // default implementation does nothing + restoreSubShapes(aStudyDS, aSO); +} + +//================================================================ +// Function : restoreSubShapes +// Purpose : restore tree of argument's sub-shapes under the resulting shape +//================================================================ +void GEOMBase_Helper::restoreSubShapes (SALOMEDS::Study_ptr /*theStudy*/, + SALOMEDS::SObject_ptr /*theSObject*/) +{ + // do nothing by default + + // example of implementation in particular dialog: + // GEOM::ListOfGO anArgs; + // anArgs.length(0); // empty list means that all arguments should be restored + // getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs, + // /*theFindMethod=*/GEOM::FSM_GetInPlace, + // /*theInheritFirstArg=*/false); } //================================================================ diff --git a/src/GEOMBase/GEOMBase_Helper.h b/src/GEOMBase/GEOMBase_Helper.h index 3a13c3f1f..59cb8abc5 100755 --- a/src/GEOMBase/GEOMBase_Helper.h +++ b/src/GEOMBase/GEOMBase_Helper.h @@ -96,6 +96,7 @@ protected: void activate( const int ); void globalSelection( const int = GEOM_ALLOBJECTS, const bool = false ); void globalSelection( const TColStd_MapOfInteger&, const bool = false ); + void globalSelection( const TColStd_MapOfInteger&, const QList& ,const bool = false ); void updateViewer (); void prepareSelection( const ObjectList&, const int ); @@ -166,6 +167,9 @@ protected: // It should perform the required operation and put all new or modified objects into // argument.Should return if some error occurs during its execution. + virtual void restoreSubShapes( SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_ptr theSObject ); + // This method is called by addInStudy(). + virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr theObj ); // This method is called by addInStudy(). It should return a father object // for or a nil reference if should be published diff --git a/src/GEOMBase/GEOMBase_Skeleton.cxx b/src/GEOMBase/GEOMBase_Skeleton.cxx index 1fed4e13b..329688330 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.cxx +++ b/src/GEOMBase/GEOMBase_Skeleton.cxx @@ -66,8 +66,12 @@ GEOMBase_Skeleton::GEOMBase_Skeleton( GeometryGUI* theGeometryGUI, QWidget* pare myMainFrame->GroupBoxName->setTitle( tr( "GEOM_RESULT_NAME_GRP" ) ); myMainFrame->NameLabel->setText( tr( "GEOM_RESULT_NAME_LBL" ) ); + + myMainFrame->GroupBoxPublish->setTitle( tr( "GEOM_PUBLISH_RESULT_GRP" ) ); + myMainFrame->CheckBoxRestoreSS->setText( tr( "GEOM_RESTORE_SUB_SHAPES" ) ); + buttonCancel()->setText( tr( "GEOM_BUT_CLOSE" ) ); - buttonOk()->setText( tr( "GEOM_BUT_OK" )) ; + buttonOk()->setText( tr( "GEOM_BUT_APPLY_AND_CLOSE" ) ); buttonApply()->setText( tr( "GEOM_BUT_APPLY" ) ); buttonHelp()->setText( tr( "GEOM_BUT_HELP" ) ); @@ -76,13 +80,13 @@ GEOMBase_Skeleton::GEOMBase_Skeleton( GeometryGUI* theGeometryGUI, QWidget* pare myRBGroup->addButton( myMainFrame->RadioButton2, 1 ); myRBGroup->addButton( myMainFrame->RadioButton3, 2 ); myRBGroup->addButton( myMainFrame->RadioButton4, 3 ); + myRBGroup->addButton( myMainFrame->RadioButton5, 4 ); connect( myRBGroup, SIGNAL( buttonClicked( int ) ), this, SIGNAL( constructorsClicked( int ) ) ); Init(); } - //================================================================================= // function : ~GEOMBase_Skeleton() // purpose : Destroys the object and frees any allocated resources @@ -93,7 +97,6 @@ GEOMBase_Skeleton::~GEOMBase_Skeleton() myGeomGUI->SetActiveDialogBox( 0 ); } - //================================================================================= // function : Init() // purpose : @@ -105,7 +108,8 @@ void GEOMBase_Skeleton::Init() myGeomGUI = dynamic_cast( app->module( "Geometry" ) ); /* init variables */ - myGeomGUI->SetActiveDialogBox( this ); + if ( myGeomGUI ) + myGeomGUI->SetActiveDialogBox( this ); /* signals and slots connections */ connect( buttonCancel(), SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) ); @@ -120,6 +124,10 @@ void GEOMBase_Skeleton::Init() /* displays Dialog */ myMainFrame->RadioButton1->setChecked( true ); myMainFrame->RadioButton4->hide(); + myMainFrame->RadioButton5->hide(); + + myMainFrame->CheckBoxRestoreSS->setChecked( false ); + myMainFrame->GroupBoxPublish->hide(); } void GEOMBase_Skeleton::initSpinBox( QSpinBox* spinBox, @@ -148,7 +156,6 @@ void GEOMBase_Skeleton::ClickOnCancel() close(); } - //================================================================================= // function : LineEditReturnPressed() // purpose : @@ -168,7 +175,6 @@ void GEOMBase_Skeleton::LineEditReturnPressed() myEditCurrentArgument->setText( objectUserName ); } - //================================================================================= // function : DeactivateActiveDialog() // purpose : @@ -177,11 +183,12 @@ void GEOMBase_Skeleton::DeactivateActiveDialog() { this->setEnabled( false ); globalSelection(); - disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 0, this, 0 ); - if ( myGeomGUI ) myGeomGUI->SetActiveDialogBox( 0 ); + if ( myGeomGUI ) { + myGeomGUI->SetActiveDialogBox( 0 ); + disconnect( myGeomGUI->getApp()->selectionMgr(), 0, this, 0 ); + } } - //================================================================================= // function : ActivateThisDialog() // purpose : @@ -195,17 +202,15 @@ void GEOMBase_Skeleton::ActivateThisDialog() return; } - //================================================================================= // function : closeEvent() // purpose : same than click on cancel button //================================================================================= void GEOMBase_Skeleton::closeEvent( QCloseEvent* e ) { - SalomeApp_Application* app = (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ); - if( app ) { - disconnect( app->selectionMgr(), 0, this, 0 ); - app->updateActions(); + if ( myGeomGUI ) { + disconnect( myGeomGUI->getApp()->selectionMgr(), 0, this, 0 ); + myGeomGUI->getApp()->updateActions(); } QDialog::closeEvent( e ); } @@ -269,11 +274,11 @@ void GEOMBase_Skeleton::ClickOnHelp() QObject::tr( "BUT_OK" ) ); } } + //================================================================================= // function : setHelpFileName() // purpose : set name for help file html //================================================================================= - void GEOMBase_Skeleton::setHelpFileName( const QString& theName ) { myHelpFileName = theName; diff --git a/src/GEOMFiltersSelection/GEOM_CompoundFilter.cxx b/src/GEOMFiltersSelection/GEOM_CompoundFilter.cxx new file mode 100644 index 000000000..4a1ca6df8 --- /dev/null +++ b/src/GEOMFiltersSelection/GEOM_CompoundFilter.cxx @@ -0,0 +1,136 @@ +// GEOM GEOM_CompoundFilter : filter selector for the viewer +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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 +// +// +// +// File : GEOM_CompoundFilter.cxx +// Author : Roman NIKOLAEV +// Module : GEOM + +#include "GEOM_CompoundFilter.h" + +// OCCT Includes +#include +#include +#include +#include + + + +//======================================================================= +// function : GEOM_CompoundFilter +// purpose : +//======================================================================= +GEOM_CompoundFilter::GEOM_CompoundFilter(SalomeApp_Study* study) +: GEOM_SelectionFilter( study ) +{ + add( TopAbs_COMPOUND ); +} + +//======================================================================= +// function : ~GEOM_CompoundFilter +// purpose : +//======================================================================= +GEOM_CompoundFilter::~GEOM_CompoundFilter() +{ +} + +//======================================================================= +// function : isOk +// purpose : +//======================================================================= +bool GEOM_CompoundFilter::isOk( const SUIT_DataOwner* sOwner) const +{ + if(GEOM_SelectionFilter::isOk(sOwner)){ + + GEOM::GEOM_Object_var obj = getObject( sOwner ); + TopoDS_Shape shape; + if ( getShape( obj, shape )){ + bool subTypes[TopAbs_SHAPE]; + getInfo(shape,subTypes); + QList::const_iterator it; + bool result = false; + for ( it = myKinds.constBegin(); it != myKinds.constEnd(); ++it ) + result = result || subTypes[(*it)]; + + return result; + } + } + return false; +} + + +//======================================================================= +// function : addSubType +// purpose : +//======================================================================= +void GEOM_CompoundFilter::addSubType( const int type) +{ + if(!myKinds.contains(type)) + myKinds.append(type); +} + +//======================================================================= +// function : addSubTypes +// purpose : +//======================================================================= +void GEOM_CompoundFilter::addSubTypes(const QList& kinds) +{ + myKinds = kinds; +} + +//======================================================================= +// function : getInfo() +// purpose : +//======================================================================= +void GEOM_CompoundFilter::getInfo(const TopoDS_Shape& aShape, bool subTypes[]) const +{ + int iType, nbTypes[TopAbs_SHAPE]; + for (iType = 0; iType < TopAbs_SHAPE; ++iType){ + nbTypes[iType] = 0; + subTypes[iType] = false; + } + + nbTypes[aShape.ShapeType()]++; + TopTools_MapOfShape aMapOfShape; + aMapOfShape.Add(aShape); + TopTools_ListOfShape aListOfShape; + aListOfShape.Append(aShape); + + TopTools_ListIteratorOfListOfShape itL (aListOfShape); + for (; itL.More(); itL.Next()) { + TopoDS_Iterator it (itL.Value()); + for (; it.More(); it.Next()) { + TopoDS_Shape s = it.Value(); + if (aMapOfShape.Add(s)) { + aListOfShape.Append(s); + nbTypes[s.ShapeType()]++; + } + } + } + + for(iType = TopAbs_COMPSOLID; iType < TopAbs_SHAPE; ++iType) { + if(nbTypes[iType] > 0) { + subTypes[iType] = true; + break; + } + } +} diff --git a/src/GEOMFiltersSelection/GEOM_CompoundFilter.h b/src/GEOMFiltersSelection/GEOM_CompoundFilter.h new file mode 100644 index 000000000..4b042e7e6 --- /dev/null +++ b/src/GEOMFiltersSelection/GEOM_CompoundFilter.h @@ -0,0 +1,46 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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 +// +#ifndef GEOM_COMPOUNDFILTER_H +#define GEOM_COMPOUNDFILTER_H +#include "GEOM_SelectionFilter.h" + +#include + +class Standard_EXPORT GEOM_CompoundFilter : public GEOM_SelectionFilter +{ + public: + GEOM_CompoundFilter( SalomeApp_Study* study ); + ~GEOM_CompoundFilter(); + + virtual bool isOk( const SUIT_DataOwner* ) const; + void addSubType(const int ); + void addSubTypes(const QList& ); + + private: + void getInfo(const TopoDS_Shape&, bool subTypes []) const; + + + private: + QList myKinds; +}; + + +#endif + diff --git a/src/GEOMFiltersSelection/Makefile.am b/src/GEOMFiltersSelection/Makefile.am index 751e26e90..3b7cb0df1 100644 --- a/src/GEOMFiltersSelection/Makefile.am +++ b/src/GEOMFiltersSelection/Makefile.am @@ -37,7 +37,8 @@ salomeinclude_HEADERS = \ GEOM_TypeFilter.h \ GEOM_PreviewFilter.h \ GEOM_LogicalFilter.h \ - GEOM_OCCFilter.h + GEOM_OCCFilter.h \ + GEOM_CompoundFilter.h # Sources dist_libGEOMFiltersSelection_la_SOURCES = \ @@ -47,7 +48,8 @@ dist_libGEOMFiltersSelection_la_SOURCES = \ GEOM_TypeFilter.cxx \ GEOM_PreviewFilter.cxx \ GEOM_LogicalFilter.cxx \ - GEOM_OCCFilter.cxx + GEOM_OCCFilter.cxx \ + GEOM_CompoundFilter.cxx # LIB_CLIENT_IDL= GEOM_Gen.idl SALOMEDS.idl SALOME_Exception.idl SALOME_GenericObj.idl SALOME_Component.idl diff --git a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx index f1cd19d10..65b1eeb67 100644 --- a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx +++ b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx @@ -103,6 +103,7 @@ void GEOMGUI_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const if (!bigShape.IsEqual(curBigShape)) { curBigShape = bigShape; + subShapes.Clear(); TopExp::MapShapes(bigShape, subShapes); } index = subShapes.FindIndex(subShape); @@ -216,7 +217,7 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) #ifndef WNT if ( indexesMap.IsBound( TCollection_AsciiString(entry.toLatin1().data()))) #else - if ( indexesMap.IsBound( entry.toLatin1().data() ) ) + if ( indexesMap.IsBound( entry.toLatin1().data() ) ) #endif { TColStd_IndexedMapOfInteger& subIndexes = indexesMap.ChangeFind(entry.toLatin1().data()); @@ -275,6 +276,7 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) { isLocal = true; TopoDS_Shape shape = aisShape->Shape(); + aMapOfShapes.Clear(); TopExp::MapShapes(shape, aMapOfShapes); } } diff --git a/src/GEOMGUI/GEOM_Displayer.cxx b/src/GEOMGUI/GEOM_Displayer.cxx index cca8ab949..d064b0fc7 100644 --- a/src/GEOMGUI/GEOM_Displayer.cxx +++ b/src/GEOMGUI/GEOM_Displayer.cxx @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -159,6 +160,30 @@ SUIT_SelectionFilter* GEOM_Displayer::getFilter( const int theMode ) return aFilter; } +//================================================================ +// Function : getComplexFilter +// Purpose : Get compound filter corresponding to the type of +// object from GEOMImpl_Types.h +//================================================================ +SUIT_SelectionFilter* GEOM_Displayer::getComplexFilter( const QList* aSubShapes) +{ + GEOM_CompoundFilter* aFilter; + + if(aSubShapes != NULL ) { + aFilter = new GEOM_CompoundFilter(getStudy()); + QList aTopAbsTypes; + QList::const_iterator it; + for(it = aSubShapes->constBegin(); it != aSubShapes->constEnd(); ++it ) { + int topAbsMode = getTopAbsMode(*it); + if(topAbsMode != -1 ) + aTopAbsTypes.append(topAbsMode); + } + aFilter->addSubTypes(aTopAbsTypes); + } + + return aFilter; +} + //================================================================ // Function : getEntry // Purpose : @@ -605,6 +630,10 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs ) anAspect = AISShape->Attributes()->WireAspect(); anAspect->SetColor( aColor ); AISShape->Attributes()->SetWireAspect( anAspect ); + + // bug [SALOME platform 0019868] + // Set deviation angle. Default one is 12 degrees (Prs3d_Drawer.cxx:18) + AISShape->SetOwnDeviationAngle( 10*PI/180 ); } } @@ -1025,7 +1054,7 @@ void GEOM_Displayer::GlobalSelection( const int theMode, const bool update ) */ //================================================================= void GEOM_Displayer::GlobalSelection( const TColStd_MapOfInteger& theModes, - const bool update ) + const bool update, const QList* theSubShapes ) { SUIT_Session* session = SUIT_Session::session(); SalomeApp_Application* app = dynamic_cast( session->activeApplication() ); @@ -1069,7 +1098,11 @@ void GEOM_Displayer::GlobalSelection( const TColStd_MapOfInteger& theModes, if ( theModes.Extent() == 1 ) { int aMode = TColStd_MapIteratorOfMapOfInteger( theModes ).Key(); - aFilter = getFilter( aMode ); + + if ( aMode == GEOM_COMPOUNDFILTER ) + aFilter = getComplexFilter( theSubShapes ); + else + aFilter = getFilter( aMode ); } else if ( theModes.Extent() > 1 ) { @@ -1078,7 +1111,13 @@ void GEOM_Displayer::GlobalSelection( const TColStd_MapOfInteger& theModes, QList aListOfFilters; for ( ; anIter.More(); anIter.Next() ) { - SUIT_SelectionFilter* aFilter = getFilter( anIter.Key() ); + SUIT_SelectionFilter* aFilter; + int aMode = anIter.Key(); + if ( aMode == GEOM_COMPOUNDFILTER ) + aFilter = getComplexFilter( theSubShapes ); + else + aFilter = getFilter( aMode ); + if ( aFilter ) aListOfFilters.append( aFilter ); } diff --git a/src/GEOMGUI/GEOM_Displayer.h b/src/GEOMGUI/GEOM_Displayer.h index c6e623ea9..201cff094 100644 --- a/src/GEOMGUI/GEOM_Displayer.h +++ b/src/GEOMGUI/GEOM_Displayer.h @@ -149,7 +149,7 @@ public: void LocalSelection( const Handle(SALOME_InteractiveObject)&, const int ); void LocalSelection( const SALOME_ListIO& theIOList, const int ); void GlobalSelection( const int = GEOM_ALLOBJECTS, const bool = false ); - void GlobalSelection( const TColStd_MapOfInteger&, const bool = false ); + void GlobalSelection( const TColStd_MapOfInteger&, const bool = false, const QList* = 0 ); SalomeApp_Study* getStudy() const; @@ -172,6 +172,7 @@ protected: void clearTemporary( LightApp_SelectionMgr* theSelMgr ); SUIT_SelectionFilter* getFilter( const int theMode ); + SUIT_SelectionFilter* getComplexFilter( const QList* ); protected: Handle(SALOME_InteractiveObject) myIO; diff --git a/src/GEOMGUI/GEOM_images.ts b/src/GEOMGUI/GEOM_images.ts index 00c5b9b76..9e4d68621 100644 --- a/src/GEOMGUI/GEOM_images.ts +++ b/src/GEOMGUI/GEOM_images.ts @@ -910,5 +910,17 @@ ICO_WORK_PLANE planeWorking.png + + ICON_DLG_POINT_FACE + pointonface.png + + + ICON_DLG_SHAPES_ON_SHAPE + shapesonshape.png + + + ICON_DLG_SCALE_ALONG_AXES + scale_along_axes.png + diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index b2f26eded..0aed9801d 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -208,6 +208,10 @@ Please, select face, shell or solid and try again GEOM_BUT_OK O&k + + GEOM_BUT_APPLY_AND_CLOSE + A&pply and Close + GEOM_BUT_YES &Yes @@ -1168,18 +1172,6 @@ Please, select face, shell or solid and try again GEOM_RADIUS_MINOR Minor radius : - - GEOM_DELETE_OBJECTS - Delete objects - - - GEOM_REALLY_DELETE - Do you really want to delete %1 object(s)? - - - GEOM_REALLY_DELETE_ALL - Do you really want to delete all objects? - GEOM_RECONSTRUCTION_LIMIT Reconstruction Limit @@ -3444,6 +3436,162 @@ Please, select face, shell or solid and try again GEOM_FILLING_APPROX Approximation + + GEOM_WRN_NO_APPROPRIATE_SELECTION + No appropriate objects selected + + + GEOM_SHAPES_ON_SHAPE + Get shapes on shape + + + GEOM_SHAPES_ON_SHAPE_ESHAPE + Shape for exploding + + + GEOM_SHAPES_ON_SHAPE_CSHAPE + Shape for checking + + + GEOM_SHAPES_ON_SHAPE_STATE + State + + + GEOM_KIND_OF_SHAPE + Kind of Shape : + + + GEOM_CLOSED + Closed + + + GEOM_UNCLOSED + Opened + + + GEOM_CLOSEDUNCLOSED + Not defined, Closed or Opened. Possibly, error occured. + + + GEOM_DISK_CIRCLE + Disk + + + GEOM_DISK_ELLIPSE + Elliptical face + + + GEOM_PLANAR_FACE + Planar face + + + GEOM_POLYGON + Polygon + + + GEOM_NORMAL + Normal direction + + + GEOM_DIRECTION + Direction + + + GEOM_UPARAMETER + U-parameter : + + + GEOM_VPARAMETER + V-parameter : + + + GEOM_X_I + X%1 : + + + GEOM_Y_I + Y%1 : + + + GEOM_Z_I + Z%1 : + + + GEOM_SHAPES_ON_SHAPE_TITLE + Get shapes on shape + + + GEOM_SCALE_FACTOR_X + Scale Factor X : + + + GEOM_SCALE_FACTOR_Y + Scale Factor Y : + + + GEOM_SCALE_FACTOR_Z + Scale Factor Z : + + + GEOM_STATE_IN + IN + + + GEOM_STATE_OUT + OUT + + + GEOM_STATE_ON + ON + + + GEOM_STATE_ONIN + ONIN + + + GEOM_STATE_ONOUT + ONOUT + + + GEOM_STATE_INOUT + INOUT + + + TOP_GET_SHAPES_ON_SHAPES + Get shapes on shape + + + MEN_GET_SHAPES_ON_SHAPES + Get shapes on shape + + + STB_GET_SHAPES_ON_SHAPES + Get shapes on shape + + + GEOM_PUBLISH_RESULT_GRP + Advanced options + + + GEOM_RESTORE_SUB_SHAPES + Set presentation parameters and subshapes from arguments + + + GEOM_ALL_IMPORT_FILES + All supported formats ( %1 ) + + + GEOM_UNSUPPORTED_TYPE + Unsupported format for the file + + + GEOM_UNKNOWN_IMPORT_ERROR + Unknown error + + + GEOM_IMPORT_ERRORS + Import operation has finished with errors: + BasicGUI_MarkerDlg @@ -3672,6 +3820,22 @@ Number of sketch points too small SHAPE_TYPE Shape Type + + ALL_SUBSHAPES + All + + + GET_IN_PLACE + In Place of Second Shape + + + SUBSHAPES_OF_SHAPE2 + Sub-Shapes of Second Shape + + + SECOND_SHAPE + Second Shape + MeasureGUI_1Sel1TextView1Check_QTD @@ -3792,4 +3956,19 @@ Please close this message box and select faces for glueing Would you like to continue? + + GEOMToolsGUI_DeleteDlg + + GEOM_REALLY_DELETE + Do you really want to delete %1 object(s)? + + + GEOM_REALLY_DELETE_ALL + Do you really want to delete all objects? + + + GEOM_DELETE_OBJECTS + Delete objects + + diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index f24a8b9bb..f94d3902d 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -47,10 +47,12 @@ #include #include #include +#include #include #include #include #include +#include // External includes #include @@ -466,7 +468,8 @@ void GeometryGUI::OnGUIEvent( int id ) id == 504 || // MENU OPERATION - ARCHIMEDE id == 505 || // MENU OPERATION - FILLET id == 506 || // MENU OPERATION - CHAMFER - id == 507 ) { // MENU OPERATION - CLIPPING RANGE + id == 507 || // MENU OPERATION - CLIPPING RANGE + id == 508 ) { // MENU OPERATION - GET SHAPES ON SHAPE #ifndef WNT library = getLibrary( "libOperationGUI.so" ); #else @@ -797,6 +800,7 @@ void GeometryGUI::initialize( CAM_Application* app ) createGeomAction( 505, "FILLET" ); createGeomAction( 506, "CHAMFER" ); //createGeomAction( 507, "CLIPPING" ); + createGeomAction( 508, "GET_SHAPES_ON_SHAPES" ); createGeomAction( 9998, "MUL_TRANSFORM" ); createGeomAction( 9995, "EXPLODE_BLOCKS" ); @@ -946,6 +950,7 @@ void GeometryGUI::initialize( CAM_Application* app ) createMenu( 503, operId, -1 ); createMenu( 504, operId, -1 ); + createMenu( 508, operId, -1 ); createMenu( separator(), operId, -1 ); createMenu( 505, transId, -1 ); createMenu( 506, transId, -1 ); @@ -1187,14 +1192,17 @@ bool GeometryGUI::activateModule( SUIT_Study* study ) // Reset actions accelerator keys //action(111)->setAccel(QKeySequence(CTRL + Key_I)); // Import //action(121)->setAccel(QKeySequence(CTRL + Key_E)); // Export - action(111)->setEnabled(true); // Import - action(121)->setEnabled(true); // Export + action(111)->setEnabled( true ); // Import: CTRL + Key_I + action(121)->setEnabled( true ); // Export: CTRL + Key_E + action( 33)->setEnabled( true ); // Delete: Key_Delete + action(901)->setEnabled( true ); // Rename: Key_F2 GUIMap::Iterator it; for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) it.value()->activate( application()->desktop() ); LightApp_SelectionMgr* sm = getApp()->selectionMgr(); + SUIT_ViewManager* vm; ViewManagerList OCCViewManagers, VTKViewManagers; @@ -1208,20 +1216,27 @@ bool GeometryGUI::activateModule( SUIT_Study* study ) while ( itVTK.hasNext() && (vm = itVTK.next()) ) myVTKSelectors.append( new LightApp_VTKSelector( dynamic_cast( vm->getViewModel() ), sm ) ); + //NPAL 19674 + SALOME_ListIO selected; + sm->selectedObjects( selected ); + sm->clearSelected(); + // disable OCC selectors - getApp()->selectionMgr()->setEnabled( false, OCCViewer_Viewer::Type() ); //@ + getApp()->selectionMgr()->setEnabled( false, OCCViewer_Viewer::Type() ); QListIterator itOCCSel( myOCCSelectors ); while ( itOCCSel.hasNext() ) if ( GEOMGUI_OCCSelector* sr = itOCCSel.next() ) sr->setEnabled(true); // disable VTK selectors - getApp()->selectionMgr()->setEnabled( false, SVTK_Viewer::Type() ); //@ + getApp()->selectionMgr()->setEnabled( false, SVTK_Viewer::Type() ); QListIterator itVTKSel( myVTKSelectors ); while ( itVTKSel.hasNext() ) if ( LightApp_VTKSelector* sr = itVTKSel.next() ) sr->setEnabled(true); + sm->setSelectedObjects( selected, true ); //NPAL 19674 + return true; } @@ -1247,8 +1262,10 @@ bool GeometryGUI::deactivateModule( SUIT_Study* study ) // Unset actions accelerator keys //action(111)->setAccel(QKeySequence()); // Import //action(121)->setAccel(QKeySequence()); // Export - action(111)->setEnabled(false); // Import - action(121)->setEnabled(false); // Export + action(111)->setEnabled( false ); // Import: CTRL + Key_I + action(121)->setEnabled( false ); // Export: CTRL + Key_E + action( 33)->setEnabled( false ); // Delete: Key_Delete + action(901)->setEnabled( false ); // Rename: Key_F2 qDeleteAll(myOCCSelectors); myOCCSelectors.clear(); @@ -1290,7 +1307,6 @@ void GeometryGUI::onWindowActivated( SUIT_ViewWindow* win ) action( 607 )->setEnabled( ViewOCC ); // RemoveInternalWires action( 608 )->setEnabled( ViewOCC ); // AddPointOnEdge // action( 609 )->setEnabled( ViewOCC ); // Free boundaries -// action( 413 )->setEnabled( ViewOCC || ViewVTK ); // Isos Settings action( 800 )->setEnabled( ViewOCC ); // Create Group action( 801 )->setEnabled( ViewOCC ); // Edit Group diff --git a/src/GEOMImpl/GEOMImpl_BlockDriver.cxx b/src/GEOMImpl/GEOMImpl_BlockDriver.cxx index 2efdd7ca2..873b0a751 100644 --- a/src/GEOMImpl/GEOMImpl_BlockDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_BlockDriver.cxx @@ -34,7 +34,7 @@ #include #include -//#include +#include #include #include @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include @@ -507,17 +508,28 @@ Standard_Integer GEOMImpl_BlockDriver::Execute(TFunction_Logbook& log) const aTool.SetShape(aBlockOrComp); aTool.Perform(); - if (aType == BLOCK_REMOVE_EXTRA) { + TopoDS_Shape aFixedExtra = aTool.Shape(); + + // Repair result + BRepCheck_Analyzer ana (aFixedExtra, false); + if (!ana.IsValid()) { + TopoDS_Shape aFixed; + ShHealOper_ShapeProcess aHealer; + aHealer.Perform(aFixedExtra, aFixed); + if (aHealer.isDone()) + aFixedExtra = aFixed; + } + + if (aType == BLOCK_REMOVE_EXTRA) + { + aShape = aFixedExtra; - aShape = aTool.Shape(); if (aShape == aBlockOrComp) { MESSAGE("No modifications have been done"); } - - } else { // aType == BLOCK_COMPOUND_IMPROVE - - TopoDS_Shape aFixedExtra = aTool.Shape(); - + } + else // aType == BLOCK_COMPOUND_IMPROVE + { // 2. Separate non-blocks TopTools_ListOfShape BLO; // All blocks from the given compound TopTools_ListOfShape NOT; // Not blocks diff --git a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx index c419cd6d5..39d625d54 100644 --- a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx @@ -38,6 +38,9 @@ #include #include #include +#include +#include +#include #include #include @@ -405,9 +408,24 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(TFunction_Logbook& log) const } if (aShape.IsNull()) return 0; - if (!BRepAlgo::IsValid(aShape)) { - Standard_ConstructionError::Raise("Boolean operation aborted : non valid shape result"); + + // 08.07.2008 skl for bug 19761 from Mantis + BRepCheck_Analyzer ana (aShape, Standard_True); + ana.Init(aShape); + if (!ana.IsValid()) { + ShapeFix_ShapeTolerance aSFT; + aSFT.LimitTolerance(aShape, Precision::Confusion(), + Precision::Confusion(), TopAbs_SHAPE); + Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape); + aSfs->Perform(); + aShape = aSfs->Shape(); + ana.Init(aShape); + if (!ana.IsValid()) + Standard_ConstructionError::Raise("Boolean operation aborted : non valid shape result"); } + //if (!BRepAlgo::IsValid(aShape)) { + // Standard_ConstructionError::Raise("Boolean operation aborted : non valid shape result"); + //} aFunction->SetValue(aShape); diff --git a/src/GEOMImpl/GEOMImpl_FilletDriver.cxx b/src/GEOMImpl/GEOMImpl_FilletDriver.cxx index e662d4cac..44ba9b224 100644 --- a/src/GEOMImpl/GEOMImpl_FilletDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_FilletDriver.cxx @@ -36,6 +36,9 @@ #include #include +#include +#include + #include #include #include @@ -128,7 +131,16 @@ Standard_Integer GEOMImpl_FilletDriver::Execute(TFunction_Logbook& log) const // Check shape validity BRepCheck_Analyzer ana (aShape, false); if (!ana.IsValid()) { - StdFail_NotDone::Raise("Fillet algorithm have produced an invalid shape result"); + // 08.07.2008 added by skl during fixing bug 19761 from Mantis + ShapeFix_ShapeTolerance aSFT; + aSFT.LimitTolerance(aShape, Precision::Confusion(), + Precision::Confusion(), TopAbs_SHAPE); + Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape); + aSfs->Perform(); + aShape = aSfs->Shape(); + ana.Init(aShape); + if (!ana.IsValid()) + StdFail_NotDone::Raise("Fillet algorithm have produced an invalid shape result"); } aFunction->SetValue(aShape); diff --git a/src/GEOMImpl/GEOMImpl_FillingDriver.cxx b/src/GEOMImpl/GEOMImpl_FillingDriver.cxx index d17febfd2..c0474921e 100644 --- a/src/GEOMImpl/GEOMImpl_FillingDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_FillingDriver.cxx @@ -45,6 +45,11 @@ #include #include +#include +#include +#include +#include + //======================================================================= //function : GetID //purpose : @@ -99,34 +104,100 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(TFunction_Logbook& log) const TopoDS_Shape Scurrent; Standard_Real First, Last; Handle(Geom_Curve) C; - GeomFill_SectionGenerator Section; - - Standard_Integer i = 0; - for (Ex.Init(aShape, TopAbs_EDGE); Ex.More(); Ex.Next()) { - Scurrent = Ex.Current() ; - if (Scurrent.IsNull() || Scurrent.ShapeType() != TopAbs_EDGE) return 0; - C = BRep_Tool::Curve(TopoDS::Edge(Scurrent), First, Last); - C = new Geom_TrimmedCurve(C, First, Last); - Section.AddCurve(C); - i++; - } - - /* a 'tolerance' is used to compare 2 knots : see GeomFill_Generator.cdl */ - Section.Perform(Precision::Confusion()); - Handle(GeomFill_Line) Line = new GeomFill_Line(i); - GeomFill_AppSurf App (mindeg, maxdeg, tol3d, tol2d, nbiter); /* user parameters */ - App.Perform(Line, Section, isApprox); - - if (!App.IsDone()) return 0; - Standard_Integer UDegree, VDegree, NbUPoles, NbVPoles, NbUKnots, NbVKnots; - App.SurfShape(UDegree, VDegree, NbUPoles, NbVPoles, NbUKnots, NbVKnots); - Handle(Geom_BSplineSurface) GBS = new Geom_BSplineSurface - (App.SurfPoles(), App.SurfWeights(), App.SurfUKnots(), App.SurfVKnots(), - App.SurfUMults(), App.SurfVMults(), App.UDegree(), App.VDegree()); - - if (GBS.IsNull()) return 0; - aShape = BRepBuilderAPI_MakeFace(GBS); + if(!isApprox) { + // make filling as in old version of SALOME (before 4.1.1) + GeomFill_SectionGenerator Section; + Standard_Integer i = 0; + for (Ex.Init(aShape, TopAbs_EDGE); Ex.More(); Ex.Next()) { + Scurrent = Ex.Current() ; + if (Scurrent.IsNull() || Scurrent.ShapeType() != TopAbs_EDGE) return 0; + C = BRep_Tool::Curve(TopoDS::Edge(Scurrent), First, Last); + C = new Geom_TrimmedCurve(C, First, Last); + Section.AddCurve(C); + i++; + } + + /* a 'tolerance' is used to compare 2 knots : see GeomFill_Generator.cdl */ + Section.Perform(Precision::Confusion()); + Handle(GeomFill_Line) Line = new GeomFill_Line(i); + + GeomFill_AppSurf App (mindeg, maxdeg, tol3d, tol2d, nbiter); /* user parameters */ + App.Perform(Line, Section); + + if (!App.IsDone()) return 0; + Standard_Integer UDegree, VDegree, NbUPoles, NbVPoles, NbUKnots, NbVKnots; + App.SurfShape(UDegree, VDegree, NbUPoles, NbVPoles, NbUKnots, NbVKnots); + Handle(Geom_BSplineSurface) GBS = new Geom_BSplineSurface + (App.SurfPoles(), App.SurfWeights(), App.SurfUKnots(), App.SurfVKnots(), + App.SurfUMults(), App.SurfVMults(), App.UDegree(), App.VDegree()); + + if (GBS.IsNull()) return 0; + aShape = BRepBuilderAPI_MakeFace(GBS); + } + else { + // implemented by skl 20.03.2008 for bug 16568 + // make approximation - try to create bspline surface + // using GeomAPI_PointsToBSplineSurface + TColGeom_SequenceOfCurve aSeq; + int MaxNbPoles = 0; + // add curves from edges to sequence and find maximal + // number of poles if some of them are bsplines + for (Ex.Init(aShape, TopAbs_EDGE); Ex.More(); Ex.Next()) { + Scurrent = Ex.Current() ; + if (Scurrent.IsNull() || Scurrent.ShapeType() != TopAbs_EDGE) return 0; + C = BRep_Tool::Curve(TopoDS::Edge(Scurrent), First, Last); + Handle(Geom_TrimmedCurve) TC = Handle(Geom_TrimmedCurve)::DownCast(C); + if(TC.IsNull()) { + Handle(Geom_BSplineCurve) BC = Handle(Geom_BSplineCurve)::DownCast(C); + if(!BC.IsNull()) { + MaxNbPoles = Max(MaxNbPoles,BC->NbPoles()); + } + } + else { + Handle(Geom_BSplineCurve) BC = Handle(Geom_BSplineCurve)::DownCast(TC->BasisCurve()); + if(BC.IsNull()) { + Handle(Geom_TrimmedCurve) TC1 = Handle(Geom_TrimmedCurve)::DownCast(TC->BasisCurve()); + if(!TC1.IsNull()) { + BC = Handle(Geom_BSplineCurve)::DownCast(TC1->BasisCurve()); + } + } + if(!BC.IsNull()) { + MaxNbPoles = Max(MaxNbPoles,BC->NbPoles()); + } + } + aSeq.Append(C); + } + // prepare array of points for creation bspline surface + // size of this array: by U parameter - number of curves, + // by V parameter - determ using MaxNbPoles but it's + // value must be between 21(min) and 101(max) + int nbc = aSeq.Length(); + int nbp = Max(21,2*MaxNbPoles-1); + if(nbp>101) nbp = 101; + TColgp_Array2OfPnt Points(1,nbc,1,nbp); + int ic = 1; + for(; ic<=nbc; ic++) { + Handle(Geom_Curve) C = aSeq.Value(ic); + double fp = C->FirstParameter(); + double lp = C->LastParameter(); + double dp = (lp-fp)/(nbp-1); + int j = 0; + gp_Pnt P; + for(; jD0(fp+dp*j,P); + Points.SetValue(ic,j+1,P); + } + } + GeomAPI_PointsToBSplineSurface PTB(Points,mindeg,maxdeg,GeomAbs_C2,tol3d); + Handle(Geom_BSplineSurface) BS = PTB.Surface(); + BRepBuilderAPI_MakeFace BB(BS); + TopoDS_Face NewF = BB.Face(); + Handle(ShapeFix_Face) sff = new ShapeFix_Face(NewF); + sff->Perform(); + sff->FixOrientation(); + aShape = sff->Face(); + } /* We test the validity of resulting shape */ if (!BRepAlgo::IsValid((aShape))) { diff --git a/src/GEOMImpl/GEOMImpl_IBasicOperations.cxx b/src/GEOMImpl/GEOMImpl_IBasicOperations.cxx index 08d1fde18..323a17bbb 100644 --- a/src/GEOMImpl/GEOMImpl_IBasicOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IBasicOperations.cxx @@ -231,6 +231,64 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnCurve return aPoint; } + +//============================================================================= +/*! + * MakePointOnSurface + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnSurface + (Handle(GEOM_Object) theSurface, double theUParameter, double theVParameter) +{ + SetErrorCode(KO); + + if (theSurface.IsNull()) return NULL; + + //Add a new Point object + Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT); + + //Add a new Point function for creation a point relativley another point + Handle(GEOM_Function) aFunction = aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), + POINT_SURFACE_PAR); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_PointDriver::GetID()) return NULL; + + GEOMImpl_IPoint aPI (aFunction); + + Handle(GEOM_Function) aRefFunction = theSurface->GetLastFunction(); + if (aRefFunction.IsNull()) return NULL; + + aPI.SetSurface(aRefFunction); + aPI.SetParameter(theUParameter); + aPI.SetParameter2(theVParameter); + + //Compute the point value + try { +#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 + OCC_CATCH_SIGNALS; +#endif + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Point driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + GEOM::TPythonDump(aFunction) << aPoint << " = geompy.MakeVertexOnSurface(" + << theSurface << ", " << theUParameter + << ", " << theVParameter << ")"; + + SetErrorCode(OK); + return aPoint; +} + + //============================================================================= /*! * MakePointOnLinesIntersection diff --git a/src/GEOMImpl/GEOMImpl_IBasicOperations.hxx b/src/GEOMImpl/GEOMImpl_IBasicOperations.hxx index e6155178b..4fdf59716 100644 --- a/src/GEOMImpl/GEOMImpl_IBasicOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IBasicOperations.hxx @@ -44,6 +44,10 @@ class GEOMImpl_IBasicOperations : public GEOM_IOperations { Standard_EXPORT Handle(GEOM_Object) MakePointOnLinesIntersection (Handle(GEOM_Object) theLine1, Handle(GEOM_Object) theLine2); + Standard_EXPORT Handle(GEOM_Object) MakePointOnSurface (Handle(GEOM_Object) theSurface, + double theUParameter, + double theVParameter); + // Vector Standard_EXPORT Handle(GEOM_Object) MakeVectorDXDYDZ (double theDX, double theDY, double theDZ); diff --git a/src/GEOMImpl/GEOMImpl_ILocalOperations.cxx b/src/GEOMImpl/GEOMImpl_ILocalOperations.cxx index 77152afd7..c5f402992 100644 --- a/src/GEOMImpl/GEOMImpl_ILocalOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_ILocalOperations.cxx @@ -734,16 +734,16 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdges //Add a new Chamfer function Handle(GEOM_Function) aFunction = aChamfer->AddFunction(GEOMImpl_ChamferDriver::GetID(), CHAMFER_SHAPE_EDGES); - if (aFunction.IsNull()) { return NULL; cout << "Edges Function is NULL!!!" << endl; } + if (aFunction.IsNull()) { MESSAGE ( "Edges Function is NULL!!!" ); return NULL;} //Check if the function is set correctly if (aFunction->GetDriverGUID() != GEOMImpl_ChamferDriver::GetID()) - { return NULL; cout << "Chamfer Driver is NULL!!!" << endl; } + { MESSAGE ( "Chamfer Driver is NULL!!!" ); return NULL; } GEOMImpl_IChamfer aCI (aFunction); Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); - if (aRefShape.IsNull()) { return NULL; cout << "Shape is NULL!!!" << endl; } + if (aRefShape.IsNull()) { MESSAGE ("Shape is NULL!!!"); return NULL;} aCI.SetShape(aRefShape); aCI.SetD1(theD1); @@ -806,16 +806,16 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgesAD //Add a new Chamfer function Handle(GEOM_Function) aFunction = aChamfer->AddFunction(GEOMImpl_ChamferDriver::GetID(), CHAMFER_SHAPE_EDGES_AD); - if (aFunction.IsNull()) { return NULL; cout << "Edges Function is NULL!!!" << endl; } + if (aFunction.IsNull()) { MESSAGE ( "Edges Function is NULL!!!" ); return NULL; } //Check if the function is set correctly if (aFunction->GetDriverGUID() != GEOMImpl_ChamferDriver::GetID()) - { return NULL; cout << "Chamfer Driver is NULL!!!" << endl; } + { MESSAGE("Chamfer Driver is NULL!!!"); return NULL;} GEOMImpl_IChamfer aCI (aFunction); Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); - if (aRefShape.IsNull()) { return NULL; cout << "Shape is NULL!!!" << endl; } + if (aRefShape.IsNull()) { MESSAGE ("Shape is NULL!!!"); return NULL;} aCI.SetShape(aRefShape); aCI.SetD(theD); diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx index 67e26c014..fc5042bc0 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx @@ -87,9 +87,24 @@ #include #include +#include +#include +#include +#include +#include + #include #include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC +#include +#include +#include +#include +#include +#include +#include + + //============================================================================= /*! * Constructor @@ -1296,6 +1311,306 @@ TCollection_AsciiString GEOMImpl_IMeasureOperations::WhatIs (Handle(GEOM_Object) return Astr; } + +//======================================================================= +//function : CheckSingularCase +//purpose : auxilary for GetMinDistance() +// workaround for bugs 19899, 19908 and 19910 from Mantis +//======================================================================= +static double CheckSingularCase(const TopoDS_Shape& aSh1, + const TopoDS_Shape& aSh2, + gp_Pnt& Ptmp1, gp_Pnt& Ptmp2) +{ + bool IsChange1 = false; + double AddDist1 = 0.0; + TopExp_Explorer anExp; + TopoDS_Shape tmpSh1, tmpSh2; + int nbf = 0; + for ( anExp.Init( aSh1, TopAbs_FACE ); anExp.More(); anExp.Next() ) { + nbf++; + tmpSh1 = anExp.Current(); + } + if(nbf==1) { + TopoDS_Shape sh = aSh1; + while(sh.ShapeType()==TopAbs_COMPOUND) { + TopoDS_Iterator it(sh); + sh = it.Value(); + } + Handle(Geom_Surface) S = BRep_Tool::Surface(TopoDS::Face(tmpSh1)); + if( S->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) || + S->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)) ) { + if( sh.ShapeType()==TopAbs_SHELL || sh.ShapeType()==TopAbs_FACE ) { + // non solid case + double U1,U2,V1,V2; + S->Bounds(U1,U2,V1,V2); + Handle(Geom_RectangularTrimmedSurface) TrS1 = + new Geom_RectangularTrimmedSurface(S,U1,(U1+U2)/2.,V1,V2); + Handle(Geom_RectangularTrimmedSurface) TrS2 = + new Geom_RectangularTrimmedSurface(S,(U1+U2)/2.,U2,V1,V2); + BRep_Builder B; + TopoDS_Face F1,F2; + TopoDS_Compound Comp; + B.MakeCompound(Comp); + B.MakeFace(F1,TrS1,1.e-7); + B.Add(Comp,F1); + B.MakeFace(F2,TrS2,1.e-7); + B.Add(Comp,F2); + Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape; + sfs->Init(Comp); + sfs->SetPrecision(1.e-6); + sfs->SetMaxTolerance(1.0); + sfs->Perform(); + tmpSh1 = sfs->Shape(); + IsChange1 = true; + } + else { + if( S->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ) { + Handle(Geom_SphericalSurface) SS = Handle(Geom_SphericalSurface)::DownCast(S); + gp_Pnt PC = SS->Location(); + BRep_Builder B; + TopoDS_Vertex V; + B.MakeVertex(V,PC,1.e-7); + tmpSh1 = V; + AddDist1 = SS->Radius(); + IsChange1 = true; + } + else { + Handle(Geom_ToroidalSurface) TS = Handle(Geom_ToroidalSurface)::DownCast(S); + gp_Ax3 ax3 = TS->Position(); + Handle(Geom_Circle) C = new Geom_Circle(ax3.Ax2(),TS->MajorRadius()); + BRep_Builder B; + TopoDS_Edge E; + B.MakeEdge(E,C,1.e-7); + tmpSh1 = E; + AddDist1 = TS->MinorRadius(); + IsChange1 = true; + } + } + } + else + tmpSh1 = aSh1; + } + else + tmpSh1 = aSh1; + bool IsChange2 = false; + double AddDist2 = 0.0; + nbf = 0; + for ( anExp.Init( aSh2, TopAbs_FACE ); anExp.More(); anExp.Next() ) { + nbf++; + tmpSh2 = anExp.Current(); + } + if(nbf==1) { + TopoDS_Shape sh = aSh2; + while(sh.ShapeType()==TopAbs_COMPOUND) { + TopoDS_Iterator it(sh); + sh = it.Value(); + } + Handle(Geom_Surface) S = BRep_Tool::Surface(TopoDS::Face(tmpSh2)); + if( S->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) || + S->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)) ) { + if( sh.ShapeType()==TopAbs_SHELL || sh.ShapeType()==TopAbs_FACE ) { + // non solid case + double U1,U2,V1,V2; + S->Bounds(U1,U2,V1,V2); + Handle(Geom_RectangularTrimmedSurface) TrS1 = + new Geom_RectangularTrimmedSurface(S,U1,(U1+U2)/2.,V1,V2); + Handle(Geom_RectangularTrimmedSurface) TrS2 = + new Geom_RectangularTrimmedSurface(S,(U1+U2)/2.,U2,V1,V2); + BRep_Builder B; + TopoDS_Face F1,F2; + TopoDS_Compound Comp; + B.MakeCompound(Comp); + B.MakeFace(F1,TrS1,1.e-7); + B.Add(Comp,F1); + B.MakeFace(F2,TrS2,1.e-7); + B.Add(Comp,F2); + Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape; + sfs->Init(Comp); + sfs->SetPrecision(1.e-6); + sfs->SetMaxTolerance(1.0); + sfs->Perform(); + tmpSh2 = sfs->Shape(); + IsChange2 = true; + } + else { + if( S->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ) { + Handle(Geom_SphericalSurface) SS = Handle(Geom_SphericalSurface)::DownCast(S); + gp_Pnt PC = SS->Location(); + BRep_Builder B; + TopoDS_Vertex V; + B.MakeVertex(V,PC,1.e-7); + tmpSh2 = V; + AddDist2 = SS->Radius(); + IsChange2 = true; + } + else if( S->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)) ) { + Handle(Geom_ToroidalSurface) TS = Handle(Geom_ToroidalSurface)::DownCast(S); + gp_Ax3 ax3 = TS->Position(); + Handle(Geom_Circle) C = new Geom_Circle(ax3.Ax2(),TS->MajorRadius()); + BRep_Builder B; + TopoDS_Edge E; + B.MakeEdge(E,C,1.e-7); + tmpSh2 = E; + AddDist2 = TS->MinorRadius(); + IsChange2 = true; + } + } + } + else + tmpSh2 = aSh2; + } + else + tmpSh2 = aSh2; + + if( !IsChange1 && !IsChange2 ) + return -2.0; + + BRepExtrema_DistShapeShape dst(tmpSh1,tmpSh2); + if (dst.IsDone()) { + double MinDist = 1.e9; + gp_Pnt PMin1, PMin2, P1, P2; + for (int i = 1; i <= dst.NbSolution(); i++) { + P1 = dst.PointOnShape1(i); + P2 = dst.PointOnShape2(i); + Standard_Real Dist = P1.Distance(P2); + if (MinDist > Dist) { + MinDist = Dist; + PMin1 = P1; + PMin2 = P2; + } + } + if(MinDist<1.e-7) { + Ptmp1 = PMin1; + Ptmp2 = PMin2; + } + else { + gp_Dir aDir(gp_Vec(PMin1,PMin2)); + if( MinDist > (AddDist1+AddDist2) ) { + Ptmp1 = gp_Pnt( PMin1.X() + aDir.X()*AddDist1, + PMin1.Y() + aDir.Y()*AddDist1, + PMin1.Z() + aDir.Z()*AddDist1 ); + Ptmp2 = gp_Pnt( PMin2.X() - aDir.X()*AddDist2, + PMin2.Y() - aDir.Y()*AddDist2, + PMin2.Z() - aDir.Z()*AddDist2 ); + return (MinDist - AddDist1 - AddDist2); + } + else { + if( AddDist1 > 0 ) { + Ptmp1 = gp_Pnt( PMin1.X() + aDir.X()*AddDist1, + PMin1.Y() + aDir.Y()*AddDist1, + PMin1.Z() + aDir.Z()*AddDist1 ); + Ptmp2 = Ptmp1; + } + else { + Ptmp2 = gp_Pnt( PMin2.X() - aDir.X()*AddDist2, + PMin2.Y() - aDir.Y()*AddDist2, + PMin2.Z() - aDir.Z()*AddDist2 ); + Ptmp1 = Ptmp2; + } + } + } + double res = MinDist - AddDist1 - AddDist2; + if(res<0.) res = 0.0; + return res; + } + return -2.0; +} +/* old variant +static bool CheckSingularCase(const TopoDS_Shape& aSh1, + const TopoDS_Shape& aSh2, + gp_Pnt& Ptmp) +{ + TopExp_Explorer anExp; + TopoDS_Shape tmpSh1, tmpSh2; + int nbf = 0; + for ( anExp.Init( aSh1, TopAbs_FACE ); anExp.More(); anExp.Next() ) { + nbf++; + tmpSh1 = anExp.Current(); + } + if(nbf==1) { + Handle(Geom_Surface) S1 = BRep_Tool::Surface(TopoDS::Face(tmpSh1)); + if( S1->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) || + S1->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)) ) { + nbf = 0; + for ( anExp.Init( aSh2, TopAbs_FACE ); anExp.More(); anExp.Next() ) { + nbf++; + tmpSh2 = anExp.Current(); + Handle(Geom_Surface) S2 = BRep_Tool::Surface(TopoDS::Face(tmpSh2)); + GeomAPI_IntSS ISS(S1,S2,1.e-7); + if(ISS.IsDone()) { + for(int i=1; i<=ISS.NbLines(); i++) { + Handle(Geom_Curve) C3d = ISS.Line(i); + BRep_Builder B; + TopoDS_Edge E; + B.MakeEdge(E,C3d,1.e-7); + BRepExtrema_DistShapeShape dst(tmpSh2,E); + if (dst.IsDone()) { + gp_Pnt PMin1, PMin2, P1, P2; + double MinDist = 1.e9; + for (int i = 1; i <= dst.NbSolution(); i++) { + P1 = dst.PointOnShape1(i); + P2 = dst.PointOnShape2(i); + Standard_Real Dist = P1.Distance(P2); + if (MinDist > Dist) { + MinDist = Dist; + Ptmp = P1; + } + } + if(MinDist<1.e-7) + return true; + } + } + } + } + } + } + nbf = 0; + for ( anExp.Init( aSh2, TopAbs_FACE ); anExp.More(); anExp.Next() ) { + nbf++; + tmpSh1 = anExp.Current(); + } + if(nbf==1) { + Handle(Geom_Surface) S1 = BRep_Tool::Surface(TopoDS::Face(tmpSh1)); + if( S1->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) || + S1->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)) ) { + nbf = 0; + for ( anExp.Init( aSh1, TopAbs_FACE ); anExp.More(); anExp.Next() ) { + nbf++; + tmpSh2 = anExp.Current(); + Handle(Geom_Surface) S2 = BRep_Tool::Surface(TopoDS::Face(tmpSh2)); + GeomAPI_IntSS ISS(S1,S2,1.e-7); + if(ISS.IsDone()) { + for(int i=1; i<=ISS.NbLines(); i++) { + Handle(Geom_Curve) C3d = ISS.Line(i); + BRep_Builder B; + TopoDS_Edge E; + B.MakeEdge(E,C3d,1.e-7); + BRepExtrema_DistShapeShape dst(tmpSh2,E); + if (dst.IsDone()) { + gp_Pnt P1,P2; + double MinDist = 1.e9; + for (int i = 1; i <= dst.NbSolution(); i++) { + P1 = dst.PointOnShape1(i); + P2 = dst.PointOnShape2(i); + Standard_Real Dist = P1.Distance(P2); + if (MinDist > Dist) { + MinDist = Dist; + Ptmp = P1; + } + } + if(MinDist<1.e-7) + return true; + } + } + } + } + } + } + return false; +} +*/ + + //============================================================================= /*! * GetMinDistance @@ -1327,6 +1642,18 @@ Standard_Real GEOMImpl_IMeasureOperations::GetMinDistance #if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 OCC_CATCH_SIGNALS; #endif + + // skl 30.06.2008 + // additional workaround for bugs 19899, 19908 and 19910 from Mantis + gp_Pnt Ptmp1, Ptmp2; + double dist = CheckSingularCase(aShape1, aShape2, Ptmp1, Ptmp2); + if(dist>-1.0) { + Ptmp1.Coord(X1, Y1, Z1); + Ptmp2.Coord(X2, Y2, Z2); + SetErrorCode(OK); + return dist; + } + BRepExtrema_DistShapeShape dst (aShape1, aShape2); if (dst.IsDone()) { gp_Pnt PMin1, PMin2, P1, P2; @@ -1467,6 +1794,317 @@ Standard_Real GEOMImpl_IMeasureOperations::GetAngle (Handle(GEOM_Object) theLine return anAngle; } + +//============================================================================= +/*! + * CurveCurvatureByParam + */ +//============================================================================= +Standard_Real GEOMImpl_IMeasureOperations::CurveCurvatureByParam + (Handle(GEOM_Object) theCurve, Standard_Real& theParam) +{ + SetErrorCode(KO); + Standard_Real aRes = -1.0; + + if(theCurve.IsNull()) return aRes; + + Handle(GEOM_Function) aRefShape = theCurve->GetLastFunction(); + if(aRefShape.IsNull()) return aRes; + + TopoDS_Shape aShape = aRefShape->GetValue(); + if(aShape.IsNull()) { + SetErrorCode("One of Objects has NULL Shape"); + return aRes; + } + + Standard_Real aFP, aLP, aP; + Handle(Geom_Curve) aCurve = BRep_Tool::Curve(TopoDS::Edge(aShape), aFP, aLP); + aP = aFP + (aLP - aFP) * theParam; + + if(aCurve.IsNull()) return aRes; + + //Compute curvature + try { +#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 + OCC_CATCH_SIGNALS; +#endif + GeomLProp_CLProps Prop = GeomLProp_CLProps + (aCurve, aP, 2, Precision::Confusion()); + aRes = fabs(Prop.Curvature()); + SetErrorCode(OK); + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return aRes; + } + + if( aRes > Precision::Confusion() ) + aRes = 1/aRes; + else + aRes = RealLast(); + + return aRes; +} + + +//============================================================================= +/*! + * CurveCurvatureByPoint + */ +//============================================================================= +Standard_Real GEOMImpl_IMeasureOperations::CurveCurvatureByPoint + (Handle(GEOM_Object) theCurve, Handle(GEOM_Object) thePoint) +{ + SetErrorCode(KO); + Standard_Real aRes = -1.0; + + if( theCurve.IsNull() || thePoint.IsNull() ) return aRes; + + Handle(GEOM_Function) aRefCurve = theCurve->GetLastFunction(); + Handle(GEOM_Function) aRefPoint = thePoint->GetLastFunction(); + if( aRefCurve.IsNull() || aRefPoint.IsNull() ) return aRes; + + TopoDS_Edge anEdge = TopoDS::Edge(aRefCurve->GetValue()); + TopoDS_Vertex aPnt = TopoDS::Vertex(aRefPoint->GetValue()); + if( anEdge.IsNull() || aPnt.IsNull() ) { + SetErrorCode("One of Objects has NULL Shape"); + return aRes; + } + + Standard_Real aFP, aLP; + Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, aFP, aLP); + if(aCurve.IsNull()) return aRes; + gp_Pnt aPoint = BRep_Tool::Pnt(aPnt); + + //Compute curvature + try { +#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 + OCC_CATCH_SIGNALS; +#endif + GeomAPI_ProjectPointOnCurve PPC(aPoint, aCurve, aFP, aLP); + if(PPC.NbPoints()>0) { + GeomLProp_CLProps Prop = GeomLProp_CLProps + (aCurve, PPC.LowerDistanceParameter(), 2, Precision::Confusion()); + aRes = fabs(Prop.Curvature()); + SetErrorCode(OK); + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return aRes; + } + + if( aRes > Precision::Confusion() ) + aRes = 1/aRes; + else + aRes = RealLast(); + + return aRes; +} + + +//============================================================================= +/*! + * getSurfaceCurvatures + */ +//============================================================================= +Standard_Real GEOMImpl_IMeasureOperations::getSurfaceCurvatures + (const Handle(Geom_Surface)& aSurf, + Standard_Real theUParam, + Standard_Real theVParam, + Standard_Boolean theNeedMaxCurv) +{ + SetErrorCode(KO); + Standard_Real aRes = 1.0; + + if (aSurf.IsNull()) return aRes; + + try { +#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 + OCC_CATCH_SIGNALS; +#endif + GeomLProp_SLProps Prop = GeomLProp_SLProps + (aSurf, theUParam, theVParam, 2, Precision::Confusion()); + if(Prop.IsCurvatureDefined()) { + if(Prop.IsUmbilic()) { + //cout<<"is umbilic"<GetMessageString()); + return aRes; + } + + if( fabs(aRes) > Precision::Confusion() ) + aRes = 1/aRes; + else + aRes = RealLast(); + + return aRes; +} + + +//============================================================================= +/*! + * MaxSurfaceCurvatureByParam + */ +//============================================================================= +Standard_Real GEOMImpl_IMeasureOperations::MaxSurfaceCurvatureByParam + (Handle(GEOM_Object) theSurf, + Standard_Real& theUParam, + Standard_Real& theVParam) +{ + SetErrorCode(KO); + Standard_Real aRes = -1.0; + + if (theSurf.IsNull()) return aRes; + + Handle(GEOM_Function) aRefShape = theSurf->GetLastFunction(); + if(aRefShape.IsNull()) return aRes; + + TopoDS_Shape aShape = aRefShape->GetValue(); + if(aShape.IsNull()) { + SetErrorCode("One of Objects has NULL Shape"); + return aRes; + } + + TopoDS_Face F = TopoDS::Face(aShape); + Handle(Geom_Surface) aSurf = BRep_Tool::Surface(F); + + //Compute the parameters + Standard_Real U1,U2,V1,V2; + ShapeAnalysis::GetFaceUVBounds(F,U1,U2,V1,V2); + Standard_Real U = U1 + (U2-U1)*theUParam; + Standard_Real V = V1 + (V2-V1)*theVParam; + + return getSurfaceCurvatures(aSurf, U, V, true); +} + + +//============================================================================= +/*! + * MaxSurfaceCurvatureByPoint + */ +//============================================================================= +Standard_Real GEOMImpl_IMeasureOperations::MaxSurfaceCurvatureByPoint + (Handle(GEOM_Object) theSurf, Handle(GEOM_Object) thePoint) +{ + SetErrorCode(KO); + Standard_Real aRes = -1.0; + + if( theSurf.IsNull() || thePoint.IsNull() ) return aRes; + + Handle(GEOM_Function) aRefShape = theSurf->GetLastFunction(); + Handle(GEOM_Function) aRefPoint = thePoint->GetLastFunction(); + if( aRefShape.IsNull() || aRefPoint.IsNull() ) return aRes; + + TopoDS_Face aFace = TopoDS::Face(aRefShape->GetValue()); + TopoDS_Vertex aPnt = TopoDS::Vertex(aRefPoint->GetValue()); + if( aFace.IsNull() || aPnt.IsNull() ) { + SetErrorCode("One of Objects has NULL Shape"); + return 0; + } + + Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace); + if(aSurf.IsNull()) return aRes; + gp_Pnt aPoint = BRep_Tool::Pnt(aPnt); + + //Compute the parameters + ShapeAnalysis_Surface sas(aSurf); + gp_Pnt2d UV = sas.ValueOfUV(aPoint,Precision::Confusion()); + + return getSurfaceCurvatures(aSurf, UV.X(), UV.Y(), true); +} + + +//============================================================================= +/*! + * MinSurfaceCurvatureByParam + */ +//============================================================================= +Standard_Real GEOMImpl_IMeasureOperations::MinSurfaceCurvatureByParam + (Handle(GEOM_Object) theSurf, + Standard_Real& theUParam, + Standard_Real& theVParam) +{ + SetErrorCode(KO); + Standard_Real aRes = -1.0; + + if (theSurf.IsNull()) return aRes; + + Handle(GEOM_Function) aRefShape = theSurf->GetLastFunction(); + if(aRefShape.IsNull()) return aRes; + + TopoDS_Shape aShape = aRefShape->GetValue(); + if(aShape.IsNull()) { + SetErrorCode("One of Objects has NULL Shape"); + return aRes; + } + + TopoDS_Face F = TopoDS::Face(aShape); + Handle(Geom_Surface) aSurf = BRep_Tool::Surface(F); + + //Compute the parameters + Standard_Real U1,U2,V1,V2; + ShapeAnalysis::GetFaceUVBounds(F,U1,U2,V1,V2); + Standard_Real U = U1 + (U2-U1)*theUParam; + Standard_Real V = V1 + (V2-V1)*theVParam; + + return getSurfaceCurvatures(aSurf, U, V, false); +} + + +//============================================================================= +/*! + * MinSurfaceCurvatureByPoint + */ +//============================================================================= +Standard_Real GEOMImpl_IMeasureOperations::MinSurfaceCurvatureByPoint + (Handle(GEOM_Object) theSurf, Handle(GEOM_Object) thePoint) +{ + SetErrorCode(KO); + Standard_Real aRes = -1.0; + + if( theSurf.IsNull() || thePoint.IsNull() ) return aRes; + + Handle(GEOM_Function) aRefShape = theSurf->GetLastFunction(); + Handle(GEOM_Function) aRefPoint = thePoint->GetLastFunction(); + if( aRefShape.IsNull() || aRefPoint.IsNull() ) return aRes; + + TopoDS_Face aFace = TopoDS::Face(aRefShape->GetValue()); + TopoDS_Vertex aPnt = TopoDS::Vertex(aRefPoint->GetValue()); + if( aFace.IsNull() || aPnt.IsNull() ) { + SetErrorCode("One of Objects has NULL Shape"); + return 0; + } + + Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace); + if(aSurf.IsNull()) return aRes; + gp_Pnt aPoint = BRep_Tool::Pnt(aPnt); + + //Compute the parameters + ShapeAnalysis_Surface sas(aSurf); + gp_Pnt2d UV = sas.ValueOfUV(aPoint,Precision::Confusion()); + + return getSurfaceCurvatures(aSurf, UV.X(), UV.Y(), false); +} + + //======================================================================= //function : StructuralDump //purpose : Structural (data exchange) style of output. @@ -1709,6 +2347,7 @@ void GEOMImpl_IMeasureOperations::StructuralDump (const BRepCheck_Analyzer& theA } } + //======================================================================= //function : GetProblemShapes // purpose : for StructuralDump diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx index 24f6e5253..50a596854 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx @@ -31,6 +31,7 @@ #include #include #include +#include class GEOM_Engine; class Handle(GEOM_Object); @@ -130,6 +131,24 @@ class GEOMImpl_IMeasureOperations : public GEOM_IOperations { Standard_EXPORT Standard_Real GetAngle (Handle(GEOM_Object) theLine1, Handle(GEOM_Object) theLine2); + + // Methods for recieving radiuses of curvature of curves and surfaces + // in the given point + Standard_EXPORT Standard_Real CurveCurvatureByParam (Handle(GEOM_Object) theCurve, + Standard_Real& theParam); + Standard_EXPORT Standard_Real CurveCurvatureByPoint (Handle(GEOM_Object) theCurve, + Handle(GEOM_Object) thePoint); + Standard_EXPORT Standard_Real MaxSurfaceCurvatureByParam (Handle(GEOM_Object) theSurf, + Standard_Real& theUParam, + Standard_Real& theVParam); + Standard_EXPORT Standard_Real MaxSurfaceCurvatureByPoint (Handle(GEOM_Object) theSurf, + Handle(GEOM_Object) thePoint); + Standard_EXPORT Standard_Real MinSurfaceCurvatureByParam (Handle(GEOM_Object) theSurf, + Standard_Real& theUParam, + Standard_Real& theVParam); + Standard_EXPORT Standard_Real MinSurfaceCurvatureByPoint (Handle(GEOM_Object) theSurf, + Handle(GEOM_Object) thePoint); + public: Standard_EXPORT static gp_Ax3 GetPosition (const TopoDS_Shape& theShape); @@ -150,6 +169,11 @@ class GEOMImpl_IMeasureOperations : public GEOM_IOperations { Handle(TColStd_HArray1OfInteger)& NbProblems, const TopAbs_ShapeEnum Subtype, TopTools_DataMapOfShapeListOfShape& theMap); + + Standard_Real getSurfaceCurvatures (const Handle(Geom_Surface)& aSurf, + Standard_Real theUParam, + Standard_Real theVParam, + Standard_Boolean theNeedMaxCurv); }; #endif diff --git a/src/GEOMImpl/GEOMImpl_IPoint.hxx b/src/GEOMImpl/GEOMImpl_IPoint.hxx index b796a51f5..7b7ed39c9 100755 --- a/src/GEOMImpl/GEOMImpl_IPoint.hxx +++ b/src/GEOMImpl/GEOMImpl_IPoint.hxx @@ -33,6 +33,9 @@ #define ARG_LINE1 7 #define ARG_LINE2 8 +#define ARG_SURFACE 9 +#define ARG_PARAM2 10 + class GEOMImpl_IPoint { public: @@ -52,16 +55,20 @@ class GEOMImpl_IPoint Handle(GEOM_Function) GetRef() { return _func->GetReference(ARG_REF); } void SetCurve(Handle(GEOM_Function) theRef) { _func->SetReference(ARG_CURVE, theRef); } + void SetSurface(Handle(GEOM_Function) theRef) { _func->SetReference(ARG_SURFACE, theRef); } void SetLine1(Handle(GEOM_Function) theRef) { _func->SetReference(ARG_LINE1, theRef); } void SetLine2(Handle(GEOM_Function) theRef) { _func->SetReference(ARG_LINE2, theRef); } Handle(GEOM_Function) GetCurve() { return _func->GetReference(ARG_CURVE); } + Handle(GEOM_Function) GetSurface() { return _func->GetReference(ARG_SURFACE); } Handle(GEOM_Function) GetLine1() { return _func->GetReference(ARG_LINE1); } Handle(GEOM_Function) GetLine2() { return _func->GetReference(ARG_LINE2); } void SetParameter(double theParam) { _func->SetReal(ARG_PARAM, theParam); } + void SetParameter2(double theParam) { _func->SetReal(ARG_PARAM2, theParam); } double GetParameter() { return _func->GetReal(ARG_PARAM); } + double GetParameter2() { return _func->GetReal(ARG_PARAM2); } private: diff --git a/src/GEOMImpl/GEOMImpl_IScale.hxx b/src/GEOMImpl/GEOMImpl_IScale.hxx index 9a7e904a2..e2bad90e6 100644 --- a/src/GEOMImpl/GEOMImpl_IScale.hxx +++ b/src/GEOMImpl/GEOMImpl_IScale.hxx @@ -25,6 +25,8 @@ #define SCALE_ARG_SHAPE 1 #define SCALE_ARG_VALUE 2 #define SCALE_ARG_POINT 3 +#define SCALE_ARG_VALUE_Y 4 +#define SCALE_ARG_VALUE_Z 5 class GEOMImpl_IScale { @@ -44,6 +46,14 @@ class GEOMImpl_IScale Handle(GEOM_Function) GetPoint() { return _func->GetReference(SCALE_ARG_POINT); } + void SetFactorX(double theValue) { _func->SetReal(SCALE_ARG_VALUE , theValue); } + void SetFactorY(double theValue) { _func->SetReal(SCALE_ARG_VALUE_Y, theValue); } + void SetFactorZ(double theValue) { _func->SetReal(SCALE_ARG_VALUE_Z, theValue); } + + double GetFactorX() { return _func->GetReal(SCALE_ARG_VALUE ); } + double GetFactorY() { return _func->GetReal(SCALE_ARG_VALUE_Y); } + double GetFactorZ() { return _func->GetReal(SCALE_ARG_VALUE_Z); } + private: Handle(GEOM_Function) _func; diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx index da8b3c1d7..a3b7dde7c 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx @@ -48,6 +48,7 @@ #include "GEOMAlgo_FinderShapeOnQuad.hxx" #include "GEOMAlgo_FinderShapeOn2.hxx" #include "GEOMAlgo_ClsfBox.hxx" +#include "GEOMAlgo_ClsfSolid.hxx" #include "GEOMAlgo_Gluer1.hxx" #include "GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx" #include "GEOMAlgo_CoupleOfShapes.hxx" @@ -65,6 +66,7 @@ #include #include +#include #include #include @@ -114,6 +116,7 @@ #include +#include #include #include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC @@ -794,8 +797,6 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeExplode TopExp::MapShapes(aShape, anIndices); Handle(TColStd_HArray1OfInteger) anArray; - Standard_Integer nbAllSubShape = anIndices.Extent(); - TopTools_ListIteratorOfListOfShape itSub (listShape); TCollection_AsciiString anAsciiList, anEntry; for (int index = 1; itSub.More(); itSub.Next(), ++index) @@ -1552,7 +1553,7 @@ Handle(TColStd_HSequenceOfInteger) // Make a Python command GEOM::TPythonDump(aFunction) - << "listShapesOnBoxIDs = geompy.GetShapesOnQuadrangleIDs(" + << "listShapesOnBoxIDs = geompy.GetShapesOnBoxIDs(" << theBox << ", " << theShape << ", " << TopAbs_ShapeEnum(theShapeType) << ", " @@ -1610,6 +1611,235 @@ Handle(TColStd_HSequenceOfTransient) } +//======================================================================= +//function : getShapesOnShapeIDs +/*! + * \brief Find IDs of subshapes complying with given status about surface + * \param theCheckShape - the shape to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes + */ +//======================================================================= + +Handle(TColStd_HSequenceOfInteger) + GEOMImpl_IShapesOperations::getShapesOnShapeIDs + (const Handle(GEOM_Object)& theCheckShape, + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState) +{ + Handle(TColStd_HSequenceOfInteger) aSeqOfIDs; + + TopoDS_Shape aCheckShape = theCheckShape->GetValue(); + TopoDS_Shape aShape = theShape->GetValue(); + TopTools_ListOfShape res; + + // Check presence of triangulation, build if need + if (!CheckTriangulation(aShape)) { + SetErrorCode("Cannot build triangulation on the shape"); + return aSeqOfIDs; + } + + // Call algo + GEOMAlgo_FinderShapeOn2 aFinder; + Standard_Real aTol = 0.0001; // default value + + Handle(GEOMAlgo_ClsfSolid) aClsfSolid = new GEOMAlgo_ClsfSolid; + aClsfSolid->SetShape(aCheckShape); + + aFinder.SetShape(aShape); + aFinder.SetTolerance(aTol); + aFinder.SetClsf(aClsfSolid); + aFinder.SetShapeType( (TopAbs_ShapeEnum)theShapeType ); + aFinder.SetState(theState); + aFinder.Perform(); + + // Interprete results + Standard_Integer iErr = aFinder.ErrorStatus(); + // the detailed description of error codes is in GEOMAlgo_FinderShapeOn1.cxx + if (iErr) { + MESSAGE(" iErr : " << iErr); + TCollection_AsciiString aMsg (" iErr : "); + aMsg += TCollection_AsciiString(iErr); + SetErrorCode(aMsg); + return aSeqOfIDs; + } + Standard_Integer iWrn = aFinder.WarningStatus(); + // the detailed description of warning codes is in GEOMAlgo_FinderShapeOn1.cxx + if (iWrn) { + MESSAGE(" *** iWrn : " << iWrn); + } + + const TopTools_ListOfShape& listSS = aFinder.Shapes(); // the result + + if (listSS.Extent() < 1) { + //SetErrorCode("Not a single sub-shape of the requested type found on the given surface"); + SetErrorCode(NOT_FOUND_ANY); // NPAL18017 + } + + // Fill sequence of object IDs + aSeqOfIDs = new TColStd_HSequenceOfInteger; + + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aShape, anIndices); + + TopTools_ListIteratorOfListOfShape itSub (listSS); + for (int index = 1; itSub.More(); itSub.Next(), ++index) { + int id = anIndices.FindIndex(itSub.Value()); + aSeqOfIDs->Append(id); + } + + return aSeqOfIDs; +} + + +//======================================================================= +//function : GetShapesOnShapeIDs +/*! + * \brief Find subshapes complying with given status about surface + * \param theCheckShape - the shape to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes + */ +//======================================================================= + +Handle(TColStd_HSequenceOfInteger) + GEOMImpl_IShapesOperations::GetShapesOnShapeIDs + (const Handle(GEOM_Object)& theCheckShape, + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState) +{ + Handle(TColStd_HSequenceOfInteger) aSeqOfIDs = + getShapesOnShapeIDs (theCheckShape, theShape, theShapeType, theState); + + if ( aSeqOfIDs.IsNull() || aSeqOfIDs->Length() == 0 ) + return NULL; + + // The GetShapesOnShape() doesn't change object so no new function is required. + Handle(GEOM_Function) aFunction = + GEOM::GetCreatedLast(theShape,theCheckShape)->GetLastFunction(); + + // Make a Python command + GEOM::TPythonDump(aFunction) + << "listShapesOnBoxIDs = geompy.GetShapesOnShapeIDs(" + << theCheckShape << ", " + << theShape << ", " + << TopAbs_ShapeEnum(theShapeType) << ", " + << theState << ")"; + + SetErrorCode(OK); + return aSeqOfIDs; +} + + +//======================================================================= +//function : GetShapesOnShape +/*! + * \brief Find subshapes complying with given status about surface + * \param theCheckShape - the shape to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \retval Handle(TColStd_HSequenceOfTransient) - found subshapes + */ +//======================================================================= + +Handle(TColStd_HSequenceOfTransient) + GEOMImpl_IShapesOperations::GetShapesOnShape + (const Handle(GEOM_Object)& theCheckShape, + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState) +{ + Handle(TColStd_HSequenceOfInteger) aSeqOfIDs = + getShapesOnShapeIDs (theCheckShape, theShape, theShapeType, theState); + if ( aSeqOfIDs.IsNull() || aSeqOfIDs->Length() == 0 ) + return NULL; + + // Find objects by indices + TCollection_AsciiString anAsciiList; + Handle(TColStd_HSequenceOfTransient) aSeq; + aSeq = getObjectsShapesOn( theShape, aSeqOfIDs, anAsciiList ); + + if ( aSeq.IsNull() || aSeq->IsEmpty() ) + return NULL; + + // Make a Python command + + Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast( aSeq->Value( 1 )); + Handle(GEOM_Function) aFunction = anObj->GetLastFunction(); + + GEOM::TPythonDump(aFunction) + << "[" << anAsciiList.ToCString() << "] = geompy.GetShapesOnShape(" + << theCheckShape << ", " + << theShape << ", " + << TopAbs_ShapeEnum(theShapeType) << ", " + << theState << ")"; + + + SetErrorCode(OK); + return aSeq; +} + + +//======================================================================= +//function : GetShapesOnShapeAsCompound +//======================================================================= + +Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetShapesOnShapeAsCompound + (const Handle(GEOM_Object)& theCheckShape, + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState) +{ + Handle(TColStd_HSequenceOfInteger) aSeqOfIDs = + getShapesOnShapeIDs (theCheckShape, theShape, theShapeType, theState); + + if ( aSeqOfIDs.IsNull() || aSeqOfIDs->Length() == 0 ) + return NULL; + + // Find objects by indices + TCollection_AsciiString anAsciiList; + Handle(TColStd_HSequenceOfTransient) aSeq; + aSeq = getObjectsShapesOn( theShape, aSeqOfIDs, anAsciiList ); + + if ( aSeq.IsNull() || aSeq->IsEmpty() ) + return NULL; + + TopoDS_Compound aCompound; + BRep_Builder B; + B.MakeCompound(aCompound); + int i = 1; + for(; i<=aSeq->Length(); i++) { + Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(aSeq->Value(i)); + TopoDS_Shape aShape_i = anObj->GetValue(); + B.Add(aCompound,aShape_i); + } + + //Add a new result object + Handle(GEOM_Object) aRes = GetEngine()->AddObject(GetDocID(), GEOM_SHAPES_ON_SHAPE); + Handle(GEOM_Function) aFunction = + aRes->AddFunction(GEOMImpl_ShapeDriver::GetID(), SHAPES_ON_SHAPE); + aFunction->SetValue(aCompound); + + GEOM::TPythonDump(aFunction) + << aRes << " = geompy.GetShapesOnShapeAsCompound(" + << theCheckShape << ", " + << theShape << ", " + << TopAbs_ShapeEnum(theShapeType) << ", " + << theState << ")"; + + SetErrorCode(OK); + + return aRes; +} + + //======================================================================= //function : getShapesOnSurfaceIDs /*! @@ -2579,19 +2809,17 @@ static bool GetInPlaceOfShape (const Handle(GEOM_Function)& theWhereFunction, void GEOMImpl_IShapesOperations::GetShapeProperties( const TopoDS_Shape aShape, Standard_Real tab[], gp_Pnt & aVertex ) { - GProp_GProps SProps, VProps; + GProp_GProps theProps; gp_Pnt aCenterMass; TopoDS_Shape aPntShape; Standard_Real aShapeSize; - BRepGProp::VolumeProperties(aShape, VProps); - aCenterMass = VProps.CentreOfMass(); - aShapeSize = VProps.Mass(); - if (aShape.ShapeType() == TopAbs_FACE) { - BRepGProp::SurfaceProperties(aShape, SProps); - aCenterMass = SProps.CentreOfMass(); - aShapeSize = SProps.Mass(); - } + if (aShape.ShapeType() == TopAbs_EDGE) BRepGProp::LinearProperties(aShape, theProps); + else if (aShape.ShapeType() == TopAbs_FACE) BRepGProp::SurfaceProperties(aShape, theProps); + else BRepGProp::VolumeProperties(aShape, theProps); + + aCenterMass = theProps.CentreOfMass(); + aShapeSize = theProps.Mass(); aPntShape = BRepBuilderAPI_MakeVertex(aCenterMass).Shape(); aVertex = BRep_Tool::Pnt( TopoDS::Vertex( aPntShape ) ); @@ -2616,6 +2844,8 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object) TopoDS_Shape aWhere = theShapeWhere->GetValue(); TopoDS_Shape aWhat = theShapeWhat->GetValue(); + TopoDS_Shape aPntShape; + TopoDS_Vertex aVertex; if (aWhere.IsNull() || aWhat.IsNull()) { SetErrorCode("Error: aWhere and aWhat TopoDS_Shape are Null."); @@ -2638,32 +2868,54 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object) bool isFound = false; Standard_Integer iType = TopAbs_SOLID; + Standard_Integer compType = TopAbs_SOLID; Standard_Real aWhat_Mass = 0., aWhere_Mass = 0.; Standard_Real tab_aWhat[4], tab_aWhere[4]; Standard_Real dl_l = 1e-3; Standard_Real min_l, Tol_1D, Tol_2D, Tol_3D, Tol_Mass; - gp_Pnt aPnt, aPnt_aWhat; + Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax; + Bnd_Box BoundingBox; + gp_Pnt aPnt, aPnt_aWhat, tab_Pnt[2]; GProp_GProps aProps; - // 2D or 3D shapes - if ( aWhat.ShapeType() == TopAbs_COMPOUND || - aWhat.ShapeType() == TopAbs_SHELL || - aWhat.ShapeType() == TopAbs_COMPSOLID ) { - TopExp_Explorer Exp( aWhat, TopAbs_ShapeEnum( iType ) ); - if ( ! Exp.More() ) iType = TopAbs_FACE; + // Find the iType of the aWhat shape + if ( aWhat.ShapeType() == TopAbs_EDGE || aWhat.ShapeType() == TopAbs_WIRE ) iType = TopAbs_EDGE; + else if ( aWhat.ShapeType() == TopAbs_FACE || aWhat.ShapeType() == TopAbs_SHELL ) iType = TopAbs_FACE; + else if ( aWhat.ShapeType() == TopAbs_SOLID || aWhat.ShapeType() == TopAbs_COMPSOLID ) iType = TopAbs_SOLID; + else if ( aWhat.ShapeType() == TopAbs_COMPOUND ) { + // Only the iType of the first shape in the compound is taken into account + TopoDS_Iterator It (aWhat, Standard_True, Standard_True); + compType = It.Value().ShapeType(); + if ( compType == TopAbs_EDGE || compType == TopAbs_WIRE ) iType = TopAbs_EDGE; + else if ( compType == TopAbs_FACE || compType == TopAbs_SHELL) iType = TopAbs_FACE; + else if ( compType == TopAbs_SOLID || compType == TopAbs_COMPSOLID) iType = TopAbs_SOLID; + } + else { + SetErrorCode("Error: An attempt to extract a shape of not supported type."); + return NULL; } - else if ( aWhat.ShapeType() == TopAbs_FACE ) - iType = TopAbs_FACE; TopExp_Explorer Exp_aWhat( aWhat, TopAbs_ShapeEnum( iType ) ); TopExp_Explorer Exp_aWhere( aWhere, TopAbs_ShapeEnum( iType ) ); TopExp_Explorer Exp_Edge( aWhere, TopAbs_EDGE ); // Find the shortest edge in theShapeWhere shape + BRepBndLib::Add(aWhere, BoundingBox); + BoundingBox.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax); + min_l = fabs(aXmax - aXmin); + if( min_l < fabs(aYmax - aYmin) ) min_l = fabs(aYmax - aYmin); + if( min_l < fabs(aZmax - aZmin) ) min_l = fabs(aZmax - aZmin); + min_l /= dl_l; for ( Standard_Integer nbEdge = 0; Exp_Edge.More(); Exp_Edge.Next(), nbEdge++ ) { - BRepGProp::LinearProperties(Exp_Edge.Current(), aProps); - if ( ! nbEdge ) min_l = aProps.Mass(); - if ( aProps.Mass() < min_l ) min_l = aProps.Mass(); + TopExp_Explorer Exp_Vertex( Exp_Edge.Current(), TopAbs_VERTEX); + for ( Standard_Integer nbVertex = 0; Exp_Vertex.More(); Exp_Vertex.Next(), nbVertex++ ) { + aPnt = BRep_Tool::Pnt( TopoDS::Vertex( Exp_Vertex.Current() ) ); + tab_Pnt[nbVertex] = aPnt; + } + if ( not tab_Pnt[0].IsEqual(tab_Pnt[1], dl_l) ) { + BRepGProp::LinearProperties(Exp_Edge.Current(), aProps); + if ( aProps.Mass() < min_l ) min_l = aProps.Mass(); + } } // Compute tolerances @@ -2672,29 +2924,31 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object) Tol_3D = dl_l * ( min_l * min_l * min_l ) * ( 3. + (3 * dl_l) + (dl_l * dl_l) ); Tol_Mass = Tol_3D; - if ( iType == TopAbs_FACE ) Tol_Mass = Tol_2D; + if ( iType == TopAbs_EDGE ) Tol_Mass = Tol_1D; + else if ( iType == TopAbs_FACE ) Tol_Mass = Tol_2D; // Compute the ShapeWhat Mass for ( ; Exp_aWhat.More(); Exp_aWhat.Next() ) { - if ( iType == TopAbs_SOLID ) BRepGProp::VolumeProperties(Exp_aWhat.Current(), aProps); - else if ( iType == TopAbs_FACE ) BRepGProp::SurfaceProperties(Exp_aWhat.Current(), aProps); + if ( iType == TopAbs_EDGE ) BRepGProp::LinearProperties(Exp_aWhat.Current(), aProps); + else if ( iType == TopAbs_FACE ) BRepGProp::SurfaceProperties(Exp_aWhat.Current(), aProps); + else BRepGProp::VolumeProperties(Exp_aWhat.Current(), aProps); aWhat_Mass += aProps.Mass(); } - // Finding the Sub-ShapeWhere + // Searching for the sub-shapes inside the ShapeWhere shape for ( Exp_aWhere.ReInit(); Exp_aWhere.More(); Exp_aWhere.Next() ) { GetShapeProperties( Exp_aWhere.Current(), tab_aWhere, aPnt ); for ( Exp_aWhat.ReInit(); Exp_aWhat.More(); Exp_aWhat.Next() ) { GetShapeProperties( Exp_aWhat.Current(), tab_aWhat, aPnt_aWhat ); - if ( fabs(tab_aWhat[3] - tab_aWhere[3]) <= Tol_Mass && aPnt_aWhat.Distance(aPnt) <= Tol_1D ) - isFound = true; - else if ( tab_aWhat[3] - ( tab_aWhere[3] > Tol_Mass) ) { - BRepClass3d_SolidClassifier SC_aWhere (Exp_aWhere.Current(), aPnt, Precision::Confusion()); - BRepClass3d_SolidClassifier SC_aWhat (Exp_aWhat.Current(), aPnt, Precision::Confusion()); - // Block construction 3D - if ( SC_aWhere.State() == TopAbs_IN && SC_aWhat.State() == TopAbs_IN ) isFound = true; - // Block construction 2D - else if ( SC_aWhere.State() == TopAbs_ON && SC_aWhat.State() == TopAbs_ON ) isFound = true; + if ( fabs(tab_aWhat[3] - tab_aWhere[3]) <= Tol_Mass && aPnt_aWhat.Distance(aPnt) <= Tol_1D ) isFound = true; + else { + if ( (tab_aWhat[3] - tab_aWhere[3]) > Tol_Mass ) { + aPntShape = BRepBuilderAPI_MakeVertex( aPnt ).Shape(); + aVertex = TopoDS::Vertex( aPntShape ); + BRepExtrema_DistShapeShape aWhereDistance ( aVertex, Exp_aWhere.Current() ); + BRepExtrema_DistShapeShape aWhatDistance ( aVertex, Exp_aWhat.Current() ); + if ( fabs(aWhereDistance.Value() - aWhatDistance.Value()) <= Tol_1D ) isFound = true; + } } if ( isFound ) { aWhereIndex = aWhereIndices.FindIndex(Exp_aWhere.Current()); @@ -2707,6 +2961,11 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object) if ( fabs( aWhat_Mass - aWhere_Mass ) <= Tol_Mass ) break; } + if (aModifiedList.Extent() == 0) { // Not found any Results + SetErrorCode(NOT_FOUND_ANY); + return NULL; + } + aModifiedArray = new TColStd_HArray1OfInteger (1, aModifiedList.Extent()); TColStd_ListIteratorOfListOfInteger anIterModif (aModifiedList); for (Standard_Integer imod = 1; anIterModif.More(); anIterModif.Next(), imod++) @@ -3017,6 +3276,12 @@ static bool isSameEdge(const TopoDS_Edge& theEdge1, const TopoDS_Edge& theEdge2) if(!coincide) return false; + if (BRep_Tool::Degenerated(theEdge1)) + if (BRep_Tool::Degenerated(theEdge2)) return true; + else return false; + else + if (BRep_Tool::Degenerated(theEdge2)) return false; + double U11, U12, U21, U22; Handle(Geom_Curve) C1 = BRep_Tool::Curve(theEdge1, U11, U12); Handle(Geom_Curve) C2 = BRep_Tool::Curve(theEdge2, U21, U22); diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx index 8e5c6067f..08d3e6fb8 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx @@ -252,13 +252,46 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations * \param theShape - the shape to explore * \param theShapeType - type of subshape of theShape * \param theState - required state + * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects + */ + Standard_EXPORT Handle(TColStd_HSequenceOfTransient) + GetShapesOnBox(const Handle(GEOM_Object)& theBox, + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState); + + /*! + * \brief Find IDs of subshapes complying with given status about surface + * \param theCheckShape - the shape to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes */ + Standard_EXPORT Handle(TColStd_HSequenceOfInteger) + GetShapesOnShapeIDs(const Handle(GEOM_Object)& theCheckShape, + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState); + + /*! + * \brief Find subshapes complying with given status about surface + * \param theCheckShape - the shape to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects + */ Standard_EXPORT Handle(TColStd_HSequenceOfTransient) - GetShapesOnBox(const Handle(GEOM_Object)& theBox, - const Handle(GEOM_Object)& theShape, - const Standard_Integer theShapeType, - GEOMAlgo_State theState); + GetShapesOnShape(const Handle(GEOM_Object)& theCheckShape, + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState); + Standard_EXPORT Handle(GEOM_Object) + GetShapesOnShapeAsCompound(const Handle(GEOM_Object)& theCheckShape, + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState); public: /*! @@ -296,34 +329,34 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations /*! * \brief Checks if theShapeType parameter of GetShapesOnXXX() is OK - * \param theShapeType - the shape type to check - * \retval bool - result of the check + * \param theShapeType - the shape type to check + * \retval bool - result of the check */ bool checkTypeShapesOn(const Standard_Integer theShapeType); /*! * \brief Creates Geom_Plane - * \param theAx1 - edge defining plane normal - * \retval Handle(Geom_Surface) - resulting surface + * \param theAx1 - edge defining plane normal + * \retval Handle(Geom_Surface) - resulting surface */ Handle(Geom_Surface) makePlane(const TopoDS_Shape& theAx1); /*! * \brief Creates Geom_CylindricalSurface - * \param theAx1 - edge defining cylinder axis - * \param theRadius - cylinder radius - * \retval Handle(Geom_Surface) - resulting surface + * \param theAx1 - edge defining cylinder axis + * \param theRadius - cylinder radius + * \retval Handle(Geom_Surface) - resulting surface */ Handle(Geom_Surface) makeCylinder(const TopoDS_Shape& theAx1, const Standard_Real theRadius); /*! * \brief Find IDs of subshapes complying with given status about surface - * \param theSurface - the surface to check state of subshapes against - * \param theShape - the shape to explore - * \param theShapeType - type of subshape of theShape - * \param theState - required state - * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes + * \param theSurface - the surface to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes */ Handle(TColStd_HSequenceOfInteger) getShapesOnSurfaceIDs(const Handle(Geom_Surface)& theSurface, @@ -333,12 +366,12 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations /*! * \brief Find subshapes complying with given status about surface - * \param theSurface - the surface to check state of subshapes against - * \param theShape - the shape to explore - * \param theShapeType - type of subshape of theShape - * \param theState - required state - * \param theShapeEntries - outgoing entries like "entry1, entry2, ..." - * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes + * \param theSurface - the surface to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \param theShapeEntries - outgoing entries like "entry1, entry2, ..." + * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects */ Handle(TColStd_HSequenceOfTransient) getShapesOnSurface(const Handle(Geom_Surface)& theSurface, @@ -349,14 +382,14 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations /*! * \brief Find IDs of subshapes complying with given status about quadrangle - * \param theShape - the shape to explore - * \param theShapeType - type of subshape of theShape - * \param theTopLeftPoint - top left quadrangle corner - * \param theTopRigthPoint - top right quadrangle corner - * \param theBottomLeftPoint - bottom left quadrangle corner - * \param theBottomRigthPoint - bottom right quadrangle corner - * \param theState - required state - * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theTopLeftPoint - top left quadrangle corner + * \param theTopRigthPoint - top right quadrangle corner + * \param theBottomLeftPoint - bottom left quadrangle corner + * \param theBottomRigthPoint - bottom right quadrangle corner + * \param theState - required state + * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes */ Handle(TColStd_HSequenceOfInteger) getShapesOnQuadrangleIDs (const Handle(GEOM_Object)& theShape, @@ -369,23 +402,37 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations /*! * \brief Find IDs of subshapes complying with given status about surface - * \param theBox - the box to check state of subshapes against - * \param theShape - the shape to explore - * \param theShapeType - type of subshape of theShape - * \param theState - required state - * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes + * \param theBox - the box to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes */ Handle(TColStd_HSequenceOfInteger) getShapesOnBoxIDs(const Handle(GEOM_Object)& theBox, const Handle(GEOM_Object)& theShape, const Standard_Integer theShapeType, GEOMAlgo_State theState); + /*! + * \brief Find IDs of subshapes complying with given status about surface + * \param theCheckShape - the shape to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes + */ + Handle(TColStd_HSequenceOfInteger) getShapesOnShapeIDs + (const Handle(GEOM_Object)& theCheckShape, + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState); + /*! * \brief Find shape objects and their entries by their ids - * \param theShape - the main shape - * \param theShapeIDs - theShapeIDs - incoming shape ids - * \param theShapeEntries - outgoing entries like "entry1, entry2, ..." - * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects + * \param theShape - the main shape + * \param theShapeIDs - theShapeIDs - incoming shape ids + * \param theShapeEntries - outgoing entries like "entry1, entry2, ..." + * \retval Handle(TColStd_HSequenceOfTransient) - found shape objects */ Handle(TColStd_HSequenceOfTransient) getObjectsShapesOn(const Handle(GEOM_Object)& theShape, @@ -394,9 +441,9 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations /*! * \brief Select the object created last - * \param theObj1 - Object 1 - * \param theObj2 - Object 2 - * \retval Handle(GEOM_Object) - selected object + * \param theObj1 - Object 1 + * \param theObj2 - Object 2 + * \retval Handle(GEOM_Object) - selected object */ static Handle(GEOM_Object) getCreatedLast(const Handle(GEOM_Object)& theObj1, const Handle(GEOM_Object)& theObj2); diff --git a/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx b/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx index 9bf0da1bf..957197365 100644 --- a/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx @@ -350,7 +350,6 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateVector SetErrorCode(OK); return theObject; } - //============================================================================= /*! * TranslateVectorCopy @@ -405,6 +404,73 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateVectorCopy return aCopy; } +//============================================================================= +/*! + * TranslateVectorDistance + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateVectorDistance + (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theVector, double theDistance, bool theCopy) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || theVector.IsNull()) return NULL; + + Handle(GEOM_Function) aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved + + Handle(GEOM_Object) aCopy; //Add a new Copy object + Handle(GEOM_Function) aFunction; + + //Add a translate function + if (theCopy) { + aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + aFunction = aCopy->AddFunction(GEOMImpl_TranslateDriver::GetID(), TRANSLATE_VECTOR_DISTANCE); + } + else { + aFunction = theObject->AddFunction(GEOMImpl_TranslateDriver::GetID(), TRANSLATE_VECTOR_DISTANCE); + } + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_TranslateDriver::GetID()) return NULL; + + GEOMImpl_ITranslate aTI(aFunction); + aTI.SetVector(theVector->GetLastFunction()); + aTI.SetDistance(theDistance); +// aTI.SetShape(theObject->GetValue()); + aTI.SetOriginal(aLastFunction); + + //Compute the translation + try { +#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 + OCC_CATCH_SIGNALS; +#endif + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Translation driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + if (theCopy) { + GEOM::TPythonDump(aFunction) << aCopy << " = geompy.MakeTranslationVectorDistance(" + << theObject << ", " << theVector << ", " << theDistance << ")"; + SetErrorCode(OK); + return aCopy; + } + + GEOM::TPythonDump(aFunction) << "geompy.TrsfOp.TranslateVectorDistance(" + << theObject << ", " << theVector << ", " << theDistance << ", " << theCopy << ")"; + SetErrorCode(OK); + return theObject; +} + //============================================================================= /*! * Translate1D @@ -964,14 +1030,11 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShape { SetErrorCode(KO); - if (theObject.IsNull() || thePoint.IsNull()) return NULL; + if (theObject.IsNull()) return NULL; Handle(GEOM_Function) anOriginal = theObject->GetLastFunction(); if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be scaled - // Get last functions of the arguments - Handle(GEOM_Function) aPF = thePoint->GetLastFunction(); - //Add a scale function Handle(GEOM_Function) aFunction = theObject->AddFunction(GEOMImpl_ScaleDriver::GetID(), SCALE_SHAPE); @@ -980,11 +1043,17 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShape //Check if the function is set correctly if (aFunction->GetDriverGUID() != GEOMImpl_ScaleDriver::GetID()) return NULL; + // Set arguments GEOMImpl_IScale aTI (aFunction); aTI.SetShape(anOriginal); - aTI.SetPoint(aPF); aTI.SetFactor(theFactor); + // Set point argument + if (!thePoint.IsNull()) { + Handle(GEOM_Function) aPF = thePoint->GetLastFunction(); + aTI.SetPoint(aPF); + } + //Compute the scale try { #if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 @@ -1019,7 +1088,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShapeCopy { SetErrorCode(KO); - if (theObject.IsNull() || thePoint.IsNull()) return NULL; + if (theObject.IsNull()) return NULL; Handle(GEOM_Function) anOriginal = theObject->GetLastFunction(); if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be scaled @@ -1035,11 +1104,17 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShapeCopy //Check if the function is set correctly if (aFunction->GetDriverGUID() != GEOMImpl_ScaleDriver::GetID()) return NULL; + // Set arguments GEOMImpl_IScale aTI (aFunction); aTI.SetShape(anOriginal); - aTI.SetPoint(thePoint->GetLastFunction()); aTI.SetFactor(theFactor); + // Set point argument + if (!thePoint.IsNull()) { + Handle(GEOM_Function) aPF = thePoint->GetLastFunction(); + aTI.SetPoint(aPF); + } + //Compute the scale try { #if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 @@ -1064,6 +1139,85 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShapeCopy return aCopy; } +//============================================================================= +/*! + * ScaleShapeAlongAxes + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShapeAlongAxes (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) thePoint, + double theFactorX, + double theFactorY, + double theFactorZ, + bool doCopy) +{ + SetErrorCode(KO); + + if (theObject.IsNull()) return NULL; + + Handle(GEOM_Function) anOriginal = theObject->GetLastFunction(); + if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be scaled + + //Add a scale function + Handle(GEOM_Object) aCopy; //Add a new Copy object + Handle(GEOM_Function) aFunction; + if (doCopy) { + aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + aFunction = aCopy->AddFunction(GEOMImpl_ScaleDriver::GetID(), SCALE_SHAPE_AXES_COPY); + } + else { + aFunction = theObject->AddFunction(GEOMImpl_ScaleDriver::GetID(), SCALE_SHAPE_AXES); + } + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ScaleDriver::GetID()) return NULL; + + // Set arguments + GEOMImpl_IScale aTI (aFunction); + aTI.SetShape(anOriginal); + aTI.SetFactorX(theFactorX); + aTI.SetFactorY(theFactorY); + aTI.SetFactorZ(theFactorZ); + + // Set point (optional argument) + if (!thePoint.IsNull()) { + Handle(GEOM_Function) aPF = thePoint->GetLastFunction(); + aTI.SetPoint(aPF); + } + + //Compute the scale + try { +#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 + OCC_CATCH_SIGNALS; +#endif + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Scale driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + SetErrorCode(OK); + + //Make a Python command + if (doCopy) { + GEOM::TPythonDump(aFunction) << "geompy.MakeScaleAlongAxes(" + << theObject << ", " << thePoint << ", " + << theFactorX << ", " << theFactorY << ", " << theFactorZ << ")"; + return aCopy; + } + + GEOM::TPythonDump(aFunction) << "geompy.TrsfOp.ScaleShapeAlongAxes(" + << theObject << ", " << thePoint << ", " + << theFactorX << ", " << theFactorY << ", " << theFactorZ << ")"; + return theObject; +} + //============================================================================= /*! * PositionShape diff --git a/src/GEOMImpl/GEOMImpl_ITransformOperations.hxx b/src/GEOMImpl/GEOMImpl_ITransformOperations.hxx index 843c8a12a..c949641aa 100644 --- a/src/GEOMImpl/GEOMImpl_ITransformOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_ITransformOperations.hxx @@ -27,96 +27,125 @@ #include "GEOM_Object.hxx" #include -class GEOMImpl_ITransformOperations : public GEOM_IOperations { +class GEOMImpl_ITransformOperations : public GEOM_IOperations +{ public: Standard_EXPORT GEOMImpl_ITransformOperations(GEOM_Engine* theEngine, int theDocID); Standard_EXPORT ~GEOMImpl_ITransformOperations(); Standard_EXPORT Handle(GEOM_Object) TranslateTwoPoints (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) thePoint1, - Handle(GEOM_Object) thePoint2); + Handle(GEOM_Object) thePoint1, + Handle(GEOM_Object) thePoint2); Standard_EXPORT Handle(GEOM_Object) TranslateTwoPointsCopy (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) thePoint1, - Handle(GEOM_Object) thePoint2); + Handle(GEOM_Object) thePoint1, + Handle(GEOM_Object) thePoint2); - Standard_EXPORT Handle(GEOM_Object) TranslateDXDYDZ (Handle(GEOM_Object) theObject, double theX, double theY, double theZ); + Standard_EXPORT Handle(GEOM_Object) TranslateDXDYDZ (Handle(GEOM_Object) theObject, + double theX, double theY, double theZ); - Standard_EXPORT Handle(GEOM_Object) TranslateDXDYDZCopy (Handle(GEOM_Object) theObject, double theX, double theY, double theZ); + Standard_EXPORT Handle(GEOM_Object) TranslateDXDYDZCopy (Handle(GEOM_Object) theObject, + double theX, double theY, double theZ); Standard_EXPORT Handle(GEOM_Object) TranslateVector (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) theVector); + Handle(GEOM_Object) theVector); Standard_EXPORT Handle(GEOM_Object) TranslateVectorCopy (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) theVector); - - Standard_EXPORT Handle(GEOM_Object) Translate1D (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theVector, double theStep, Standard_Integer theNbTimes); - - Standard_EXPORT Handle(GEOM_Object) Translate2D (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theVector, double theStep1, Standard_Integer theNbTimes1, - Handle(GEOM_Object) theVector2, double theStep2, Standard_Integer theNbTimes2); + Handle(GEOM_Object) theVector); + + Standard_EXPORT Handle(GEOM_Object) TranslateVectorDistance (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theVector, + double theDistance, + bool theCopy); + + Standard_EXPORT Handle(GEOM_Object) Translate1D (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theVector, + double theStep, + Standard_Integer theNbTimes); + + Standard_EXPORT Handle(GEOM_Object) Translate2D (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theVector, + double theStep1, + Standard_Integer theNbTimes1, + Handle(GEOM_Object) theVector2, + double theStep2, + Standard_Integer theNbTimes2); Standard_EXPORT Handle(GEOM_Object) MirrorPlane (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) thePlane); + Handle(GEOM_Object) thePlane); Standard_EXPORT Handle(GEOM_Object) MirrorPlaneCopy (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) thePlane); + Handle(GEOM_Object) thePlane); Standard_EXPORT Handle(GEOM_Object) MirrorAxis (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) theAxis); + Handle(GEOM_Object) theAxis); Standard_EXPORT Handle(GEOM_Object) MirrorAxisCopy (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) theAxis); + Handle(GEOM_Object) theAxis); Standard_EXPORT Handle(GEOM_Object) MirrorPoint (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) thePoint); + Handle(GEOM_Object) thePoint); Standard_EXPORT Handle(GEOM_Object) MirrorPointCopy (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) thePoint); + Handle(GEOM_Object) thePoint); Standard_EXPORT Handle(GEOM_Object) OffsetShape (Handle(GEOM_Object) theObject, - double theOffset); + double theOffset); Standard_EXPORT Handle(GEOM_Object) OffsetShapeCopy (Handle(GEOM_Object) theObject, - double theOffset); + double theOffset); Standard_EXPORT Handle(GEOM_Object) ScaleShape (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) thePoint, - double theFactor); + Handle(GEOM_Object) thePoint, + double theFactor); Standard_EXPORT Handle(GEOM_Object) ScaleShapeCopy (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) thePoint, - double theFactor); + Handle(GEOM_Object) thePoint, + double theFactor); + + Standard_EXPORT Handle(GEOM_Object) ScaleShapeAlongAxes (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) thePoint, + double theFactorX, + double theFactorY, + double theFactorZ, + bool doCopy); Standard_EXPORT Handle(GEOM_Object) PositionShape (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) theStartLCS, - Handle(GEOM_Object) theEndLCS); + Handle(GEOM_Object) theStartLCS, + Handle(GEOM_Object) theEndLCS); Standard_EXPORT Handle(GEOM_Object) PositionShapeCopy (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) theStartLCS, - Handle(GEOM_Object) theEndLCS); + Handle(GEOM_Object) theStartLCS, + Handle(GEOM_Object) theEndLCS); + + Standard_EXPORT Handle(GEOM_Object) Rotate (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theAxis, + double theAngle); - Standard_EXPORT Handle(GEOM_Object) Rotate (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theAxis, double theAngle); + Standard_EXPORT Handle(GEOM_Object) RotateCopy (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theAxis, + double theAngle); - Standard_EXPORT Handle(GEOM_Object) RotateCopy (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theAxis, double theAngle); + Standard_EXPORT Handle(GEOM_Object) Rotate1D (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theAxis, + Standard_Integer theNbTimes); - Standard_EXPORT Handle(GEOM_Object) Rotate1D (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theAxis, Standard_Integer theNbTimes); - - Standard_EXPORT Handle(GEOM_Object) Rotate2D (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) theAxis, - double theAngle, - Standard_Integer theNbTimes1, - double theStep, - Standard_Integer theNbTimes2); + Standard_EXPORT Handle(GEOM_Object) Rotate2D (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theAxis, + double theAngle, + Standard_Integer theNbTimes1, + double theStep, + Standard_Integer theNbTimes2); Standard_EXPORT Handle(GEOM_Object) RotateThreePoints (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) theCentPoint, - Handle(GEOM_Object) thePoint1, - Handle(GEOM_Object) thePoint2); - - Standard_EXPORT Handle(GEOM_Object) RotateThreePointsCopy (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) theCentPoint, - Handle(GEOM_Object) thePoint1, - Handle(GEOM_Object) thePoint2); + Handle(GEOM_Object) theCentPoint, + Handle(GEOM_Object) thePoint1, + Handle(GEOM_Object) thePoint2); + + Standard_EXPORT Handle(GEOM_Object) RotateThreePointsCopy (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theCentPoint, + Handle(GEOM_Object) thePoint1, + Handle(GEOM_Object) thePoint2); }; diff --git a/src/GEOMImpl/GEOMImpl_ITranslate.hxx b/src/GEOMImpl/GEOMImpl_ITranslate.hxx index 0ca4201e4..10fa24480 100755 --- a/src/GEOMImpl/GEOMImpl_ITranslate.hxx +++ b/src/GEOMImpl/GEOMImpl_ITranslate.hxx @@ -33,7 +33,8 @@ #define TRANSLATE_ARG_VECTOR2 11 #define TRANSLATE_ARG_DX 12 #define TRANSLATE_ARG_DY 13 -#define TRANSLATE_ARG_DZ 14 +#define TRANSLATE_ARG_DZ 14 +#define TRANSLATE_ARG_DISTANCE 15 class GEOMImpl_ITranslate { @@ -81,6 +82,10 @@ class GEOMImpl_ITranslate double GetDX() { return _func->GetReal(TRANSLATE_ARG_DX); } + void SetDistance(double theDistance) { return _func->SetReal(TRANSLATE_ARG_DISTANCE, theDistance); } + + double GetDistance() { return _func->GetReal(TRANSLATE_ARG_DISTANCE); } + void SetDY(double theDY) { return _func->SetReal(TRANSLATE_ARG_DY, theDY); } double GetDY() { return _func->GetReal(TRANSLATE_ARG_DY); } diff --git a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx index b68177098..6ef13f5d8 100644 --- a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx @@ -46,6 +46,9 @@ #include #include +#include +#include + #include #include #include @@ -258,7 +261,15 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const if (aShape.IsNull()) return 0; if (!BRepAlgo::IsValid(aShape)) { - Standard_ConstructionError::Raise("Partition aborted : non valid shape result"); + // 08.07.2008 added by skl during fixing bug 19761 from Mantis + ShapeFix_ShapeTolerance aSFT; + aSFT.LimitTolerance(aShape, Precision::Confusion(), + Precision::Confusion(), TopAbs_SHAPE); + Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape); + aSfs->Perform(); + aShape = aSfs->Shape(); + if (!BRepAlgo::IsValid(aShape)) + Standard_ConstructionError::Raise("Partition aborted : non valid shape result"); } aFunction->SetValue(aShape); diff --git a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx index df73fdb80..41aec4758 100644 --- a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx @@ -146,7 +146,7 @@ static bool FillForOtherEdges(const TopoDS_Shape& F1, ShapeAnalysis_Edge sae; while(1) { if(!aMapVertEdge1.Contains(VS1)) - cout<<" FillForOtherEdges: map aMapVertEdge1 not contains key VS1"<edge for created pipe edges @@ -1506,7 +1506,7 @@ static TopoDS_Shape CreatePipeShellsWithoutPath(GEOMImpl_IPipe* aCI) //if(nbff!=3) continue; - cout<<" make pipe for "<IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { @@ -1550,12 +1550,12 @@ static TopoDS_Shape CreatePipeShellsWithoutPath(GEOMImpl_IPipe* aCI) TopoDS_Edge E1 = TopoDS::Edge(anExpE.Current()); //nbee++; if(!FF.Contains(E1)) - cout<<"map FF not contains key E1"<Add(anExp.Current()); } aSewing->Perform(); - cout<<" shell for face "<SewedShape(); //BRepTools::Write(aSewShape,"/dn02/users_Linux/skl/work/Bugs/14857/sew.brep"); if( aSewShape.ShapeType() == TopAbs_SHELL ) { @@ -1810,16 +1810,16 @@ static TopoDS_Shape CreatePipeShellsWithoutPath(GEOMImpl_IPipe* aCI) B.MakeSolid(aSolid); B.Add(aSolid,aShell); B.Add(aComp,aSolid); - cout<<" solid for face "<GetValue(); if (aShapePath.IsNull()) { - cout<<"Driver : path is null"< #include +#include #include +#include +#include + //======================================================================= //function : GetID @@ -57,6 +61,7 @@ GEOMImpl_PointDriver::GEOMImpl_PointDriver() { } + //======================================================================= //function : Execute //purpose : @@ -74,7 +79,8 @@ Standard_Integer GEOMImpl_PointDriver::Execute(TFunction_Logbook& log) const if (aType == POINT_XYZ) { aPnt = gp_Pnt(aPI.GetX(), aPI.GetY(), aPI.GetZ()); - } else if (aType == POINT_XYZ_REF) { + } + else if (aType == POINT_XYZ_REF) { Handle(GEOM_Function) aRefPoint = aPI.GetRef(); TopoDS_Shape aRefShape = aRefPoint->GetValue(); @@ -85,8 +91,8 @@ Standard_Integer GEOMImpl_PointDriver::Execute(TFunction_Logbook& log) const gp_Pnt P = BRep_Tool::Pnt(TopoDS::Vertex(aRefShape)); aPnt = gp_Pnt(P.X() + aPI.GetX(), P.Y() + aPI.GetY(), P.Z() + aPI.GetZ()); - } else if (aType == POINT_CURVE_PAR) { - + } + else if (aType == POINT_CURVE_PAR) { Handle(GEOM_Function) aRefCurve = aPI.GetCurve(); TopoDS_Shape aRefShape = aRefCurve->GetValue(); if (aRefShape.ShapeType() != TopAbs_EDGE) { @@ -97,8 +103,24 @@ Standard_Integer GEOMImpl_PointDriver::Execute(TFunction_Logbook& log) const Handle(Geom_Curve) aCurve = BRep_Tool::Curve(TopoDS::Edge(aRefShape), aFP, aLP); aP = aFP + (aLP - aFP) * aPI.GetParameter(); aPnt = aCurve->Value(aP); - - } else if (aType == POINT_LINES_INTERSECTION) { + } + else if (aType == POINT_SURFACE_PAR) { + Handle(GEOM_Function) aRefCurve = aPI.GetSurface(); + TopoDS_Shape aRefShape = aRefCurve->GetValue(); + if (aRefShape.ShapeType() != TopAbs_FACE) { + Standard_TypeMismatch::Raise + ("Point On Surface creation aborted : surface shape is not a face"); + } + TopoDS_Face F = TopoDS::Face(aRefShape); + Handle(Geom_Surface) aSurf = BRep_Tool::Surface(F); + Standard_Real U1,U2,V1,V2; + //aSurf->Bounds(U1,U2,V1,V2); + ShapeAnalysis::GetFaceUVBounds(F,U1,U2,V1,V2); + Standard_Real U = U1 + (U2-U1) * aPI.GetParameter(); + Standard_Real V = V1 + (V2-V1) * aPI.GetParameter2(); + aPnt = aSurf->Value(U,V); + } + else if (aType == POINT_LINES_INTERSECTION) { Handle(GEOM_Function) aRef1 = aPI.GetLine1(); Handle(GEOM_Function) aRef2 = aPI.GetLine2(); diff --git a/src/GEOMImpl/GEOMImpl_RotateDriver.cxx b/src/GEOMImpl/GEOMImpl_RotateDriver.cxx index c6655fa58..e3920b2ab 100644 --- a/src/GEOMImpl/GEOMImpl_RotateDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_RotateDriver.cxx @@ -98,6 +98,7 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const gp_Dir aDir(gp_Vec(aP1, aP2)); gp_Ax1 anAx1(aP1, aDir); Standard_Real anAngle = RI.GetAngle(); + if (fabs(anAngle) < Precision::Angular()) anAngle += 2*PI; // NPAL19665,19769 aTrsf.SetRotation(anAx1, anAngle); //NPAL18620: performance problem: multiple locations are accumulated @@ -125,11 +126,12 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const aP1 = BRep_Tool::Pnt(TopoDS::Vertex(aV1)); aP2 = BRep_Tool::Pnt(TopoDS::Vertex(aV2)); - gp_Vec aVec1(aCP, aP1); - gp_Vec aVec2(aCP, aP2); - gp_Dir aDir(aVec1 ^ aVec2); - gp_Ax1 anAx1(aCP, aDir); + gp_Vec aVec1 (aCP, aP1); + gp_Vec aVec2 (aCP, aP2); + gp_Dir aDir (aVec1 ^ aVec2); + gp_Ax1 anAx1 (aCP, aDir); Standard_Real anAngle = aVec1.Angle(aVec2); + if (fabs(anAngle) < Precision::Angular()) anAngle += 2*PI; // NPAL19665 aTrsf.SetRotation(anAx1, anAngle); //NPAL18620: performance problem: multiple locations are accumulated // in shape and need a great time to process @@ -165,20 +167,23 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const gp_Trsf aTrsfOrig = aLocOrig.Transformation(); for (int i = 0; i < nbtimes; i++ ) { - aTrsf.SetRotation(AX1, i*angle*PI180); + if (i == 0) { // NPAL19665 + B.Add(aCompound, anOriginal); + } + else { + aTrsf.SetRotation(AX1, i*angle*PI180); + TopLoc_Location aLocRes (aTrsf * aTrsfOrig); + B.Add(aCompound, anOriginal.Located(aLocRes)); + } //NPAL18620: performance problem: multiple locations are accumulated // in shape and need a great time to process //BRepBuilderAPI_Transform aBRepTransformation(anOriginal, aTrsf, Standard_False); //B.Add(aCompound, aBRepTransformation.Shape()); - TopLoc_Location aLocRes (aTrsf * aTrsfOrig); - B.Add(aCompound, anOriginal.Located(aLocRes)); } aShape = aCompound; } else if (aType == ROTATE_2D) { - Standard_Real DX, DY, DZ; - //Get direction Handle(GEOM_Function) anAxis = RI.GetAxis(); if(anAxis.IsNull()) return 0; @@ -219,7 +224,7 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const if ( P1.IsEqual(P2, Precision::Confusion() ) ) return 0; - gp_Vec Vec(P1.X()-P2.X(), P1.Y()-P2.Y(), P1.Z()-P2.Z()); + gp_Vec Vec (P1.X()-P2.X(), P1.Y()-P2.Y(), P1.Z()-P2.Z()); Vec.Normalize(); Standard_Integer nbtimes2 = RI.GetNbIter2(); @@ -234,21 +239,31 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const TopoDS_Compound aCompound; BRep_Builder B; B.MakeCompound( aCompound ); + + Standard_Real DX, DY, DZ; + for (int i = 0; i < nbtimes2; i++ ) { + DX = i * step * Vec.X(); + DY = i * step * Vec.Y(); + DZ = i * step * Vec.Z(); + aVec.SetCoord( DX, DY, DZ ); + aTrsf1.SetTranslation(aVec); + for (int j = 0; j < nbtimes1; j++ ) { - DX = i * step * Vec.X(); - DY = i * step * Vec.Y(); - DZ = i * step * Vec.Z(); - aVec.SetCoord( DX, DY, DZ ); - aTrsf1.SetTranslation(aVec); - aTrsf2.SetRotation(AX1, j*ang*PI180); + if (j == 0) { // NPAL19665 + TopLoc_Location aLocRes (aTrsf1 * aTrsfOrig); + B.Add(aCompound, anOriginal.Located(aLocRes)); + } + else { + aTrsf2.SetRotation(AX1, j*ang*PI180); + TopLoc_Location aLocRes (aTrsf2 * aTrsf1 * aTrsfOrig); + B.Add(aCompound, anOriginal.Located(aLocRes)); + } //NPAL18620: performance problem: multiple locations are accumulated // in shape and need a great time to process //BRepBuilderAPI_Transform aBRepTrsf1 (anOriginal, aTrsf1, Standard_False); //BRepBuilderAPI_Transform aBRepTrsf2 (aBRepTrsf1.Shape(), aTrsf2, Standard_False); //B.Add(aCompound, aBRepTrsf2.Shape()); - TopLoc_Location aLocRes (aTrsf2 * aTrsf1 * aTrsfOrig); - B.Add(aCompound, anOriginal.Located(aLocRes)); } } diff --git a/src/GEOMImpl/GEOMImpl_ScaleDriver.cxx b/src/GEOMImpl/GEOMImpl_ScaleDriver.cxx index 88342f057..8dc4967d2 100644 --- a/src/GEOMImpl/GEOMImpl_ScaleDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ScaleDriver.cxx @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -37,6 +38,8 @@ #include #include +#include +#include //======================================================================= //function : GetID @@ -73,11 +76,17 @@ Standard_Integer GEOMImpl_ScaleDriver::Execute(TFunction_Logbook& log) const if (aType == SCALE_SHAPE || aType == SCALE_SHAPE_COPY) { Handle(GEOM_Function) aRefShape = aCI.GetShape(); - Handle(GEOM_Function) aRefPoint = aCI.GetPoint(); TopoDS_Shape aShapeBase = aRefShape->GetValue(); - TopoDS_Shape aShapePnt = aRefPoint->GetValue(); - if (aShapeBase.IsNull() || aShapePnt.IsNull()) return 0; - if (aShapePnt.ShapeType() != TopAbs_VERTEX) return 0; + if (aShapeBase.IsNull()) return 0; + + gp_Pnt aP (0,0,0); + Handle(GEOM_Function) aRefPoint = aCI.GetPoint(); + if (!aRefPoint.IsNull()) { + TopoDS_Shape aShapePnt = aRefPoint->GetValue(); + if (aShapePnt.IsNull()) return 0; + if (aShapePnt.ShapeType() != TopAbs_VERTEX) return 0; + aP = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt)); + } // Bug 6839: Check for standalone (not included in faces) degenerated edges TopTools_IndexedDataMapOfShapeListOfShape aEFMap; @@ -94,12 +103,67 @@ Standard_Integer GEOMImpl_ScaleDriver::Execute(TFunction_Logbook& log) const } // Perform Scaling - gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt)); gp_Trsf aTrsf; aTrsf.SetScale(aP, aCI.GetFactor()); BRepBuilderAPI_Transform aBRepTrsf (aShapeBase, aTrsf, Standard_False); aShape = aBRepTrsf.Shape(); - } else { + } + else if (aType == SCALE_SHAPE_AXES || aType == SCALE_SHAPE_AXES_COPY) { + Handle(GEOM_Function) aRefShape = aCI.GetShape(); + TopoDS_Shape aShapeBase = aRefShape->GetValue(); + if (aShapeBase.IsNull()) return 0; + + bool isP = false; + gp_Pnt aP (0,0,0); + Handle(GEOM_Function) aRefPoint = aCI.GetPoint(); + if (!aRefPoint.IsNull()) { + TopoDS_Shape aShapePnt = aRefPoint->GetValue(); + if (aShapePnt.IsNull()) return 0; + if (aShapePnt.ShapeType() != TopAbs_VERTEX) return 0; + aP = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt)); + isP = true; + } + + // Bug 6839: Check for standalone (not included in faces) degenerated edges + TopTools_IndexedDataMapOfShapeListOfShape aEFMap; + TopExp::MapShapesAndAncestors(aShapeBase, TopAbs_EDGE, TopAbs_FACE, aEFMap); + Standard_Integer i, nbE = aEFMap.Extent(); + for (i = 1; i <= nbE; i++) { + TopoDS_Shape anEdgeSh = aEFMap.FindKey(i); + if (BRep_Tool::Degenerated(TopoDS::Edge(anEdgeSh))) { + const TopTools_ListOfShape& aFaces = aEFMap.FindFromIndex(i); + if (aFaces.IsEmpty()) + Standard_ConstructionError::Raise + ("Scaling aborted : cannot scale standalone degenerated edge"); + } + } + + // Perform Scaling + gp_GTrsf aGTrsf; + gp_Mat rot (aCI.GetFactorX(), 0, 0, + 0, aCI.GetFactorY(), 0, + 0, 0, aCI.GetFactorZ()); + aGTrsf.SetVectorialPart(rot); + + if (isP) { + gp_Pnt anO (0,0,0); + if (anO.Distance(aP) > Precision::Confusion()) { + gp_GTrsf aGTrsfP0; + aGTrsfP0.SetTranslationPart(anO.XYZ() - aP.XYZ()); + gp_GTrsf aGTrsf0P; + aGTrsf0P.SetTranslationPart(aP.XYZ()); + //aGTrsf = aGTrsf0P * aGTrsf * aGTrsfP0; + aGTrsf = aGTrsf0P.Multiplied(aGTrsf); + aGTrsf = aGTrsf.Multiplied(aGTrsfP0); + } + } + + BRepBuilderAPI_GTransform aBRepGTrsf (aShapeBase, aGTrsf, Standard_False); + if (!aBRepGTrsf.IsDone()) + Standard_ConstructionError::Raise("Scaling not done"); + aShape = aBRepGTrsf.Shape(); + } + else { } if (aShape.IsNull()) return 0; diff --git a/src/GEOMImpl/GEOMImpl_TranslateDriver.cxx b/src/GEOMImpl/GEOMImpl_TranslateDriver.cxx index ad967865b..fba11c209 100644 --- a/src/GEOMImpl/GEOMImpl_TranslateDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_TranslateDriver.cxx @@ -122,6 +122,26 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const TopLoc_Location aLocRes (aTrsf * aTrsfOrig); aShape = anOriginal.Located(aLocRes); } + else if (aType == TRANSLATE_VECTOR_DISTANCE) { + Handle(GEOM_Function) aVector = TI.GetVector(); + double aDistance = TI.GetDistance(); + if(aVector.IsNull()) return 0; + TopoDS_Shape aV = aVector->GetValue(); + if(aV.IsNull() || aV.ShapeType() != TopAbs_EDGE) return 0; + TopoDS_Edge anEdge = TopoDS::Edge(aV); + + aP1 = BRep_Tool::Pnt(TopExp::FirstVertex(anEdge)); + aP2 = BRep_Tool::Pnt(TopExp::LastVertex(anEdge)); + + gp_Vec aVec (aP1, aP2); + aVec.Normalize(); + aTrsf.SetTranslation(aVec * aDistance); + + TopLoc_Location aLocOrig = anOriginal.Location(); + gp_Trsf aTrsfOrig = aLocOrig.Transformation(); + TopLoc_Location aLocRes (aTrsf * aTrsfOrig); + aShape = anOriginal.Located(aLocRes); + } else if (aType == TRANSLATE_XYZ || aType == TRANSLATE_XYZ_COPY) { gp_Vec aVec (TI.GetDX(), TI.GetDY(), TI.GetDZ()); aTrsf.SetTranslation(aVec); diff --git a/src/GEOMImpl/GEOMImpl_Types.hxx b/src/GEOMImpl/GEOMImpl_Types.hxx index be924b3f7..54b156448 100755 --- a/src/GEOMImpl/GEOMImpl_Types.hxx +++ b/src/GEOMImpl/GEOMImpl_Types.hxx @@ -81,6 +81,11 @@ #define GEOM_THRUSECTIONS 40 +#define GEOM_COMPOUNDFILTER 41 + +#define GEOM_SHAPES_ON_SHAPE 42 + + //GEOM_Function types #define COPY_WITH_REF 1 @@ -93,6 +98,7 @@ #define POINT_XYZ_REF 2 #define POINT_CURVE_PAR 3 #define POINT_LINES_INTERSECTION 4 +#define POINT_SURFACE_PAR 5 //#define POINT_FACE_PAR 5 #define VECTOR_TWO_PNT 1 @@ -111,6 +117,7 @@ #define TRANSLATE_TWO_POINTS 1 #define TRANSLATE_VECTOR 2 +#define TRANSLATE_VECTOR_DISTANCE 9 #define TRANSLATE_TWO_POINTS_COPY 3 #define TRANSLATE_VECTOR_COPY 4 #define TRANSLATE_1D 5 @@ -137,6 +144,8 @@ #define SCALE_SHAPE 1 #define SCALE_SHAPE_COPY 2 +#define SCALE_SHAPE_AXES 3 +#define SCALE_SHAPE_AXES_COPY 4 #define POSITION_SHAPE 1 #define POSITION_SHAPE_COPY 2 @@ -246,6 +255,8 @@ #define GROUP_FUNCTION 1 +#define SHAPES_ON_SHAPE 1 + // Blocks #define BLOCK_FACE_FOUR_PNT 1 #define BLOCK_FACE_FOUR_EDGES 2 diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index 200247614..081edeee6 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -52,6 +52,7 @@ // QT Includes #include #include +#include // OCCT Includes #include @@ -59,6 +60,7 @@ using namespace std; typedef QMap FilterMap; +static QString lastUsedFilter; //======================================================================= // function : getFileName @@ -71,9 +73,9 @@ static QString getFileName( QWidget* parent, const QStringList& filters, const QString& caption, bool open, - QString& format ) + QString& format, + bool showCurrentDirInitially = false ) { - static QString lastUsedFilter; //QStringList filters; QString aBrepFilter; for ( FilterMap::const_iterator it = filterMap.begin(); it != filterMap.end(); ++it ) { @@ -88,6 +90,9 @@ static QString getFileName( QWidget* parent, if ( !initial.isEmpty() ) fd->selectFile( initial ); + + if ( showCurrentDirInitially && SUIT_FileDlg::getLastVisitedPath().isEmpty() ) + fd->setDirectory( QDir::currentPath() ); fd->setFilters( filters ); @@ -110,6 +115,63 @@ static QString getFileName( QWidget* parent, return filename; } +//======================================================================= +// function : getFileNames +// purpose : Select list of files for Import operation. Returns also +// the selected file type code through argument. +//======================================================================= +static QStringList getFileNames( QWidget* parent, + const QString& initial, + const FilterMap& filterMap, + const QString& caption, + QString& format, + bool showCurrentDirInitially = false) +{ + QString aBrepFilter; + QStringList allFilters; + QStringList filters; + QRegExp re( "\\((.*)\\)" ); + re.setMinimal( true ); + for ( FilterMap::const_iterator it = filterMap.begin(); it != filterMap.end(); ++it ) { + if ( it.value().contains( "BREP", Qt::CaseInsensitive ) && aBrepFilter.isEmpty() ) + aBrepFilter = it.key(); + filters.append( it.key() ); + int pos = 0; + while ( re.indexIn( it.key(), pos ) >= 0 ) { + QString f = re.cap(1); + pos = re.pos() + f.length() + 2; + allFilters.append( f.simplified() ); + } + } + filters.append( QObject::tr( "GEOM_ALL_IMPORT_FILES" ).arg( allFilters.join( " " ) ) ); + + SUIT_FileDlg fd( parent, true, true, true ); + fd.setFileMode( SUIT_FileDlg::ExistingFiles ); + if ( !caption.isEmpty() ) + fd.setWindowTitle( caption ); + if ( !initial.isEmpty() ) + fd.selectFile( initial ); + + if ( showCurrentDirInitially && SUIT_FileDlg::getLastVisitedPath().isEmpty() ) + fd.setDirectory( QDir::currentPath() ); + + fd.setFilters( filters ); + + if ( !lastUsedFilter.isEmpty() && filterMap.contains( lastUsedFilter ) ) + fd.selectFilter( lastUsedFilter ); + else if ( !aBrepFilter.isEmpty() ) + fd.selectFilter( aBrepFilter ); + + QStringList filenames; + if ( fd.exec() ) { + filenames = fd.selectedFiles(); + format = filterMap.contains( fd.selectedFilter() ) ? filterMap[ fd.selectedFilter() ] : QString(); + lastUsedFilter = fd.selectedFilter(); + } + qApp->processEvents(); + return filenames; +} + //======================================================================= // function : getParentComponent // purpose : Get object's parent component entry @@ -138,17 +200,35 @@ static bool inUse( _PTR(Study) study, const QString& component, const QMap gobjects; QMap::ConstIterator oit; + list<_PTR(SObject)> aSelectedSO; for ( oit = objects.begin(); oit != objects.end(); ++oit ) { _PTR(SObject) so = study->FindObjectID( oit.key().toLatin1().data() ); if ( !so ) continue; + aSelectedSO.push_back(so); CORBA::Object_var corbaObj_rem = GeometryGUI::ClientSObjectToObject( so ); GEOM::GEOM_Object_var geomObj_rem = GEOM::GEOM_Object::_narrow( corbaObj_rem ); if( CORBA::is_nil( geomObj_rem ) ) continue; gobjects.insert( oit.key(), geomObj_rem ); } - + + // Search References with other Modules + list< _PTR(SObject) >::iterator itSO = aSelectedSO.begin(); + for ( ; itSO != aSelectedSO.end(); ++itSO ) { + std::vector<_PTR(SObject)> aReferences = study->FindDependances( *itSO ); + int aRefLength = aReferences.size(); + if (aRefLength) { + for (int i = 0; i < aRefLength; i++) { + _PTR(SObject) firstSO( aReferences[i] ); + _PTR(SComponent) aComponent = firstSO->GetFatherComponent(); + QString type = aComponent->ComponentDataType().c_str(); + if ( type == "SMESH" ) + return true; + } + } + } + // browse through all GEOM data tree _PTR(ChildIterator) it ( study->NewChildIterator( comp ) ); for ( it->InitEx( true ); it->More(); it->Next() ) { @@ -177,6 +257,7 @@ static bool inUse( _PTR(Study) study, const QString& component, const QMapGetProperties() )->IsLocked() ) { SUIT_MessageBox::warning( app->desktop(), tr("WRN_WARNING"), - tr("WRN_STUDY_LOCKED"), - tr("BUT_OK") ); + tr("WRN_STUDY_LOCKED") ); return; // study is locked } @@ -387,10 +466,9 @@ void GEOMToolsGUI::OnEditDelete() // check parent component QString parentComp = getParentComponent( obj ); if ( parentComp != geomComp ) { - SUIT_MessageBox::warning ( app->desktop(), - QObject::tr("ERR_ERROR"), - QObject::tr("NON_GEOM_OBJECTS_SELECTED").arg( getGeometryGUI()->moduleName() ), - QObject::tr("BUT_OK") ); + SUIT_MessageBox::warning( app->desktop(), + QObject::tr("ERR_ERROR"), + QObject::tr("NON_GEOM_OBJECTS_SELECTED").arg( getGeometryGUI()->moduleName() ) ); return; // not GEOM object selected } @@ -438,8 +516,7 @@ void GEOMToolsGUI::OnEditDelete() SALOME_View* view; ViewManagerList vmans = app->viewManagers(); SUIT_ViewManager* vman; - QListIterator vit( vmans ); - while ( vit.hasNext() && (vman = vit.next()) ) { + foreach ( vman, vmans ) { SUIT_ViewModel* vmod = vman->getViewModel(); view = dynamic_cast ( vmod ); // must work for OCC and VTK views if ( view ) @@ -467,10 +544,9 @@ void GEOMToolsGUI::OnEditDelete() else { // GEOM component is not selected: check if selected objects are in use if ( inUse( aStudy, geomComp, allDeleted ) ) { - SUIT_MessageBox::warning ( app->desktop(), - QObject::tr("WRN_WARNING"), - QObject::tr("DEP_OBJECT"), - QObject::tr("BUT_OK") ); + SUIT_MessageBox::warning( app->desktop(), + QObject::tr("WRN_WARNING"), + QObject::tr("DEP_OBJECT") ); return; // object(s) in use } // ... and then delete all objects @@ -526,7 +602,6 @@ void GEOMToolsGUI::OnEditCopy() */ } - //===================================================================================== // function : Import // purpose : BRep, Iges, Step @@ -534,119 +609,141 @@ void GEOMToolsGUI::OnEditCopy() bool GEOMToolsGUI::Import() { SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( getGeometryGUI()->getApp() ); - //SUIT_Application* app = getGeometryGUI()->getApp(); if (! app) return false; SalomeApp_Study* stud = dynamic_cast ( app->activeStudy() ); if ( !stud ) { - cout << "FAILED to cast active study to SalomeApp_Study" << endl; + MESSAGE ( "FAILED to cast active study to SalomeApp_Study" ); return false; } _PTR(Study) aStudy = stud->studyDS(); + // check if study is locked bool aLocked = (_PTR(AttributeStudyProperties)(aStudy->GetProperties()))->IsLocked(); if ( aLocked ) { - SUIT_MessageBox::warning ( app->desktop(), - QObject::tr("WRN_WARNING"), - QObject::tr("WRN_STUDY_LOCKED"), - QObject::tr("BUT_OK") ); + SUIT_MessageBox::warning( app->desktop(), + QObject::tr("WRN_WARNING"), + QObject::tr("WRN_STUDY_LOCKED") ); return false; } + // check if GEOM engine is available GEOM::GEOM_Gen_var eng = GeometryGUI::GetGeomGen(); if ( CORBA::is_nil( eng ) ) { SUIT_MessageBox::critical( app->desktop(), QObject::tr("WRN_WARNING"), - QObject::tr( "GEOM Engine is not started" ), - QObject::tr("BUT_OK") ); - return false; - } + QObject::tr( "GEOM Engine is not started" ) ); + return false; + } GEOM::GEOM_IInsertOperations_var aInsOp = eng->GetIInsertOperations( aStudy->StudyId() ); if ( aInsOp->_is_nil() ) return false; - GEOM::GEOM_Object_var anObj; - - // Obtain a list of available import formats + // obtain a list of available import formats FilterMap aMap; - QStringList filters; GEOM::string_array_var aFormats, aPatterns; aInsOp->ImportTranslators( aFormats, aPatterns ); - for ( int i = 0, n = aFormats->length(); i < n; i++ ) { + for ( int i = 0, n = aFormats->length(); i < n; i++ ) aMap.insert( (char*)aPatterns[i], (char*)aFormats[i] ); - filters.push_back( (char*)aPatterns[i] ); - } + // select files to be imported QString fileType; + QStringList fileNames = getFileNames( app->desktop(), "", aMap, + tr( "GEOM_MEN_IMPORT" ), fileType, true ); - QString fileName = getFileName(app->desktop(), "", aMap, filters, - tr("GEOM_MEN_IMPORT"), true, fileType); - - if (fileName.isEmpty()) - return false; - - if (fileType.isEmpty() ) - { - // Trying to detect file type - QFileInfo aFileInfo( fileName ); - QString aPossibleType = (aFileInfo.suffix()).toUpper() ; - - if ( (aMap.values()).contains(aPossibleType) ) - fileType = aPossibleType; - } + // set Wait cursor + SUIT_OverrideCursor wc; - if (fileType.isEmpty()) - return false; + if ( fileNames.count() == 0 ) + return false; // nothing selected, return - GEOM_Operation* anOp = new GEOM_Operation (app, aInsOp.in()); - try { - SUIT_OverrideCursor wc; + QStringList errors; - app->putInfo(tr("GEOM_PRP_LOADING").arg(SUIT_Tools::file(fileName, /*withExten=*/true))); + QList< GEOM::GEOM_Object_var > objsForDisplay; + + // iterate through all selected files + for ( QStringList::ConstIterator it = fileNames.begin(); it != fileNames.end(); ++it ) { + QString fileName = *it; - anOp->start(); + if ( fileName.isEmpty() ) + continue; - CORBA::String_var fileN = CORBA::string_dup(fileName.toLatin1().data()); - CORBA::String_var fileT = CORBA::string_dup(fileType.toLatin1().data()); - anObj = aInsOp->Import(fileN, fileT); + QString aCurrentType; + if ( fileType.isEmpty() ) { + // file type is not defined, try to detect + QString ext = QFileInfo( fileName ).suffix().toUpper(); + QRegExp re( "\\*\\.(\\w+)" ); + for ( FilterMap::const_iterator it = aMap.begin(); + it != aMap.end() && aCurrentType.isEmpty(); ++it ) { + int pos = 0; + while ( re.indexIn( it.key(), pos ) >= 0 ) { + QString f = re.cap(1).trimmed().toUpper(); + if ( ext == f ) { aCurrentType = it.value(); break; } + pos = re.pos() + re.cap(1).length() + 2; + } + } + } + else { + aCurrentType = fileType; + } - if ( !anObj->_is_nil() && aInsOp->IsDone() ) { - QString aPublishObjName = - GEOMBase::GetDefaultName(SUIT_Tools::file(fileName, /*withExten=*/true)); + if ( aCurrentType.isEmpty() ) { + errors.append( QString( "%1 : %2" ).arg( fileName ).arg( tr( "GEOM_UNSUPPORTED_TYPE" ) ) ); + continue; + } - SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy(aStudy); - GeometryGUI::GetGeomGen()->PublishInStudy(aDSStudy, - SALOMEDS::SObject::_nil(), - anObj, - aPublishObjName.toStdString().c_str()); + GEOM_Operation* anOp = new GEOM_Operation( app, aInsOp.in() ); + try { + app->putInfo( tr( "GEOM_PRP_LOADING" ).arg( SUIT_Tools::file( fileName, /*withExten=*/true ) ) ); + anOp->start(); - GEOM_Displayer( stud ).Display( anObj.in() ); + CORBA::String_var fileN = fileName.toLatin1().constData(); + CORBA::String_var fileT = aCurrentType.toLatin1().constData(); + GEOM::GEOM_Object_var anObj = aInsOp->Import( fileN, fileT ); - // update data model and object browser - getGeometryGUI()->updateObjBrowser( true ); + if ( !anObj->_is_nil() && aInsOp->IsDone() ) { + QString aPublishObjName = + GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, /*withExten=*/true ) ); + + SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy( aStudy ); + GeometryGUI::GetGeomGen()->PublishInStudy( aDSStudy, + SALOMEDS::SObject::_nil(), + anObj, + aPublishObjName.toLatin1().constData() ); - anOp->commit(); + objsForDisplay.append( anObj ); + + anOp->commit(); + } + else { + anOp->abort(); + errors.append( QString( "%1 : %2" ).arg( fileName ).arg( aInsOp->GetErrorCode() ) ); + } } - else { + catch( const SALOME::SALOME_Exception& S_ex ) { anOp->abort(); - wc.suspend(); - SUIT_MessageBox::critical( app->desktop(), - QObject::tr( "GEOM_ERROR" ), - QObject::tr("GEOM_PRP_ABORT") + "\n" + QString( aInsOp->GetErrorCode() ), - QObject::tr("BUT_OK") ); + errors.append( QString( "%1 : %2" ).arg( fileName ).arg( tr( "GEOM_UNKNOWN_IMPORT_ERROR" ) ) ); } } - catch( const SALOME::SALOME_Exception& S_ex ) { - //QtCatchCorbaException(S_ex); - anOp->abort(); - return false; + + // update object browser + getGeometryGUI()->updateObjBrowser( true ); + + // display imported model (if only one file is selected) + if ( objsForDisplay.count() == 1 ) + GEOM_Displayer( stud ).Display( objsForDisplay[0].in() ); + + if ( errors.count() > 0 ) { + SUIT_MessageBox::critical( app->desktop(), + QObject::tr( "GEOM_ERROR" ), + QObject::tr( "GEOM_IMPORT_ERRORS" ) + "\n" + errors.join( "\n" ) ); } app->updateActions(); //SRN: To update a Save button in the toolbar - return true; + return objsForDisplay.count() > 0; } @@ -661,7 +758,7 @@ bool GEOMToolsGUI::Export() SalomeApp_Study* stud = dynamic_cast ( app->activeStudy() ); if ( !stud ) { - cout << "FAILED to cast active study to SalomeApp_Study" << endl; + MESSAGE ( "FAILED to cast active study to SalomeApp_Study" ); return false; } _PTR(Study) aStudy = stud->studyDS(); @@ -670,8 +767,7 @@ bool GEOMToolsGUI::Export() if ( CORBA::is_nil( eng ) ) { SUIT_MessageBox::critical( app->desktop(), QObject::tr("WRN_WARNING"), - QObject::tr( "GEOM Engine is not started" ), - QObject::tr("BUT_OK") ); + QObject::tr( "GEOM Engine is not started" ) ); return false; } @@ -708,7 +804,7 @@ bool GEOMToolsGUI::Export() QString fileType; QString file = getFileName(app->desktop(), QString( IObject->getName() ), aMap, filters, - tr("GEOM_MEN_EXPORT"), false, fileType); + tr("GEOM_MEN_EXPORT"), false, fileType, true); // User has pressed "Cancel" --> stop the operation if ( file.isEmpty() || fileType.isEmpty() ) @@ -733,8 +829,7 @@ bool GEOMToolsGUI::Export() wc.suspend(); SUIT_MessageBox::critical( app->desktop(), QObject::tr( "GEOM_ERROR" ), - QObject::tr("GEOM_PRP_ABORT") + "\n" + QString( aInsOp->GetErrorCode() ), - QObject::tr("BUT_OK") ); + QObject::tr("GEOM_PRP_ABORT") + "\n" + QString( aInsOp->GetErrorCode() ) ); return false; } } diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.h b/src/GEOMToolsGUI/GEOMToolsGUI.h index 95ec79c3b..96640f2a2 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI.h @@ -26,6 +26,8 @@ #ifndef GEOMTOOLSGUI_H #define GEOMTOOLSGUI_H +#include "GEOM_ToolsGUI.hxx" + #include #include @@ -40,7 +42,7 @@ class SALOME_ListIO; // class : GEOMToolsGUI // purpose : //================================================================================= -class GEOMToolsGUI : public GEOMGUI +class GEOMTOOLSGUI_EXPORT GEOMToolsGUI : public GEOMGUI { public: GEOMToolsGUI( GeometryGUI* ); // hide constructor to avoid direct creation diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx index 2be9e4c79..ea8a1ccd4 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -100,7 +100,8 @@ void GEOMToolsGUI::OnSettingsColor() void GEOMToolsGUI::OnRename() { SALOME_ListIO selected; - SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() ); + SalomeApp_Application* app = + dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() ); if ( app ) { LightApp_SelectionMgr* aSelMgr = app->selectionMgr(); SalomeApp_Study* appStudy = dynamic_cast( app->activeStudy() ); @@ -113,33 +114,42 @@ void GEOMToolsGUI::OnRename() if ( aLocked ) { SUIT_MessageBox::warning ( app->desktop(), QObject::tr("WRN_WARNING"), - QObject::tr("WRN_STUDY_LOCKED"), - QObject::tr("BUT_OK") ); + QObject::tr("WRN_STUDY_LOCKED") ); return; } + bool isAny = false; // is there any appropriate object selected for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { Handle(SALOME_InteractiveObject) IObject = It.Value(); _PTR(SObject) obj ( aStudy->FindObjectID(IObject->getEntry()) ); _PTR(GenericAttribute) anAttr; if ( obj ) { - if( obj->FindAttribute(anAttr, "AttributeName") ) { + if ( obj->FindAttribute(anAttr, "AttributeName") ) { _PTR(AttributeName) aName (anAttr); - QString newName = LightApp_NameDlg::getName( app->desktop(), aName->Value().c_str() ); - if ( !newName.isEmpty() ) { - aName->SetValue( newName.toLatin1().constData() ); // rename the SObject - IObject->setName( newName.toLatin1() );// rename the InteractiveObject - // Rename the corresponding GEOM_Object - GEOM::GEOM_Object_var anObj = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(obj)); - if (!CORBA::is_nil( anObj )) - anObj->SetName( newName.toLatin1() ); - (dynamic_cast(app->activeModule()))->updateObjBrowser( false ); - } + GEOM::GEOM_Object_var anObj = + GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(obj)); + if (!CORBA::is_nil(anObj)) { + isAny = true; + QString newName = LightApp_NameDlg::getName( app->desktop(), aName->Value().c_str() ); + if (!newName.isEmpty()) { + aName->SetValue( newName.toLatin1().data() ); // rename the SObject + IObject->setName( newName.toLatin1().data() );// rename the InteractiveObject + anObj->SetName( newName.toLatin1().data() ); // Rename the corresponding GEOM_Object + (dynamic_cast(app->activeModule()))->updateObjBrowser( false ); + } + } // if ( anObj ) } // if ( name attribute ) } // if ( obj ) } // iterator + + if (!isAny) { + SUIT_MessageBox::warning( app->desktop(), + QObject::tr("WRN_WARNING"), + QObject::tr("GEOM_WRN_NO_APPROPRIATE_SELECTION") ); + return; + } } } } @@ -438,29 +448,41 @@ void GEOMToolsGUI::OnNbIsos() if ( selected.IsEmpty() ) return; - Handle(SALOME_InteractiveObject) FirstIOS = selected.First(); - if ( FirstIOS.IsNull() ) - return; - SVTK_ViewWindow* vtkVW = dynamic_cast( window ); if ( !vtkVW ) return; + + SALOME_View* view = GEOM_Displayer::GetActiveView(); + + vtkActorCollection* aCollection = vtkActorCollection::New(); - SVTK_View* aView = vtkVW->getView(); - vtkActorCollection* aCollection = aView->getRenderer()->GetActors(); - + for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { + Handle(SALOME_InteractiveObject) anIObject = It.Value(); + SALOME_Prs* aPrs = view->CreatePrs( anIObject->getEntry() ); + SVTK_Prs* vtkPrs = dynamic_cast( aPrs ); + if ( vtkPrs ) { + vtkActorCollection* anActors = vtkPrs->GetObjects(); + anActors->InitTraversal(); + vtkActor* anAct = anActors->GetNextActor(); + aCollection->AddItem(anAct); + } + } + + if(aCollection) + aCollection->InitTraversal(); + else + return; + int UIso = 0; int VIso = 0; - if(aCollection){ - aCollection->InitTraversal(); - } - vtkActor *anAct = aCollection->GetNextActor(); - if(GEOM_Actor *anActor = dynamic_cast(anAct)){ + vtkActor* anAct = aCollection->GetNextActor(); + if (GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(anAct)) anActor->GetNbIsos(UIso,VIso); - } + else + return; - GEOMToolsGUI_NbIsosDlg * NbIsosDlg = + GEOMToolsGUI_NbIsosDlg* NbIsosDlg = new GEOMToolsGUI_NbIsosDlg( SUIT_Session::session()->activeApplication()->desktop() ); NbIsosDlg->setU( UIso ); @@ -469,14 +491,15 @@ void GEOMToolsGUI::OnNbIsos() if ( NbIsosDlg->exec() ) { SUIT_OverrideCursor(); - while(anAct = aCollection->GetNextActor()) { - if(GEOM_Actor *anActor = dynamic_cast(anAct)){ + while( anAct!=NULL ) { + if(GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(anAct)){ // There are no casting to needed actor. UIso = NbIsosDlg->getU(); VIso = NbIsosDlg->getV(); int aIsos[2]={UIso,VIso}; anActor->SetNbIsos(aIsos); } + anAct = aCollection->GetNextActor(); } } } // end vtkviewer diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.h b/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.h index ced31c78a..aa0150474 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.h @@ -26,10 +26,12 @@ #ifndef GEOMTOOLSGUI_DELETEDLG_H #define GEOMTOOLSGUI_DELETEDLG_H +#include "GEOM_ToolsGUI.hxx" + #include #include -class GEOMToolsGUI_DeleteDlg : public QDialog +class GEOMTOOLSGUI_EXPORT GEOMToolsGUI_DeleteDlg : public QDialog { Q_OBJECT diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h index c750b8eb1..1f13520a2 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h @@ -26,6 +26,8 @@ #ifndef GEOMTOOLSGUI_NBISOSDLG_H #define GEOMTOOLSGUI_NBISOSDLG_H +#include "GEOM_ToolsGUI.hxx" + #include class QSpinBox; @@ -34,7 +36,7 @@ class QSpinBox; // class : GEOMToolsGUI_NbIsosDlg // purpose : //================================================================================= -class GEOMToolsGUI_NbIsosDlg : public QDialog +class GEOMTOOLSGUI_EXPORT GEOMToolsGUI_NbIsosDlg : public QDialog { Q_OBJECT diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx index bb893b24d..008007f54 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx @@ -52,6 +52,8 @@ #include #include #include +#include +#include #include #include @@ -70,88 +72,90 @@ using namespace std; GEOMToolsGUI_TransparencyDlg::GEOMToolsGUI_TransparencyDlg( QWidget* parent ) :QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint ) { - setObjectName( "GEOMBase_TransparencyDlg" ); setModal( true ); resize(152, 107); setWindowTitle(tr("GEOM_TRANSPARENCY_TITLE")); - setSizeGripEnabled(TRUE); - QGridLayout* lay = new QGridLayout(this); + setSizeGripEnabled(true); + QVBoxLayout* lay = new QVBoxLayout(this); lay->setSpacing(6); lay->setMargin(11); /*************************************************************************/ QGroupBox* GroupButtons = new QGroupBox( this ); - GroupButtons->setObjectName( "GroupButtons" ); - QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons ); + QHBoxLayout* GroupButtonsLayout = new QHBoxLayout( GroupButtons ); GroupButtonsLayout->setAlignment( Qt::AlignTop ); GroupButtonsLayout->setSpacing( 6 ); GroupButtonsLayout->setMargin( 11 ); - QPushButton* buttonOk = new QPushButton( GroupButtons ); - buttonOk->setObjectName( "buttonOk" ); - buttonOk->setText( tr( "GEOM_BUT_OK" ) ); - buttonOk->setAutoDefault( TRUE ); - buttonOk->setDefault( TRUE ); - - QPushButton* buttonHelp = new QPushButton( GroupButtons ); - buttonHelp->setObjectName( "buttonHelp" ); - buttonHelp->setText( tr( "GEOM_BUT_HELP" ) ); - buttonHelp->setAutoDefault( TRUE ); - buttonHelp->setDefault( TRUE ); - - GroupButtonsLayout->addWidget( buttonOk, 0, 0 ); - GroupButtonsLayout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1 ); - GroupButtonsLayout->addWidget( buttonHelp, 0, 2 ); - /*************************************************************************/ QGroupBox* GroupC1 = new QGroupBox( this ); - GroupC1->setObjectName( "GroupC1" ); QGridLayout* GroupC1Layout = new QGridLayout( GroupC1 ); GroupC1Layout->setAlignment( Qt::AlignTop ); GroupC1Layout->setSpacing( 6 ); GroupC1Layout->setMargin( 11 ); - QLabel* TextLabelOpaque = new QLabel( GroupC1 ); - TextLabelOpaque->setObjectName( "TextLabelOpaque" ); - TextLabelOpaque->setText( tr( "GEOM_TRANSPARENCY_OPAQUE" ) ); - TextLabelOpaque->setAlignment( Qt::AlignLeft ); - GroupC1Layout->addWidget( TextLabelOpaque, 0, 0 ); - GroupC1Layout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 ); - - QLabel* TextLabelTransparent = new QLabel( GroupC1 ); - TextLabelTransparent->setObjectName( "TextLabelTransparent" ); - TextLabelTransparent->setText( tr( "GEOM_TRANSPARENCY_TRANSPARENT" ) ); + QLabel* TextLabelTransparent = new QLabel( tr( "GEOM_TRANSPARENCY_TRANSPARENT" ), GroupC1 ); TextLabelTransparent->setAlignment( Qt::AlignRight ); - GroupC1Layout->addWidget( TextLabelTransparent, 0, 2 ); + GroupC1Layout->addWidget( TextLabelTransparent, 0, 0 ); + + myValueLab = new QLabel( GroupC1 ); + myValueLab->setAlignment( Qt::AlignCenter ); + myValueLab->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); + QFont fnt = myValueLab->font(); fnt.setBold( true ); myValueLab->setFont( fnt ); + GroupC1Layout->addWidget( myValueLab, 0, 1 ); + + QLabel* TextLabelOpaque = new QLabel( tr( "GEOM_TRANSPARENCY_OPAQUE" ), GroupC1 ); + TextLabelOpaque->setAlignment( Qt::AlignLeft ); + GroupC1Layout->addWidget( TextLabelOpaque, 0, 2 ); + //GroupC1Layout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 ); mySlider = new QSlider( Qt::Horizontal, GroupC1 ); - mySlider->setObjectName( "mySlider" ); - mySlider->setMinimum( 0 ); - mySlider->setMaximum( 10 ); - mySlider->setPageStep( 1 ); - mySlider->setValue( 5 ); + mySlider->setFocusPolicy( Qt::NoFocus ); mySlider->setMinimumSize( 300, 0 ); + mySlider->setTickPosition( QSlider::TicksAbove ); + mySlider->setTickInterval( 10 ); + mySlider->setMinimum( 0 ); + mySlider->setMaximum( 100 ); + mySlider->setSingleStep( 1 ); + mySlider->setPageStep( 10 ); + //mySlider->setValue( 5 ); + mySlider->setTickPosition( QSlider::TicksLeft ); GroupC1Layout->addWidget( mySlider, 1, 0, 1, 3 ); + /*************************************************************************/ + QPushButton* buttonOk = new QPushButton( tr( "GEOM_BUT_OK" ), GroupButtons ); + buttonOk->setAutoDefault( true ); + buttonOk->setDefault( true ); - lay->addWidget(GroupC1, 0, 0); - lay->addWidget(GroupButtons, 1, 0); + QPushButton* buttonHelp = new QPushButton( tr( "GEOM_BUT_HELP" ), GroupButtons ); + buttonHelp->setAutoDefault( true ); + buttonHelp->setDefault( true ); + + GroupButtonsLayout->addWidget( buttonOk ); + GroupButtonsLayout->addSpacing( 10 ); + GroupButtonsLayout->addStretch(); + GroupButtonsLayout->addWidget( buttonHelp ); + + /*************************************************************************/ + lay->addWidget(GroupC1); + lay->addWidget(GroupButtons); /* First call valueChanged() method for initialisation */ /* The default value of transparency will change with the selection */ myFirstInit = true; // mySlider->setMaxValue( 10 ); // mySlider->setValue( 5 ) ; - ValueHasChanged(mySlider->value()); + SetTransparency(); myHelpFileName = "transparency_page.html"; // signals and slots connections : after ValueHasChanged() - connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); + connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp())); - connect(mySlider, SIGNAL(valueChanged(int)), this, SLOT(ValueHasChanged(int))); + connect(mySlider, SIGNAL(valueChanged(int)), this, SLOT(SetTransparency())); + connect(mySlider, SIGNAL(sliderMoved(int)), this, SLOT(ValueHasChanged())); } @@ -214,10 +218,21 @@ void GEOMToolsGUI_TransparencyDlg::ClickOnHelp() //================================================================================= // function : ValueHasChanged() // purpose : Called when value of slider change +//================================================================================= +void GEOMToolsGUI_TransparencyDlg::ValueHasChanged() +{ + myValueLab->setText( QString("%1%").arg( mySlider->value() ) ); +} + +//================================================================================= +// function : SetTransparency() +// purpose : Called when value of slider change // : or the first time as initilisation //================================================================================= -void GEOMToolsGUI_TransparencyDlg::ValueHasChanged( int newValue ) +void GEOMToolsGUI_TransparencyDlg::SetTransparency() { + float newValue = ( 100 - mySlider->value() ) / 100.; + SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() ); if ( !app ) return; @@ -244,14 +259,15 @@ void GEOMToolsGUI_TransparencyDlg::ValueHasChanged( int newValue ) SVTK_View* aView = vtkVW->getView(); if ( myFirstInit ) { myFirstInit = false; - float transp = (aView->GetTransparency(FirstIOS))*10.0; - mySlider->setValue(int(transp)); + int transp = int (100 - ((aView->GetTransparency(FirstIOS))*100.0) + 0.5); + mySlider->setValue(transp); + ValueHasChanged(); return; } SUIT_OverrideCursor(); for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { - aView->SetTransparency( It.Value(), newValue/10.0 ); + aView->SetTransparency( It.Value(), newValue ); } aView->Repaint(); } // if ( isVTK ) @@ -265,8 +281,9 @@ void GEOMToolsGUI_TransparencyDlg::ValueHasChanged( int newValue ) aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS, found ); if( !found ) return; - float transp = (int(aisShape->Transparency() * 10.0 + 0.001)); - mySlider->setValue(int(transp)); + int transp = int( 100 - ( aisShape->Transparency() * 100.0 ) + 0.5); + mySlider->setValue(transp); + ValueHasChanged(); return; } @@ -278,12 +295,14 @@ void GEOMToolsGUI_TransparencyDlg::ValueHasChanged( int newValue ) for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { aisShape = gb->ConvertIOinGEOMAISShape( It.Value(), found ); if ( found ) { - ic->SetTransparency( aisShape, newValue / 10.0, false ); + ic->SetTransparency( aisShape, newValue, false ); ic->Redisplay( aisShape, Standard_False, Standard_True ); } } // for... ic->UpdateCurrentViewer(); } // if ( isOCC ) + + ValueHasChanged(); } //================================================================================= diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h index 502d781bd..fccb90708 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h @@ -26,16 +26,19 @@ #ifndef GEOMTOOLSGUI_TRANSPARENCYDLG_H #define GEOMTOOLSGUI_TRANSPARENCYDLG_H +#include "GEOM_ToolsGUI.hxx" + #include class QSlider; +class QLabel; //================================================================================= // class : GEOMBase_TransparencyDlg // purpose : // : WARNING : that is a MODAL dialog. //================================================================================= -class GEOMToolsGUI_TransparencyDlg : public QDialog +class GEOMTOOLSGUI_EXPORT GEOMToolsGUI_TransparencyDlg : public QDialog { Q_OBJECT @@ -49,13 +52,15 @@ private: private: bool myFirstInit; /* Inform for the first init */ QSlider* mySlider; + QLabel* myValueLab; QString myHelpFileName; private slots: void ClickOnOk(); void ClickOnClose(); void ClickOnHelp(); - void ValueHasChanged( int ) ; + void ValueHasChanged(); + void SetTransparency(); }; #endif // GEOMTOOLSGUI_TRANSPARENCYDLG_H diff --git a/src/GEOMToolsGUI/GEOM_ToolsGUI.hxx b/src/GEOMToolsGUI/GEOM_ToolsGUI.hxx new file mode 100755 index 000000000..db2c0ed56 --- /dev/null +++ b/src/GEOMToolsGUI/GEOM_ToolsGUI.hxx @@ -0,0 +1,47 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOM_ToolsGUI.hxx +// Author : Alexander A. BORODIN +// Module : GEOM + +#ifndef _GEOM_ToolsGUI_HXX_ +#define _GEOM_ToolsGUI_HXX_ + +#ifdef WNT + #if defined GEOMTOOLSGUI_EXPORTS + #if defined WIN32 + #define GEOMTOOLSGUI_EXPORT __declspec( dllexport ) + #else + #define GEOMTOOLSGUI_EXPORT + #endif + #else + #if defined WIN32 + #define GEOMTOOLSGUI_EXPORT __declspec( dllimport ) + #else + #define GEOMTOOLSGUI_EXPORT + #endif + #endif +#else + #define GEOMTOOLSGUI_EXPORT +#endif + +#endif diff --git a/src/GEOMToolsGUI/Makefile.am b/src/GEOMToolsGUI/Makefile.am index dd6c92cb8..e58b28ad6 100644 --- a/src/GEOMToolsGUI/Makefile.am +++ b/src/GEOMToolsGUI/Makefile.am @@ -31,6 +31,7 @@ lib_LTLIBRARIES = libGEOMToolsGUI.la salomeinclude_HEADERS = dist_libGEOMToolsGUI_la_SOURCES = \ + GEOM_ToolsGUI.hxx \ GEOMToolsGUI.h \ GEOMToolsGUI_NbIsosDlg.h \ GEOMToolsGUI_TransparencyDlg.h \ diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index 106ee9ef6..4a89a99bc 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -522,7 +522,10 @@ char* GEOM_Gen_i::ComponentDataType() // function : AddInStudy // purpose : //============================================================================ -SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy(SALOMEDS::Study_ptr theStudy, GEOM::GEOM_Object_ptr theObject, const char* theName, GEOM::GEOM_Object_ptr theFather) +SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy (SALOMEDS::Study_ptr theStudy, + GEOM::GEOM_Object_ptr theObject, + const char* theName, + GEOM::GEOM_Object_ptr theFather) { SALOMEDS::SObject_var aResultSO; if(theObject->_is_nil() || theStudy->_is_nil()) return aResultSO; @@ -559,6 +562,393 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy(SALOMEDS::Study_ptr theStudy, GEOM: return aResultSO._retn(); } +//============================================================================ +// function : RestoreSubShapesO +// purpose : Publish sub-shapes, standing for arguments and sub-shapes of arguments. +// To be used from python scripts out of geompy.addToStudy (non-default usage) +//============================================================================ +CORBA::Boolean GEOM_Gen_i::RestoreSubShapesO (SALOMEDS::Study_ptr theStudy, + GEOM::GEOM_Object_ptr theObject, + const GEOM::ListOfGO& theArgs, + GEOM::find_shape_method theFindMethod, + CORBA::Boolean theInheritFirstArg) +{ + if (CORBA::is_nil(theStudy) || CORBA::is_nil(theObject)) + return false; + + // find SObject in the study + CORBA::String_var anIORo = _orb->object_to_string(theObject); + SALOMEDS::SObject_var aSO = theStudy->FindObjectIOR(anIORo.in()); + if (CORBA::is_nil(aSO)) + return false; + + return RestoreSubShapes(theStudy, theObject, aSO, theArgs, theFindMethod, theInheritFirstArg); +} + +//============================================================================ +// function : RestoreSubShapesSO +// purpose : Publish sub-shapes, standing for arguments and sub-shapes of arguments. +// To be used from GUI and from geompy.addToStudy +//============================================================================ +CORBA::Boolean GEOM_Gen_i::RestoreSubShapesSO (SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject, + const GEOM::ListOfGO& theArgs, + GEOM::find_shape_method theFindMethod, + CORBA::Boolean theInheritFirstArg) +{ + if (CORBA::is_nil(theStudy) || CORBA::is_nil(theSObject)) + return false; + + SALOMEDS::GenericAttribute_var anAttr; + if (!theSObject->FindAttribute(anAttr, "AttributeIOR")) + return false; + + SALOMEDS::AttributeIOR_var anAttrIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); + CORBA::String_var anIORso = anAttrIOR->Value(); + + // get Object from SObject + GEOM::GEOM_Object_var anO = GEOM::GEOM_Object::_narrow(_orb->string_to_object(anIORso)); + if (CORBA::is_nil(anO)) + return false; + + return RestoreSubShapes(theStudy, anO, theSObject, theArgs, theFindMethod, theInheritFirstArg); +} + +//============================================================================ +// function : RestoreSubShapes +// purpose : Private method. Works only if both theObject and theSObject +// are defined, and does not check, if they correspond to each other. +//============================================================================ +CORBA::Boolean GEOM_Gen_i::RestoreSubShapes (SALOMEDS::Study_ptr theStudy, + GEOM::GEOM_Object_ptr theObject, + SALOMEDS::SObject_ptr theSObject, + const GEOM::ListOfGO& theArgs, + GEOM::find_shape_method theFindMethod, + CORBA::Boolean theInheritFirstArg) +{ + if (CORBA::is_nil(theStudy) || CORBA::is_nil(theObject) || CORBA::is_nil(theSObject)) + return false; + + // Arguments to be published + GEOM::ListOfGO_var aList; + + // If theArgs list is empty, we try to publish all arguments, + // otherwise publish only passed args + Standard_Integer nbArgsActual = -1; // -1 means unknown + Standard_Integer aLength = theArgs.length(); + if (aLength > 0) { + aList = new GEOM::ListOfGO; + aList->length(aLength); + for (int i = 0; i < aLength; i++) { + aList[i] = theArgs[i]; + } + } + else { + // Get all arguments + aList = theObject->GetDependency(); + aLength = aList->length(); + nbArgsActual = aLength; + } + + if (aLength < 1) + return false; + + if (theInheritFirstArg || (nbArgsActual == 1)) { + // Do not publish argument's reflection, + // but only reconstruct its published sub-shapes + + GEOM::GEOM_Object_var anArgO = aList[0]; + CORBA::String_var anIOR = _orb->object_to_string(anArgO); + SALOMEDS::SObject_var anArgSO = theStudy->FindObjectIOR(anIOR.in()); + + GEOM::ListOfGO_var aParts = + RestoreSubShapesOneLevel(theStudy, anArgSO, theSObject, theObject, theFindMethod); + + // set the color of the transformed shape to the color of initial shape + theObject->SetColor(aList[0]->GetColor()); + + return (aParts->length() > 0); + } + + // Get interface, containing method, which we will use to reconstruct sub-shapes + GEOM::GEOM_IShapesOperations_var aShapesOp = GetIShapesOperations(theStudy->StudyId()); + GEOM::GEOM_IGroupOperations_var aGroupOp = GetIGroupOperations(theStudy->StudyId()); + + // Reconstruct arguments and tree of sub-shapes of the arguments + CORBA::String_var anIOR; + SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); + for (Standard_Integer i = 0; i < aLength; i++) + { + GEOM::GEOM_Object_var anArgO = aList[i]; + if (!CORBA::is_nil(anArgO)) { + anIOR = _orb->object_to_string(anArgO); + SALOMEDS::SObject_var anArgSO = theStudy->FindObjectIOR(anIOR.in()); + TCollection_AsciiString anArgName; + if (CORBA::is_nil(anArgSO)) { + anArgName = "arg_"; + anArgName += TCollection_AsciiString(i); + } + else { + anArgName = anArgSO->GetName(); + } + + // Find a sub-shape of theObject in place of the argument + GEOM::GEOM_Object_var aSubO; + switch (theFindMethod) { + case GEOM::FSM_GetInPlace: + { + // Use GetInPlace + aSubO = aShapesOp->GetInPlace(theObject, anArgO); + } + break; + case GEOM::FSM_Transformed: + { + // transformation, cannot use GetInPlace, operate with indices + GEOM::ListOfLong_var anIDs = anArgO->GetSubShapeIndices(); + if (anIDs->length() > 1) { + // group + aSubO = aGroupOp->CreateGroup(theObject, aGroupOp->GetType(anArgO)); + if (!CORBA::is_nil(aSubO)) + aGroupOp->UnionIDs(aSubO, anIDs); + } + else { + // single sub-shape + aSubO = aShapesOp->GetSubShape(theObject, anIDs[0]); + } + } + break; + case GEOM::FSM_GetSame: + { + // Use GetSame + aSubO = aShapesOp->GetSame(theObject, anArgO); + } + break; + case GEOM::FSM_GetShapesOnShape: + { + // Use GetShapesOnShape. Can work only on solids, so it has sense to search only solids + aSubO = aShapesOp->GetShapesOnShapeAsCompound(anArgO, theObject, + (short)GEOM::SOLID, GEOM::ST_ONIN); + } + break; + case GEOM::FSM_GetInPlaceByHistory: + { + // Use GetInPlaceByHistory + aSubO = aShapesOp->GetInPlaceByHistory(theObject, anArgO); + } + break; + default: + {} + } + + if (!CORBA::is_nil(aSubO)) { + // Publish the sub-shape + TCollection_AsciiString aSubName ("from_"); + aSubName += anArgName; + SALOMEDS::SObject_var aSubSO = aStudyBuilder->NewObject(theSObject); + aSubSO = PublishInStudy(theStudy, aSubSO, aSubO, aSubName.ToCString()); + // Restore color + aSubO->SetColor(anArgO->GetColor()); + + if (!CORBA::is_nil(anArgSO)) { + // Restore published sub-shapes of the argument + if (theFindMethod == GEOM::FSM_GetInPlaceByHistory) + // pass theObject, because only it has the history + RestoreSubShapesOneLevel(theStudy, anArgSO, aSubSO, theObject, theFindMethod); + else + RestoreSubShapesOneLevel(theStudy, anArgSO, aSubSO, aSubO, theFindMethod); + } + } + else { // GetInPlace failed, try to build from published parts + if (!CORBA::is_nil(anArgSO)) { + SALOMEDS::SObject_var aSubSO = aStudyBuilder->NewObject(theSObject); + + // Restore published sub-shapes of the argument + GEOM::ListOfGO_var aParts = + RestoreSubShapesOneLevel(theStudy, anArgSO, aSubSO, theObject, theFindMethod); + + if (aParts->length() > 0) { + // try to build an argument from a set of its sub-shapes, + // that published and will be reconstructed + if (aParts->length() > 1) { + aSubO = aShapesOp->MakeCompound(aParts); + } + else { + aSubO = aParts[0]; + } + if (!CORBA::is_nil(aSubO)) { + // Publish the sub-shape + TCollection_AsciiString aSubName ("from_parts_of_"); + aSubName += anArgName; + aSubSO = PublishInStudy(theStudy, aSubSO, aSubO, aSubName.ToCString()); + // Restore color + aSubO->SetColor(anArgO->GetColor()); + } + } + else { + // remove created aSubSO, because no parts have been found + aStudyBuilder->RemoveObject(aSubSO); + } + } + } // try to build from published parts + } + } // process arguments + + return true; +} + +//============================================================================ +// function : RestoreSubShapesOneLevel +// purpose : Private method +//============================================================================ +GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesOneLevel (SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theOldSO, + SALOMEDS::SObject_ptr theNewSO, + GEOM::GEOM_Object_ptr theNewO, + GEOM::find_shape_method theFindMethod) +{ + int i = 0; + GEOM::ListOfGO_var aParts = new GEOM::ListOfGO; + if (CORBA::is_nil(theStudy) || CORBA::is_nil(theOldSO) || + CORBA::is_nil(theNewO) || CORBA::is_nil(theNewSO)) + return aParts._retn(); + + SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); + + // Get interface, containing method, which we will use to reconstruct sub-shapes + GEOM::GEOM_IShapesOperations_var aShapesOp = GetIShapesOperations(theStudy->StudyId()); + GEOM::GEOM_IGroupOperations_var aGroupOp = GetIGroupOperations(theStudy->StudyId()); + + // Reconstruct published sub-shapes + SALOMEDS::ChildIterator_var it = theStudy->NewChildIterator(theOldSO); + + int aLen = 0; + for (it->Init(); it->More(); it->Next()) { + aLen++; + } + aParts->length(aLen); + + for (it->Init(); it->More(); it->Next()) { + SALOMEDS::SObject_var anOldSubSO = it->Value(); + + TCollection_AsciiString anArgName = anOldSubSO->GetName(); + + SALOMEDS::GenericAttribute_var anAttr; + if (anOldSubSO->FindAttribute(anAttr, "AttributeIOR")) { + SALOMEDS::AttributeIOR_var anAttrIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); + GEOM::GEOM_Object_var anOldSubO = + GEOM::GEOM_Object::_narrow(_orb->string_to_object(anAttrIOR->Value())); + if (!CORBA::is_nil(anOldSubO)) { + // Find a sub-shape of theNewO in place of anOldSubO + GEOM::GEOM_Object_var aNewSubO; + switch (theFindMethod) { + case GEOM::FSM_GetInPlace: + { + // Use GetInPlace + aNewSubO = aShapesOp->GetInPlace(theNewO, anOldSubO); + } + break; + case GEOM::FSM_Transformed: + { + // transformation, cannot use GetInPlace, operate with indices + GEOM::ListOfLong_var anIDs = anOldSubO->GetSubShapeIndices(); + if (anIDs->length() > 1) { + // group + aNewSubO = aGroupOp->CreateGroup(theNewO, aGroupOp->GetType(anOldSubO)); + if (!CORBA::is_nil(aNewSubO)) + aGroupOp->UnionIDs(aNewSubO, anIDs); + } + else { + // single sub-shape + aNewSubO = aShapesOp->GetSubShape(theNewO, anIDs[0]); + } + } + break; + case GEOM::FSM_GetSame: + { + // Use GetSame + aNewSubO = aShapesOp->GetSame(theNewO, anOldSubO); + } + break; + case GEOM::FSM_GetShapesOnShape: + { + // Use GetShapesOnShape. Can work only on solids, so it has sense to search only solids + aNewSubO = aShapesOp->GetShapesOnShapeAsCompound(anOldSubO, theNewO, + (short)GEOM::SOLID, GEOM::ST_ONIN); + } + break; + case GEOM::FSM_GetInPlaceByHistory: + { + // Use GetInPlaceByHistory + aNewSubO = aShapesOp->GetInPlaceByHistory(theNewO, anOldSubO); + } + break; + default: + {} + } + + if (!CORBA::is_nil(aNewSubO)) { + // add the part to the list + aParts[i] = aNewSubO; + i++; + + // Publish the sub-shape + TCollection_AsciiString aSubName ("from_"); + aSubName += anArgName; + SALOMEDS::SObject_var aNewSubSO = aStudyBuilder->NewObject(theNewSO); + aNewSubSO = PublishInStudy(theStudy, aNewSubSO, aNewSubO, aSubName.ToCString()); + // Restore color + aNewSubO->SetColor(anOldSubO->GetColor()); + + // Restore published sub-shapes of the argument + if (theFindMethod == GEOM::FSM_GetInPlaceByHistory) + // pass the main shape as Object, because only it has the history + RestoreSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO, theNewO, theFindMethod); + else + RestoreSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO, aNewSubO, theFindMethod); + } + else { // GetInPlace failed, try to build from published parts + SALOMEDS::SObject_var aNewSubSO = aStudyBuilder->NewObject(theNewSO); + + // Restore published sub-shapes of the argument + GEOM::ListOfGO_var aParts = + RestoreSubShapesOneLevel(theStudy, anOldSubSO, aNewSubSO, theNewO, theFindMethod); + + if (aParts->length() > 0) { + // try to build an object from a set of its sub-shapes, + // that published and will be reconstructed + if (aParts->length() > 1) { + aNewSubO = aShapesOp->MakeCompound(aParts); + } + else { + aNewSubO = aParts[0]; + } + + if (!CORBA::is_nil(aNewSubO)) { + // add the part to the list + aParts[i] = aNewSubO; + i++; + + // Publish the sub-shape + TCollection_AsciiString aSubName = "from_parts_of_"; + aSubName += anArgName; + aNewSubSO = PublishInStudy(theStudy, aNewSubSO, aNewSubO, aSubName.ToCString()); + // Restore color + aNewSubO->SetColor(anOldSubO->GetColor()); + } + } + else { + // remove created aSubSO, because no parts have been found + aStudyBuilder->RemoveObject(aNewSubSO); + } + } // try to build from published parts + } + } + } // iterate on published sub-shapes + + aParts->length(i); + return aParts._retn(); +} + //============================================================================ // function : register() // purpose : register 'name' in 'name_service' @@ -858,7 +1248,8 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::AddSubShape (GEOM::GEOM_Object_ptr theMainShap //============================================================================= void GEOM_Gen_i::RemoveObject(GEOM::GEOM_Object_ptr theObject) { - Handle(GEOM_Object) anObject = _impl->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + CORBA::String_var anEntry = theObject->GetEntry(); + Handle(GEOM_Object) anObject = _impl->GetObject(theObject->GetStudyID(), anEntry); if (anObject.IsNull()) return; _impl->RemoveObject(anObject); return; diff --git a/src/GEOM_I/GEOM_Gen_i.hh b/src/GEOM_I/GEOM_Gen_i.hh index 30188801f..9f904ddb8 100644 --- a/src/GEOM_I/GEOM_Gen_i.hh +++ b/src/GEOM_I/GEOM_Gen_i.hh @@ -133,6 +133,24 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi const char* theName, GEOM::GEOM_Object_ptr theFather); + /*! \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments. + * To be used from python scripts out of geompy.addToStudy (non-default usage) + */ + CORBA::Boolean RestoreSubShapesO (SALOMEDS::Study_ptr theStudy, + GEOM::GEOM_Object_ptr theObject, + const GEOM::ListOfGO& theArgs, + GEOM::find_shape_method theFindMethod, + CORBA::Boolean theInheritFirstArg); + + /*! \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments. + * To be used from GUI and from geompy.addToStudy + */ + CORBA::Boolean RestoreSubShapesSO (SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject, + const GEOM::ListOfGO& theArgs, + GEOM::find_shape_method theFindMethod, + CORBA::Boolean theInheritFirstArg); + //-----------------------------------------------------------------------// // Transaction methods // //-----------------------------------------------------------------------// @@ -219,6 +237,20 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi virtual GEOM::GEOM_Object_ptr GetObject(CORBA::Long theStudyID, const char* theEntry); + private: + GEOM::ListOfGO* RestoreSubShapesOneLevel (SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theOldSO, + SALOMEDS::SObject_ptr theNewSO, + GEOM::GEOM_Object_ptr theNewO, + GEOM::find_shape_method theFindMethod); + + CORBA::Boolean RestoreSubShapes (SALOMEDS::Study_ptr theStudy, + GEOM::GEOM_Object_ptr theObject, + SALOMEDS::SObject_ptr theSObject, + const GEOM::ListOfGO& theArgs, + GEOM::find_shape_method theFindMethod, + CORBA::Boolean theInheritFirstArg); + private: ::GEOMImpl_Gen* _impl; diff --git a/src/GEOM_I/GEOM_IBasicOperations_i.cc b/src/GEOM_I/GEOM_IBasicOperations_i.cc index fe525509c..613e3954e 100644 --- a/src/GEOM_I/GEOM_IBasicOperations_i.cc +++ b/src/GEOM_I/GEOM_IBasicOperations_i.cc @@ -138,6 +138,7 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnLinesIntersection return GetObject(anObject); } + //============================================================================= /*! * MakePointOnCurve @@ -169,6 +170,39 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnCurve return GetObject(anObject); } + +//============================================================================= +/*! + * MakePointOnSurface + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnSurface + (GEOM::GEOM_Object_ptr theSurface, + CORBA::Double theUParameter, + CORBA::Double theVParameter) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theSurface == NULL) return aGEOMObject._retn(); + + //Get the reference surface + Handle(GEOM_Object) aRefernce = GetOperations()->GetEngine()->GetObject + (theSurface->GetStudyID(), theSurface->GetEntry()); + if (aRefernce.IsNull()) return aGEOMObject._retn(); + + //Create the point + Handle(GEOM_Object) anObject = + GetOperations()->MakePointOnSurface(aRefernce, theUParameter, theVParameter); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + + //============================================================================= /*! * MakeTangentOnCurve diff --git a/src/GEOM_I/GEOM_IBasicOperations_i.hh b/src/GEOM_I/GEOM_IBasicOperations_i.hh index 753e0df16..60cc657cc 100644 --- a/src/GEOM_I/GEOM_IBasicOperations_i.hh +++ b/src/GEOM_I/GEOM_IBasicOperations_i.hh @@ -53,6 +53,10 @@ class GEOM_I_EXPORT GEOM_IBasicOperations_i : GEOM::GEOM_Object_ptr MakePointOnCurve (GEOM::GEOM_Object_ptr theCurve, CORBA::Double theParameter); + GEOM::GEOM_Object_ptr MakePointOnSurface (GEOM::GEOM_Object_ptr theSurface, + CORBA::Double theUParameter, + CORBA::Double theVParameter); + GEOM::GEOM_Object_ptr MakePointOnLinesIntersection (GEOM::GEOM_Object_ptr theLine1, GEOM::GEOM_Object_ptr theLine2); diff --git a/src/GEOM_I/GEOM_IMeasureOperations_i.cc b/src/GEOM_I/GEOM_IMeasureOperations_i.cc index d4e8c6a8e..358dd68a0 100644 --- a/src/GEOM_I/GEOM_IMeasureOperations_i.cc +++ b/src/GEOM_I/GEOM_IMeasureOperations_i.cc @@ -473,3 +473,151 @@ CORBA::Double GEOM_IMeasureOperations_i::GetAngle (GEOM::GEOM_Object_ptr theShap // Get the angle return GetOperations()->GetAngle(aShape1, aShape2); } + + +//============================================================================= +/*! + * CurveCurvatureByParam + */ +//============================================================================= +CORBA::Double GEOM_IMeasureOperations_i::CurveCurvatureByParam + (GEOM::GEOM_Object_ptr theCurve, CORBA::Double theParam) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if(theCurve==NULL) return -1.0; + + //Get the reference shape + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theCurve->GetStudyID(), theCurve->GetEntry()); + + if(aShape.IsNull()) return -1.0; + + return GetOperations()->CurveCurvatureByParam(aShape,theParam); +} + + +//============================================================================= +/*! + * CurveCurvatureByPoint + */ +//============================================================================= +CORBA::Double GEOM_IMeasureOperations_i::CurveCurvatureByPoint + (GEOM::GEOM_Object_ptr theCurve, GEOM::GEOM_Object_ptr thePoint) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if( theCurve==NULL || thePoint==NULL ) return -1.0; + + //Get the reference shape + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theCurve->GetStudyID(), theCurve->GetEntry()); + Handle(GEOM_Object) aPoint = GetOperations()->GetEngine()->GetObject + (thePoint->GetStudyID(), thePoint->GetEntry()); + + if( aShape.IsNull() || aPoint.IsNull() ) return -1.0; + + return GetOperations()->CurveCurvatureByPoint(aShape,aPoint); +} + + +//============================================================================= +/*! + * MaxSurfaceCurvatureByParam + */ +//============================================================================= +CORBA::Double GEOM_IMeasureOperations_i::MaxSurfaceCurvatureByParam + (GEOM::GEOM_Object_ptr theSurf, + CORBA::Double theUParam, + CORBA::Double theVParam) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if(theSurf==NULL) return -1.0; + + //Get the reference shape + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theSurf->GetStudyID(), theSurf->GetEntry()); + + if(aShape.IsNull()) return -1.0; + + return GetOperations()->MaxSurfaceCurvatureByParam(aShape,theUParam,theVParam); +} + + +//============================================================================= +/*! + * MaxSurfaceCurvatureByPoint + */ +//============================================================================= +CORBA::Double GEOM_IMeasureOperations_i::MaxSurfaceCurvatureByPoint + (GEOM::GEOM_Object_ptr theSurf, GEOM::GEOM_Object_ptr thePoint) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if( theSurf==NULL || thePoint==NULL ) return -1.0; + + //Get the reference shape + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theSurf->GetStudyID(), theSurf->GetEntry()); + Handle(GEOM_Object) aPoint = GetOperations()->GetEngine()->GetObject + (thePoint->GetStudyID(), thePoint->GetEntry()); + + if( aShape.IsNull() || aPoint.IsNull() ) return -1.0; + + return GetOperations()->MaxSurfaceCurvatureByPoint(aShape,aPoint); +} + + +//============================================================================= +/*! + * MinSurfaceCurvatureByParam + */ +//============================================================================= +CORBA::Double GEOM_IMeasureOperations_i::MinSurfaceCurvatureByParam + (GEOM::GEOM_Object_ptr theSurf, + CORBA::Double theUParam, + CORBA::Double theVParam) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if(theSurf==NULL) return -1.0; + + //Get the reference shape + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theSurf->GetStudyID(), theSurf->GetEntry()); + + if(aShape.IsNull()) return -1.0; + + return GetOperations()->MinSurfaceCurvatureByParam(aShape,theUParam,theVParam); +} + + +//============================================================================= +/*! + * MinSurfaceCurvatureByPoint + */ +//============================================================================= +CORBA::Double GEOM_IMeasureOperations_i::MinSurfaceCurvatureByPoint + (GEOM::GEOM_Object_ptr theSurf, GEOM::GEOM_Object_ptr thePoint) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if( theSurf==NULL || thePoint==NULL ) return -1.0; + + //Get the reference shape + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theSurf->GetStudyID(), theSurf->GetEntry()); + Handle(GEOM_Object) aPoint = GetOperations()->GetEngine()->GetObject + (thePoint->GetStudyID(), thePoint->GetEntry()); + + if( aShape.IsNull() || aPoint.IsNull() ) return -1.0; + + return GetOperations()->MinSurfaceCurvatureByPoint(aShape,aPoint); +} diff --git a/src/GEOM_I/GEOM_IMeasureOperations_i.hh b/src/GEOM_I/GEOM_IMeasureOperations_i.hh index 4db8a26d4..2a4c40fe3 100644 --- a/src/GEOM_I/GEOM_IMeasureOperations_i.hh +++ b/src/GEOM_I/GEOM_IMeasureOperations_i.hh @@ -94,6 +94,28 @@ class GEOM_I_EXPORT GEOM_IMeasureOperations_i : CORBA::Double GetAngle (GEOM::GEOM_Object_ptr theShape1, GEOM::GEOM_Object_ptr theShape2); + // Methods for recieving radiuses of curvature of curves and surfaces + // in the given point + CORBA::Double CurveCurvatureByParam (GEOM::GEOM_Object_ptr theCurve, + CORBA::Double theParam); + + CORBA::Double CurveCurvatureByPoint (GEOM::GEOM_Object_ptr theCurve, + GEOM::GEOM_Object_ptr thePoint); + + CORBA::Double MaxSurfaceCurvatureByParam (GEOM::GEOM_Object_ptr theSurf, + CORBA::Double theUParam, + CORBA::Double theVParam); + + CORBA::Double MaxSurfaceCurvatureByPoint (GEOM::GEOM_Object_ptr theSurf, + GEOM::GEOM_Object_ptr thePoint); + + CORBA::Double MinSurfaceCurvatureByParam (GEOM::GEOM_Object_ptr theSurf, + CORBA::Double theUParam, + CORBA::Double theVParam); + + CORBA::Double MinSurfaceCurvatureByPoint (GEOM::GEOM_Object_ptr theSurf, + GEOM::GEOM_Object_ptr thePoint); + ::GEOMImpl_IMeasureOperations* GetOperations() { return (::GEOMImpl_IMeasureOperations*)GetImpl(); } }; diff --git a/src/GEOM_I/GEOM_IShapesOperations_i.cc b/src/GEOM_I/GEOM_IShapesOperations_i.cc index 6d9bf7fcc..a1430f88a 100644 --- a/src/GEOM_I/GEOM_IShapesOperations_i.cc +++ b/src/GEOM_I/GEOM_IShapesOperations_i.cc @@ -1290,6 +1290,133 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnBoxIDs return aSeq._retn(); } + +//============================================================================= +/*! + * GetShapesOnShape + */ +//============================================================================= +GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnShape + (GEOM::GEOM_Object_ptr theCheckShape, + GEOM::GEOM_Object_ptr theShape, + CORBA::Short theShapeType, + GEOM::shape_state theState) +{ + GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if ( theShape == NULL || theCheckShape == NULL ) + return aSeq._retn(); + + //Get the reference objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) aCheckShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theCheckShape->GetEntry()); + + if (aShape.IsNull() || aCheckShape.IsNull() ) + return aSeq._retn(); + + //Get Shapes On Shape + Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->GetShapesOnShape + (aCheckShape,aShape, theShapeType,ShapeState(theState)); + + if (!GetOperations()->IsDone() || aHSeq.IsNull()) + return aSeq._retn(); + + Standard_Integer aLength = aHSeq->Length(); + aSeq->length(aLength); + for (Standard_Integer i = 1; i <= aLength; i++) + aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i))); + + return aSeq._retn(); +} + + +//============================================================================= +/*! + * GetShapesOnShapeAsCompound + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetShapesOnShapeAsCompound + (GEOM::GEOM_Object_ptr theCheckShape, + GEOM::GEOM_Object_ptr theShape, + CORBA::Short theShapeType, + GEOM::shape_state theState) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if ( theShape == NULL || theCheckShape == NULL ) + return aGEOMObject._retn(); + + //Get the reference objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) aCheckShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theCheckShape->GetEntry()); + + if (aShape.IsNull() || aCheckShape.IsNull() ) + return aGEOMObject._retn(); + + //Get Shapes On Shape + Handle(GEOM_Object) anObject = GetOperations()->GetShapesOnShapeAsCompound + (aCheckShape,aShape, theShapeType,ShapeState(theState)); + + if (anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + + +//============================================================================= +/*! + * GetShapesOnShapeIDs + */ +//============================================================================= +GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnShapeIDs + (GEOM::GEOM_Object_ptr theCheckShape, + GEOM::GEOM_Object_ptr theShape, + CORBA::Short theShapeType, + GEOM::shape_state theState) +{ + GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if ( theShape == NULL || theCheckShape == NULL ) + return aSeq._retn(); + + //Get the reference objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) aCheckShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theCheckShape->GetEntry()); + + if (aShape.IsNull() || aCheckShape.IsNull() ) + return aSeq._retn(); + + //Get Shapes On Shape + Handle(TColStd_HSequenceOfInteger) aHSeq = GetOperations()->GetShapesOnShapeIDs + (aCheckShape,aShape, theShapeType,ShapeState(theState)); + if (!GetOperations()->IsDone() || aHSeq.IsNull()) + return aSeq._retn(); + + Standard_Integer aLength = aHSeq->Length(); + aSeq->length(aLength); + for (Standard_Integer i = 1; i <= aLength; i++) + aSeq[i-1] = aHSeq->Value(i); + + return aSeq._retn(); +} + + //============================================================================= /*! * GetInPlace diff --git a/src/GEOM_I/GEOM_IShapesOperations_i.hh b/src/GEOM_I/GEOM_IShapesOperations_i.hh index de1b24be1..f900148a9 100644 --- a/src/GEOM_I/GEOM_IShapesOperations_i.hh +++ b/src/GEOM_I/GEOM_IShapesOperations_i.hh @@ -175,6 +175,22 @@ class GEOM_I_EXPORT GEOM_IShapesOperations_i : CORBA::Long theShapeType, GEOM::shape_state theState); + GEOM::ListOfGO* GetShapesOnShape (GEOM::GEOM_Object_ptr theSheckShape, + GEOM::GEOM_Object_ptr theShape, + CORBA::Short theShapeType, + GEOM::shape_state theState); + + GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound + (GEOM::GEOM_Object_ptr theSheckShape, + GEOM::GEOM_Object_ptr theShape, + CORBA::Short theShapeType, + GEOM::shape_state theState); + + GEOM::ListOfLong* GetShapesOnShapeIDs (GEOM::GEOM_Object_ptr theCheckShape, + GEOM::GEOM_Object_ptr theShape, + CORBA::Short theShapeType, + GEOM::shape_state theState); + GEOM::GEOM_Object_ptr GetInPlace (GEOM::GEOM_Object_ptr theShapeWhere, GEOM::GEOM_Object_ptr theShapeWhat); diff --git a/src/GEOM_I/GEOM_ITransformOperations_i.cc b/src/GEOM_I/GEOM_ITransformOperations_i.cc index e914733f6..1dff38932 100644 --- a/src/GEOM_I/GEOM_ITransformOperations_i.cc +++ b/src/GEOM_I/GEOM_ITransformOperations_i.cc @@ -17,6 +17,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include #include "GEOM_ITransformOperations_i.hh" @@ -84,18 +85,21 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateTwoPoints aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) anObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (anObject.IsNull()) return aGEOMObject._retn(); //Get the first point of translation + CORBA::String_var aP1Entry = thePoint1->GetEntry(); Handle(GEOM_Object) aPoint1 = - GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), thePoint1->GetEntry()); + GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), aP1Entry); if (aPoint1.IsNull()) return aGEOMObject._retn(); //Get the second point of translation + CORBA::String_var aP2Entry = thePoint2->GetEntry(); Handle(GEOM_Object) aPoint2 = - GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), thePoint2->GetEntry()); + GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), aP2Entry); if (aPoint2.IsNull()) return aGEOMObject._retn(); //Perform the translation @@ -122,18 +126,21 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateTwoPointsCopy if (thePoint1 == NULL || thePoint2 == NULL || theObject == NULL) return aGEOMObject._retn(); //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) aBasicObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (aBasicObject.IsNull()) return aGEOMObject._retn(); //Get the first point of translation + CORBA::String_var aP1Entry = thePoint1->GetEntry(); Handle(GEOM_Object) aPoint1 = - GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), thePoint1->GetEntry()); + GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), aP1Entry); if (aPoint1.IsNull()) return aGEOMObject._retn(); //Get the second point of translation + CORBA::String_var aP2Entry = thePoint2->GetEntry(); Handle(GEOM_Object) aPoint2 = - GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), thePoint2->GetEntry()); + GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), aP2Entry); if (aPoint2.IsNull()) return aGEOMObject._retn(); //Create the translated shape @@ -150,8 +157,9 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateTwoPointsCopy * TranslateDXDYDZ */ //============================================================================= -GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject, - CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ) +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZ + (GEOM::GEOM_Object_ptr theObject, + CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ) { //Set a not done flag GetOperations()->SetNotDone(); @@ -168,8 +176,9 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZ (GEOM::GEOM_O aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) anObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (anObject.IsNull()) return aGEOMObject._retn(); //Perform the translation @@ -185,7 +194,8 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZ (GEOM::GEOM_O */ //============================================================================= GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZCopy - (GEOM::GEOM_Object_ptr theObject, CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ) + (GEOM::GEOM_Object_ptr theObject, + CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ) { GEOM::GEOM_Object_var aGEOMObject; @@ -195,12 +205,11 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZCopy if (theObject == NULL) return aGEOMObject._retn(); //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) aBasicObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (aBasicObject.IsNull()) return aGEOMObject._retn(); - - //Create the translated shape Handle(GEOM_Object) anObject = GetOperations()->TranslateDXDYDZCopy(aBasicObject, theDX, theDY, theDZ); @@ -232,16 +241,18 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVector return aGEOMObject._retn(); } - aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); + aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) anObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (anObject.IsNull()) return aGEOMObject._retn(); //Get the vector of translation + CORBA::String_var aVEntry = theVector->GetEntry(); Handle(GEOM_Object) aVector = - GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), theVector->GetEntry()); + GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVEntry); if (aVector.IsNull()) return aGEOMObject._retn(); //Perform the translation @@ -267,13 +278,15 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVectorCopy if (theObject == NULL || theVector == NULL) return aGEOMObject._retn(); //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) aBasicObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (aBasicObject.IsNull()) return aGEOMObject._retn(); //Get the vector of translation + CORBA::String_var aVEntry = theVector->GetEntry(); Handle(GEOM_Object) aVector = - GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), theVector->GetEntry()); + GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVEntry); if (aVector.IsNull()) return aGEOMObject._retn(); //Perform the translation @@ -284,6 +297,56 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVectorCopy return GetObject(anObject); } +//============================================================================= +/*! + * TranslateVectorDistance + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVectorDistance + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector, + CORBA::Double theDistance, + CORBA::Boolean theCopy) +{ + GEOM::GEOM_Object_var aGEOMObject; + GetOperations()->SetNotDone(); //Set a not done flag + + if (theObject == NULL || theVector == NULL) return aGEOMObject._retn(); + + //check if the object is a subshape + if (!theCopy && !theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + if (!theCopy) + aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); + + //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Get the vector of translation + CORBA::String_var aVecEntry = theVector->GetEntry(); + Handle(GEOM_Object) aVector = + GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVecEntry); + if (aVector.IsNull()) return aGEOMObject._retn(); + + //Perform the translation + if (theCopy) { + Handle(GEOM_Object) anObject = GetOperations()-> + TranslateVectorDistance(aBasicObject, aVector, theDistance, theCopy); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); + } + + GetOperations()->TranslateVectorDistance(aBasicObject, aVector, theDistance, theCopy); + return aGEOMObject._retn(); +} //============================================================================= /*! @@ -309,12 +372,15 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::Rotate (GEOM::GEOM_Object_ptr aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); //Get the object itself - Handle(GEOM_Object) anObject = GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + CORBA::String_var anEntry = theObject->GetEntry(); + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (anObject.IsNull()) return aGEOMObject._retn(); //Get the axis of revolution + CORBA::String_var anAEntry = theAxis->GetEntry(); Handle(GEOM_Object) anAxis = - GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), theAxis->GetEntry()); + GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), anAEntry); if (anAxis.IsNull()) return aGEOMObject._retn(); //Perform the rotation @@ -340,13 +406,15 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateCopy (GEOM::GEOM_Object if (theObject == NULL || theAxis == NULL) return aGEOMObject._retn(); //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) aBasicObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (aBasicObject.IsNull()) return aGEOMObject._retn(); //Get the axis of rotation + CORBA::String_var anAEntry = theAxis->GetEntry(); Handle(GEOM_Object) anAxis = - GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), theAxis->GetEntry()); + GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), anAEntry); if (anAxis.IsNull()) return aGEOMObject._retn(); //Perform the rotation @@ -375,19 +443,21 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPlane if (theObject == NULL || thePlane == NULL) return aGEOMObject._retn(); //check if the object is a subshape - if(!theObject->IsMainShape()) { + if (!theObject->IsMainShape()) { GetOperations()->SetErrorCode(SUBSHAPE_ERROR); return aGEOMObject._retn(); } //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) anObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (anObject.IsNull()) return aGEOMObject._retn(); //Get the plane + CORBA::String_var aPlnEntry = thePlane->GetEntry(); Handle(GEOM_Object) aPlane = - GetOperations()->GetEngine()->GetObject(thePlane->GetStudyID(), thePlane->GetEntry()); + GetOperations()->GetEngine()->GetObject(thePlane->GetStudyID(), aPlnEntry); if (aPlane.IsNull()) return aGEOMObject._retn(); //Perform the mirror @@ -413,13 +483,15 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPlaneCopy if (theObject == NULL || thePlane == NULL) return aGEOMObject._retn(); //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) aBasicObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (aBasicObject.IsNull()) return aGEOMObject._retn(); //Get the vector of translation + CORBA::String_var aPlnEntry = thePlane->GetEntry(); Handle(GEOM_Object) aPlane = - GetOperations()->GetEngine()->GetObject(thePlane->GetStudyID(), thePlane->GetEntry()); + GetOperations()->GetEngine()->GetObject(thePlane->GetStudyID(), aPlnEntry); if (aPlane.IsNull()) return aGEOMObject._retn(); //Perform the mirror @@ -453,13 +525,15 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorAxis } //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) anObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (anObject.IsNull()) return aGEOMObject._retn(); //Get the axis + CORBA::String_var anAEntry = theAxis->GetEntry(); Handle(GEOM_Object) aAxis = - GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), theAxis->GetEntry()); + GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), anAEntry); if (aAxis.IsNull()) return aGEOMObject._retn(); //Perform the mirror @@ -485,13 +559,15 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorAxisCopy if (theObject == NULL || theAxis == NULL) return aGEOMObject._retn(); //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) aBasicObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (aBasicObject.IsNull()) return aGEOMObject._retn(); //Get the vector of translation + CORBA::String_var anAEntry = theAxis->GetEntry(); Handle(GEOM_Object) aAxis = - GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), theAxis->GetEntry()); + GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), anAEntry); if (aAxis.IsNull()) return aGEOMObject._retn(); //Perform the mirror @@ -519,19 +595,21 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPoint if (theObject == NULL || thePoint == NULL) return aGEOMObject._retn(); //check if the object is a subshape - if(!theObject->IsMainShape()) { + if (!theObject->IsMainShape()) { GetOperations()->SetErrorCode(SUBSHAPE_ERROR); return aGEOMObject._retn(); } //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) anObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (anObject.IsNull()) return aGEOMObject._retn(); //Get the point + CORBA::String_var aPntEntry = thePoint->GetEntry(); Handle(GEOM_Object) aPoint = - GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), thePoint->GetEntry()); + GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry); if (aPoint.IsNull()) return aGEOMObject._retn(); //Perform the mirror @@ -557,13 +635,15 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPointCopy if (theObject == NULL || thePoint == NULL) return aGEOMObject._retn(); //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) aBasicObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (aBasicObject.IsNull()) return aGEOMObject._retn(); //Get the vector of translation + CORBA::String_var aPntEntry = thePoint->GetEntry(); Handle(GEOM_Object) aPoint = - GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), thePoint->GetEntry()); + GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry); if (aPoint.IsNull()) return aGEOMObject._retn(); //Perform the mirror @@ -592,15 +672,15 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShape if (theObject == NULL) return aGEOMObject._retn(); //check if the object is a subshape - if(!theObject->IsMainShape()) { + if (!theObject->IsMainShape()) { GetOperations()->SetErrorCode(SUBSHAPE_ERROR); return aGEOMObject._retn(); } - //Get the basic object + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) aBasicObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (aBasicObject.IsNull()) return aGEOMObject._retn(); //Create the offset shape @@ -626,8 +706,9 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShapeCopy if (theObject == NULL) return aGEOMObject._retn(); //Get the basic object + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) aBasicObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (aBasicObject.IsNull()) return aGEOMObject._retn(); //Create the offset shape @@ -647,30 +728,34 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShapeCopy GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShape (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr thePoint, - CORBA::Double theFactor) + CORBA::Double theFactor) { GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); //Set a not done flag GetOperations()->SetNotDone(); - if (thePoint == NULL || theObject == NULL) return aGEOMObject._retn(); + if (theObject->_is_nil()) return aGEOMObject._retn(); //check if the object is a subshape - if(!theObject->IsMainShape()) { + if (!theObject->IsMainShape()) { GetOperations()->SetErrorCode(SUBSHAPE_ERROR); return aGEOMObject._retn(); } //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) anObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (anObject.IsNull()) return aGEOMObject._retn(); //Get the point - Handle(GEOM_Object) aPoint = - GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), thePoint->GetEntry()); - if (aPoint.IsNull()) return aGEOMObject._retn(); + Handle(GEOM_Object) aPoint; + if (!thePoint->_is_nil()) { + CORBA::String_var aPntEntry = thePoint->GetEntry(); + aPoint = GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry); + if (aPoint.IsNull()) return aGEOMObject._retn(); + } //Perform the scale GetOperations()->ScaleShape(anObject, aPoint, theFactor); @@ -686,24 +771,28 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShape GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr thePoint, - CORBA::Double theFactor) + CORBA::Double theFactor) { GEOM::GEOM_Object_var aGEOMObject; //Set a not done flag GetOperations()->SetNotDone(); - if (thePoint == NULL || theObject == NULL) return aGEOMObject._retn(); + if (theObject->_is_nil()) return aGEOMObject._retn(); //Get the basic object + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) aBasicObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (aBasicObject.IsNull()) return aGEOMObject._retn(); //Get the point - Handle(GEOM_Object) aPoint = - GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), thePoint->GetEntry()); - if (aPoint.IsNull()) return aGEOMObject._retn(); + Handle(GEOM_Object) aPoint; + if (!thePoint->_is_nil()) { + CORBA::String_var aPntEntry = thePoint->GetEntry(); + aPoint = GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry); + if (aPoint.IsNull()) return aGEOMObject._retn(); + } //Perform the scale Handle(GEOM_Object) anObject = @@ -714,6 +803,94 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShapeCopy return GetObject(anObject); } +//============================================================================= +/*! + * ScaleShapeAlongAxes + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShapeAlongAxes + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint, + CORBA::Double theFactorX, + CORBA::Double theFactorY, + CORBA::Double theFactorZ) +{ + GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject->_is_nil()) return aGEOMObject._retn(); + + //check if the object is a subshape + if (!theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); + if (anObject.IsNull()) return aGEOMObject._retn(); + + //Get the point + Handle(GEOM_Object) aPoint; + if (!thePoint->_is_nil()) { + CORBA::String_var aPntEntry = thePoint->GetEntry(); + aPoint = GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry); + if (aPoint.IsNull()) return aGEOMObject._retn(); + } + + //Perform the scale + GetOperations()->ScaleShapeAlongAxes + (anObject, aPoint, theFactorX, theFactorY, theFactorZ, /*doCopy*/false); + + return aGEOMObject._retn(); +} + +//============================================================================= +/*! + * ScaleShapeAlongAxesCopy + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShapeAlongAxesCopy + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint, + CORBA::Double theFactorX, + CORBA::Double theFactorY, + CORBA::Double theFactorZ) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject->_is_nil()) return aGEOMObject._retn(); + + //Get the basic object + CORBA::String_var anEntry = theObject->GetEntry(); + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Get the point + Handle(GEOM_Object) aPoint; + if (!thePoint->_is_nil()) { + CORBA::String_var aPntEntry = thePoint->GetEntry(); + aPoint = GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), aPntEntry); + if (aPoint.IsNull()) return aGEOMObject._retn(); + } + + //Perform the scale + Handle(GEOM_Object) anObject = GetOperations()->ScaleShapeAlongAxes + (aBasicObject, aPoint, theFactorX, theFactorY, theFactorZ, /*doCopy*/true); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + //============================================================================= /*! * PositionShape @@ -733,26 +910,29 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::PositionShape return aGEOMObject._retn(); //check if the object is a subshape - if(!theObject->IsMainShape()) { + if (!theObject->IsMainShape()) { GetOperations()->SetErrorCode(SUBSHAPE_ERROR); return aGEOMObject._retn(); } //Get the basic object + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) anObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (anObject.IsNull()) return aGEOMObject._retn(); //Get the Start LCS (may be NULL for positioning from global LCS) Handle(GEOM_Object) aStartLCS = NULL; if (theStartLCS != NULL && !CORBA::is_nil(theStartLCS)) { - aStartLCS = GetOperations()->GetEngine()->GetObject(theStartLCS->GetStudyID(), theStartLCS->GetEntry()); + CORBA::String_var aStartLCSEntry = theStartLCS->GetEntry(); + aStartLCS = GetOperations()->GetEngine()->GetObject(theStartLCS->GetStudyID(), aStartLCSEntry); if (aStartLCS.IsNull()) return aGEOMObject._retn(); } //Get the End LCS + CORBA::String_var anEndLCSEntry = theEndLCS->GetEntry(); Handle(GEOM_Object) aEndLCS = - GetOperations()->GetEngine()->GetObject(theEndLCS->GetStudyID(), theEndLCS->GetEntry()); + GetOperations()->GetEngine()->GetObject(theEndLCS->GetStudyID(), anEndLCSEntry); if (aEndLCS.IsNull()) return aGEOMObject._retn(); //Perform the Position @@ -780,20 +960,23 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::PositionShapeCopy return aGEOMObject._retn(); //Get the basic object + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) aBasicObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (aBasicObject.IsNull()) return aGEOMObject._retn(); //Get the Start LCS (may be NULL for positioning from global LCS) Handle(GEOM_Object) aStartLCS = NULL; if (theStartLCS != NULL && !CORBA::is_nil(theStartLCS)) { - aStartLCS = GetOperations()->GetEngine()->GetObject(theStartLCS->GetStudyID(), theStartLCS->GetEntry()); + CORBA::String_var aStartLCSEntry = theStartLCS->GetEntry(); + aStartLCS = GetOperations()->GetEngine()->GetObject(theStartLCS->GetStudyID(), aStartLCSEntry); if (aStartLCS.IsNull()) return aGEOMObject._retn(); } //Get the End LCS + CORBA::String_var anEndLCSEntry = theEndLCS->GetEntry(); Handle(GEOM_Object) aEndLCS = - GetOperations()->GetEngine()->GetObject(theEndLCS->GetStudyID(), theEndLCS->GetEntry()); + GetOperations()->GetEngine()->GetObject(theEndLCS->GetStudyID(), anEndLCSEntry); if (aEndLCS.IsNull()) return aGEOMObject._retn(); //Perform the position @@ -823,13 +1006,15 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiTranslate1D if (theObject == NULL || theVector == NULL) return aGEOMObject._retn(); //Get the object itself - Handle(GEOM_Object) aBasicObject = GetOperations()->GetEngine()->GetObject - (theObject->GetStudyID(), theObject->GetEntry()); + CORBA::String_var anEntry = theObject->GetEntry(); + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (aBasicObject.IsNull()) return aGEOMObject._retn(); //Get the vector of translation - Handle(GEOM_Object) aVector = GetOperations()->GetEngine()->GetObject - (theVector->GetStudyID(), theVector->GetEntry()); + CORBA::String_var aVecEntry = theVector->GetEntry(); + Handle(GEOM_Object) aVector = + GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVecEntry); if (aVector.IsNull()) return aGEOMObject._retn(); //Perform the translation @@ -861,18 +1046,21 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiTranslate2D (GEOM::GEOM_ if (theObject == NULL || theVector1 == NULL || theVector2 == NULL) return aGEOMObject._retn(); //Get the object itself - Handle(GEOM_Object) aBasicObject = GetOperations()->GetEngine()->GetObject - (theObject->GetStudyID(), theObject->GetEntry()); + CORBA::String_var anEntry = theObject->GetEntry(); + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (aBasicObject.IsNull()) return aGEOMObject._retn(); //Get the vector1 of translation - Handle(GEOM_Object) aVector1 = GetOperations()->GetEngine()->GetObject - (theVector1->GetStudyID(), theVector1->GetEntry()); + CORBA::String_var aVec1Entry = theVector1->GetEntry(); + Handle(GEOM_Object) aVector1 = + GetOperations()->GetEngine()->GetObject(theVector1->GetStudyID(), aVec1Entry); if (aVector1.IsNull()) return aGEOMObject._retn(); //Get the vector2 of translation - Handle(GEOM_Object) aVector2 = GetOperations()->GetEngine()->GetObject - (theVector2->GetStudyID(), theVector2->GetEntry()); + CORBA::String_var aVec2Entry = theVector2->GetEntry(); + Handle(GEOM_Object) aVector2 = + GetOperations()->GetEngine()->GetObject(theVector2->GetStudyID(), aVec2Entry); if (aVector2.IsNull()) return aGEOMObject._retn(); //Perform the translation @@ -900,13 +1088,15 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiRotate1D (GEOM::GEOM_Obj if (theObject == NULL || theVector == NULL) return aGEOMObject._retn(); //Get the object itself - Handle(GEOM_Object) aBasicObject = GetOperations()->GetEngine()->GetObject - (theObject->GetStudyID(), theObject->GetEntry()); + CORBA::String_var anEntry = theObject->GetEntry(); + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (aBasicObject.IsNull()) return aGEOMObject._retn(); //Get the a directon of rotation - Handle(GEOM_Object) aVector = GetOperations()->GetEngine()->GetObject - (theVector->GetStudyID(), theVector->GetEntry()); + CORBA::String_var aVecEntry = theVector->GetEntry(); + Handle(GEOM_Object) aVector = + GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVecEntry); if (aVector.IsNull()) return aGEOMObject._retn(); //Perform the rotation @@ -936,13 +1126,15 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiRotate2D (GEOM::GEOM_Obj if (theObject == NULL || theVector == NULL) return aGEOMObject._retn(); //Get the object itself - Handle(GEOM_Object) aBasicObject = GetOperations()->GetEngine()->GetObject - (theObject->GetStudyID(), theObject->GetEntry()); + CORBA::String_var anEntry = theObject->GetEntry(); + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (aBasicObject.IsNull()) return aGEOMObject._retn(); //Get the a directon of rotation - Handle(GEOM_Object) aVector = GetOperations()->GetEngine()->GetObject - (theVector->GetStudyID(), theVector->GetEntry()); + CORBA::String_var aVecEntry = theVector->GetEntry(); + Handle(GEOM_Object) aVector = + GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), aVecEntry); if (aVector.IsNull()) return aGEOMObject._retn(); //Perform the rotation @@ -968,10 +1160,11 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePoints GetOperations()->SetNotDone(); GEOM::GEOM_Object_var aGEOMObject; - if (theCentPoint == NULL || thePoint1 == NULL || thePoint2 == NULL || theObject == NULL) return aGEOMObject._retn(); + if (theCentPoint == NULL || thePoint1 == NULL || thePoint2 == NULL || theObject == NULL) + return aGEOMObject._retn(); //check if the object is a subshape - if(!theObject->IsMainShape()) { + if (!theObject->IsMainShape()) { GetOperations()->SetErrorCode(SUBSHAPE_ERROR); return aGEOMObject._retn(); } @@ -979,23 +1172,27 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePoints aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) anObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (anObject.IsNull()) return aGEOMObject._retn(); //Get the central point of rotation + CORBA::String_var aCPEntry = theCentPoint->GetEntry(); Handle(GEOM_Object) aCentPoint = - GetOperations()->GetEngine()->GetObject(theCentPoint->GetStudyID(), theCentPoint->GetEntry()); + GetOperations()->GetEngine()->GetObject(theCentPoint->GetStudyID(), aCPEntry); if (aCentPoint.IsNull()) return aGEOMObject._retn(); //Get the first point + CORBA::String_var aP1Entry = thePoint1->GetEntry(); Handle(GEOM_Object) aPoint1 = - GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), thePoint1->GetEntry()); + GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), aP1Entry); if (aPoint1.IsNull()) return aGEOMObject._retn(); //Get the second point + CORBA::String_var aP2Entry = thePoint2->GetEntry(); Handle(GEOM_Object) aPoint2 = - GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), thePoint2->GetEntry()); + GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), aP2Entry); if (aPoint2.IsNull()) return aGEOMObject._retn(); //Perform the translation @@ -1020,26 +1217,31 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePointsCopy //Set a not done flag GetOperations()->SetNotDone(); - if (theCentPoint == NULL || thePoint1 == NULL || thePoint2 == NULL || theObject == NULL) return aGEOMObject._retn(); + if (theCentPoint == NULL || thePoint1 == NULL || thePoint2 == NULL || theObject == NULL) + return aGEOMObject._retn(); //Get the object itself + CORBA::String_var anEntry = theObject->GetEntry(); Handle(GEOM_Object) aBasicObject = - GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), anEntry); if (aBasicObject.IsNull()) return aGEOMObject._retn(); //Get the central point of rotation + CORBA::String_var aCPEntry = theCentPoint->GetEntry(); Handle(GEOM_Object) aCentPoint = - GetOperations()->GetEngine()->GetObject(theCentPoint->GetStudyID(), theCentPoint->GetEntry()); + GetOperations()->GetEngine()->GetObject(theCentPoint->GetStudyID(), aCPEntry); if (aCentPoint.IsNull()) return aGEOMObject._retn(); //Get the first point + CORBA::String_var aP1Entry = thePoint1->GetEntry(); Handle(GEOM_Object) aPoint1 = - GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), thePoint1->GetEntry()); + GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), aP1Entry); if (aPoint1.IsNull()) return aGEOMObject._retn(); //Get the second point + CORBA::String_var aP2Entry = thePoint2->GetEntry(); Handle(GEOM_Object) aPoint2 = - GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), thePoint2->GetEntry()); + GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), aP2Entry); if (aPoint2.IsNull()) return aGEOMObject._retn(); //Perform the rotation @@ -1050,4 +1252,3 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePointsCopy return GetObject(anObject); } - diff --git a/src/GEOM_I/GEOM_ITransformOperations_i.hh b/src/GEOM_I/GEOM_ITransformOperations_i.hh index 3f49b17b7..848e5077b 100644 --- a/src/GEOM_I/GEOM_ITransformOperations_i.hh +++ b/src/GEOM_I/GEOM_ITransformOperations_i.hh @@ -60,6 +60,11 @@ class GEOM_I_EXPORT GEOM_ITransformOperations_i : GEOM::GEOM_Object_ptr TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr theVector); + GEOM::GEOM_Object_ptr TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector, + CORBA::Double theDistance, + CORBA::Boolean theCopy); + GEOM::GEOM_Object_ptr MultiTranslate1D (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr theVector, CORBA::Double theStep, CORBA::Long theNbTimes); GEOM::GEOM_Object_ptr MultiTranslate2D (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr theVector1, CORBA::Double theStep1, CORBA::Long theNbTimes1, @@ -72,7 +77,6 @@ class GEOM_I_EXPORT GEOM_ITransformOperations_i : GEOM::GEOM_Object_ptr MultiRotate1D (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr theVector, CORBA::Long theNbTimes); - GEOM::GEOM_Object_ptr MultiRotate2D (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr theVector, @@ -117,6 +121,18 @@ class GEOM_I_EXPORT GEOM_ITransformOperations_i : GEOM::GEOM_Object_ptr thePoint, CORBA::Double theFactor); + GEOM::GEOM_Object_ptr ScaleShapeAlongAxes (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint, + CORBA::Double theFactorX, + CORBA::Double theFactorY, + CORBA::Double theFactorZ); + + GEOM::GEOM_Object_ptr ScaleShapeAlongAxesCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint, + CORBA::Double theFactorX, + CORBA::Double theFactorY, + CORBA::Double theFactorZ); + GEOM::GEOM_Object_ptr PositionShape (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr theStartLCS, GEOM::GEOM_Object_ptr theEndLCS); diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc index 387c3b0d4..461ef2d96 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.cc +++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc @@ -813,9 +813,7 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphere (CORBA::Double theX, MESSAGE("GEOM_Superv_i::MakeSphepe"); getBasicOp(); get3DPrimOp(); - GEOM::GEOM_Object_var o = myBasicOp->MakePointXYZ(theX, theY, theZ); - GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(o, theRadius); - o->Destroy(); + GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(myBasicOp->MakePointXYZ(theX, theY, theZ), theRadius); endService( " GEOM_Superv_i::MakeSphepe" ); return anObj; } @@ -1347,6 +1345,23 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorCopy (GEOM::GEOM_Object_ptr return anObj; } +//============================================================================= +// TranslateVectorDistance: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector, + CORBA::Double theDistance, + CORBA::Boolean theCopy) +{ + beginService( " GEOM_Superv_i::TranslateVectorDistance" ); + MESSAGE("GEOM_Superv_i::TranslateVectorDistance"); + getTransfOp(); + GEOM::GEOM_Object_ptr anObj = myTransfOp->TranslateVectorDistance(theObject, + theVector, theDistance, theCopy); + endService( " GEOM_Superv_i::TranslateVectorDistance" ); + return anObj; +} + //============================================================================= // MultiTranslate1D: //============================================================================= @@ -1619,6 +1634,42 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeCopy (GEOM::GEOM_Object_ptr theOb return anObj; } +//============================================================================= +// ScaleShapeAlongAxes: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeAlongAxes (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint, + CORBA::Double theFactorX, + CORBA::Double theFactorY, + CORBA::Double theFactorZ) +{ + beginService( " GEOM_Superv_i::ScaleShapeAlongAxes" ); + MESSAGE("GEOM_Superv_i::ScaleShapeAlongAxes"); + getTransfOp(); + GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeAlongAxes + (theObject, thePoint, theFactorX, theFactorY, theFactorZ); + endService( " GEOM_Superv_i::ScaleShapeAlongAxes" ); + return anObj; +} + +//============================================================================= +// ScaleShapeAlongAxesCopy: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeAlongAxesCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint, + CORBA::Double theFactorX, + CORBA::Double theFactorY, + CORBA::Double theFactorZ) +{ + beginService( " GEOM_Superv_i::ScaleShapeAlongAxesCopy" ); + MESSAGE("GEOM_Superv_i::ScaleShapeAlongAxesCopy"); + getTransfOp(); + GEOM::GEOM_Object_ptr anObj = myTransfOp->ScaleShapeAlongAxesCopy + (theObject, thePoint, theFactorX, theFactorY, theFactorZ); + endService( " GEOM_Superv_i::ScaleShapeAlongAxesCopy" ); + return anObj; +} + //============================================================================= // PositionShape: //============================================================================= @@ -1875,6 +1926,7 @@ CORBA::Long GEOM_Superv_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape) return aRes; } + //============================================================================= // ChangeOrientation: //============================================================================= @@ -1889,6 +1941,46 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr th } +//============================================================================= +// GetShapesOnShape: +//============================================================================= +GEOM::GEOM_List_ptr GEOM_Superv_i::GetShapesOnShape + (GEOM::GEOM_Object_ptr theCheckShape, + GEOM::GEOM_Object_ptr theShape, + CORBA::Short theShapeType, + GEOM::shape_state theState) +{ + beginService( " GEOM_Superv_i::GetShapesOnShape" ); + MESSAGE("GEOM_Superv_i::GetShapesOnShape"); + getShapesOp(); + GEOM::ListOfGO* aList = + myShapesOp->GetShapesOnShape(theCheckShape, theShape, theShapeType, theState); + GEOM_List_i* aListPtr = new GEOM_List_i(*(aList)); + MESSAGE(" List of "<GetList().length()<<" element(s)"); + endService( " GEOM_Superv_i::GetShapesOnShape" ); + return aListPtr->_this(); +} + + +//============================================================================= +// GetShapesOnShapeAsCompound: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::GetShapesOnShapeAsCompound + (GEOM::GEOM_Object_ptr theCheckShape, + GEOM::GEOM_Object_ptr theShape, + CORBA::Short theShapeType, + GEOM::shape_state theState) +{ + beginService( " GEOM_Superv_i::GetShapesOnShapeAsCompound" ); + MESSAGE("GEOM_Superv_i::GetShapesOnShapeAsCompound"); + getShapesOp(); + GEOM::GEOM_Object_ptr anObj = + myShapesOp->GetShapesOnShapeAsCompound(theCheckShape, theShape, theShapeType, theState); + endService( " GEOM_Superv_i::GetShapesOnShapeAsCompound" ); + return anObj; +} + + //=============================== BlocksOperations ============================ //============================================================================= // MakeQuad4Vertices: diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.hh b/src/GEOM_I_Superv/GEOM_Superv_i.hh index 3cb1ffd25..bdeadb12d 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.hh +++ b/src/GEOM_I_Superv/GEOM_Superv_i.hh @@ -314,6 +314,10 @@ public: GEOM::GEOM_Object_ptr theVector); GEOM::GEOM_Object_ptr TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr theVector); + GEOM::GEOM_Object_ptr TranslateVectorDistance (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector, + CORBA::Double theDistance, + CORBA::Boolean theCopy); GEOM::GEOM_Object_ptr MultiTranslate1D (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr theVector, CORBA::Double theStep, @@ -373,6 +377,16 @@ public: GEOM::GEOM_Object_ptr ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr thePoint, CORBA::Double theFactor); + GEOM::GEOM_Object_ptr ScaleShapeAlongAxes (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint, + CORBA::Double theFactorX, + CORBA::Double theFactorY, + CORBA::Double theFactorZ); + GEOM::GEOM_Object_ptr ScaleShapeAlongAxesCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint, + CORBA::Double theFactorX, + CORBA::Double theFactorY, + CORBA::Double theFactorZ); GEOM::GEOM_Object_ptr PositionShape (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr theStartLCS, GEOM::GEOM_Object_ptr theEndLCS); @@ -410,6 +424,17 @@ public: CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape); GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape); + GEOM::GEOM_List_ptr GetShapesOnShape (GEOM::GEOM_Object_ptr theCheckShape, + GEOM::GEOM_Object_ptr theShape, + CORBA::Short theShapeType, + GEOM::shape_state theState); + GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound + (GEOM::GEOM_Object_ptr theCheckShape, + GEOM::GEOM_Object_ptr theShape, + CORBA::Short theShapeType, + GEOM::shape_state theState); + + //-----------------------------------------------------------// // BlocksOperations // //-----------------------------------------------------------// diff --git a/src/GEOM_SWIG/GEOM_Spanner.py b/src/GEOM_SWIG/GEOM_Spanner.py index 2e410ca9c..b438305fd 100644 --- a/src/GEOM_SWIG/GEOM_Spanner.py +++ b/src/GEOM_SWIG/GEOM_Spanner.py @@ -16,7 +16,7 @@ # 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # # # @@ -25,6 +25,11 @@ # Module : GEOM # $Header$ +# ! Please, if you edit this example file, update also +# ! GEOM_SRC/doc/salome/gui/GEOM/input/tui_test_spanner.doc +# ! as some sequences of symbols from this example are used during +# ! documentation generation to identify certain places of this file + ############# MakeSpanner ############# def MakeSpanner (geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None): @@ -400,8 +405,8 @@ def MakeSpanner (geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None): print algoReg.GetName() print algoReg.GetId() algoReg.SetName("Regular_1D") - - + + hypNbSeg3 = algoReg.NumberOfSegments(3) print hypNbSeg3.GetName() print hypNbSeg3.GetId() @@ -419,7 +424,7 @@ def MakeSpanner (geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None): algoQuad.SetName("Quadrangle_2D") print "-------------------------- add hypothesis to the Middle Block" - + print "-------------------------- LocalLength" algoRegMb = mesh.Segment(BlockMh) hypLen1 = algoRegMb.LocalLength(10) @@ -436,14 +441,14 @@ def MakeSpanner (geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None): print hypPropE1.GetId() smesh.SetName(hypPropE1, "Propagation hypothesis") smesh.SetName(algoRegE1.GetSubMesh(), "SubMesh Edge 1 of Top Face") - + algoRegE2 = mesh.Segment(Edge2) hypPropE2 = algoRegE2.Propagation() print hypPropE2.GetName() print hypPropE2.GetId() smesh.SetName(hypPropE2, "Propagation hypothesis") smesh.SetName(algoRegE2.GetSubMesh(), "SubMesh Edge 2 of Top Face") - + print "-------------------------- compute the mesh" mesh.Compute() diff --git a/src/GEOM_SWIG/GEOM_TestAll.py b/src/GEOM_SWIG/GEOM_TestAll.py index 4c2d3675a..46fb32260 100644 --- a/src/GEOM_SWIG/GEOM_TestAll.py +++ b/src/GEOM_SWIG/GEOM_TestAll.py @@ -1,7 +1,6 @@ # GEOM GEOM_SWIG : binding of C++ omplementaion with Python # # Copyright (C) 2003 CEA - # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,7 +16,7 @@ # 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # # # File : GEOM_usinggeom.py @@ -25,6 +24,10 @@ # Module : GEOM # $Header$ +# ! Please, if you edit this example file, update also +# ! GEOM_SRC/doc/salome/gui/GEOM/input/tui_test_all.doc +# ! as some sequences of symbols from this example are used during +# ! documentation generation to identify certain places of this file def TestAll (geompy, math): @@ -76,13 +79,14 @@ def TestAll (geompy, math): vxyz = geompy.MakeVectorDXDYDZ(100., 100., 100.) #(3 Doubles)->GEOM_Object_ptr #Create local coordinate systems - cs1 = geompy.MakeMarker(50,50,50, 1,0,0, 0,1,0) - cs2 = geompy.MakeMarker(70,80,10, 1,0,1, 1,1,0) + cs1 = geompy.MakeMarker(50,50,50, 1,0,0, 0,1,0) #(9 Doubles)->GEOM_Object_ptr + cs2 = geompy.MakeMarker(70,80,10, 1,0,1, 1,1,0) #(9 Doubles)->GEOM_Object_ptr + cs3 = geompy.MakeMarkerPntTwoVec(pz, vxy, vz) #(3 GEOM_Object_ptr)->GEOM_Object_ptr #Create base geometry 2D Line = geompy.MakeLineTwoPnt(p0, pxyz) #(2 GEOM_Object_ptr)->GEOM_Object_ptr Line1 = geompy.MakeLine(pz, vxy) #(2 GEOM_Object_ptr)->GEOM_Object_ptr - Line2 = geompy.MakeLineTwoPnt(pxyz, pz) #(2 GEOM_Object_ptr)->GEOM_Object_ptr + Line2 = geompy.MakeLineTwoPnt(pxyz, pz) #(2 GEOM_Object_ptr)->GEOM_Object_ptr Plane = geompy.MakePlane(pz, vxyz, trimsize) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr Plane1 = geompy.MakePlaneThreePnt(px, pz, p200, trimsize) #(4 Doubles)->GEOM_Object_ptr @@ -102,7 +106,10 @@ def TestAll (geompy, math): p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25) #(GEOM_Object_ptr, Double)->GEOM_Object_ptr #Test point on lines intersection - pLine = geompy.MakeVertexOnLinesIntersection( Line1, Line2 ) + p_on_l1l2 = geompy.MakeVertexOnLinesIntersection(Line1, Line2) #(2 GEOM_Object_ptr)->GEOM_Object_ptr + + #Test tangent on curve creation + tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7) #(GEOM_Object_ptr, Double)->GEOM_Object_ptr #Create base geometry 3D Box = geompy.MakeBoxTwoPnt(p0, p200) #(2 GEOM_Object_ptr)->GEOM_Object_ptr @@ -148,14 +155,17 @@ def TestAll (geompy, math): i = i + 1 Compound = geompy.MakeCompound(ShapeListCompound) #(List of GEOM_Object_ptr)->GEOM_Object_ptr + #Test point on surface creation + p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8) #(GEOM_Object_ptr, Double, Double)->GEOM_Object_ptr + # Test plane from existing face creation Plane2 = geompy.MakePlaneFace(Face, trimsize) #(GEOM_Object_ptr, Double)->GEOM_Object_ptr #ShapeList for Sewing S = geompy.MakeRotation(Face, vxy, angle1) - + #Test Line on Faces Intersection - Line3 = geompy.MakeLineTwoFaces( prism1_faces[0], prism1_faces[1]) #(2 GEOM_Object_ptr)->GEOM_Object_ptr + Line3 = geompy.MakeLineTwoFaces(prism1_faces[0], prism1_faces[1]) #(2 GEOM_Object_ptr)->GEOM_Object_ptr #Create advanced objects Copy = geompy.MakeCopy(Box) #(GEOM_Object_ptr)->GEOM_Object_ptr @@ -171,14 +181,24 @@ def TestAll (geompy, math): #Transform objects Translation = geompy.MakeTranslationTwoPoints(Box, px, pz) #(3 GEOM_Object_ptr)->GEOM_Object_ptr TranslVect = geompy.MakeTranslationVector(Box, vxyz) #(2 GEOM_Object_ptr)->GEOM_Object_ptr + TranslVectD = geompy.MakeTranslationVectorDistance(Box, vxyz, 50.0) #(2 GEOM_Object_ptr)->GEOM_Object_ptr Rotation = geompy.MakeRotation(Box, vz, angle1) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr RotatPnt = geompy.MakeRotationThreePoints(Box, px, py, pz) #(4 GEOM_Object_ptr)->GEOM_Object_ptr - Scale = geompy.MakeScaleTransform(Box, p0, factor) # - Mirror = geompy.MakeMirrorByPlane(Box, Plane) #(2 GEOM_Object_ptr)->GEOM_Object_ptr - MirrorAxis = geompy.MakeMirrorByAxis(Box, Line1) # - MirrorPnt = geompy.MakeMirrorByPoint(Box, p200) # - Position = geompy.MakePosition(Box, cs1, cs2) #(3 GEOM_Object_ptr)->GEOM_Object_ptr - Offset = geompy.MakeOffset(Box, 10.) #(GEOM_Object_ptr, Double)->GEOM_Object_ptr + + #Scale by factor relatively given point + Scale1 = geompy.MakeScaleTransform(Box, pxyz, factor) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr + #Scale by factor relatively the origin of global CS + Scale2 = geompy.MakeScaleTransform(Box, None, factor) # + #Scale along axes of global CS by different factors. Scale relatively given point + Scale3 = geompy.MakeScaleAlongAxes(Box, pxyz, 1.5, 0.5, 3) #(2 GEOM_Object_ptr, 3 Doubles)->GEOM_Object_ptr + #Scale along axes of global CS by different factors. Scale relatively the origin of global CS + Scale4 = geompy.MakeScaleAlongAxes(Box, None, 1.5, 0.5, 3) # + + Mirror = geompy.MakeMirrorByPlane(Box, Plane) #(2 GEOM_Object_ptr)->GEOM_Object_ptr + MirrorAxis = geompy.MakeMirrorByAxis(Box, Line1) # + MirrorPnt = geompy.MakeMirrorByPoint(Box, p200) # + Position = geompy.MakePosition(Box, cs1, cs2) #(3 GEOM_Object_ptr)->GEOM_Object_ptr + Offset = geompy.MakeOffset(Box, 10.) #(GEOM_Object_ptr, Double)->GEOM_Object_ptr Orientation = geompy.ChangeOrientation(Box) #IDList for Fillet/Chamfer @@ -217,6 +237,8 @@ def TestAll (geompy, math): IDlist_e) #(GEOM_Object_ptr, 2 Doubles, ListOfLong)->GEOM_Object_ptr Chamfer4 = geompy.MakeChamferFacesAD(Prism, d1, 20. * math.pi / 180., IDlist_f) #(GEOM_Object_ptr, 2 Doubles, ListOfLong)->GEOM_Object_ptr + #End of Local operations + #Create Patterns MultiTrans1D = geompy.MakeMultiTranslation1D(Fillet, vz, step1, nbtimes1) MultiTrans2D = geompy.MakeMultiTranslation2D(Fillet, vz, step1, nbtimes1, vy, step2, nbtimes2) @@ -228,6 +250,9 @@ def TestAll (geompy, math): CDG = geompy.MakeCDG(Prism) #(GEOM_Object_ptr)->GEOM_Object_ptr Archimede = geompy.Archimede(Box, weight, waterdensity, meshingdeflection) #(GEOM_Object_ptr, 3 Doubles)->GEOM_Object_ptr + mindist = geompy.MinDistanceComponents(TranslVect, Mirror) #(2 GEOM_Object_ptr)->4 Doubles + print "Minumal distance between TranslVect and Mirror is", mindist[0], + print "by components:", mindist[1], ",", mindist[2], ",", mindist[3] CheckShape = geompy.CheckShape(Prism) #(GEOM_Object_ptr)->Boolean print "CheckShape(Prism) = ", CheckShape @@ -236,14 +261,12 @@ def TestAll (geompy, math): Partition1 = geompy.MakeHalfPartition(Box, Plane) #(2 GEOM_Object_ptr)->GEOM_Object_ptr #Add In Study - id_p0 = geompy.addToStudy(p0, "Vertex 0") id_px = geompy.addToStudy(px, "Vertex X") id_py = geompy.addToStudy(py, "Vertex Y") id_pz = geompy.addToStudy(pz, "Vertex Z") id_pxyz = geompy.addToStudy(pxyz, "Vertex XYZ") id_p200 = geompy.addToStudy(p200, "Vertex 200") - id_pLine = geompy.addToStudy(pLine, "Vertex on Lines Intersection") id_vx = geompy.addToStudy(vx, "Vector X") id_vy = geompy.addToStudy(vy, "Vector Y") @@ -253,6 +276,7 @@ def TestAll (geompy, math): id_cs1 = geompy.addToStudy(cs1, "CS 50,50,50, 1,0,0, 0,1,0") id_cs2 = geompy.addToStudy(cs2, "CS 70,80,10, 1,0,1, 1,1,0") + id_cs3 = geompy.addToStudy(cs3, "CS: pz, vxy, vz") id_Line = geompy.addToStudy(Line, "Line") id_Line1 = geompy.addToStudy(Line1, "Line by point and vector") @@ -270,7 +294,10 @@ def TestAll (geompy, math): id_Interpol = geompy.addToStudy(Interpol, "Interpol") id_Sketcher = geompy.addToStudy(Sketcher, "Sketcher") - id_p_on_arc = geompy.addToStudy(p_on_arc, "Vertex on Arc") + id_p_on_arc = geompy.addToStudy(p_on_arc, "Vertex on Arc (0.25)") + id_p_on_l1l2 = geompy.addToStudy(p_on_l1l2, "Vertex on Lines Intersection") + + id_tan_on_arc = geompy.addToStudy(tan_on_arc, "Tangent on Arc (0.7)") id_Box = geompy.addToStudy(Box, "Box") id_Box1 = geompy.addToStudy(Box1, "Box 10x20x30") @@ -297,6 +324,8 @@ def TestAll (geompy, math): id_Face2 = geompy.addToStudy(Face2, "Face from Sketcher") id_Shell = geompy.addToStudy(Shell, "Shell") + id_p_on_face = geompy.addToStudy(p_on_face, "Vertex on Face (0.1, 0.8)") + id_Prism1 = geompy.addToStudy(Prism1, "Prism by Two Pnt") id_Shell1 = geompy.addToStudy(Shell1, "Shell from Prism1 faces") id_Solid = geompy.addToStudy(Solid, "Solid") @@ -315,9 +344,13 @@ def TestAll (geompy, math): id_Translation = geompy.addToStudy(Translation, "Translation") id_TranslVect = geompy.addToStudy(TranslVect , "Translation along vector") + id_TranslVectD = geompy.addToStudy(TranslVectD, "Translation along vector with defined distance") id_Rotation = geompy.addToStudy(Rotation, "Rotation") id_RotatPnt = geompy.addToStudy(RotatPnt, "Rotation by three points") - id_Scale = geompy.addToStudy(Scale, "Scale") + id_Scale1 = geompy.addToStudy(Scale1, "Scale1") + id_Scale2 = geompy.addToStudy(Scale2, "Scale2") + id_Scale3 = geompy.addToStudy(Scale3, "Scale3") + id_Scale4 = geompy.addToStudy(Scale4, "Scale4") id_Mirror = geompy.addToStudy(Mirror, "Mirror by Plane") id_MirrorAxis = geompy.addToStudy(MirrorAxis, "Mirror by Axis") id_MirrorPnt = geompy.addToStudy(MirrorPnt, "Mirror by Point") @@ -345,20 +378,40 @@ def TestAll (geompy, math): id_Partition1 = geompy.addToStudy(Partition1, "Half Partition") #Decompose objects + + # SubShape SubFace = geompy.SubShape(Box, geompy.ShapeType["FACE"], [2]) name = geompy.SubShapeName(SubFace, Box) id_SubFace = geompy.addToStudyInFather(Box, SubFace, name) + # SubShapeSorted SubFaceS = geompy.SubShapeSorted(Box, geompy.ShapeType["FACE"], [5]) nameS = geompy.SubShapeName(SubFaceS, Box) id_SubFace = geompy.addToStudyInFather(Box, SubFaceS, nameS) + # SubShapeAll SubEdgeList = geompy.SubShapeAll(SubFace, geompy.ShapeType["EDGE"]) i=0 for SubEdge in SubEdgeList : name = geompy.SubShapeName(SubEdge, SubFace) id_SubEdge = geompy.addToStudyInFather(SubFace, SubEdge, name) - #------------------- + # SubShapeAllIDs + SubEdgeIDsList = geompy.SubShapeAllIDs(SubFace, geompy.ShapeType["EDGE"]) + print "IDs of edges of SubFace:", SubEdgeIDsList, "(unsorted)" + group = geompy.CreateGroup(SubFace, geompy.ShapeType["EDGE"]) + geompy.UnionIDs(group, SubEdgeIDsList) + geompy.addToStudyInFather(SubFace, group, "Group of all edges") + + # SubShapeAllSortedIDs + SubEdgeIDsList = geompy.SubShapeAllSortedIDs(SubFace, geompy.ShapeType["EDGE"]) + print "IDs of edges of SubFace:", SubEdgeIDsList, "(sorted)" + + # GetSubShape and GetSubShapeID + for ind in SubEdgeIDsList: + edge = geompy.GetSubShape(SubFace, [ind]) + ind_e = geompy.GetSubShapeID(SubFace, edge) + if ind_e != ind: + print "Error in GetSubShape or GetSubShapeID" print "DONE" diff --git a/src/GEOM_SWIG/GEOM_TestMeasures.py b/src/GEOM_SWIG/GEOM_TestMeasures.py index d552abf06..3cb4e9c3c 100644 --- a/src/GEOM_SWIG/GEOM_TestMeasures.py +++ b/src/GEOM_SWIG/GEOM_TestMeasures.py @@ -152,6 +152,13 @@ def TestMeasureOperations (geompy, math): if math.fabs(Angle - 45.0) > 1e-05: print " Error: returned angle is", Angle, "while must be 45.0" + Angle = geompy.GetAngleRadians(OX, OXY) + + print "\nAngle between OX and OXY in radians = ", Angle + if math.fabs(Angle - math.pi/4) > 1e-05: + print " Error: returned angle is", Angle, "while must be pi/4" + pass + # not in one plane OXY_shift = geompy.MakeTranslation(OXY,10,-10,20) Angle = geompy.GetAngle(OX, OXY_shift) diff --git a/src/GEOM_SWIG/GEOM_TestOthers.py b/src/GEOM_SWIG/GEOM_TestOthers.py index 3bf25cf75..d3442252f 100644 --- a/src/GEOM_SWIG/GEOM_TestOthers.py +++ b/src/GEOM_SWIG/GEOM_TestOthers.py @@ -16,7 +16,7 @@ # 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # # # File : GEOM_TestOthers.py @@ -24,6 +24,11 @@ # Module : GEOM # $Header$ +# ! Please, if you edit this example file, update also +# ! GEOM_SRC/doc/salome/gui/GEOM/input/tui_test_others.doc +# ! as some sequences of symbols from this example are used during +# ! documentation generation to identify certain places of this file + import os def TestExportImport (geompy, shape): @@ -94,7 +99,11 @@ def TestExportImport (geompy, shape): def TestOtherOperations (geompy, math): - # MakeFaces + # prepare data for further operations + vx = geompy.MakeVectorDXDYDZ( 1, 0, 0) + vy = geompy.MakeVectorDXDYDZ( 0, 1, 0) + vz = geompy.MakeVectorDXDYDZ( 0, 0, 1) + p11 = geompy.MakeVertex( 0, 0, 0) p12 = geompy.MakeVertex(30, 0, 0) p13 = geompy.MakeVertex(30, 30, 0) @@ -123,6 +132,7 @@ def TestOtherOperations (geompy, math): id_w2 = geompy.addToStudy(w2, "Inside Wire") id_w3 = geompy.addToStudy(w3, "Inside Wire, translated along OZ") + # MakeFaces f12 = geompy.MakeFaces([w1, w2], 0) id_f12 = geompy.addToStudy(f12, "MakeFaces WO + WI") @@ -232,6 +242,10 @@ def TestOtherOperations (geompy, math): else: print "The Box is VALID" + # GetSame + Cone_ss = geompy.GetSame(Compound1, Cone) + id_Cone_ss = geompy.addToStudyInFather(Compound1, Cone_ss, "Cone subshape") + # test geometrical groups # CreateGroup @@ -269,6 +283,7 @@ def TestOtherOperations (geompy, math): for ObjectID in GetObjectIDs: print " ", ObjectID + # GetMainShape BoxCopy = geompy.GetMainShape(CreateGroup) # DifferenceIDs @@ -289,7 +304,8 @@ def TestOtherOperations (geompy, math): # ----------------------------------------------------------------------------- # enumeration ShapeTypeString as a dictionary # ----------------------------------------------------------------------------- - ShapeTypeString = {'0':"COMPOUND", '1':"COMPSOLID", '2':"SOLID", '3':"SHELL", '4':"FACE", '5':"WIRE", '6':"EDGE", '7':"VERTEX", '8':"SHAPE"} + ShapeTypeString = {'0':"COMPOUND", '1':"COMPSOLID", '2':"SOLID", '3':"SHELL", + '4':"FACE", '5':"WIRE", '6':"EDGE", '7':"VERTEX", '8':"SHAPE"} GroupType = geompy.GetType(CreateGroup) print "Type of elements of the created group is ", ShapeTypeString[`GroupType`] @@ -303,66 +319,67 @@ def TestOtherOperations (geompy, math): id_s0 = geompy.addToStudy(s0, "s0") v_0pp = geompy.MakeVectorDXDYDZ( 0, 1, 1) - v_0np = geompy.MakeVectorDXDYDZ( 0, -1, 1) - v_p0p = geompy.MakeVectorDXDYDZ( 1, 0, 1) - v_n0p = geompy.MakeVectorDXDYDZ(-1, 0, 1) - v_pp0 = geompy.MakeVectorDXDYDZ( 1, 1, 0) - v_np0 = geompy.MakeVectorDXDYDZ(-1, 1, 0) + #v_0np = geompy.MakeVectorDXDYDZ( 0, -1, 1) + #v_p0p = geompy.MakeVectorDXDYDZ( 1, 0, 1) + #v_n0p = geompy.MakeVectorDXDYDZ(-1, 0, 1) + #v_pp0 = geompy.MakeVectorDXDYDZ( 1, 1, 0) + #v_np0 = geompy.MakeVectorDXDYDZ(-1, 1, 0) v_0n0 = geompy.MakeVectorDXDYDZ( 0, -1, 0) - pln_0pp = geompy.MakePlane(p0, v_0pp, 300) - pln_0np = geompy.MakePlane(p0, v_0np, 300) - pln_p0p = geompy.MakePlane(p0, v_p0p, 300) - pln_n0p = geompy.MakePlane(p0, v_n0p, 300) - pln_pp0 = geompy.MakePlane(p0, v_pp0, 300) - pln_np0 = geompy.MakePlane(p0, v_np0, 300) - - #part_tool_1 = geompy.MakePartition([b0, pln_0pp, pln_0np, pln_p0p, pln_n0p, pln_pp0, pln_np0], - # [], - # [], - # [b0]) - part_tool_1 = geompy.MakePartition([b0, pln_0pp, pln_0np, pln_p0p, pln_n0p, pln_pp0, pln_np0]) - - id_part_tool_1 = geompy.addToStudy(part_tool_1, "part_tool_1") - - pt_pnt_1 = geompy.MakeVertex( 55, 0, 55) - pt_pnt_2 = geompy.MakeVertex( 0, 55, 55) - pt_pnt_3 = geompy.MakeVertex(-55, 0, 55) - pt_pnt_4 = geompy.MakeVertex( 0, -55, 55) - pt_pnt_5 = geompy.MakeVertex( 55, 55, 0) - pt_pnt_6 = geompy.MakeVertex( 55, -55, 0) - pt_pnt_7 = geompy.MakeVertex(-55, 55, 0) - pt_pnt_8 = geompy.MakeVertex(-55, -55, 0) - pt_pnt_9 = geompy.MakeVertex( 55, 0, -55) - pt_pnt_10 = geompy.MakeVertex( 0, 55, -55) - pt_pnt_11 = geompy.MakeVertex(-55, 0, -55) - pt_pnt_12 = geompy.MakeVertex( 0, -55, -55) - - pt_face_1 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_1) - pt_face_2 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_2) - pt_face_3 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_3) - pt_face_4 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_4) - pt_face_5 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_5) - pt_face_6 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_6) - pt_face_7 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_7) - pt_face_8 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_8) - pt_face_9 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_9) - pt_face_10 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_10) - pt_face_11 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_11) - pt_face_12 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_12) - + #pln_0pp = geompy.MakePlane(p0, v_0pp, 300) + #pln_0np = geompy.MakePlane(p0, v_0np, 300) + #pln_p0p = geompy.MakePlane(p0, v_p0p, 300) + #pln_n0p = geompy.MakePlane(p0, v_n0p, 300) + #pln_pp0 = geompy.MakePlane(p0, v_pp0, 300) + #pln_np0 = geompy.MakePlane(p0, v_np0, 300) + # + #part_objs = [b0, pln_0pp, pln_0np, pln_p0p, pln_n0p, pln_pp0, pln_np0] + #part_tool_1 = geompy.MakePartition(part_objs, [], [], [b0]) + #part_tool_1 = geompy.MakePartition(part_objs) + # + #id_part_tool_1 = geompy.addToStudy(part_tool_1, "part_tool_1") + # + #pt_pnt_1 = geompy.MakeVertex( 55, 0, 55) + #pt_pnt_2 = geompy.MakeVertex( 0, 55, 55) + #pt_pnt_3 = geompy.MakeVertex(-55, 0, 55) + #pt_pnt_4 = geompy.MakeVertex( 0, -55, 55) + #pt_pnt_5 = geompy.MakeVertex( 55, 55, 0) + #pt_pnt_6 = geompy.MakeVertex( 55, -55, 0) + #pt_pnt_7 = geompy.MakeVertex(-55, 55, 0) + #pt_pnt_8 = geompy.MakeVertex(-55, -55, 0) + #pt_pnt_9 = geompy.MakeVertex( 55, 0, -55) + #pt_pnt_10 = geompy.MakeVertex( 0, 55, -55) + #pt_pnt_11 = geompy.MakeVertex(-55, 0, -55) + #pt_pnt_12 = geompy.MakeVertex( 0, -55, -55) + # + #pt_face_1 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_1) + #pt_face_2 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_2) + #pt_face_3 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_3) + #pt_face_4 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_4) + #pt_face_5 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_5) + #pt_face_6 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_6) + #pt_face_7 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_7) + #pt_face_8 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_8) + #pt_face_9 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_9) + #pt_face_10 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_10) + #pt_face_11 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_11) + #pt_face_12 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_12) + # #pt_box = geompy.GetBlockNearPoint(part_tool_1, p0) - - #part_tool = geompy.MakeCompound([pt_face_1, pt_face_4, pt_face_7, pt_face_10, - # pt_face_2, pt_face_5, pt_face_8, pt_face_11, - # #pt_face_3, pt_face_6, pt_face_9, pt_face_12, pt_box]) - # pt_face_3, pt_face_6, pt_face_9, pt_face_12) + # + #comp_parts = [pt_face_1, pt_face_4, pt_face_7, pt_face_10, + # pt_face_2, pt_face_5, pt_face_8, pt_face_11, + # #pt_face_3, pt_face_6, pt_face_9, pt_face_12, pt_box] + # pt_face_3, pt_face_6, pt_face_9, pt_face_12] + #part_tool = geompy.MakeCompound(comp_parts) #id_part_tool = geompy.addToStudy(part_tool, "part_tool") - + # #part = geompy.MakePartition([s0], [part_tool]) - #part = geompy.MakePartition([s0], [ pt_face_1, pt_face_4, pt_face_7, pt_face_10, - # pt_face_2, pt_face_5, pt_face_8, pt_face_11, - # pt_face_3, pt_face_6, pt_face_9, pt_face_12, b0] ) + # + #part_tools = [pt_face_1, pt_face_4, pt_face_7, pt_face_10, + # pt_face_2, pt_face_5, pt_face_8, pt_face_11, + # pt_face_3, pt_face_6, pt_face_9, pt_face_12, b0] + #part = geompy.MakePartition([s0], part_tools) p1 = geompy.MakeVertex(50, 0, 0) p2 = geompy.MakeVertex(-50, 0, 0) @@ -371,10 +388,6 @@ def TestOtherOperations (geompy, math): p5 = geompy.MakeVertex(0, 0, 50) p6 = geompy.MakeVertex(0, 0, -50) - vx = geompy.MakeVectorDXDYDZ( 1, 0, 0) - vy = geompy.MakeVectorDXDYDZ( 0, 1, 0) - vz = geompy.MakeVectorDXDYDZ( 0, 0, 1) - plnX1 = geompy.MakePlane(p1, vx, 300) plnX2 = geompy.MakePlane(p2, vx, 300) plnY1 = geompy.MakePlane(p3, vy, 300) @@ -403,7 +416,8 @@ def TestOtherOperations (geompy, math): geompy.addToStudy(freeFacesWithoutExtra, "freeFacesWithoutExtra") # GetSharedShapes - sharedFaces = geompy.GetSharedShapes(part, freeFacesWithoutExtra, geompy.ShapeType["FACE"]) + sharedFaces = geompy.GetSharedShapes(part, freeFacesWithoutExtra, + geompy.ShapeType["FACE"]) for shFace in sharedFaces: geompy.addToStudy(shFace, "sharedFace") @@ -465,12 +479,13 @@ def TestOtherOperations (geompy, math): geompy.addToStudy(edge_i, "Edge on Plane (N = (0, -1, 0) & Location = (0, -50, 0)") # GetShapesOnPlaneWithLocationIDs - edges_on_pln_ids = geompy.GetShapesOnPlaneWithLocationIDs(blocksComp, geompy.ShapeType["EDGE"], - v_0n0, Loc, geompy.GEOM.ST_ON) + edges_on_pln_ids = geompy.GetShapesOnPlaneWithLocationIDs( + blocksComp, geompy.ShapeType["EDGE"], v_0n0, Loc, geompy.GEOM.ST_ON) group_edges_on_pln = geompy.CreateGroup(blocksComp, geompy.ShapeType["EDGE"]) geompy.UnionIDs(group_edges_on_pln, edges_on_pln_ids) - geompy.addToStudy(group_edges_on_pln, "Group of edges on Plane (N = (0, -1, 0) & Location = (0, -50, 0))") - + grname = "Group of edges on Plane (N = (0, -1, 0) & Location = (0, -50, 0))" + geompy.addToStudy(group_edges_on_pln, grname) + # GetShapesOnCylinder edges_out_cyl = geompy.GetShapesOnCylinder(blocksComp, geompy.ShapeType["EDGE"], vy, 55, geompy.GEOM.ST_OUT) @@ -489,7 +504,6 @@ def TestOtherOperations (geompy, math): p0, 100, geompy.GEOM.ST_ON) for vertex_i in vertices_on_sph: geompy.addToStudy(vertex_i, "Vertex on Sphere (center = (0, 0, 0), r = 100)") - pass # GetShapesOnSphereIDs vertices_on_sph_ids = geompy.GetShapesOnSphereIDs(blocksComp, geompy.ShapeType["VERTEX"], @@ -513,13 +527,12 @@ def TestOtherOperations (geompy, math): quadrangle = geompy.MakeWire([qe1, qe2, qe3, qe4]) geompy.addToStudy(quadrangle, "Quadrangle") - edges_onin_quad = geompy.GetShapesOnQuadrangle( f12, geompy.ShapeType["EDGE"], - tl, tr, bl, br, geompy.GEOM.ST_ONIN) + edges_onin_quad = geompy.GetShapesOnQuadrangle(f12, geompy.ShapeType["EDGE"], + tl, tr, bl, br, geompy.GEOM.ST_ONIN) comp = geompy.MakeCompound(edges_onin_quad) geompy.addToStudy(comp, "Edges of F12 ONIN Quadrangle") if len( edges_onin_quad ) != 4: print "Error in GetShapesOnQuadrangle()" - pass # GetShapesOnQuadrangleIDs vertices_on_quad_ids = geompy.GetShapesOnQuadrangleIDs(f12, geompy.ShapeType["VERTEX"], @@ -528,6 +541,55 @@ def TestOtherOperations (geompy, math): geompy.UnionIDs(vertices_on_quad, vertices_on_quad_ids) geompy.addToStudy(vertices_on_quad, "Group of vertices on Quadrangle F12") + # GetShapesOnBox + edges_on_box = geompy.GetShapesOnBox(b0, part, geompy.ShapeType["EDGE"], + geompy.GEOM.ST_ON) + comp = geompy.MakeCompound(edges_on_box) + geompy.addToStudy(comp, "Edges of part ON box b0") + if len( edges_on_box ) != 12: + print "Error in GetShapesOnBox()" + + # GetShapesOnBoxIDs + faces_on_box_ids = geompy.GetShapesOnBoxIDs(b0, part, geompy.ShapeType["FACE"], + geompy.GEOM.ST_ON) + faces_on_box = geompy.CreateGroup(part, geompy.ShapeType["FACE"]) + geompy.UnionIDs(faces_on_box, faces_on_box_ids) + geompy.addToStudyInFather(part, faces_on_box, "Group of faces on box b0") + + # Prepare arguments for GetShapesOnShape + sph1 = geompy.MakeSphere(50, 50, 50, 40) + sph2 = geompy.MakeSphere(50, 50, -50, 40) + pcyl = geompy.MakeVertex(50, 50, -50) + cyli = geompy.MakeCylinder(pcyl, vz, 40, 100) + fuse = geompy.MakeFuse(sph1, cyli) + fuse = geompy.MakeFuse(fuse, sph2) + # As after Fuse we have a compound, we need to obtain a solid from it + shsh = geompy.SubShapeAll(fuse, geompy.ShapeType["SOLID"]) + sh_1 = shsh[0] + geompy.addToStudy(sh_1, "sh_1") + + # GetShapesOnShape + faces_in_sh = geompy.GetShapesOnShape(sh_1, part, geompy.ShapeType["FACE"], + geompy.GEOM.ST_IN) + comp = geompy.MakeCompound(faces_in_sh) + geompy.addToStudy(comp, "Faces of part IN shape sh_1") + if len(faces_in_sh) != 11: + print "Error in GetShapesOnShape()" + + # GetShapesOnShapeAsCompound + faces_in_sh_c = geompy.GetShapesOnShapeAsCompound(sh_1, part, geompy.ShapeType["FACE"], + geompy.GEOM.ST_IN) + geompy.addToStudy(faces_in_sh_c, "Faces of part IN shape sh_1 (as compound)") + + # GetShapesOnShapeIDs + edges_in_sh_ids = geompy.GetShapesOnShapeIDs(sh_1, part, geompy.ShapeType["EDGE"], + geompy.GEOM.ST_IN) + edges_in_sh = geompy.CreateGroup(part, geompy.ShapeType["EDGE"]) + geompy.UnionIDs(edges_in_sh, edges_in_sh_ids) + geompy.addToStudyInFather(part, edges_in_sh, "Group of edges in shape sh_1") + if len(edges_in_sh_ids) != 15: + print "Error in GetShapesOnShapeIDs()" + # Prepare arguments for GetInPlace and GetInPlaceByHistory box5 = geompy.MakeBoxDXDYDZ(100, 100, 100) box6 = geompy.MakeTranslation(box5, 50, 50, 0) @@ -541,15 +603,9 @@ def TestOtherOperations (geompy, math): box5_faces = geompy.SubShapeAll(box5, geompy.ShapeType["FACE"]) box6_faces = geompy.SubShapeAll(box6, geompy.ShapeType["FACE"]) - ifa = 1 - for aface in box5_faces: - geompy.addToStudyInFather(box5, aface, "Face" + `ifa`) - ifa = ifa + 1 - - ifa = 1 - for aface in box6_faces: - geompy.addToStudyInFather(box6, aface, "Face" + `ifa`) - ifa = ifa + 1 + for ifa in range(6): + geompy.addToStudyInFather(box5, box5_faces[ifa], "Face" + `ifa + 1`) + geompy.addToStudyInFather(box6, box6_faces[ifa], "Face" + `ifa + 1`) # GetInPlace(theShapeWhere, theShapeWhat) ibb = 5 @@ -557,19 +613,17 @@ def TestOtherOperations (geompy, math): for afaces in faces_list: ifa = 1 for aface in afaces: + refl_box_face = geompy.GetInPlace(part, aface) if ibb == 6 and (ifa == 2 or ifa == 4): - # use IDL interface directly to avoid error message appearence in Python console - refl_box_face = geompy.ShapesOp.GetInPlace(part, aface) + # For two faces of the tool box + # there is no reflection in the result. if refl_box_face is not None: - geompy.addToStudyInFather(part, refl_box_face, - "Reflection of face " + `ifa` + " of box " + `ibb`) - error = "Result of GetInPlace must be NULL for face " + `ifa` + " of box " + `ibb` + error = "Result of GetInPlace must be NULL for face " + error += `ifa` + " of box " + `ibb` raise RuntimeError, error else: - # use geompy interface - refl_box_face = geompy.GetInPlace(part, aface) - geompy.addToStudyInFather(part, refl_box_face, - "Reflection of face " + `ifa` + " of box " + `ibb`) + ssname = "Reflection of face " + `ifa` + " of box " + `ibb` + geompy.addToStudyInFather(part, refl_box_face, ssname) ifa = ifa + 1 ibb = ibb + 1 @@ -582,18 +636,20 @@ def TestOtherOperations (geompy, math): for afaces in faces_list: ifa = 1 for aface in afaces: + ssname = "Reflection of face " + `ifa` + " of box " + `ibb` + " (by history)" if ibb == 6 and (ifa == 2 or ifa == 4): # use IDL interface directly to avoid error message appearence in Python console refl_box_face = geompy.ShapesOp.GetInPlaceByHistory(part, aface) if refl_box_face is not None: - geompy.addToStudyInFather(part, refl_box_face, - "Reflection of face " + `ifa` + " of box " + `ibb` + " (by history)") - error = "Result of GetInPlaceByHistory must be NULL for face " + `ifa` + " of box " + `ibb` + geompy.addToStudyInFather(part, refl_box_face, ssname) + error = "Result of GetInPlaceByHistory must be NULL for face " + error += `ifa` + " of box " + `ibb` raise RuntimeError, error else: # use geompy interface refl_box_face = geompy.GetInPlaceByHistory(part, aface) - geompy.addToStudyInFather(part, refl_box_face, - "Reflection of face " + `ifa` + " of box " + `ibb` + " (by history)") + geompy.addToStudyInFather(part, refl_box_face, ssname) ifa = ifa + 1 ibb = ibb + 1 + +#END diff --git a/src/GEOM_SWIG/batchmode_geompy.py b/src/GEOM_SWIG/batchmode_geompy.py index 3ca8d022f..68e39fd48 100644 --- a/src/GEOM_SWIG/batchmode_geompy.py +++ b/src/GEOM_SWIG/batchmode_geompy.py @@ -17,1277 +17,15 @@ # 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # # # -# File : geompy.py +# File : batchmode_geompy.py # Author : Paul RASCLE, EDF # Module : GEOM # $Header$ -from batchmode_salome import * -import GEOM -g=None -step = 0 -sleeping_time = 0.01 -sleeping_time_max = 1.0 -while 1: - g = lcc.FindOrLoadComponent("FactoryServer", "GEOM") - if g is not None: break - step = step + 1 - if step > 100: break - time.sleep(sleeping_time) - sleeping_time = max(sleeping_time_max, 2*sleeping_time) - pass -geom = g._narrow( GEOM.GEOM_Gen ) - -myBuilder = None -myStudyId = 0 -father = None - -BasicOp = None -CurvesOp = None -PrimOp = None -ShapesOp = None -HealOp = None -InsertOp = None -BoolOp = None -TrsfOp = None -LocalOp = None -MeasuOp = None -BlocksOp = None -GroupOp = None - -def init_geom(theStudy): - - global myStudy, myBuilder, myStudyId, BasicOp, CurvesOp, PrimOp, ShapesOp, HealOp - global InsertOp, BoolOp, TrsfOp, LocalOp, MeasuOp, BlocksOp, GroupOp, father - - myStudy = theStudy - myStudyId = myStudy._get_StudyId() - myBuilder = myStudy.NewBuilder() - father = myStudy.FindComponent("GEOM") - if father is None: - father = myBuilder.NewComponent("GEOM") - A1 = myBuilder.FindOrCreateAttribute(father, "AttributeName") - FName = A1._narrow(SALOMEDS.AttributeName) - FName.SetValue("Geometry") - A2 = myBuilder.FindOrCreateAttribute(father, "AttributePixMap") - aPixmap = A2._narrow(SALOMEDS.AttributePixMap) - aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry") - myBuilder.DefineComponentInstance(father,geom) - pass - - # ----------------------------------------------------------------------------- - # Assign Operations Interfaces - # ----------------------------------------------------------------------------- - - BasicOp = geom.GetIBasicOperations (myStudyId) - CurvesOp = geom.GetICurvesOperations (myStudyId) - PrimOp = geom.GetI3DPrimOperations (myStudyId) - ShapesOp = geom.GetIShapesOperations (myStudyId) - HealOp = geom.GetIHealingOperations (myStudyId) - InsertOp = geom.GetIInsertOperations (myStudyId) - BoolOp = geom.GetIBooleanOperations (myStudyId) - TrsfOp = geom.GetITransformOperations(myStudyId) - LocalOp = geom.GetILocalOperations (myStudyId) - MeasuOp = geom.GetIMeasureOperations (myStudyId) - BlocksOp = geom.GetIBlocksOperations (myStudyId) - GroupOp = geom.GetIGroupOperations (myStudyId) - pass - -init_geom(myStudy) - -# * Get name for sub-shape aSubObj of shape aMainObj -# -def SubShapeName(aSubObj, aMainObj): - name = "SubShape" - print name - return name - -# * Publish in study aShape with name aName -# -def addToStudy(aShape, aName): - try: - aSObject = geom.AddInStudy(myStudy, aShape, aName, None) - except: - print "addToStudy() failed" - return "" - return aShape.GetStudyEntry() - -# * Publish in study aShape with name aName as sub-object of previously published aFather -# -def addToStudyInFather(aFather, aShape, aName): - try: - aSObject = geom.AddInStudy(myStudy, aShape, aName, aFather) - except: - print "addToStudyInFather() failed" - return "" - return aShape.GetStudyEntry() - -# ----------------------------------------------------------------------------- -# enumeration ShapeType as a dictionary -# ----------------------------------------------------------------------------- - -ShapeType = {"COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8} - -# ----------------------------------------------------------------------------- -# Basic primitives -# ----------------------------------------------------------------------------- - -def MakeVertex(theX, theY, theZ): - anObj = BasicOp.MakePointXYZ(theX, theY, theZ) - if BasicOp.IsDone() == 0: - print "MakePointXYZ : ", BasicOp.GetErrorCode() - return anObj - -def MakeVertexWithRef(vertex,x,y,z): - anObj = BasicOp.MakePointWithReference(vertex,x,y,z) - if BasicOp.IsDone() == 0: - print "MakePointWithReference : ", BasicOp.GetErrorCode() - return anObj - -def MakeVertexOnCurve(curve,par): - anObj = BasicOp.MakePointOnCurve(curve,par) - if BasicOp.IsDone() == 0: - print "MakePointOnCurve : ", BasicOp.GetErrorCode() - return anObj - -def MakeVertexOnLinesIntersection(line1,line2): - anObj = BasicOp.MakePointOnLinesIntersection(line1,line2) - if BasicOp.IsDone() == 0: - print "MakePointOnLinesIntersection : ", BasicOp.GetErrorCode() - return anObj - -def MakeVectorDXDYDZ(dx,dy,dz): - anObj = BasicOp.MakeVectorDXDYDZ(dx,dy,dz) - if BasicOp.IsDone() == 0: - print "MakeVectorDXDYDZ : ", BasicOp.GetErrorCode() - return anObj - -def MakeVector(p1,p2): - anObj = BasicOp.MakeVectorTwoPnt(p1, p2) - if BasicOp.IsDone() == 0: - print "MakeVectorTwoPnt : ", BasicOp.GetErrorCode() - return anObj - -def MakeLine(p1, d1): - anObj = BasicOp.MakeLine(p1,d1) - if BasicOp.IsDone() == 0: - print "MakeLine : ", BasicOp.GetErrorCode() - return anObj - -def MakeLineTwoPnt(p1, p2): - anObj = BasicOp.MakeLineTwoPnt(p1,p2) - if BasicOp.IsDone() == 0: - print "MakeLineTwoPnt : ", BasicOp.GetErrorCode() - return anObj - -def MakeLineTwoFaces(f1, f2): - anObj = BasicOp.MakeLineTwoFaces(f1,f2) - if BasicOp.IsDone() == 0: - print "MakeLineTwoFaces : ", BasicOp.GetErrorCode() - return anObj - -def MakePlane(p1,v1,trimsize): - anObj = BasicOp.MakePlanePntVec(p1,v1,trimsize) - if BasicOp.IsDone() == 0: - print "MakePlanePntVec : ", BasicOp.GetErrorCode() - return anObj - -def MakePlaneThreePnt(p1,p2,p3,trimsize): - anObj = BasicOp.MakePlaneThreePnt(p1,p2,p3,trimsize) - if BasicOp.IsDone() == 0: - print "MakePlaneThreePnt : ", BasicOp.GetErrorCode() - return anObj - -def MakePlaneFace(face,trimsize): - anObj = BasicOp.MakePlaneFace(face,trimsize) - if BasicOp.IsDone() == 0: - print "MakePlaneFace : ", BasicOp.GetErrorCode() - return anObj - -def MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ): - anObj = BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ) - if BasicOp.IsDone() == 0: - print "MakeMarker : ", BasicOp.GetErrorCode() - return anObj - -def MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec): - """ - * Create a local coordinate system. - * \param theOrigin Point of coordinate system origin. - * \param theXVec Vector of X direction - * \param theYVec Vector of Y direction - * \return New GEOM_Object, containing the created coordinate system. - """ - O = PointCoordinates( theOrigin ) - OXOY = [] - for vec in [ theXVec, theYVec ]: - v1, v2 = SubShapeAll( vec, ShapeType["VERTEX"] ) - p1 = PointCoordinates( v1 ) - p2 = PointCoordinates( v2 ) - for i in range( 0, 3 ): - OXOY.append( p2[i] - p1[i] ) - # - anObj = BasicOp.MakeMarker( O[0], O[1], O[2], - OXOY[0], OXOY[1], OXOY[2], - OXOY[3], OXOY[4], OXOY[5], ) - if BasicOp.IsDone() == 0: - print "MakeMarker : ", BasicOp.GetErrorCode() - return anObj - -# ----------------------------------------------------------------------------- -# Curves -# ----------------------------------------------------------------------------- - -def MakeArc(p1,p2,p3): - anObj = CurvesOp.MakeArc(p1,p2,p3) - if CurvesOp.IsDone() == 0: - print "MakeArc : ", CurvesOp.GetErrorCode() - return anObj - -def MakeCircle(p1,v1,radius): - anObj = CurvesOp.MakeCirclePntVecR(p1,v1,radius) - if CurvesOp.IsDone() == 0: - print "MakeCirclePntVecR : ", CurvesOp.GetErrorCode() - return anObj - -def MakeCircleThreePnt(p1,p2,p3): - anObj = CurvesOp.MakeCircleThreePnt(p1,p2,p3) - if CurvesOp.IsDone() == 0: - print "MakeCircleThreePnt : ", CurvesOp.GetErrorCode() - return anObj - -def MakeCircleCenter2Pnt(p1,p2,p3): - anObj = CurvesOp.MakeCircleCenter2Pnt(p1,p2,p3) - if CurvesOp.IsDone() == 0: - print "MakeCircleCenter2Pnt : ", CurvesOp.GetErrorCode() - return anObj - -def MakeEllipse(p1,v1,radiusMaj,radiusMin): - anObj = CurvesOp.MakeEllipse(p1,v1,radiusMaj, radiusMin) - if CurvesOp.IsDone() == 0: - print "MakeEllipse : ", CurvesOp.GetErrorCode() - return anObj - -def MakePolyline(ListShape): - anObj = CurvesOp.MakePolyline(ListShape) - if CurvesOp.IsDone() == 0: - print "MakePolyline : ", CurvesOp.GetErrorCode() - return anObj - -def MakeBezier(ListShape): - anObj = CurvesOp.MakeSplineBezier(ListShape) - if CurvesOp.IsDone() == 0: - print "MakeSplineBezier : ", CurvesOp.GetErrorCode() - return anObj - -def MakeInterpol(ListShape): - anObj = CurvesOp.MakeSplineInterpolation(ListShape) - if CurvesOp.IsDone() == 0: - print "MakeSplineInterpolation : ", CurvesOp.GetErrorCode() - return anObj - -# : Nine double values, defining origin, -# OZ and OX directions of the working plane. -def MakeSketcher(Cmd, WPL = [0,0,0, 0,0,1, 1,0,0]): - anObj = CurvesOp.MakeSketcher(Cmd, WPL) - if CurvesOp.IsDone() == 0: - print "MakeSketcher : ", CurvesOp.GetErrorCode() - return anObj - -def MakeSketcherOnPlane(theCommand, theWorkingPlane): - """ - * Create a sketcher (wire or face), following the textual description, - * passed through \a theCommand argument. \n - * For format of the description string see the previous method.\n - * \param theCommand String, defining the sketcher in local - * coordinates of the working plane. - * \param theWorkingPlane Planar Face of the working plane. - * \return New GEOM_Object, containing the created wire. - """ - anObj = CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane) - if CurvesOp.IsDone() == 0: - print "MakeSketcher : ", CurvesOp.GetErrorCode() - return anObj - -# ----------------------------------------------------------------------------- -# Create 3D Primitives -# ----------------------------------------------------------------------------- - -def MakeBox(x1,y1,z1,x2,y2,z2): - pnt1 = MakeVertex(x1,y1,z1) - pnt2 = MakeVertex(x2,y2,z2) - return MakeBoxTwoPnt(pnt1,pnt2) - -def MakeBoxDXDYDZ(dx,dy,dz): - anObj = PrimOp.MakeBoxDXDYDZ(dx,dy,dz) - if PrimOp.IsDone() == 0: - print "MakeBoxDXDYDZ : ", PrimOp.GetErrorCode() - return anObj - -def MakeBoxTwoPnt(point1, point2): - anObj = PrimOp.MakeBoxTwoPnt(point1, point2) - if PrimOp.IsDone() == 0: - print "MakeBoxTwoPnt : ", PrimOp.GetErrorCode() - return anObj - -def MakeCylinder(p1,v1,radius,height): - anObj = PrimOp.MakeCylinderPntVecRH(p1,v1,radius,height) - if PrimOp.IsDone() == 0: - print "MakeCylinderPntVecRH : ", PrimOp.GetErrorCode() - return anObj - -def MakeCylinderRH(radius,height): - anObj = PrimOp.MakeCylinderRH(radius,height) - if PrimOp.IsDone() == 0: - print "MakeCylinderRH : ", PrimOp.GetErrorCode() - return anObj - -def MakeSpherePntR(point,radius): - anObj = PrimOp.MakeSpherePntR(point,radius) - if PrimOp.IsDone() == 0: - print "MakeSpherePntR : ", PrimOp.GetErrorCode() - return anObj - -def MakeSphere(x,y,z,radius): - point = MakeVertex(x,y,z) - anObj = MakeSpherePntR(point,radius) - return anObj - -def MakeSphereR(radius): - anObj = PrimOp.MakeSphereR(radius) - if PrimOp.IsDone() == 0: - print "MakeSphereR : ", PrimOp.GetErrorCode() - return anObj - -def MakeCone(p1,v1,radius1,radius2,height): - anObj = PrimOp.MakeConePntVecR1R2H(p1,v1,radius1,radius2,height) - if PrimOp.IsDone() == 0: - print "MakeConePntVecR1R2H : ", PrimOp.GetErrorCode() - return anObj - -def MakeConeR1R2H(radius1,radius2,height): - anObj = PrimOp.MakeConeR1R2H(radius1,radius2,height) - if PrimOp.IsDone() == 0: - print "MakeConeR1R2H : ", PrimOp.GetErrorCode() - return anObj - -def MakeTorus(p1,v1,major_radius,minor_radius): - anObj = PrimOp.MakeTorusPntVecRR(p1,v1,major_radius,minor_radius) - if PrimOp.IsDone() == 0: - print "MakeTorusPntVecRR : ", PrimOp.GetErrorCode() - return anObj - -def MakeTorusRR(major_radius,minor_radius): - anObj = PrimOp.MakeTorusRR(major_radius,minor_radius) - if PrimOp.IsDone() == 0: - print "MakeTorusRR : ", PrimOp.GetErrorCode() - return anObj - -def MakePrism(baseShape,point1,point2): - anObj = PrimOp.MakePrismTwoPnt(baseShape,point1,point2) - if PrimOp.IsDone() == 0: - print "MakePrismTwoPnt : ", PrimOp.GetErrorCode() - return anObj - -def MakePrism2Ways(baseShape,point1,point2): - anObj = PrimOp.MakePrismTwoPnt2Ways(baseShape,point1,point2) - if PrimOp.IsDone() == 0: - print "MakePrismTwoPnt2Ways : ", PrimOp.GetErrorCode() - return anObj - -def MakePrismVecH(baseShape,vector,height): - anObj = PrimOp.MakePrismVecH(baseShape,vector,height) - if PrimOp.IsDone() == 0: - print "MakePrismVecH : ", PrimOp.GetErrorCode() - return anObj - -def MakePrismVecH2Ways(baseShape,vector,height): - anObj = PrimOp.MakePrismVecH2Ways(baseShape,vector,height) - if PrimOp.IsDone() == 0: - print "MakePrismVecH2Ways : ", PrimOp.GetErrorCode() - return anObj - -def MakePipe(baseShape,pathShape): - anObj = PrimOp.MakePipe(baseShape,pathShape) - if PrimOp.IsDone() == 0: - print "MakePipe : ", PrimOp.GetErrorCode() - return anObj - -def MakeRevolution(aShape,axis,angle): - anObj = PrimOp.MakeRevolutionAxisAngle(aShape,axis,angle) - if PrimOp.IsDone() == 0: - print "MakeRevolutionAxisAngle : ", PrimOp.GetErrorCode() - return anObj - -def MakeRevolution2Ways(aShape,axis,angle): - anObj = PrimOp.MakeRevolutionAxisAngle2Ways(aShape,axis,angle) - if PrimOp.IsDone() == 0: - print "MakeRevolutionAxisAngle2Ways : ", PrimOp.GetErrorCode() - return anObj - -# ----------------------------------------------------------------------------- -# Create base shapes -# ----------------------------------------------------------------------------- - -def MakeEdge(p1,p2): - anObj = ShapesOp.MakeEdge(p1,p2) - if ShapesOp.IsDone() == 0: - print "MakeEdge : ", ShapesOp.GetErrorCode() - return anObj - -def MakeWire(ListShape): - anObj = ShapesOp.MakeWire(ListShape) - if ShapesOp.IsDone() == 0: - print "MakeWire : ", ShapesOp.GetErrorCode() - return anObj - -def MakeFace(aShapeWire,WantPlanarFace): - anObj = ShapesOp.MakeFace(aShapeWire,WantPlanarFace) - if ShapesOp.IsDone() == 0: - print "MakeFace : ", ShapesOp.GetErrorCode() - return anObj - -def MakeFaceWires(ListWires,WantPlanarFace): - anObj = ShapesOp.MakeFaceWires(ListWires,WantPlanarFace) - if ShapesOp.IsDone() == 0: - print "MakeFaceWires : ", ShapesOp.GetErrorCode() - return anObj - -def MakeFaces(ListWires,WantPlanarFace): - anObj = MakeFaceWires(ListWires,WantPlanarFace) - return anObj - -def MakeShell(ListOfShapes): - anObj = ShapesOp.MakeShell(ListOfShapes) - if ShapesOp.IsDone() == 0: - print "MakeShell : ", ShapesOp.GetErrorCode() - return anObj - -def MakeSolid(ListOfShells): - anObj = ShapesOp.MakeSolidShells(ListOfShells) - if ShapesOp.IsDone() == 0: - print "MakeSolid : ", ShapesOp.GetErrorCode() - return anObj - -def MakeCompound(ListShape): - anObj = ShapesOp.MakeCompound(ListShape) - if ShapesOp.IsDone() == 0: - print "MakeCompound : ", ShapesOp.GetErrorCode() - return anObj - -def NumberOfFaces(theShape): - nb_faces = ShapesOp.NumberOfFaces(theShape) - if ShapesOp.IsDone() == 0: - print "NumberOfFaces : ", ShapesOp.GetErrorCode() - return nb_faces - -def NumberOfEdges(theShape): - nb_edges = ShapesOp.NumberOfEdges(theShape) - if ShapesOp.IsDone() == 0: - print "NumberOfEdges : ", ShapesOp.GetErrorCode() - return nb_edges - -def ChangeOrientation(Shape): - anObj = ShapesOp.ChangeOrientation(Shape) - if ShapesOp.IsDone() == 0: - print "ChangeOrientation : ", ShapesOp.GetErrorCode() - return anObj - -def OrientationChange(Shape): - anObj = ChangeOrientation(Shape) - return anObj - -def GetFreeFacesIDs(theShape): - anIDs = ShapesOp.GetFreeFacesIDs(theShape) - if ShapesOp.IsDone() == 0: - print "GetFreeFacesIDs : ", ShapesOp.GetErrorCode() - return anIDs - -def GetSharedShapes(theShape1, theShape2, theShapeType): - aList = ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType) - if ShapesOp.IsDone() == 0: - print "GetSharedShapes : ", ShapesOp.GetErrorCode() - return aList - -def GetShapesOnPlane(theShape, theShapeType, theAx1, theState): - aList = ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState) - if ShapesOp.IsDone() == 0: - print "GetShapesOnPlane : ", ShapesOp.GetErrorCode() - return aList - -def GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState): - aList = ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState) - if ShapesOp.IsDone() == 0: - print "GetShapesOnPlaneIDs : ", ShapesOp.GetErrorCode() - return aList - -def GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState): - aList = ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState) - if ShapesOp.IsDone() == 0: - print "GetShapesOnCylinder : ", ShapesOp.GetErrorCode() - return aList - -def GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState): - aList = ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState) - if ShapesOp.IsDone() == 0: - print "GetShapesOnCylinderIDs : ", ShapesOp.GetErrorCode() - return aList - -def GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState): - aList = ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState) - if ShapesOp.IsDone() == 0: - print "GetShapesOnSphere : ", ShapesOp.GetErrorCode() - return aList - -def GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState): - aList = ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState) - if ShapesOp.IsDone() == 0: - print "GetShapesOnSphereIDs : ", ShapesOp.GetErrorCode() - return aList - -def GetShapesOnQuadrangle(theShape, theShapeType, theTopLeftPoint, theTopRigthPoint, theBottomLeftPoint, theBottomRigthPoint, theState): - aList = ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType, theTopLeftPoint, theTopRigthPoint, theBottomLeftPoint, theBottomRigthPoint, theState) - if ShapesOp.IsDone() == 0: - print "GetShapesOnQuadrangle : ", ShapesOp.GetErrorCode() - return aList - -def GetShapesOnQuadrangleIDs(theShape, theShapeType, theTopLeftPoint, theTopRigthPoint, theBottomLeftPoint, theBottomRigthPoint, theState): - aList = ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType, theTopLeftPoint, theTopRigthPoint, theBottomLeftPoint, theBottomRigthPoint, theState) - if ShapesOp.IsDone() == 0: - print "GetShapesOnQuadrangleIDs : ", ShapesOp.GetErrorCode() - return aList - -def GetInPlace(theShapeWhere, theShapeWhat): - anObj = ShapesOp.GetInPlace(theShapeWhere, theShapeWhat) - if ShapesOp.IsDone() == 0: - print "GetInPlace : ", ShapesOp.GetErrorCode() - return anObj - -# ----------------------------------------------------------------------------- -# Access to sub-shapes by their unique IDs inside the main shape. -# ----------------------------------------------------------------------------- - -# Obtain a composite sub-shape of , composed from sub-shapes -# of , selected by their unique IDs inside -def GetSubShape(aShape, ListOfID): - anObj = geom.AddSubShape(aShape,ListOfID) - return anObj - -# Obtain unique ID of sub-shape inside -def GetSubShapeID(aShape, aSubShape): - anID = LocalOp.GetSubShapeIndex(aShape, aSubShape) - if LocalOp.IsDone() == 0: - print "GetSubShapeIndex : ", LocalOp.GetErrorCode() - return anID - -# ----------------------------------------------------------------------------- -# Decompose objects -# ----------------------------------------------------------------------------- - -def SubShapeAll(aShape, aType): - ListObj = ShapesOp.MakeExplode(aShape,aType,0) - if ShapesOp.IsDone() == 0: - print "MakeExplode : ", ShapesOp.GetErrorCode() - return ListObj - -def SubShapeAllIDs(aShape, aType): - ListObj = ShapesOp.SubShapeAllIDs(aShape,aType,0) - if ShapesOp.IsDone() == 0: - print "SubShapeAllIDs : ", ShapesOp.GetErrorCode() - return ListObj - -def SubShapeAllSorted(aShape, aType): - ListObj = ShapesOp.MakeExplode(aShape,aType,1) - if ShapesOp.IsDone() == 0: - print "MakeExplode : ", ShapesOp.GetErrorCode() - return ListObj - -def SubShapeAllSortedIDs(aShape, aType): - ListIDs = ShapesOp.SubShapeAllIDs(aShape,aType,1) - if ShapesOp.IsDone() == 0: - print "SubShapeAllSortedIDs : ", ShapesOp.GetErrorCode() - return ListObj - -# Obtain a compound of sub-shapes of , -# selected by they indices in list of all sub-shapes of type -def SubShape(aShape, aType, ListOfInd): - ListOfIDs = [] - AllShapeList = SubShapeAll(aShape, aType) - for ind in ListOfInd: - ListOfIDs.append(GetSubShapeID(aShape, AllShapeList[ind - 1])) - anObj = GetSubShape(aShape, ListOfIDs) - return anObj - -# Obtain a compound of sub-shapes of , -# selected by they indices in sorted list of all sub-shapes of type -def SubShapeSorted(aShape, aType, ListOfInd): - ListOfIDs = [] - AllShapeList = SubShapeAllSorted(aShape, aType) - for ind in ListOfInd: - ListOfIDs.append(GetSubShapeID(aShape, AllShapeList[ind - 1])) - anObj = GetSubShape(aShape, ListOfIDs) - return anObj - -# ----------------------------------------------------------------------------- -# Healing operations -# ----------------------------------------------------------------------------- - -def ProcessShape(Shape, Operators, Parameters, Values): - anObj = HealOp.ProcessShape(Shape, Operators, Parameters, Values) - if HealOp.IsDone() == 0: - print "ProcessShape : ", HealOp.GetErrorCode() - return anObj - -def SuppressFaces(aShape,ListOfId): - anObj = HealOp.SuppressFaces(aShape,ListOfId) - if HealOp.IsDone() == 0: - print "SuppressFaces : ", HealOp.GetErrorCode() - return anObj - -def MakeSewing(ListShape,precision): - comp = MakeCompound(ListShape) - anObj = Sew(comp,precision) - return anObj - -def Sew(aShape,precision): - anObj = HealOp.Sew(aShape,precision) - if HealOp.IsDone() == 0: - print "Sew : ", HealOp.GetErrorCode() - return anObj - -def SuppressInternalWires(aShape, Wires): - anObj = HealOp.RemoveIntWires(aShape, Wires) - if HealOp.IsDone() == 0: - print "SuppressInternalWires : ", HealOp.GetErrorCode() - return anObj - -def SuppressHoles(aShape, ListOfId): - anObj = HealOp.FillHoles(aShape,ListOfId) - if HealOp.IsDone() == 0: - print "SuppressHoles : ", HealOp.GetErrorCode() - return anObj - -def CloseContour(aShape, Wires, IsCommonVertex): - anObj = HealOp.CloseContour(aShape, Wires, IsCommonVertex) - if HealOp.IsDone() == 0: - print "CloseContour : ", HealOp.GetErrorCode() - return anObj - -def DivideEdge(aShape, EdgeID, Value, IsByParameter): - anObj = HealOp.DivideEdge(aShape, EdgeID, Value, IsByParameter) - if HealOp.IsDone() == 0: - print "DivideEdge : ", HealOp.GetErrorCode() - return anObj - -def GetFreeBoundary(Shape): - anObj = HealOp.GetFreeBoundary(Shape) - if HealOp.IsDone() == 0: - print "GetFreeBoundaries : ", HealOp.GetErrorCode() - return anObj - -# ----------------------------------------------------------------------------- -# Create advanced objects -# ----------------------------------------------------------------------------- - -def MakeCopy(aShape): - anObj = InsertOp.MakeCopy(aShape) - if InsertOp.IsDone() == 0: - print "MakeCopy : ", InsertOp.GetErrorCode() - return anObj - -def MakeFilling(aShape,mindeg,maxdeg,tol2d,tol3d,nbiter,isApprox=0): - anObj = PrimOp.MakeFilling(aShape,mindeg,maxdeg,tol2d,tol3d,nbiter,isApprox) - if PrimOp.IsDone() == 0: - print "MakeFilling : ", PrimOp.GetErrorCode() - return anObj - -def MakeGlueFaces(aShape,aTolerance): - anObj = ShapesOp.MakeGlueFaces(aShape,aTolerance) - if ShapesOp.IsDone() == 0: - print "MakeGlueFaces : ", ShapesOp.GetErrorCode() - return anObj - -# ----------------------------------------------------------------------------- -# Boolean (Common, Cut, Fuse, Section) -# ----------------------------------------------------------------------------- - -def MakeBoolean(shape1,shape2,operation): - anObj = BoolOp.MakeBoolean(shape1,shape2,operation) - if BoolOp.IsDone() == 0: - print "MakeBoolean : ", BoolOp.GetErrorCode() - return anObj - -def MakeCommon(s1, s2): - return MakeBoolean(s1, s2, 1) - -def MakeCut(s1, s2): - return MakeBoolean(s1, s2, 2) - -def MakeFuse(s1, s2): - return MakeBoolean(s1, s2, 3) - -def MakeSection(s1, s2): - return MakeBoolean(s1, s2, 4) - -def MakePartition(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[], - Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[], - KeepNonlimitShapes=0): - anObj = BoolOp.MakePartition(ListShapes, ListTools, - ListKeepInside, ListRemoveInside, - Limit, RemoveWebs, ListMaterials, - KeepNonlimitShapes); - if BoolOp.IsDone() == 0: - print "MakePartition : ", BoolOp.GetErrorCode() - return anObj - -def Partition(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[], - Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[], - KeepNonlimitShapes=0): - anObj = MakePartition(ListShapes, ListTools, - ListKeepInside, ListRemoveInside, - Limit, RemoveWebs, ListMaterials, - KeepNonlimitShapes); - return anObj - -def MakeHalfPartition(theShape, thePlane): - anObj = BoolOp.MakeHalfPartition(theShape, thePlane) - if BoolOp.IsDone() == 0: - print "MakeHalfPartition : ", BoolOp.GetErrorCode() - return anObj - -# ----------------------------------------------------------------------------- -# Transform objects -# ----------------------------------------------------------------------------- - -def MakeTranslationTwoPoints(aShape,point1,point2): - anObj = TrsfOp.TranslateTwoPointsCopy(aShape,point1,point2) - if TrsfOp.IsDone() == 0: - print "TranslateTwoPointsCopy : ", TrsfOp.GetErrorCode() - return anObj - -def MakeTranslation(aShape,dx,dy,dz): - anObj = TrsfOp.TranslateDXDYDZCopy(aShape,dx,dy,dz) - if TrsfOp.IsDone() == 0: - print "TranslateDXDYDZCopy : ", TrsfOp.GetErrorCode() - return anObj - -def MakeTranslationVector(theObject, theVector): - anObj = TrsfOp.TranslateVectorCopy(theObject, theVector) - if TrsfOp.IsDone() == 0: - print "TranslateVectorCopy : ", TrsfOp.GetErrorCode() - return anObj - -def MakeRotation(aShape,axis,angle): - anObj = TrsfOp.RotateCopy(aShape,axis,angle) - if TrsfOp.IsDone() == 0: - print "RotateCopy : ", TrsfOp.GetErrorCode() - return anObj - -def MakeRotationThreePoints(aShape, centpoint, point1, point2): - anObj = TrsfOp.RotateThreePointsCopy(aShape, centpoint, point1, point2) - if TrsfOp.IsDone() == 0: - print "RotateThreePointsCopy : ", TrsfOp.GetErrorCode() - return anObj - -def MakeScaleTransform(aShape,theCenterofScale,factor): - anObj = TrsfOp.ScaleShapeCopy(aShape,theCenterofScale,factor) - if TrsfOp.IsDone() == 0: - print "ScaleShapeCopy : ", TrsfOp.GetErrorCode() - return anObj - -def MakeMirrorByPlane(aShape,aPlane): - anObj = TrsfOp.MirrorPlaneCopy(aShape,aPlane) - if TrsfOp.IsDone() == 0: - print "MirrorPlaneCopy : ", TrsfOp.GetErrorCode() - return anObj - -def MakeMirrorByAxis(theObject, theAxis): - anObj = TrsfOp.MirrorAxisCopy(theObject, theAxis) - if TrsfOp.IsDone() == 0: - print "MirrorAxisCopy : ", TrsfOp.GetErrorCode() - return anObj - -def MakeMirrorByPoint(theObject, thePoint): - anObj = TrsfOp.MirrorPointCopy(theObject, thePoint) - if TrsfOp.IsDone() == 0: - print "MirrorPointCopy : ", TrsfOp.GetErrorCode() - return anObj - -def MakePosition(aShape,theStartLCS,theEndLCS): - anObj = TrsfOp.PositionShapeCopy(aShape,theStartLCS,theEndLCS) - if TrsfOp.IsDone() == 0: - print "PositionShapeCopy : ", TrsfOp.GetErrorCode() - return anObj - -def MakeOffset(aShape, anOffset): - anObj = TrsfOp.OffsetShapeCopy(aShape, anOffset) - if TrsfOp.IsDone() == 0: - print "OffsetShapeCopy : ", TrsfOp.GetErrorCode() - return anObj - -# ----------------------------------------------------------------------------- -# Patterns -# ----------------------------------------------------------------------------- - -def MakeMultiTranslation1D(aShape,aDir,aStep,aNbTimes): - anObj = TrsfOp.MultiTranslate1D(aShape,aDir,aStep,aNbTimes) - if TrsfOp.IsDone() == 0: - print "MultiTranslate1D : ", TrsfOp.GetErrorCode() - return anObj - -def MakeMultiTranslation2D(aShape,d1,step1,nbtimes1,d2,step2,nbtimes2): - anObj = TrsfOp.MultiTranslate2D(aShape,d1,step1,nbtimes1,d2,step2,nbtimes2) - if TrsfOp.IsDone() == 0: - print "MultiTranslate2D : ", TrsfOp.GetErrorCode() - return anObj - -def MultiRotate1D(aShape,aVec,aNbTimes): - anObj = TrsfOp.MultiRotate1D(aShape,aVec,aNbTimes) - if TrsfOp.IsDone() == 0: - print "MultiRotate1D : ", TrsfOp.GetErrorCode() - return anObj - -def MultiRotate2D(aShape,aVec,anAngle,nbtimes1,aStep,nbtimes2): - anObj = TrsfOp.MultiRotate2D(aShape,aVec,anAngle,nbtimes1,aStep,nbtimes2) - if TrsfOp.IsDone() == 0: - print "MultiRotate2D : ", TrsfOp.GetErrorCode() - return anObj - -def MakeMultiRotation1D(aShape,aDir,aPoint,aNbTimes): - aVec = MakeLine(aPoint,aDir) - anObj = MultiRotate1D(aShape,aVec,aNbTimes) - return anObj - -def MakeMultiRotation2D(aShape,aDir,aPoint,anAngle,nbtimes1,aStep,nbtimes2): - aVec = MakeLine(aPoint,aDir) - anObj = MultiRotate2D(aShape,aVec,anAngle,nbtimes1,aStep,nbtimes2) - return anObj - -# ----------------------------------------------------------------------------- -# Local operations -# ----------------------------------------------------------------------------- - -def MakeFilletAll(aShape,radius): - anObj = LocalOp.MakeFilletAll(aShape,radius) - if LocalOp.IsDone() == 0: - print "MakeFilletAll : ", LocalOp.GetErrorCode() - return anObj - -def MakeFillet(aShape,radius,aShapeType,ListShape): - anObj = None - if aShapeType == ShapeType["EDGE"]: - anObj = LocalOp.MakeFilletEdges(aShape,radius,ListShape) - else: - anObj = LocalOp.MakeFilletFaces(aShape,radius,ListShape) - if LocalOp.IsDone() == 0: - print "MakeFillet : ", LocalOp.GetErrorCode() - return anObj - -def MakeFilletR1R2(aShape,radius1,radius2,aShapeType,ListShape): - anObj = None - if aShapeType == ShapeType["EDGE"]: - anObj = LocalOp.MakeFilletEdgesR1R2(aShape,radius1,radius2,ListShape) - else: - anObj = LocalOp.MakeFilletFacesR1R2(aShape,radius1,radius2,ListShape) - if LocalOp.IsDone() == 0: - print "MakeFilletR1R2 : ", LocalOp.GetErrorCode() - return anObj - -def MakeChamferAll(aShape,d): - anObj = LocalOp.MakeChamferAll(aShape,d) - if LocalOp.IsDone() == 0: - print "MakeChamferAll : ", LocalOp.GetErrorCode() - return anObj - -def MakeChamferEdge(aShape,d1,d2,face1,face2): - anObj = LocalOp.MakeChamferEdge(aShape,d1,d2,face1,face2) - if LocalOp.IsDone() == 0: - print "MakeChamferEdge : ", LocalOp.GetErrorCode() - return anObj - -def MakeChamferEdgeAD(aShape,d,angle,face1,face2): - anObj = LocalOp.MakeChamferEdgeAD(aShape,d,angle,face1,face2) - if LocalOp.IsDone() == 0: - print "MakeChamferEdgeAD : ", LocalOp.GetErrorCode() - return anObj - -def MakeChamferFaces(aShape,d1,d2,ListShape): - anObj = LocalOp.MakeChamferFaces(aShape,d1,d2,ListShape) - if LocalOp.IsDone() == 0: - print "MakeChamferFaces : ", LocalOp.GetErrorCode() - return anObj - -def MakeChamferFacesAD(aShape,d,angle,ListShape): - anObj = LocalOp.MakeChamferFacesAD(aShape,d,angle,ListShape) - if LocalOp.IsDone() == 0: - print "MakeChamferFacesAD : ", LocalOp.GetErrorCode() - return anObj - -def MakeChamferEdges(aShape,d1,d2,ListShape): - anObj = LocalOp.MakeChamferEdges(aShape,d1,d2,ListShape) - if LocalOp.IsDone() == 0: - print "MakeChamferEdges : ", LocalOp.GetErrorCode() - return anObj - -def MakeChamferEdgesAD(aShape,d,angle,ListShape): - anObj = LocalOp.MakeChamferEdgesAD(aShape,d,angle,ListShape) - if LocalOp.IsDone() == 0: - print "MakeChamferEdgesAD : ", LocalOp.GetErrorCode() - return anObj - -def MakeChamfer(aShape,d1,d2,aShapeType,ListShape): - anObj = None - if aShapeType == ShapeType["EDGE"]: - anObj = MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1]) - else: - anObj = MakeChamferFaces(aShape,d1,d2,ListShape) - return anObj - -def Archimede(aShape,weight,WaterDensity,MeshingDeflection): - anObj = LocalOp.MakeArchimede(aShape,weight,WaterDensity,MeshingDeflection) - if LocalOp.IsDone() == 0: - print "MakeArchimede : ", LocalOp.GetErrorCode() - return anObj - -# ----------------------------------------------------------------------------- -# Information objects -# ----------------------------------------------------------------------------- - -def PointCoordinates(Point): - aTuple = MeasuOp.PointCoordinates(Point) - if MeasuOp.IsDone() == 0: - print "PointCoordinates : ", MeasuOp.GetErrorCode() - return aTuple - -def BasicProperties(Shape): - aTuple = MeasuOp.GetBasicProperties(Shape) - if MeasuOp.IsDone() == 0: - print "BasicProperties : ", MeasuOp.GetErrorCode() - return aTuple - -def BoundingBox(Shape): - aTuple = MeasuOp.GetBoundingBox(Shape) - if MeasuOp.IsDone() == 0: - print "BoundingBox : ", MeasuOp.GetErrorCode() - return aTuple - -def Inertia(Shape): - aTuple = MeasuOp.GetInertia(Shape) - if MeasuOp.IsDone() == 0: - print "Inertia : ", MeasuOp.GetErrorCode() - return aTuple - -def MinDistance(Shape1, Shape2): - aTuple = MeasuOp.GetMinDistance(Shape1, Shape2) - if MeasuOp.IsDone() == 0: - print "MinDistance : ", MeasuOp.GetErrorCode() - return aTuple[0] - -def Tolerance(Shape): - aTuple = MeasuOp.GetTolerance(Shape) - if MeasuOp.IsDone() == 0: - print "Tolerance : ", MeasuOp.GetErrorCode() - return aTuple - -def WhatIs(Shape): - aDescr = MeasuOp.WhatIs(Shape) - if MeasuOp.IsDone() == 0: - print "WhatIs : ", MeasuOp.GetErrorCode() - return aDescr - -def MakeCDG(aShape): - anObj = MeasuOp.GetCentreOfMass(aShape) - if MeasuOp.IsDone() == 0: - print "GetCentreOfMass : ", MeasuOp.GetErrorCode() - return anObj - -def CheckShape(theShape, theIsCheckGeom = 0): - if theIsCheckGeom: - (IsValid, Status) = MeasuOp.CheckShapeWithGeometry(theShape) - else: - (IsValid, Status) = MeasuOp.CheckShape(theShape) - - if MeasuOp.IsDone() == 0: - print "CheckShape : ", MeasuOp.GetErrorCode() - else: - if IsValid == 0: - print Status - return IsValid - -# ----------------------------------------------------------------------------- -# Import/Export objects -# ----------------------------------------------------------------------------- - -def Import(filename, formatname): - anObj = InsertOp.Import(filename, formatname) - if InsertOp.IsDone() == 0: - print "Import : ", InsertOp.GetErrorCode() - return anObj - -def ImportBREP(theFileName): - return Import(theFileName, "BREP") - -def ImportIGES(theFileName): - return Import(theFileName, "IGES") - -def ImportSTEP(theFileName): - return Import(theFileName, "STEP") - -def Export(aShape, filename, formatname): - InsertOp.Export(aShape, filename, formatname) - if InsertOp.IsDone() == 0: - print "Export : ", InsertOp.GetErrorCode() - -def ExportBREP(theObject, theFileName): - return Export(theObject, theFileName, "BREP") - -def ExportIGES(theObject, theFileName): - return Export(theObject, theFileName, "IGES") - -def ExportSTEP(theObject, theFileName): - return Export(theObject, theFileName, "STEP") - -# ----------------------------------------------------------------------------- -# Block operations -# ----------------------------------------------------------------------------- - -def MakeQuad(E1, E2, E3, E4): - anObj = BlocksOp.MakeQuad(E1, E2, E3, E4) - if BlocksOp.IsDone() == 0: - print "MakeQuad : ", BlocksOp.GetErrorCode() - return anObj - -def MakeQuad2Edges(E1, E2): - anObj = BlocksOp.MakeQuad2Edges(E1, E2) - if BlocksOp.IsDone() == 0: - print "MakeQuad2Edges : ", BlocksOp.GetErrorCode() - return anObj - -def MakeQuad4Vertices(V1, V2, V3, V4): - anObj = BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4) - if BlocksOp.IsDone() == 0: - print "MakeQuad4Vertices : ", BlocksOp.GetErrorCode() - return anObj - -def MakeHexa(F1, F2, F3, F4, F5, F6): - anObj = BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6) - if BlocksOp.IsDone() == 0: - print "MakeHexa : ", BlocksOp.GetErrorCode() - return anObj - -def MakeHexa2Faces(F1, F2): - anObj = BlocksOp.MakeHexa2Faces(F1, F2) - if BlocksOp.IsDone() == 0: - print "MakeHexa2Faces : ", BlocksOp.GetErrorCode() - return anObj - -def GetPoint(theShape, theX, theY, theZ, theEpsilon): - anObj = BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon) - if BlocksOp.IsDone() == 0: - print "GetPoint : ", BlocksOp.GetErrorCode() - return anObj - -def GetEdge(theShape, thePoint1, thePoint2): - anObj = BlocksOp.GetEdge(theShape, thePoint1, thePoint2) - if BlocksOp.IsDone() == 0: - print "GetEdge : ", BlocksOp.GetErrorCode() - return anObj - -def GetEdgeNearPoint(theShape, thePoint): - anObj = BlocksOp.GetEdgeNearPoint(theShape, thePoint) - if BlocksOp.IsDone() == 0: - print "GetEdgeNearPoint : ", BlocksOp.GetErrorCode() - return anObj - -def GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4): - anObj = BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4) - if BlocksOp.IsDone() == 0: - print "GetFaceByPoints : ", BlocksOp.GetErrorCode() - return anObj - -def GetFaceByEdges(theShape, theEdge1, theEdge2): - anObj = BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2) - if BlocksOp.IsDone() == 0: - print "GetFaceByEdges : ", BlocksOp.GetErrorCode() - return anObj - -def GetOppositeFace(theBlock, theFace): - anObj = BlocksOp.GetOppositeFace(theBlock, theFace) - if BlocksOp.IsDone() == 0: - print "GetOppositeFace : ", BlocksOp.GetErrorCode() - return anObj - -def GetFaceNearPoint(theShape, thePoint): - anObj = BlocksOp.GetFaceNearPoint(theShape, thePoint) - if BlocksOp.IsDone() == 0: - print "GetFaceNearPoint : ", BlocksOp.GetErrorCode() - return anObj - -def GetFaceByNormale(theBlock, theVector): - anObj = BlocksOp.GetFaceByNormale(theBlock, theVector) - if BlocksOp.IsDone() == 0: - print "GetFaceByNormale : ", BlocksOp.GetErrorCode() - return anObj - -def CheckCompoundOfBlocks(theCompound): - (IsValid, BCErrors) = BlocksOp.CheckCompoundOfBlocks(theCompound) - if BlocksOp.IsDone() == 0: - print "CheckCompoundOfBlocks : ", BlocksOp.GetErrorCode() - else: - if IsValid == 0: - Descr = BlocksOp.PrintBCErrors(theCompound, BCErrors) - print Descr - return IsValid - -def RemoveExtraEdges(theShape): - anObj = BlocksOp.RemoveExtraEdges(theShape) - if BlocksOp.IsDone() == 0: - print "RemoveExtraEdges : ", BlocksOp.GetErrorCode() - return anObj - -def CheckAndImprove(theShape): - anObj = BlocksOp.CheckAndImprove(theShape) - if BlocksOp.IsDone() == 0: - print "CheckAndImprove : ", BlocksOp.GetErrorCode() - return anObj - -def MakeBlockExplode(theCompound, theMinNbFaces, theMaxNbFaces): - aList = BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces) - if BlocksOp.IsDone() == 0: - print "MakeBlockExplode : ", BlocksOp.GetErrorCode() - return aList - -def GetBlockNearPoint(theCompound, thePoint): - anObj = BlocksOp.GetBlockNearPoint(theCompound, thePoint) - if BlocksOp.IsDone() == 0: - print "GetBlockNearPoint : ", BlocksOp.GetErrorCode() - return anObj - -def GetBlockByParts(theCompound, theParts): - anObj = BlocksOp.GetBlockByParts(theCompound, theParts) - if BlocksOp.IsDone() == 0: - print "GetBlockByParts : ", BlocksOp.GetErrorCode() - return anObj - -def GetBlocksByParts(theCompound, theParts): - aList = BlocksOp.GetBlocksByParts(theCompound, theParts) - if BlocksOp.IsDone() == 0: - print "GetBlocksByParts : ", BlocksOp.GetErrorCode() - return aList - -def MakeMultiTransformation1D(Block, DirFaceID1, DirFaceID2, NbTimes): - anObj = BlocksOp.MakeMultiTransformation1D(Block, DirFaceID1, DirFaceID2, NbTimes) - if BlocksOp.IsDone() == 0: - print "MakeMultiTransformation1D : ", BlocksOp.GetErrorCode() - return anObj - -def MakeMultiTransformation2D(Block, DirFaceID1U, DirFaceID2U, NbTimesU, - DirFaceID1V, DirFaceID2V, NbTimesV): - anObj = BlocksOp.MakeMultiTransformation2D(Block, DirFaceID1U, DirFaceID2U, NbTimesU, - DirFaceID1V, DirFaceID2V, NbTimesV) - if BlocksOp.IsDone() == 0: - print "MakeMultiTransformation2D : ", BlocksOp.GetErrorCode() - return anObj - -def Propagate(theShape): - listChains = BlocksOp.Propagate(theShape) - if BlocksOp.IsDone() == 0: - print "Propagate : ", BlocksOp.GetErrorCode() - return listChains - -# ----------------------------------------------------------------------------- -# Group operations -# ----------------------------------------------------------------------------- - -def CreateGroup(MainShape, ShapeType): - anObj = GroupOp.CreateGroup(MainShape, ShapeType) - if GroupOp.IsDone() == 0: - print "CreateGroup : ", GroupOp.GetErrorCode() - return anObj - -def AddObject(Group, SubShapeID): - GroupOp.AddObject(Group, SubShapeID) - if GroupOp.IsDone() == 0: - print "AddObject : ", GroupOp.GetErrorCode() - -def RemoveObject(Group, SubShapeID): - GroupOp.RemoveObject(Group, SubShapeID) - if GroupOp.IsDone() == 0: - print "RemoveObject : ", GroupOp.GetErrorCode() - -def UnionList (theGroup, theSubShapes): - GroupOp.UnionList(theGroup, theSubShapes) - if GroupOp.IsDone() == 0: - print "UnionList : ", GroupOp.GetErrorCode() - -def UnionIDs(theGroup, theSubShapes): - GroupOp.UnionIDs(theGroup, theSubShapes) - if GroupOp.IsDone() == 0: - print "UnionIDs : ", GroupOp.GetErrorCode() - -def DifferenceList (theGroup, theSubShapes): - GroupOp.DifferenceList(theGroup, theSubShapes) - if GroupOp.IsDone() == 0: - print "DifferenceList : ", GroupOp.GetErrorCode() - -def DifferenceIDs(theGroup, theSubShapes): - GroupOp.DifferenceIDs(theGroup, theSubShapes) - if GroupOp.IsDone() == 0: - print "DifferenceIDs : ", GroupOp.GetErrorCode() - -def GetObjectIDs(Group): - ListIDs = GroupOp.GetObjects(Group) - if GroupOp.IsDone() == 0: - print "GetObjectIDs : ", GroupOp.GetErrorCode() - return ListIDs - -def GetType(theGroup): - aType = GroupOp.GetType(theGroup) - if GroupOp.IsDone() == 0: - print "GetType : ", GroupOp.GetErrorCode() - return aType - -def GetMainShape(theGroup): - anObj = GroupOp.GetMainShape(theGroup) - if GroupOp.IsDone() == 0: - print "GetMainShape : ", GroupOp.GetErrorCode() - return anObj - -def GetEdgesByLength (theShape, min_length, max_length, include_min = 1, include_max = 1): - """ - Create group of edges of theShape, whose length is in range [min_length, max_length]. - If include_min/max == 0, edges with length == min/max_length will not be included in result. - """ - - edges = SubShapeAll(theShape, ShapeType["EDGE"]) - edges_in_range = [] - for edge in edges: - Props = BasicProperties(edge) - if min_length <= Props[0] and Props[0] <= max_length: - if (not include_min) and (min_length == Props[0]): - skip = 1 - else: - if (not include_max) and (Props[0] == max_length): - skip = 1 - else: - edges_in_range.append(edge) - - if len(edges_in_range) <= 0: - print "No edges found by given criteria" - return 0 - - group_edges = CreateGroup(theShape, ShapeType["EDGE"]) - UnionList(group_edges, edges_in_range) - - return group_edges - -# Add Path to the system path -# -def addPath(Path): - if (sys.path.count(Path) < 1): - sys.path.append(Path) +# From Salome version 3.2.0 geompy package suits for work in batch mode +from geompy import * diff --git a/src/GEOM_SWIG/geompyDC.py b/src/GEOM_SWIG/geompyDC.py index 5853af966..65fde5c8a 100644 --- a/src/GEOM_SWIG/geompyDC.py +++ b/src/GEOM_SWIG/geompyDC.py @@ -17,7 +17,7 @@ # 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 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # # # @@ -25,37 +25,80 @@ # Author : Paul RASCLE, EDF # Module : GEOM # $Header$ + """ \namespace geompy \brief Module geompy """ +## @defgroup l1_geompy_auxiliary Auxiliary data structures and methods + +## @defgroup l1_geompy_purpose All package methods, grouped by their purpose +## @{ +## @defgroup l2_import_export Importing/exporting geometrical objects +## @defgroup l2_creating Creating geometrical objects +## @{ +## @defgroup l3_basic_go Creating Basic Geometric Objects +## @{ +## @defgroup l4_curves Creating Curves + +## @} +## @defgroup l3_3d_primitives Creating 3D Primitives +## @defgroup l3_complex Creating Complex Objects +## @defgroup l3_groups Working with groups +## @defgroup l3_blocks Building by blocks +## @{ +## @defgroup l4_blocks_measure Check and Improve + +## @} +## @defgroup l3_sketcher Sketcher +## @defgroup l3_advanced Creating Advanced Geometrical Objects +## @{ +## @defgroup l4_decompose Decompose objects +## @defgroup l4_access Access to sub-shapes by their unique IDs inside the main shape +## @defgroup l4_obtain Access to subshapes by a criteria + +## @} + +## @} +## @defgroup l2_transforming Transforming geometrical objects +## @{ +## @defgroup l3_basic_op Basic Operations +## @defgroup l3_boolean Boolean Operations +## @defgroup l3_transform Transformation Operations +## @defgroup l3_local Local Operations (Fillet and Chamfer) +## @defgroup l3_blocks_op Blocks Operations +## @defgroup l3_healing Repairing Operations +## @defgroup l3_restore_ss Restore presentation parameters and a tree of subshapes + +## @} +## @defgroup l2_measure Using measurement tools + +## @} + import salome salome.salome_init() from salome import * import GEOM +import math -# ----------------------------------------------------------------------------- -# enumeration ShapeType as a dictionary -# ----------------------------------------------------------------------------- - +## Enumeration ShapeType as a dictionary +# @ingroup l1_geompy_auxiliary ShapeType = {"COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8} -# ----------------------------------------------------------------------------- -# Raise an Error Function if Operation is Failed -# ----------------------------------------------------------------------------- +## Raise an Error, containing the Method_name, if Operation is Failed +## @ingroup l1_geompy_auxiliary def RaiseIfFailed (Method_name, Operation): - #NPAL18017#if Operation.IsDone() == 0: if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY": raise RuntimeError, Method_name + " : " + Operation.GetErrorCode() -# ----------------------------------------------------------------------------- -# enumeration shape_kind -# ----------------------------------------------------------------------------- - +## Kinds of shape enumeration +# @ingroup l1_geompy_auxiliary kind = GEOM.GEOM_IKindOfShape +## Information about closed/unclosed state of shell or wire +# @ingroup l1_geompy_auxiliary class info: UNKNOWN = 0 CLOSED = 1 @@ -63,12 +106,15 @@ class info: class geompyDC(GEOM._objref_GEOM_Gen): + + ## @addtogroup l1_geompy_auxiliary + ## @{ def __init__(self): GEOM._objref_GEOM_Gen.__init__(self) self.myBuilder = None self.myStudyId = 0 self.father = None - + self.BasicOp = None self.CurvesOp = None self.PrimOp = None @@ -111,11 +157,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): self.BlocksOp = self.GetIBlocksOperations (self.myStudyId) self.GroupOp = self.GetIGroupOperations (self.myStudyId) pass - + ## Get name for sub-shape aSubObj of shape aMainObj # - # Example: see GEOM_TestAll.py + # @ref swig_SubShapeAllSorted "Example" def SubShapeName(self,aSubObj, aMainObj): + # Example: see GEOM_TestAll.py + #aSubId = orb.object_to_string(aSubObj) #aMainId = orb.object_to_string(aMainObj) #index = gg.getIndexTopology(aSubId, aMainId) @@ -123,45 +171,94 @@ class geompyDC(GEOM._objref_GEOM_Gen): index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj) name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index) return name - + ## Publish in study aShape with name aName # - # Example: see GEOM_TestAll.py - def addToStudy(self,aShape, aName): + # \param aShape the shape to be published + # \param aName the name for the shape + # \param doRestoreSubShapes if True, finds and publishes also + # sub-shapes of aShape, corresponding to its arguments + # and published sub-shapes of arguments + # \param theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes for + # these arguments description + # \return study entry of the published shape in form of string + # + # @ref swig_MakeQuad4Vertices "Example" + def addToStudy(self, aShape, aName, doRestoreSubShapes=False, + theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False): + # Example: see GEOM_TestAll.py try: aSObject = self.AddInStudy(self.myStudy, aShape, aName, None) + if doRestoreSubShapes: + self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs, + theFindMethod, theInheritFirstArg) except: print "addToStudy() failed" return "" return aShape.GetStudyEntry() - + ## Publish in study aShape with name aName as sub-object of previously published aFather # - # Example: see GEOM_TestAll.py - def addToStudyInFather(self,aFather, aShape, aName): + # @ref swig_SubShapeAllSorted "Example" + def addToStudyInFather(self, aFather, aShape, aName): + # Example: see GEOM_TestAll.py try: aSObject = self.AddInStudy(myStudy, aShape, aName, aFather) except: print "addToStudyInFather() failed" return "" return aShape.GetStudyEntry() - - # ----------------------------------------------------------------------------- - # Basic primitives - # ----------------------------------------------------------------------------- - + + # end of l1_geompy_auxiliary + ## @} + + ## @addtogroup l3_restore_ss + ## @{ + + ## Publish sub-shapes, standing for arguments and sub-shapes of arguments + # To be used from python scripts out of geompy.addToStudy (non-default usage) + # \param theObject published GEOM object, arguments of which will be published + # \param theArgs list of GEOM_Object, operation arguments to be published. + # If this list is empty, all operation arguments will be published + # \param theFindMethod method to search subshapes, corresponding to arguments and + # their subshapes. Value from enumeration GEOM::find_shape_method. + # \param theInheritFirstArg set properties of the first argument for theObject. + # Do not publish subshapes in place of arguments, but only + # in place of subshapes of the first argument, + # because the whole shape corresponds to the first argument. + # Mainly to be used after transformations, but it also can be + # usefull after partition with one object shape, and some other + # operations, where only the first argument has to be considered. + # If theObject has only one argument shape, this flag is automatically + # considered as True, not regarding really passed value. + # \return True in case of success, False otherwise. + # + # @ref tui_restore_prs_params "Example" + def RestoreSubShapes (self, theObject, theArgs=[], + theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False): + # Example: see GEOM_TestAll.py + return self.RestoreSubShapesO(self.myStudy, theObject, theArgs, + theFindMethod, theInheritFirstArg) + + # end of l3_restore_ss + ## @} + + ## @addtogroup l3_basic_go + ## @{ + ## Create point by three coordinates. # @param theX The X coordinate of the point. # @param theY The Y coordinate of the point. # @param theZ The Z coordinate of the point. # @return New GEOM_Object, containing the created point. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_point "Example" def MakeVertex(self,theX, theY, theZ): + # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ) RaiseIfFailed("MakePointXYZ", self.BasicOp) return anObj - + ## Create a point, distant from the referenced point # on the given distances along the coordinate axes. # @param theReference The referenced point. @@ -170,99 +267,123 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theZ Displacement from the referenced point along OZ axis. # @return New GEOM_Object, containing the created point. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_point "Example" def MakeVertexWithRef(self,theReference, theX, theY, theZ): + # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ) RaiseIfFailed("MakePointWithReference", self.BasicOp) return anObj - + ## Create a point, corresponding to the given parameter on the given curve. # @param theRefCurve The referenced curve. # @param theParameter Value of parameter on the referenced curve. # @return New GEOM_Object, containing the created point. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_point "Example" def MakeVertexOnCurve(self,theRefCurve, theParameter): + # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter) RaiseIfFailed("MakePointOnCurve", self.BasicOp) return anObj + ## Create a point, corresponding to the given parameters on the + # given surface. + # @param theRefSurf The referenced surface. + # @param theUParameter Value of U-parameter on the referenced surface. + # @param theVParameter Value of V-parameter on the referenced surface. + # @return New GEOM_Object, containing the created point. + # + # @ref swig_MakeVertexOnSurface "Example" + def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter): + # Example: see GEOM_TestAll.py + anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter) + RaiseIfFailed("MakePointOnSurface", self.BasicOp) + return anObj + ## Create a point on intersection of two lines. # @param theRefLine1, theRefLine2 The referenced lines. # @return New GEOM_Object, containing the created point. # - # Example: see GEOM_TestAll.py + # @ref swig_MakeVertexOnLinesIntersection "Example" def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2): + # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2) RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp) return anObj - + ## Create a tangent, corresponding to the given parameter on the given curve. # @param theRefCurve The referenced curve. # @param theParameter Value of parameter on the referenced curve. # @return New GEOM_Object, containing the created tangent. - def MakeTangentOnCurve(self,theRefCurve, theParameter): + # + # @ref swig_MakeTangentOnCurve "Example" + def MakeTangentOnCurve(self, theRefCurve, theParameter): anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter) RaiseIfFailed("MakeTangentOnCurve", self.BasicOp) return anObj - + ## Create a vector with the given components. # @param theDX X component of the vector. # @param theDY Y component of the vector. # @param theDZ Z component of the vector. # @return New GEOM_Object, containing the created vector. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_vector "Example" def MakeVectorDXDYDZ(self,theDX, theDY, theDZ): + # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ) RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp) return anObj - + ## Create a vector between two points. # @param thePnt1 Start point for the vector. # @param thePnt2 End point for the vector. # @return New GEOM_Object, containing the created vector. - - # Example: see GEOM_TestAll.py + # + # @ref tui_creation_vector "Example" def MakeVector(self,thePnt1, thePnt2): + # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2) RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp) return anObj - + ## Create a line, passing through the given point # and parrallel to the given direction # @param thePnt Point. The resulting line will pass through it. # @param theDir Direction. The resulting line will be parallel to it. # @return New GEOM_Object, containing the created line. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_line "Example" def MakeLine(self,thePnt, theDir): + # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakeLine(thePnt, theDir) RaiseIfFailed("MakeLine", self.BasicOp) return anObj - + ## Create a line, passing through the given points # @param thePnt1 First of two points, defining the line. # @param thePnt2 Second of two points, defining the line. # @return New GEOM_Object, containing the created line. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_line "Example" def MakeLineTwoPnt(self,thePnt1, thePnt2): + # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2) RaiseIfFailed("MakeLineTwoPnt", self.BasicOp) return anObj - ## Create a line on two faces intersection. + ## Create a line on two faces intersection. # @param theFace1 First of two faces, defining the line. # @param theFace2 Second of two faces, defining the line. # @return New GEOM_Object, containing the created line. # - # Example: see GEOM_TestAll.py + # @ref swig_MakeLineTwoFaces "Example" def MakeLineTwoFaces(self, theFace1, theFace2): + # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2) RaiseIfFailed("MakeLineTwoFaces", self.BasicOp) return anObj - + ## Create a plane, passing through the given point # and normal to the given vector. # @param thePnt Point, the plane has to pass through. @@ -270,12 +391,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theTrimSize Half size of a side of quadrangle face, representing the plane. # @return New GEOM_Object, containing the created plane. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_plane "Example" def MakePlane(self,thePnt, theVec, theTrimSize): + # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize) RaiseIfFailed("MakePlanePntVec", self.BasicOp) return anObj - + ## Create a plane, passing through the three given points # @param thePnt1 First of three points, defining the plane. # @param thePnt2 Second of three points, defining the plane. @@ -283,41 +405,46 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theTrimSize Half size of a side of quadrangle face, representing the plane. # @return New GEOM_Object, containing the created plane. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_plane "Example" def MakePlaneThreePnt(self,thePnt1, thePnt2, thePnt3, theTrimSize): + # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize) RaiseIfFailed("MakePlaneThreePnt", self.BasicOp) return anObj - + ## Create a plane, similar to the existing one, but with another size of representing face. # @param theFace Referenced plane or LCS(Marker). # @param theTrimSize New half size of a side of quadrangle face, representing the plane. # @return New GEOM_Object, containing the created plane. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_plane "Example" def MakePlaneFace(self,theFace, theTrimSize): + # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize) RaiseIfFailed("MakePlaneFace", self.BasicOp) return anObj - + ## Create a local coordinate system. # @param OX,OY,OZ Three coordinates of coordinate system origin. # @param XDX,XDY,XDZ Three components of OX direction # @param YDX,YDY,YDZ Three components of OY direction # @return New GEOM_Object, containing the created coordinate system. # - # Example: see GEOM_TestAll.py - def MakeMarker(self,OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ): + # @ref swig_MakeMarker "Example" + def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ): + # Example: see GEOM_TestAll.py anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ) RaiseIfFailed("MakeMarker", self.BasicOp) return anObj - + ## Create a local coordinate system. # @param theOrigin Point of coordinate system origin. # @param theXVec Vector of X direction # @param theYVec Vector of Y direction # @return New GEOM_Object, containing the created coordinate system. - def MakeMarkerPntTwoVec(self,theOrigin, theXVec, theYVec): + # + # @ref swig_MakeMarker "Example" + def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec): O = self.PointCoordinates( theOrigin ) OXOY = [] for vec in [ theXVec, theYVec ]: @@ -332,53 +459,60 @@ class geompyDC(GEOM._objref_GEOM_Gen): OXOY[3], OXOY[4], OXOY[5], ) RaiseIfFailed("MakeMarker", self.BasicOp) return anObj - - # ----------------------------------------------------------------------------- - # Curves - # ----------------------------------------------------------------------------- - + + # end of l3_basic_go + ## @} + + ## @addtogroup l4_curves + ## @{ + ## Create an arc of circle, passing through three given points. # @param thePnt1 Start point of the arc. # @param thePnt2 Middle point of the arc. # @param thePnt3 End point of the arc. # @return New GEOM_Object, containing the created arc. # - # Example: see GEOM_TestAll.py + # @ref swig_MakeArc "Example" def MakeArc(self,thePnt1, thePnt2, thePnt3): + # Example: see GEOM_TestAll.py anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3) RaiseIfFailed("MakeArc", self.CurvesOp) return anObj - + ## Create an arc of circle from a center and 2 points. # @param thePnt1 Center of the arc # @param thePnt2 Start point of the arc. (Gives also the radius of the arc) # @param thePnt3 End point of the arc (Gives also a direction) + # @param theSense Orientation of the arc # @return New GEOM_Object, containing the created arc. # - # Example: see GEOM_TestAll.py - def MakeArcCenter(self,thePnt1, thePnt2, thePnt3,theSense): - anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3,theSense) + # @ref swig_MakeArc "Example" + def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False): + # Example: see GEOM_TestAll.py + anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense) RaiseIfFailed("MakeArcCenter", self.CurvesOp) return anObj - + ## Create a circle with given center, normal vector and radius. # @param thePnt Circle center. # @param theVec Vector, normal to the plane of the circle. # @param theR Circle radius. # @return New GEOM_Object, containing the created circle. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_circle "Example" def MakeCircle(self,thePnt, theVec, theR): + # Example: see GEOM_TestAll.py anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR) RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp) return anObj - + ## Create a circle, passing through three given points # @param thePnt1,thePnt2,thePnt3 Points, defining the circle. # @return New GEOM_Object, containing the created circle. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_circle "Example" def MakeCircleThreePnt(self,thePnt1, thePnt2, thePnt3): + # Example: see GEOM_TestAll.py anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3) RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp) return anObj @@ -389,12 +523,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param thePnt1,thePnt2,thePnt3 Points, defining the circle. # @return New GEOM_Object, containing the created circle. # - # Example: see GEOM_example6.py + # @ref swig_MakeCircle "Example" def MakeCircleCenter2Pnt(self,thePnt1, thePnt2, thePnt3): + # Example: see GEOM_example6.py anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3) RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp) return anObj - + ## Create an ellipse with given center, normal vector and radiuses. # @param thePnt Ellipse center. # @param theVec Vector, normal to the plane of the ellipse. @@ -402,44 +537,54 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theRMinor Minor ellipse radius. # @return New GEOM_Object, containing the created ellipse. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_ellipse "Example" def MakeEllipse(self,thePnt, theVec, theRMajor, theRMinor): + # Example: see GEOM_TestAll.py anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor) RaiseIfFailed("MakeEllipse", self.CurvesOp) return anObj - + ## Create a polyline on the set of points. # @param thePoints Sequence of points for the polyline. # @return New GEOM_Object, containing the created polyline. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_curve "Example" def MakePolyline(self,thePoints): + # Example: see GEOM_TestAll.py anObj = self.CurvesOp.MakePolyline(thePoints) RaiseIfFailed("MakePolyline", self.CurvesOp) return anObj - + ## Create bezier curve on the set of points. # @param thePoints Sequence of points for the bezier curve. # @return New GEOM_Object, containing the created bezier curve. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_curve "Example" def MakeBezier(self,thePoints): + # Example: see GEOM_TestAll.py anObj = self.CurvesOp.MakeSplineBezier(thePoints) RaiseIfFailed("MakeSplineBezier", self.CurvesOp) return anObj - + ## Create B-Spline curve on the set of points. # @param thePoints Sequence of points for the B-Spline curve. # @return New GEOM_Object, containing the created B-Spline curve. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_curve "Example" def MakeInterpol(self,thePoints): + # Example: see GEOM_TestAll.py anObj = self.CurvesOp.MakeSplineInterpolation(thePoints) RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp) return anObj - + + # end of l4_curves + ## @} + + ## @addtogroup l3_sketcher + ## @{ + ## Create a sketcher (wire or face), following the textual description, - # passed through \a theCommand argument. \n + # passed through theCommand argument. \n # Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n # Format of the description string have to be the following: # @@ -471,36 +616,42 @@ class geompyDC(GEOM._objref_GEOM_Gen): # OZ and OX directions of the working plane. # @return New GEOM_Object, containing the created wire. # - # Example: see GEOM_TestAll.py - def MakeSketcher(self,theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0]): + # @ref tui_sketcher_page "Example" + def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0]): + # Example: see GEOM_TestAll.py anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane) RaiseIfFailed("MakeSketcher", self.CurvesOp) return anObj - + ## Create a sketcher (wire or face), following the textual description, - # passed through \a theCommand argument. \n + # passed through theCommand argument. \n # For format of the description string see the previous method.\n # @param theCommand String, defining the sketcher in local # coordinates of the working plane. # @param theWorkingPlane Planar Face or LCS(Marker) of the working plane. # @return New GEOM_Object, containing the created wire. - def MakeSketcherOnPlane(self,theCommand, theWorkingPlane): + # + # @ref tui_sketcher_page "Example" + def MakeSketcherOnPlane(self, theCommand, theWorkingPlane): anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane) RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp) return anObj - - # ----------------------------------------------------------------------------- - # Create 3D Primitives - # ----------------------------------------------------------------------------- - + + # end of l3_sketcher + ## @} + + ## @addtogroup l3_3d_primitives + ## @{ + ## Create a box by coordinates of two opposite vertices. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_box "Example" def MakeBox(self,x1,y1,z1,x2,y2,z2): + # Example: see GEOM_TestAll.py pnt1 = self.MakeVertex(x1,y1,z1) pnt2 = self.MakeVertex(x2,y2,z2) return self.MakeBoxTwoPnt(pnt1,pnt2) - + ## Create a box with specified dimensions along the coordinate axes # and with edges, parallel to the coordinate axes. # Center of the box will be at point (DX/2, DY/2, DZ/2). @@ -509,24 +660,26 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theDZ Length of Box edges, parallel to OZ axis. # @return New GEOM_Object, containing the created box. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_box "Example" def MakeBoxDXDYDZ(self,theDX, theDY, theDZ): + # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ) RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp) return anObj - + ## Create a box with two specified opposite vertices, # and with edges, parallel to the coordinate axes # @param thePnt1 First of two opposite vertices. # @param thePnt2 Second of two opposite vertices. # @return New GEOM_Object, containing the created box. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_box "Example" def MakeBoxTwoPnt(self,thePnt1, thePnt2): + # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2) RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp) return anObj - + ## Create a cylinder with given base point, axis, radius and height. # @param thePnt Central point of cylinder base. # @param theAxis Cylinder axis. @@ -534,12 +687,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theH Cylinder height. # @return New GEOM_Object, containing the created cylinder. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_cylinder "Example" def MakeCylinder(self,thePnt, theAxis, theR, theH): + # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH) RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp) return anObj - + ## Create a cylinder with given radius and height at # the origin of coordinate system. Axis of the cylinder # will be collinear to the OZ axis of the coordinate system. @@ -547,30 +701,33 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theH Cylinder height. # @return New GEOM_Object, containing the created cylinder. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_cylinder "Example" def MakeCylinderRH(self,theR, theH): + # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakeCylinderRH(theR, theH) RaiseIfFailed("MakeCylinderRH", self.PrimOp) return anObj - + ## Create a sphere with given center and radius. # @param thePnt Sphere center. # @param theR Sphere radius. # @return New GEOM_Object, containing the created sphere. # - # Example: see GEOM_TestAll.py - def MakeSpherePntR(self,thePnt, theR): + # @ref tui_creation_sphere "Example" + def MakeSpherePntR(self, thePnt, theR): + # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakeSpherePntR(thePnt, theR) RaiseIfFailed("MakeSpherePntR", self.PrimOp) return anObj - + ## Create a sphere with given center and radius. # @param x,y,z Coordinates of sphere center. # @param theR Sphere radius. # @return New GEOM_Object, containing the created sphere. # - # Example: see GEOM_TestAll.py - def MakeSphere(self,x, y, z, theR): + # @ref tui_creation_sphere "Example" + def MakeSphere(self, x, y, z, theR): + # Example: see GEOM_TestAll.py point = self.MakeVertex(x, y, z) anObj = self.MakeSpherePntR(point, theR) return anObj @@ -579,12 +736,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theR Sphere radius. # @return New GEOM_Object, containing the created sphere. # - # Example: see GEOM_TestAll.py - def MakeSphereR(self,theR): + # @ref tui_creation_sphere "Example" + def MakeSphereR(self, theR): + # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakeSphereR(theR) RaiseIfFailed("MakeSphereR", self.PrimOp) return anObj - + ## Create a cone with given base point, axis, height and radiuses. # @param thePnt Central point of the first cone base. # @param theAxis Cone axis. @@ -595,12 +753,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theH Cone height. # @return New GEOM_Object, containing the created cone. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_cone "Example" def MakeCone(self,thePnt, theAxis, theR1, theR2, theH): + # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH) RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp) return anObj - + ## Create a cone with given height and radiuses at # the origin of coordinate system. Axis of the cone will # be collinear to the OZ axis of the coordinate system. @@ -611,12 +770,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theH Cone height. # @return New GEOM_Object, containing the created cone. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_cone "Example" def MakeConeR1R2H(self,theR1, theR2, theH): + # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH) RaiseIfFailed("MakeConeR1R2H", self.PrimOp) return anObj - + ## Create a torus with given center, normal vector and radiuses. # @param thePnt Torus central point. # @param theVec Torus axis of symmetry. @@ -624,35 +784,44 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theRMinor Torus minor radius. # @return New GEOM_Object, containing the created torus. # - # Example: see GEOM_TestAll.py - def MakeTorus(self,thePnt, theVec, theRMajor, theRMinor): + # @ref tui_creation_torus "Example" + def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor): + # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor) RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp) return anObj - + ## Create a torus with given radiuses at the origin of coordinate system. # @param theRMajor Torus major radius. # @param theRMinor Torus minor radius. # @return New GEOM_Object, containing the created torus. # - # Example: see GEOM_TestAll.py - def MakeTorusRR(self,theRMajor, theRMinor): + # @ref tui_creation_torus "Example" + def MakeTorusRR(self, theRMajor, theRMinor): + # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor) RaiseIfFailed("MakeTorusRR", self.PrimOp) return anObj - + + # end of l3_3d_primitives + ## @} + + ## @addtogroup l3_complex + ## @{ + ## Create a shape by extrusion of the base shape along a vector, defined by two points. # @param theBase Base shape to be extruded. # @param thePoint1 First end of extrusion vector. # @param thePoint2 Second end of extrusion vector. # @return New GEOM_Object, containing the created prism. # - # Example: see GEOM_TestAll.py - def MakePrism(self,theBase, thePoint1, thePoint2): + # @ref tui_creation_prism "Example" + def MakePrism(self, theBase, thePoint1, thePoint2): + # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2) RaiseIfFailed("MakePrismTwoPnt", self.PrimOp) return anObj - + ## Create a shape by extrusion of the base shape along the vector, # i.e. all the space, transfixed by the base shape during its translation # along the vector on the given distance. @@ -661,8 +830,9 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theH Prism dimension along theVec. # @return New GEOM_Object, containing the created prism. # - # Example: see GEOM_TestAll.py - def MakePrismVecH(self,theBase, theVec, theH): + # @ref tui_creation_prism "Example" + def MakePrismVecH(self, theBase, theVec, theH): + # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH) RaiseIfFailed("MakePrismVecH", self.PrimOp) return anObj @@ -675,24 +845,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theH Prism dimension along theVec in forward direction. # @return New GEOM_Object, containing the created prism. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_prism "Example" def MakePrismVecH2Ways(self, theBase, theVec, theH): + # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH) RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp) return anObj - - ## Create a shape by extrusion of the base shape along - # the path shape. The path shape can be a wire or an edge. - # @param theBase Base shape to be extruded. - # @param thePath Path shape to extrude the base shape along it. - # @return New GEOM_Object, containing the created pipe. - # - # Example: see GEOM_TestAll.py - def MakePipe(self,theBase, thePath): - anObj = self.PrimOp.MakePipe(theBase, thePath) - RaiseIfFailed("MakePipe", self.PrimOp) - return anObj - + ## Create a shape by revolution of the base shape around the axis # on the given angle, i.e. all the space, transfixed by the base # shape during its rotation around the axis on the given angle. @@ -701,17 +860,41 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theAngle Rotation angle in radians. # @return New GEOM_Object, containing the created revolution. # - # Example: see GEOM_TestAll.py - def MakeRevolution(self,theBase, theAxis, theAngle): + # @ref tui_creation_revolution "Example" + def MakeRevolution(self, theBase, theAxis, theAngle): + # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle) RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp) return anObj + ## The Same Revolution but in both ways forward&backward. def MakeRevolution2Ways(self, theBase, theAxis, theAngle): anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle) RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp) return anObj - + + ## Create a filling from the given compound of contours. + # @param theShape the compound of contours + # @param theMinDeg a minimal degree of BSpline surface to create + # @param theMaxDeg a maximal degree of BSpline surface to create + # @param theTol2D a 2d tolerance to be reached + # @param theTol3D a 3d tolerance to be reached + # @param theNbIter a number of iteration of approximation algorithm + # @param isApprox if True, BSpline curves are generated in the process + # of surface construction. By default it is False, that means + # the surface is created using Besier curves. The usage of + # Approximation makes the algorithm work slower, but allows + # building the surface for rather complex cases + # @return New GEOM_Object, containing the created filling surface. + # + # @ref tui_creation_filling "Example" + def MakeFilling(self, theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, isApprox=0): + # Example: see GEOM_TestAll.py + anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg, + theTol2D, theTol3D, theNbIter, isApprox) + RaiseIfFailed("MakeFilling", self.PrimOp) + return anObj + ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices. # @param theSeqSections - set of specified sections. # @param theModeSolid - mode defining building solid or shell @@ -719,12 +902,26 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theRuled - mode defining type of the result surfaces (ruled or smoothed). # @return New GEOM_Object, containing the created shell or solid. # - # Example: see GEOM_TestAll.py + # @ref swig_todo "Example" def MakeThruSections(self,theSeqSections,theModeSolid,thePreci,theRuled): + # Example: see GEOM_TestAll.py anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled) RaiseIfFailed("MakeThruSections", self.PrimOp) return anObj - + + ## Create a shape by extrusion of the base shape along + # the path shape. The path shape can be a wire or an edge. + # @param theBase Base shape to be extruded. + # @param thePath Path shape to extrude the base shape along it. + # @return New GEOM_Object, containing the created pipe. + # + # @ref tui_creation_pipe "Example" + def MakePipe(self,theBase, thePath): + # Example: see GEOM_TestAll.py + anObj = self.PrimOp.MakePipe(theBase, thePath) + RaiseIfFailed("MakePipe", self.PrimOp) + return anObj + ## Create a shape by extrusion of the profile shape along # the path shape. The path shape can be a wire or an edge. # the several profiles can be specified in the several locations of path. @@ -735,10 +932,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param thePath - Path shape to extrude the base shape along it. # @param theWithContact - the mode defining that the section is translated to be in # contact with the spine. - # @param - WithCorrection - defining that the section is rotated to be - # orthogonal to the spine tangent in the correspondent point + # @param theWithCorrection - defining that the section is rotated to be + # orthogonal to the spine tangent in the correspondent point # @return New GEOM_Object, containing the created pipe. # + # @ref tui_creation_pipe_with_diff_sec "Example" def MakePipeWithDifferentSections(self, theSeqBases, theLocations, thePath, theWithContact, theWithCorrection): @@ -747,12 +945,18 @@ class geompyDC(GEOM._objref_GEOM_Gen): theWithContact, theWithCorrection) RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp) return anObj - + ## Create a shape by extrusion of the profile shape along - # the path shape. The path shape can be a shell or a face. + # the path shape. The path shape can be a wire or a edge. # the several profiles can be specified in the several locations of path. - # @param theSeqBases - list of Bases shape to be extruded. + # @param theSeqBases - list of Bases shape to be extruded. Base shape must be + # shell or face. If number of faces in neighbour sections + # aren't coincided result solid between such sections will + # be created using external boundaries of this shells. # @param theSeqSubBases - list of corresponding subshapes of section shapes. + # This list is used for searching correspondences between + # faces in the sections. Size of this list must be equal + # to size of list of base shapes. # @param theLocations - list of locations on the path corresponding # specified list of the Bases shapes. Number of locations # should be equal to number of bases. First and last @@ -761,10 +965,11 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param thePath - Path shape to extrude the base shape along it. # @param theWithContact - the mode defining that the section is translated to be in # contact with the spine. - # @param - WithCorrection - defining that the section is rotated to be - # orthogonal to the spine tangent in the correspondent point + # @param theWithCorrection - defining that the section is rotated to be + # orthogonal to the spine tangent in the correspondent point # @return New GEOM_Object, containing the created solids. # + # @ref tui_creation_pipe_with_shell_sec "Example" def MakePipeWithShellSections(self,theSeqBases, theSeqSubBases, theLocations, thePath, theWithContact, theWithCorrection): @@ -774,6 +979,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): RaiseIfFailed("MakePipeWithShellSections", self.PrimOp) return anObj + ## Create a shape by extrusion of the profile shape along + # the path shape. This function is used only for debug pipe + # functionality - it is a version of previous function + # (MakePipeWithShellSections(...)) which give a possibility to + # recieve information about creating pipe between each pair of + # sections step by step. def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases, theLocations, thePath, theWithContact, theWithCorrection): @@ -799,115 +1010,133 @@ class geompyDC(GEOM._objref_GEOM_Gen): res.append(anObj) pass pass - + resc = self.MakeCompound(res) #resc = self.MakeSewing(res, 0.001) #print "resc: ",resc return resc - + ## Create solids between given sections # @param theSeqBases - list of sections (shell or face). # @param theLocations - list of corresponding vertexes # @return New GEOM_Object, containing the created solids. # + # @ref tui_creation_pipe_without_path "Example" def MakePipeShellsWithoutPath(self, theSeqBases, theLocations): anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations) RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp) return anObj - - - # ----------------------------------------------------------------------------- - # Create base shapes - # ----------------------------------------------------------------------------- - + + # end of l3_complex + ## @} + + ## @addtogroup l3_advanced + ## @{ + ## Create a linear edge with specified ends. # @param thePnt1 Point for the first end of edge. # @param thePnt2 Point for the second end of edge. # @return New GEOM_Object, containing the created edge. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_edge "Example" def MakeEdge(self,thePnt1, thePnt2): + # Example: see GEOM_TestAll.py anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2) RaiseIfFailed("MakeEdge", self.ShapesOp) return anObj - + ## Create a wire from the set of edges and wires. # @param theEdgesAndWires List of edges and/or wires. # @return New GEOM_Object, containing the created wire. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_wire "Example" def MakeWire(self,theEdgesAndWires): + # Example: see GEOM_TestAll.py anObj = self.ShapesOp.MakeWire(theEdgesAndWires) RaiseIfFailed("MakeWire", self.ShapesOp) return anObj - + ## Create a face on the given wire. # @param theWire closed Wire or Edge to build the face on. # @param isPlanarWanted If TRUE, only planar face will be built. # If impossible, NULL object will be returned. # @return New GEOM_Object, containing the created face. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_face "Example" def MakeFace(self,theWire, isPlanarWanted): + # Example: see GEOM_TestAll.py anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted) RaiseIfFailed("MakeFace", self.ShapesOp) return anObj - + ## Create a face on the given wires set. # @param theWires List of closed wires or edges to build the face on. # @param isPlanarWanted If TRUE, only planar face will be built. # If impossible, NULL object will be returned. # @return New GEOM_Object, containing the created face. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_face "Example" def MakeFaceWires(self,theWires, isPlanarWanted): + # Example: see GEOM_TestAll.py anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted) RaiseIfFailed("MakeFaceWires", self.ShapesOp) return anObj - + ## Shortcut to MakeFaceWires() # - # Example: see GEOM_TestOthers.py + # @ref tui_creation_face "Example 1" + # \n @ref swig_MakeFaces "Example 2" def MakeFaces(self,theWires, isPlanarWanted): + # Example: see GEOM_TestOthers.py anObj = self.MakeFaceWires(theWires, isPlanarWanted) return anObj - + ## Create a shell from the set of faces and shells. # @param theFacesAndShells List of faces and/or shells. # @return New GEOM_Object, containing the created shell. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_shell "Example" def MakeShell(self,theFacesAndShells): + # Example: see GEOM_TestAll.py anObj = self.ShapesOp.MakeShell(theFacesAndShells) RaiseIfFailed("MakeShell", self.ShapesOp) return anObj - + ## Create a solid, bounded by the given shells. # @param theShells Sequence of bounding shells. # @return New GEOM_Object, containing the created solid. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_solid "Example" def MakeSolid(self,theShells): + # Example: see GEOM_TestAll.py anObj = self.ShapesOp.MakeSolidShells(theShells) RaiseIfFailed("MakeSolidShells", self.ShapesOp) return anObj - + ## Create a compound of the given shapes. # @param theShapes List of shapes to put in compound. # @return New GEOM_Object, containing the created compound. # - # Example: see GEOM_TestAll.py + # @ref tui_creation_compound "Example" def MakeCompound(self,theShapes): + # Example: see GEOM_TestAll.py anObj = self.ShapesOp.MakeCompound(theShapes) RaiseIfFailed("MakeCompound", self.ShapesOp) return anObj - + + # end of l3_advanced + ## @} + + ## @addtogroup l2_measure + ## @{ + ## Gives quantity of faces in the given shape. # @param theShape Shape to count faces of. # @return Quantity of faces. # - # Example: see GEOM_TestOthers.py + # @ref swig_NumberOfFaces "Example" def NumberOfFaces(self,theShape): + # Example: see GEOM_TestOthers.py nb_faces = self.ShapesOp.NumberOfFaces(theShape) RaiseIfFailed("NumberOfFaces", self.ShapesOp) return nb_faces @@ -916,54 +1145,72 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theShape Shape to count edges of. # @return Quantity of edges. # - # Example: see GEOM_TestOthers.py + # @ref swig_NumberOfEdges "Example" def NumberOfEdges(self,theShape): + # Example: see GEOM_TestOthers.py nb_edges = self.ShapesOp.NumberOfEdges(theShape) RaiseIfFailed("NumberOfEdges", self.ShapesOp) return nb_edges - + + # end of l2_measure + ## @} + + ## @addtogroup l3_healing + ## @{ + ## Reverses an orientation the given shape. # @param theShape Shape to be reversed. # @return The reversed copy of theShape. # - # Example: see GEOM_TestAll.py + # @ref swig_ChangeOrientation "Example" def ChangeOrientation(self,theShape): + # Example: see GEOM_TestAll.py anObj = self.ShapesOp.ChangeOrientation(theShape) RaiseIfFailed("ChangeOrientation", self.ShapesOp) return anObj - + ## Shortcut to ChangeOrientation() # - # Example: see GEOM_TestOthers.py + # @ref swig_OrientationChange "Example" def OrientationChange(self,theShape): + # Example: see GEOM_TestOthers.py anObj = self.ChangeOrientation(theShape) return anObj - + + # end of l3_healing + ## @} + + ## @addtogroup l4_obtain + ## @{ + ## Retrieve all free faces from the given shape. # Free face is a face, which is not shared between two shells of the shape. # @param theShape Shape to find free faces in. # @return List of IDs of all free faces, contained in theShape. # - # Example: see GEOM_TestOthers.py + # @ref tui_measurement_tools_page "Example" def GetFreeFacesIDs(self,theShape): + # Example: see GEOM_TestOthers.py anIDs = self.ShapesOp.GetFreeFacesIDs(theShape) RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp) return anIDs - + ## Get all sub-shapes of theShape1 of the given type, shared with theShape2. # @param theShape1 Shape to find sub-shapes in. # @param theShape2 Shape to find shared sub-shapes with. # @param theShapeType Type of sub-shapes to be retrieved. # @return List of sub-shapes of theShape1, shared with theShape2. # - # Example: see GEOM_TestOthers.py + # @ref swig_GetSharedShapes "Example" def GetSharedShapes(self,theShape1, theShape2, theShapeType): + # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType) RaiseIfFailed("GetSharedShapes", self.ShapesOp) return aList - - ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively - # the specified plane by the certain way, defined through \a theState parameter. + + ## Find in theShape all sub-shapes of type theShapeType, + # situated relatively the specified plane by the certain way, + # defined through theState parameter. # @param theShape Shape to find sub-shapes of. # @param theShapeType Type of sub-shapes to be retrieved. # @param theAx1 Vector (or line, or linear edge), specifying normal @@ -972,45 +1219,52 @@ class geompyDC(GEOM._objref_GEOM_Gen): # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. # @return List of all found sub-shapes. # - # Example: see GEOM_TestOthers.py + # @ref swig_GetShapesOnPlane "Example" def GetShapesOnPlane(self,theShape, theShapeType, theAx1, theState): + # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState) RaiseIfFailed("GetShapesOnPlane", self.ShapesOp) return aList - + ## Works like the above method, but returns list of sub-shapes indices # - # Example: see GEOM_TestOthers.py + # @ref swig_GetShapesOnPlaneIDs "Example" def GetShapesOnPlaneIDs(self,theShape, theShapeType, theAx1, theState): + # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState) RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp) return aList - - ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively - # the specified plane by the certain way, defined through \a theState parameter. + + ## Find in theShape all sub-shapes of type theShapeType, + # situated relatively the specified plane by the certain way, + # defined through theState parameter. # @param theShape Shape to find sub-shapes of. # @param theShapeType Type of sub-shapes to be retrieved. # @param theAx1 Vector (or line, or linear edge), specifying normal # direction of the plane to find shapes on. # @param thePnt Point specifying location of the plane to find shapes on. # @param theState The state of the subshapes to find. It can be one of - # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. + # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. # @return List of all found sub-shapes. # - # Example: see GEOM_TestOthers.py - def GetShapesOnPlaneWithLocation(self,theShape, theShapeType, theAx1, thePnt, theState): - aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType, theAx1, thePnt, theState) + # @ref swig_GetShapesOnPlaneWithLocation "Example" + def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState): + # Example: see GEOM_TestOthers.py + aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType, + theAx1, thePnt, theState) RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp) return aList - + ## Works like the above method, but returns list of sub-shapes indices # - # Example: see GEOM_TestOthers.py - def GetShapesOnPlaneWithLocationIDs(self,theShape, theShapeType, theAx1, thePnt, theState): - aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType, theAx1, thePnt, theState) + # @ref swig_GetShapesOnPlaneWithLocationIDs "Example" + def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState): + # Example: see GEOM_TestOthers.py + aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType, + theAx1, thePnt, theState) RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp) return aList - + ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively # the specified cylinder by the certain way, defined through \a theState parameter. # @param theShape Shape to find sub-shapes of. @@ -1022,20 +1276,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. # @return List of all found sub-shapes. # - # Example: see GEOM_TestOthers.py - def GetShapesOnCylinder(self,theShape, theShapeType, theAxis, theRadius, theState): + # @ref swig_GetShapesOnCylinder "Example" + def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState): + # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState) RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp) return aList - + ## Works like the above method, but returns list of sub-shapes indices # - # Example: see GEOM_TestOthers.py - def GetShapesOnCylinderIDs(self,theShape, theShapeType, theAxis, theRadius, theState): + # @ref swig_GetShapesOnCylinderIDs "Example" + def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState): + # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState) RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp) return aList - + ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively # the specified sphere by the certain way, defined through \a theState parameter. # @param theShape Shape to find sub-shapes of. @@ -1046,20 +1302,22 @@ class geompyDC(GEOM._objref_GEOM_Gen): # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. # @return List of all found sub-shapes. # - # Example: see GEOM_TestOthers.py + # @ref swig_GetShapesOnSphere "Example" def GetShapesOnSphere(self,theShape, theShapeType, theCenter, theRadius, theState): + # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState) RaiseIfFailed("GetShapesOnSphere", self.ShapesOp) return aList - + ## Works like the above method, but returns list of sub-shapes indices # - # Example: see GEOM_TestOthers.py + # @ref swig_GetShapesOnSphereIDs "Example" def GetShapesOnSphereIDs(self,theShape, theShapeType, theCenter, theRadius, theState): + # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState) RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp) return aList - + ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively # the specified quadrangle by the certain way, defined through \a theState parameter. # @param theShape Shape to find sub-shapes of. @@ -1069,56 +1327,109 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle # @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle # @param theState The state of the subshapes to find. It can be one of - # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. + # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. # @return List of all found sub-shapes. # - # Example: see GEOM_TestOthers.py - def GetShapesOnQuadrangle(self,theShape, theShapeType, theTopLeftPoint, theTopRigthPoint, theBottomLeftPoint, theBottomRigthPoint, theState): - aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType, theTopLeftPoint, theTopRigthPoint, theBottomLeftPoint, theBottomRigthPoint, theState) + # @ref swig_GetShapesOnQuadrangle "Example" + def GetShapesOnQuadrangle(self, theShape, theShapeType, + theTopLeftPoint, theTopRigthPoint, + theBottomLeftPoint, theBottomRigthPoint, theState): + # Example: see GEOM_TestOthers.py + aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType, + theTopLeftPoint, theTopRigthPoint, + theBottomLeftPoint, theBottomRigthPoint, theState) RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp) return aList - + ## Works like the above method, but returns list of sub-shapes indices # - # Example: see GEOM_TestOthers.py - def GetShapesOnQuadrangleIDs(self,theShape, theShapeType, theTopLeftPoint, theTopRigthPoint, theBottomLeftPoint, theBottomRigthPoint, theState): - aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType, theTopLeftPoint, theTopRigthPoint, theBottomLeftPoint, theBottomRigthPoint, theState) + # @ref swig_GetShapesOnQuadrangleIDs "Example" + def GetShapesOnQuadrangleIDs(self, theShape, theShapeType, + theTopLeftPoint, theTopRigthPoint, + theBottomLeftPoint, theBottomRigthPoint, theState): + # Example: see GEOM_TestOthers.py + aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType, + theTopLeftPoint, theTopRigthPoint, + theBottomLeftPoint, theBottomRigthPoint, theState) RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp) return aList - + ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively # the specified \a theBox by the certain way, defined through \a theState parameter. # @param theBox Shape for relative comparing. # @param theShape Shape to find sub-shapes of. # @param theShapeType Type of sub-shapes to be retrieved. # @param theState The state of the subshapes to find. It can be one of - # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. + # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. # @return List of all found sub-shapes. # - def GetShapesOnBox(self,theBox, theShape, theShapeType, theState): + # @ref swig_GetShapesOnBox "Example" + def GetShapesOnBox(self, theBox, theShape, theShapeType, theState): + # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState) RaiseIfFailed("GetShapesOnBox", self.ShapesOp) return aList - + ## Works like the above method, but returns list of sub-shapes indices # - def GetShapesOnBoxIDs(self,theBox, theShape, theShapeType, theState): + # @ref swig_GetShapesOnBoxIDs "Example" + def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState): + # Example: see GEOM_TestOthers.py aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState) RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp) return aList - + + ## Find in \a theShape all sub-shapes of type \a theShapeType, + # situated relatively the specified \a theCheckShape by the + # certain way, defined through \a theState parameter. + # @param theCheckShape Shape for relative comparing. + # @param theShape Shape to find sub-shapes of. + # @param theShapeType Type of sub-shapes to be retrieved. + # @param theState The state of the subshapes to find. It can be one of + # ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. + # @return List of all found sub-shapes. + # + # @ref swig_GetShapesOnShape "Example" + def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState): + # Example: see GEOM_TestOthers.py + aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape, + theShapeType, theState) + RaiseIfFailed("GetShapesOnShape", self.ShapesOp) + return aList + + ## Works like the above method, but returns result as compound + # + # @ref swig_GetShapesOnShapeAsCompound "Example" + def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState): + # Example: see GEOM_TestOthers.py + anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape, + theShapeType, theState) + RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp) + return anObj + + ## Works like the above method, but returns list of sub-shapes indices + # + # @ref swig_GetShapesOnShapeIDs "Example" + def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState): + # Example: see GEOM_TestOthers.py + aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape, + theShapeType, theState) + RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp) + return aList + ## Get sub-shape(s) of theShapeWhere, which are # coincident with \a theShapeWhat or could be a part of it. # @param theShapeWhere Shape to find sub-shapes of. # @param theShapeWhat Shape, specifying what to find. # @return Group of all found sub-shapes or a single found sub-shape. # - # Example: see GEOM_TestOthers.py + # @ref swig_GetInPlace "Example" def GetInPlace(self,theShapeWhere, theShapeWhat): + # Example: see GEOM_TestOthers.py anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat) RaiseIfFailed("GetInPlace", self.ShapesOp) return anObj - + ## Get sub-shape(s) of \a theShapeWhere, which are # coincident with \a theShapeWhat or could be a part of it. # @@ -1133,8 +1444,9 @@ class geompyDC(GEOM._objref_GEOM_Gen): # building history of the ShapeWhere). # @return Group of all found sub-shapes or a single found sub-shape. # - # Example: see GEOM_TestOthers.py + # @ref swig_GetInPlace "Example" def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat): + # Example: see GEOM_TestOthers.py anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat) RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp) return anObj @@ -1145,83 +1457,97 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theShapeWhat Shape, specifying what to find. # @return New GEOM_Object for found sub-shape. # + # @ref swig_GetSame "Example" def GetSame(self,theShapeWhere, theShapeWhat): anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat) RaiseIfFailed("GetSame", self.ShapesOp) return anObj - - # ----------------------------------------------------------------------------- - # Access to sub-shapes by their unique IDs inside the main shape. - # ----------------------------------------------------------------------------- - - ## Obtain a composite sub-shape of , composed from sub-shapes - # of , selected by their unique IDs inside + + # end of l4_obtain + ## @} + + ## @addtogroup l4_access + ## @{ + + ## Obtain a composite sub-shape of aShape, composed from sub-shapes + # of aShape, selected by their unique IDs inside aShape # - # Example: see GEOM_TestAll.py - def GetSubShape(self,aShape, ListOfID): + # @ref swig_all_decompose "Example" + def GetSubShape(self, aShape, ListOfID): + # Example: see GEOM_TestAll.py anObj = self.AddSubShape(aShape,ListOfID) return anObj - - ## Obtain unique ID of sub-shape inside + + ## Obtain unique ID of sub-shape aSubShape inside aShape # - # Example: see GEOM_TestAll.py - def GetSubShapeID(self,aShape, aSubShape): + # @ref swig_all_decompose "Example" + def GetSubShapeID(self, aShape, aSubShape): + # Example: see GEOM_TestAll.py anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape) RaiseIfFailed("GetSubShapeIndex", self.LocalOp) return anID - - # ----------------------------------------------------------------------------- - # Decompose objects - # ----------------------------------------------------------------------------- - + + # end of l4_access + ## @} + + ## @addtogroup l4_decompose + ## @{ + ## Explode a shape on subshapes of a given type. - # @param theShape Shape to be exploded. - # @param theShapeType Type of sub-shapes to be retrieved. + # @param aShape Shape to be exploded. + # @param aType Type of sub-shapes to be retrieved. # @return List of sub-shapes of type theShapeType, contained in theShape. # - # Example: see GEOM_TestAll.py - def SubShapeAll(self,aShape, aType): + # @ref swig_all_decompose "Example" + def SubShapeAll(self, aShape, aType): + # Example: see GEOM_TestAll.py ListObj = self.ShapesOp.MakeExplode(aShape,aType,0) RaiseIfFailed("MakeExplode", self.ShapesOp) return ListObj - + ## Explode a shape on subshapes of a given type. - # @param theShape Shape to be exploded. - # @param theShapeType Type of sub-shapes to be retrieved. + # @param aShape Shape to be exploded. + # @param aType Type of sub-shapes to be retrieved. # @return List of IDs of sub-shapes. - def SubShapeAllIDs(self,aShape, aType): + # + # @ref swig_all_decompose "Example" + def SubShapeAllIDs(self, aShape, aType): ListObj = self.ShapesOp.SubShapeAllIDs(aShape,aType,0) RaiseIfFailed("SubShapeAllIDs", self.ShapesOp) return ListObj - + ## Explode a shape on subshapes of a given type. # Sub-shapes will be sorted by coordinates of their gravity centers. - # @param theShape Shape to be exploded. - # @param theShapeType Type of sub-shapes to be retrieved. + # @param aShape Shape to be exploded. + # @param aType Type of sub-shapes to be retrieved. # @return List of sub-shapes of type theShapeType, contained in theShape. # - # Example: see GEOM_TestAll.py - def SubShapeAllSorted(self,aShape, aType): + # @ref swig_SubShapeAllSorted "Example" + def SubShapeAllSorted(self, aShape, aType): + # Example: see GEOM_TestAll.py ListObj = self.ShapesOp.MakeExplode(aShape,aType,1) RaiseIfFailed("MakeExplode", self.ShapesOp) return ListObj - + ## Explode a shape on subshapes of a given type. # Sub-shapes will be sorted by coordinates of their gravity centers. - # @param theShape Shape to be exploded. - # @param theShapeType Type of sub-shapes to be retrieved. + # @param aShape Shape to be exploded. + # @param aType Type of sub-shapes to be retrieved. # @return List of IDs of sub-shapes. - def SubShapeAllSortedIDs(self,aShape, aType): + # + # @ref swig_all_decompose "Example" + def SubShapeAllSortedIDs(self, aShape, aType): ListIDs = self.ShapesOp.SubShapeAllIDs(aShape,aType,1) RaiseIfFailed("SubShapeAllIDs", self.ShapesOp) return ListIDs - - ## Obtain a compound of sub-shapes of , - # selected by they indices in list of all sub-shapes of type . + + ## Obtain a compound of sub-shapes of aShape, + # selected by they indices in list of all sub-shapes of type aType. # Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type] # - # Example: see GEOM_TestAll.py - def SubShape(self,aShape, aType, ListOfInd): + # @ref swig_all_decompose "Example" + def SubShape(self, aShape, aType, ListOfInd): + # Example: see GEOM_TestAll.py ListOfIDs = [] AllShapeList = self.SubShapeAll(aShape, aType) for ind in ListOfInd: @@ -1229,54 +1555,60 @@ class geompyDC(GEOM._objref_GEOM_Gen): anObj = self.GetSubShape(aShape, ListOfIDs) return anObj - ## Obtain a compound of sub-shapes of , - # selected by they indices in sorted list of all sub-shapes of type . + ## Obtain a compound of sub-shapes of aShape, + # selected by they indices in sorted list of all sub-shapes of type aType. # Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type] # - # Example: see GEOM_TestAll.py + # @ref swig_all_decompose "Example" def SubShapeSorted(self,aShape, aType, ListOfInd): + # Example: see GEOM_TestAll.py ListOfIDs = [] AllShapeList = self.SubShapeAllSorted(aShape, aType) for ind in ListOfInd: ListOfIDs.append(self.GetSubShapeID(aShape, AllShapeList[ind - 1])) anObj = self.GetSubShape(aShape, ListOfIDs) return anObj - - # ----------------------------------------------------------------------------- - # Healing operations - # ----------------------------------------------------------------------------- - + + # end of l4_decompose + ## @} + + ## @addtogroup l3_healing + ## @{ + ## Apply a sequence of Shape Healing operators to the given object. # @param theShape Shape to be processed. # @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.). # @param theParameters List of names of parameters # ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.). # @param theValues List of values of parameters, in the same order - # as parameters are listed in \a theParameters list. + # as parameters are listed in theParameters list. # @return New GEOM_Object, containing processed shape. # - # Example: see GEOM_TestHealing.py + # @ref tui_shape_processing "Example" def ProcessShape(self,theShape, theOperators, theParameters, theValues): + # Example: see GEOM_TestHealing.py anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues) RaiseIfFailed("ProcessShape", self.HealOp) return anObj - + ## Remove faces from the given object (shape). # @param theObject Shape to be processed. # @param theFaces Indices of faces to be removed, if EMPTY then the method # removes ALL faces of the given object. # @return New GEOM_Object, containing processed shape. # - # Example: see GEOM_TestHealing.py + # @ref tui_suppress_faces "Example" def SuppressFaces(self,theObject, theFaces): + # Example: see GEOM_TestHealing.py anObj = self.HealOp.SuppressFaces(theObject, theFaces) RaiseIfFailed("SuppressFaces", self.HealOp) return anObj ## Sewing of some shapes into single shape. # - # Example: see GEOM_TestHealing.py - def MakeSewing(self,ListShape, theTolerance): + # @ref tui_sewing "Example" + def MakeSewing(self, ListShape, theTolerance): + # Example: see GEOM_TestHealing.py comp = self.MakeCompound(ListShape) anObj = self.Sew(comp, theTolerance) return anObj @@ -1285,51 +1617,53 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theObject Shape to be processed. # @param theTolerance Required tolerance value. # @return New GEOM_Object, containing processed shape. - # - # Example: see MakeSewing() above - def Sew(self,theObject, theTolerance): + def Sew(self, theObject, theTolerance): + # Example: see MakeSewing() above anObj = self.HealOp.Sew(theObject, theTolerance) RaiseIfFailed("Sew", self.HealOp) return anObj - + ## Remove internal wires and edges from the given object (face). # @param theObject Shape to be processed. # @param theWires Indices of wires to be removed, if EMPTY then the method # removes ALL internal wires of the given object. # @return New GEOM_Object, containing processed shape. # - # Example: see GEOM_TestHealing.py + # @ref tui_suppress_internal_wires "Example" def SuppressInternalWires(self,theObject, theWires): + # Example: see GEOM_TestHealing.py anObj = self.HealOp.RemoveIntWires(theObject, theWires) RaiseIfFailed("RemoveIntWires", self.HealOp) return anObj - + ## Remove internal closed contours (holes) from the given object. # @param theObject Shape to be processed. # @param theWires Indices of wires to be removed, if EMPTY then the method # removes ALL internal holes of the given object # @return New GEOM_Object, containing processed shape. # - # Example: see GEOM_TestHealing.py + # @ref tui_suppress_holes "Example" def SuppressHoles(self,theObject, theWires): + # Example: see GEOM_TestHealing.py anObj = self.HealOp.FillHoles(theObject, theWires) RaiseIfFailed("FillHoles", self.HealOp) return anObj - + ## Close an open wire. # @param theObject Shape to be processed. # @param theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape, - # if -1, then theObject itself is a wire. + # if -1, then theObject itself is a wire. # @param isCommonVertex If TRUE : closure by creation of a common vertex, # If FALS : closure by creation of an edge between ends. # @return New GEOM_Object, containing processed shape. # - # Example: see GEOM_TestHealing.py + # @ref tui_close_contour "Example" def CloseContour(self,theObject, theWires, isCommonVertex): + # Example: see GEOM_TestHealing.py anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex) RaiseIfFailed("CloseContour", self.HealOp) return anObj - + ## Addition of a point to a given edge object. # @param theObject Shape to be processed. # @param theEdgeIndex Index of edge to be divided within theObject's shape, @@ -1340,28 +1674,32 @@ class geompyDC(GEOM._objref_GEOM_Gen): # if FALSE : \a theValue is treated as a length parameter [0..1] # @return New GEOM_Object, containing processed shape. # - # Example: see GEOM_TestHealing.py + # @ref tui_add_point_on_edge "Example" def DivideEdge(self,theObject, theEdgeIndex, theValue, isByParameter): + # Example: see GEOM_TestHealing.py anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter) RaiseIfFailed("DivideEdge", self.HealOp) return anObj - - ## Change orientation of the given object. + + ## Change orientation of the given object. Updates given shape. # @param theObject Shape to be processed. - # @update given shape + # + # @ref swig_todo "Example" def ChangeOrientationShell(self,theObject): theObject = self.HealOp.ChangeOrientation(theObject) RaiseIfFailed("ChangeOrientation", self.HealOp) pass - + ## Change orientation of the given object. # @param theObject Shape to be processed. # @return New GEOM_Object, containing processed shape. + # + # @ref swig_todo "Example" def ChangeOrientationShellCopy(self,theObject): anObj = self.HealOp.ChangeOrientationCopy(theObject) RaiseIfFailed("ChangeOrientationCopy", self.HealOp) return anObj - + ## Get a list of wires (wrapped in GEOM_Object-s), # that constitute a free boundary of the given shape. # @param theObject Shape to get free boundary of. @@ -1370,39 +1708,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): # theClosedWires: Closed wires on the free boundary of the given shape. # theOpenWires: Open wires on the free boundary of the given shape. # - # Example: see GEOM_TestHealing.py + # @ref tui_measurement_tools_page "Example" def GetFreeBoundary(self,theObject): + # Example: see GEOM_TestHealing.py anObj = self.HealOp.GetFreeBoundary(theObject) RaiseIfFailed("GetFreeBoundary", self.HealOp) return anObj - - # ----------------------------------------------------------------------------- - # Create advanced objects - # ----------------------------------------------------------------------------- - - ## Create a copy of the given object - # - # Example: see GEOM_TestAll.py - def MakeCopy(self,theOriginal): - anObj = self.InsertOp.MakeCopy(theOriginal) - RaiseIfFailed("MakeCopy", self.InsertOp) - return anObj - - ## Create a filling from the given compound of contours. - # @param theShape the compound of contours - # @param theMinDeg a minimal degree of BSpline surface to create - # @param theMaxDeg a maximal degree of BSpline surface to create - # @param theTol2D a 2d tolerance to be reached - # @param theTol3D a 3d tolerance to be reached - # @param theNbIter a number of iteration of approximation algorithm - # @return New GEOM_Object, containing the created filling surface. - # - # Example: see GEOM_TestAll.py - def MakeFilling(self,theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, isApprox=0): - anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, isApprox) - RaiseIfFailed("MakeFilling", self.PrimOp) - return anObj - + ## Replace coincident faces in theShape by one face. # @param theShape Initial shape. # @param theTolerance Maximum distance between faces, which can be considered as coincident. @@ -1410,27 +1722,27 @@ class geompyDC(GEOM._objref_GEOM_Gen): # otherwise all initial shapes. # @return New GEOM_Object, containing a copy of theShape without coincident faces. # - # Example: see GEOM_Spanner.py + # @ref tui_glue_faces "Example" def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True): + # Example: see GEOM_Spanner.py anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids) if anObj is None: raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode() return anObj - - + ## Find coincident faces in theShape for possible gluing. # @param theShape Initial shape. # @param theTolerance Maximum distance between faces, # which can be considered as coincident. # @return ListOfGO. # - # Example: see GEOM_Spanner.py + # @ref swig_todo "Example" def GetGlueFaces(self, theShape, theTolerance): + # Example: see GEOM_Spanner.py anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance) RaiseIfFailed("GetGlueFaces", self.ShapesOp) return anObj - - + ## Replace coincident faces in theShape by one face # in compliance with given list of faces # @param theShape Initial shape. @@ -1442,18 +1754,24 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @return New GEOM_Object, containing a copy of theShape # without some faces. # - # Example: see GEOM_Spanner.py + # @ref swig_todo "Example" def MakeGlueFacesByList(self, theShape, theTolerance, theFaces, doKeepNonSolids=True): + # Example: see GEOM_Spanner.py anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces, doKeepNonSolids) if anObj is None: raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode() return anObj - - + + # end of l3_healing + ## @} + + ## @addtogroup l3_boolean Boolean Operations + ## @{ + # ----------------------------------------------------------------------------- # Boolean (Common, Cut, Fuse, Section) # ----------------------------------------------------------------------------- - + ## Perform one of boolean operations on two given shapes. # @param theShape1 First argument for boolean operation. # @param theShape2 Second argument for boolean operation. @@ -1461,36 +1779,51 @@ class geompyDC(GEOM._objref_GEOM_Gen): # 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section. # @return New GEOM_Object, containing the result shape. # - # Example: see GEOM_TestAll.py + # @ref tui_fuse "Example" def MakeBoolean(self,theShape1, theShape2, theOperation): + # Example: see GEOM_TestAll.py anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation) RaiseIfFailed("MakeBoolean", self.BoolOp) return anObj - + ## Shortcut to MakeBoolean(s1, s2, 1) # - # Example: see GEOM_TestOthers.py + # @ref tui_common "Example 1" + # \n @ref swig_MakeCommon "Example 2" def MakeCommon(self, s1, s2): + # Example: see GEOM_TestOthers.py return self.MakeBoolean(s1, s2, 1) ## Shortcut to MakeBoolean(s1, s2, 2) # - # Example: see GEOM_TestOthers.py + # @ref tui_cut "Example 1" + # \n @ref swig_MakeCommon "Example 2" def MakeCut(self, s1, s2): + # Example: see GEOM_TestOthers.py return self.MakeBoolean(s1, s2, 2) - + ## Shortcut to MakeBoolean(s1, s2, 3) # - # Example: see GEOM_TestOthers.py + # @ref tui_fuse "Example 1" + # \n @ref swig_MakeCommon "Example 2" def MakeFuse(self, s1, s2): + # Example: see GEOM_TestOthers.py return self.MakeBoolean(s1, s2, 3) - + ## Shortcut to MakeBoolean(s1, s2, 4) # - # Example: see GEOM_TestOthers.py + # @ref tui_section "Example 1" + # \n @ref swig_MakeCommon "Example 2" def MakeSection(self, s1, s2): + # Example: see GEOM_TestOthers.py return self.MakeBoolean(s1, s2, 4) - + + # end of l3_boolean + ## @} + + ## @addtogroup l3_basic_op + ## @{ + ## Perform partition operation. # @param ListShapes Shapes to be intersected. # @param ListTools Shapes to intersect theShapes. @@ -1517,17 +1850,18 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @return New GEOM_Object, containing the result shapes. # - # Example: see GEOM_TestAll.py + # @ref tui_partition "Example" def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[], Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[], KeepNonlimitShapes=0): + # Example: see GEOM_TestAll.py anObj = self.BoolOp.MakePartition(ListShapes, ListTools, ListKeepInside, ListRemoveInside, Limit, RemoveWebs, ListMaterials, KeepNonlimitShapes); RaiseIfFailed("MakePartition", self.BoolOp) return anObj - + ## Perform partition operation. # This method may be useful if it is needed to make a partition for # compound contains nonintersected shapes. Performance will be better @@ -1540,6 +1874,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @return New GEOM_Object, containing the result shapes. # + # @ref swig_todo "Example" def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[], Limit=ShapeType["SHAPE"], RemoveWebs=0, @@ -1550,34 +1885,39 @@ class geompyDC(GEOM._objref_GEOM_Gen): KeepNonlimitShapes); RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp) return anObj - + ## Shortcut to MakePartition() # - # Example: see GEOM_TestOthers.py + # @ref tui_partition "Example 1" + # \n @ref swig_Partition "Example 2" def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[], Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[], KeepNonlimitShapes=0): + # Example: see GEOM_TestOthers.py anObj = self.MakePartition(ListShapes, ListTools, ListKeepInside, ListRemoveInside, Limit, RemoveWebs, ListMaterials, KeepNonlimitShapes); return anObj - + ## Perform partition of the Shape with the Plane # @param theShape Shape to be intersected. # @param thePlane Tool shape, to intersect theShape. # @return New GEOM_Object, containing the result shape. # - # Example: see GEOM_TestAll.py + # @ref tui_partition "Example" def MakeHalfPartition(self,theShape, thePlane): + # Example: see GEOM_TestAll.py anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane) RaiseIfFailed("MakeHalfPartition", self.BoolOp) return anObj - - # ----------------------------------------------------------------------------- - # Transform objects - # ----------------------------------------------------------------------------- - + + # end of l3_basic_op + ## @} + + ## @addtogroup l3_transform + ## @{ + ## Translate the given object along the vector, specified # by its end points, creating its copy before the translation. # @param theObject The object to be translated. @@ -1585,36 +1925,54 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param thePoint2 End point of translation vector. # @return New GEOM_Object, containing the translated object. # - # Example: see GEOM_TestAll.py + # @ref tui_translation "Example 1" + # \n @ref swig_MakeTranslationTwoPoints "Example 2" def MakeTranslationTwoPoints(self,theObject, thePoint1, thePoint2): + # Example: see GEOM_TestAll.py anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2) RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp) return anObj - + ## Translate the given object along the vector, specified # by its components, creating its copy before the translation. # @param theObject The object to be translated. # @param theDX,theDY,theDZ Components of translation vector. # @return New GEOM_Object, containing the translated object. # - # Example: see GEOM_TestAll.py + # @ref tui_translation "Example" def MakeTranslation(self,theObject, theDX, theDY, theDZ): + # Example: see GEOM_TestAll.py anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ) RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp) return anObj - + ## Translate the given object along the given vector, # creating its copy before the translation. # @param theObject The object to be translated. # @param theVector The translation vector. # @return New GEOM_Object, containing the translated object. # - # Example: see GEOM_TestAll.py + # @ref tui_translation "Example" def MakeTranslationVector(self,theObject, theVector): + # Example: see GEOM_TestAll.py anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector) RaiseIfFailed("TranslateVectorCopy", self.TrsfOp) return anObj + ## Translate the given object along the given vector on given distance, + # creating its copy before the translation. + # @param theObject The object to be translated. + # @param theVector The translation vector. + # @param theDistance The translation distance. + # @return New GEOM_Object, containing the translated object. + # + # @ref tui_translation "Example" + def MakeTranslationVectorDistance(self, theObject, theVector, theDistance): + # Example: see GEOM_TestAll.py + anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1) + RaiseIfFailed("TranslateVectorDistance", self.TrsfOp) + return anObj + ## Rotate the given object around the given axis # on the given angle, creating its copy before the rotatation. # @param theObject The object to be rotated. @@ -1622,74 +1980,97 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theAngle Rotation angle in radians. # @return New GEOM_Object, containing the rotated object. # - # Example: see GEOM_TestAll.py + # @ref tui_rotation "Example" def MakeRotation(self,theObject, theAxis, theAngle): + # Example: see GEOM_TestAll.py anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle) RaiseIfFailed("RotateCopy", self.TrsfOp) return anObj - + ## Rotate given object around vector perpendicular to plane # containing three points, creating its copy before the rotatation. # @param theObject The object to be rotated. # @param theCentPoint central point - the axis is the vector perpendicular to the plane # containing the three points. - # @param thePoint1 and thePoint2 - in a perpendicular plan of the axis. + # @param thePoint1,thePoint2 - in a perpendicular plane of the axis. # @return New GEOM_Object, containing the rotated object. # - # Example: see GEOM_TestAll.py + # @ref tui_rotation "Example" def MakeRotationThreePoints(self,theObject, theCentPoint, thePoint1, thePoint2): + # Example: see GEOM_TestAll.py anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2) RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp) return anObj - + ## Scale the given object by the factor, creating its copy before the scaling. # @param theObject The object to be scaled. # @param thePoint Center point for scaling. + # Passing None for it means scaling relatively the origin of global CS. # @param theFactor Scaling factor value. # @return New GEOM_Object, containing the scaled shape. # - # Example: see GEOM_TestAll.py - def MakeScaleTransform(self,theObject, thePoint, theFactor): + # @ref tui_scale "Example" + def MakeScaleTransform(self, theObject, thePoint, theFactor): + # Example: see GEOM_TestAll.py anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor) RaiseIfFailed("ScaleShapeCopy", self.TrsfOp) return anObj - + + ## Scale the given object by different factors along coordinate axes, + # creating its copy before the scaling. + # @param theObject The object to be scaled. + # @param thePoint Center point for scaling. + # Passing None for it means scaling relatively the origin of global CS. + # @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis. + # @return New GEOM_Object, containing the scaled shape. + # + # @ref swig_scale "Example" + def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ): + # Example: see GEOM_TestAll.py + anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint, + theFactorX, theFactorY, theFactorZ) + RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp) + return anObj + ## Create an object, symmetrical # to the given one relatively the given plane. # @param theObject The object to be mirrored. # @param thePlane Plane of symmetry. # @return New GEOM_Object, containing the mirrored shape. # - # Example: see GEOM_TestAll.py + # @ref tui_mirror "Example" def MakeMirrorByPlane(self,theObject, thePlane): + # Example: see GEOM_TestAll.py anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane) RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp) return anObj - + ## Create an object, symmetrical # to the given one relatively the given axis. # @param theObject The object to be mirrored. # @param theAxis Axis of symmetry. # @return New GEOM_Object, containing the mirrored shape. # - # Example: see GEOM_TestAll.py + # @ref tui_mirror "Example" def MakeMirrorByAxis(self,theObject, theAxis): + # Example: see GEOM_TestAll.py anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis) RaiseIfFailed("MirrorAxisCopy", self.TrsfOp) return anObj - + ## Create an object, symmetrical # to the given one relatively the given point. # @param theObject The object to be mirrored. # @param thePoint Point of symmetry. # @return New GEOM_Object, containing the mirrored shape. # - # Example: see GEOM_TestAll.py + # @ref tui_mirror "Example" def MakeMirrorByPoint(self,theObject, thePoint): + # Example: see GEOM_TestAll.py anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint) RaiseIfFailed("MirrorPointCopy", self.TrsfOp) return anObj - + ## Modify the Location of the given object by LCS, # creating its copy before the setting. # @param theObject The object to be displaced. @@ -1701,27 +2082,29 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theEndLCS Coordinate system to perform displacement to it. # @return New GEOM_Object, containing the displaced shape. # - # Example: see GEOM_TestAll.py + # @ref tui_modify_location "Example" def MakePosition(self,theObject, theStartLCS, theEndLCS): + # Example: see GEOM_TestAll.py anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS) RaiseIfFailed("PositionShapeCopy", self.TrsfOp) return anObj - + ## Create new object as offset of the given one. # @param theObject The base object for the offset. # @param theOffset Offset value. # @return New GEOM_Object, containing the offset object. # - # Example: see GEOM_TestAll.py + # @ref tui_offset "Example" def MakeOffset(self,theObject, theOffset): + # Example: see GEOM_TestAll.py anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset) RaiseIfFailed("OffsetShapeCopy", self.TrsfOp) return anObj - + # ----------------------------------------------------------------------------- # Patterns # ----------------------------------------------------------------------------- - + ## Translate the given object along the given vector a given number times # @param theObject The object to be translated. # @param theVector Direction of the translation. @@ -1730,12 +2113,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @return New GEOM_Object, containing compound of all # the shapes, obtained after each translation. # - # Example: see GEOM_TestAll.py + # @ref tui_multi_translation "Example" def MakeMultiTranslation1D(self,theObject, theVector, theStep, theNbTimes): + # Example: see GEOM_TestAll.py anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes) RaiseIfFailed("MultiTranslate1D", self.TrsfOp) return anObj - + ## Conseqently apply two specified translations to theObject specified number of times. # @param theObject The object to be translated. # @param theVector1 Direction of the first translation. @@ -1747,14 +2131,15 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @return New GEOM_Object, containing compound of all # the shapes, obtained after each translation. # - # Example: see GEOM_TestAll.py + # @ref tui_multi_translation "Example" def MakeMultiTranslation2D(self,theObject, theVector1, theStep1, theNbTimes1, theVector2, theStep2, theNbTimes2): + # Example: see GEOM_TestAll.py anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1, theVector2, theStep2, theNbTimes2) RaiseIfFailed("MultiTranslate2D", self.TrsfOp) return anObj - + ## Rotate the given object around the given axis a given number times. # Rotation angle will be 2*PI/theNbTimes. # @param theObject The object to be rotated. @@ -1763,12 +2148,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @return New GEOM_Object, containing compound of all the # shapes, obtained after each rotation. # - # Example: see GEOM_TestAll.py + # @ref tui_multi_rotation "Example" def MultiRotate1D(self,theObject, theAxis, theNbTimes): + # Example: see GEOM_TestAll.py anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes) RaiseIfFailed("MultiRotate1D", self.TrsfOp) return anObj - + ## Rotate the given object around the # given axis on the given angle a given number # times and multi-translate each rotation result. @@ -1783,53 +2169,59 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @return New GEOM_Object, containing compound of all the # shapes, obtained after each transformation. # - # Example: see GEOM_TestAll.py + # @ref tui_multi_rotation "Example" def MultiRotate2D(self,theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2): + # Example: see GEOM_TestAll.py anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2) RaiseIfFailed("MultiRotate2D", self.TrsfOp) return anObj - + ## The same, as MultiRotate1D(), but axis is given by direction and point - # - # Example: see GEOM_TestOthers.py + # @ref swig_MakeMultiRotation "Example" def MakeMultiRotation1D(self,aShape,aDir,aPoint,aNbTimes): + # Example: see GEOM_TestOthers.py aVec = self.MakeLine(aPoint,aDir) anObj = self.MultiRotate1D(aShape,aVec,aNbTimes) return anObj - + ## The same, as MultiRotate2D(), but axis is given by direction and point - # - # Example: see GEOM_TestOthers.py + # @ref swig_MakeMultiRotation "Example" def MakeMultiRotation2D(self,aShape,aDir,aPoint,anAngle,nbtimes1,aStep,nbtimes2): + # Example: see GEOM_TestOthers.py aVec = self.MakeLine(aPoint,aDir) anObj = self.MultiRotate2D(aShape,aVec,anAngle,nbtimes1,aStep,nbtimes2) return anObj - - # ----------------------------------------------------------------------------- - # Local operations - # ----------------------------------------------------------------------------- - + + # end of l3_transform + ## @} + + ## @addtogroup l3_local + ## @{ + ## Perform a fillet on all edges of the given shape. # @param theShape Shape, to perform fillet on. # @param theR Fillet radius. # @return New GEOM_Object, containing the result shape. # - # Example: see GEOM_TestOthers.py + # @ref tui_fillet "Example 1" + # \n @ref swig_MakeFilletAll "Example 2" def MakeFilletAll(self,theShape, theR): + # Example: see GEOM_TestOthers.py anObj = self.LocalOp.MakeFilletAll(theShape, theR) RaiseIfFailed("MakeFilletAll", self.LocalOp) return anObj - + ## Perform a fillet on the specified edges/faces of the given shape # @param theShape Shape, to perform fillet on. # @param theR Fillet radius. - # @param theShapeType Type of shapes in . + # @param theShapeType Type of shapes in theListShapes. # @param theListShapes Global indices of edges/faces to perform fillet on. # \note Global index of sub-shape can be obtained, using method geompy.GetSubShapeID(). # @return New GEOM_Object, containing the result shape. # - # Example: see GEOM_TestAll.py + # @ref tui_fillet "Example" def MakeFillet(self,theShape, theR, theShapeType, theListShapes): + # Example: see GEOM_TestAll.py anObj = None if theShapeType == ShapeType["EDGE"]: anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes) @@ -1838,7 +2230,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes) RaiseIfFailed("MakeFilletFaces", self.LocalOp) return anObj - + ## The same that MakeFillet but with two Fillet Radius R1 and R2 def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes): anObj = None @@ -1849,18 +2241,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes) RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp) return anObj - + ## Perform a symmetric chamfer on all edges of the given shape. # @param theShape Shape, to perform chamfer on. # @param theD Chamfer size along each face. # @return New GEOM_Object, containing the result shape. # - # Example: see GEOM_TestOthers.py + # @ref tui_chamfer "Example 1" + # \n @ref swig_MakeChamferAll "Example 2" def MakeChamferAll(self,theShape, theD): + # Example: see GEOM_TestOthers.py anObj = self.LocalOp.MakeChamferAll(theShape, theD) RaiseIfFailed("MakeChamferAll", self.LocalOp) return anObj - + ## Perform a chamfer on edges, common to the specified faces, # with distance D1 on the Face1 # @param theShape Shape, to perform chamfer on. @@ -1870,19 +2264,20 @@ class geompyDC(GEOM._objref_GEOM_Gen): # \note Global index of sub-shape can be obtained, using method geompy.GetSubShapeID(). # @return New GEOM_Object, containing the result shape. # - # Example: see GEOM_TestAll.py + # @ref tui_chamfer "Example" def MakeChamferEdge(self,theShape, theD1, theD2, theFace1, theFace2): + # Example: see GEOM_TestAll.py anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2) RaiseIfFailed("MakeChamferEdge", self.LocalOp) return anObj - - ## The Same that MakeChamferEdge but with params theD is chamfer lenght and + + ## The Same that MakeChamferEdge but with params theD is chamfer length and # theAngle is Angle of chamfer (angle in radians) def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2): anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2) RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp) return anObj - + ## Perform a chamfer on all edges of the specified faces, # with distance D1 on the first specified face (if several for one edge) # @param theShape Shape, to perform chamfer on. @@ -1894,50 +2289,60 @@ class geompyDC(GEOM._objref_GEOM_Gen): # \note Global index of sub-shape can be obtained, using method geompy.GetSubShapeID(). # @return New GEOM_Object, containing the result shape. # - # Example: see GEOM_TestAll.py + # @ref tui_chamfer "Example" def MakeChamferFaces(self,theShape, theD1, theD2, theFaces): + # Example: see GEOM_TestAll.py anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces) RaiseIfFailed("MakeChamferFaces", self.LocalOp) return anObj - + ## The Same that MakeChamferFaces but with params theD is chamfer lenght and # theAngle is Angle of chamfer (angle in radians) + # + # @ref swig_FilletChamfer "Example" def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces): anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces) RaiseIfFailed("MakeChamferFacesAD", self.LocalOp) return anObj - + ## Perform a chamfer on edges, # with distance D1 on the first specified face (if several for one edge) # @param theShape Shape, to perform chamfer on. - # @param theD1 and theD2 Chamfer size + # @param theD1,theD2 Chamfer size # @param theEdges Sequence of edges of \a theShape. # @return New GEOM_Object, containing the result shape. # - # Example: + # @ref swig_FilletChamfer "Example" def MakeChamferEdges(self, theShape, theD1, theD2, theEdges): anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges) RaiseIfFailed("MakeChamferEdges", self.LocalOp) return anObj - + ## The Same that MakeChamferEdges but with params theD is chamfer lenght and # theAngle is Angle of chamfer (angle in radians) def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges): anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges) RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp) return anObj - + ## Shortcut to MakeChamferEdge() and MakeChamferFaces() # - # Example: see GEOM_TestOthers.py + # @ref swig_MakeChamfer "Example" def MakeChamfer(self,aShape,d1,d2,aShapeType,ListShape): + # Example: see GEOM_TestOthers.py anObj = None if aShapeType == ShapeType["EDGE"]: anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1]) else: anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape) return anObj - + + # end of l3_local + ## @} + + ## @addtogroup l3_basic_op + ## @{ + ## Perform an Archimde operation on the given shape with given parameters. # The object presenting the resulting face is returned. # @param theShape Shape to be put in water. @@ -1947,25 +2352,29 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @return New GEOM_Object, containing a section of \a theShape # by a plane, corresponding to water level. # - # Example: see GEOM_TestAll.py + # @ref tui_archimede "Example" def Archimede(self,theShape, theWeight, theWaterDensity, theMeshDeflection): + # Example: see GEOM_TestAll.py anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection) RaiseIfFailed("MakeArchimede", self.LocalOp) return anObj - - # ----------------------------------------------------------------------------- - # Information objects - # ----------------------------------------------------------------------------- - + + # end of l3_basic_op + ## @} + + ## @addtogroup l2_measure + ## @{ + ## Get point coordinates # @return [x, y, z] # - # Example: see GEOM_TestMeasures.py + # @ref tui_measurement_tools_page "Example" def PointCoordinates(self,Point): + # Example: see GEOM_TestMeasures.py aTuple = self.MeasuOp.PointCoordinates(Point) RaiseIfFailed("PointCoordinates", self.MeasuOp) return aTuple - + ## Get summarized length of all wires, # area of surface and volume of the given shape. # @param theShape Shape to define properties of. @@ -1974,12 +2383,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): # theSurfArea: Area of surface of the given shape. # theVolume: Volume of the given shape. # - # Example: see GEOM_TestMeasures.py + # @ref tui_measurement_tools_page "Example" def BasicProperties(self,theShape): + # Example: see GEOM_TestMeasures.py aTuple = self.MeasuOp.GetBasicProperties(theShape) RaiseIfFailed("GetBasicProperties", self.MeasuOp) return aTuple - + ## Get parameters of bounding box of the given shape # @param theShape Shape to obtain bounding box of. # @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax] @@ -1987,30 +2397,33 @@ class geompyDC(GEOM._objref_GEOM_Gen): # Ymin,Ymax: Limits of shape along OY axis. # Zmin,Zmax: Limits of shape along OZ axis. # - # Example: see GEOM_TestMeasures.py + # @ref tui_measurement_tools_page "Example" def BoundingBox(self,theShape): + # Example: see GEOM_TestMeasures.py aTuple = self.MeasuOp.GetBoundingBox(theShape) RaiseIfFailed("GetBoundingBox", self.MeasuOp) return aTuple - + ## Get inertia matrix and moments of inertia of theShape. # @param theShape Shape to calculate inertia of. # @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz] # I(1-3)(1-3): Components of the inertia matrix of the given shape. # Ix,Iy,Iz: Moments of inertia of the given shape. # - # Example: see GEOM_TestMeasures.py + # @ref tui_measurement_tools_page "Example" def Inertia(self,theShape): + # Example: see GEOM_TestMeasures.py aTuple = self.MeasuOp.GetInertia(theShape) RaiseIfFailed("GetInertia", self.MeasuOp) return aTuple - + ## Get minimal distance between the given shapes. # @param theShape1,theShape2 Shapes to find minimal distance between. # @return Value of the minimal distance between the given shapes. # - # Example: see GEOM_TestMeasures.py + # @ref tui_measurement_tools_page "Example" def MinDistance(self, theShape1, theShape2): + # Example: see GEOM_TestMeasures.py aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2) RaiseIfFailed("GetMinDistance", self.MeasuOp) return aTuple[0] @@ -2019,22 +2432,90 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theShape1,theShape2 Shapes to find minimal distance between. # @return Value of the minimal distance between the given shapes. # - # Example: see GEOM_TestMeasures.py + # @ref swig_all_measure "Example" def MinDistanceComponents(self, theShape1, theShape2): + # Example: see GEOM_TestMeasures.py aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2) RaiseIfFailed("GetMinDistance", self.MeasuOp) aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]] return aRes - ## Get angle between the given shapes. + ## Get angle between the given shapes in degrees. # @param theShape1,theShape2 Lines or linear edges to find angle between. - # @return Value of the angle between the given shapes. + # @return Value of the angle between the given shapes in degrees. # - # Example: see GEOM_TestMeasures.py + # @ref tui_measurement_tools_page "Example" def GetAngle(self, theShape1, theShape2): + # Example: see GEOM_TestMeasures.py anAngle = self.MeasuOp.GetAngle(theShape1, theShape2) RaiseIfFailed("GetAngle", self.MeasuOp) return anAngle + ## Get angle between the given shapes in radians. + # @param theShape1,theShape2 Lines or linear edges to find angle between. + # @return Value of the angle between the given shapes in radians. + # + # @ref tui_measurement_tools_page "Example" + def GetAngleRadians(self, theShape1, theShape2): + # Example: see GEOM_TestMeasures.py + anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180. + RaiseIfFailed("GetAngle", self.MeasuOp) + return anAngle + + ## @name Curve Curvature Measurement + # Methods for receiving radius of curvature of curves + # in the given point + ## @{ + + ## Measure curvature of a curve at a point, set by parameter. + # @ref swig_todo "Example" + def CurveCurvatureByParam(self, theCurve, theParam): + # Example: see GEOM_TestMeasures.py + aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam) + RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp) + return aCurv + + ## @details + # @ref swig_todo "Example" + def CurveCurvatureByPoint(self, theCurve, thePoint): + aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint) + RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp) + return aCurv + ## @} + + ## @name Surface Curvature Measurement + # Methods for receiving max and min radius of curvature of surfaces + # in the given point + ## @{ + + ## @details + ## @ref swig_todo "Example" + def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam): + # Example: see GEOM_TestMeasures.py + aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam) + RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp) + return aSurf + + ## @details + ## @ref swig_todo "Example" + def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint): + aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint) + RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp) + return aSurf + + ## @details + ## @ref swig_todo "Example" + def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam): + aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam) + RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp) + return aSurf + + ## @details + ## @ref swig_todo "Example" + def MinSurfaceCurvatureByPoint(self, theSurf, thePoint): + aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint) + RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp) + return aSurf + ## @} ## Get min and max tolerances of sub-shapes of theShape # @param theShape Shape, to get tolerances of. @@ -2043,8 +2524,9 @@ class geompyDC(GEOM._objref_GEOM_Gen): # EdgeMin,EdgeMax: Min and max tolerances of the edges. # VertMin,VertMax: Min and max tolerances of the vertices. # - # Example: see GEOM_TestMeasures.py + # @ref tui_measurement_tools_page "Example" def Tolerance(self,theShape): + # Example: see GEOM_TestMeasures.py aTuple = self.MeasuOp.GetTolerance(theShape) RaiseIfFailed("GetTolerance", self.MeasuOp) return aTuple @@ -2053,34 +2535,37 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theShape Shape to be described. # @return Description of the given shape. # - # Example: see GEOM_TestMeasures.py + # @ref tui_measurement_tools_page "Example" def WhatIs(self,theShape): + # Example: see GEOM_TestMeasures.py aDescr = self.MeasuOp.WhatIs(theShape) RaiseIfFailed("WhatIs", self.MeasuOp) return aDescr - + ## Get a point, situated at the centre of mass of theShape. # @param theShape Shape to define centre of mass of. # @return New GEOM_Object, containing the created point. # - # Example: see GEOM_TestMeasures.py + # @ref tui_measurement_tools_page "Example" def MakeCDG(self,theShape): + # Example: see GEOM_TestMeasures.py anObj = self.MeasuOp.GetCentreOfMass(theShape) RaiseIfFailed("GetCentreOfMass", self.MeasuOp) return anObj - + ## Get a normale to the given face. If the point is not given, # the normale is calculated at the center of mass. # @param theFace Face to define normale of. # @param theOptionalPoint Point to compute the normale at. # @return New GEOM_Object, containing the created vector. # - # Example: see GEOM_TestMeasures.py + # @ref swig_todo "Example" def GetNormal(self, theFace, theOptionalPoint = None): + # Example: see GEOM_TestMeasures.py anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint) RaiseIfFailed("GetNormal", self.MeasuOp) return anObj - + ## Check a topology of the given shape. # @param theShape Shape to check validity of. # @param theIsCheckGeom If FALSE, only the shape's topology will be checked, @@ -2088,8 +2573,9 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @return TRUE, if the shape "seems to be valid". # If theShape is invalid, prints a description of problem. # - # Example: see GEOM_TestMeasures.py + # @ref tui_measurement_tools_page "Example" def CheckShape(self,theShape, theIsCheckGeom = 0): + # Example: see GEOM_TestMeasures.py if theIsCheckGeom: (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape) RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp) @@ -2099,7 +2585,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): if IsValid == 0: print Status return IsValid - + ## Get position (LCS) of theShape. # # Origin of the LCS is situated at the shape's center of mass. @@ -2112,12 +2598,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): # Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction. # Xx,Xy,Xz: Coordinates of shape's LCS X direction. # - # Example: see GEOM_TestMeasures.py + # @ref swig_todo "Example" def GetPosition(self,theShape): + # Example: see GEOM_TestMeasures.py aTuple = self.MeasuOp.GetPosition(theShape) RaiseIfFailed("GetPosition", self.MeasuOp) return aTuple - + ## Get kind of theShape. # # @param theShape Shape to get a kind of. @@ -2127,69 +2614,72 @@ class geompyDC(GEOM._objref_GEOM_Gen): # or \a theDoubles list depends on the kind of the shape. # The full list of possible outputs is: # - # geompy.kind.COMPOUND nb_solids nb_faces nb_edges nb_vertices - # geompy.kind.COMPSOLID nb_solids nb_faces nb_edges nb_vertices - # - # geompy.kind.SHELL geompy.info.CLOSED nb_faces nb_edges nb_vertices - # geompy.kind.SHELL geompy.info.UNCLOSED nb_faces nb_edges nb_vertices - # - # geompy.kind.WIRE geompy.info.CLOSED nb_edges nb_vertices - # geompy.kind.WIRE geompy.info.UNCLOSED nb_edges nb_vertices - # - # geompy.kind.SPHERE xc yc zc R - # geompy.kind.CYLINDER xb yb zb dx dy dz R H - # geompy.kind.BOX xc yc zc ax ay az - # geompy.kind.ROTATED_BOX xc yc zc zx zy zz xx xy xz ax ay az - # geompy.kind.TORUS xc yc zc dx dy dz R_1 R_2 - # geompy.kind.CONE xb yb zb dx dy dz R_1 R_2 H - # geompy.kind.POLYHEDRON nb_faces nb_edges nb_vertices - # geompy.kind.SOLID nb_faces nb_edges nb_vertices - # - # geompy.kind.SPHERE2D xc yc zc R - # geompy.kind.CYLINDER2D xb yb zb dx dy dz R H - # geompy.kind.TORUS2D xc yc zc dx dy dz R_1 R_2 - # geompy.kind.CONE2D xc yc zc dx dy dz R_1 R_2 H - # geompy.kind.DISK_CIRCLE xc yc zc dx dy dz R - # geompy.kind.DISK_ELLIPSE xc yc zc dx dy dz R_1 R_2 - # geompy.kind.POLYGON xo yo zo dx dy dz nb_edges nb_vertices - # geompy.kind.PLANE xo yo zo dx dy dz - # geompy.kind.PLANAR xo yo zo dx dy dz nb_edges nb_vertices - # geompy.kind.FACE nb_edges nb_vertices - # - # geompy.kind.CIRCLE xc yc zc dx dy dz R - # geompy.kind.ARC_CIRCLE xc yc zc dx dy dz R x1 y1 z1 x2 y2 z2 - # geompy.kind.ELLIPSE xc yc zc dx dy dz R_1 R_2 - # geompy.kind.ARC_ELLIPSE xc yc zc dx dy dz R_1 R_2 x1 y1 z1 x2 y2 z2 - # geompy.kind.LINE xo yo zo dx dy dz - # geompy.kind.SEGMENT x1 y1 z1 x2 y2 z2 - # geompy.kind.EDGE nb_vertices - # - # geompy.kind.VERTEX x y z - # - # Example: see GEOM_TestMeasures.py + # - geompy.kind.COMPOUND nb_solids nb_faces nb_edges nb_vertices + # - geompy.kind.COMPSOLID nb_solids nb_faces nb_edges nb_vertices + # + # - geompy.kind.SHELL geompy.info.CLOSED nb_faces nb_edges nb_vertices + # - geompy.kind.SHELL geompy.info.UNCLOSED nb_faces nb_edges nb_vertices + # + # - geompy.kind.WIRE geompy.info.CLOSED nb_edges nb_vertices + # - geompy.kind.WIRE geompy.info.UNCLOSED nb_edges nb_vertices + # + # - geompy.kind.SPHERE xc yc zc R + # - geompy.kind.CYLINDER xb yb zb dx dy dz R H + # - geompy.kind.BOX xc yc zc ax ay az + # - geompy.kind.ROTATED_BOX xc yc zc zx zy zz xx xy xz ax ay az + # - geompy.kind.TORUS xc yc zc dx dy dz R_1 R_2 + # - geompy.kind.CONE xb yb zb dx dy dz R_1 R_2 H + # - geompy.kind.POLYHEDRON nb_faces nb_edges nb_vertices + # - geompy.kind.SOLID nb_faces nb_edges nb_vertices + # + # - geompy.kind.SPHERE2D xc yc zc R + # - geompy.kind.CYLINDER2D xb yb zb dx dy dz R H + # - geompy.kind.TORUS2D xc yc zc dx dy dz R_1 R_2 + # - geompy.kind.CONE2D xc yc zc dx dy dz R_1 R_2 H + # - geompy.kind.DISK_CIRCLE xc yc zc dx dy dz R + # - geompy.kind.DISK_ELLIPSE xc yc zc dx dy dz R_1 R_2 + # - geompy.kind.POLYGON xo yo zo dx dy dz nb_edges nb_vertices + # - geompy.kind.PLANE xo yo zo dx dy dz + # - geompy.kind.PLANAR xo yo zo dx dy dz nb_edges nb_vertices + # - geompy.kind.FACE nb_edges nb_vertices + # + # - geompy.kind.CIRCLE xc yc zc dx dy dz R + # - geompy.kind.ARC_CIRCLE xc yc zc dx dy dz R x1 y1 z1 x2 y2 z2 + # - geompy.kind.ELLIPSE xc yc zc dx dy dz R_1 R_2 + # - geompy.kind.ARC_ELLIPSE xc yc zc dx dy dz R_1 R_2 x1 y1 z1 x2 y2 z2 + # - geompy.kind.LINE xo yo zo dx dy dz + # - geompy.kind.SEGMENT x1 y1 z1 x2 y2 z2 + # - geompy.kind.EDGE nb_vertices + # + # - geompy.kind.VERTEX x y z + # + # @ref swig_todo "Example" def KindOfShape(self,theShape): + # Example: see GEOM_TestMeasures.py aRoughTuple = self.MeasuOp.KindOfShape(theShape) RaiseIfFailed("KindOfShape", self.MeasuOp) - + aKind = aRoughTuple[0] anInts = aRoughTuple[1] aDbls = aRoughTuple[2] - + # Now there is no exception from this rule: aKindTuple = [aKind] + aDbls + anInts - + # If they are we will regroup parameters for such kind of shape. # For example: #if aKind == kind.SOME_KIND: # # SOME_KIND int int double int double double # aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]] - + return aKindTuple - - # ----------------------------------------------------------------------------- - # Import/Export objects - # ----------------------------------------------------------------------------- - + + # end of l2_measure + ## @} + + ## @addtogroup l2_import_export + ## @{ + ## Import a shape from the BREP or IGES or STEP file # (depends on given format) with given name. # @param theFileName The file, containing the shape. @@ -2197,121 +2687,145 @@ class geompyDC(GEOM._objref_GEOM_Gen): # Available formats can be obtained with InsertOp.ImportTranslators() method. # @return New GEOM_Object, containing the imported shape. # - # Example: see GEOM_TestOthers.py + # @ref swig_Import_Export "Example" def Import(self,theFileName, theFormatName): + # Example: see GEOM_TestOthers.py anObj = self.InsertOp.Import(theFileName, theFormatName) RaiseIfFailed("Import", self.InsertOp) return anObj - + ## Shortcut to Import() for BREP format # - # Example: see GEOM_TestOthers.py + # @ref swig_Import_Export "Example" def ImportBREP(self,theFileName): + # Example: see GEOM_TestOthers.py return self.Import(theFileName, "BREP") - + ## Shortcut to Import() for IGES format # - # Example: see GEOM_TestOthers.py + # @ref swig_Import_Export "Example" def ImportIGES(self,theFileName): + # Example: see GEOM_TestOthers.py return self.Import(theFileName, "IGES") - + ## Shortcut to Import() for STEP format # - # Example: see GEOM_TestOthers.py + # @ref swig_Import_Export "Example" def ImportSTEP(self,theFileName): + # Example: see GEOM_TestOthers.py return self.Import(theFileName, "STEP") - + ## Export the given shape into a file with given name. # @param theObject Shape to be stored in the file. # @param theFileName Name of the file to store the given shape in. # @param theFormatName Specify format for the shape storage. # Available formats can be obtained with InsertOp.ImportTranslators() method. # - # Example: see GEOM_TestOthers.py + # @ref swig_Import_Export "Example" def Export(self,theObject, theFileName, theFormatName): + # Example: see GEOM_TestOthers.py self.InsertOp.Export(theObject, theFileName, theFormatName) if self.InsertOp.IsDone() == 0: raise RuntimeError, "Export : " + self.InsertOp.GetErrorCode() pass pass - + ## Shortcut to Export() for BREP format # - # Example: see GEOM_TestOthers.py + # @ref swig_Import_Export "Example" def ExportBREP(self,theObject, theFileName): + # Example: see GEOM_TestOthers.py return self.Export(theObject, theFileName, "BREP") - + ## Shortcut to Export() for IGES format # - # Example: see GEOM_TestOthers.py + # @ref swig_Import_Export "Example" def ExportIGES(self,theObject, theFileName): + # Example: see GEOM_TestOthers.py return self.Export(theObject, theFileName, "IGES") - + ## Shortcut to Export() for STEP format # - # Example: see GEOM_TestOthers.py + # @ref swig_Import_Export "Example" def ExportSTEP(self,theObject, theFileName): + # Example: see GEOM_TestOthers.py return self.Export(theObject, theFileName, "STEP") - - # ----------------------------------------------------------------------------- - # Block operations - # ----------------------------------------------------------------------------- - + + # end of l2_import_export + ## @} + + ## @addtogroup l3_blocks + ## @{ + ## Create a quadrangle face from four edges. Order of Edges is not # important. It is not necessary that edges share the same vertex. # @param E1,E2,E3,E4 Edges for the face bound. # @return New GEOM_Object, containing the created face. # - # Example: see GEOM_Spanner.py + # @ref tui_building_by_blocks_page "Example" def MakeQuad(self,E1, E2, E3, E4): + # Example: see GEOM_Spanner.py anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4) RaiseIfFailed("MakeQuad", self.BlocksOp) return anObj - + ## Create a quadrangle face on two edges. # The missing edges will be built by creating the shortest ones. # @param E1,E2 Two opposite edges for the face. # @return New GEOM_Object, containing the created face. # - # Example: see GEOM_Spanner.py + # @ref tui_building_by_blocks_page "Example" def MakeQuad2Edges(self,E1, E2): + # Example: see GEOM_Spanner.py anObj = self.BlocksOp.MakeQuad2Edges(E1, E2) RaiseIfFailed("MakeQuad2Edges", self.BlocksOp) return anObj - + ## Create a quadrangle face with specified corners. # The missing edges will be built by creating the shortest ones. # @param V1,V2,V3,V4 Corner vertices for the face. # @return New GEOM_Object, containing the created face. # - # Example: see GEOM_Spanner.py + # @ref tui_building_by_blocks_page "Example 1" + # \n @ref swig_MakeQuad4Vertices "Example 2" def MakeQuad4Vertices(self,V1, V2, V3, V4): + # Example: see GEOM_Spanner.py anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4) RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp) return anObj - + ## Create a hexahedral solid, bounded by the six given faces. Order of # faces is not important. It is not necessary that Faces share the same edge. # @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid. # @return New GEOM_Object, containing the created solid. # - # Example: see GEOM_Spanner.py + # @ref tui_building_by_blocks_page "Example 1" + # \n @ref swig_MakeHexa "Example 2" def MakeHexa(self,F1, F2, F3, F4, F5, F6): + # Example: see GEOM_Spanner.py anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6) RaiseIfFailed("MakeHexa", self.BlocksOp) return anObj - + ## Create a hexahedral solid between two given faces. # The missing faces will be built by creating the smallest ones. # @param F1,F2 Two opposite faces for the hexahedral solid. # @return New GEOM_Object, containing the created solid. # - # Example: see GEOM_Spanner.py + # @ref tui_building_by_blocks_page "Example 1" + # \n @ref swig_MakeHexa2Faces "Example 2" def MakeHexa2Faces(self,F1, F2): + # Example: see GEOM_Spanner.py anObj = self.BlocksOp.MakeHexa2Faces(F1, F2) RaiseIfFailed("MakeHexa2Faces", self.BlocksOp) return anObj - + + # end of l3_blocks + ## @} + + ## @addtogroup l3_blocks_op + ## @{ + ## Get a vertex, found in the given shape by its coordinates. # @param theShape Block or a compound of blocks. # @param theX,theY,theZ Coordinates of the sought vertex. @@ -2319,89 +2833,103 @@ class geompyDC(GEOM._objref_GEOM_Gen): # vertex and point with the given coordinates. # @return New GEOM_Object, containing the found vertex. # - # Example: see GEOM_TestOthers.py + # @ref swig_GetPoint "Example" def GetPoint(self,theShape, theX, theY, theZ, theEpsilon): + # Example: see GEOM_TestOthers.py anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon) RaiseIfFailed("GetPoint", self.BlocksOp) return anObj - + ## Get an edge, found in the given shape by two given vertices. # @param theShape Block or a compound of blocks. # @param thePoint1,thePoint2 Points, close to the ends of the desired edge. # @return New GEOM_Object, containing the found edge. # - # Example: see GEOM_Spanner.py + # @ref swig_todo "Example" def GetEdge(self,theShape, thePoint1, thePoint2): + # Example: see GEOM_Spanner.py anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2) RaiseIfFailed("GetEdge", self.BlocksOp) return anObj - + ## Find an edge of the given shape, which has minimal distance to the given point. # @param theShape Block or a compound of blocks. # @param thePoint Point, close to the desired edge. # @return New GEOM_Object, containing the found edge. # - # Example: see GEOM_TestOthers.py + # @ref swig_GetEdgeNearPoint "Example" def GetEdgeNearPoint(self,theShape, thePoint): + # Example: see GEOM_TestOthers.py anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint) RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp) return anObj - + ## Returns a face, found in the given shape by four given corner vertices. # @param theShape Block or a compound of blocks. - # @param thePoint1-thePoint4 Points, close to the corners of the desired face. + # @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face. # @return New GEOM_Object, containing the found face. # - # Example: see GEOM_Spanner.py + # @ref swig_todo "Example" def GetFaceByPoints(self,theShape, thePoint1, thePoint2, thePoint3, thePoint4): + # Example: see GEOM_Spanner.py anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4) RaiseIfFailed("GetFaceByPoints", self.BlocksOp) return anObj - + ## Get a face of block, found in the given shape by two given edges. # @param theShape Block or a compound of blocks. # @param theEdge1,theEdge2 Edges, close to the edges of the desired face. # @return New GEOM_Object, containing the found face. # - # Example: see GEOM_Spanner.py + # @ref swig_todo "Example" def GetFaceByEdges(self,theShape, theEdge1, theEdge2): + # Example: see GEOM_Spanner.py anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2) RaiseIfFailed("GetFaceByEdges", self.BlocksOp) return anObj - + ## Find a face, opposite to the given one in the given block. # @param theBlock Must be a hexahedral solid. # @param theFace Face of \a theBlock, opposite to the desired face. # @return New GEOM_Object, containing the found face. # - # Example: see GEOM_Spanner.py + # @ref swig_GetOppositeFace "Example" def GetOppositeFace(self,theBlock, theFace): + # Example: see GEOM_Spanner.py anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace) RaiseIfFailed("GetOppositeFace", self.BlocksOp) return anObj - + ## Find a face of the given shape, which has minimal distance to the given point. # @param theShape Block or a compound of blocks. # @param thePoint Point, close to the desired face. # @return New GEOM_Object, containing the found face. # - # Example: see GEOM_Spanner.py + # @ref swig_GetFaceNearPoint "Example" def GetFaceNearPoint(self,theShape, thePoint): + # Example: see GEOM_Spanner.py anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint) RaiseIfFailed("GetFaceNearPoint", self.BlocksOp) return anObj - + ## Find a face of block, whose outside normale has minimal angle with the given vector. - # @param theShape Block or a compound of blocks. + # @param theBlock Block or a compound of blocks. # @param theVector Vector, close to the normale of the desired face. # @return New GEOM_Object, containing the found face. # - # Example: see GEOM_Spanner.py - def GetFaceByNormale(self,theBlock, theVector): + # @ref swig_todo "Example" + def GetFaceByNormale(self, theBlock, theVector): + # Example: see GEOM_Spanner.py anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector) RaiseIfFailed("GetFaceByNormale", self.BlocksOp) return anObj - + + # end of l3_blocks_op + ## @} + + ## @addtogroup l4_blocks_measure + ## @{ + ## Check, if the compound of blocks is given. # To be considered as a compound of blocks, the # given shape must satisfy the following conditions: @@ -2413,39 +2941,49 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @return TRUE, if the given shape is a compound of blocks. # If theCompound is not valid, prints all discovered errors. # - # Example: see GEOM_Spanner.py + # @ref tui_measurement_tools_page "Example 1" + # \n @ref swig_CheckCompoundOfBlocks "Example 2" def CheckCompoundOfBlocks(self,theCompound): + # Example: see GEOM_Spanner.py (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound) RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp) if IsValid == 0: Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors) print Descr return IsValid - + ## Remove all seam and degenerated edges from \a theShape. # Unite faces and edges, sharing one surface. It means that # this faces must have references to one C++ surface object (handle). # @param theShape The compound or single solid to remove irregular edges from. # @return Improved shape. # - # Example: see GEOM_TestOthers.py + # @ref swig_RemoveExtraEdges "Example" def RemoveExtraEdges(self,theShape): + # Example: see GEOM_TestOthers.py anObj = self.BlocksOp.RemoveExtraEdges(theShape) RaiseIfFailed("RemoveExtraEdges", self.BlocksOp) return anObj - + ## Check, if the given shape is a blocks compound. # Fix all detected errors. # \note Single block can be also fixed by this method. - # @param theCompound The compound to check and improve. + # @param theShape The compound to check and improve. # @return Improved compound. # - # Example: see GEOM_TestOthers.py + # @ref swig_CheckAndImprove "Example" def CheckAndImprove(self,theShape): + # Example: see GEOM_TestOthers.py anObj = self.BlocksOp.CheckAndImprove(theShape) RaiseIfFailed("CheckAndImprove", self.BlocksOp) return anObj - + + # end of l4_blocks_measure + ## @} + + ## @addtogroup l3_blocks_op + ## @{ + ## Get all the blocks, contained in the given compound. # @param theCompound The compound to explode. # @param theMinNbFaces If solid has lower number of faces, it is not a block. @@ -2453,42 +2991,47 @@ class geompyDC(GEOM._objref_GEOM_Gen): # \note If theMaxNbFaces = 0, the maximum number of faces is not restricted. # @return List of GEOM_Objects, containing the retrieved blocks. # - # Example: see GEOM_TestOthers.py + # @ref tui_explode_on_blocks "Example 1" + # \n @ref swig_MakeBlockExplode "Example 2" def MakeBlockExplode(self,theCompound, theMinNbFaces, theMaxNbFaces): + # Example: see GEOM_TestOthers.py aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces) RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp) return aList - + ## Find block, containing the given point inside its volume or on boundary. # @param theCompound Compound, to find block in. # @param thePoint Point, close to the desired block. If the point lays on # boundary between some blocks, we return block with nearest center. # @return New GEOM_Object, containing the found block. # - # Example: see GEOM_Spanner.py + # @ref swig_todo "Example" def GetBlockNearPoint(self,theCompound, thePoint): + # Example: see GEOM_Spanner.py anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint) RaiseIfFailed("GetBlockNearPoint", self.BlocksOp) return anObj - + ## Find block, containing all the elements, passed as the parts, or maximum quantity of them. # @param theCompound Compound, to find block in. # @param theParts List of faces and/or edges and/or vertices to be parts of the found block. # @return New GEOM_Object, containing the found block. # - # Example: see GEOM_TestOthers.py + # @ref swig_GetBlockByParts "Example" def GetBlockByParts(self,theCompound, theParts): + # Example: see GEOM_TestOthers.py anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts) RaiseIfFailed("GetBlockByParts", self.BlocksOp) return anObj - + ## Return all blocks, containing all the elements, passed as the parts. # @param theCompound Compound, to find blocks in. # @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks. # @return List of GEOM_Objects, containing the found blocks. # - # Example: see GEOM_Spanner.py + # @ref swig_todo "Example" def GetBlocksByParts(self,theCompound, theParts): + # Example: see GEOM_Spanner.py aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts) RaiseIfFailed("GetBlocksByParts", self.BlocksOp) return aList @@ -2502,12 +3045,13 @@ class geompyDC(GEOM._objref_GEOM_Gen): # \note Unique ID of sub-shape can be obtained, using method GetSubShapeID(). # @return New GEOM_Object, containing the result shape. # - # Example: see GEOM_Spanner.py + # @ref tui_multi_transformation "Example" def MakeMultiTransformation1D(self,Block, DirFace1, DirFace2, NbTimes): + # Example: see GEOM_Spanner.py anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes) RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp) return anObj - + ## Multi-transformate block and glue the result. # @param Block Hexahedral solid to be multi-transformed. # @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation. @@ -2515,14 +3059,15 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param NbTimesU,NbTimesV Quantity of transformations to be done. # @return New GEOM_Object, containing the result shape. # - # Example: see GEOM_Spanner.py + # @ref tui_multi_transformation "Example" def MakeMultiTransformation2D(self,Block, DirFace1U, DirFace2U, NbTimesU, DirFace1V, DirFace2V, NbTimesV): + # Example: see GEOM_Spanner.py anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU, DirFace1V, DirFace2V, NbTimesV) RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp) return anObj - + ## Build all possible propagation groups. # Propagation group is a set of all edges, opposite to one (main) # edge of this group directly or through other opposite edges. @@ -2530,74 +3075,84 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theShape Shape to build propagation groups on. # @return List of GEOM_Objects, each of them is a propagation group. # - # Example: see GEOM_TestOthers.py + # @ref swig_Propagate "Example" def Propagate(self,theShape): + # Example: see GEOM_TestOthers.py listChains = self.BlocksOp.Propagate(theShape) RaiseIfFailed("Propagate", self.BlocksOp) return listChains - - # ----------------------------------------------------------------------------- - # Group operations - # ----------------------------------------------------------------------------- - + + # end of l3_blocks_op + ## @} + + ## @addtogroup l3_groups + ## @{ + ## Creates a new group which will store sub shapes of theMainShape # @param theMainShape is a GEOM object on which the group is selected # @param theShapeType defines a shape type of the group # @return a newly created GEOM group # - # Example: see GEOM_TestOthers.py + # @ref tui_working_with_groups_page "Example 1" + # \n @ref swig_CreateGroup "Example 2" def CreateGroup(self,theMainShape, theShapeType): + # Example: see GEOM_TestOthers.py anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType) RaiseIfFailed("CreateGroup", self.GroupOp) return anObj - + ## Adds a sub object with ID theSubShapeId to the group # @param theGroup is a GEOM group to which the new sub shape is added # @param theSubShapeID is a sub shape ID in the main object. # \note Use method GetSubShapeID() to get an unique ID of the sub shape # - # Example: see GEOM_TestOthers.py + # @ref tui_working_with_groups_page "Example" def AddObject(self,theGroup, theSubShapeID): + # Example: see GEOM_TestOthers.py self.GroupOp.AddObject(theGroup, theSubShapeID) RaiseIfFailed("AddObject", self.GroupOp) pass - + ## Removes a sub object with ID \a theSubShapeId from the group # @param theGroup is a GEOM group from which the new sub shape is removed # @param theSubShapeID is a sub shape ID in the main object. # \note Use method GetSubShapeID() to get an unique ID of the sub shape # - # Example: see GEOM_TestOthers.py + # @ref tui_working_with_groups_page "Example" def RemoveObject(self,theGroup, theSubShapeID): + # Example: see GEOM_TestOthers.py self.GroupOp.RemoveObject(theGroup, theSubShapeID) RaiseIfFailed("RemoveObject", self.GroupOp) pass - + ## Adds to the group all the given shapes. No errors, if some shapes are alredy included. # @param theGroup is a GEOM group to which the new sub shapes are added. # @param theSubShapes is a list of sub shapes to be added. # - # Example: see GEOM_TestOthers.py + # @ref tui_working_with_groups_page "Example" def UnionList (self,theGroup, theSubShapes): + # Example: see GEOM_TestOthers.py self.GroupOp.UnionList(theGroup, theSubShapes) RaiseIfFailed("UnionList", self.GroupOp) pass - + ## Works like the above method, but argument # theSubShapes here is a list of sub-shapes indices # - # Example: see GEOM_TestOthers.py + # @ref swig_UnionIDs "Example" def UnionIDs(self,theGroup, theSubShapes): + # Example: see GEOM_TestOthers.py self.GroupOp.UnionIDs(theGroup, theSubShapes) RaiseIfFailed("UnionIDs", self.GroupOp) pass - + ## Removes from the group all the given shapes. No errors, if some shapes are not included. # @param theGroup is a GEOM group from which the sub-shapes are removed. # @param theSubShapes is a list of sub-shapes to be removed. # - # Example: see GEOM_TestOthers.py + # @ref tui_working_with_groups_page "Example" def DifferenceList (self,theGroup, theSubShapes): + # Example: see GEOM_TestOthers.py self.GroupOp.DifferenceList(theGroup, theSubShapes) RaiseIfFailed("DifferenceList", self.GroupOp) pass @@ -2605,43 +3160,49 @@ class geompyDC(GEOM._objref_GEOM_Gen): ## Works like the above method, but argument # theSubShapes here is a list of sub-shapes indices # - # Example: see GEOM_TestOthers.py + # @ref swig_DifferenceIDs "Example" def DifferenceIDs(self,theGroup, theSubShapes): + # Example: see GEOM_TestOthers.py self.GroupOp.DifferenceIDs(theGroup, theSubShapes) RaiseIfFailed("DifferenceIDs", self.GroupOp) pass - + ## Returns a list of sub objects ID stored in the group # @param theGroup is a GEOM group for which a list of IDs is requested # - # Example: see GEOM_TestOthers.py + # @ref swig_GetObjectIDs "Example" def GetObjectIDs(self,theGroup): + # Example: see GEOM_TestOthers.py ListIDs = self.GroupOp.GetObjects(theGroup) RaiseIfFailed("GetObjects", self.GroupOp) return ListIDs - + ## Returns a type of sub objects stored in the group # @param theGroup is a GEOM group which type is returned. # - # Example: see GEOM_TestOthers.py + # @ref swig_GetType "Example" def GetType(self,theGroup): + # Example: see GEOM_TestOthers.py aType = self.GroupOp.GetType(theGroup) RaiseIfFailed("GetType", self.GroupOp) return aType - + ## Returns a main shape associated with the group # @param theGroup is a GEOM group for which a main shape object is requested # @return a GEOM object which is a main shape for theGroup # - # Example: see GEOM_TestOthers.py + # @ref swig_GetMainShape "Example" def GetMainShape(self,theGroup): + # Example: see GEOM_TestOthers.py anObj = self.GroupOp.GetMainShape(theGroup) RaiseIfFailed("GetMainShape", self.GroupOp) return anObj - + ## Create group of edges of theShape, whose length is in range [min_length, max_length]. # If include_min/max == 0, edges with length == min/max_length will not be included in result. - def GetEdgesByLength (self,theShape, min_length, max_length, include_min = 1, include_max = 1): + # + # @ref swig_todo "Example" + def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1): edges = self.SubShapeAll(theShape, ShapeType["EDGE"]) edges_in_range = [] for edge in edges: @@ -2654,19 +3215,21 @@ class geompyDC(GEOM._objref_GEOM_Gen): skip = 1 else: edges_in_range.append(edge) - + if len(edges_in_range) <= 0: print "No edges found by given criteria" return 0 - + group_edges = self.CreateGroup(theShape, ShapeType["EDGE"]) self.UnionList(group_edges, edges_in_range) - + return group_edges - + ## Create group of edges of selected shape, whose length is in range [min_length, max_length]. # If include_min/max == 0, edges with length == min/max_length will not be included in result. - def SelectEdges (self,min_length, max_length, include_min = 1, include_max = 1): + # + # @ref swig_todo "Example" + def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1): nb_selected = sg.SelectedCount() if nb_selected < 1: print "Select a shape before calling this function, please." @@ -2674,25 +3237,39 @@ class geompyDC(GEOM._objref_GEOM_Gen): if nb_selected > 1: print "Only one shape must be selected" return 0 - + id_shape = sg.getSelected(0) shape = IDToObject( id_shape ) - + group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max) - + left_str = " < " right_str = " < " if include_min: left_str = " <= " if include_max: right_str = " <= " - + self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length` + left_str + "length" + right_str + `max_length`) - + sg.updateObjBrowser(1) - + return group_edges - + + # end of l3_groups + ## @} + + ## Create a copy of the given object + # @ingroup l1_geompy_auxiliary + # + # @ref swig_all_advanced "Example" + def MakeCopy(self,theOriginal): + # Example: see GEOM_TestAll.py + anObj = self.InsertOp.MakeCopy(theOriginal) + RaiseIfFailed("MakeCopy", self.InsertOp) + return anObj + ## Add Path to load python scripts from + # @ingroup l1_geompy_auxiliary def addPath(self,Path): if (sys.path.count(Path) < 1): sys.path.append(Path) diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx index 2e7a380e1..021c7d795 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx @@ -107,7 +107,7 @@ void GenerationGUI_FillingDlg::Init() myMaxDeg = 5; myTol3D = 0.0001; myTol2D = 0.0001; - myNbIter = 5; + myNbIter = 0; myIsApprox = false; myOkCompound = false; @@ -118,7 +118,7 @@ void GenerationGUI_FillingDlg::Init() /* min, max, step and decimals for spin boxes & initial values */ initSpinBox( GroupPoints->SpinBox1, 2.0, MAX_NUMBER, SpecificStep1, 3 ); initSpinBox( GroupPoints->SpinBox2, 0.00001, 10000.0, SpecificStep2, 5 ); - initSpinBox( GroupPoints->SpinBox3, 1.0, MAX_NUMBER, SpecificStep1, 3 ); + initSpinBox( GroupPoints->SpinBox3, 0.0, MAX_NUMBER, SpecificStep1, 3 ); initSpinBox( GroupPoints->SpinBox4, 1.0, MAX_NUMBER, SpecificStep1, 3 ); initSpinBox( GroupPoints->SpinBox5, 0.00001, 10000.0, SpecificStep2, 5 ); diff --git a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx index 25872683d..3e6f7fa8e 100644 --- a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx @@ -118,7 +118,9 @@ void GenerationGUI_RevolDlg::Init() double SpecificStep = 5; /* min, max, step and decimals for spin boxes & initial values */ - initSpinBox( GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, SpecificStep, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY + //initSpinBox( GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, SpecificStep, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY + // 05.06.2008 skl for IPAL12958 + initSpinBox( GroupPoints->SpinBox_DX, 0.0, 360.0, SpecificStep, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY GroupPoints->SpinBox_DX->setValue( 45.0 ); /* signals and slots connections */ diff --git a/src/GroupGUI/GroupGUI_GroupDlg.cxx b/src/GroupGUI/GroupGUI_GroupDlg.cxx index 017dd7030..1b3f5b782 100644 --- a/src/GroupGUI/GroupGUI_GroupDlg.cxx +++ b/src/GroupGUI/GroupGUI_GroupDlg.cxx @@ -2,21 +2,21 @@ // // Copyright (C) 2004 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// // 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. -// +// // 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 // // File : GroupGUI_GroupDlg.cxx @@ -25,21 +25,29 @@ #include "GroupGUI_GroupDlg.h" +#include +#include #include +#include #include -#include #include #include -#include #include #include #include - #include +#include +#include +#include +#include + #include #include +#include + +enum { ALL_SUBSHAPES = 0, GET_IN_PLACE, SUBSHAPES_OF_SHAPE2 }; GroupGUI_GroupDlg::GroupGUI_GroupDlg( Mode mode, GeometryGUI* theGeometryGUI, QWidget* parent ) : GEOMBase_Skeleton( theGeometryGUI, parent, false ), @@ -48,11 +56,11 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg( Mode mode, GeometryGUI* theGeometryGUI, QW { SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); - QPixmap image0 ( resMgr->loadPixmap( "GEOM", tr( "ICON_OBJBROWSER_VERTEX" ) ) ); - QPixmap image1 ( resMgr->loadPixmap( "GEOM", tr( "ICON_OBJBROWSER_EDGE" ) ) ); - QPixmap image2 ( resMgr->loadPixmap( "GEOM", tr( "ICON_OBJBROWSER_FACE" ) ) ); - QPixmap image3 ( resMgr->loadPixmap( "GEOM", tr( "ICON_OBJBROWSER_SOLID" ) ) ); - QPixmap iconSelect( resMgr->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); + QPixmap image0 ( resMgr->loadPixmap( "GEOM", tr( "ICON_OBJBROWSER_VERTEX" ) ) ); + QPixmap image1 ( resMgr->loadPixmap( "GEOM", tr( "ICON_OBJBROWSER_EDGE" ) ) ); + QPixmap image2 ( resMgr->loadPixmap( "GEOM", tr( "ICON_OBJBROWSER_FACE" ) ) ); + QPixmap image3 ( resMgr->loadPixmap( "GEOM", tr( "ICON_OBJBROWSER_SOLID" ) ) ); + QPixmap iconSelect ( resMgr->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); setWindowTitle( myMode == CreateGroup ? tr( "CREATE_GROUP_TITLE" ) : tr( "EDIT_GROUP_TITLE" ) ); @@ -69,24 +77,72 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg( Mode mode, GeometryGUI* theGeometryGUI, QW mainFrame()->GroupBoxName->setTitle( tr( "GROUP_NAME" ) ); // Main shape and sub-shapes - myGroupBox = new DlgRef_1Sel1List1Check3Btn( centralWidget() ); - myGroupBox->GroupBox1->setTitle( tr( "MAIN_SUB_SHAPES" ) ); - myGroupBox->TextLabel1->setText( tr( "MAIN_SHAPE" ) ); - myGroupBox->PushButton1->setIcon( iconSelect ); - myGroupBox->PushButton1->setEnabled( myMode == CreateGroup ); - myGroupBox->LineEdit1->setReadOnly( true ); - myGroupBox->LineEdit1->setEnabled( myMode == CreateGroup ); - myGroupBox->CheckButton1->setText( tr( "SELECT_SUB_SHAPES" ) ); - myGroupBox->PushButton2->setText( tr( "SELECT_ALL" ) ); - myGroupBox->PushButton3->setText( tr( "ADD" ) ); - myGroupBox->PushButton4->setText( tr( "REMOVE" ) ); - myGroupBox->ListView1->setSelectionMode( QAbstractItemView::ExtendedSelection ); - myGroupBox->ListView1->setFlow( QListView::TopToBottom ); - myGroupBox->ListView1->setWrapping( true ); + QGroupBox* GroupMedium = new QGroupBox( tr( "MAIN_SUB_SHAPES" ), centralWidget() ); + QGridLayout* aMedLayout = new QGridLayout( GroupMedium ); + aMedLayout->setMargin( 9 ); + aMedLayout->setSpacing( 6 ); + + QLabel* aMainLabel = new QLabel( tr( "MAIN_SHAPE" ), GroupMedium ); + + mySelBtn = new QPushButton( GroupMedium ); + mySelBtn->setIcon( iconSelect ); + mySelBtn->setEnabled( myMode == CreateGroup ); + + myMainName = new QLineEdit( GroupMedium ); + myMainName->setReadOnly( true ); + myMainName->setEnabled( myMode == CreateGroup ); + + QLabel* aSecondLabel = new QLabel( tr( "SECOND_SHAPE" ), GroupMedium ); + + mySelBtn2 = new QPushButton( GroupMedium ); + mySelBtn2->setIcon( iconSelect ); + mySelBtn2->setEnabled( false ); + + myShape2Name = new QLineEdit( GroupMedium ); + myShape2Name->setReadOnly( true ); + myShape2Name->setEnabled( false ); + + mySelectionWayGroupBox = new QGroupBox( tr("SELECT_SUB_SHAPES"), GroupMedium ); + mySelectionWayGroup = new QButtonGroup( mySelectionWayGroupBox ); + QRadioButton* allSubs = new QRadioButton( tr( "ALL_SUBSHAPES" ) , mySelectionWayGroupBox ); + QRadioButton* inPlaceSubs = new QRadioButton( tr( "GET_IN_PLACE" ) , mySelectionWayGroupBox ); + QRadioButton* shape2Subs = new QRadioButton( tr( "SUBSHAPES_OF_SHAPE2" ), mySelectionWayGroupBox ); + QVBoxLayout* mySelWayLayout = new QVBoxLayout( mySelectionWayGroupBox ); + mySelWayLayout->setMargin( 9 ); + mySelWayLayout->setSpacing( 6 ); + mySelWayLayout->addWidget( allSubs ); + mySelWayLayout->addWidget( inPlaceSubs ); + mySelWayLayout->addWidget( shape2Subs ); + mySelectionWayGroup->addButton( allSubs, ALL_SUBSHAPES ); + mySelectionWayGroup->addButton( inPlaceSubs, GET_IN_PLACE ); + mySelectionWayGroup->addButton( shape2Subs, SUBSHAPES_OF_SHAPE2 ); + allSubs->setChecked( true ); + + mySelAllBtn = new QPushButton( tr( "SELECT_ALL" ), GroupMedium ); + myAddBtn = new QPushButton( tr( "ADD" ), GroupMedium ); + myRemBtn = new QPushButton( tr( "REMOVE" ), GroupMedium ); + myIdList = new QListWidget( GroupMedium ); + + myIdList->setSelectionMode( QAbstractItemView::ExtendedSelection ); + myIdList->setFlow( QListView::TopToBottom ); + myIdList->setWrapping( true ); + + aMedLayout->addWidget( aMainLabel, 0, 0 ); + aMedLayout->addWidget( mySelBtn, 0, 1 ); + aMedLayout->addWidget( myMainName, 0, 2, 1, 2 ); + aMedLayout->addWidget( aSecondLabel, 1, 0 ); + aMedLayout->addWidget( mySelBtn2, 1, 1 ); + aMedLayout->addWidget( myShape2Name, 1, 2, 1, 2 ); + aMedLayout->addWidget( mySelectionWayGroupBox, 2, 0, 3, 3 ); + aMedLayout->addWidget( mySelAllBtn, 2, 3 ); + aMedLayout->addWidget( myAddBtn, 3, 3 ); + aMedLayout->addWidget( myRemBtn, 4, 3 ); + aMedLayout->addWidget( myIdList, 5, 0, 1, 4 ); + aMedLayout->setRowStretch( 5, 1 ); QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); layout->setMargin( 0 ); layout->setSpacing( 6 ); - layout->addWidget( myGroupBox ); + layout->addWidget( GroupMedium ); setHelpFileName( "work_with_groups_page.html" ); @@ -97,7 +153,6 @@ GroupGUI_GroupDlg::~GroupGUI_GroupDlg() { } - //================================================================================= // function : Init() // purpose : @@ -105,16 +160,16 @@ GroupGUI_GroupDlg::~GroupGUI_GroupDlg() void GroupGUI_GroupDlg::Init() { // san -- TODO: clear selected sub-shapes... - myGroupBox->CheckButton1->setChecked( true ); - + //mySelSubBtn->setChecked( true ); if ( myMode == CreateGroup ) { initName( tr( "GROUP_PREFIX" ) ); // Get ready for main shape selection - myEditCurrentArgument = myGroupBox->LineEdit1; + myEditCurrentArgument = myMainName; - connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) ); - connect( myGroupBox->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); + connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) ); + connect( mySelBtn, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); + connect( mySelBtn2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); } else if ( myMode == EditGroup && IObjectCount() ) { Standard_Boolean aResult = Standard_False; @@ -129,49 +184,58 @@ void GroupGUI_GroupDlg::Init() GEOM::GEOM_IGroupOperations_var anOp = GEOM::GEOM_IGroupOperations::_narrow( getOperation() ); myMainObj = anOp->GetMainShape( myGroup ); if ( !CORBA::is_nil( myMainObj ) ) - myGroupBox->LineEdit1->setText( GEOMBase::GetName( myMainObj ) ); + myMainName->setText( GEOMBase::GetName( myMainObj ) ); setShapeType( (TopAbs_ShapeEnum)anOp->GetType( myGroup ) ); GEOM::ListOfLong_var aCurrList = anOp->GetObjects( myGroup ); for ( int i = 0, n = aCurrList->length(); i < n; i++ ) - myGroupBox->ListView1->addItem( new QListWidgetItem( QString( "%1" ).arg( aCurrList[i] ) ) ); + myIdList->addItem( new QListWidgetItem( QString( "%1" ).arg( aCurrList[i] ) ) ); myEditCurrentArgument = 0; } + connect( mySelBtn2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); } - LightApp_SelectionMgr* aSelMgr = - ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(); - - connect( aSelMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), + this, SLOT( SelectionIntoArgument() ) ); connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); - connect( myGroupBox->CheckButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); - connect( myGroupBox->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); - connect( myGroupBox->PushButton3, SIGNAL( clicked() ), this, SLOT( add() ) ); - connect( myGroupBox->PushButton4, SIGNAL( clicked() ), this, SLOT( remove() ) ); - connect( myGroupBox->ListView1, SIGNAL( itemSelectionChanged() ), this, SLOT( selectionChanged() ) ); + connect( mySelectionWayGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( SetEditCurrentArgument() ) ); + connect( mySelAllBtn, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); + connect( myAddBtn, SIGNAL( clicked() ), this, SLOT( add() ) ); + connect( myRemBtn, SIGNAL( clicked() ), this, SLOT( remove() ) ); + connect( myIdList, SIGNAL( selectionChanged() ), this, SLOT( selectionChanged() ) ); + setInPlaceObj( GEOM::GEOM_Object::_nil() ); + + myBusy = true; // just activate but do not select in the list activateSelection(); - // activate subshapes selection if Main Shape is Selected - if ( !CORBA::is_nil( myMainObj ) ) { - myEditCurrentArgument = 0; - activateSelection(); - updateState(); - } + myBusy = false; } //================================================================================= // function : enterEvent() // purpose : //================================================================================= -void GroupGUI_GroupDlg::enterEvent( QEvent* ) +void GroupGUI_GroupDlg::enterEvent( QEvent* e ) { if ( !buttonCancel()->isEnabled() ) - this->ActivateThisDialog(); + ActivateThisDialog(); +} + +//======================================================================= +//function : closeEvent +//purpose : remove temporary geom object +//======================================================================= + +void GroupGUI_GroupDlg::closeEvent( QCloseEvent* e ) +{ + setInPlaceObj( GEOM::GEOM_Object::_nil() ); + + GEOMBase_Skeleton::closeEvent( e ); } //================================================================================= @@ -193,17 +257,16 @@ bool GroupGUI_GroupDlg::ClickOnApply() if ( !onAccept( myMode == CreateGroup, true ) ) return false; - if ( myMode == CreateGroup ) { - initName(); - myGroupBox->ListView1->clear(); - } - else { + if ( myMode == CreateGroup ) + { + initName(); + myIdList->clear(); + } + else activateSelection(); - } return true; } - //================================================================================= // function : ActivateThisDialog() // purpose : @@ -212,7 +275,7 @@ void GroupGUI_GroupDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); - connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), + connect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); activateSelection(); @@ -226,39 +289,139 @@ void GroupGUI_GroupDlg::LineEditReturnPressed() { QLineEdit* send = ( QLineEdit* )sender(); - if ( send == myGroupBox->LineEdit1 && !myEditCurrentArgument ) { - myEditCurrentArgument = myGroupBox->LineEdit1; + if ( send == myMainName && !myEditCurrentArgument ) { + myEditCurrentArgument = myMainName; activateSelection(); } - else { + else GEOMBase_Skeleton::LineEditReturnPressed(); - } updateState(); } - //================================================================================= // function : SetEditCurrentArgument() // purpose : //================================================================================= void GroupGUI_GroupDlg::SetEditCurrentArgument() { - const QObject* send = sender(); + QPushButton* send = (QPushButton*)sender(); - if ( send == myGroupBox->PushButton1 ) - myEditCurrentArgument = myGroupBox->LineEdit1; - else if ( send == myGroupBox->CheckButton1 || send == myGroupBox->PushButton2 ) + if ( send == mySelBtn ) { + myEditCurrentArgument = myMainName; + myShape2Name->setText( "" ); + } + else if ( /*(QRadioButton*)sender() == mySelSubBtn ||*/ send == mySelAllBtn ) myEditCurrentArgument = 0; + else if ( send == mySelBtn2 || sender() == mySelectionWayGroup ) { + setInPlaceObj( GEOM::GEOM_Object::_nil() ); + //if ( myPlaceCheckBox->isChecked() ) + myShape2Name->setText( "" ); + if ( subSelectionWay() != ALL_SUBSHAPES ) + { + myEditCurrentArgument = myShape2Name; + } + else { + //myEditCurrentArgument = myMainName; + myEditCurrentArgument = 0; + } + } activateSelection(); - if ( send == myGroupBox->PushButton2 ) + if ( send == mySelAllBtn ) { +// myShape2Name->setText( "" ); +// myPlaceCheckBox->setChecked( false ); +// mySelBtn2->setEnabled( false ); +// myShape2Name->setEnabled( false ); selectAllSubShapes(); + } else updateState(); } +//================================================================================= +// function : onGetInPlace() +// purpose : +//================================================================================= +void GroupGUI_GroupDlg::onGetInPlace() +{ + setInPlaceObj( GEOM::GEOM_Object::_nil() ); + myEditCurrentArgument->setText( "" ); + + bool isBlocked = myIdList->signalsBlocked(); + myIdList->blockSignals( true ); + myIdList->clearSelection(); + myIdList->blockSignals( isBlocked ); + + if (IObjectCount() != 1 ) + return; + + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject( firstIObject(), aResult ); + if ( aResult && !anObj->_is_nil() && GEOMBase::IsShape( anObj ) ) { + if ( !anObj->_is_equivalent(myMainObj) && !anObj->_is_equivalent( myGroup )) { + SUIT_OverrideCursor wc; + myEditCurrentArgument->setText( GEOMBase::GetName( anObj ) ); + GEOM::GEOM_IShapesOperations_var aShapesOp = + getGeomEngine()->GetIShapesOperations( getStudyId() ); + if ( subSelectionWay() == GET_IN_PLACE ) { + GEOM::GEOM_Object_var aGetInPlaceObj = aShapesOp->GetInPlace(myMainObj, anObj); + setInPlaceObj( aGetInPlaceObj ); + } + else { + setInPlaceObj( anObj ); + } + myEditCurrentArgument = 0; + //myBusy = true; // just activate but do not select in the list + activateSelection(); + //myBusy = false; + } + } +} + +//======================================================================= +//function : setInPlaceObj +//purpose : temporarily add an object to study and remove old InPlaceObj +//======================================================================= + +void GroupGUI_GroupDlg::setInPlaceObj( GEOM::GEOM_Object_var theObj ) +{ + if ( ! myInPlaceObj->_is_equivalent( theObj ) ) + { + const char* tmpName = "__InPlaceObj__"; + // remove old InPlaceObj + if ( !myInPlaceObj->_is_nil() ) { + if (_PTR(SObject) SO = getStudy()->studyDS()->FindObject( tmpName )) { + getStudy()->studyDS()->NewBuilder()->RemoveObjectWithChildren( SO ); + getGeomEngine()->RemoveObject(myInPlaceObj); + } + } + // publish InPlaceObj to enable localSelection(InPlaceObj) + if ( !theObj->_is_nil() && subSelectionWay() == GET_IN_PLACE ) { + SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy(getStudy()->studyDS()); + SALOMEDS::SObject_var aSO = + getGeomEngine()->AddInStudy(aStudyDS, theObj, tmpName, myMainObj); + } + myInPlaceObj = theObj; + } + // build map of indices + myMain2InPlaceIndices.Clear(); + if ( !myInPlaceObj->_is_nil() ) { + GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); + GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations( getStudyId() ); + + GEOM::ListOfGO_var aSubObjects = aShapesOp->MakeExplode( myInPlaceObj, getShapeType(), false); + for (int i = 0; i < aSubObjects->length(); i++) + { + CORBA::Long aMainIndex = aLocOp->GetSubShapeIndex( myMainObj, aSubObjects[i] ); + CORBA::Long aPlaceIndex = aLocOp->GetSubShapeIndex( myInPlaceObj, aSubObjects[i] ); + if ( aMainIndex >= 0 && aPlaceIndex > 0) + myMain2InPlaceIndices.Bind( aMainIndex, aPlaceIndex ); + } + } +} //================================================================================= // function : SelectionIntoArgument() @@ -266,35 +429,42 @@ void GroupGUI_GroupDlg::SetEditCurrentArgument() //================================================================================= void GroupGUI_GroupDlg::SelectionIntoArgument() { - if ( myEditCurrentArgument ) { // Selection of a main shape is active - myEditCurrentArgument->setText( "" ); - myGroupBox->ListView1->clear(); +// if (myPlaceCheckBox->isChecked() && myEditCurrentArgument == myShape2Name ) + if (subSelectionWay() != ALL_SUBSHAPES && myEditCurrentArgument == myShape2Name ) { + onGetInPlace(); + return; + } + if ( myEditCurrentArgument == myMainName) { // Selection of a main shape is active + myEditCurrentArgument->setText( "" ); + myIdList->clear(); + if ( IObjectCount() == 1 ) { Standard_Boolean aResult = Standard_False; GEOM::GEOM_Object_var anObj = - GEOMBase::ConvertIOinGEOMObject( firstIObject(), aResult ); + GEOMBase::ConvertIOinGEOMObject( firstIObject(), aResult ); if ( aResult && !anObj->_is_nil() && GEOMBase::IsShape( anObj ) ) { - myMainObj = anObj; - myEditCurrentArgument->setText( GEOMBase::GetName( anObj ) ); + myMainObj = anObj; + myEditCurrentArgument->setText( GEOMBase::GetName( anObj ) ); // activate subshapes selection by default myEditCurrentArgument = 0; activateSelection(); updateState(); - return; + return; } } myMainObj = GEOM::GEOM_Object::_nil(); } else { // an attempt to synchronize list box selection with 3d viewer - if ( myBusy ) + if ( myBusy ) { return; + } - bool isBlocked = myGroupBox->ListView1->signalsBlocked(); - myGroupBox->ListView1->blockSignals( true ); - myGroupBox->ListView1->clearSelection(); + bool isBlocked = myIdList->signalsBlocked(); + myIdList->blockSignals( true ); + myIdList->clearSelection(); TColStd_IndexedMapOfInteger aMapIndex; @@ -309,55 +479,84 @@ void GroupGUI_GroupDlg::SelectionIntoArgument() aMapIndex = LightApp_SelectionMgr::MapEntryOfMapOfInteger::Iterator( aMap ).Value(); } } + bool subselected = aMapIndex.Extent(); + + // convert inPlace indices to main indices + //if ( subselected && myPlaceCheckBox->isChecked() ) + if ( subselected && subSelectionWay() != ALL_SUBSHAPES ) + { + TColStd_IndexedMapOfInteger aMapIndex2; + + TColStd_DataMapIteratorOfDataMapOfIntegerInteger m2ip( myMain2InPlaceIndices ); + for ( ; m2ip.More(); m2ip.Next() ) { + int inPlaceId = m2ip.Value(); + if ( aMapIndex.Contains( inPlaceId )) { + aMapIndex2.Add( m2ip.Key() ); + } + } + aMapIndex = aMapIndex2; + } // try to find out and process the object browser selection - if ( !aMapIndex.Extent() ) { + if ( !subselected ) { globalSelection( GEOM_ALLSHAPES ); - + GEOM::ListOfGO anObjects; GEOMBase::ConvertListOfIOInListOfGO(selectedIO(), anObjects); GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations( getStudyId() ); GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); - for (int i = 0; i < anObjects.length(); i++) { - GEOM::GEOM_Object_var aGeomObj = anObjects[i]; - GEOM::ListOfGO_var aSubObjects = new GEOM::ListOfGO(); - TopoDS_Shape aShape; - if ( GEOMBase::GetShape( aGeomObj, aShape, getShapeType() ) ) { - aSubObjects->length(1); - aSubObjects[0] = aGeomObj; - } - else if (aGeomObj->GetType() == GEOM_GROUP) - aSubObjects = aShapesOp->MakeExplode( aGeomObj, getShapeType(), false); - else - continue; - - for (int i = 0; i < aSubObjects->length(); i++) { - TopoDS_Shape aShape; - if ( GEOMBase::GetShape( aSubObjects[i], aShape, getShapeType() ) ) { - CORBA::Long anIndex = aLocOp->GetSubShapeIndex( myMainObj, aSubObjects[i] ); - if ( anIndex >= 0 ) - aMapIndex.Add( anIndex ); - } - } + for (int i = 0; i < anObjects.length(); i++) + { + GEOM::GEOM_Object_var aGeomObj = anObjects[i]; + GEOM::ListOfGO_var aSubObjects = new GEOM::ListOfGO(); + TopoDS_Shape aShape; + if ( GEOMBase::GetShape(aGeomObj, aShape, getShapeType()) ) + { + aSubObjects->length(1); + aSubObjects[0] = aGeomObj; + } + else if (aGeomObj->GetType() == GEOM_GROUP) + aSubObjects = aShapesOp->MakeExplode( aGeomObj, getShapeType(), false); + else + continue; + + for (int i = 0; i < aSubObjects->length(); i++) + { + TopoDS_Shape aShape; + if ( GEOMBase::GetShape(aSubObjects[i], aShape, getShapeType()) ) + { + CORBA::Long anIndex; + anIndex = aLocOp->GetSubShapeIndex( myMainObj, aSubObjects[i] ); + if ( anIndex >= 0 ) { + //if ( myPlaceCheckBox->isChecked() && ! myMain2InPlaceIndices.IsBound( anIndex )) + if ( subSelectionWay() != ALL_SUBSHAPES && + ! myMain2InPlaceIndices.IsBound( anIndex )) + continue; + aMapIndex.Add( anIndex ); + } + } + } } - - if ( !myMainObj->_is_nil() ) - localSelection( myMainObj, getShapeType() ); + if ( !myMainObj->_is_nil() /*&& mySelSubBtn->isChecked()*/) + if ( subSelectionWay() == ALL_SUBSHAPES ) + localSelection( myMainObj, getShapeType() ); + else if ( !myInPlaceObj->_is_nil() ) + localSelection( myInPlaceObj, getShapeType() ); } - if ( aMapIndex.Extent() >= 1 ) { + if (aMapIndex.Extent() >= 1) { QMap aMap; - for ( int i = 0, n = myGroupBox->ListView1->count(); i < n; i++ ) - aMap.insert( myGroupBox->ListView1->item( i )->text().toInt(), i ); + for ( int i = 0, n = myIdList->count(); i < n; i++ ) + aMap.insert( myIdList->item( i )->text().toInt(), i ); for ( int ii = 1, nn = aMapIndex.Extent(); ii <= nn; ii++ ) { if ( aMap.contains( aMapIndex( ii ) ) ) - myGroupBox->ListView1->item( aMap[aMapIndex( ii )])->setSelected( true ); + myIdList->item( aMap[aMapIndex( ii )])->setSelected( true ); } } - myGroupBox->ListView1->blockSignals( isBlocked ); + myIdList->blockSignals( isBlocked ); } updateState(); @@ -367,11 +566,12 @@ void GroupGUI_GroupDlg::SelectionIntoArgument() // function : ConstructorsClicked() // purpose : Radio button management //================================================================================= -void GroupGUI_GroupDlg::ConstructorsClicked( int ) +void GroupGUI_GroupDlg::ConstructorsClicked( int constructorId ) { - myGroupBox->ListView1->clear(); + myIdList->clear(); activateSelection(); updateState(); + setInPlaceObj( myInPlaceObj ); // to rebuild myMain2InPlaceIndices } //================================================================================= @@ -383,29 +583,48 @@ void GroupGUI_GroupDlg::selectAllSubShapes() if ( CORBA::is_nil( myMainObj ) ) return; - GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); - - GEOM::ListOfLong_var aSubShapes = aShOp->SubShapeAllIDs( myMainObj, getShapeType(), false ); - if ( !aShOp->IsDone() ) - return; + GEOM::ListOfLong_var aSubShapes; +// if ( !myPlaceCheckBox->isChecked() ) + if ( subSelectionWay() == ALL_SUBSHAPES ) + { + myIdList->clear(); + GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); + aSubShapes = aShOp->SubShapeAllIDs(myMainObj, getShapeType(), false); - bool isBlocked = myGroupBox->ListView1->signalsBlocked(); - myGroupBox->ListView1->blockSignals( true ); - myGroupBox->ListView1->clear(); + if ( !aShOp->IsDone() ) + return; + } + else + { + aSubShapes = new GEOM::ListOfLong(); + aSubShapes->length( myMain2InPlaceIndices.Extent() ); + TColStd_DataMapIteratorOfDataMapOfIntegerInteger m2ip( myMain2InPlaceIndices ); + for ( int i = 0; m2ip.More(); i++, m2ip.Next() ) + aSubShapes[ i ] = m2ip.Key(); + } + bool isBlocked = myIdList->signalsBlocked(); + myIdList->blockSignals( true ); for ( int i = 0, n = aSubShapes->length(); i < n; i++ ) { CORBA::Long anIndex = aSubShapes[i]; if ( anIndex < 0 ) continue; - QListWidgetItem* anItem = new QListWidgetItem( QString( "%1" ).arg( anIndex ) ); - myGroupBox->ListView1->addItem( anItem ); + QListWidgetItem* anItem = 0; + QString text = QString( "%1" ).arg( anIndex ); + if ( !myInPlaceObj->_is_nil() ) { + QList found = myIdList->findItems( text, Qt::MatchExactly ); + if ( found.count() ) anItem = found[0]; + } + if ( !anItem ) { + anItem = new QListWidgetItem( text ); + myIdList->addItem( anItem ); + } anItem->setSelected( true ); } - myGroupBox->ListView1->blockSignals( isBlocked ); + myIdList->blockSignals( isBlocked ); highlightSubShapes(); - //updateState(); // already done in highlightSubShapes() } //================================================================================= @@ -415,8 +634,8 @@ void GroupGUI_GroupDlg::selectAllSubShapes() void GroupGUI_GroupDlg::add() { TColStd_MapOfInteger aMap; - for ( int i = 0, n = myGroupBox->ListView1->count(); i < n; i++ ) - aMap.Add( myGroupBox->ListView1->item( i )->text().toInt() ); + for ( int i = 0, n = myIdList->count(); i < n; i++ ) + aMap.Add( myIdList->item( i )->text().toInt() ); TColStd_IndexedMapOfInteger aMapIndex; @@ -428,57 +647,74 @@ void GroupGUI_GroupDlg::add() LightApp_SelectionMgr::MapEntryOfMapOfInteger aMap; aSelMgr->selectedSubOwners( aMap ); if ( aMap.Size() == 1 ) - aMapIndex = LightApp_SelectionMgr::MapEntryOfMapOfInteger::Iterator( aMap ).Value(); + aMapIndex = LightApp_SelectionMgr::MapEntryOfMapOfInteger::Iterator( aMap ).Value(); } } + GEOM::ListOfGO anObjects; + // get selected sub-shapes of myInPlaceObj + if ( aMapIndex.Extent() > 0 && !myInPlaceObj->_is_nil() ) + { + GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); + + anObjects.length( aMapIndex.Extent() ); + for ( int i = 1; i <= aMapIndex.Extent(); i++ ) + anObjects[ i-1 ] = aShapesOp->GetSubShape( myInPlaceObj, aMapIndex( i )); + + aMapIndex.Clear(); + } + + // try to find out and process the object browser selection or InPlace sub-shapes + if ( !aMapIndex.Extent() ) + { + if ( anObjects.length() == 0 ) + GEOMBase::ConvertListOfIOInListOfGO(aSelIOs, anObjects); - // try to find out and process the object browser selection - if ( !aMapIndex.Extent() ) { - GEOM::ListOfGO anObjects; - GEOMBase::ConvertListOfIOInListOfGO(selectedIO(), anObjects); - GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations( getStudyId() ); GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); - - for ( int i = 0; i < anObjects.length(); i++ ) { + for (int i = 0; i < anObjects.length(); i++) + { GEOM::GEOM_Object_var aGeomObj = anObjects[i]; GEOM::ListOfGO_var aSubObjects = new GEOM::ListOfGO(); TopoDS_Shape aShape; - if ( GEOMBase::GetShape( aGeomObj, aShape, getShapeType() ) ) { - aSubObjects->length( 1 ); - aSubObjects[0] = aGeomObj; + if ( GEOMBase::GetShape(aGeomObj, aShape, getShapeType()) ) + { + aSubObjects->length(1); + aSubObjects[0] = aGeomObj; } - else if ( aGeomObj->GetType() == GEOM_GROUP ) - aSubObjects = aShapesOp->MakeExplode( aGeomObj, getShapeType(), false ); + else if (aGeomObj->GetType() == GEOM_GROUP) + aSubObjects = aShapesOp->MakeExplode( aGeomObj, getShapeType(), false); else - break; - - for ( int i = 0; i < aSubObjects->length(); i++ ) { - TopoDS_Shape aShape; - if ( GEOMBase::GetShape( aSubObjects[i], aShape, getShapeType() ) ) { - CORBA::Long anIndex = aLocOp->GetSubShapeIndex( myMainObj, aSubObjects[i] ); - if ( anIndex >= 0 ) - aMapIndex.Add( anIndex ); - } + break; + + for (int i = 0; i < aSubObjects->length(); i++) + { + TopoDS_Shape aShape; + if ( GEOMBase::GetShape(aSubObjects[i], aShape, getShapeType()) ) + { + CORBA::Long anIndex; + anIndex = aLocOp->GetSubShapeIndex( myMainObj, aSubObjects[i] ); + if ( anIndex >= 0 ) + aMapIndex.Add( anIndex ); + } } } } if ( aMapIndex.Extent() >= 1 ) { - bool isBlocked = myGroupBox->ListView1->signalsBlocked(); - myGroupBox->ListView1->blockSignals( true ); + bool isBlocked = myIdList->signalsBlocked(); + myIdList->blockSignals( true ); for ( int i = 1, n = aMapIndex.Extent(); i <= n; i++ ) { if ( aMap.Contains( aMapIndex( i ) ) ) continue; QListWidgetItem* anItem = new QListWidgetItem( QString( "%1" ).arg( aMapIndex( i ) ) ); - myGroupBox->ListView1->addItem( anItem ); + myIdList->addItem( anItem ); anItem->setSelected( true ); } - myGroupBox->ListView1->blockSignals( isBlocked ); + myIdList->blockSignals( isBlocked ); } updateState(); @@ -490,18 +726,27 @@ void GroupGUI_GroupDlg::add() //================================================================================= void GroupGUI_GroupDlg::remove() { - bool isBlocked = myGroupBox->ListView1->signalsBlocked(); - myGroupBox->ListView1->blockSignals( true ); + bool isBlocked = myIdList->signalsBlocked(); + myIdList->blockSignals( true ); - QListIterator it( myGroupBox->ListView1->selectedItems() ); + QListIterator it( myIdList->selectedItems() ); while ( it.hasNext() ) delete it.next(); - myGroupBox->ListView1->blockSignals( isBlocked ); + myIdList->blockSignals( isBlocked ); highlightSubShapes(); } +//======================================================================= +//function : subSelectionWay +//purpose : +//======================================================================= + +int GroupGUI_GroupDlg::subSelectionWay() const +{ + return mySelectionWayGroup->checkedId(); +} //================================================================================= // function : getShapeType() @@ -543,8 +788,13 @@ void GroupGUI_GroupDlg::activateSelection() { globalSelection( GEOM_ALLSHAPES ); - if ( !myMainObj->_is_nil() && !myEditCurrentArgument ) { - localSelection( myMainObj, getShapeType() ); + // local selection + if ( !myMainObj->_is_nil() && !myEditCurrentArgument/* && mySelSubBtn->isChecked()*/) { +// if ( !myPlaceCheckBox->isChecked() ) + if ( subSelectionWay() == ALL_SUBSHAPES ) + localSelection( myMainObj, getShapeType() ); + else if ( !myInPlaceObj->_is_nil() ) + localSelection( myInPlaceObj, getShapeType() ); } SelectionIntoArgument(); @@ -568,7 +818,7 @@ void GroupGUI_GroupDlg::updateState() LightApp_SelectionMgr::MapEntryOfMapOfInteger aMap; aSelMgr->selectedSubOwners( aMap ); if ( aMap.Size() == 1 ) - aMapIndex = LightApp_SelectionMgr::MapEntryOfMapOfInteger::Iterator( aMap ).Value(); + aMapIndex = LightApp_SelectionMgr::MapEntryOfMapOfInteger::Iterator( aMap ).Value(); } } @@ -576,42 +826,45 @@ void GroupGUI_GroupDlg::updateState() if ( !aMapIndex.Extent() && !CORBA::is_nil( myMainObj ) ) { GEOM::ListOfGO anObjects; //GEOMBase::ConvertListOfIOInListOfGO(selectedIO(), anObjects); - GEOMBase::ConvertListOfIOInListOfGO( aSelIOs, anObjects ); + GEOMBase::ConvertListOfIOInListOfGO(aSelIOs, anObjects); GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations( getStudyId() ); GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); isAdd = true; - for ( int i = 0; i < anObjects.length(); i++ ) { + for (int i = 0; i < anObjects.length(); i++) + { GEOM::GEOM_Object_var aGeomObj = anObjects[i]; GEOM::ListOfGO_var aSubObjects = new GEOM::ListOfGO(); TopoDS_Shape aShape; - if ( GEOMBase::GetShape( aGeomObj, aShape, getShapeType() ) ) { + if ( GEOMBase::GetShape(aGeomObj, aShape, getShapeType()) ) { aSubObjects->length(1); aSubObjects[0] = aGeomObj; } - else if ( aGeomObj->GetType() == GEOM_GROUP ) { - aSubObjects = aShapesOp->MakeExplode( aGeomObj, getShapeType(), false ); + else if (aGeomObj->GetType() == GEOM_GROUP) { + aSubObjects = aShapesOp->MakeExplode( aGeomObj, getShapeType(), false); } else { aMapIndex.Clear(); break; } - for ( int i = 0; i < aSubObjects->length(); i++ ) { + for (int i = 0; i < aSubObjects->length(); i++) + { TopoDS_Shape aShape; aSubObjects[i]; - if ( GEOMBase::GetShape( aSubObjects[i], aShape, getShapeType() ) ) { - CORBA::Long anIndex = aLocOp->GetSubShapeIndex( myMainObj, aSubObjects[i] ); + if ( GEOMBase::GetShape(aSubObjects[i], aShape, getShapeType()) ) + { + CORBA::Long anIndex; + anIndex = aLocOp->GetSubShapeIndex( myMainObj, aSubObjects[i] ); if ( anIndex >= 0 ) aMapIndex.Add( anIndex ); else isAdd = false; } - else { + else isAdd = false; - } if ( !isAdd ) { aMapIndex.Clear(); @@ -624,14 +877,23 @@ void GroupGUI_GroupDlg::updateState() } } } - + isAdd = aMapIndex.Extent() > 0; - myGroupBox->PushButton3->setEnabled( !myEditCurrentArgument && !CORBA::is_nil( myMainObj ) && isAdd ); - bool hasSel = myGroupBox->ListView1->selectedItems().count() > 0; - myGroupBox->PushButton4->setEnabled( hasSel ); - myGroupBox->CheckButton1->setEnabled( !CORBA::is_nil( myMainObj ) ); - myGroupBox->PushButton2->setEnabled( !CORBA::is_nil( myMainObj ) ); + myAddBtn->setEnabled( !myEditCurrentArgument && !CORBA::is_nil( myMainObj ) && isAdd ); + bool hasSel = myIdList->selectedItems().count() > 0; + myRemBtn->setEnabled( hasSel ); + //mySelSubBtn->setEnabled( !CORBA::is_nil( myMainObj ) ); + //myPlaceCheckBox->setEnabled( !CORBA::is_nil( myMainObj ) ); + mySelectionWayGroupBox->setEnabled( !CORBA::is_nil( myMainObj ) ); + mySelAllBtn->setEnabled( !CORBA::is_nil( myMainObj ) ); +// mySelBtn2->setEnabled( myPlaceCheckBox->isChecked() ); +// myShape2Name->setEnabled( myPlaceCheckBox->isChecked() ); + mySelBtn2->setEnabled( subSelectionWay() != ALL_SUBSHAPES ); + myShape2Name->setEnabled( subSelectionWay() != ALL_SUBSHAPES ); +// if ( !myPlaceCheckBox->isChecked() ) + if ( subSelectionWay() == ALL_SUBSHAPES ) + setInPlaceObj( GEOM::GEOM_Object::_nil() ); } //================================================================================= @@ -653,9 +915,14 @@ void GroupGUI_GroupDlg::highlightSubShapes() return; Standard_Boolean isOk; - char* objIOR = GEOMBase::GetIORFromObject( myMainObj ); - Handle(GEOM_AISShape) aSh = - GEOMBase::ConvertIORinGEOMAISShape( objIOR, isOk, true ); + char* objIOR; + + if ( myInPlaceObj->_is_nil() ) + objIOR = GEOMBase::GetIORFromObject( myMainObj ); + else + objIOR = GEOMBase::GetIORFromObject( myInPlaceObj ); + + Handle(GEOM_AISShape) aSh = GEOMBase::ConvertIORinGEOMAISShape( objIOR, isOk, true ); free( objIOR ); if ( !isOk || aSh.IsNull() ) return; @@ -664,26 +931,37 @@ void GroupGUI_GroupDlg::highlightSubShapes() myBusy = true; - int ii = 0, nn = myGroupBox->ListView1->count(); + int ii = 0, nn = myIdList->count(); for ( ; ii < nn; ii++ ) - if ( myGroupBox->ListView1->item( ii )->isSelected() ) - anIds.Add( myGroupBox->ListView1->item( ii )->text().toInt() ); - + { + if ( myIdList->item( ii )->isSelected() ) { + int id = myIdList->item( ii )->text().toInt(); + // if ( myPlaceCheckBox->isChecked() ) + if ( subSelectionWay() != ALL_SUBSHAPES ) + { + if ( myMain2InPlaceIndices.IsBound( id ) ) + id = myMain2InPlaceIndices( id ); + else { + myIdList->item( ii )->setSelected( false ); + continue; + } + } + anIds.Add( id ); + } + } SalomeApp_Application* app = myGeomGUI->getApp(); LightApp_SelectionMgr* aSelMgr = app->selectionMgr(); aSelMgr->clearSelected(); - //if (nn < 3000) aSelMgr->AddOrRemoveIndex(aSh->getIO(), anIds, false); - aSelMgr->AddOrRemoveIndex( aSh->getIO(), anIds, false ); + + aSelMgr->AddOrRemoveIndex(aSh->getIO(), anIds, false); myBusy = false; - //updateState(); - if ( nn < 3000 ) { + if (nn < 3000) updateState(); - } else { - myGroupBox->PushButton3->setEnabled( true ); - myGroupBox->PushButton4->setEnabled( true ); + myAddBtn->setEnabled( true ); + myRemBtn->setEnabled( true ); } } @@ -719,10 +997,10 @@ bool GroupGUI_GroupDlg::isValid( QString& theMessage ) RETURN_WITH_MSG( !CORBA::is_nil( myMainObj ), tr( "NO_GROUP" ) ) } - QString aName( getNewObjectName() ); + QString aName (getNewObjectName()); RETURN_WITH_MSG ( !aName.trimmed().isEmpty(), tr( "EMPTY_NAME" ) ) - RETURN_WITH_MSG ( myGroupBox->ListView1->count(), tr( "EMPTY_LIST" ) ) + RETURN_WITH_MSG ( myIdList->count(), tr( "EMPTY_LIST" ) ) return true; } @@ -732,36 +1010,40 @@ bool GroupGUI_GroupDlg::isValid( QString& theMessage ) //================================================================================= bool GroupGUI_GroupDlg::execute( ObjectList& objects ) { - GEOM::GEOM_IGroupOperations_var anOp = GEOM::GEOM_IGroupOperations::_narrow( getOperation() ); + setInPlaceObj( GEOM::GEOM_Object::_nil() ); + + GEOM::GEOM_IGroupOperations_var anOp = GEOM::GEOM_IGroupOperations::_narrow(getOperation()); GEOM::GEOM_Object_var aGroup; - if ( myMode == CreateGroup ) - aGroup = anOp->CreateGroup( myMainObj, getShapeType() ); - else if ( myMode == EditGroup ) + if (myMode == CreateGroup) + aGroup = anOp->CreateGroup(myMainObj, getShapeType()); + else if (myMode == EditGroup) aGroup = myGroup; - if ( CORBA::is_nil( aGroup ) || ( myMode == CreateGroup && !anOp->IsDone() ) ) + if (CORBA::is_nil(aGroup) || (myMode == CreateGroup && !anOp->IsDone())) return false; - GEOM::ListOfLong_var aCurrList = anOp->GetObjects( aGroup ); - if ( !anOp->IsDone() ) + GEOM::ListOfLong_var aCurrList = anOp->GetObjects(aGroup); + if (!anOp->IsDone()) return false; - if ( aCurrList->length() > 0 ) { - anOp->DifferenceIDs( aGroup, aCurrList ); - if ( !anOp->IsDone() ) + if (aCurrList->length() > 0) + { + anOp->DifferenceIDs(aGroup, aCurrList); + if (!anOp->IsDone()) return false; } - int ii, nn = myGroupBox->ListView1->count(); - if ( nn > 0 ) { + int ii, nn = myIdList->count(); + if (nn > 0) + { GEOM::ListOfLong_var aNewList = new GEOM::ListOfLong; - aNewList->length( nn ); - for ( ii = 0; ii < nn; ii++ ) { - aNewList[ii] = myGroupBox->ListView1->item( ii )->text().toInt(); + aNewList->length(nn); + for (ii = 0; ii < nn; ii++) { + aNewList[ii] = myIdList->item(ii)->text().toInt(); } - anOp->UnionIDs( aGroup, aNewList ); - if ( !anOp->IsDone() ) + anOp->UnionIDs(aGroup, aNewList); + if (!anOp->IsDone()) return false; } diff --git a/src/GroupGUI/GroupGUI_GroupDlg.h b/src/GroupGUI/GroupGUI_GroupDlg.h index 167bf9c1e..0624ed6f1 100644 --- a/src/GroupGUI/GroupGUI_GroupDlg.h +++ b/src/GroupGUI/GroupGUI_GroupDlg.h @@ -2,21 +2,21 @@ // // Copyright (C) 2004 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// // 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. -// +// // 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 // // File : GroupGUI_GroupDlg.h @@ -29,8 +29,12 @@ #include #include +#include -class DlgRef_1Sel1List1Check3Btn; +class QGroupBox; +class QLineEdit; +class QListWidget; +class QButtonGroup; //================================================================================= // class : GroupGUI_GroupDlg @@ -39,14 +43,14 @@ class DlgRef_1Sel1List1Check3Btn; class GroupGUI_GroupDlg : public GEOMBase_Skeleton { Q_OBJECT - + public: typedef enum { CreateGroup, EditGroup } Mode; - GroupGUI_GroupDlg( Mode, GeometryGUI*, QWidget* = 0 ); + GroupGUI_GroupDlg( Mode mode, GeometryGUI*, QWidget* parent = 0 ); ~GroupGUI_GroupDlg(); protected: @@ -55,6 +59,8 @@ protected: virtual bool isValid( QString& ); virtual bool execute( ObjectList& ); virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr ); + + void closeEvent( QCloseEvent* ); private slots: void ClickOnOk(); @@ -73,19 +79,33 @@ private slots: private: void Init(); void enterEvent( QEvent* ); + int subSelectionWay() const; TopAbs_ShapeEnum getShapeType() const; void setShapeType( const TopAbs_ShapeEnum ); void activateSelection(); void updateState(); void highlightSubShapes(); + void onGetInPlace(); + void setInPlaceObj( GEOM::GEOM_Object_var ); private: Mode myMode; bool myBusy; GEOM::GEOM_Object_var myMainObj; GEOM::GEOM_Object_var myGroup; - - DlgRef_1Sel1List1Check3Btn* myGroupBox; + GEOM::GEOM_Object_var myInPlaceObj; + TColStd_DataMapOfIntegerInteger myMain2InPlaceIndices; + + QPushButton* mySelBtn; + QLineEdit* myMainName; + QPushButton* mySelBtn2; + QLineEdit* myShape2Name; + QGroupBox* mySelectionWayGroupBox; + QButtonGroup* mySelectionWayGroup; + QPushButton* mySelAllBtn; + QPushButton* myAddBtn; + QPushButton* myRemBtn; + QListWidget* myIdList; }; -#endif // GROUPGUI_GROUPDLG_H +#endif diff --git a/src/MeasureGUI/MeasureGUI_AngleDlg.cxx b/src/MeasureGUI/MeasureGUI_AngleDlg.cxx index 10a926f75..24c3baaeb 100644 --- a/src/MeasureGUI/MeasureGUI_AngleDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_AngleDlg.cxx @@ -52,6 +52,7 @@ #include #include #include +#include // QT Includes #include @@ -306,6 +307,31 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs() Handle(AIS_AngleDimension) anIO = new AIS_AngleDimension ( anEdge1, anEdge2, aPlane, anAngle * PI180, TCollection_ExtendedString( (Standard_CString)aLabel.toLatin1().data() ) ); + Handle(Geom_Line) geom_lin1,geom_lin2; + gp_Pnt ptat11,ptat12,ptat21,ptat22; + Standard_Boolean isInfinite1,isInfinite2; + Handle(Geom_Curve) extCurv; + Standard_Integer extShape; + if ( AIS::ComputeGeometry(anEdge1, + anEdge2, + extShape, + geom_lin1, + geom_lin2, + ptat11, + ptat12, + ptat21, + ptat22, + extCurv, + isInfinite1, + isInfinite2, + aPlane)) { + Standard_Real arrSize1 = anIO->ArrowSize(); + Standard_Real arrSize2 = anIO->ArrowSize(); + if (!isInfinite1) arrSize1 = ptat11.Distance(ptat12)/10.; + if (!isInfinite2) arrSize2 = ptat21.Distance(ptat22)/10.; + Standard_Real arrowSize = Max(arrSize1,arrSize2); + anIO->SetArrowSize(arrowSize); + } SOCC_Prs* aPrs = dynamic_cast( ( (SOCC_Viewer*)( vw->getViewManager()->getViewModel() ) )->CreatePrs( 0 ) ); diff --git a/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx b/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx index fc4afa2d6..2e9fea39a 100644 --- a/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx @@ -294,6 +294,7 @@ SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs() Handle( AIS_LengthDimension ) anIO = new AIS_LengthDimension( aVert1, aVert2, P, aDist, TCollection_ExtendedString( (Standard_CString)aLabel.toLatin1().constData() ) ); + anIO->SetArrowSize( aDist/20 ); SOCC_Prs* aPrs = dynamic_cast( ((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs( 0 ) ); diff --git a/src/MeasureGUI/MeasureGUI_NormaleDlg.cxx b/src/MeasureGUI/MeasureGUI_NormaleDlg.cxx index ef2f93bcb..ad227c4b3 100644 --- a/src/MeasureGUI/MeasureGUI_NormaleDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_NormaleDlg.cxx @@ -34,7 +34,13 @@ #include #include -#include "GEOMImpl_Types.hxx" +#include + +#include +#include +#include +#include +#include //================================================================================= // class : MeasureGUI_NormaleDlg() @@ -172,14 +178,58 @@ void MeasureGUI_NormaleDlg::SelectionIntoArgument() if ( !testResult ) return; + QString aName = GEOMBase::GetName( aSelectedObject ); + if ( myEditCurrentArgument == GroupArgs->LineEdit1 ) { + TopoDS_Shape aShape; + if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) + { + LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr(); + TColStd_IndexedMapOfInteger aMap; + aSelMgr->GetIndexes( firstIObject(), aMap ); + if ( aMap.Extent() == 1 ) // Local Selection + { + GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); + int anIndex = aMap( 1 ); + aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); + aName += QString( ":face_%1" ).arg( anIndex ); + } + else // Global Selection + { + if ( aShape.ShapeType() != TopAbs_FACE ) { + aSelectedObject = GEOM::GEOM_Object::_nil(); + aName = ""; + } + } + } myFace = aSelectedObject; } else if ( myEditCurrentArgument == GroupArgs->LineEdit2 ) { + TopoDS_Shape aShape; + if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) + { + LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr(); + TColStd_IndexedMapOfInteger aMap; + aSelMgr->GetIndexes( firstIObject(), aMap ); + if ( aMap.Extent() == 1 ) // Local Selection + { + GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); + int anIndex = aMap( 1 ); + aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); + aName += QString( ":vertex_%1" ).arg( anIndex ); + } + else // Global Selection + { + if ( aShape.ShapeType() != TopAbs_VERTEX ) { + aSelectedObject = GEOM::GEOM_Object::_nil(); + aName = ""; + } + } + } myPoint = aSelectedObject; } - myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + myEditCurrentArgument->setText( aName ); displayPreview(); } @@ -205,14 +255,15 @@ void MeasureGUI_NormaleDlg::LineEditReturnPressed() void MeasureGUI_NormaleDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); + globalSelection( GEOM_FACE ); if ( send == GroupArgs->PushButton1 ) { myEditCurrentArgument = GroupArgs->LineEdit1; - globalSelection( GEOM_FACE ); + localSelection( GEOM::GEOM_Object::_nil(), TopAbs_FACE ); } else if ( send == GroupArgs->PushButton2 ) { myEditCurrentArgument = GroupArgs->LineEdit2; - globalSelection( GEOM_POINT ); + localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); } myEditCurrentArgument->setFocus(); diff --git a/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx b/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx index e5fd4819f..830d54a33 100644 --- a/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx @@ -26,14 +26,69 @@ #include "MeasureGUI_WhatisDlg.h" #include "MeasureGUI_Widgets.h" +#include #include #include #include +#include #include +#include #include +class MeasureGUI_WhatisDlg::Whatis : public QGroupBox +{ +public: + Whatis( QWidget* parent ); + ~Whatis(); + + QLabel* TextLabel1; + QPushButton* PushButton1; + QLineEdit* LineEdit1; + + QTextEdit* TextEdit1; + + QLabel* TextLabel2; + QLineEdit* LineEdit2; + QPushButton* PushButton2; +}; + +//================================================================================= +// Constructs a MeasureGUI_Whatis_QTD which is a child of 'parent', with the +// name 'name' and widget flags set to 'f' +//================================================================================= +MeasureGUI_WhatisDlg::Whatis::Whatis( QWidget* parent ) + : QGroupBox( parent ) +{ + QGridLayout* topLayout = new QGridLayout( this ); + topLayout->setMargin( 11 ); + topLayout->setSpacing( 6 ); + + TextLabel1 = new QLabel( this ); + PushButton1 = new QPushButton( this ); + LineEdit1 = new QLineEdit( this ); + TextEdit1 = new QTextEdit( this ); + TextLabel2 = new QLabel( this ); + LineEdit2 = new QLineEdit( this); + PushButton2 = new QPushButton( this ); + + topLayout->addWidget( TextLabel1, 0, 0 ); + topLayout->addWidget( PushButton1, 0, 1 ); + topLayout->addWidget( LineEdit1, 0, 2, 1, 2 ); + topLayout->addWidget( TextEdit1, 1, 0, 1, 4 ); + topLayout->addWidget( TextLabel2 , 2, 0 ); + topLayout->addWidget( LineEdit2 , 2, 1, 1, 2 ); + topLayout->addWidget( PushButton2, 2, 3 ); +} + +//================================================================================= +// Destroys the object and frees any allocated resources +//================================================================================= +MeasureGUI_WhatisDlg::Whatis::~Whatis() +{ +} + //================================================================================= // class : MeasureGUI_WhatisDlg( ) // purpose : Constructs a MeasureGUI_WhatisDlg which is a child of 'parent', with the @@ -44,10 +99,9 @@ MeasureGUI_WhatisDlg::MeasureGUI_WhatisDlg( GeometryGUI* GUI, QWidget* parent ) : MeasureGUI_Skeleton( GUI, parent ) { - QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( - "GEOM", tr( "ICON_DLG_WHATIS" ) ) ); - QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( - "GEOM", tr( "ICON_SELECT" ) ) ); + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + QPixmap image0( resMgr->loadPixmap( "GEOM", tr( "ICON_DLG_WHATIS" ) ) ); + QPixmap image1( resMgr->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); setWindowTitle( tr( "GEOM_WHATIS_TITLE" ) ); @@ -56,21 +110,29 @@ MeasureGUI_WhatisDlg::MeasureGUI_WhatisDlg( GeometryGUI* GUI, QWidget* parent ) mainFrame()->GroupConstructors->setTitle( tr( "GEOM_WHATIS" ) ); mainFrame()->RadioButton1->setIcon( image0 ); - myGrp = new MeasureGUI_1Sel1TextView( centralWidget() ); - myGrp->GroupBox1->setTitle( tr( "GEOM_WHATIS_OBJECT" ) ); + myGrp = new Whatis( this ); + + myGrp->setTitle( tr( "GEOM_WHATIS_OBJECT" ) ); + myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); - myGrp->TextView1->setReadOnly( true ); + myGrp->PushButton1->setIcon( image1 ); + myGrp->PushButton1->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); + myGrp->LineEdit1->setReadOnly( true ); + myGrp->TextEdit1->setReadOnly( true ); // fix height to fit all text - myGrp->TextView1->setLineWrapMode( QTextEdit::NoWrap ); - // myGrp->TextView1->setTextFormat( Qt::PlainText ); // VSR : TODO + myGrp->TextEdit1->setLineWrapMode( QTextEdit::NoWrap ); + // myGrp->TextEdit1->setTextFormat( Qt::PlainText ); // VSR : TODO QString allLines ("\n\n\n\n\n\n\n\n\n"); // 10 lines - myGrp->TextView1->setText( allLines ); - int sbHeight = myGrp->TextView1->horizontalScrollBar()->height(); - myGrp->TextView1->setFixedHeight( myGrp->TextView1->document()->size().height() + sbHeight ); + myGrp->TextEdit1->setText( allLines ); + int sbHeight = myGrp->TextEdit1->horizontalScrollBar()->height(); + myGrp->TextEdit1->setFixedHeight( myGrp->TextEdit1->document()->size().height() + sbHeight ); - myGrp->PushButton1->setIcon( image1 ); - myGrp->LineEdit1->setReadOnly( true ); + myGrp->TextLabel2->setText( tr( "GEOM_KIND_OF_SHAPE" ) ); + myGrp->LineEdit2->setReadOnly( true ); + myGrp->LineEdit2->setMinimumWidth( 150 ); + myGrp->PushButton2->setText( tr( "GEOM_PROPERTIES" ) ); + myGrp->PushButton2->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); layout->setMargin( 0 ); layout->setSpacing( 6 ); @@ -84,7 +146,6 @@ MeasureGUI_WhatisDlg::MeasureGUI_WhatisDlg( GeometryGUI* GUI, QWidget* parent ) Init(); } - //================================================================================= // function : ~MeasureGUI_WhatisDlg() // purpose : Destroys the object and frees any allocated resources @@ -93,7 +154,6 @@ MeasureGUI_WhatisDlg::~MeasureGUI_WhatisDlg() { } - //================================================================================= // function : Init() // purpose : @@ -102,6 +162,9 @@ void MeasureGUI_WhatisDlg::Init() { mySelBtn = myGrp->PushButton1; mySelEdit = myGrp->LineEdit1; + + connect( myGrp->PushButton2, SIGNAL( clicked() ), this, SLOT( ClickOnProperties() ) ); + MeasureGUI_Skeleton::Init(); } @@ -112,9 +175,27 @@ void MeasureGUI_WhatisDlg::Init() void MeasureGUI_WhatisDlg::processObject() { QString aText; - myGrp->TextView1->setText( getParameters( aText ) ? aText : QString( "" ) ); + myGrp->TextEdit1->setText( getParameters( aText ) ? aText : QString( "" ) ); + + QString aParameters; + QString aKind = getKindOfShape( aParameters ); + myGrp->LineEdit2->setText( aKind ); + myGrp->PushButton2->setEnabled( !aParameters.isEmpty()); } +//================================================================================= +// function : ClickOnProperties() +// purpose : +//================================================================================= +void MeasureGUI_WhatisDlg::ClickOnProperties() +{ + QString aParameters; + QString aKind = getKindOfShape( aParameters ); + + SUIT_MessageBox::information( this, + aKind + " " + tr( "GEOM_PROPERTIES" ), + aParameters ); +} //================================================================================= // function : getParameters @@ -124,15 +205,388 @@ bool MeasureGUI_WhatisDlg::getParameters( QString& theText ) { if ( myObj->_is_nil() ) return false; - else { - try { - theText = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->WhatIs( myObj ); - } - catch( const SALOME::SALOME_Exception& e ) { - SalomeApp_Tools::QtCatchCorbaException( e ); - return false; - } - - return getOperation()->IsDone(); + + try + { + theText = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->WhatIs( myObj ); + } + catch( const SALOME::SALOME_Exception& e ) + { + SalomeApp_Tools::QtCatchCorbaException( e ); + return false; } + + return getOperation()->IsDone(); +} + +//================================================================================= +// function : getKindOfShape +// purpose : +//================================================================================= +QString MeasureGUI_WhatisDlg::getKindOfShape( QString& theParameters ) +{ + QString aKindStr(""); + theParameters = ""; + + if ( myObj->_is_nil() ) + return aKindStr; + + GEOM::GEOM_IKindOfShape::shape_kind aKind; + GEOM::ListOfLong_var anInts; + GEOM::ListOfDouble_var aDbls; + + GEOM::GEOM_IMeasureOperations_var anOp = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() ); + + try + { + aKind = anOp->KindOfShape( myObj, anInts, aDbls ); + } + catch( const SALOME::SALOME_Exception& e ) { + SalomeApp_Tools::QtCatchCorbaException( e ); + return aKindStr; + } + + if ( !anOp->IsDone() ) + return aKindStr; + +#define PRINT_DOUBLE(val) QString(" %1").arg( DlgRef::PrintDoubleValue( val ) ) + switch ( aKind ) + { + case GEOM::GEOM_IKindOfShape::COMPOUND: + aKindStr = tr( "GEOM_COMPOUND" ); + break; + case GEOM::GEOM_IKindOfShape::COMPSOLID: + aKindStr = tr( "GEOM_COMPOUNDSOLID" ); + break; + case GEOM::GEOM_IKindOfShape::SHELL: + aKindStr = tr( "GEOM_SHELL" ); + if ( anInts[0] == 1 ) + theParameters = tr( "GEOM_CLOSED" ); + else if ( anInts[0] == 2 ) + theParameters = tr( "GEOM_UNCLOSED" ); + else + theParameters = tr( "GEOM_CLOSEDUNCLOSED" ); + break; + case GEOM::GEOM_IKindOfShape::WIRE: + aKindStr = tr( "GEOM_WIRE" ); + if ( anInts[0] == 1 ) + theParameters = tr( "GEOM_CLOSED" ); + else if ( anInts[0] == 2 ) + theParameters = tr( "GEOM_UNCLOSED" ); + else + theParameters = tr( "GEOM_CLOSEDUNCLOSED" ); + break; + // SOLIDs + case GEOM::GEOM_IKindOfShape::SPHERE: + aKindStr = tr( "GEOM_SPHERE" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_DIMENSIONS" ) + + "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[3] ); + break; + case GEOM::GEOM_IKindOfShape::CYLINDER: + aKindStr = tr( "GEOM_CYLINDER" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_AXIS" ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DIMENSIONS" ) + + "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[6] ) + + "\n" + tr( "GEOM_HEIGHT" ) + PRINT_DOUBLE( aDbls[7] ); + break; + case GEOM::GEOM_IKindOfShape::BOX: + aKindStr = tr( "GEOM_BOX" ); + theParameters = tr( "GEOM_CENTER") + ":" + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_DIMENSIONS" ) + + "\n" + "Ax: " + PRINT_DOUBLE( aDbls[3] ) + + "\n" + "Ay: " + PRINT_DOUBLE( aDbls[4] ) + + "\n" + "Az: " + PRINT_DOUBLE( aDbls[5] ); + break; + case GEOM::GEOM_IKindOfShape::ROTATED_BOX: + aKindStr = tr( "GEOM_BOX" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\nZ Axis:" + + "\n" + "Zx: " + PRINT_DOUBLE( aDbls[3] ) + + "\n" + "Zy: " + PRINT_DOUBLE( aDbls[4] ) + + "\n" + "Zz: " + PRINT_DOUBLE( aDbls[5] ) + + "\nX Axis:" + + "\n" + tr( "GEOM_X_I" ).arg( "x" ) + PRINT_DOUBLE( aDbls[6] ) + + "\n" + tr( "GEOM_X_I" ).arg( "y" ) + PRINT_DOUBLE( aDbls[7] ) + + "\n" + tr( "GEOM_X_I" ).arg( "z" ) + PRINT_DOUBLE( aDbls[8] ) + + "\nDimensions along local axes:" + + "\n" + "Ax: " + PRINT_DOUBLE( aDbls[9] ) + + "\n" + "Ay: " + PRINT_DOUBLE( aDbls[10] ) + + "\n" + "Az: " + PRINT_DOUBLE( aDbls[11] ); + break; + case GEOM::GEOM_IKindOfShape::TORUS: + aKindStr = tr( "GEOM_TORUS" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_AXIS" ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DIMENSIONS" ) + + "\n" + tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6] ) + + "\n" + tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7] ); + break; + case GEOM::GEOM_IKindOfShape::CONE: + aKindStr = tr( "GEOM_CONE" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_AXIS" ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DIMENSIONS" ) + + "\n" + tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6] ) + + "\n" + tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7] ) + + "\n" + tr( "GEOM_HEIGHT" ) + PRINT_DOUBLE( aDbls[8] ); + break; + case GEOM::GEOM_IKindOfShape::POLYHEDRON: + aKindStr = tr( "GEOM_POLYHEDRON" ); + break; + case GEOM::GEOM_IKindOfShape::SOLID: + aKindStr = tr( "GEOM_SOLID" ); + break; + // FACEs + case GEOM::GEOM_IKindOfShape::SPHERE2D: + aKindStr = tr( "GEOM_SURFSPHERE" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_DIMENSIONS" ) + + "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[3] ); + break; + case GEOM::GEOM_IKindOfShape::CYLINDER2D: + aKindStr = tr( "GEOM_SURFCYLINDER" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_AXIS" ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DIMENSIONS" ) + + "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[6] ) + + "\n" + tr( "GEOM_HEIGHT" ) + PRINT_DOUBLE( aDbls[7] ); + break; + case GEOM::GEOM_IKindOfShape::TORUS2D: + aKindStr = tr( "GEOM_SURFTORUS" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_AXIS" ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DIMENSIONS" ) + + "\n" + tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6] ) + + "\n" + tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7] ); + break; + case GEOM::GEOM_IKindOfShape::CONE2D: + aKindStr = tr( "GEOM_SURFCONE" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_AXIS" ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DIMENSIONS" ) + + "\n" + tr( "GEOM_RADIUS_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[6] ) + + "\n" + tr( "GEOM_RADIUS_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[7] ) + + "\n" + tr( "GEOM_HEIGHT" ) + PRINT_DOUBLE( aDbls[8] ); + break; + case GEOM::GEOM_IKindOfShape::DISK_CIRCLE: + aKindStr = tr( "GEOM_DISK_CIRCLE" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_NORMAL" ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DIMENSIONS" ) + + "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[6] ); + break; + case GEOM::GEOM_IKindOfShape::DISK_ELLIPSE: + aKindStr = tr( "GEOM_DISK_ELLIPSE" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_NORMAL" ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DIMENSIONS" ) + + "\n" + tr( "GEOM_RADIUS_MAJOR" ) + PRINT_DOUBLE( aDbls[6] ) + + "\n" + tr( "GEOM_RADIUS_MINOR" ) + PRINT_DOUBLE( aDbls[7] ); + break; + case GEOM::GEOM_IKindOfShape::POLYGON: + aKindStr = tr( "GEOM_POLYGON" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_NORMAL" ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ); + break; + case GEOM::GEOM_IKindOfShape::PLANE: + aKindStr = tr( "GEOM_PLANE" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_NORMAL" ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ); + break; + case GEOM::GEOM_IKindOfShape::PLANAR: + aKindStr = tr( "GEOM_PLANAR_FACE" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_NORMAL" ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ); + break; + case GEOM::GEOM_IKindOfShape::FACE: + aKindStr = tr( "GEOM_FACE" ); + break; + // EDGEs + case GEOM::GEOM_IKindOfShape::CIRCLE: + aKindStr = tr( "GEOM_CIRCLE" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_NORMAL" ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DIMENSIONS" ) + + "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[6] ); + break; + case GEOM::GEOM_IKindOfShape::ARC_CIRCLE: + aKindStr = tr( "GEOM_ARC" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_NORMAL" ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DIMENSIONS" ) + + "\n" + tr( "GEOM_RADIUS" ) + PRINT_DOUBLE( aDbls[6] ) + + "\n" + tr( "GEOM_POINT_I" ).arg( 1 ) + + "\n" + tr( "GEOM_X_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[7] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[8] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[9] ) + + "\n" + tr( "GEOM_POINT_I" ).arg( 2 ) + + "\n" + tr( "GEOM_X_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[10] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[11] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[12] ); + break; + case GEOM::GEOM_IKindOfShape::ELLIPSE: + aKindStr = tr( "GEOM_ELLIPSE" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_NORMAL" ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DIMENSIONS" ) + + "\n" + tr( "GEOM_RADIUS_MAJOR" ) + PRINT_DOUBLE( aDbls[6] ) + + "\n" + tr( "GEOM_RADIUS_MINOR" ) + PRINT_DOUBLE( aDbls[7] ); + break; + case GEOM::GEOM_IKindOfShape::ARC_ELLIPSE: + aKindStr = tr( "GEOM_ARC_ELLIPSE" ); + theParameters = tr( "GEOM_CENTER" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_NORMAL" ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ) + + "\n" + tr( "GEOM_DIMENSIONS" ) + + "\n" + tr( "GEOM_RADIUS_MAJOR" ) + PRINT_DOUBLE( aDbls[6] ) + + "\n" + tr( "GEOM_RADIUS_MINOR" ) + PRINT_DOUBLE( aDbls[7] ) + + "\n" + tr( "GEOM_POINT_I" ).arg( 1 ) + + "\n" + tr( "GEOM_X_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[8] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[9] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[10] ) + + "\n" + tr( "GEOM_POINT_I" ).arg( 2 ) + + "\n" + tr( "GEOM_X_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[11] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[12] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[13] ); + break; + case GEOM::GEOM_IKindOfShape::LINE: + aKindStr = tr( "GEOM_LINE" ); + theParameters = tr( "GEOM_POSITION" ) + + "\n" + tr( "GEOM_X_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 0 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_DIRECTION" ) + + "\n" + tr( "GEOM_DX" ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_DY" ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_DZ" ) + PRINT_DOUBLE( aDbls[5] ); + break; + case GEOM::GEOM_IKindOfShape::SEGMENT: + aKindStr = tr( "GEOM_SEGMENT" ); + theParameters = tr( "GEOM_POINT_I" ).arg( 1 ) + + "\n" + tr( "GEOM_X_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 1 ) + PRINT_DOUBLE( aDbls[2] ) + + "\n" + tr( "GEOM_POINT_I" ).arg( 2 ) + + "\n" + tr( "GEOM_X_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[3] ) + + "\n" + tr( "GEOM_Y_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[4] ) + + "\n" + tr( "GEOM_Z_I" ).arg( 2 ) + PRINT_DOUBLE( aDbls[5] ); + break; + case GEOM::GEOM_IKindOfShape::EDGE: + aKindStr = tr( "GEOM_EDGE" ); + break; + case GEOM::GEOM_IKindOfShape::VERTEX: + aKindStr = tr( "GEOM_VERTEX" ); + theParameters = tr( "GEOM_COORDINATES" ) + + "\n" + tr( "GEOM_X" ) + PRINT_DOUBLE( aDbls[0] ) + + "\n" + tr( "GEOM_Y" ) + PRINT_DOUBLE( aDbls[1] ) + + "\n" + tr( "GEOM_Z" ) + PRINT_DOUBLE( aDbls[2] ); + break; + default: + break; + } + + return aKindStr; } diff --git a/src/MeasureGUI/MeasureGUI_WhatisDlg.h b/src/MeasureGUI/MeasureGUI_WhatisDlg.h index 04913ec7a..f9a698af3 100644 --- a/src/MeasureGUI/MeasureGUI_WhatisDlg.h +++ b/src/MeasureGUI/MeasureGUI_WhatisDlg.h @@ -28,15 +28,15 @@ #include "MeasureGUI_Skeleton.h" -class MeasureGUI_1Sel1TextView; - //================================================================================= -// class : DialogBox_PROPERTIES +// class : MeasureGUI_WhatisDlg // purpose : //================================================================================= class MeasureGUI_WhatisDlg : public MeasureGUI_Skeleton { Q_OBJECT + + class Whatis; public: MeasureGUI_WhatisDlg( GeometryGUI*, QWidget* ); @@ -46,12 +46,16 @@ protected: // redefined from GEOMBase_Helper and MeasureGUI_Skeleton virtual void processObject(); +protected slots: + virtual void ClickOnProperties(); + private: void Init(); bool getParameters( QString& ); + QString getKindOfShape( QString& ); private: - MeasureGUI_1Sel1TextView* myGrp; + Whatis* myGrp; }; #endif // MEASUREGUI_WHATISDLG_H diff --git a/src/NMTTools/NMTTools_DEProcessor.cxx b/src/NMTTools/NMTTools_DEProcessor.cxx index 0933b0104..2c2148030 100644 --- a/src/NMTTools/NMTTools_DEProcessor.cxx +++ b/src/NMTTools/NMTTools_DEProcessor.cxx @@ -31,10 +31,13 @@ #include #include -#include +#include + +#include #include #include +#include #include #include @@ -74,26 +77,18 @@ #include #include #include - +#include +#include #include #include #include +#include #include -// -#include -#include -// -#include - -#include -#include - -#include //======================================================================= -// function: NMTTools_DEProcessor::NMTTools_DEProcessor +// function: // purpose: //======================================================================= NMTTools_DEProcessor::NMTTools_DEProcessor(NMTTools_PaveFiller& aPaveFiller) @@ -118,15 +113,17 @@ void NMTTools_DEProcessor::Do() { Standard_Integer aNbE; + // myIsDone=Standard_False; - + // FindDegeneratedEdges(); + // aNbE=myDEMap.Extent(); - if (!aNbE) { - myIsDone=Standard_True; + myIsDone=!myIsDone; return; } + // DoPaves(); } //======================================================================= @@ -136,27 +133,25 @@ void NMTTools_DEProcessor::FindDegeneratedEdges() { Standard_Integer i, aNb, nV, nF, nVx, ip, iRankE; + TopoDS_Vertex aV; TopTools_IndexedDataMapOfShapeListOfShape aMEF; // aNb=myDS->NumberOfShapesOfTheObject(); - // - for (i=1; i<=aNb; i++) { - const TopoDS_Shape aF=myDS->Shape(i);//mpv + for (i=1; i<=aNb; ++i) { + const TopoDS_Shape aF=myDS->Shape(i); if (aF.ShapeType()==TopAbs_FACE) { TopExp::MapShapesAndAncestors (aF, TopAbs_EDGE, TopAbs_FACE, aMEF); } } // - for (i=1; i<=aNb; i++) { - const TopoDS_Shape aS=myDS->Shape(i);//mpv + for (i=1; i<=aNb; ++i) { + const TopoDS_Shape aS=myDS->Shape(i); if (aS.ShapeType()==TopAbs_EDGE) { const TopoDS_Edge& aE=TopoDS::Edge(aS); if (BRep_Tool::Degenerated(aE)) { iRankE=myDS->Rank(i); - - TopoDS_Vertex aV=TopExp::FirstVertex(aE); - + aV=TopExp::FirstVertex(aE); nVx=myDS->ShapeIndex(aV, iRankE); // nV=nVx; @@ -193,11 +188,12 @@ // nFD=0; aNbE=myDEMap.Extent(); - for (i=1; i<=aNbE; i++) { + for (i=1; i<=aNbE; ++i) { nED=myDEMap.FindKey(i); - + // const BOPTools_DEInfo& aDEInfo=myDEMap(i); nVD=aDEInfo.Vertex(); + // // Fill PaveSet for the edge nED const TColStd_ListOfInteger& nLF=aDEInfo.Faces(); TColStd_ListIteratorOfListOfInteger anIt(nLF); @@ -206,12 +202,12 @@ BOPTools_ListOfPaveBlock aLPB; FindPaveBlocks(nED, nVD, nFD, aLPB); - // xxf + // aNbLPB=aLPB.Extent(); if (!aNbLPB) { continue; } - //xxt + // FillPaveSet (nED, nVD, nFD, aLPB); } // @@ -235,7 +231,6 @@ BOPTools_ListIteratorOfListOfPaveBlock anIt; Standard_Integer i, aNb, nF2, nV; // - //BOPTools_CArray1OfSSInterference& aFFs=(myFiller->InterfPool())->SSInterferences(); BOPTools_CArray1OfSSInterference& aFFs=(myFiller->IP())->SSInterferences(); // aNb=aFFs.Extent(); @@ -270,24 +265,24 @@ // // Section Parts Standard_Integer j, aNbCurves; + // BOPTools_SequenceOfCurves& aSC=aFF.Curves(); aNbCurves=aSC.Length(); - - for (j=1; j<=aNbCurves; j++) { + for (j=1; j<=aNbCurves; ++j) { const BOPTools_Curve& aBC=aSC(j); const BOPTools_ListOfPaveBlock& aLPBSe=aBC.NewPaveBlocks(); - + // anIt.Initialize(aLPBSe); for (; anIt.More(); anIt.Next()) { const BOPTools_PaveBlock& aPBSe=anIt.Value(); - + // const BOPTools_Pave& aPv1=aPBSe.Pave1(); nV=aPv1.Index(); if (nV==nVD) { aLPBOut.Append(aPBSe); continue; } - + // const BOPTools_Pave& aPv2=aPBSe.Pave2(); nV=aPv2.Index(); if (nV==nVD) { @@ -309,28 +304,26 @@ { Standard_Boolean bIsDone, bXDir, bRejectFlag; Standard_Integer nE, aNbPoints, j; - Standard_Real aTD1, aTD2, aT1, aT2, aTolInter, aX, aDT; + Standard_Real aTD1, aTD2, aT1, aT2, aTolInter, aX, aDT, aXx; + gp_Pnt2d aP2d1, aP2d2, aP2D; + gp_Lin2d aLDE; // aDT=Precision::PConfusion(); // - BOPTools_PaveSet& aPaveSet= (myFiller->ChangePavePool()).ChangeValue(myDS->RefEdge(nED)); + BOPTools_PaveSet& aPaveSet= + (myFiller->ChangePavePool()).ChangeValue(myDS->RefEdge(nED)); // // Clear aPaveSet, aSplitEdges aPaveSet.ChangeSet().Clear(); // - const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED));//mpv - const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD));//mpv + const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED)); + const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD)); // // 2D Curve of degenerated edge on the face aDF - // Modified Thu Sep 14 14:35:18 2006 - // Contribution of Samtech www.samcef.com BEGIN - //Handle(Geom2d_Curve) aC2DDE=BRep_Tool::CurveOnSurface(aDE, aDF, aTD1, aTD2); Handle(Geom2d_Curve) aC2DDE1=BRep_Tool::CurveOnSurface(aDE, aDF, aTD1, aTD2); Handle(Geom2d_TrimmedCurve)aC2DDE=new Geom2d_TrimmedCurve(aC2DDE1, aTD1, aTD2); - // Contribution of Samtech www.samcef.com END // - // Choose direction for Degenerated Edge - gp_Pnt2d aP2d1, aP2d2; + // Choose direction for degenerated edge aC2DDE->D0(aTD1, aP2d1); aC2DDE->D0(aTD2, aP2d2); @@ -350,15 +343,13 @@ for (; anIt.More(); anIt.Next()) { const BOPTools_PaveBlock& aPB=anIt.Value(); nE=aPB.Edge(); - const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));//mpv + const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE)); Handle(Geom2d_Curve) aC2D=BRep_Tool::CurveOnSurface(aE, aDF, aT1, aT2); // // Intersection - aTolInter=0.001; - Geom2dAdaptor_Curve aGAC1, aGAC2; - + // aGAC1.Load(aC2DDE, aTD1, aTD2); Handle(Geom2d_Line) aL2D= Handle(Geom2d_Line)::DownCast(aC2D); if (!aL2D.IsNull()) { @@ -367,28 +358,37 @@ else { aGAC2.Load(aC2D, aT1, aT2); } - + // + aTolInter=0.001; Geom2dInt_GInter aGInter(aGAC1, aGAC2, aTolInter, aTolInter); - bIsDone=aGInter.IsDone(); if(bIsDone) { aNbPoints=aGInter.NbPoints(); if (aNbPoints) { for (j=1; j<=aNbPoints; ++j) { - gp_Pnt2d aP2D=aGInter.Point(j).Value(); + aP2D=aGInter.Point(j).Value(); + Handle(Geom2d_Line) aCLDE; // - // Modified to obtain exact parameter Thu Sep 14 14:35:18 2006 - // Contribution of Samtech www.samcef.com BEGIN - Handle(Geom2d_Line) aCLDE=Handle(Geom2d_Line)::DownCast(aC2DDE1); + //modified by NIZNHY-PKV Thu Mar 20 17:37:32 2008f + Handle(Geom2d_TrimmedCurve) aCLDET1= + Handle(Geom2d_TrimmedCurve)::DownCast(aC2DDE1); + if (aCLDET1.IsNull()) { + aCLDE=Handle(Geom2d_Line)::DownCast(aC2DDE1); + } + else { + Handle(Geom2d_Curve) aBasisCurve=aCLDET1->BasisCurve(); + aCLDE=Handle(Geom2d_Line)::DownCast(aBasisCurve); + } + //aCLDE=Handle(Geom2d_Line)::DownCast(aC2DDE1); + //modified by NIZNHY-PKV Thu Mar 20 17:37:37 2008t + if (aCLDE.IsNull()) { continue; } - gp_Lin2d aLDE=aCLDE->Lin2d(); + + aLDE=aCLDE->Lin2d(); aX=ElCLib::Parameter(aLDE, aP2D); // - //aX=(bXDir) ? aP2D.X(): aP2D.Y(); - // Contribution of Samtech www.samcef.com END - // if (fabs (aX-aTD1) < aDT || fabs (aX-aTD2) < aDT) { continue; } @@ -401,7 +401,7 @@ BOPTools_ListIteratorOfListOfPave aPaveIt(aListOfPave); for (; aPaveIt.More(); aPaveIt.Next()) { const BOPTools_Pave& aPavex=aPaveIt.Value(); - Standard_Real aXx=aPavex.Param(); + aXx=aPavex.Param(); if (fabs (aX-aXx) < aDT) { bRejectFlag=Standard_True; break; @@ -424,8 +424,10 @@ //======================================================================= void NMTTools_DEProcessor::FillSplitEdgesPool (const Standard_Integer nED) { - BOPTools_SplitShapesPool& aSplitShapesPool=myFiller->ChangeSplitShapesPool(); - BOPTools_ListOfPaveBlock& aSplitEdges=aSplitShapesPool.ChangeValue(myDS->RefEdge(nED)); + BOPTools_SplitShapesPool& aSplitShapesPool= + myFiller->ChangeSplitShapesPool(); + BOPTools_ListOfPaveBlock& aSplitEdges= + aSplitShapesPool.ChangeValue(myDS->RefEdge(nED)); // aSplitEdges.Clear(); // @@ -454,8 +456,8 @@ TopoDS_Edge aE, aESplit; TopoDS_Vertex aV1, aV2; - const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED));//mpv - const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD));//mpv + const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED)); + const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD)); BOPTools_ListIteratorOfListOfPaveBlock aPBIt(aSplitEdges); @@ -522,17 +524,4 @@ BB.UpdateEdge(E, aTol); aNewEdge=E; } -/* -//======================================================================= -// function: NMTTools_DEProcessor::NMTTools_DEProcessor -// purpose: -//======================================================================= - NMTTools_DEProcessor::NMTTools_DEProcessor(NMTTools_PDSFiller& pDSFiller) -: - myIsDone(Standard_False) -{ - myDSFiller=pDSFiller; - myFiller=(NMTTools_PaveFiller*) &(myDSFiller->PaveFiller()); - myDS=myFiller->DS(); -} -*/ + diff --git a/src/NMTTools/NMTTools_PaveFiller_5.cxx b/src/NMTTools/NMTTools_PaveFiller_5.cxx index 01ec5e0bb..4fb0746a4 100644 --- a/src/NMTTools/NMTTools_PaveFiller_5.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_5.cxx @@ -98,16 +98,18 @@ static //======================================================================= void NMTTools_PaveFiller::PerformEF() { - myIsDone=Standard_False; - - Standard_Integer n1, n2, anIndexIn=0, nE, nF, aNbEFs, aBlockLength; Standard_Boolean bJustAdd; - Standard_Real aTolE, aTolF, aDeflection=0.01; - Standard_Integer aDiscretize=35; + Standard_Integer n1, n2, anIndexIn, nE, nF, aNbEFs, aBlockLength; + Standard_Integer aDiscretize; + Standard_Real aTolE, aTolF, aDeflection; BooleanOperations_IndexedDataMapOfShapeInteger aMapVI; BOPTools_IDMapOfPaveBlockIMapOfInteger aMapCB; BOPTools_IMapOfPaveBlock aIMPBx; // + myIsDone=Standard_False; + aDeflection=0.01; + aDiscretize=35; + // BOPTools_CArray1OfESInterference& aEFs=myIP->ESInterferences(); // myDSIt->Initialize(TopAbs_EDGE, TopAbs_FACE); @@ -121,11 +123,12 @@ static // for (; myDSIt->More(); myDSIt->Next()) { myDSIt->Current(n1, n2, bJustAdd); - anIndexIn = 0; // - //if (myIntrPool->IsComputed(n1, n2)) { - // continue; - //} + if(bJustAdd) { + continue; + } + // + anIndexIn = 0; // nE=n1; nF=n2; @@ -133,44 +136,29 @@ static nE=n2; nF=n1; } - //SortTypes(nE, nF); // // all Common Blocks for face nF - //XXX NMTTools_ListOfCommonBlock aLCBF; CommonBlocksFace(nF, aLCBF); NMTTools_CommonBlockAPI aCBAPIF(aLCBF); - //XXX - if(bJustAdd) { - //myIntrPool->AddInterference (nE, nF, BooleanOperations_EdgeSurface, anIndexIn); - continue; - } + // // Edge - const TopoDS_Edge aE=TopoDS::Edge(myDS->GetShape(nE));//mpv + const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE)); if (BRep_Tool::Degenerated(aE)){ continue; } + // // Face - const TopoDS_Face aF=TopoDS::Face(myDS->GetShape(nF));//mpv + const TopoDS_Face aF=TopoDS::Face(myDS->Shape(nF)); // - // Modified - // to avoid intersection between face and edge from that face - // Thu Sep 14 14:35:18 2006 - // Contribution of Samtech www.samcef.com BEGIN TopTools_IndexedMapOfShape aME; - // TopExp::MapShapes(aF, TopAbs_EDGE, aME); if (aME.Contains(aE)) { continue; } - // Contribution of Samtech www.samcef.com END // aTolF=BRep_Tool::Tolerance(aF); - - // Modified Thu Sep 14 14:35:18 2006 - // Contribution of Samtech www.samcef.com BEGIN aTolE=BRep_Tool::Tolerance(aE); - // Contribution of Samtech www.samcef.com END const Bnd_Box& aBBF=myDS->GetBoundingBox(nF); // @@ -180,14 +168,13 @@ static BOPTools_ListIteratorOfListOfPaveBlock anIt(aLPB); for (; anIt.More(); anIt.Next()) { BOPTools_PaveBlock& aPB=anIt.Value(); - //XXX if (aCBAPIF.IsCommonBlock(aPB)) { continue; } - //XXX + // const IntTools_ShrunkRange& aShrunkRange=aPB.ShrunkRange(); const IntTools_Range& aSR =aShrunkRange.ShrunkRange(); - const Bnd_Box& aBBE=aShrunkRange.BndBox(); + const Bnd_Box& aBBE=aShrunkRange.BndBox(); // if (aBBF.IsOut (aBBE)) { continue; @@ -213,17 +200,21 @@ static aEF.Perform(); // if (aEF.IsDone()) { - const IntTools_SequenceOfCommonPrts& aCPrts=aEF.CommonParts(); + Standard_Boolean bCoinsideFlag; Standard_Integer i, aNbCPrts; + TopAbs_ShapeEnum aType; + // + const IntTools_SequenceOfCommonPrts& aCPrts=aEF.CommonParts(); + // aNbCPrts=aCPrts.Length(); - for (i=1; i<=aNbCPrts; i++) { - // + for (i=1; i<=aNbCPrts; ++i) { anIndexIn=0; // const IntTools_CommonPrt& aCPart=aCPrts(i); - TopAbs_ShapeEnum aType=aCPart.Type(); + aType=aCPart.Type(); + // switch (aType) { - + // case TopAbs_VERTEX: { Standard_Boolean bIsOnPave1, bIsOnPave2; Standard_Integer nVF; @@ -238,7 +229,6 @@ static // //decide to add pave or not aTolToDecide=5.e-8; - // bIsOnPave1=IsOnPave(anewSR.First(), aR, aTolToDecide); bIsOnPave2=IsOnPave(anewSR.Last() , aR, aTolToDecide); // @@ -253,24 +243,27 @@ static // aMapVI.Add(aNewVertex, anIndexIn); aIMPBx.Add(aPB); - // qqf - { - myIP->Add(nE, nF, Standard_True, NMTDS_TI_EF); - } - // qqt + // + myIP->Add(nE, nF, Standard_True, NMTDS_TI_EF); // }// if (!nVF) }// if (!bIsOnPave1 && !bIsOnPave2) - //myIntrPool->AddInterference (nE, nF, BooleanOperations_EdgeSurface, anIndexIn); + // + //modified by NIZNHY-PKV Fri Apr 18 10:55:38 2008f + else { + const BOPTools_Pave& aPave=(bIsOnPave1)? aPB.Pave1() : aPB.Pave2(); + nVF=aPave.Index(); + const TopoDS_Vertex& aVF=TopoDS::Vertex(myDS->Shape(nVF)); + BOPTools_Tools::UpdateVertex (aVF, aNewVertex); + } + //modified by NIZNHY-PKV Fri Apr 18 10:55:40 2008t + // }// case TopAbs_VERTEX: break; // case TopAbs_EDGE: { - Standard_Boolean aCoinsideFlag; - // - aCoinsideFlag=BOPTools_Tools::IsBlockInOnFace(aPB, aF, myContext); - if (!aCoinsideFlag) { - //myIntrPool->AddInterference (nE, nF, BooleanOperations_EdgeSurface, anIndexIn); + bCoinsideFlag=BOPTools_Tools::IsBlockInOnFace(aPB, aF, myContext); + if (!bCoinsideFlag) { break; } // @@ -284,12 +277,9 @@ static aMapF.Add(nF); aMapCB.Add(aPB, aMapF); } + // aIMPBx.Add(aPB); - // qqf - { - myIP->Add(nE, nF, Standard_True, NMTDS_TI_EF); - } - // qqt + myIP->Add(nE, nF, Standard_True, NMTDS_TI_EF); }// case TopAbs_EDGE: break; @@ -343,12 +333,12 @@ static // function:EFCommonBlocks // purpose: //======================================================================= - void NMTTools_PaveFiller::EFCommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB) + void NMTTools_PaveFiller::EFCommonBlocks + (const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB) { Standard_Integer i, aNbPB, nE, j, aNbF, nF; // aNbPB=aMapCB.Extent(); - // for (i=1; i<=aNbPB; ++i) { const BOPTools_PaveBlock& aPB=aMapCB.FindKey(i); const TColStd_IndexedMapOfInteger& aMapF=aMapCB.FindFromIndex(i); @@ -382,7 +372,8 @@ static // function:EFNewVertices // purpose: //======================================================================= - void NMTTools_PaveFiller::EFNewVertices (const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) + void NMTTools_PaveFiller::EFNewVertices + (const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) { Standard_Integer i, j, aNb, aNewShape, aFlag, iX, aNbVV, aNbSimple; Standard_Integer aWhat, aWith, nE, nF, nV, aNbIEF, aNbEdges, iTmp; @@ -395,14 +386,13 @@ static BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; TopTools_IndexedMapOfShape aMNVComplex, aMNVSimple; // - BOPTools_CArray1OfESInterference& aEFs=myIP->ESInterferences(); - // aNb=aMapVI.Extent(); - // if (!aNb) { // no new vertices, no new problems return; } // + BOPTools_CArray1OfESInterference& aEFs=myIP->ESInterferences(); + // // 0. if (aNb==1) { aNewVertex=TopoDS::Vertex(aMapVI.FindKey(1)); @@ -425,12 +415,9 @@ static // tPF.Init(); tPF.PerformVV(); - //tPF.PerformNewVertices(); qq // NMTDS_ShapesDataStructure& tDS=*(tPF.DS()); - //const BOPTools_InterferencePool& tInterfPool=*(tPF.InterfPool()); NMTDS_InterfPool& tInterfPool=*(tPF.IP()); - //const BOPTools_CArray1OfVVInterference& aVVInterfs=tInterfPool.VVInterfs(); BOPTools_CArray1OfVVInterference& aVVInterfs=tInterfPool.VVInterferences(); // // 3. Separate Comlex and Simple new vertices @@ -486,7 +473,7 @@ static iX=aMapVI.FindFromKey(aV1); const BOPTools_ESInterference& aEF1=aEFs(iX); aEF1.Indices(nE, nF); - //SortTypes(nE, nF); + // if (myDS->GetShapeType(nF)==TopAbs_EDGE) { iTmp=nE; nE=nF; @@ -499,7 +486,7 @@ static iX=aMapVI.FindFromKey(aV2); const BOPTools_ESInterference& aEF2=aEFs(iX); aEF2.Indices(nE, nF); - //SortTypes(nE, nF); + // if (myDS->GetShapeType(nF)==TopAbs_EDGE) { iTmp=nE; nE=nF; @@ -507,7 +494,8 @@ static } aME.Add(nE); aMIEF.Add(iX); - } + }// for (i=1; i<=aNb; ++i) { + // // 4. Process new vertices aNb=aMNVE.Extent(); for (i=1; i<=aNb; ++i) { // xx @@ -555,8 +543,9 @@ static // function:EFNewVertices // purpose: //======================================================================= - void NMTTools_PaveFiller::EFNewVertices (const TopoDS_Vertex& aNewVertex, - const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) + void NMTTools_PaveFiller::EFNewVertices + (const TopoDS_Vertex& aNewVertex, + const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) { Standard_Integer i, aNewShape, nE, nF; Standard_Real aT; @@ -569,13 +558,13 @@ static myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq); aNewShape=myDS->NumberOfInsertedShapes(); myDS->SetState (aNewShape, BooleanOperations_ON); + // // Insert New Vertex in EFInterference i=aMapVI.FindFromKey(aNewVertex); BOPTools_ESInterference& aEFInterf= aEFs(i); aEFInterf.SetNewShape(aNewShape); // Extract interference info aEFInterf.Indices(nE, nF); - //SortTypes(nE, nF); if (myDS->GetShapeType(nF)==TopAbs_EDGE) { nE=nF; } @@ -596,15 +585,17 @@ static // function: CheckFacePaves // purpose: //======================================================================= - Standard_Integer NMTTools_PaveFiller::CheckFacePaves (const TopoDS_Vertex& aNewVertex, - const Standard_Integer nF) + Standard_Integer NMTTools_PaveFiller::CheckFacePaves + (const TopoDS_Vertex& aNewVertex, + const Standard_Integer nF) { - Standard_Integer nEF, nVF, iFlag, i, aNbV; + Standard_Integer nEF, nVF, iFlag, i, aNbV, iRet; BOPTools_ListIteratorOfListOfPave anIt; TColStd_IndexedMapOfInteger aMVF; - // - BooleanOperations_OnceExplorer aExp(*myDS); // + iRet=0; + // + BooleanOperations_OnceExplorer aExp(*myDS); aExp.Init(nF, TopAbs_EDGE); for (; aExp.More(); aExp.Next()) { nEF=aExp.Current(); @@ -621,15 +612,14 @@ static aNbV=aMVF.Extent(); for (i=1; i<=aNbV; ++i) { nVF=aMVF(i); - const TopoDS_Vertex aVF=TopoDS::Vertex(myDS->Shape(nVF));//mpv + const TopoDS_Vertex aVF=TopoDS::Vertex(myDS->Shape(nVF)); iFlag=IntTools_Tools::ComputeVV(aNewVertex, aVF); if (!iFlag) { return nVF; } } - return 0; + return iRet; } - // //======================================================================= // function: VertexParameter @@ -640,7 +630,6 @@ void VertexParameter(const IntTools_CommonPrt& aCPart, { const IntTools_Range& aR=aCPart.Range1(); aT=0.5*(aR.First()+aR.Last()); - // if((aCPart.VertexParameter1() >= aR.First()) && (aCPart.VertexParameter1() <= aR.Last())) { aT = aCPart.VertexParameter1(); @@ -663,6 +652,7 @@ Standard_Boolean IsOnPave(const Standard_Real& aTR, if (bIsOnPave) { return bIsOnPave; } + // dT1=Abs(aTR-aT1); dT2=Abs(aTR-aT2); bIsOnPave=(dT1<=aTolerance || dT2<=aTolerance); diff --git a/src/OBJECT/GEOM_Actor.cxx b/src/OBJECT/GEOM_Actor.cxx index 6771efaa9..ad0bf66fd 100644 --- a/src/OBJECT/GEOM_Actor.cxx +++ b/src/OBJECT/GEOM_Actor.cxx @@ -67,6 +67,8 @@ #include #include +#include "utilities.h" + //vtkStandardNewMacro(GEOM_Actor); #ifndef MYDEBUG @@ -105,7 +107,7 @@ GEOM_Actor::GEOM_Actor(): { #ifdef MYDEBUG - cout <SetInput(myAppendFilter->GetOutput()); @@ -180,7 +182,7 @@ GEOM_Actor::GEOM_Actor(): GEOM_Actor::~GEOM_Actor() { #ifdef MYDEBUG - cout <Delete(); myPreHighlightProp->Delete(); @@ -199,7 +201,7 @@ New() void Write(vtkPolyData* theDataSet, const char* theFileName){ vtkPolyDataWriter* aWriter = vtkPolyDataWriter::New(); - cout<<"Write - "<GetNumberOfPoints()<<"; "<GetNumberOfCells()<GetNumberOfPoints()<<"; "<GetNumberOfCells()); aWriter->SetInput(theDataSet); aWriter->SetFileName(theFileName); //aWriter->Write(); @@ -275,7 +277,7 @@ GEOM_Actor:: setDisplayMode(int theMode) { #ifdef MYDEBUG - cout << "GEOM_Actor::SetDisplayMode = "<myHighlightActor->GetProperty()->DeepCopy(Prop); @@ -488,7 +489,7 @@ void GEOM_Actor::SetHighlightProperty(vtkProperty* Prop) void GEOM_Actor::SetWireframeProperty(vtkProperty* Prop) { #ifdef MYDEBUG - cout << this << " GEOM_Actor::SetWireframeProperty"<SetProperty(Prop); @@ -497,7 +498,7 @@ void GEOM_Actor::SetWireframeProperty(vtkProperty* Prop) void GEOM_Actor::SetShadingProperty(vtkProperty* Prop) { #ifdef MYDEBUG - cout << "GEOM_Actor::SetShadingProperty"<DeepCopy(Prop); } @@ -506,7 +507,7 @@ void GEOM_Actor::SetShadingProperty(vtkProperty* Prop) void GEOM_Actor::Render(vtkRenderer *ren, vtkMapper *theMapper) { #ifdef MYDEBUG - cout << "GEOM_Actor::Render"<Delete(); } else this->Device->Render(ren, theMapper); - } void GEOM_Actor::ReleaseGraphicsResources(vtkWindow *) { #ifdef MYDEBUG - cout << "GEOM_Actor::ReleaseGraphicsResources"<EmitSignalDeactivateDialog(); switch ( theCommandID ) { - case 503: ( new OperationGUI_PartitionDlg( getGeometryGUI(), parent ) )->show(); break; - case 504: ( new OperationGUI_ArchimedeDlg( getGeometryGUI(), parent ) )->show(); break; - case 505: ( new OperationGUI_FilletDlg ( getGeometryGUI(), parent ) )->show(); break; - case 506: ( new OperationGUI_ChamferDlg ( getGeometryGUI(), parent ) )->show(); break; - case 507: ( new OperationGUI_ClippingDlg ( getGeometryGUI(), parent ) )->show(); break; + case 503: ( new OperationGUI_PartitionDlg ( getGeometryGUI(), parent ) )->show(); break; + case 504: ( new OperationGUI_ArchimedeDlg ( getGeometryGUI(), parent ) )->show(); break; + case 505: ( new OperationGUI_FilletDlg ( getGeometryGUI(), parent ) )->show(); break; + case 506: ( new OperationGUI_ChamferDlg ( getGeometryGUI(), parent ) )->show(); break; + case 507: ( new OperationGUI_ClippingDlg ( getGeometryGUI(), parent ) )->show(); break; + case 508: ( new OperationGUI_GetShapesOnShapeDlg( getGeometryGUI(), parent ) )->show(); break; default: app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) ); } diff --git a/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx b/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx new file mode 100644 index 000000000..b2686cc10 --- /dev/null +++ b/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx @@ -0,0 +1,316 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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 +// +// File : OperationGUI_GetShapesOnShapeDlg.cxx +// Author : Sergey KUUL, Open CASCADE S.A.S. (sergey.kuul@opencascade.com) +// + +#include "OperationGUI_GetShapesOnShapeDlg.h" + +#include +#include +#include +#include + +#include +#include +#include + +//============================================================================== +// class : OperationGUI_GetShapesOnShapeDlg() +// purpose : Constructs a OperationGUI_GetShapesOnShapeDlg which is a child of +// 'parent', with the name 'name' and widget flags set to 'f'. +// The dialog will by default be modeless, unless you set 'modal' to +// TRUE to construct a modal dialog. +//================================================================================= +OperationGUI_GetShapesOnShapeDlg::OperationGUI_GetShapesOnShapeDlg( GeometryGUI* theGeometryGUI, + QWidget* parent ) + : GEOMBase_Skeleton( theGeometryGUI, parent, false ) +{ + SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr(); + QPixmap image0( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_SHAPES_ON_SHAPE" ) ) ); + QPixmap image2( aResMgr->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); + + setWindowTitle( tr( "GEOM_SHAPES_ON_SHAPE_TITLE" ) ); + + mainFrame()->GroupConstructors->setTitle( tr( "GEOM_SHAPES_ON_SHAPE" ) ); + mainFrame()->RadioButton1->setIcon(image0); + mainFrame()->RadioButton2->setAttribute( Qt::WA_DeleteOnClose ); + mainFrame()->RadioButton2->close(); + mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); + mainFrame()->RadioButton3->close(); + + GroupPoints = new DlgRef_2Sel2List( centralWidget() ); + //GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION")); + GroupPoints->GroupBox1->setTitle( "Input data" ); + GroupPoints->TextLabel1->setText( tr( "GEOM_SHAPES_ON_SHAPE_ESHAPE" ) ); + GroupPoints->TextLabel2->setText( tr( "GEOM_SHAPES_ON_SHAPE_CSHAPE" ) ); + GroupPoints->TextLabel3->setText( tr( "GEOM_RECONSTRUCTION_LIMIT" ) ); + GroupPoints->TextLabel4->setText( tr( "GEOM_SHAPES_ON_SHAPE_STATE" ) ); + GroupPoints->PushButton1->setIcon( image2 ); + GroupPoints->PushButton2->setIcon( image2 ); + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); + + QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); + layout->setMargin( 0 ); layout->setSpacing( 6 ); + layout->addWidget( GroupPoints ); + + setHelpFileName( "shapesonshape_page.html" ); + + Init(); +} + +//================================================================================= +// function : ~OperationGUI_GetShapesOnShapeDlg +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +OperationGUI_GetShapesOnShapeDlg::~OperationGUI_GetShapesOnShapeDlg() +{ +} + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void OperationGUI_GetShapesOnShapeDlg::Init() +{ + /* type for sub shape selection */ + GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_SOLID" ) ); + // commented by skl for IPAL19949 - finder isn't allowed such type + //GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_SHELL" ) ); + GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_FACE" ) ); + // commented by skl for IPAL19949 - finder isn't allowed such type + //GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_WIRE" ) ); + GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_EDGE" ) ); + GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_VERTEX" ) ); + + /* type for state selection */ + GroupPoints->ComboBox2->addItem( tr( "GEOM_STATE_IN" ) ); + GroupPoints->ComboBox2->addItem( tr( "GEOM_STATE_OUT" ) ); + GroupPoints->ComboBox2->addItem( tr( "GEOM_STATE_ON" ) ); + GroupPoints->ComboBox2->addItem( tr( "GEOM_STATE_ONIN" ) ); + GroupPoints->ComboBox2->addItem( tr( "GEOM_STATE_ONOUT" ) ); + + GroupPoints->LineEdit1->clear(); + GroupPoints->LineEdit2->clear(); + + /* signals and slots connections */ + connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); + connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); + + connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); + connect( GroupPoints->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); + + connect( GroupPoints->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); + connect( GroupPoints->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); + + connect( GroupPoints->ComboBox1, SIGNAL( activated( int ) ), this, SLOT( ComboTextChanged() ) ); + connect( GroupPoints->ComboBox2, SIGNAL( activated( int ) ), this, SLOT( ComboTextChanged() ) ); + + connect( myGeomGUI->getApp()->selectionMgr(), + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + + globalSelection( GEOM_ALLSHAPES ); + + initName( mainFrame()->GroupConstructors->title() ); + + GroupPoints->TextLabel3->show(); + GroupPoints->ComboBox1->show(); + GroupPoints->ComboBox1->setCurrentIndex( 0 ); + GroupPoints->ComboBox2->show(); + GroupPoints->ComboBox2->setCurrentIndex( 0 ); + + myEditCurrentArgument = GroupPoints->LineEdit1; + myEditCurrentArgument->setFocus(); +} + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void OperationGUI_GetShapesOnShapeDlg::ClickOnOk() +{ + if ( ClickOnApply() ) + ClickOnCancel(); +} + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool OperationGUI_GetShapesOnShapeDlg::ClickOnApply() +{ + if ( !onAccept() ) + return false; + + initName(); + return true; +} + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection has changed +//================================================================================= +void OperationGUI_GetShapesOnShapeDlg::SelectionIntoArgument() +{ + myEditCurrentArgument->setText( "" ); + QString aString = ""; + + int nbSel = GEOMBase::GetNameOfSelectedIObjects( selectedIO(), aString, true ); + + if ( nbSel > 0 ) { + Standard_Boolean aRes = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes ); + if ( !CORBA::is_nil( aSelectedObject ) && aRes && GEOMBase::IsShape( aSelectedObject ) ) { + { + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myObject1 = aSelectedObject; + else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myObject2 = aSelectedObject; + } + } + } + + myEditCurrentArgument->setText( aString ); +} + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void OperationGUI_GetShapesOnShapeDlg::SetEditCurrentArgument() +{ + QPushButton* send = (QPushButton*)sender(); + + if ( send == GroupPoints->PushButton1 ) myEditCurrentArgument = GroupPoints->LineEdit1; + else if ( send == GroupPoints->PushButton2 ) myEditCurrentArgument = GroupPoints->LineEdit2; + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); +} + +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void OperationGUI_GetShapesOnShapeDlg::LineEditReturnPressed() +{ + QLineEdit* send = (QLineEdit*)sender(); + if ( send == GroupPoints->LineEdit1 || send == GroupPoints->LineEdit2 ) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } +} + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void OperationGUI_GetShapesOnShapeDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + globalSelection( GEOM_ALLSHAPES ); + connect( myGeomGUI->getApp()->selectionMgr(), + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); +} + +//================================================================================= +// function : enterEvent() +// purpose : when mouse enter onto the QWidget +//================================================================================= +void OperationGUI_GetShapesOnShapeDlg::enterEvent(QEvent * e) +{ + if ( !mainFrame()->GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr OperationGUI_GetShapesOnShapeDlg::createOperation() +{ + return getGeomEngine()->GetIShapesOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool OperationGUI_GetShapesOnShapeDlg::isValid( QString& msg ) +{ + Handle(SALOME_InteractiveObject) IO = firstIObject(); + Standard_Boolean testResult; + GEOM::GEOM_Object_var anObject = GEOMBase::ConvertIOinGEOMObject( IO, testResult ); + if ( !testResult || anObject->_is_nil() ) + return false; + + return !CORBA::is_nil( myObject1 ) && !CORBA::is_nil( myObject2 ); +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool OperationGUI_GetShapesOnShapeDlg::execute( ObjectList& objects ) +{ + int aLimit = GroupPoints->ComboBox1->currentIndex(); + switch ( aLimit ) + { + case 0: aLimit = GEOM::SOLID ; break; + case 1: aLimit = GEOM::FACE ; break; + case 2: aLimit = GEOM::EDGE ; break; + case 3: aLimit = GEOM::VERTEX; break; + default: aLimit = GEOM::SHAPE ; break; + } + + GEOM::shape_state aState; + switch ( GroupPoints->ComboBox2->currentIndex() ) + { + case 0: aState = GEOM::ST_IN; break; + case 1: aState = GEOM::ST_OUT; break; + case 2: aState = GEOM::ST_ON; break; + case 3: aState = GEOM::ST_ONIN; break; + case 4: aState = GEOM::ST_ONOUT; break; + default: break; + } + + GEOM::GEOM_Object_var anObj = GEOM::GEOM_IShapesOperations:: + _narrow( getOperation() )->GetShapesOnShapeAsCompound( myObject2, myObject1, + (CORBA::Short) aLimit, + aState ); + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return objects.size(); +} + +//======================================================================= +//function : ComboTextChanged +//purpose : +//======================================================================= +void OperationGUI_GetShapesOnShapeDlg::ComboTextChanged() +{ + // VRS ???? What is it for ??? commented for a while... + //bool IsEnabled = GroupPoints->ComboBox1->currentIndex() < 3; +} diff --git a/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.h b/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.h new file mode 100644 index 000000000..3c457b81c --- /dev/null +++ b/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.h @@ -0,0 +1,74 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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 +// +// File : OperationGUI_GetShapesOnShapeDlg.h +// Author : Sergey KUUL, Open CASCADE S.A.S. (sergey.kuul@opencascade.com) +// + +#ifndef OPERATIONGUI_GETSHAPESONSHAPEDLG_H +#define OPERATIONGUI_GETSHAPESONSHAPEDLG_H + +#include +#include + +class DlgRef_2Sel2List; + +//================================================================================= +// class : OperationGUI_GetShapesOnShapeDlg +// purpose : +//================================================================================= +class OperationGUI_GetShapesOnShapeDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + +public: + OperationGUI_GetShapesOnShapeDlg( GeometryGUI* theGeometryGUI, QWidget* parent = 0 ); + ~OperationGUI_GetShapesOnShapeDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& ); + +private: + void Init(); + void enterEvent( QEvent* ); + +private: + GEOM::GEOM_Object_var myObject1; + GEOM::GEOM_Object_var myObject2; + int myShapeType; + GEOMAlgo_State myState; + + DlgRef_2Sel2List* GroupPoints; + +private slots: + void ClickOnOk(); + bool ClickOnApply(); + void SetEditCurrentArgument(); + void SelectionIntoArgument(); + void LineEditReturnPressed(); + void ActivateThisDialog(); + void ComboTextChanged(); +}; + +#endif // OPERATIONGUI_GETSHAPESONSHAPEDLG_H diff --git a/src/OperationGUI/OperationGUI_PartitionDlg.cxx b/src/OperationGUI/OperationGUI_PartitionDlg.cxx index a729d4dfc..a84730d6f 100644 --- a/src/OperationGUI/OperationGUI_PartitionDlg.cxx +++ b/src/OperationGUI/OperationGUI_PartitionDlg.cxx @@ -119,6 +119,8 @@ void OperationGUI_PartitionDlg::Init() GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_VERTEX" ) ); GroupPoints->CheckButton1->setChecked( false ); + mainFrame()->GroupBoxPublish->show(); + /* signals and slots connections */ connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); @@ -132,8 +134,6 @@ void OperationGUI_PartitionDlg::Init() connect( GroupPoints->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); connect( GroupPoints->ComboBox1, SIGNAL( activated( int ) ), this, SLOT( ComboTextChanged() ) ); - - connect( GroupPoints->CheckButton1, SIGNAL( stateChanged( int ) ), this, SLOT( ReverseSense( int ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); @@ -388,6 +388,20 @@ bool OperationGUI_PartitionDlg::execute( ObjectList& objects ) return res; } +//================================================================================= +// function : restoreSubShapes +// purpose : +//================================================================================= +void OperationGUI_PartitionDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject ) +{ + if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) { + // empty list of arguments means that all arguments should be restored + getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(), + /*theFindMethod=*/GEOM::FSM_GetInPlaceByHistory, + /*theInheritFirstArg=*/myListShapes.length() == 1 ); // ? false + } +} //======================================================================= //function : ComboTextChanged @@ -404,7 +418,6 @@ void OperationGUI_PartitionDlg::ComboTextChanged() //GroupPoints->PushButton4->setEnabled(IsEnabled); } - //================================================================================= // function : GetLimit() // purpose : diff --git a/src/OperationGUI/OperationGUI_PartitionDlg.h b/src/OperationGUI/OperationGUI_PartitionDlg.h index ee3cbdd23..adebfa87f 100644 --- a/src/OperationGUI/OperationGUI_PartitionDlg.h +++ b/src/OperationGUI/OperationGUI_PartitionDlg.h @@ -50,6 +50,7 @@ protected: virtual GEOM::GEOM_IOperations_ptr createOperation(); virtual bool isValid( QString& ); virtual bool execute( ObjectList& ); + virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr ); private: void Init(); diff --git a/src/RepairGUI/RepairGUI_GlueDlg.cxx b/src/RepairGUI/RepairGUI_GlueDlg.cxx index e39be96ad..12c2a2021 100644 --- a/src/RepairGUI/RepairGUI_GlueDlg.cxx +++ b/src/RepairGUI/RepairGUI_GlueDlg.cxx @@ -1,4 +1,4 @@ -// GEOM GEOMGUI : GUI for Geometry component +// GEOM RepairGUI : GUI for Geometry component // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -123,7 +123,7 @@ RepairGUI_GlueDlg::RepairGUI_GlueDlg( GeometryGUI* theGeometryGUI, QWidget* pare setHelpFileName( "glue_faces_operation_page.html" ); // Disable second way of gluing if OCC viewer is not active one - if ( SUIT_Session::session()->activeApplication()->desktop()->activeWindow()->getViewManager()->getType() + if ( myGeomGUI->getApp()->desktop()->activeWindow()->getViewManager()->getType() != OCCViewer_Viewer::Type() ) mainFrame()->RadioButton2->setEnabled( false ); @@ -154,6 +154,8 @@ void RepairGUI_GlueDlg::Init() //myGeomGUI->SetState( 0 ); //globalSelection( GEOM_COMPOUND ); + mainFrame()->GroupBoxPublish->show(); + /* signals and slots connections */ connect( buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect( buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply())); @@ -168,8 +170,8 @@ void RepairGUI_GlueDlg::Init() connect( myTolEdt2, SIGNAL( valueChanged( double ) ), this, SLOT( onTolerChanged( double ) ) ); connect( mySubShapesChk, SIGNAL( stateChanged( int ) ), this, SLOT( onSubShapesChk() ) ); - connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), + this, SLOT( SelectionIntoArgument() ) ); connect( myDetectBtn, SIGNAL( clicked() ), this, SLOT( onDetect() ) ); @@ -191,7 +193,7 @@ void RepairGUI_GlueDlg::ConstructorsClicked( int constructorId ) if ( myCurrConstrId == constructorId ) return; - disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), 0, this, 0 ); + disconnect( myGeomGUI->getApp()->selectionMgr(), 0, this, 0 ); switch ( constructorId ) { case 0: @@ -226,8 +228,8 @@ void RepairGUI_GlueDlg::ConstructorsClicked( int constructorId ) myEditCurrentArgument->setFocus(); - connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), + this, SLOT( SelectionIntoArgument() ) ); qApp->processEvents(); updateGeometry(); @@ -337,8 +339,8 @@ void RepairGUI_GlueDlg::LineEditReturnPressed() void RepairGUI_GlueDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); - connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), + this, SLOT( SelectionIntoArgument() ) ); //GroupPoints->LineEdit1->setText(""); //GroupPoints2->LineEdit1->setText(""); @@ -376,7 +378,15 @@ GEOM::GEOM_IOperations_ptr RepairGUI_GlueDlg::createOperation() //================================================================================= bool RepairGUI_GlueDlg::isValid( QString& ) { - return !myObject->_is_nil() && ( IsPreview() || myTolEdt->value() > 0. ); + double v = 0; + switch ( getConstructorId() ) + { + case 0: + v = myTolEdt->value(); break; + case 1: + v = myTolEdt2->value(); break; + } + return !myObject->_is_nil() && ( IsPreview() || v > 0. ); } //================================================================================= @@ -392,7 +402,7 @@ bool RepairGUI_GlueDlg::execute( ObjectList& objects ) case 0: { GEOM::GEOM_Object_var anObj = GEOM::GEOM_IShapesOperations::_narrow - ( getOperation() )->MakeGlueFaces( myObject, myTolEdt2->value(), true ); + ( getOperation() )->MakeGlueFaces( myObject, myTolEdt->value(), true ); aResult = !anObj->_is_nil(); if ( aResult ) objects.push_back( anObj._retn() ); @@ -452,6 +462,23 @@ bool RepairGUI_GlueDlg::execute( ObjectList& objects ) return aResult; } +//================================================================================= +// function : restoreSubShapes +// purpose : +//================================================================================= +void RepairGUI_GlueDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject ) +{ + if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) { + GEOM::find_shape_method aFindMethod = GEOM::FSM_GetInPlace; + if ( getConstructorId() == 0 ) // MakeGlueFaces + aFindMethod = GEOM::FSM_GetInPlaceByHistory; + + // empty list of arguments means that all arguments should be restored + getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(), + aFindMethod, /*theInheritFirstArg=*/true ); + } +} //================================================================ // Function : clearShapeBufferLocal @@ -517,7 +544,7 @@ bool RepairGUI_GlueDlg::onAcceptLocal() if ( openCommand() ) { SUIT_OverrideCursor wc; - SUIT_Session::session()->activeApplication()->putInfo( "" ); + myGeomGUI->getApp()->putInfo( "" ); ObjectList objects; if ( !execute( objects ) ) { @@ -527,27 +554,26 @@ bool RepairGUI_GlueDlg::onAcceptLocal() } else { const int nbObjs = objects.size(); - bool withChildren = false; for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it ) { - QString aName( "" ); + QString aName = getNewObjectName(); if ( nbObjs > 1 ) { - aName = getNewObjectName().length() ? GEOMBase::GetDefaultName( getNewObjectName() ) : GEOMBase::GetDefaultName( getPrefix( *it ) ); + if ( aName.isEmpty() ) + aName = getPrefix( *it ); + aName = GEOMBase::GetDefaultName( aName ); } else { - aName = getNewObjectName(); // PAL6521: use a prefix, if some dialog box doesn't reimplement getNewObjectName() if ( aName.isEmpty() ) aName = GEOMBase::GetDefaultName( getPrefix( *it ) ); } addInStudy( *it, aName.toLatin1().data() ); - withChildren = false; display( *it, false ); } if ( nbObjs ) { commitCommand(); updateObjBrowser(); - SUIT_Session::session()->activeApplication()->putInfo( tr( "GEOM_PRP_DONE" ) ); + myGeomGUI->getApp()->putInfo( QObject::tr("GEOM_PRP_DONE") ); } else { abortCommand(); @@ -591,6 +617,10 @@ void RepairGUI_GlueDlg::onDetect() return; } + buttonOk()->setEnabled( false ); + buttonApply()->setEnabled( false ); + globalSelection( GEOM_ALLSHAPES ); + GEOM::ListOfGO_var aList = GEOM::GEOM_IShapesOperations::_narrow ( getOperation() )->GetGlueFaces( myObject, myTolEdt2->value() ); @@ -605,8 +635,8 @@ void RepairGUI_GlueDlg::onDetect() msg = tr( "THERE_ARE_NO_FACES_FOR_GLUING" ); } - connect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), - SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) ) ; + connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), + this, SLOT( SelectionIntoArgument() ) ) ; SUIT_MessageBox::information( this, tr( "GEOM_FREE_BOUNDS_TLT" ), msg, tr( "Close" ) ); updateButtonState(); activateSelection(); @@ -623,15 +653,15 @@ void RepairGUI_GlueDlg::activateSelection() int anId = getConstructorId(); if ( anId == 0 ) { // Case of whole gluing - disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + disconnect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), + this, SLOT( SelectionIntoArgument() ) ); globalSelection( GEOM_ALLSHAPES ); if ( myObject->_is_nil()) SelectionIntoArgument(); - connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), + this, SLOT( SelectionIntoArgument() ) ); } else { // Second case of gluing @@ -639,11 +669,11 @@ void RepairGUI_GlueDlg::activateSelection() globalSelection( GEOM_ALLSHAPES ); else { displayPreview( true, false, false, 2/*line width*/, 1/*display mode*/, Quantity_NOC_RED ); - disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ) ; + disconnect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), + this, SLOT( SelectionIntoArgument() ) ) ; globalSelection( GEOM_PREVIEW ); - connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ) ; + connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), + this, SLOT( SelectionIntoArgument() ) ) ; } } updateViewer(); @@ -722,40 +752,3 @@ void RepairGUI_GlueDlg::ClickOnCancel() clearTemporary(); GEOMBase_Skeleton::ClickOnCancel(); } - -//================================================================ -// Function : getEntry -// Purpose : -//================================================================ -static std::string getEntry( GEOM::GEOM_Object_ptr object ) -{ - SUIT_Session* session = SUIT_Session::session(); - SalomeApp_Application* app = dynamic_cast( session->activeApplication() ); - if ( app ) { - std::string IOR = app->orb()->object_to_string( object ); - if ( IOR != "" ) { - SalomeApp_Study* study = ( SalomeApp_Study* )app->activeStudy(); - _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( IOR ) ); - if ( SO ) - return SO->GetID(); - } - } - return ""; -} - - - - - - - - - - - - - - - - - diff --git a/src/RepairGUI/RepairGUI_GlueDlg.h b/src/RepairGUI/RepairGUI_GlueDlg.h index 0333e9ca1..efdd034d2 100644 --- a/src/RepairGUI/RepairGUI_GlueDlg.h +++ b/src/RepairGUI/RepairGUI_GlueDlg.h @@ -50,6 +50,7 @@ protected: virtual GEOM::GEOM_IOperations_ptr createOperation(); virtual bool isValid( QString& ); virtual bool execute( ObjectList& ); + virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr ); private: void Init(); diff --git a/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx b/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx index a63feb0f2..2ec52ea0a 100644 --- a/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx +++ b/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx @@ -1,18 +1,26 @@ -// GEOM GEOMGUI : GUI for Geometry component -// -// 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 -// +// GEOM RepairGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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 // -// File : RepairGUI_RemoveExtraEdgesDlg.cxx -// Author : Michael Zorin, Open CASCADE S.A.S. +// File : RepairGUI_RemoveExtraEdgesDlg.cxx +// Author : Michael Zorin, Open CASCADE S.A.S. // #include "RepairGUI_RemoveExtraEdgesDlg.h" @@ -41,8 +49,9 @@ RepairGUI_RemoveExtraEdgesDlg::RepairGUI_RemoveExtraEdgesDlg( GeometryGUI* theGe bool modal ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal ) { - QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_REMOVE_EXTRA_EDGES" ) ) ); - QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); + SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr(); + QPixmap image0( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_REMOVE_EXTRA_EDGES" ) ) ); + QPixmap image1( aResMgr->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); setWindowTitle( tr( "GEOM_REMOVE_EXTRA_EDGES_TITLE" ) ); @@ -94,6 +103,8 @@ void RepairGUI_RemoveExtraEdgesDlg::Init() activateSelection(); + mainFrame()->GroupBoxPublish->show(); + /* signals and slots connections */ connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); @@ -101,8 +112,8 @@ void RepairGUI_RemoveExtraEdgesDlg::Init() connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); connect( GroupPoints->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); - connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), + this, SLOT( SelectionIntoArgument() ) ); initName( tr( "REMOVE_EXTRA_EDGES_NEW_OBJ_NAME" ) ); } @@ -132,6 +143,8 @@ bool RepairGUI_RemoveExtraEdgesDlg::ClickOnApply() myEditCurrentArgument->setText( "" ); myObject = GEOM::GEOM_Object::_nil(); + myOkObject = false; + activateSelection(); return true; @@ -206,8 +219,8 @@ void RepairGUI_RemoveExtraEdgesDlg::LineEditReturnPressed() void RepairGUI_RemoveExtraEdgesDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); - connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), + this, SLOT( SelectionIntoArgument() ) ); activateSelection(); } @@ -269,3 +282,18 @@ bool RepairGUI_RemoveExtraEdgesDlg::execute( ObjectList& objects ) return true; } + +//================================================================================= +// function : restoreSubShapes +// purpose : +//================================================================================= +void RepairGUI_RemoveExtraEdgesDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject ) +{ + if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) { + // empty list of arguments means that all arguments should be restored + getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(), + /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GetInPlaceByHistory + /*theInheritFirstArg=*/true ); + } +} diff --git a/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.h b/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.h index 927d2f050..355a61010 100644 --- a/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.h +++ b/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.h @@ -47,6 +47,7 @@ protected: virtual GEOM::GEOM_IOperations_ptr createOperation(); virtual bool isValid( QString& ); virtual bool execute( ObjectList& ); + virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr ); private: void Init(); diff --git a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx index 8fc57aa67..a9079259f 100644 --- a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx @@ -117,6 +117,8 @@ void TransformationGUI_MirrorDlg::Init() GroupPoints->CheckButton1->setChecked( true ); CreateCopyModeChanged( true ); + mainFrame()->GroupBoxPublish->show(); + /* signals and slots connections */ connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); @@ -384,14 +386,16 @@ bool TransformationGUI_MirrorDlg::execute( ObjectList& objects ) { if ( toCreateCopy ) { for ( int i = 0; i < myObjects.length(); i++ ) { - anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MirrorPointCopy( myObjects[i], myArgument ); + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )-> + MirrorPointCopy( myObjects[i], myArgument ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); } } else { for ( int i = 0; i < myObjects.length(); i++ ) { - anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MirrorPoint( myObjects[i], myArgument ); + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )-> + MirrorPoint( myObjects[i], myArgument ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); } @@ -403,14 +407,16 @@ bool TransformationGUI_MirrorDlg::execute( ObjectList& objects ) { if ( toCreateCopy ) { for ( int i = 0; i < myObjects.length(); i++ ) { - anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MirrorAxisCopy( myObjects[i], myArgument ); + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )-> + MirrorAxisCopy( myObjects[i], myArgument ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); } } else { for ( int i = 0; i < myObjects.length(); i++ ) { - anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MirrorAxis( myObjects[i], myArgument ); + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )-> + MirrorAxis( myObjects[i], myArgument ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); } @@ -442,6 +448,21 @@ bool TransformationGUI_MirrorDlg::execute( ObjectList& objects ) return res; } +//================================================================================= +// function : restoreSubShapes +// purpose : +//================================================================================= +void TransformationGUI_MirrorDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject ) +{ + if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) { + // empty list of arguments means that all arguments should be restored + getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(), + /*theFindMethod=*/GEOM::FSM_Transformed, + /*theInheritFirstArg=*/true ); + } +} + //================================================================================= // function : CreateCopyModeChanged() // purpose : diff --git a/src/TransformationGUI/TransformationGUI_MirrorDlg.h b/src/TransformationGUI/TransformationGUI_MirrorDlg.h index 25c00ce6a..b0b54111b 100644 --- a/src/TransformationGUI/TransformationGUI_MirrorDlg.h +++ b/src/TransformationGUI/TransformationGUI_MirrorDlg.h @@ -49,6 +49,7 @@ protected: virtual bool isValid( QString& ); virtual bool execute( ObjectList& ); virtual void addSubshapesToStudy(); + virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr ); private: void Init(); diff --git a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx index df76011a4..15f342d5a 100644 --- a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx @@ -112,6 +112,8 @@ void TransformationGUI_OffsetDlg::Init() GroupPoints->CheckButton1->setChecked( true ); CreateCopyModeChanged( true ); + mainFrame()->GroupBoxPublish->show(); + /* signals and slots connections */ connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); @@ -274,7 +276,6 @@ bool TransformationGUI_OffsetDlg::isValid( QString& msg ) return true; } - //================================================================================= // function : execute // purpose : @@ -305,6 +306,20 @@ bool TransformationGUI_OffsetDlg::execute( ObjectList& objects ) return res; } +//================================================================================= +// function : restoreSubShapes +// purpose : +//================================================================================= +void TransformationGUI_OffsetDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject ) +{ + if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) { + // empty list of arguments means that all arguments should be restored + getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(), + /*theFindMethod=*/GEOM::FSM_Transformed, + /*theInheritFirstArg=*/true ); + } +} //================================================================================= // function : GetOffset() @@ -315,7 +330,6 @@ double TransformationGUI_OffsetDlg::GetOffset() const return GroupPoints->SpinBox_DX->value(); } - //================================================================================= // function : CreateCopyModeChanged() // purpose : diff --git a/src/TransformationGUI/TransformationGUI_OffsetDlg.h b/src/TransformationGUI/TransformationGUI_OffsetDlg.h index 19d7120da..1df2865b4 100644 --- a/src/TransformationGUI/TransformationGUI_OffsetDlg.h +++ b/src/TransformationGUI/TransformationGUI_OffsetDlg.h @@ -48,6 +48,7 @@ protected: virtual GEOM::GEOM_IOperations_ptr createOperation(); virtual bool isValid( QString& ); virtual bool execute( ObjectList& ); + virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr ); private: void Init(); diff --git a/src/TransformationGUI/TransformationGUI_PositionDlg.cxx b/src/TransformationGUI/TransformationGUI_PositionDlg.cxx index 7eb472e13..69e759bdb 100644 --- a/src/TransformationGUI/TransformationGUI_PositionDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_PositionDlg.cxx @@ -119,6 +119,8 @@ void TransformationGUI_PositionDlg::Init() Group1->CheckBox1->setChecked( true ); CreateCopyModeChanged( true ); + mainFrame()->GroupBoxPublish->show(); + /* signals and slots connections */ connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); @@ -379,9 +381,11 @@ bool TransformationGUI_PositionDlg::execute( ObjectList& objects ) { for ( int i = 0; i < myObjects.length(); i++ ) { if ( toCreateCopy ) - anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->PositionShapeCopy( myObjects[i], myObjects[i], myEndLCS ); + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )-> + PositionShapeCopy( myObjects[i], myObjects[i], myEndLCS ); else - anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->PositionShape( myObjects[i], myObjects[i], myEndLCS ); + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )-> + PositionShape( myObjects[i], myObjects[i], myEndLCS ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); @@ -393,9 +397,11 @@ bool TransformationGUI_PositionDlg::execute( ObjectList& objects ) { for ( int i = 0; i < myObjects.length(); i++ ) { if ( toCreateCopy ) - anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->PositionShapeCopy( myObjects[i], myStartLCS, myEndLCS ); + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )-> + PositionShapeCopy( myObjects[i], myStartLCS, myEndLCS ); else - anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->PositionShape( myObjects[i], myStartLCS, myEndLCS ); + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )-> + PositionShape( myObjects[i], myStartLCS, myEndLCS ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); } @@ -407,6 +413,20 @@ bool TransformationGUI_PositionDlg::execute( ObjectList& objects ) return res; } +//================================================================================= +// function : restoreSubShapes +// purpose : +//================================================================================= +void TransformationGUI_PositionDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject ) +{ + if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) { + // empty list of arguments means that all arguments should be restored + getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(), + /*theFindMethod=*/GEOM::FSM_Transformed, + /*theInheritFirstArg=*/true ); + } +} //================================================================================= // function : CreateCopyModeChanged() diff --git a/src/TransformationGUI/TransformationGUI_PositionDlg.h b/src/TransformationGUI/TransformationGUI_PositionDlg.h index 6b817dc52..cdc4032ef 100644 --- a/src/TransformationGUI/TransformationGUI_PositionDlg.h +++ b/src/TransformationGUI/TransformationGUI_PositionDlg.h @@ -48,6 +48,7 @@ protected: virtual GEOM::GEOM_IOperations_ptr createOperation(); virtual bool isValid( QString& ); virtual bool execute( ObjectList& ); + virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr ); private: void Init(); diff --git a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx index f6927542d..4d21574cf 100644 --- a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx @@ -102,6 +102,8 @@ TransformationGUI_RotationDlg::TransformationGUI_RotationDlg GroupPoints->CheckButton1->setChecked( true ); CreateCopyModeChanged( true ); + mainFrame()->GroupBoxPublish->show(); + /* signals and slots connections */ connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); @@ -439,6 +441,7 @@ bool TransformationGUI_RotationDlg::execute( ObjectList& objects ) { if ( toCreateCopy ) { for ( int i = 0; i < myObjects.length(); i++ ) { + myCurrObject = myObjects[i]; anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateCopy( myObjects[i], myAxis, GetAngle() * PI180 ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); @@ -446,6 +449,7 @@ bool TransformationGUI_RotationDlg::execute( ObjectList& objects ) } else { for ( int i = 0; i < myObjects.length(); i++ ) { + myCurrObject = myObjects[i]; anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->Rotate( myObjects[i], myAxis, GetAngle() * PI180 ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); @@ -458,6 +462,7 @@ bool TransformationGUI_RotationDlg::execute( ObjectList& objects ) { if ( toCreateCopy ) { for ( int i = 0; i < myObjects.length(); i++ ) { + myCurrObject = myObjects[i]; anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateThreePointsCopy( myObjects[i], myCentPoint, myPoint1, myPoint2 ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); @@ -465,6 +470,7 @@ bool TransformationGUI_RotationDlg::execute( ObjectList& objects ) } else { for ( int i = 0; i < myObjects.length(); i++ ) { + myCurrObject = myObjects[i]; anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateThreePoints( myObjects[i], myCentPoint, myPoint1, myPoint2 ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); @@ -478,6 +484,25 @@ bool TransformationGUI_RotationDlg::execute( ObjectList& objects ) return res; } +//================================================================================= +// function : restoreSubShapes +// purpose : +//================================================================================= +void TransformationGUI_RotationDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject ) +{ + if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) { + // we pass here the first operation argument (object) through the list of arguments + // because the rotation operation place its arguments in the data structure in another order, + // and we need to point the first argument directly + GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO; + anArgs->length(1); + anArgs[0] = myCurrObject; + getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, anArgs, + /*theFindMethod=*/GEOM::FSM_Transformed, + /*theInheritFirstArg=*/true ); + } +} //================================================================================= // function : GetAngle() @@ -488,7 +513,6 @@ double TransformationGUI_RotationDlg::GetAngle() const return GroupPoints->SpinBox_DX->value(); } - //================================================================================= // function : CreateCopyModeChanged() // purpose : @@ -498,7 +522,6 @@ void TransformationGUI_RotationDlg::CreateCopyModeChanged( bool isCreateCopy ) mainFrame()->GroupBoxName->setEnabled( isCreateCopy ); } - //================================================================================= // function : onReverse() // purpose : diff --git a/src/TransformationGUI/TransformationGUI_RotationDlg.h b/src/TransformationGUI/TransformationGUI_RotationDlg.h index f9354c1af..720fc71bb 100644 --- a/src/TransformationGUI/TransformationGUI_RotationDlg.h +++ b/src/TransformationGUI/TransformationGUI_RotationDlg.h @@ -49,6 +49,7 @@ protected: virtual bool isValid( QString& ); virtual bool execute( ObjectList& ); virtual void addSubshapesToStudy(); + virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr ); private: void Init(); @@ -57,6 +58,7 @@ private: private: GEOM::ListOfGO myObjects; + GEOM::GEOM_Object_var myCurrObject; GEOM::GEOM_Object_var myAxis, myCentPoint, myPoint1, myPoint2; DlgRef_4Sel1Spin2Check* GroupPoints; diff --git a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx index 17cd22f53..03619339c 100644 --- a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -52,62 +53,110 @@ TransformationGUI_ScaleDlg::TransformationGUI_ScaleDlg( GeometryGUI* theGeometry bool modal, Qt::WindowFlags fl ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ) { - QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_SCALE" ) ) ); - QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); + SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr(); + QPixmap image1( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_SCALE" ) ) ); + QPixmap image2( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_SCALE_ALONG_AXES" ) ) ); + QPixmap image3( aResMgr->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); setWindowTitle( tr( "GEOM_SCALE_TITLE" ) ); - /***************************************************************/ + // Constructors mainFrame()->GroupConstructors->setTitle( tr( "GEOM_SCALE" ) ); - mainFrame()->RadioButton1->setIcon( image0 ); - mainFrame()->RadioButton2->setAttribute( Qt::WA_DeleteOnClose ); - mainFrame()->RadioButton2->close(); + mainFrame()->RadioButton1->setIcon( image1 ); + mainFrame()->RadioButton2->setIcon( image2 ); mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); mainFrame()->RadioButton3->close(); - GroupPoints = new DlgRef_2Sel1Spin2Check( centralWidget() ); - GroupPoints->CheckButton2->hide(); - GroupPoints->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) ); - GroupPoints->TextLabel1->setText( tr( "GEOM_OBJECTS" ) ); - GroupPoints->TextLabel2->setText( tr( "GEOM_CENTRAL_POINT" ) ); - GroupPoints->TextLabel3->setText( tr( "GEOM_SCALE_FACTOR" ) ); - GroupPoints->LineEdit1->setReadOnly( true ); - GroupPoints->LineEdit2->setReadOnly( true ); - GroupPoints->PushButton1->setIcon( image1 ); - GroupPoints->PushButton2->setIcon( image1 ); - GroupPoints->CheckButton1->setText( tr( "GEOM_CREATE_COPY" ) ); - - // san -- modification of an exisitng object by offset is not allowed - GroupPoints->CheckButton1->hide(); + // Own widgets + GroupBox1 = new QGroupBox( tr( "GEOM_ARGUMENTS" ), this ); + QGridLayout* OwnLayout = new QGridLayout( GroupBox1 ); + OwnLayout->setSpacing( 6 ); + OwnLayout->setMargin( 11 ); + + TextLabel1 = new QLabel( tr( "GEOM_OBJECTS" ), GroupBox1 ); + PushButton1 = new QPushButton( GroupBox1 ); + PushButton1->setIcon( image3 ); + PushButton1->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); + LineEdit1 = new QLineEdit( GroupBox1 ); + LineEdit1->setReadOnly( true ); + LineEdit1->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); + + TextLabel2 = new QLabel( tr( "GEOM_CENTRAL_POINT" ), GroupBox1 ); + PushButton2 = new QPushButton( GroupBox1 ); + PushButton2->setIcon( image3 ); + PushButton2->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); + LineEdit2 = new QLineEdit( GroupBox1 ); + LineEdit2->setReadOnly( true ); + LineEdit2->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); + + TextLabel3 = new QLabel( tr( "GEOM_SCALE_FACTOR" ), GroupBox1 ); + SpinBox_FX = new QtxDoubleSpinBox( GroupBox1 ); + + TextLabel4 = new QLabel( tr( "GEOM_SCALE_FACTOR_Y" ), GroupBox1 ); + SpinBox_FY = new QtxDoubleSpinBox( GroupBox1 ); + + TextLabel5 = new QLabel( tr( "GEOM_SCALE_FACTOR_Z" ), GroupBox1 ); + SpinBox_FZ = new QtxDoubleSpinBox( GroupBox1 ); + + CheckBoxCopy = new QCheckBox( tr( "GEOM_CREATE_COPY" ), GroupBox1 ); + CheckBoxCopy->setChecked( true ); + + // Layouting + OwnLayout->addWidget( TextLabel1, 0, 0 ); + OwnLayout->addWidget( PushButton1, 0, 1 ); + OwnLayout->addWidget( LineEdit1, 0, 2, 1, 2 ); + OwnLayout->addWidget( TextLabel2, 1, 0 ); + OwnLayout->addWidget( PushButton2, 1, 1 ); + OwnLayout->addWidget( LineEdit2, 1, 2, 1, 2 ); + OwnLayout->addWidget( TextLabel3, 2, 0 ); + OwnLayout->addWidget( SpinBox_FX, 2, 2 ); + OwnLayout->addWidget( TextLabel4, 3, 0 ); + OwnLayout->addWidget( SpinBox_FY, 3, 2 ); + OwnLayout->addWidget( TextLabel5, 4, 0 ); + OwnLayout->addWidget( SpinBox_FZ, 4, 2 ); + OwnLayout->addWidget( CheckBoxCopy, 5, 0, 1, 4 ); QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); layout->setMargin( 0 ); layout->setSpacing( 6 ); - layout->addWidget( GroupPoints ); + layout->addWidget( GroupBox1 ); - /***************************************************************/ + // Min, max, step and decimals for spin boxes & initial values double aFactor = 2.0; double SpecificStep = 0.5; - /* min, max, step and decimals for spin boxes & initial values */ - initSpinBox( GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, SpecificStep, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY - GroupPoints->SpinBox_DX->setValue( aFactor ); + initSpinBox( SpinBox_FX, COORD_MIN, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY ); + initSpinBox( SpinBox_FY, COORD_MIN, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY ); + initSpinBox( SpinBox_FZ, COORD_MIN, COORD_MAX, SpecificStep, DBL_DIGITS_DISPLAY ); + SpinBox_FX->setValue( aFactor ); + SpinBox_FY->setValue( aFactor ); + SpinBox_FZ->setValue( aFactor ); + + // Modification of an existing object by offset is not allowed + CheckBoxCopy->hide(); // Activate Create a Copy mode - GroupPoints->CheckButton1->setChecked( true ); CreateCopyModeChanged( true ); - /* signals and slots connections */ - connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); - connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); + // Allowed inheritance of children and visual properties by the scaling result + mainFrame()->GroupBoxPublish->show(); + + // Signals and slots connections + connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); + connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); + connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) ); + + connect( PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); + connect( PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); + + connect( LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); + connect( LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); - connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); - connect( GroupPoints->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); + connect( SpinBox_FX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); + connect( SpinBox_FY, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); + connect( SpinBox_FZ, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); - connect( GroupPoints->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); - connect( GroupPoints->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); - - connect( GroupPoints->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); - connect( GroupPoints->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( CreateCopyModeChanged( bool ) ) ); + + connect( CheckBoxCopy, SIGNAL( toggled( bool ) ), this, SLOT( CreateCopyModeChanged( bool ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); @@ -117,31 +166,64 @@ TransformationGUI_ScaleDlg::TransformationGUI_ScaleDlg( GeometryGUI* theGeometry Init(); } - //================================================================================= // function : ~TransformationGUI_ScaleDlg() // purpose : Destroys the object and frees any allocated resources //================================================================================= TransformationGUI_ScaleDlg::~TransformationGUI_ScaleDlg() { - /* no need to delete child widgets, Qt does it all for us */ } - //================================================================================= // function : Init() // purpose : //================================================================================= void TransformationGUI_ScaleDlg::Init() { - myEditCurrentArgument = GroupPoints->LineEdit1; - GroupPoints->LineEdit2->clear(); + myEditCurrentArgument = LineEdit1; + LineEdit2->clear(); myPoint = GEOM::GEOM_Object::_nil(); initName( tr( "GEOM_SCALE" ) ); + + ConstructorsClicked( 0 ); } +//================================================================================= +// function : ConstructorsClicked() +// purpose : Radio button management +//================================================================================= +void TransformationGUI_ScaleDlg::ConstructorsClicked( int constructorId ) +{ + erasePreview(); + + switch( constructorId ) + { + case 0: /* translation an object by dx, dy, dz */ + TextLabel3->setText( tr( "GEOM_SCALE_FACTOR" ) ); + TextLabel4->hide(); + TextLabel5->hide(); + SpinBox_FY->hide(); + SpinBox_FZ->hide(); + break; + case 1: /* translation an object by 2 points */ + TextLabel3->setText( tr( "GEOM_SCALE_FACTOR_X" ) ); + TextLabel4->show(); + TextLabel5->show(); + SpinBox_FY->show(); + SpinBox_FZ->show(); + break; + default: + break; + } + + qApp->processEvents(); + updateGeometry(); + resize( minimumSize() ); + + displayPreview(); +} //================================================================================= // function : ClickOnOk() @@ -153,33 +235,34 @@ void TransformationGUI_ScaleDlg::ClickOnOk() ClickOnCancel(); } - //================================================================================= // function : ClickOnApply() // purpose : //================================================================================= bool TransformationGUI_ScaleDlg::ClickOnApply() { - if ( !onAccept( GroupPoints->CheckButton1->isChecked() ) ) + if ( !onAccept( CheckBoxCopy->isChecked() ) ) return false; - Init(); + initName( tr( "GEOM_SCALE" ) ); return true; } - //================================================================================= // function : SelectionIntoArgument() // purpose : Called when selection as changed or other case //================================================================================= void TransformationGUI_ScaleDlg::SelectionIntoArgument() { + erasePreview(); myEditCurrentArgument->setText( "" ); QString aName; - if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) { + if ( myEditCurrentArgument == LineEdit1 ) + { int aNbSel = GEOMBase::GetNameOfSelectedIObjects( selectedIO(), aName ); - if ( aNbSel < 1 ) { + if ( aNbSel < 1 ) + { myObjects.length( 0 ); return; } @@ -187,56 +270,58 @@ void TransformationGUI_ScaleDlg::SelectionIntoArgument() if ( !myObjects.length() ) return; } - else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) { - if ( IObjectCount() != 1 ) { - myPoint = GEOM::GEOM_Object::_nil(); - return; - } - Standard_Boolean testResult = Standard_False; - GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult ); - aName = GEOMBase::GetName( aSelectedObject ); - - TopoDS_Shape aShape; - if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) { - LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr(); - TColStd_IndexedMapOfInteger aMap; - aSelMgr->GetIndexes( firstIObject(), aMap ); - if ( aMap.Extent() == 1 ) { - int anIndex = aMap( 1 ); - aName += QString( ":vertex_%1" ).arg( anIndex ); - - //Find SubShape Object in Father - GEOM::GEOM_Object_var aFindedObject = findObjectInFather( aSelectedObject, aName ); - - if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study - GEOM::GEOM_IShapesOperations_var aShapesOp = - getGeomEngine()->GetIShapesOperations( getStudyId() ); - aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); - aSelMgr->clearSelected(); - } - else { - aSelectedObject = aFindedObject; // get Object from study - } - } - else { - if ( aShape.ShapeType() != TopAbs_VERTEX ) { - aSelectedObject = GEOM::GEOM_Object::_nil(); - aName = ""; - } + else if ( myEditCurrentArgument == LineEdit2 ) + { + GEOM::GEOM_Object_var aSelectedObject = GEOM::GEOM_Object::_nil(); + if ( IObjectCount() == 1 ) + { + Standard_Boolean testResult = Standard_False; + aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult ); + if ( testResult ) + { + aName = GEOMBase::GetName( aSelectedObject ); + + TopoDS_Shape aShape; + if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) + { + LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr(); + TColStd_IndexedMapOfInteger aMap; + aSelMgr->GetIndexes( firstIObject(), aMap ); + if ( aMap.Extent() == 1 ) + { + int anIndex = aMap( 1 ); + aName += QString( ":vertex_%1" ).arg( anIndex ); + + //Find SubShape Object in Father + GEOM::GEOM_Object_var aFindedObject = findObjectInFather( aSelectedObject, aName ); + + if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study + GEOM::GEOM_IShapesOperations_var aShapesOp = + getGeomEngine()->GetIShapesOperations( getStudyId() ); + aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); + aSelMgr->clearSelected(); + } + else + aSelectedObject = aFindedObject; // get Object from study + } + else + { + if ( aShape.ShapeType() != TopAbs_VERTEX ) { + aSelectedObject = GEOM::GEOM_Object::_nil(); + aName = ""; + } + } + } } } - - myPoint = aSelectedObject; - if ( !testResult || CORBA::is_nil( myPoint ) ) - return; + myPoint = aSelectedObject; } + myEditCurrentArgument->setText( aName ); - displayPreview(); } - //================================================================================= // function : LineEditReturnPressed() // purpose : @@ -244,14 +329,13 @@ void TransformationGUI_ScaleDlg::SelectionIntoArgument() void TransformationGUI_ScaleDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if ( send == GroupPoints->LineEdit1 || - send == GroupPoints->LineEdit2 ) { + if ( send == LineEdit1 || send == LineEdit2 ) + { myEditCurrentArgument = send; GEOMBase_Skeleton::LineEditReturnPressed(); } } - //================================================================================= // function : SetEditCurrentArgument() // purpose : @@ -261,19 +345,18 @@ void TransformationGUI_ScaleDlg::SetEditCurrentArgument() QPushButton* send = (QPushButton*)sender(); globalSelection(); - if ( send == GroupPoints->PushButton1 ) { - myEditCurrentArgument = GroupPoints->LineEdit1; + if ( send == PushButton1 ) { + myEditCurrentArgument = LineEdit1; } - else if ( send == GroupPoints->PushButton2 ) { - myEditCurrentArgument = GroupPoints->LineEdit2; - localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); + else if ( send == PushButton2 ) { + myEditCurrentArgument = LineEdit2; + localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX); } myEditCurrentArgument->setFocus(); SelectionIntoArgument(); } - //================================================================================= // function : ActivateThisDialog() // purpose : @@ -281,14 +364,15 @@ void TransformationGUI_ScaleDlg::SetEditCurrentArgument() void TransformationGUI_ScaleDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); - connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), + this, SLOT( SelectionIntoArgument() ) ); globalSelection(); - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; + myEditCurrentArgument->setFocus(); + if ( myEditCurrentArgument == LineEdit2 ) { + localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); + } } - //================================================================================= // function : enterEvent() // purpose : @@ -299,7 +383,6 @@ void TransformationGUI_ScaleDlg::enterEvent( QEvent* ) ActivateThisDialog(); } - //================================================================================= // function : ValueChangedInSpinBox() // purpose : @@ -315,10 +398,11 @@ void TransformationGUI_ScaleDlg::ValueChangedInSpinBox() //================================================================================= void TransformationGUI_ScaleDlg::SetDoubleSpinBoxStep( double step ) { - GroupPoints->SpinBox_DX->setSingleStep(step); + SpinBox_FX->setSingleStep( step ); + SpinBox_FY->setSingleStep( step ); + SpinBox_FZ->setSingleStep( step ); } - //================================================================================= // function : createOperation // purpose : @@ -334,67 +418,125 @@ GEOM::GEOM_IOperations_ptr TransformationGUI_ScaleDlg::createOperation() //================================================================================= bool TransformationGUI_ScaleDlg::isValid( QString& /*msg*/) { - return !( myObjects.length() == 0 || myPoint->_is_nil() || fabs( GetFactor()) <= 0.00001 ); + if ( myObjects.length() > 0 && fabs( SpinBox_FX->value() ) > 0.00001 ) + { + // && !myPoint->_is_nil() + if ( getConstructorId() == 0 ) + return true; + if ( fabs( SpinBox_FY->value() ) > 0.00001 && + fabs( SpinBox_FZ->value() ) > 0.00001 ) + return true; + } + return false; } - //================================================================================= // function : execute // purpose : //================================================================================= bool TransformationGUI_ScaleDlg::execute( ObjectList& objects ) { + bool toCreateCopy = IsPreview() || CheckBoxCopy->isChecked(); + GEOM::GEOM_Object_var anObj; - if ( GroupPoints->CheckButton1->isChecked() || IsPreview() ) { - for ( int i = 0; i < myObjects.length(); i++ ) { - anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->ScaleShapeCopy( myObjects[i], myPoint, GetFactor() ); - if ( !anObj->_is_nil() ) - objects.push_back( anObj._retn() ); + switch ( getConstructorId() ) + { + case 0: + { + if ( toCreateCopy ) + { + for ( int i = 0; i < myObjects.length(); i++ ) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )-> + ScaleShapeCopy( myObjects[i], myPoint, SpinBox_FX->value() ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + } + else + { + for ( int i = 0; i < myObjects.length(); i++ ) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )-> + ScaleShape( myObjects[i], myPoint, SpinBox_FX->value() ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + } } - } - else { - for ( int i = 0; i < myObjects.length(); i++ ) { - anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->ScaleShape( myObjects[i], myPoint, GetFactor() ); - if ( !anObj->_is_nil() ) - objects.push_back( anObj._retn() ); + break; + case 1: + { + if ( toCreateCopy ) + { + for ( int i = 0; i < myObjects.length(); i++ ) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )-> + ScaleShapeAlongAxesCopy( myObjects[i], myPoint, SpinBox_FX->value(), + SpinBox_FY->value(), SpinBox_FZ->value() ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + } + else + { + for ( int i = 0; i < myObjects.length(); i++ ) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )-> + ScaleShapeAlongAxes( myObjects[i], myPoint, SpinBox_FX->value(), + SpinBox_FY->value(), SpinBox_FZ->value() ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + } } + break; + default: + break; } + return true; } - //================================================================================= -// function : GetFactor() +// function : restoreSubShapes // purpose : //================================================================================= -double TransformationGUI_ScaleDlg::GetFactor() const +void TransformationGUI_ScaleDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject ) { - return GroupPoints->SpinBox_DX->value(); + if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) { + // empty list of arguments means that all arguments should be restored + getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(), + /*theFindMethod=*/GEOM::FSM_Transformed, + /*theInheritFirstArg=*/true ); + } } - //================================================================================= // function : CreateCopyModeChanged() // purpose : //================================================================================= void TransformationGUI_ScaleDlg::CreateCopyModeChanged( bool isCreateCopy ) { - mainFrame()->GroupBoxName->setEnabled(isCreateCopy); + mainFrame()->GroupBoxName->setEnabled( isCreateCopy ); } //================================================================================= -// function : addSubshapeToStudy +// function : addSubshapesToStudy // purpose : virtual method to add new SubObjects if local selection //================================================================================= void TransformationGUI_ScaleDlg::addSubshapesToStudy() { - bool toCreateCopy = IsPreview() || GroupPoints->CheckButton1->isChecked(); - if ( toCreateCopy ) { - QMap objMap; - - objMap[GroupPoints->LineEdit2->text()] = myPoint; - - addSubshapesToFather( objMap ); + bool toCreateCopy = IsPreview() || CheckBoxCopy->isChecked(); + if ( toCreateCopy ) + { + if ( !myPoint->_is_nil() ) + { + QMap objMap; + objMap[LineEdit2->text()] = myPoint; + addSubshapesToFather( objMap ); + } } } diff --git a/src/TransformationGUI/TransformationGUI_ScaleDlg.h b/src/TransformationGUI/TransformationGUI_ScaleDlg.h index 4afaa8812..d11109106 100644 --- a/src/TransformationGUI/TransformationGUI_ScaleDlg.h +++ b/src/TransformationGUI/TransformationGUI_ScaleDlg.h @@ -30,8 +30,13 @@ #include -class DlgRef_2Sel1Spin2Check; - +class QCheckBox; +class QGroupBox; +class QLabel; +class QLineEdit; +class QPushButton; +class QtxDoubleSpinBox; + //================================================================================= // class : TransformationGUI_ScaleDlg // purpose : @@ -51,17 +56,30 @@ protected: virtual bool isValid( QString& ); virtual bool execute( ObjectList& ); virtual void addSubshapesToStudy(); + virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr ); private: void Init(); void enterEvent( QEvent* ); - double GetFactor() const; private: GEOM::ListOfGO myObjects; GEOM::GEOM_Object_var myPoint; /* Central Point */ - DlgRef_2Sel1Spin2Check* GroupPoints; + QGroupBox* GroupBox1; + QLabel* TextLabel1; + QLabel* TextLabel2; + QPushButton* PushButton1; + QPushButton* PushButton2; + QLineEdit* LineEdit1; + QLineEdit* LineEdit2; + QLabel* TextLabel3; + QLabel* TextLabel4; + QLabel* TextLabel5; + QtxDoubleSpinBox* SpinBox_FX; + QtxDoubleSpinBox* SpinBox_FY; + QtxDoubleSpinBox* SpinBox_FZ; + QCheckBox* CheckBoxCopy; private slots: void ClickOnOk(); @@ -70,6 +88,7 @@ private slots: void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); + void ConstructorsClicked( int ); void ValueChangedInSpinBox(); void CreateCopyModeChanged( bool ); void SetDoubleSpinBoxStep( double ); diff --git a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx index 4465fbdda..2ba0131c5 100644 --- a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx @@ -69,7 +69,7 @@ TransformationGUI_TranslationDlg::TransformationGUI_TranslationDlg mainFrame()->RadioButton3->setIcon( image2 ); mainFrame()->RadioButton1->setChecked( true ); - GroupPoints = new DlgRef_3Sel3Spin1Check( centralWidget() ); + GroupPoints = new DlgRef_3Sel3Spin2Check( centralWidget() ); GroupPoints->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) ); GroupPoints->TextLabel1->setText( tr( "GEOM_OBJECTS" ) ); GroupPoints->TextLabel3->setText( tr( "GEOM_POINT_I" ).arg( 2 ) ); @@ -79,7 +79,8 @@ TransformationGUI_TranslationDlg::TransformationGUI_TranslationDlg GroupPoints->PushButton1->setIcon( image3 ); GroupPoints->PushButton2->setIcon( image3 ); GroupPoints->PushButton3->setIcon( image3 ); - GroupPoints->CheckBox1->setText( tr( "GEOM_CREATE_COPY" ) ); + GroupPoints->CheckBox1->setText( tr( "Activate Distance" ) ); + GroupPoints->CheckBox2->setText( tr( "GEOM_CREATE_COPY" ) ); QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); layout->setMargin( 0 ); layout->setSpacing( 6 ); @@ -117,9 +118,11 @@ void TransformationGUI_TranslationDlg::Init() myVector = myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil(); // Activate Create a Copy mode - GroupPoints->CheckBox1->setChecked( true ); + GroupPoints->CheckBox2->setChecked( true ); CreateCopyModeChanged( true ); + mainFrame()->GroupBoxPublish->show(); + /* Get setting of step value from file configuration */ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 ); @@ -151,7 +154,8 @@ void TransformationGUI_TranslationDlg::Init() connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); - connect( GroupPoints->CheckBox1, SIGNAL( toggled( bool ) ), this, SLOT( CreateCopyModeChanged( bool ) ) ); + connect( GroupPoints->CheckBox1, SIGNAL( toggled( bool ) ), this, SLOT( ActivateDistanceChanged( bool ) ) ); + connect( GroupPoints->CheckBox2, SIGNAL( toggled( bool ) ), this, SLOT( CreateCopyModeChanged( bool ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); @@ -190,25 +194,37 @@ void TransformationGUI_TranslationDlg::ConstructorsClicked( int constructorId ) { GroupPoints->ShowRows( 1, 2, false ); GroupPoints->ShowRows( 3, 5, true ); + GroupPoints->TextLabel6->setText( tr( "GEOM_DZ" ) ); + GroupPoints->CheckBox1->hide(); + GroupPoints->SpinBox3->setEnabled( true ); break; } case 1: /* translation an object by 2 points */ { GroupPoints->ShowRows( 3, 5, false ); GroupPoints->ShowRows( 0, 2, true ); + GroupPoints->CheckBox1->hide(); + GroupPoints->TextLabel6->setText( tr( "GEOM_DZ" ) ); GroupPoints->TextLabel2->setText( tr( "GEOM_POINT_I" ).arg( 1 ) ); GroupPoints->LineEdit2->clear(); GroupPoints->LineEdit3->clear(); + GroupPoints->SpinBox3->setEnabled( true ); myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil(); break; } case 2: /* translation an object by vector */ { - GroupPoints->ShowRows( 2, 5, false ); GroupPoints->ShowRows( 0, 1, true ); + GroupPoints->ShowRows( 2, 4, false ); + GroupPoints->ShowRows( 5, 5, true ); + GroupPoints->CheckBox1->show(); + GroupPoints->TextLabel6->setText( tr( "GEOM_DISTANCE" ) ); + GroupPoints->SpinBox3->setValue( 0.0 ); + GroupPoints->SpinBox3->setEnabled( false ); GroupPoints->TextLabel2->setText( tr( "GEOM_VECTOR" ) ); GroupPoints->LineEdit2->clear(); myVector = GEOM::GEOM_Object::_nil(); + ActivateDistanceChanged( GroupPoints->CheckBox1->isChecked() ); break; } } @@ -240,7 +256,7 @@ void TransformationGUI_TranslationDlg::ClickOnOk() //================================================================================= bool TransformationGUI_TranslationDlg::ClickOnApply() { - if ( !onAccept(GroupPoints->CheckBox1->isChecked()) ) + if ( !onAccept(GroupPoints->CheckBox2->isChecked()) ) return false; initName(); @@ -288,38 +304,40 @@ void TransformationGUI_TranslationDlg::SelectionIntoArgument() TopoDS_Shape aShape; aName = GEOMBase::GetName( aSelectedObject ); - if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) { + if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) + { TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX; if ( myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 2 ) - aNeedType = TopAbs_EDGE; - + aNeedType = TopAbs_EDGE; + LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr(); TColStd_IndexedMapOfInteger aMap; aSelMgr->GetIndexes( firstIObject(), aMap ); - if ( aMap.Extent() == 1 ) { - int anIndex = aMap( 1 ); - if ( aNeedType == TopAbs_EDGE ) - aName += QString( ":edge_%1" ).arg( anIndex ); - else - aName += QString( ":vertex_%1" ).arg( anIndex ); - - //Find SubShape Object in Father - GEOM::GEOM_Object_var aFindedObject = findObjectInFather( aSelectedObject, aName ); + if ( aMap.Extent() == 1 ) + { + int anIndex = aMap( 1 ); + if ( aNeedType == TopAbs_EDGE ) + aName += QString( ":edge_%1" ).arg( anIndex ); + else + aName += QString( ":vertex_%1" ).arg( anIndex ); + + //Find SubShape Object in Father + GEOM::GEOM_Object_var aFindedObject = findObjectInFather( aSelectedObject, aName ); - if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study - GEOM::GEOM_IShapesOperations_var aShapesOp = - getGeomEngine()->GetIShapesOperations( getStudyId() ); - aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); - } - else { - aSelectedObject = aFindedObject; - } - } - else { // Global Selection + if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study + GEOM::GEOM_IShapesOperations_var aShapesOp = + getGeomEngine()->GetIShapesOperations( getStudyId() ); + aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); + } + else + aSelectedObject = aFindedObject; + } + else // Global Selection + { if ( aShape.ShapeType() != aNeedType ) { - aSelectedObject = GEOM::GEOM_Object::_nil(); - aName = ""; - } + aSelectedObject = GEOM::GEOM_Object::_nil(); + aName = ""; + } } } @@ -436,17 +454,23 @@ bool TransformationGUI_TranslationDlg::isValid( QString& /*msg*/ ) switch ( aConstructorId ) { case 0: - return !( myObjects.length() == 0 ); - break; + { + Handle(SALOME_InteractiveObject) IO = firstIObject(); + Standard_Boolean testResult; + GEOM::GEOM_Object_var anObject = GEOMBase::ConvertIOinGEOMObject( IO, testResult ); + if ( !testResult || anObject->_is_nil() ) + return false; + + return !( myObjects.length() == 0 ); + } case 1: return !( myObjects.length() == 0 || myPoint1->_is_nil() || myPoint2->_is_nil() ); - break; case 2: return !( myObjects.length() == 0 || myVector->_is_nil() ); - break; default: - return false; + break; } + return false; } //================================================================================= @@ -456,7 +480,7 @@ bool TransformationGUI_TranslationDlg::isValid( QString& /*msg*/ ) bool TransformationGUI_TranslationDlg::execute( ObjectList& objects ) { bool res = false; - bool toCreateCopy = IsPreview() || GroupPoints->CheckBox1->isChecked(); + bool toCreateCopy = IsPreview() || GroupPoints->CheckBox2->isChecked(); GEOM::GEOM_Object_var anObj; @@ -469,6 +493,7 @@ bool TransformationGUI_TranslationDlg::execute( ObjectList& objects ) if ( toCreateCopy ) { for ( int i = 0; i < myObjects.length(); i++ ) { + myCurrObject = myObjects[i]; anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->TranslateDXDYDZCopy( myObjects[i], dx, dy, dz ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); @@ -476,6 +501,7 @@ bool TransformationGUI_TranslationDlg::execute( ObjectList& objects ) } else { for ( int i = 0; i < myObjects.length(); i++ ) { + myCurrObject = myObjects[i]; anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->TranslateDXDYDZ( myObjects[i], dx, dy, dz ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); @@ -488,6 +514,7 @@ bool TransformationGUI_TranslationDlg::execute( ObjectList& objects ) { if ( toCreateCopy ) { for ( int i = 0; i < myObjects.length(); i++ ) { + myCurrObject = myObjects[i]; anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->TranslateTwoPointsCopy( myObjects[i], myPoint1, myPoint2 ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); @@ -495,6 +522,7 @@ bool TransformationGUI_TranslationDlg::execute( ObjectList& objects ) } else { for ( int i = 0; i < myObjects.length(); i++ ) { + myCurrObject = myObjects[i]; anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->TranslateTwoPoints( myObjects[i], myPoint1, myPoint2 ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); @@ -505,28 +533,64 @@ bool TransformationGUI_TranslationDlg::execute( ObjectList& objects ) } case 2: { - if ( toCreateCopy ) { + bool byDistance = GroupPoints->CheckBox1->isChecked(); + if ( byDistance ) { + double aDistance = GroupPoints->SpinBox3->value(); for ( int i = 0; i < myObjects.length(); i++ ) { - anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->TranslateVectorCopy( myObjects[i], myVector ); + myCurrObject = myObjects[i]; + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )-> + TranslateVectorDistance( myObjects[i], myVector, aDistance, toCreateCopy ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); } } else { - for ( int i = 0; i < myObjects.length(); i++ ) { - anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->TranslateVector( myObjects[i], myVector ); - if ( !anObj->_is_nil() ) - objects.push_back( anObj._retn() ); + if ( toCreateCopy ) { + for ( int i = 0; i < myObjects.length(); i++ ) { + myCurrObject = myObjects[i]; + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )-> + TranslateVectorCopy( myObjects[i], myVector ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + } + } + else { + for (int i = 0; i < myObjects.length(); i++) { + myCurrObject = myObjects[i]; + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )-> + TranslateVector( myObjects[i], myVector ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } } } res = true; break; } } - return res; } +//================================================================================= +// function : restoreSubShapes +// purpose : +//================================================================================= +void TransformationGUI_TranslationDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject ) +{ + if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) { + // we pass here the first operation argument (object) through the list of arguments + // because the rotation operation place its arguments in the data structure in another order, + // and we need to point the first argument directly + GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO; + anArgs->length( 1); + anArgs[0] = myCurrObject; + getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, anArgs, + /*theFindMethod=*/GEOM::FSM_Transformed, + /*theInheritFirstArg=*/true ); + } +} //================================================================================= // function : CreateCopyModeChanged() @@ -537,13 +601,23 @@ void TransformationGUI_TranslationDlg::CreateCopyModeChanged( bool isCreateCopy mainFrame()->GroupBoxName->setEnabled( isCreateCopy ); } +//================================================================================= +// function : ActivateDistanceChanged() +// purpose : +//================================================================================= +void TransformationGUI_TranslationDlg::ActivateDistanceChanged( bool theEnable ) +{ + GroupPoints->SpinBox3->setEnabled( theEnable ); + displayPreview(); +} + //================================================================================= // function : addSubshapeToStudy // purpose : virtual method to add new SubObjects if local selection //================================================================================= void TransformationGUI_TranslationDlg::addSubshapesToStudy() { - bool toCreateCopy = IsPreview() || GroupPoints->CheckBox1->isChecked(); + bool toCreateCopy = IsPreview() || GroupPoints->CheckBox2->isChecked(); if ( toCreateCopy ) { QMap objMap; diff --git a/src/TransformationGUI/TransformationGUI_TranslationDlg.h b/src/TransformationGUI/TransformationGUI_TranslationDlg.h index e08abe219..34986bb35 100644 --- a/src/TransformationGUI/TransformationGUI_TranslationDlg.h +++ b/src/TransformationGUI/TransformationGUI_TranslationDlg.h @@ -28,7 +28,7 @@ #include -class DlgRef_3Sel3Spin1Check; +class DlgRef_3Sel3Spin2Check; //================================================================================= // class : TransformationGUI_TranslationDlg @@ -49,16 +49,19 @@ protected: virtual bool isValid( QString& ); virtual bool execute( ObjectList& ); virtual void addSubshapesToStudy(); + virtual void restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr ); private: void Init(); void enterEvent( QEvent* ); private: - GEOM::GEOM_Object_var myVector, myPoint1, myPoint2; GEOM::ListOfGO myObjects; + GEOM::GEOM_Object_var myCurrObject; + GEOM::GEOM_Object_var myVector, myPoint1, myPoint2; + double myTranslateDistance; - DlgRef_3Sel3Spin1Check* GroupPoints; + DlgRef_3Sel3Spin2Check* GroupPoints; private slots: void ClickOnOk(); @@ -71,6 +74,7 @@ private slots: void ValueChangedInSpinBox(); void CreateCopyModeChanged( bool ); void SetDoubleSpinBoxStep( double ); + void ActivateDistanceChanged( bool ); }; #endif // TRANSFORMATIONGUI_TRANSLATIONDLG_H