From aab55c4f104405b4539e5a96f07f89bffb8201db Mon Sep 17 00:00:00 2001 From: inv Date: Fri, 24 Dec 2010 08:16:18 +0000 Subject: [PATCH] Merge from V6_2_BR 23/12/2010 --- Makefile.am | 2 +- configure.ac | 4 + doc/docutils/Makefile.am | 7 +- doc/docutils/{conf.py => conf.py.in} | 4 +- doc/salome/gui/GEOM/Makefile.am | 4 +- .../gui/GEOM/input/common_operation.doc | 22 +- doc/salome/gui/GEOM/input/cut_operation.doc | 22 +- doc/salome/gui/GEOM/input/fuse_operation.doc | 22 +- doc/salome/gui/GEOM/input/index.doc | 2 + doc/salome/gui/GEOM/input/partition.doc | 6 + doc/salome/gui/GEOM/input/related_docs.doc | 10 + .../gui/GEOM/input/section_operation.doc | 22 +- .../gui/GEOM/input/tui_measurement_tools.doc | 14 + .../GEOM/input/using_boolean_operations.doc | 10 +- doc/salome/gui/GEOM/static/SALOME_BOA_PA.pdf | Bin 0 -> 2801689 bytes idl/GEOM_Gen.idl | 30 +- src/GEOMAlgo/GEOMAlgo_BuilderSolid.cxx | 178 +++++++--- src/GEOMAlgo/GEOMAlgo_Builder_1.cxx | 19 +- src/GEOMAlgo/GEOMAlgo_Builder_2.cxx | 99 +++--- src/GEOMAlgo/GEOMAlgo_Builder_3.cxx | 123 +++---- src/GEOMAlgo/GEOMAlgo_ShapeSet.cdl | 9 +- src/GEOMAlgo/GEOMAlgo_ShapeSet.cxx | 52 +-- src/GEOMAlgo/GEOMAlgo_ShapeSet.hxx | 99 +++--- src/GEOMAlgo/GEOMAlgo_Tools3D.cxx | 126 +++---- src/GEOMClient/GEOM_Client.cxx | 67 ++-- src/GEOMClient/GEOM_Client.hxx | 55 +-- src/GEOMGUI/GEOMGUI_Selection.cxx | 17 +- src/GEOMGUI/GEOM_Displayer.cxx | 47 ++- src/GEOMGUI/GEOM_msg_en.ts | 21 +- src/GEOMGUI/GEOM_msg_fr.ts | 79 ++++- src/GEOMImpl/GEOMImpl_IRotate.hxx | 31 +- src/GEOMImpl/GEOMImpl_IShapesOperations.cxx | 47 ++- .../GEOMImpl_ITransformOperations.cxx | 314 +++++++++++++++++- .../GEOMImpl_ITransformOperations.hxx | 17 +- src/GEOMImpl/GEOMImpl_RotateDriver.cxx | 56 ++-- src/GEOMImpl/GEOMImpl_TranslateDriver.cxx | 8 +- src/GEOM_I/GEOM_Gen_i.cc | 121 ++++++- src/GEOM_I/GEOM_ITransformOperations_i.cc | 32 +- src/GEOM_I/GEOM_ITransformOperations_i.hh | 21 +- src/GEOM_I/GEOM_Object_i.cc | 21 +- src/GEOM_I/GEOM_Object_i.hh | 2 + src/GEOM_SWIG/GEOM_TestMeasures.py | 11 + src/GEOM_SWIG/GEOM_TestOthers.py | 6 +- src/GEOM_SWIG/geompyDC.py | 64 +++- src/OBJECT/GEOM_AISShape.cxx | 5 + src/OCC2VTK/GEOM_EdgeSource.cxx | 11 +- src/OCC2VTK/GEOM_EdgeSource.h | 2 +- .../OperationGUI_GetSharedShapesDlg.cxx | 36 +- .../OperationGUI_GetSharedShapesDlg.h | 2 +- .../OperationGUI_PartitionDlg.cxx | 4 +- .../TransformationGUI_MultiRotationDlg.cxx | 15 +- .../TransformationGUI_MultiTranslationDlg.cxx | 35 +- 52 files changed, 1443 insertions(+), 590 deletions(-) rename doc/docutils/{conf.py => conf.py.in} (99%) create mode 100644 doc/salome/gui/GEOM/input/related_docs.doc create mode 100755 doc/salome/gui/GEOM/static/SALOME_BOA_PA.pdf diff --git a/Makefile.am b/Makefile.am index ce1de12db..7805363de 100644 --- a/Makefile.am +++ b/Makefile.am @@ -37,7 +37,7 @@ SUBDIRS = idl adm_local resources src doc bin DIST_SUBDIRS = idl adm_local resources src doc bin -DISTCLEANFILES = a.out aclocal.m4 configure local-install.sh +DISTCLEANFILES = a.out aclocal.m4 configure local-install.sh hack_libtool salomeinclude_DATA = GEOM_version.h diff --git a/configure.ac b/configure.ac index e2c9c42d2..576198231 100644 --- a/configure.ac +++ b/configure.ac @@ -389,6 +389,9 @@ sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\ $(pwd)/hack_libtool \1 \"\$[@]\" \n\ }\n\ CC=\"hack_libtool\"%g" libtool +sed -i "s%\(\s*\)for searchdir in \$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path; do%\1searchdirs=\"\$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path\"\n\1for searchdir in \$searchdirs; do%g" libtool +sed -i "s%\(\s*\)searchdirs=\"\$newlib_search_path \$lib_search_path \(.*\)\"%\1searchdirs=\"\$newlib_search_path \$lib_search_path\"\n\1sss_beg=\"\"\n\1sss_end=\"\2\"%g" libtool +sed -i "s%\(\s*\)\(for searchdir in \$searchdirs; do\)%\1for sss in \$searchdirs; do\n\1 if ! test -d \$sss; then continue; fi\n\1 ssss=\$(cd \$sss; pwd)\n\1 if test \"\$ssss\" != \"\" \&\& test -d \$ssss; then\n\1 case \$ssss in\n\1 /usr/lib | /usr/lib64 ) ;;\n\1 * ) sss_beg=\"\$sss_beg \$ssss\" ;;\n\1 esac\n\1 fi\n\1done\n\1searchdirs=\"\$sss_beg \$sss_end\"\n\1\2%g" libtool ],[]) # This list is initiated using autoscan and must be updated manually @@ -405,6 +408,7 @@ AC_OUTPUT([ \ GEOM_version.h \ doc/Makefile \ doc/docutils/Makefile \ + doc/docutils/conf.py \ doc/salome/Makefile \ doc/salome/gui/Makefile \ doc/salome/gui/GEOM/Makefile \ diff --git a/doc/docutils/Makefile.am b/doc/docutils/Makefile.am index 9b16cc04d..8a744e388 100644 --- a/doc/docutils/Makefile.am +++ b/doc/docutils/Makefile.am @@ -49,7 +49,7 @@ htm: mkdir -p html doctrees PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH} \ LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} \ - $(SPHINXBUILD) -W -b html $(ALLSPHINXOPTS) html + $(SPHINXBUILD) -c $(top_builddir)/doc/docutils -W -b html $(ALLSPHINXOPTS) html @echo @echo "Build finished. The HTML pages are in html." @@ -57,7 +57,7 @@ latex: mkdir -p latex doctrees PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH} \ LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} \ - $(SPHINXBUILD) -W -b latex $(ALLSPHINXOPTS) latex + $(SPHINXBUILD) -c $(top_builddir)/doc/docutils -W -b latex $(ALLSPHINXOPTS) latex @echo @echo "Build finished; the LaTeX files are in latex." @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ @@ -73,9 +73,6 @@ RSTFILES= \ EXTRA_DIST+= $(RSTFILES) -EXTRA_DIST+= \ - conf.py - install-data-local: html/index.html test -z $(pydocdir) || mkdir -p $(DESTDIR)$(pydocdir) if test -d "html"; then b=; else b="$(srcdir)/"; fi; \ diff --git a/doc/docutils/conf.py b/doc/docutils/conf.py.in similarity index 99% rename from doc/docutils/conf.py rename to doc/docutils/conf.py.in index c7e2c6e76..da8e3e23c 100644 --- a/doc/docutils/conf.py +++ b/doc/docutils/conf.py.in @@ -54,9 +54,9 @@ copyright = '2010 EDF R&D' # built documents. # # The short X.Y version. -version = '6.2.0' +version = '@VERSION@' # The full version, including alpha/beta/rc tags. -release = '6.2.0' +release = '@VERSION@' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/doc/salome/gui/GEOM/Makefile.am b/doc/salome/gui/GEOM/Makefile.am index 9740ec3ec..73f4f232d 100755 --- a/doc/salome/gui/GEOM/Makefile.am +++ b/doc/salome/gui/GEOM/Makefile.am @@ -24,10 +24,10 @@ # include $(top_srcdir)/adm_local/unix/make_common_starter.am -EXTRA_DIST += images input static/footer.html static/doxygen.css +EXTRA_DIST += images input static/footer.html static/doxygen.css static/SALOME_BOA_PA.pdf guidocdir = $(docdir)/gui/GEOM -guidoc_DATA = images/head.png +guidoc_DATA = images/head.png static/SALOME_BOA_PA.pdf usr_docs: doxyfile_tui doxyfile_py doxyfile echo "===========================================" ; \ diff --git a/doc/salome/gui/GEOM/input/common_operation.doc b/doc/salome/gui/GEOM/input/common_operation.doc index dfefce0df..15a3607ff 100644 --- a/doc/salome/gui/GEOM/input/common_operation.doc +++ b/doc/salome/gui/GEOM/input/common_operation.doc @@ -2,19 +2,25 @@ \page common_operation_page Common -\n To produce a \b Common operation in the Main Menu select Operations - > Boolean - > Common +For detail description of the Boolean operations please refer to +this document. +It provides a general review of the Partition and Boolean +operations algorithms, describes the usage methodology and highlighs +major limitations of these operations. -\n This operation cuts the common part of two shapes and transforms it into an independent geometrical object. +To produce a \b Common operation in the Main Menu select Operations - > Boolean - > Common -\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". +This operation cuts the common part of two shapes and transforms it into an independent geometrical object. + +The \b Result will be any \b GEOM_Object. +TUI Command: geompy.MakeCommon(s1, s2) +Arguments: Name + 2 shapes. +Advanced option: +\ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html bool2.png -\n Example: +Example: \image html fusesn1.png "The initial shapes" diff --git a/doc/salome/gui/GEOM/input/cut_operation.doc b/doc/salome/gui/GEOM/input/cut_operation.doc index bab9ca7b8..3eee98514 100644 --- a/doc/salome/gui/GEOM/input/cut_operation.doc +++ b/doc/salome/gui/GEOM/input/cut_operation.doc @@ -2,19 +2,25 @@ \page cut_operation_page Cut -\n To produce a \b Cut operation in the Main Menu select Operations - > Boolean - > Cut +For detail description of the Boolean operations please refer to +this document. +It provides a general review of the Partition and Boolean +operations algorithms, describes the usage methodology and highlighs +major limitations of these operations. -\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". +To produce a \b Cut operation in the Main Menu select Operations - > Boolean - > Cut -\n Dialog Box: +This operation cuts a shape with another one. +The \b Result will be any \b GEOM_Object. +Arguments: Name + 2 shapes. +Advanced option: +\ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". + +Dialog Box: \image html bool3.png -\n Example: +Example: \image html fusesn1.png "The initial shapes" diff --git a/doc/salome/gui/GEOM/input/fuse_operation.doc b/doc/salome/gui/GEOM/input/fuse_operation.doc index ece199c5c..42026ee99 100644 --- a/doc/salome/gui/GEOM/input/fuse_operation.doc +++ b/doc/salome/gui/GEOM/input/fuse_operation.doc @@ -2,20 +2,26 @@ \page fuse_operation_page Fuse -\n To produce a \b Fuse operation in the Main Menu select +For detail description of the Boolean operations please refer to +this document. +It provides a general review of the Partition and Boolean +operations algorithms, describes the usage methodology and highlighs +major limitations of these operations. + +To produce a \b Fuse operation in the Main Menu select Operations - > Boolean - > Fuse -\n This operation creates a shape from two shapes. +This operation creates a shape from two shapes. -\n The \b Result will be any \b GEOM_Object. -\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". +The \b Result will be any \b GEOM_Object. +TUI Command: geompy.MakeFuse(s1, s2) +Arguments: Name + 2 shapes. +Advanced option: +\ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html bool1.png -\n Example: +Example: \image html fusesn1.png "The initial shapes" diff --git a/doc/salome/gui/GEOM/input/index.doc b/doc/salome/gui/GEOM/input/index.doc index 856e03a54..b4368cbcd 100644 --- a/doc/salome/gui/GEOM/input/index.doc +++ b/doc/salome/gui/GEOM/input/index.doc @@ -27,5 +27,7 @@ Also it can be useful to have a look at the \subpage geompypkg_page "documentati \image html image3.png "Example of Geometry module usage for engineering tasks" +There are also \subpage related_docs_page "additional reference documents" +for Geometry module that can be useful. */ diff --git a/doc/salome/gui/GEOM/input/partition.doc b/doc/salome/gui/GEOM/input/partition.doc index c802d7611..446d525af 100644 --- a/doc/salome/gui/GEOM/input/partition.doc +++ b/doc/salome/gui/GEOM/input/partition.doc @@ -2,6 +2,12 @@ \page partition_page Partition +For detail description of the Partition operation please refer to +this document. +It provides a general review of the Partition and Boolean +operations algorithms, describes the usage methodology and highlighs +major limitations of these operations. + To produce a \b Partition in the Main Menu select Operations - > Partition This operation builds a compound by intersection of several shapes diff --git a/doc/salome/gui/GEOM/input/related_docs.doc b/doc/salome/gui/GEOM/input/related_docs.doc new file mode 100644 index 000000000..fea4ba010 --- /dev/null +++ b/doc/salome/gui/GEOM/input/related_docs.doc @@ -0,0 +1,10 @@ +/*! +\page related_docs_page Related Documents + +Here you can find additional reference documents for Geometry module +that can be useful for reading. + +General Fuse Algorithm, Partition +Algorithm, Boolean Operations Algorithm. Backgrounds. + +*/ diff --git a/doc/salome/gui/GEOM/input/section_operation.doc b/doc/salome/gui/GEOM/input/section_operation.doc index c4f450d30..6dd99f642 100644 --- a/doc/salome/gui/GEOM/input/section_operation.doc +++ b/doc/salome/gui/GEOM/input/section_operation.doc @@ -2,20 +2,26 @@ \page section_opeartion_page Section -\n To produce a \b Section operation in the Main Menu select +For detail description of the Boolean operations please refer to +this document. +It provides a general review of the Partition and Boolean +operations algorithms, describes the usage methodology and highlighs +major limitations of these operations. + +To produce a \b Section operation in the Main Menu select Operations - > Boolean - > Section -\n This operation creates the section between 2 shapes. +This operation creates the section between 2 shapes. -\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". +The \b Result will be any \b GEOM_Object (EDGE or WIRE). +TUI Command: geompy.MakeSection(s1, s2) +Arguments: Name + 2 shapes. +Advanced option: +\ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \image html neo-section.png -\n Example: +Example: \image html fusesn1.png "The initial shapes" diff --git a/doc/salome/gui/GEOM/input/tui_measurement_tools.doc b/doc/salome/gui/GEOM/input/tui_measurement_tools.doc index 0112bd0da..f8dbcd38c 100644 --- a/doc/salome/gui/GEOM/input/tui_measurement_tools.doc +++ b/doc/salome/gui/GEOM/input/tui_measurement_tools.doc @@ -357,6 +357,20 @@ print "\nBox 100x30x100 description:" print Descr \endcode +

NbShapes and ShapeInfo

+ +\code +import geompy + +# create a box +box = geompy.MakeBoxDXDYDZ(100,30,100) +nbSolids = geompy.NbShapes(box, geompy.ShapeType["SOLID"]) +print "\nBox 100x30x100 quantity of solids:", nbSolids +boxInfo = geompy.ShapeInfo(box) +print "\nBox 100x30x100 shapes:" +print boxInfo +\endcode +

Check Shape

\code diff --git a/doc/salome/gui/GEOM/input/using_boolean_operations.doc b/doc/salome/gui/GEOM/input/using_boolean_operations.doc index c7fd67b75..cfbb5f444 100644 --- a/doc/salome/gui/GEOM/input/using_boolean_operations.doc +++ b/doc/salome/gui/GEOM/input/using_boolean_operations.doc @@ -2,7 +2,13 @@ \page using_boolean_operations_page Using Boolean Operations -\n You can use the following boolean operations for construction of more +For detail description of the Boolean operations please refer to +this document. +It provides a general review of the Partition and Boolean +operations algorithms, describes the usage methodology and highlighs +major limitations of these operations. + +You can use the following boolean operations for construction of more complex geometrical objects (2D & 3D elements):