Merge from V5_1_main branch 24/11/2010

This commit is contained in:
vsr 2010-11-25 12:31:41 +00:00
parent 4ca918905c
commit 16f91b82f4
259 changed files with 22065 additions and 10184 deletions

View File

@ -19,6 +19,7 @@
SET(GEOM_CXXFLAGS -I${GEOM_ROOT_DIR}/include/salome) SET(GEOM_CXXFLAGS -I${GEOM_ROOT_DIR}/include/salome)
FIND_LIBRARY(AdvancedGUI AdvancedGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(BasicGUI BasicGUI ${GEOM_ROOT_DIR}/lib/salome) FIND_LIBRARY(BasicGUI BasicGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(BlocksGUI BlocksGUI ${GEOM_ROOT_DIR}/lib/salome) FIND_LIBRARY(BlocksGUI BlocksGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(BooleanGUI BooleanGUI ${GEOM_ROOT_DIR}/lib/salome) FIND_LIBRARY(BooleanGUI BooleanGUI ${GEOM_ROOT_DIR}/lib/salome)
@ -48,6 +49,7 @@ FIND_LIBRARY(IGESImport IGESImport ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(MeasureGUI MeasureGUI ${GEOM_ROOT_DIR}/lib/salome) FIND_LIBRARY(MeasureGUI MeasureGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(NMTDS NMTDS ${GEOM_ROOT_DIR}/lib/salome) FIND_LIBRARY(NMTDS NMTDS ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(NMTTools NMTTools ${GEOM_ROOT_DIR}/lib/salome) FIND_LIBRARY(NMTTools NMTTools ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(OCC2VTK OCC2VTK ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(OperationGUI OperationGUI ${GEOM_ROOT_DIR}/lib/salome) FIND_LIBRARY(OperationGUI OperationGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(PrimitiveGUI PrimitiveGUI ${GEOM_ROOT_DIR}/lib/salome) FIND_LIBRARY(PrimitiveGUI PrimitiveGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(RepairGUI RepairGUI ${GEOM_ROOT_DIR}/lib/salome) FIND_LIBRARY(RepairGUI RepairGUI ${GEOM_ROOT_DIR}/lib/salome)
@ -57,3 +59,4 @@ FIND_LIBRARY(STEPExport STEPExport ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(STEPImport STEPImport ${GEOM_ROOT_DIR}/lib/salome) FIND_LIBRARY(STEPImport STEPImport ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(STLExport STLExport ${GEOM_ROOT_DIR}/lib/salome) FIND_LIBRARY(STLExport STLExport ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(TransformationGUI TransformationGUI ${GEOM_ROOT_DIR}/lib/salome) FIND_LIBRARY(TransformationGUI TransformationGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(VTKExport VTKExport ${GEOM_ROOT_DIR}/lib/salome)

View File

@ -28,6 +28,7 @@ nodist_salomescript_DATA = VERSION
# python files # python files
dist_salomescript_PYTHON = \ dist_salomescript_PYTHON = \
addvars2notebook_GEOM.py \
geom_setenv.py geom_setenv.py
# distributed files # distributed files

View File

@ -0,0 +1,50 @@
def addvars2notebook(filename, vars_and_values):
stream = open(filename)
lines = stream.readlines()
stream.close()
newlines = []
for line in lines:
if line.find("= geompy.") >= 0:
name = line.split('=')[0]
name = name.strip()
vals = line
fields = vals.split("(")
if len(fields) == 2:
begin = fields[0] + "("
vals = fields[1]
fields = vals.split(")")
if len(fields) == 2:
vals = fields[0]
end = ")" + fields[1]
vals = vals.split(',')
newline = begin
newvals = []
for i in range(len(vals)):
valname = name + "_val_%s"%(i+1)
val = vals[i]
vvv = val.strip()
try:
iii = int(vvv)
vars_and_values.append([valname, val])
val = val.replace(vvv, valname.__repr__())
except ValueError:
try:
fff = float(vvv)
vars_and_values.append([valname, val])
val = val.replace(vvv, valname.__repr__())
except ValueError:
pass
pass
newvals.append(val)
pass
newline += ','.join(newvals)
newline += end
line = newline
pass
pass
pass
newlines.append(line)
pass
content = "".join(newlines)
return content

View File

@ -24,7 +24,7 @@
# Modified by : Alexander BORODIN (OCN) - autotools usage # Modified by : Alexander BORODIN (OCN) - autotools usage
# Created from configure.in.base # Created from configure.in.base
# #
AC_INIT([Salome2 Project GEOM module], [6.1.0], [webmaster.salome@opencascade.com], [SalomeGEOM]) AC_INIT([Salome2 Project GEOM module], [6.2.0], [webmaster.salome@opencascade.com], [SalomeGEOM])
AC_CONFIG_AUX_DIR(adm_local/unix/config_files) AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
AC_CANONICAL_HOST AC_CANONICAL_HOST
AC_CANONICAL_TARGET AC_CANONICAL_TARGET
@ -282,16 +282,16 @@ if test "${gui_ok}" = "yes"; then
echo echo
CHECK_QT CHECK_QT
echo
echo ---------------------------------------------
echo testing VTK
echo ---------------------------------------------
echo
CHECK_VTK
fi fi
echo
echo ---------------------------------------------
echo testing VTK
echo ---------------------------------------------
echo
CHECK_VTK
echo echo
echo --------------------------------------------- echo ---------------------------------------------
echo testing HDF5 echo testing HDF5
@ -324,6 +324,13 @@ echo
CHECK_HTML_GENERATORS CHECK_HTML_GENERATORS
echo
echo ---------------------------------------------
echo testing sphinx
echo ---------------------------------------------
echo
CHECK_SPHINX
echo echo
echo --------------------------------------------- echo ---------------------------------------------
echo Testing Kernel echo Testing Kernel
@ -341,11 +348,11 @@ echo
echo Configure echo Configure
if test "${gui_ok}" = "yes"; then if test "${gui_ok}" = "yes"; then
variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok Kernel_ok gui_ok" variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok sphinx_ok Kernel_ok gui_ok"
elif test "${SalomeGUI_need}" != "no"; then elif test "${SalomeGUI_need}" != "no"; then
variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok Kernel_ok gui_ok" variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok Kernel_ok gui_ok"
else else
variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok Kernel_ok" variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok Kernel_ok"
fi fi
for var in $variables for var in $variables
@ -376,6 +383,19 @@ echo
# chmod +x ./bin/*; \ # chmod +x ./bin/*; \
#]) #])
AC_CONFIG_COMMANDS([hack_libtool],[
sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
if test \"\$(echo \$[@] | grep -E '\\\-L/usr/lib(/../lib)?(64)? ')\" == \"\" \n\
then\n\
cmd=\"\1 \$[@]\"\n\
else\n\
cmd=\"\1 \"\`echo \$[@] | sed -r -e 's|(.*)-L/usr/lib(/../lib)?(64)? (.*)|\\\1\\\4 -L/usr/lib\\\3|g'\`\n\
fi\n\
\$cmd\n\
}\n\
CC=\"hack_libtool\"%g" libtool
],[])
# This list is initiated using autoscan and must be updated manually # This list is initiated using autoscan and must be updated manually
# when adding a new file <filename>.in to manage. When you execute # when adding a new file <filename>.in to manage. When you execute
# autoscan, the Makefile list is generated in the output file configure.scan. # autoscan, the Makefile list is generated in the output file configure.scan.
@ -389,6 +409,7 @@ AC_OUTPUT([ \
bin/Makefile \ bin/Makefile \
GEOM_version.h \ GEOM_version.h \
doc/Makefile \ doc/Makefile \
doc/docutils/Makefile \
doc/salome/Makefile \ doc/salome/Makefile \
doc/salome/gui/Makefile \ doc/salome/gui/Makefile \
doc/salome/gui/GEOM/Makefile \ doc/salome/gui/GEOM/Makefile \
@ -423,6 +444,8 @@ AC_OUTPUT([ \
src/GEOM_I_Superv/Makefile \ src/GEOM_I_Superv/Makefile \
src/GEOM_SWIG/Makefile \ src/GEOM_SWIG/Makefile \
src/GEOM_SWIG_WITHIHM/Makefile \ src/GEOM_SWIG_WITHIHM/Makefile \
src/GEOM_PY/Makefile \
src/GEOM_PY/structelem/Makefile \
src/GenerationGUI/Makefile \ src/GenerationGUI/Makefile \
src/GroupGUI/Makefile \ src/GroupGUI/Makefile \
src/IGESExport/Makefile \ src/IGESExport/Makefile \
@ -431,6 +454,7 @@ AC_OUTPUT([ \
src/NMTDS/Makefile \ src/NMTDS/Makefile \
src/NMTTools/Makefile \ src/NMTTools/Makefile \
src/OBJECT/Makefile \ src/OBJECT/Makefile \
src/OCC2VTK/Makefile \
src/OperationGUI/Makefile \ src/OperationGUI/Makefile \
src/PrimitiveGUI/Makefile \ src/PrimitiveGUI/Makefile \
src/RepairGUI/Makefile \ src/RepairGUI/Makefile \
@ -440,6 +464,7 @@ AC_OUTPUT([ \
src/STLExport/Makefile \ src/STLExport/Makefile \
src/ShHealOper/Makefile \ src/ShHealOper/Makefile \
src/TransformationGUI/Makefile \ src/TransformationGUI/Makefile \
src/VTKExport/Makefile \
resources/Makefile \ resources/Makefile \
resources/GEOMCatalog.xml \ resources/GEOMCatalog.xml \
idl/Makefile \ idl/Makefile \

View File

@ -24,7 +24,7 @@
# $Header$ # $Header$
# source path # source path
# #
SUBDIRS = salome SUBDIRS = salome docutils
usr_docs: usr_docs:
(cd salome && $(MAKE) $(AM_MAKEFLAGS) usr_docs) (cd salome && $(MAKE) $(AM_MAKEFLAGS) usr_docs)

93
doc/docutils/Makefile.am Normal file
View File

@ -0,0 +1,93 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 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
include $(top_srcdir)/adm_local/unix/make_common_starter.am
pydocdir = $(docdir)/tui/GEOM/docutils
.PHONY : latex
if SPHINX_IS_OK
html/index.html:$(RSTFILES)
make htm
endif
EXTRA_DIST+= images
SPHINXOPTS =
SOURCEDIR = $(srcdir)
SPHINXBUILD = sphinx-build
PAPEROPT_a4 = -D latex_paper_size=a4
ALLSPHINXOPTS = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR)
SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/bin/salome:$(KERNEL_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages
SPHINX_LD_LIBRARY_PATH = $(KERNEL_ROOT_DIR)/lib/salome:$(OMNIORB_ROOT)/lib
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
@echo
@echo "Build finished. The HTML pages are in html."
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
@echo
@echo "Build finished; the LaTeX files are in latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
"run these through (pdf)latex."
html:
mkdir -p $@
RSTFILES= \
index.rst \
overview.rst \
docapi.rst
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; \
cp -rf $$b"html"/* $(pydocdir) ; \
if test -f $$b"latex"/geompy.pdf; then cp -f $$b"latex"/geompy.pdf $(pydocdir) ; fi;
uninstall-local:
-test -d $(pydocdir) && chmod -R +w $(pydocdir) && rm -rf $(pydocdir)/*
clean-local:
-rm -rf html latex doctrees
if test -d "html"; then rm -rf html ; fi
disthook :
-test -d html && cp -Rp html $(distdir)

200
doc/docutils/conf.py Normal file
View File

@ -0,0 +1,200 @@
# -*- coding: iso-8859-1 -*-
#
# yacs documentation build configuration file, created by
# sphinx-quickstart on Fri Aug 29 09:57:25 2008.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleable (module imports are okay, they're removed automatically).
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
#sys.path.append(os.path.abspath('.'))
# General configuration
# ---------------------
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc']
# Uncomment the following line to build the links with Python documentation
# (you might need to set http_proxy environment variable for this to work)
#extensions += ['sphinx.ext.intersphinx']
# Intersphinx mapping to add links to modules and objects in the Python
# standard library documentation
intersphinx_mapping = {'http://docs.python.org': None}
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
source_encoding = 'utf-8'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = 'GEOM python packages'
copyright = '2010 EDF R&D'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '5.1.4'
# The full version, including alpha/beta/rc tags.
release = '5.1.4'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
language = 'en'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of documents that shouldn't be included in the build.
#unused_docs = []
# List of directories, relative to source directory, that shouldn't be searched
# for source files.
exclude_trees = ['.build','ref','images','CVS','.svn']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# Options for HTML output
# -----------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = 'default'
#html_theme = 'nature'
#html_theme = 'agogo'
#html_theme = 'sphinxdoc'
#html_theme = 'omadoc'
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = ['themes']
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
html_use_modindex = False
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, the reST sources are included in the HTML build as _sources/<name>.
html_copy_source = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = ''
# Output file base name for HTML help builder.
htmlhelp_basename = 'geompydoc'
# Options for LaTeX output
# ------------------------
# The paper size ('letter' or 'a4').
latex_paper_size = 'a4'
# The font size ('10pt', '11pt' or '12pt').
latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class [howto/manual]).
latex_documents = [
('index', 'geompy.tex', 'Documentation of the GEOM python packages', 'EDF R\&D', 'manual')
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
latex_logo = '../salome/tui/images/head.png'
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = True
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
latex_use_modindex = False

43
doc/docutils/docapi.rst Normal file
View File

@ -0,0 +1,43 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Documentation of the programming interface (API)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This section describes the python packages and modules of the
``salome.geom`` python package. The main part is generated from the
code documentation included in source python files.
:mod:`salome.geom` -- Package containing the GEOM python utilities
==================================================================
:mod:`geomtools` -- Tools to access GEOM engine and objects
-----------------------------------------------------------
.. automodule:: salome.geom.geomtools
:members:
:mod:`structelem` -- Structural elements package
------------------------------------------------
.. automodule:: salome.geom.structelem
.. autoclass:: StructuralElementManager
:members:
.. autoclass:: StructuralElement
:members:
:mod:`structelem.parts` -- Structural element parts
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. automodule:: salome.geom.structelem.parts
:members:
:undoc-members:
:show-inheritance:
:mod:`structelem.orientation` -- Structural element orientation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. automodule:: salome.geom.structelem.orientation
:members:
:undoc-members:

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

14
doc/docutils/index.rst Normal file
View File

@ -0,0 +1,14 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Documentation of the GEOM python packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Main documentation
==================
.. toctree::
:maxdepth: 3
overview.rst
docapi.rst

38
doc/docutils/overview.rst Normal file
View File

@ -0,0 +1,38 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
General presentation of the GEOM python package
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The GEOM python package essentially contains:
* The visualization of structural elements: a function to create
geometrical 3D representations of mechanical models called
"structural elements".
Note that these functions either encapsulate the python programming
interface of GEOM core (the CORBA or SWIG interfaces for example) or
extend existing utilities as the ``geompy.py`` module.
The functions are distributed in the python package
``salome.geom``. For example, the usage of the visualization of
structural elements can be appreciated with this set of instructions:
.. code-block:: python
from salome.geom.structelem import TEST_StructuralElement
TEST_StructuralElement()
This creates the geometrical objects displayed in the study below:
.. image:: /images/salome-geom-structuralelements.png
:align: center
The specification of the programming interface of this package is
detailled in the part :doc:`Documentation of the programming interface
(API)</docapi>` of this documentation.
.. note::
The main package ``salome`` contains other sub-packages that are
distributed with the other SALOME modules. For example, the KERNEL
module provides the python package ``salome.kernel`` and SMESH the
package ``salome.smesh``.

View File

@ -56,7 +56,7 @@ clean-local:
@for filen in `find . -maxdepth 1` ; do \ @for filen in `find . -maxdepth 1` ; do \
case $${filen} in \ case $${filen} in \
./Makefile | ./doxyfile | ./doxyfile_py | ./doxyfile_tui ) ;; \ ./Makefile | ./doxyfile | ./doxyfile_py | ./doxyfile_tui ) ;; \
. | .. ) ;; \ . | .. | ./static ) ;; \
*) echo "Removing $${filen}" ; rm -rf $${filen} ;; \ *) echo "Removing $${filen}" ; rm -rf $${filen} ;; \
esac ; \ esac ; \
done ; done ;
@ -67,7 +67,7 @@ install-data-local: usr_docs
case $${filen} in \ case $${filen} in \
./Makefile | ./doxyfile | ./doxyfile_py | ./doxyfile_tui ) ;; \ ./Makefile | ./doxyfile | ./doxyfile_py | ./doxyfile_tui ) ;; \
./doxyfile.bak | ./doxyfile_py.bak | ./doxyfile_tui.bak ) ;; \ ./doxyfile.bak | ./doxyfile_py.bak | ./doxyfile_tui.bak ) ;; \
. | .. ) ;; \ . | .. | ./static ) ;; \
*) echo "Installing $${filen}" ; cp -rp $${filen} $(DESTDIR)$(docdir)/gui/GEOM ;; \ *) echo "Installing $${filen}" ; cp -rp $${filen} $(DESTDIR)$(docdir)/gui/GEOM ;; \
esac ; \ esac ; \
done ; done ;

View File

@ -72,3 +72,4 @@ GENERATE_RTF = NO
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
TAGFILES = geompy_doc.tag=geompy_doc TAGFILES = geompy_doc.tag=geompy_doc
ALLEXTERNALS = NO ALLEXTERNALS = NO
SEARCHENGINE = YES

View File

@ -159,3 +159,4 @@ DOT_CLEANUP = YES
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_TAGFILE = geompy_doc.tag GENERATE_TAGFILE = geompy_doc.tag
TAGFILES = tui_examples.tag=.. TAGFILES = tui_examples.tag=..
SEARCHENGINE = YES

View File

@ -53,7 +53,7 @@ HTML_FOOTER = @srcdir@/static/footer.html
HTML_STYLESHEET = @srcdir@/static/doxygen.css HTML_STYLESHEET = @srcdir@/static/doxygen.css
TOC_EXPAND = YES TOC_EXPAND = YES
DISABLE_INDEX = NO DISABLE_INDEX = NO
GENERATE_TREEVIEW = YES GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 300 TREEVIEW_WIDTH = 300
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
@ -70,3 +70,4 @@ GENERATE_RTF = NO
#External reference options #External reference options
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_TAGFILE = tui_examples.tag GENERATE_TAGFILE = tui_examples.tag
SEARCHENGINE = YES

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -3,7 +3,7 @@
\page chamfer_operation_page Chamfer \page chamfer_operation_page Chamfer
\n To produce a \b Chamfer in the <b>Main Menu</b> select \n To produce a \b Chamfer in the <b>Main Menu</b> select
<b>Operations - > Transformation - > Chamfer</b> <b>Operations - > Chamfer</b>
\n This operation allows you to make chamfer of the edges of a Shape. \n This operation allows you to make chamfer of the edges of a Shape.
\n The \b Result will be a \b GEOM_Object. \n The \b Result will be a \b GEOM_Object.

View File

@ -2,25 +2,50 @@
\page create_edge_page Edge \page create_edge_page Edge
\n To create an \b Edge in the <b>Main Menu</b> select <b>New Entity- > Build - > Edge</b> To create an \b Edge, in the <b>Main Menu</b> select <b>New Entity >
Build > Edge</b>
\n You can create an \b Edge from two points (\b Point1 and \b Point2), being the first and the last vertices of the edge. There are two ways to create an edge. In both cases the \b Result
will be a \b GEOM_Object (EDGE).
The \b Result will be a \b GEOM_Object (EDGE). Firstly, you can create an \b Edge by specifying two points (\b Point1 and
\b Point2), which are the first and the last vertices of the edge.
<b>TUI Command:</b> <em>geompy.MakeEdge(Vertex1, Vertex2),</em> where <b>TUI Command:</b> <em>geompy.MakeEdge(Vertex1, Vertex2)</em><br>
Vertex1 and Vertex2 are correspondingly the first and the last vertex <b>Arguments:</b> Name + 2 vertices (Vertex1 and Vertex2 are
of the edge. correspondingly the first and the last vertex of the edge).
<b>Arguments:</b> Name + 2 vertices. \image html edge1.png "Create edge by two points"
\image html neo-obj2.png Secondly, you can create an \b Edge by specifying a single wire.
\n <b>Example:</b> In this mode the following use cases are possible:
- All edges that form the wire lie on the same geometrical curve
(i.e. curve(edge1) == curve(edge2)).
- The edges that form the wire lie on analytical curves of the same
type, for example, segments of line, arcs, etc. In this case, the
algorithm checks geometrical coincidence of these curves using
a certain tolerance. If the curves are coinciding in terms of the given
tolerance, the resulting edge is built as if on a single curve.
- The edges that form the wire have the same tangency in the connection
points. In this case the curves are interpolated by the single
b-spline curve with sufficient precision. The resulting edge will
be built on this curve.
The case when the edges that form the wire have different tangency in
the connection points (sharp bend) is not processed.
<b>TUI Command:</b> <em>geompy.MakeEdgeWire(Wire, LinearTolerance, AngularTolerance)</em><br>
<b>Arguments:</b> Name + 1 wire + Linear Tolerance + Angular Tolerance
(tolerance values are used to check coincidence of the underlying curves).
\image html edge2.png "Create edge from wire"
<b>Example:</b>
\image html edgesn.png "Edge" \image html edgesn.png "Edge"
Our <b>TUI Scripts</b> provide you with useful examples of creation of Our <b>TUI Scripts</b> provide you with useful examples of creation of
\ref tui_creation_edge "Advanced Geometric Objects". \ref tui_creation_edge "Advanced Geometric Objects".
*/ */

View File

@ -18,8 +18,8 @@ shell, solid or compsolid).
\n <b> Both Directions </b> checkbox allows extruiding the source \n <b> Both Directions </b> checkbox allows extruiding the source
object both forward and backward. object both forward and backward.
\n <b>TUI Command:</b> <em>geompy.MakePrismVecH(Base, Vector, Height)</em> \n <b>TUI Command:</b> <em>geompy.MakePrismVecH(Base, Vector, Height)</em>
\n <b>Arguments:</b> Name + 1 shape (vertex, edge, planar wire, face or \n <b>Arguments:</b> Name + one or several shapes (vertex, edge, planar wire, face or
shell) serving as base object + 1 vector (for direction of the shell) serving as base objects + 1 vector (for direction of the
extrusion) + 1 value (dimension). extrusion) + 1 value (dimension).
\image html extrusion1.png \image html extrusion1.png
@ -30,8 +30,8 @@ you don't need to create it in advance).
\n <b> Both Directions </b> checkbox allows extruiding the source \n <b> Both Directions </b> checkbox allows extruiding the source
object both forward and backward. object both forward and backward.
\n <b>TUI Command:</b> <em>geompy.MakePrism(Base, Point1, Point2)</em> \n <b>TUI Command:</b> <em>geompy.MakePrism(Base, Point1, Point2)</em>
\n <b>Arguments:</b> Name + 1 shape (vertex, edge, planar wire, face or \n <b>Arguments:</b> Name + one or several shapes (vertex, edge, planar wire, face or
shell) serving as base object + 2 vertices. shell) serving as base objects + 2 vertices.
\image html extrusion2.png \image html extrusion2.png
@ -40,8 +40,8 @@ and the <b>DX, DY, DZ</b> Vector\n
<b>Both Directions</b> checkbox allows extruding the <b>Both Directions</b> checkbox allows extruding the
source objects both forward and backward. source objects both forward and backward.
\n <b>TUI Command:</b> <em>geompy.MakePrismDXDYDZ(Base, dx, dy, dz)</em> \n <b>TUI Command:</b> <em>geompy.MakePrismDXDYDZ(Base, dx, dy, dz)</em>
\n <b>Arguments:</b> Name + 1 shape (vertex, edge, planar wire, face or \n <b>Arguments:</b> Name + one or several shapes (vertex, edge, planar wire, face or
shell) serving as base object + 3 axis directions. shell) serving as base objects + 3 axis directions.
\image html extrusion3.png \image html extrusion3.png

View File

@ -4,39 +4,38 @@
To generate a \b Filling in the <b>Main Menu</b> select <b>New Entity - > Generation - > Filling</b> To generate a \b Filling in the <b>Main Menu</b> select <b>New Entity - > Generation - > Filling</b>
To create a curving face using several edges you need to define the To create a curvilinear face from several edges you need to define the
following parameters: following parameters:
\n <b>Input Compound</b> - the list of edges/wires used for creation \n <b>Input Compound</b> - the list of edges/wires used for creation
of the surface. Before perform filling algorithm each wire from of the surface. To prepare for the filling each wire of the compound
compound is converted to one edge created on BSpline curve built using is converted to an edge created on a BSpline curve built using curves
curves from all edges from wire. from all edges of the wire.
\n \b Minimum and <b>Maximum Degree</b> of equation of the resulting \n \b Minimum and <b>Maximum Degree</b> of equation of the resulting
BSpline or Besier curves describing the surface; BSpline or Besier curves describing the surface;
\n \b Tolerance for \b 2D and for \b 3D - minimum distance between the \n \b Tolerance for \b 2D and for \b 3D - minimum distance between the
created surface and the reference edge; created surface and the reference edge;
\n <b>Number of \n <b>Number of Iterations</b> - defines the maximum number of iterations. The
Iterations</b> - defines the maximum number of iterations. The
iterations are repeated until the required tolerance is reached. So, a iterations are repeated until the required tolerance is reached. So, a
greater number of iterations allows producing a better surface. greater number of iterations allows producing a better surface.
\n <b>Method</b> - Kind of method to perform filling operation \n <b>Method</b> - Kind of method to perform filling operation
1. Default - standard behaviour 1. Default - the standard behaviour.
2. Use edges orientation - orientation of edges are used: if edge is 2. Use edges orientation - the edges orientation is used: if an edge is
reversed curve from this edge is reversed before using in filling reversed, the curve from this edge is reversed before being used by the filling
algorithm. algorithm.
3. Auto-correct edges orientation - change orientation of curves using 3. Auto-correct edges orientation - curves orientation is changed to
minimization of sum of distances between ends points of edges. minimize the sum of distances between ends points of edges.
\n <b>Approximation</b> - if checked, BSpline curves are generated in \n <b>Approximation</b> - if checked, BSpline curves are generated in
the process of surface construction (using the process of surface construction (using
GeomAPI_PointsToBSplineSurface functionality). By default the surface GeomAPI_PointsToBSplineSurface functionality). By default the surface
is created using Besier curves. The usage of <b>Approximation</b> is created using Besier curves. The usage of <b>Approximation</b>
makes the algorithm work slower, but allows building the surface for slows the algorithm, but allows building the surface for complex cases.
rather complex cases.
\n The \b Result of the operation will be a GEOM_Object (face). \n The \b Result of the operation will be a GEOM_Object (face).
\n <b>TUI Command:</b> <em>geompy.MakeFilling(Edges, MinDegree, MaxDegree, Tol2D, Tol3D, NbIter)</em> \n <b>TUI Command:</b> <em>geompy.MakeFilling(Edges, MinDegree, MaxDegree, Tol2D, Tol3D, NbIter)</em>
\n <b>Arguments:</b> Name + 1 List of edges + 7 Parameters \n <b>Arguments:</b> Name + 1 List of edges + 7 Parameters
(Min. degree, Max. degree, 2D tolerance, 3D tolerance, Number of iterations, Method, Approximation). (Min. degree, Max. degree, Number of iterations, 2D tolerance, 3D
tolerance, Number of iterations, Method, Approximation).
\image html filling.png \image html filling.png

View File

@ -4,10 +4,14 @@
\n To create a \b Wire in the <b>Main Menu</b> select <b>New Entity - > Build - > Wire</b> \n To create a \b Wire in the <b>Main Menu</b> select <b>New Entity - > Build - > Wire</b>
\n You can create a \b Wire from several connected edges and wires by \n You can create a \b Wire from several connected edges or wires by
selecting them in the object browser or in the viewer holding Shift selecting them in the object browser or in the viewer holding Shift
button. button.
\n Select \b Tolerance which will be used to check the
It is possible to select wires or edges from objects. To specify subshape type, use
the <b>Object Type</b> radio buttons.
Select \b Tolerance which will be used to check the
connections. If the \b Tolerance value is more than 1e-07, and a gap connections. If the \b Tolerance value is more than 1e-07, and a gap
within this tolerance is detected, the corresponding edges will be modified to within this tolerance is detected, the corresponding edges will be modified to
connect in the middle of the gap. connect in the middle of the gap.

View File

@ -10,7 +10,7 @@ constructed, have to lie in the same plane.
\image html fillet1d_2.png \image html fillet1d_2.png
To produce a \b Fillet 1D in the <b>Main Menu</b> select To produce a \b Fillet 1D in the <b>Main Menu</b> select
<b>Operations - > Transformation - > Fillet 1D</b> <b>Operations - > Fillet 1D</b>
Define the <b>Wire with planar Edges</b> to create a fillet on, select the necessary Define the <b>Wire with planar Edges</b> to create a fillet on, select the necessary
vertexes on this wire in the OCC Viewer and define the \b Radius of the Fillet. vertexes on this wire in the OCC Viewer and define the \b Radius of the Fillet.

View File

@ -7,7 +7,7 @@ This operation creates fillets on the corners of a <b>2D Planar Face</b>.
\image html fillet2d_2.png \image html fillet2d_2.png
To produce a \b Fillet 2D in the <b>Main Menu</b> select To produce a \b Fillet 2D in the <b>Main Menu</b> select
<b>Operations - > Transformation - > Fillet 2D</b> <b>Operations - > Fillet 2D</b>
Define the <b>Planar Face</b> to create a fillet on, select the necessary Define the <b>Planar Face</b> to create a fillet on, select the necessary
vertexes on this face in the OCC Viewer and define the \b Radius of the Fillet. vertexes on this face in the OCC Viewer and define the \b Radius of the Fillet.

View File

@ -3,7 +3,7 @@
\page fillet_operation_page Fillet \page fillet_operation_page Fillet
\n To produce a \b Fillet in the <b>Main Menu</b> select \n To produce a \b Fillet in the <b>Main Menu</b> select
<b>Operations - > Transformation - > Fillet</b> <b>Operations - > Fillet</b>
\n This operation creates fillets on the edges of a shape. \n This operation creates fillets on the edges of a shape.
\n The \b Result will be a \b GEOM_Object. \n The \b Result will be a \b GEOM_Object.

View File

@ -0,0 +1,44 @@
/*!
\page geompypkg_page Programming Interface of GEOM python package
Sorry, but the documentation is not available yet in doxygen format.
Fortunately, a documentation exists in restructured format and then
can be generated here using sphinx, in the expectative of the doxygen
version. This documentation is available <a href="../../tui/GEOM/docutils/index.html">
here</a>.
Here is a sample generated from the doxygen format:
The GEOM python package essentially contains:
<ul>
<li>The visualization of structural elements: a function to create
geometrical 3D representations of mechanical models called
"structural elements".
</ul>
For details, you should refer to the complete
<a href="../../tui/GEOM/docutils/index.html"> documentation of the GEOM
python packages</a> generated with sphinx from rst text files.
Note that these functions either encapsulate the python programming
interface of GEOM core (the CORBA or SWIG interfaces for example) or
extend existing utilities as the ``geompy.py`` module.
The functions are distributed in the python package
``salome.geom``. For example, the usage of the visualization of
structural elements can be appreciated with this set of instructions:
\code
from salome.geom.structelem import TEST_StructuralElement
TEST_StructuralElement()
\endcode
This creates the geometrical objects displayed in the study below:
\image html salome-geom-structuralelements.png "Example of Geometry created from structural elements"
*/

View File

@ -23,6 +23,8 @@ various algorithms;</li>
Almost all geometry module functionalities are accessible via Almost all geometry module functionalities are accessible via
\subpage geompy_page "Geometry module Python Interface" \subpage geompy_page "Geometry module Python Interface"
Also it can be useful to have a look at the \subpage geompypkg_page "documentation on GEOM python packages".
\image html image3.png "Example of Geometry module usage for engineering tasks" \image html image3.png "Example of Geometry module usage for engineering tasks"

View File

@ -0,0 +1,37 @@
/*!
\page limit_tolerance_operation_page Limit Tolerance
\n To produce a <b>Limit Tolerance</b> operation in the <b>Main
Menu</b> select <b>Repair - > Limit Tolerance</b>.
\image html limit_tolerance_dlg.png
\n <b>Arguments:</b> Name + 1 shape + 1 value (new tolerance).
\n It is possible on all kind of shapes.
\n The \b Result will be a \b GEOM_Object.
\n This functionality tries to set a new value of tolerance for the
given shape. However, the final tolerance value also depends on the
initial shape topology (takes into consideration the existing gaps) to obtain
a valid resulting shape.
\n Example of usage:
<ol>
<li>Partition objects obj1 and obj2.</li>
<li>Partition fails.</li>
<li>Perform Limit Tolerance on objects obj1 and obj2.</li>
<li>Try to partition them again.</li>
</ol>
See also \ref tui_limit_tolerance "TUI example".
\n <b>TUI Command:</b> <em>geompy.LimitTolerance(Shape, Tolerance),</em>
where \em Shape is a shape with presumably incorrect tolerance, \em
Tolerance is the required tolerance value.
Our <b>TUI Scripts</b> provide you with useful examples of
\ref tui_limit_tolerance "Repairing Operations".
*/

View File

@ -12,7 +12,9 @@ two directions.
\n To produce a <b>Simple Multi Translation</b> (in one direction) you \n To produce a <b>Simple Multi Translation</b> (in one direction) you
need to indicate an \b Object to be translated, a \b Vector of need to indicate an \b Object to be translated, a \b Vector of
translation, a \b Step of translation and a <b>Number of Times</b> the translation, a \b Step of translation and a <b>Number of Times</b> the
Object should be duplicated. Object should be duplicated. If a curve has been selected instead of
the Vector, only its first and last vertices will be used to get the vector direction
and the dialog preview will display the vector along which the object will be translated.
\n <b>TUI Command:</b> <em>geompy.MakeMultiTranslation1D(Shape, Dir, \n <b>TUI Command:</b> <em>geompy.MakeMultiTranslation1D(Shape, Dir,
Step, NbTimes)</em> Step, NbTimes)</em>
\n <b>Arguments:</b> Name + 1 shape + 1 vector (for direction) + 1 \n <b>Arguments:</b> Name + 1 shape + 1 vector (for direction) + 1
@ -27,6 +29,8 @@ step value + 1 value (repetition).
\n To produce a <b>Double Multi Translation</b> (in two directions) you need to \n To produce a <b>Double Multi Translation</b> (in two directions) you need to
indicate an \b Object to be translated, and, for both axes, a \b indicate an \b Object to be translated, and, for both axes, a \b
Vector of translation, a \b Step of translation and a <b>Number of Times</b> the shape must be duplicated. Vector of translation, a \b Step of translation and a <b>Number of Times</b> the shape must be duplicated.
If a curve has been selected instead of the Vector, only its first and last vertices will be used to get the vector direction
and the dialog preview will display the vector along which the object will be translated.
\n <b>TUI Command:</b> <em>geompy.MakeMultiTranslation2D(Shape, Dir1, \n <b>TUI Command:</b> <em>geompy.MakeMultiTranslation2D(Shape, Dir1,
Step1, NbTimes1, Dir2, Step2, NbTimes2),</em> where \em Shape is a shape Step1, NbTimes1, Dir2, Step2, NbTimes2),</em> where \em Shape is a shape

View File

@ -2,79 +2,103 @@
\page partition_page Partition \page partition_page Partition
\n To produce a \b Partition in the <b>Main Menu</b> select <b>Operations - > Partition</b> To produce a \b Partition in the <b>Main Menu</b> select <b>Operations - > Partition</b>
\n This operation builds a compound by intersection of several shapes This operation builds a compound by intersection of several shapes
with a set of tool objects or with a plane. with a set of tool objects or with a plane.
\n The \b Result will be any \b GEOM_Object. The \b Result will be a \b GEOM_Object.
<br><h2>Intersection of two shapes.</h2> <br><h2>Intersection of two shapes.</h2>
\image html partition1.png \image html partition1.png
\n <b>Arguments:</b> Name + 2 lists of shapes (the shapes from the <b>Arguments:</b> Name + 2 lists of shapes (the shapes from the
first list will be intersected with the shapes from the second list) + first list will be intersected with the shapes from the second list) +
Resulting Type of shape. Resulting Type of shape.
\n As far as the intersection of two objects can produce any type of As far as the intersection of two objects can produce any type of
geometrical objects, <b>Resulting type</b> box allows choosing the geometrical objects, <b>Resulting type</b> box allows choosing the
preferrable result, i.e. a solid, a shell, a list of faces, etc. preferrable result, i.e. a solid, a shell, a list of faces, etc.
\n<b>Resulting type</b> has to be equal or lower than the type of the
The <b>Resulting type</b> has to be equal or lower than the type of the
\em Objects. In other words, if the \em Objects don't contain any \em Objects. In other words, if the \em Objects don't contain any
shape of this type, Partition fails. shape of this type, Partition fails.
<b>Keep shapes of lower type</b> checkbox manages standalone shapes of <b>Keep shapes of lower type</b> checkbox manages standalone shapes of
type other than the \em Limit. If it is checked, lower dimension type other than the \em Limit. If it is checked, lower dimension
objects will be preserved, else they will be lost. objects will be preserved, else they will be lost.
\n For example, you do a partition of a box (Solid) and a face (Face)
without any tool. If you choose Resulting Type "Solid", you will
obtain a compound of two solids (let's the box will be splitted by the
face on two parts), but if you will also check <b>Keep shapes of lower
type</b> checkbox, you will obtain a compound of two solids and one
face (the face will have a hole where the original face lays inside
the box, see corresponding \ref partition_picture_3 "picture" below).
\n <b>Advanced option:</b> For example, you partition a box (Solid) and a face (Face)
without any tool (the box is split in two parts by the shape). If you
choose the Resulting Type "Solid", you will
obtain a compound of two solids, but if you also check <b>Keep shapes of lower
type</b> checkbox, you will obtain a compound of two solids and one
face (there will be a hole in the resulting face, where the original
face intersects with the box, see the corresponding \ref partition_picture_3 "picture" below).
<b>No sub-shapes intersection (Compounds only)</b> check box affects
only input shapes of the Compound type. If this option is switched off (default
behavior) each input compound will be automatically exploded into
sub-shapes and the intersection between these shapes will be also
computed. If this option is switched on, the intersection between
sub-shapes will not be performed. In this case the Partition algorithm
will work faster, but the result might differ from the default behavior.
<b>Advanced option:</b>
\ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments".
\n <b>TUI Command:</b> <em>geompy.MakePartition(ListOfShapes, \note Partition is a complex operation, so its result of it depends
on the quality of the initial shapes. Sometimes, if partition fails,
such healing operations as <b>Shape Processing</b>
and <b>Limit Tolerance</b> can help to attune source shapes to obtain correct result of the Partition.
See also \ref tui_limit_tolerance "TUI example" of shape healing.
<b>TUI Command (with sub-shapes intersection):</b>
<em>geompy.MakePartition(ListOfShapes, ListOfTools, ListOfKeepInside,
ListOfRemoveInside, Limit, RemoveWebs, ListOfMaterials,
KeepNonlimitShapes)</em>
<b>TUI Command (without sub-shapes intersection):</b>
<em>geompy.MakePartitionNonSelfIntersectedShape(ListOfShapes,
ListOfTools, ListOfKeepInside, ListOfRemoveInside, Limit, RemoveWebs, ListOfTools, ListOfKeepInside, ListOfRemoveInside, Limit, RemoveWebs,
ListOfMaterials, KeepNonlimitShapes),</em> where where \em ListOfMaterials, KeepNonlimitShapes)</em>
ListOfShapes is a list of shapes to be intersected, \em ListOfTools is
a list of shapes to intersect the shapes from ListOfShapes, \em Limit
is a Type of resulting shapes and \em KeepNonlimitShapes is a flag
that allows to preserve standalone shapes of low dimension (than
Limit) in the result.
\n Since the implementation of a new version of PartitionAlgo other
parameters are ignored by the current functionality and remain there
only to support the old scripts.
Here,
- \em ListOfShapes is a list of shapes to be intersected
- \em ListOfTools is a list of shapes to intersect the shapes from
\em ListOfShapes
- \em Limit is a Type of resulting shapes
- \em KeepNonlimitShapes is a flag that allows to preserve standalone
shapes of low dimension (than \em Limit) in the result.
- Other parameters are obsolete and kept only for compatibility with
previous versions of SALOME.
<br><h2>Intersection of a Shape and a Plane.</h2> <br><h2>Intersection of a Shape and a Plane.</h2>
\image html partition2.png \image html partition2.png
\n <b>Arguments:</b> Name + a list of shapes which will be intersected <b>Arguments:</b> Name + 1 shape to be intersected + 1 cutting plane.
+ 1 cutting plane.
\n <b>Advanced option:</b> <b>Advanced option:</b>
\ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments".
\n <b>TUI Command:</b> <em> geompy.MakeHalfPartition(Shapes, <b>TUI Command:</b>
Plane),</em> where \em Shapes are a list of Shapes to be intersected
and \em Plane is a Tool shape, to intersect the \em Shapes.
\n <b>Example:</b> <em>geompy.MakeHalfPartition(Shape, Plane)</em>, where:
- \em Shape is a source shape to be intersected by the \em Plane
- \em Plane is a tool shape, to intersect the \em Shape.
<b>Examples:</b>
\image html partitionsn1.png "Box intersected by a plane" \image html partitionsn1.png "Box intersected by a plane"
\image html partitionsn2.png "Result of intersection" \image html partitionsn2.png "Result of intersection"
\anchor partition_picture_3 \anchor partition_picture_3
\image html partitionsn3.png "Result of intersection of a box and a plane (both as \em Objects, no tools) with Resulting type \em Solid and checked \em Keep \em shapes \em of \em lower \em type" \image html partitionsn3.png "Result of intersection of a box and a plane (both as \em Objects, no tools) with the Resulting type \em Solid and checked 'Keep shapes of lower type'"
Our <b>TUI Scripts</b> provide you with useful examples of the use of Our <b>TUI Scripts</b> provide you with useful examples of \ref tui_partition "Basic Operations".
\ref tui_partition "Basic Operations".
*/ */

View File

@ -17,6 +17,8 @@ holes with free boundaries on a selected face.</li>
<li>\subpage sewing_operation_page "Sewing" - sews faces or shells.</li> <li>\subpage sewing_operation_page "Sewing" - sews faces or shells.</li>
<li>\subpage glue_faces_operation_page "Glue faces" - unites <li>\subpage glue_faces_operation_page "Glue faces" - unites
coincident faces within the given tolerance.</li> coincident faces within the given tolerance.</li>
<li>\subpage limit_tolerance_operation_page "Limit Tolerance" - tries
to set new tolerance value for the given shape.</li>
<li>\subpage add_point_on_edge_operation_page "Add point on edge" - <li>\subpage add_point_on_edge_operation_page "Add point on edge" -
splits an edge in two.</li> splits an edge in two.</li>
<li>\subpage change_orientation_operation_page "Change orientation" - <li>\subpage change_orientation_operation_page "Change orientation" -

View File

@ -3,7 +3,7 @@
\page shape_processing_operation_page Shape Processing \page shape_processing_operation_page Shape Processing
\n To produce a <b>Shape Processing</b> operation in the <b>Main Menu</b> \n To produce a <b>Shape Processing</b> operation in the <b>Main Menu</b>
select <b>Repair - > Shape Processing</b>. select <b>Repair - > Shape Processing</b>.
\n This operation processes one or more shapes using various operators. \n This operation processes one or more shapes using various operators.
\n The \b Result will be a \b GEOM_Object. \n The \b Result will be a \b GEOM_Object.
@ -15,6 +15,19 @@ is a list of operators ("FixShape", "SplitClosedFaces", etc.),
etc), \em Values is a list of values of parameters placed in the same etc), \em Values is a list of values of parameters placed in the same
order as in the list of Parameters. order as in the list of Parameters.
\note <b>Shape Processing</b> is useful not only on invalid shapes,
but also on the shapes, that are classified as valid by
the <b>Check</b> functionality. Use it, if an operation (for
example, <b>Partition</b>) fails.
Example of usage:
<ol>
<li>Try to partition objects obj1 and obj2.</li>
<li>Partition fails.</li>
<li>Perform Shape Processing on objects obj1 and obj2.</li>
<li>Try to partition them again.</li>
</ol>
See also \ref tui_limit_tolerance "TUI example".
\n In this dialog box you can select the object that you need to \n In this dialog box you can select the object that you need to
process, define its name and operators applied to it during process, define its name and operators applied to it during
processing. processing.

View File

@ -31,7 +31,9 @@ of the vector.
\image html transformation2.png \image html transformation2.png
\n Finally you can define an \b Object and the vector. The object will be translated by the length of the vector. \n Finally you can define an \b Object and a vector. The object will be translated by the length of the vector.
If a curve has been selected instead of the vector, only its first and last vertices will be used to get the vector direction
and the dialog preview will display the vector along which the object will be translated.
\n <b>TUI Command:</b> <em>geompy.MakeTranslationVector(Object, Vector)</em> \n <b>TUI Command:</b> <em>geompy.MakeTranslationVector(Object, Vector)</em>
\n <b>Activate Distance</b> checkbox and <b>Distance</b> field allow defining the custom distance of translation. \n <b>Activate Distance</b> checkbox and <b>Distance</b> field allow defining the custom distance of translation.
\n <b>TUI Command </b> for translation by vector and custom distance: <em>geompy.MakeTranslationVectorDistance(Object, Vector, Distance)</em> \n <b>TUI Command </b> for translation by vector and custom distance: <em>geompy.MakeTranslationVectorDistance(Object, Vector, Distance)</em>

View File

@ -10,6 +10,10 @@ import geompy
import salome import salome
gg = salome.ImportComponentGUI("GEOM") gg = salome.ImportComponentGUI("GEOM")
#
# create edge by two points
#
# create vertices # create vertices
p0 = geompy.MakeVertex(0. , 0. , 0. ) p0 = geompy.MakeVertex(0. , 0. , 0. )
pxyz = geompy.MakeVertex(100., 100., 100.) pxyz = geompy.MakeVertex(100., 100., 100.)
@ -18,10 +22,30 @@ pxyz = geompy.MakeVertex(100., 100., 100.)
edge = geompy.MakeEdge(p0, pxyz) edge = geompy.MakeEdge(p0, pxyz)
# add object in the study # add object in the study
id_edge = geompy.addToStudy(edge,"Edge") id_edge = geompy.addToStudy(edge,"Edge_1")
# display an edge # display an edge
gg.createAndDisplayGO(id_edge) gg.createAndDisplayGO(id_edge)
#
# create edge from wire
#
# create a circle
c = geompy.MakeCircle(None, None, 100)
# create a wire
w = geompy.MakeWire([c], 1e-07)
# create an edge from wire
edge = geompy.MakeEdgeWire(w)
# add object in the study
id_edge = geompy.addToStudy(edge,"Edge_2")
# display an edge
gg.createAndDisplayGO(id_edge)
\endcode \endcode
\anchor tui_creation_wire \anchor tui_creation_wire

View File

@ -289,6 +289,43 @@ gg.createAndDisplayGO(id_glue)
gg.setDisplayMode(id_glue,1) gg.setDisplayMode(id_glue,1)
\endcode \endcode
\anchor tui_limit_tolerance
<br><h2>Limit Tolerance</h2>
\code
import geompy
gg = salome.ImportComponentGUI("GEOM")
# import initial topology
shape1 = geompy.ImportBREP("my_shape_1.brep")
shape2 = geompy.ImportBREP("my_shape_2.brep")
geompy.addToStudy(shape1, "Shape 1")
geompy.addToStudy(shape2, "Shape 2")
# perform partition
try:
part = geompy.MakePartition([shape1, shape2])
except:
# limit tolerance
tolerance = 1e-07
shape1_lt = geompy.LimitTolerance(shape1, tolerance)
shape2_lt = geompy.LimitTolerance(shape2, tolerance)
# process shape
good_shape1 = geompy.ProcessShape(shape1_lt, ["FixShape"], ["FixShape.Tolerance3d"], ["1e-7"])
good_shape2 = geompy.ProcessShape(shape2_lt, ["FixShape"], ["FixShape.Tolerance3d"], ["1e-7"])
geompy.addToStudy(good_shape1, "Shape 1 corrected")
geompy.addToStudy(good_shape2, "Shape 2 corrected")
# perform partition on corrected shapes
part = geompy.MakePartition([good_shape1, good_shape2])
pass
geompy.addToStudy(part, "Partition")
\endcode
\anchor tui_add_point_on_edge \anchor tui_add_point_on_edge
<br><h2>Add Point on Edge</h2> <br><h2>Add Point on Edge</h2>

View File

@ -99,12 +99,21 @@
\anchor swig_GetPoint \anchor swig_GetPoint
\until blocksComp (-50, -50, -50) \until blocksComp (-50, -50, -50)
\anchor swig_GetVertexNearPoint
\until near (40, 40, 40)
\anchor swig_GetEdge
\until by two points
\anchor swig_GetEdgeNearPoint \anchor swig_GetEdgeNearPoint
\until edge near point \until edge near point
\anchor swig_GetBlockByParts \anchor swig_GetBlockByParts
\until "b0 image" \until "b0 image"
\anchor swig_GetShapesNearPoint
\until "faces near point"
\anchor swig_GetShapesOnPlane \anchor swig_GetShapesOnPlane
\until Face on Plane \until Face on Plane

View File

@ -264,4 +264,4 @@ DOT_CLEANUP = YES
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration::additions related to the search engine # Configuration::additions related to the search engine
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
SEARCHENGINE = YES SEARCHENGINE = NO

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
Import: BREP|IGES|STEP|ACIS Import: BREP|IGES|STEP|ACIS
Export: BREP|IGES|IGES_5_3|STEP|STL_Bin|STL_ASCII|ACIS Export: BREP|IGES|IGES_5_3|STEP|STL_Bin|STL_ASCII|ACIS|VTK
BREP.Import: libBREPImport BREP.Import: libBREPImport
BREP.Export: libBREPExport BREP.Export: libBREPExport
@ -26,3 +26,6 @@ STL_ASCII.Pattern: STL ASCII Files ( *.stl )
ACIS.Import: libACISImport ACIS.Import: libACISImport
ACIS.Export: libACISExport ACIS.Export: libACISExport
ACIS.Pattern: ACIS Files ( *.sat ) ACIS.Pattern: ACIS Files ( *.sat )
VTK.Export: libVTKExport
VTK.Pattern: VTK Files ( *.vtk )

View File

@ -47,6 +47,7 @@ box2points.png \
boxdxyz.png \ boxdxyz.png \
build_compound.png \ build_compound.png \
build_edge.png \ build_edge.png \
build_edge_wire.png \
build_face.png \ build_face.png \
build_shell.png \ build_shell.png \
build_solid.png \ build_solid.png \
@ -93,6 +94,7 @@ filletface.png \
filling.png \ filling.png \
fuse.png \ fuse.png \
geometry.png \ geometry.png \
limit_tolerance.png \
line.png \ line.png \
line2points.png \ line2points.png \
line2faces.png \ line2faces.png \
@ -109,6 +111,7 @@ multitranslationdouble.png \
multitranslationsimple.png \ multitranslationsimple.png \
normale.png \ normale.png \
offset.png \ offset.png \
origin_and_vectors.png \
partition.png \ partition.png \
partitionkeep.png \ partitionkeep.png \
partitionplane.png \ partitionplane.png \

View File

@ -49,6 +49,8 @@
<parameter name="isos_color" value="200, 200, 200" /> <parameter name="isos_color" value="200, 200, 200" />
<parameter name="type_of_marker" value="1" /> <parameter name="type_of_marker" value="1" />
<parameter name="deflection_coeff" value="0.001" /> <parameter name="deflection_coeff" value="0.001" />
<parameter name="auto_create_base_objects" value="false" />
<parameter name="base_vectors_length" value="1" />
<parameter name="marker_scale" value="1" /> <parameter name="marker_scale" value="1" />
<!-- Input field precisions --> <!-- Input field precisions -->
<parameter name="def_precision" value="3" /> <parameter name="def_precision" value="3" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

BIN
resources/origin_and_vectors.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -427,7 +427,7 @@ void AdvancedGUI_PipeTShapeDlg::SelectionIntoArgument() {
//Find SubShape Object in Father //Find SubShape Object in Father
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study if (aFindedObject->_is_nil()) { // Object not found in study
GEOM::GEOM_IShapesOperations_var aShapesOp = GEOM::GEOM_IShapesOperations_var aShapesOp =
getGeomEngine()->GetIShapesOperations(getStudyId()); getGeomEngine()->GetIShapesOperations(getStudyId());
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);

View File

@ -288,7 +288,7 @@ void BasicGUI_ArcDlg::SelectionIntoArgument()
//Find SubShape Object in Father //Find SubShape Object in Father
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study if ( aFindedObject->_is_nil() ) { // Object not found in study
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId()); GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
} }

View File

@ -70,8 +70,8 @@ BasicGUI_CircleDlg::BasicGUI_CircleDlg( GeometryGUI* theGeometryGUI, QWidget* pa
GroupPntVecR = new DlgRef_2Sel1Spin( centralWidget() ); GroupPntVecR = new DlgRef_2Sel1Spin( centralWidget() );
GroupPntVecR->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) ); GroupPntVecR->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
GroupPntVecR->TextLabel1->setText( tr( "GEOM_CENTER_POINT" ) + " (Origin by default)" ); GroupPntVecR->TextLabel1->setText( tr( "GEOM_CENTER_POINT" ) + " " + tr( "GEOM_CENTER_DEFAULT" ) );
GroupPntVecR->TextLabel2->setText( tr( "GEOM_VECTOR" ) + " (Z axis by default)" ); GroupPntVecR->TextLabel2->setText( tr( "GEOM_VECTOR" ) + " " + tr( "GEOM_AXIS_DEFAULT" ) );
GroupPntVecR->TextLabel3->setText( tr( "GEOM_RADIUS" ) ); GroupPntVecR->TextLabel3->setText( tr( "GEOM_RADIUS" ) );
GroupPntVecR->PushButton1->setIcon( image1 ); GroupPntVecR->PushButton1->setIcon( image1 );
GroupPntVecR->PushButton2->setIcon( image1 ); GroupPntVecR->PushButton2->setIcon( image1 );
@ -358,7 +358,7 @@ void BasicGUI_CircleDlg::SelectionIntoArgument()
//Find SubShape Object in Father //Find SubShape Object in Father
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName ); GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study if ( aFindedObject->_is_nil() ) { // Object not found in study
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
} }

View File

@ -261,7 +261,7 @@ void BasicGUI_EllipseDlg::SelectionIntoArgument()
//Find SubShape Object in Father //Find SubShape Object in Father
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study if (aFindedObject->_is_nil()) { // Object not found in study
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId()); GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
} }

View File

@ -275,7 +275,7 @@ void BasicGUI_LineDlg::SelectionIntoArgument()
//Find SubShape Object in Father //Find SubShape Object in Father
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName ); GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study if ( aFindedObject->_is_nil() ) { // Object not found in study
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
} }

View File

@ -441,7 +441,7 @@ void BasicGUI_MarkerDlg::onSelectionDone()
//Find SubShape Object in Father //Find SubShape Object in Father
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObj, aName ); GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObj, aName );
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study if ( aFindedObject->_is_nil() ) { // Object not found in study
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
aSelectedObj = aShapesOp->GetSubShape( aSelectedObj, anIndex ); aSelectedObj = aShapesOp->GetSubShape( aSelectedObj, anIndex );
} }

View File

@ -470,7 +470,7 @@ void BasicGUI_PlaneDlg::SelectionIntoArgument()
//Find SubShape Object in Father //Find SubShape Object in Father
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName ); GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study if ( aFindedObject->_is_nil() ) { // Object not found in study
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
} }

View File

@ -510,8 +510,7 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
//Find SubShape Object in Father //Find SubShape Object in Father
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
if ( aFindedObject->_is_nil() ) { // Object not found in study
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
GEOM::GEOM_IShapesOperations_var aShapesOp = GEOM::GEOM_IShapesOperations_var aShapesOp =
getGeomEngine()->GetIShapesOperations(getStudyId()); getGeomEngine()->GetIShapesOperations(getStudyId());
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
@ -907,9 +906,11 @@ bool BasicGUI_PointDlg::execute( ObjectList& objects )
if ( GEOMBase::GetShape( anObj, aShape ) && !aShape.IsNull() && if ( GEOMBase::GetShape( anObj, aShape ) && !aShape.IsNull() &&
aShape.ShapeType() == TopAbs_VERTEX ) { aShape.ShapeType() == TopAbs_VERTEX ) {
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) ); gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
myX->setText( QString( "%1" ).arg( aPnt.X() ) ); SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
myY->setText( QString( "%1" ).arg( aPnt.Y() ) ); int aPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 );
myZ->setText( QString( "%1" ).arg( aPnt.Z() ) ); myX->setText( DlgRef::PrintDoubleValue( aPnt.X(), aPrecision ) );
myY->setText( DlgRef::PrintDoubleValue( aPnt.Y(), aPrecision ) );
myZ->setText( DlgRef::PrintDoubleValue( aPnt.Z(), aPrecision ) );
} }
else { else {
myX->setText( "" ); myX->setText( "" );

View File

@ -83,7 +83,7 @@ private:
GEOM::GEOM_Object_var myLine2; GEOM::GEOM_Object_var myLine2;
bool myBusy; bool myBusy;
DlgRef_3Spin* GroupXYZ; DlgRef_3Spin* GroupXYZ;
DlgRef_1Sel3Spin* GroupRefPoint; DlgRef_1Sel3Spin* GroupRefPoint;
DlgRef_1Sel1Spin* GroupOnCurve; DlgRef_1Sel1Spin* GroupOnCurve;

View File

@ -302,7 +302,7 @@ void BasicGUI_VectorDlg::SelectionIntoArgument()
//Find SubShape Object in Father //Find SubShape Object in Father
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study if (aFindedObject->_is_nil()) { // Object not found in study
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId()); GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
} }

View File

@ -269,7 +269,7 @@ void BlocksGUI_BlockDlg::SelectionIntoArgument()
//Find SubShape Object in Father //Find SubShape Object in Father
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study if (aFindedObject->_is_nil()) { // Object not found in study
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId()); GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
} }

View File

@ -261,7 +261,7 @@ void BlocksGUI_QuadFaceDlg::SelectionIntoArgument()
//Find SubShape Object in Father //Find SubShape Object in Father
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(anObj, aName); GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(anObj, aName);
if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study if (aFindedObject->_is_nil()) { // Object not found in study
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId()); GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
anObj = aShapesOp->GetSubShape(anObj, anIndex); anObj = aShapesOp->GetSubShape(anObj, anIndex);
} }

View File

@ -113,6 +113,7 @@ void BuildGUI_CompoundDlg::Init()
globalSelection( GEOM_ALLSHAPES ); globalSelection( GEOM_ALLSHAPES );
initName( tr( "GEOM_COMPOUND" ) ); initName( tr( "GEOM_COMPOUND" ) );
SelectionIntoArgument();
} }

View File

@ -36,6 +36,7 @@
#include <LightApp_SelectionMgr.h> #include <LightApp_SelectionMgr.h>
#include <GEOMImpl_Types.hxx> #include <GEOMImpl_Types.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
//================================================================================= //=================================================================================
// class : BuildGUI_EdgeDlg() // class : BuildGUI_EdgeDlg()
@ -47,38 +48,58 @@
BuildGUI_EdgeDlg::BuildGUI_EdgeDlg (GeometryGUI* theGeometryGUI, QWidget* parent) BuildGUI_EdgeDlg::BuildGUI_EdgeDlg (GeometryGUI* theGeometryGUI, QWidget* parent)
: GEOMBase_Skeleton(theGeometryGUI, parent) : GEOMBase_Skeleton(theGeometryGUI, parent)
{ {
QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_BUILD_EDGE"))); QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT"))); QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_BUILD_EDGE")));
QPixmap image2 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_BUILD_EDGE_WIRE")));
setWindowTitle(tr("GEOM_EDGE_TITLE")); setWindowTitle(tr("GEOM_EDGE_TITLE"));
/***************************************************************/ /***************************************************************/
mainFrame()->GroupConstructors->setTitle(tr("GEOM_EDGE")); mainFrame()->GroupConstructors->setTitle(tr("GEOM_EDGE"));
mainFrame()->RadioButton1->setIcon(image0); mainFrame()->RadioButton1->setIcon(image1);
mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose); mainFrame()->RadioButton2->setIcon(image2);
mainFrame()->RadioButton2->close(); mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
mainFrame()->RadioButton3->close(); mainFrame()->RadioButton3->close();
GroupPoints = new DlgRef_2Sel(centralWidget()); // two points
GroupPoints = new DlgRef_2Sel(centralWidget());
GroupPoints->GroupBox1->setTitle(tr("GEOM_POINTS")); GroupPoints->GroupBox1->setTitle(tr("GEOM_POINTS"));
GroupPoints->TextLabel1->setText(tr("GEOM_POINT_I").arg(1)); GroupPoints->TextLabel1->setText(tr("GEOM_POINT_I").arg(1));
GroupPoints->TextLabel2->setText(tr("GEOM_POINT_I").arg(2)); GroupPoints->TextLabel2->setText(tr("GEOM_POINT_I").arg(2));
GroupPoints->PushButton1->setIcon(image1); GroupPoints->PushButton1->setIcon(image0);
GroupPoints->PushButton2->setIcon(image1); GroupPoints->PushButton2->setIcon(image0);
GroupPoints->LineEdit1->setReadOnly(true); GroupPoints->LineEdit1->setReadOnly(true);
GroupPoints->LineEdit2->setReadOnly(true); GroupPoints->LineEdit2->setReadOnly(true);
// wire
GroupWire = new DlgRef_1Sel2Spin(centralWidget());
GroupWire->GroupBox1->setTitle(tr("GEOM_WIRE"));
GroupWire->TextLabel1->setText(tr("GEOM_WIRE"));
GroupWire->PushButton1->setIcon(image0);
GroupWire->LineEdit1->setReadOnly(true);
GroupWire->TextLabel2->setText( tr( "GEOM_LINEAR_TOLERANCE" ) );
GroupWire->TextLabel3->setText( tr( "GEOM_ANGULAR_TOLERANCE" ) );
double SpecificStep = 0.0001;
double prec1 = Precision::Confusion();
double prec2 = Precision::Angular();
initSpinBox(GroupWire->SpinBox_DX, prec1, MAX_NUMBER, SpecificStep, "len_tol_precision" );
initSpinBox(GroupWire->SpinBox_DY, prec2, MAX_NUMBER, SpecificStep, "ang_tol_precision" );
GroupWire->SpinBox_DX->setValue(prec1);
GroupWire->SpinBox_DY->setValue(prec2);
// layout
QVBoxLayout* layout = new QVBoxLayout(centralWidget()); QVBoxLayout* layout = new QVBoxLayout(centralWidget());
layout->setMargin(0); layout->setSpacing(6); layout->setMargin(0); layout->setSpacing(6);
layout->addWidget(GroupPoints); layout->addWidget(GroupPoints);
layout->addWidget(GroupWire);
/***************************************************************/ /***************************************************************/
setHelpFileName("create_edge_page.html"); setHelpFileName("create_edge_page.html");
// Initialisation // initialisation
Init(); Init();
} }
@ -98,28 +119,35 @@ BuildGUI_EdgeDlg::~BuildGUI_EdgeDlg()
void BuildGUI_EdgeDlg::Init() void BuildGUI_EdgeDlg::Init()
{ {
// init variables // init variables
GroupPoints->LineEdit1->setReadOnly(true); myPoint1 = myPoint2 = myWire = GEOM::GEOM_Object::_nil();
GroupPoints->LineEdit2->setReadOnly(true); myEditCurrentArgument = GroupPoints->LineEdit1;
GroupPoints->PushButton1->setDown(true);
GroupPoints->LineEdit1->setText(""); globalSelection(); // close local contexts, if any
GroupPoints->LineEdit2->setText(""); localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil();
myOkPoint1 = myOkPoint2 = false;
// signals and slots connections // signals and slots connections
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply())); connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(GroupWire->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect(GroupWire->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
initName(tr("GEOM_EDGE")); initName(tr("GEOM_EDGE"));
GroupPoints->PushButton1->click(); ConstructorsClicked( 0 );
SelectionIntoArgument();
} }
//================================================================================= //=================================================================================
@ -142,11 +170,60 @@ bool BuildGUI_EdgeDlg::ClickOnApply()
return false; return false;
initName(); initName();
// activate selection and connect selection manager
GroupPoints->PushButton1->click(); myEditCurrentArgument->setText( "" );
ConstructorsClicked( getConstructorId() );
return true; return true;
} }
//=================================================================================
// function : ConstructorsClicked()
// purpose : Radio button management
//=================================================================================
void BuildGUI_EdgeDlg::ConstructorsClicked( int constructorId )
{
switch ( constructorId ) {
case 0:
{
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
myEditCurrentArgument = GroupPoints->LineEdit1;
GroupPoints->LineEdit1->setText( "" );
GroupPoints->LineEdit2->setText( "" );
myPoint1 = GEOM::GEOM_Object::_nil();
myPoint2 = GEOM::GEOM_Object::_nil();
GroupPoints->PushButton1->setDown(true);
GroupPoints->PushButton2->setDown(false);
GroupPoints->LineEdit1->setEnabled(true);
GroupPoints->LineEdit2->setEnabled(false);
GroupPoints->show();
GroupWire->hide();
break;
}
case 1:
{
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_WIRE );
myEditCurrentArgument = GroupWire->LineEdit1;
GroupWire->LineEdit1->setText("");
myWire = GEOM::GEOM_Object::_nil();
GroupWire->PushButton1->setDown(true);
GroupWire->LineEdit1->setEnabled(true);
GroupPoints->hide();
GroupWire->show();
break;
}
}
qApp->processEvents();
updateGeometry();
resize( minimumSizeHint() );
SelectionIntoArgument();
}
//================================================================================= //=================================================================================
// function : SelectionIntoArgument() // function : SelectionIntoArgument()
// purpose : Called when selection is changed or on dialog initialization or activation // purpose : Called when selection is changed or on dialog initialization or activation
@ -161,38 +238,67 @@ void BuildGUI_EdgeDlg::SelectionIntoArgument()
aSelMgr->selectedObjects(aSelList); aSelMgr->selectedObjects(aSelList);
if (aSelList.Extent() != 1) { if (aSelList.Extent() != 1) {
if (myEditCurrentArgument == GroupPoints->LineEdit1) if (myEditCurrentArgument == GroupPoints->LineEdit1) myPoint1 = GEOM::GEOM_Object::_nil();
myOkPoint1 = false; else if (myEditCurrentArgument == GroupPoints->LineEdit2) myPoint2 = GEOM::GEOM_Object::_nil();
else if (myEditCurrentArgument == GroupPoints->LineEdit2) else if (myEditCurrentArgument == GroupWire->LineEdit1) myWire = GEOM::GEOM_Object::_nil();
myOkPoint2 = false; displayPreview();
return; return;
} }
// nbSel == 1 // nbSel == 1
Standard_Boolean testResult = Standard_False; Standard_Boolean testResult = Standard_False;
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult); GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
if (!testResult || aSelectedObject->_is_nil())
return;
myEditCurrentArgument->setText(GEOMBase::GetName(aSelectedObject)); if ( testResult && !aSelectedObject->_is_nil() ) {
QString aName = GEOMBase::GetName( aSelectedObject );
TopAbs_ShapeEnum aNeedType = myEditCurrentArgument == GroupWire->LineEdit1 ? TopAbs_WIRE : TopAbs_VERTEX;
// clear selection TopoDS_Shape aShape;
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0); if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) {
myGeomGUI->getApp()->selectionMgr()->clearSelected(); TColStd_IndexedMapOfInteger aMap;
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), aSelMgr->GetIndexes( aSelList.First(), aMap );
this, SLOT(SelectionIntoArgument())); if ( aMap.Extent() == 1 ) { // Local Selection
int anIndex = aMap( 1 );
aName += ( aNeedType == TopAbs_WIRE ? QString( ":wire_%1" ).arg( anIndex ) : QString( ":vertex_%1" ).arg( anIndex ) );
if (myEditCurrentArgument == GroupPoints->LineEdit1) { //Find SubShape Object in Father
myPoint1 = aSelectedObject; GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
myOkPoint1 = true; if ( CORBA::is_nil( aFindedObject ) ) { // Object not found in study
if (!myOkPoint2) GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
GroupPoints->PushButton2->click(); aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
} }
else if (myEditCurrentArgument == GroupPoints->LineEdit2) { else {
myPoint2 = aSelectedObject; aSelectedObject = aFindedObject; // get Object from study
myOkPoint2 = true; }
if (!myOkPoint1) }
GroupPoints->PushButton1->click(); else { // Global Selection
if ( aShape.ShapeType() != aNeedType ) {
aSelectedObject = GEOM::GEOM_Object::_nil();
aName = "";
}
}
}
myEditCurrentArgument->setText( aName );
if (!aSelectedObject->_is_nil()) { // clear selection if something selected
globalSelection();
localSelection( GEOM::GEOM_Object::_nil(), aNeedType );
}
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
myPoint1 = aSelectedObject;
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
GroupPoints->PushButton2->click();
}
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
myPoint2 = aSelectedObject;
if ( !myPoint2->_is_nil() && myPoint1->_is_nil() )
GroupPoints->PushButton1->click();
}
else if ( myEditCurrentArgument == GroupWire->LineEdit1 ) {
myWire = aSelectedObject;
}
} }
displayPreview(); displayPreview();
@ -205,7 +311,6 @@ void BuildGUI_EdgeDlg::SelectionIntoArgument()
void BuildGUI_EdgeDlg::SetEditCurrentArgument() void BuildGUI_EdgeDlg::SetEditCurrentArgument()
{ {
QPushButton* send = (QPushButton*)sender(); QPushButton* send = (QPushButton*)sender();
//globalSelection();//??
if (send == GroupPoints->PushButton1) { if (send == GroupPoints->PushButton1) {
myEditCurrentArgument = GroupPoints->LineEdit1; myEditCurrentArgument = GroupPoints->LineEdit1;
@ -217,19 +322,14 @@ void BuildGUI_EdgeDlg::SetEditCurrentArgument()
GroupPoints->PushButton1->setDown(false); GroupPoints->PushButton1->setDown(false);
GroupPoints->LineEdit1->setEnabled(false); GroupPoints->LineEdit1->setEnabled(false);
} }
else if (send == GroupWire->PushButton1) {
myEditCurrentArgument = GroupWire->LineEdit1;
}
// enable line edit // enable line edit
myEditCurrentArgument->setEnabled(true); myEditCurrentArgument->setEnabled(true);
myEditCurrentArgument->setFocus(); myEditCurrentArgument->setFocus();
// after setFocus(), because it will be setDown(false) when loses focus
send->setDown(true); send->setDown(true);
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
globalSelection(GEOM_POINT);
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
this, SLOT(SelectionIntoArgument()));
// seems we need it only to avoid preview disappearing, caused by selection mode change
displayPreview(); displayPreview();
} }
@ -240,7 +340,7 @@ void BuildGUI_EdgeDlg::SetEditCurrentArgument()
void BuildGUI_EdgeDlg::LineEditReturnPressed() void BuildGUI_EdgeDlg::LineEditReturnPressed()
{ {
QLineEdit* send = (QLineEdit*)sender(); QLineEdit* send = (QLineEdit*)sender();
if (send == GroupPoints->LineEdit1 || send == GroupPoints->LineEdit2) { if (send == GroupPoints->LineEdit1 || send == GroupPoints->LineEdit2 || send == GroupWire->LineEdit1 ) {
myEditCurrentArgument = send; myEditCurrentArgument = send;
GEOMBase_Skeleton::LineEditReturnPressed(); GEOMBase_Skeleton::LineEditReturnPressed();
} }
@ -257,7 +357,7 @@ void BuildGUI_EdgeDlg::ActivateThisDialog()
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) ); this, SLOT( SelectionIntoArgument() ) );
displayPreview(); ConstructorsClicked( getConstructorId() );
} }
//================================================================================= //=================================================================================
@ -283,9 +383,18 @@ GEOM::GEOM_IOperations_ptr BuildGUI_EdgeDlg::createOperation()
// function : isValid // function : isValid
// purpose : // purpose :
//================================================================================= //=================================================================================
bool BuildGUI_EdgeDlg::isValid (QString&) bool BuildGUI_EdgeDlg::isValid (QString& msg)
{ {
return myOkPoint1 && myOkPoint2; bool ok = false;
if ( getConstructorId() == 0 ) {
ok = !myPoint1->_is_nil() && !myPoint2->_is_nil();
}
else {
ok = !myWire->_is_nil();
ok = ok && GroupWire->SpinBox_DX->isValid( msg, !IsPreview() );
ok = ok && GroupWire->SpinBox_DY->isValid( msg, !IsPreview() );
}
return ok;
} }
//================================================================================= //=================================================================================
@ -294,11 +403,57 @@ bool BuildGUI_EdgeDlg::isValid (QString&)
//================================================================================= //=================================================================================
bool BuildGUI_EdgeDlg::execute (ObjectList& objects) bool BuildGUI_EdgeDlg::execute (ObjectList& objects)
{ {
bool res = false;
GEOM::GEOM_Object_var anObj;
GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() ); GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
GEOM::GEOM_Object_var anObj = anOper->MakeEdge(myPoint1, myPoint2);
if (!anObj->_is_nil()) switch ( getConstructorId() ) {
objects.push_back(anObj._retn()); case 0 :
{
anObj = anOper->MakeEdge( myPoint1, myPoint2 );
res = true;
break;
}
case 1:
{
double aLinearTolerance = GroupWire->SpinBox_DX->value();
double anAngularTolerance = GroupWire->SpinBox_DY->value();
QStringList aParameters;
aParameters << GroupWire->SpinBox_DX->text();
aParameters << GroupWire->SpinBox_DY->text();
anObj = anOper->MakeEdgeWire( myWire, aLinearTolerance, anAngularTolerance );
if ( !anObj->_is_nil() && !IsPreview() )
anObj->SetParameters( aParameters.join(":").toLatin1().constData() );
res = true;
break;
}
}
return true; if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() );
return res;
}
//=================================================================================
// function : addSubshapeToStudy
// purpose : virtual method to add new SubObjects if local selection
//=================================================================================
void BuildGUI_EdgeDlg::addSubshapesToStudy()
{
QMap<QString, GEOM::GEOM_Object_var> objMap;
switch ( getConstructorId() ) {
case 0 :
objMap[GroupPoints->LineEdit1->text()] = myPoint1;
objMap[GroupPoints->LineEdit2->text()] = myPoint2;
break;
case 1 :
objMap[GroupWire->LineEdit1->text()] = myWire;
break;
}
addSubshapesToFather( objMap );
} }

View File

@ -29,6 +29,7 @@
#include <GEOMBase_Skeleton.h> #include <GEOMBase_Skeleton.h>
class DlgRef_1Sel2Spin;
class DlgRef_2Sel; class DlgRef_2Sel;
//================================================================================= //=================================================================================
@ -48,19 +49,21 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation(); virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& ); virtual bool isValid( QString& );
virtual bool execute( ObjectList& ); virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
private: private:
void Init(); void Init();
void enterEvent( QEvent* ); void enterEvent( QEvent* );
private: private:
GEOM::GEOM_Object_var myPoint1, myPoint2; /* Points containing the edge */ GEOM::GEOM_Object_var myPoint1, myPoint2; /* Points containing the edge */
bool myOkPoint1; /* true when myPoint is defined */ GEOM::GEOM_Object_var myWire; /* Wire */
bool myOkPoint2;
DlgRef_2Sel* GroupPoints; DlgRef_2Sel* GroupPoints;
DlgRef_1Sel2Spin* GroupWire;
private slots: private slots:
void ConstructorsClicked( int );
void ClickOnOk(); void ClickOnOk();
bool ClickOnApply(); bool ClickOnApply();
void ActivateThisDialog(); void ActivateThisDialog();

View File

@ -117,6 +117,7 @@ void BuildGUI_SolidDlg::Init()
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
initName( tr( "GEOM_SOLID" ) ); initName( tr( "GEOM_SOLID" ) );
SelectionIntoArgument();
} }

View File

@ -36,8 +36,11 @@
#include <SUIT_Session.h> #include <SUIT_Session.h>
#include <SalomeApp_Application.h> #include <SalomeApp_Application.h>
#include <LightApp_SelectionMgr.h> #include <LightApp_SelectionMgr.h>
#include <SALOME_ListIteratorOfListIO.hxx>
#include <TColStd_MapOfInteger.hxx> #include <TColStd_MapOfInteger.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <Precision.hxx> #include <Precision.hxx>
//================================================================================= //=================================================================================
@ -63,8 +66,14 @@ BuildGUI_WireDlg::BuildGUI_WireDlg( GeometryGUI* theGeometryGUI, QWidget* parent
mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
mainFrame()->RadioButton3->close(); mainFrame()->RadioButton3->close();
GroupArgs = new DlgRef_1Sel1Spin( centralWidget() ); GroupType = new DlgRef_3Radio( centralWidget() );
GroupType->GroupBox1->setTitle( tr( "GEOM_OBJECT_TYPE" ) );
GroupType->RadioButton1->setText( tr( "GEOM_EDGE" ) );
GroupType->RadioButton2->setText( tr( "GEOM_WIRE" ) );
GroupType->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
GroupType->RadioButton3->close();
GroupArgs = new DlgRef_1Sel1Spin( centralWidget() );
GroupArgs->GroupBox1->setTitle( tr( "GEOM_WIRE_CONNECT" ) ); GroupArgs->GroupBox1->setTitle( tr( "GEOM_WIRE_CONNECT" ) );
GroupArgs->TextLabel1->setText( tr( "GEOM_OBJECTS" ) ); GroupArgs->TextLabel1->setText( tr( "GEOM_OBJECTS" ) );
GroupArgs->PushButton1->setIcon( image1 ); GroupArgs->PushButton1->setIcon( image1 );
@ -78,6 +87,7 @@ BuildGUI_WireDlg::BuildGUI_WireDlg( GeometryGUI* theGeometryGUI, QWidget* parent
QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
layout->setMargin( 0 ); layout->setSpacing( 6 ); layout->setMargin( 0 ); layout->setSpacing( 6 );
layout->addWidget( GroupType );
layout->addWidget( GroupArgs ); layout->addWidget( GroupArgs );
/***************************************************************/ /***************************************************************/
@ -107,13 +117,11 @@ void BuildGUI_WireDlg::Init()
/* init variables */ /* init variables */
myEditCurrentArgument = GroupArgs->LineEdit1; myEditCurrentArgument = GroupArgs->LineEdit1;
GroupArgs->LineEdit1->setReadOnly( true ); GroupArgs->LineEdit1->setReadOnly( true );
GroupType->RadioButton1->setChecked(true);
myOkEdgesAndWires = false; myOkEdgesAndWires = false;
TColStd_MapOfInteger aMap; localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE );
aMap.Add( GEOM_WIRE );
aMap.Add( GEOM_EDGE );
globalSelection( aMap );
/* signals and slots connections */ /* signals and slots connections */
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
@ -121,6 +129,12 @@ void BuildGUI_WireDlg::Init()
connect( GroupArgs->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); connect( GroupArgs->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
connect( GroupType->RadioButton1, SIGNAL( clicked() ), this, SLOT( TypeButtonClicked() ) );
connect( GroupType->RadioButton2, SIGNAL( clicked() ), this, SLOT( TypeButtonClicked() ) );
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
initName( tr( "GEOM_WIRE" ) ); initName( tr( "GEOM_WIRE" ) );
SelectionIntoArgument(); SelectionIntoArgument();
@ -144,13 +158,36 @@ void BuildGUI_WireDlg::ClickOnOk()
//================================================================================= //=================================================================================
bool BuildGUI_WireDlg::ClickOnApply() bool BuildGUI_WireDlg::ClickOnApply()
{ {
if ( !onAccept() ) if ( !onAccept() || !myOkEdgesAndWires )
return false; return false;
initName(); initName();
TypeButtonClicked();
myMapToStudy.clear();
myEdgesAndWires.length(0);
myOkEdgesAndWires = false;
myEditCurrentArgument->setText( "" );
return true; return true;
} }
//=================================================================================
// function : TypeBittonClicked()
// purpose : Radio button management
//=================================================================================
void BuildGUI_WireDlg::TypeButtonClicked()
{
if ( GroupType->RadioButton1->isChecked() ) {
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE );
GroupArgs->TextLabel1->setText( tr( "GEOM_EDGE" ) );
}
else if ( GroupType->RadioButton2->isChecked() ) {
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_WIRE );
GroupArgs->TextLabel1->setText( tr( "GEOM_WIRE" ) );
}
SelectionIntoArgument();
}
//================================================================================= //=================================================================================
// function : SelectionIntoArgument() // function : SelectionIntoArgument()
@ -168,14 +205,71 @@ void BuildGUI_WireDlg::SelectionIntoArgument()
myOkEdgesAndWires = false; myOkEdgesAndWires = false;
int nbSel = GEOMBase::GetNameOfSelectedIObjects(aSelList, aString); int nbSel = GEOMBase::GetNameOfSelectedIObjects(aSelList, aString);
if ( nbSel == 0 ) if ( nbSel == 0 ) {
myMapToStudy.clear();
return; return;
if ( nbSel != 1 ) }
aString = tr( "%1_objects" ).arg( nbSel );
GEOMBase::ConvertListOfIOInListOfGO(aSelList, myEdgesAndWires); TopAbs_ShapeEnum aNeedType = TopAbs_EDGE;
if ( !myEdgesAndWires.length() ) if (GroupType->RadioButton2->isChecked())
return; aNeedType = TopAbs_WIRE;
std::list<GEOM::GEOM_Object_var> aList; // subshapes list
TopoDS_Shape aShape;
Standard_Boolean aRes = Standard_False;
for (SALOME_ListIteratorOfListIO anIt (aSelList); anIt.More(); anIt.Next()) {
TColStd_IndexedMapOfInteger aMap;
GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIt.Value(), aRes );
if ( !CORBA::is_nil(aSelectedObject) && aRes && GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) {
aSelMgr->GetIndexes( anIt.Value(), aMap );
if ( aMap.Extent() > 0 ) { // local selection
for (int ind = 1; ind <= aMap.Extent(); ind++) {
aString = aSelectedObject->GetName();
int anIndex = aMap(ind);
if ( aNeedType == TopAbs_EDGE )
aString += QString( ":edge_%1" ).arg( anIndex );
else
aString += QString( ":wire_%1" ).arg( anIndex );
//Find SubShape Object in Father
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aString );
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
aList.push_back( aShapesOp->GetSubShape( aSelectedObject, anIndex ) );
myMapToStudy[aString] = aShapesOp->GetSubShape( aSelectedObject, anIndex );
}
else {
aList.push_back( aFindedObject ); // get Object from study
}
}
} else { // global selection
if ( aShape.ShapeType() == aNeedType ) {
GEOMBase::ConvertListOfIOInListOfGO(aSelList, myEdgesAndWires);
} else {
aList.clear();
myEdgesAndWires.length(0);
}
}
}
}
// convert aList in listofgo
if ( aList.size() ) {
myEdgesAndWires.length( aList.size() );
int k = 0;
for ( std::list<GEOM::GEOM_Object_var>::iterator j = aList.begin(); j != aList.end(); j++ )
myEdgesAndWires[k++] = *j;
}
if ( myEdgesAndWires.length() > 1 )
aString = tr( "%1_objects" ).arg( myEdgesAndWires.length() );
if ( !myEdgesAndWires.length() ) {
aString = "";
myMapToStudy.clear();
}
myEditCurrentArgument->setText( aString ); myEditCurrentArgument->setText( aString );
myOkEdgesAndWires = true; myOkEdgesAndWires = true;
@ -192,10 +286,7 @@ void BuildGUI_WireDlg::SetEditCurrentArgument()
if ( send != GroupArgs->PushButton1 ) if ( send != GroupArgs->PushButton1 )
return; return;
TColStd_MapOfInteger aMap; TypeButtonClicked();
aMap.Add( GEOM_WIRE );
aMap.Add( GEOM_EDGE );
globalSelection( aMap );
myEditCurrentArgument = GroupArgs->LineEdit1; myEditCurrentArgument = GroupArgs->LineEdit1;
myEditCurrentArgument->setFocus(); myEditCurrentArgument->setFocus();
@ -212,12 +303,18 @@ void BuildGUI_WireDlg::ActivateThisDialog()
GEOMBase_Skeleton::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() ) ); SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
TColStd_MapOfInteger aMap;
aMap.Add( GEOM_WIRE ); TypeButtonClicked();
aMap.Add( GEOM_EDGE );
globalSelection( aMap );
} }
//=================================================================================
// function : DeactivateActiveDialog()
// purpose : public slot to deactivate if active
//=================================================================================
void BuildGUI_WireDlg::DeactivateActiveDialog()
{
GEOMBase_Skeleton::DeactivateActiveDialog();
}
//================================================================================= //=================================================================================
// function : enterEvent() // function : enterEvent()
@ -262,3 +359,12 @@ bool BuildGUI_WireDlg::execute (ObjectList& objects)
return true; return true;
} }
//=================================================================================
// function : addSubshapeToStudy
// purpose : virtual method to add new SubObjects if local selection
//=================================================================================
void BuildGUI_WireDlg::addSubshapesToStudy()
{
addSubshapesToFather( myMapToStudy );
}

View File

@ -30,6 +30,7 @@
#include <GEOMBase_Skeleton.h> #include <GEOMBase_Skeleton.h>
class DlgRef_1Sel1Spin; class DlgRef_1Sel1Spin;
class DlgRef_3Radio;
//================================================================================= //=================================================================================
// class : BuildGUI_WireDlg // class : BuildGUI_WireDlg
@ -47,7 +48,8 @@ protected:
// redefined from GEOMBase_Helper // redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation(); virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& ); virtual bool isValid( QString& );
virtual bool execute( ObjectList& ); virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
private: private:
void Init(); void Init();
@ -58,13 +60,18 @@ private:
bool myOkEdgesAndWires; /* to check when arguments is defined */ bool myOkEdgesAndWires; /* to check when arguments is defined */
DlgRef_1Sel1Spin* GroupArgs; DlgRef_1Sel1Spin* GroupArgs;
DlgRef_3Radio* GroupType;
QMap<QString, GEOM::GEOM_Object_var> myMapToStudy;
private slots: private slots:
void ClickOnOk(); void ClickOnOk();
bool ClickOnApply(); bool ClickOnApply();
void ActivateThisDialog(); void ActivateThisDialog();
void DeactivateActiveDialog();
void SelectionIntoArgument(); void SelectionIntoArgument();
void SetEditCurrentArgument(); void SetEditCurrentArgument();
void TypeButtonClicked();
}; };
#endif // BUILDGUI_WIREDLG_H #endif // BUILDGUI_WIREDLG_H

View File

@ -342,6 +342,7 @@ void DisplayGUI::SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) { if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
SVTK_View* aView = ((SVTK_ViewWindow*)viewWindow)->getView(); SVTK_View* aView = ((SVTK_ViewWindow*)viewWindow)->getView();
aView->SetDisplayMode( mode ); aView->SetDisplayMode( mode );
GeometryGUI::Modified();
} }
else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) { else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer(); OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer();
@ -363,6 +364,7 @@ void DisplayGUI::SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
} }
ic->SetDisplayMode( newmode, Standard_False ); ic->SetDisplayMode( newmode, Standard_False );
GeometryGUI::Modified();
} }
} }
@ -413,6 +415,7 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow )
} }
} }
} }
GeometryGUI::Modified();
} }
else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) { else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
viewWindow->setCustomData( "VectorsMode", QVariant( mode ) ); viewWindow->setCustomData( "VectorsMode", QVariant( mode ) );
@ -433,6 +436,7 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow )
} }
ite.Next(); ite.Next();
} }
GeometryGUI::Modified();
} }
} }
@ -504,6 +508,7 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
} }
} }
aView->Repaint(); aView->Repaint();
GeometryGUI::Modified();
} }
else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) { else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer(); OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer();
@ -534,6 +539,7 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
} }
} }
ic->UpdateCurrentViewer(); ic->UpdateCurrentViewer();
GeometryGUI::Modified();
} }
} }

View File

@ -288,6 +288,20 @@ DlgRef_2Sel1List1Check::~DlgRef_2Sel1List1Check()
{ {
} }
//////////////////////////////////////////
// DlgRef_2Sel1List2Check
//////////////////////////////////////////
DlgRef_2Sel1List2Check::DlgRef_2Sel1List2Check( QWidget* parent, Qt::WindowFlags f )
: QWidget( parent, f )
{
setupUi( this );
}
DlgRef_2Sel1List2Check::~DlgRef_2Sel1List2Check()
{
}
////////////////////////////////////////// //////////////////////////////////////////
// DlgRef_2Sel1List // DlgRef_2Sel1List
////////////////////////////////////////// //////////////////////////////////////////
@ -781,13 +795,12 @@ QString DlgRef::PrintDoubleValue( double theValue, int thePrecision )
if ( qAbs(theValue) < prec ) if ( qAbs(theValue) < prec )
return "0"; return "0";
QString aRes; QString aRes = QLocale().toString( theValue, thePrecision >= 0 ? 'f' : 'g', qAbs( thePrecision ) );
aRes.setNum( theValue, 'g', thePrecision );
if ( prec > 0 ) { if ( prec > 0 ) {
int p = 0; int p = 0;
while ( p < thePrecision ) { while ( p < thePrecision ) {
aRes.setNum( theValue, 'g', p++ ); QString aRes = QLocale().toString( theValue, thePrecision >= 0 ? 'f' : 'g', qAbs( p++ ) );
double v = aRes.toDouble(); double v = aRes.toDouble();
double err = qAbs( theValue - v ); double err = qAbs( theValue - v );
if ( err > 0 && err <= prec ) if ( err > 0 && err <= prec )
@ -796,21 +809,19 @@ QString DlgRef::PrintDoubleValue( double theValue, int thePrecision )
} }
// remove trailing zeroes // remove trailing zeroes
QString delim( "." );
int idx = aRes.lastIndexOf( delim ); QRegExp expre( QString( "(%1|%2)[+-]?[0-9]+$" ).arg( QLocale().exponential().toLower(),
if ( idx == -1 ) QLocale().exponential().toUpper() ) );
return aRes;
QString iPart = aRes.left( idx ); int idx = aRes.indexOf( expre );
QString fPart = aRes.mid( idx + 1 ); QString aResExp = "";
if ( idx >= 0 ) {
aResExp = aRes.mid( idx );
aRes = aRes.left( idx );
}
while ( !fPart.isEmpty() && fPart.at( fPart.length() - 1 ) == '0' ) if ( aRes.contains( QLocale().decimalPoint() ) )
fPart.remove( fPart.length() - 1, 1 ); aRes.remove( QRegExp( QString( "(\\%1|0)0*$" ).arg( QLocale().decimalPoint() ) ) );
aRes = iPart; return aRes == "-0" ? QString( "0" ) : aRes + aResExp;
if ( !fPart.isEmpty() )
aRes += delim + fPart;
return aRes;
} }

View File

@ -339,6 +339,22 @@ public:
~DlgRef_2Sel1List1Check(); ~DlgRef_2Sel1List1Check();
}; };
//////////////////////////////////////////
// DlgRef_2Sel1List2Check
//////////////////////////////////////////
#include "ui_DlgRef_2Sel1List2Check_QTD.h"
class DLGREF_EXPORT DlgRef_2Sel1List2Check : public QWidget,
public Ui::DlgRef_2Sel1List2Check_QTD
{
Q_OBJECT
public:
DlgRef_2Sel1List2Check( QWidget* = 0, Qt::WindowFlags = 0 );
~DlgRef_2Sel1List2Check();
};
////////////////////////////////////////// //////////////////////////////////////////
// DlgRef_2Sel1List // DlgRef_2Sel1List
////////////////////////////////////////// //////////////////////////////////////////

View File

@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DlgRef_2Sel1List2Check_QTD</class>
<widget class="QWidget" name="DlgRef_2Sel1List2Check_QTD">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>127</width>
<height>140</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QGridLayout">
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QGroupBox" name="GroupBox1">
<property name="title">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="TextLabel1">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL1</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="PushButton1">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLineEdit" name="LineEdit1"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="TextLabel2">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL2</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="PushButton2">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="LineEdit2"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="TextLabel3">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TL3</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="QComboBox" name="ComboBox1">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3">
<widget class="QCheckBox" name="CheckButton1">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="4" column="0" colspan="3">
<widget class="QCheckBox" name="CheckButton2">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
<tabstops>
<tabstop>PushButton1</tabstop>
<tabstop>LineEdit1</tabstop>
<tabstop>PushButton2</tabstop>
<tabstop>LineEdit2</tabstop>
<tabstop>ComboBox1</tabstop>
<tabstop>CheckButton1</tabstop>
<tabstop>CheckButton2</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>

View File

@ -55,6 +55,7 @@ UIC_FILES = \
ui_DlgRef_1SelExt_QTD.h \ ui_DlgRef_1SelExt_QTD.h \
ui_DlgRef_1Spin_QTD.h \ ui_DlgRef_1Spin_QTD.h \
ui_DlgRef_2Sel1List1Check_QTD.h \ ui_DlgRef_2Sel1List1Check_QTD.h \
ui_DlgRef_2Sel1List2Check_QTD.h \
ui_DlgRef_2Sel1List_QTD.h \ ui_DlgRef_2Sel1List_QTD.h \
ui_DlgRef_2Sel1Spin2Check_QTD.h \ ui_DlgRef_2Sel1Spin2Check_QTD.h \
ui_DlgRef_2Sel1Spin_QTD.h \ ui_DlgRef_2Sel1Spin_QTD.h \

View File

@ -39,14 +39,17 @@
#include <LightApp_Application.h> #include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h> #include <LightApp_SelectionMgr.h>
#include <BRep_Tool.hxx> //#include <BRep_Tool.hxx>
#include <TopExp.hxx> //#include <TopExp.hxx>
#include <TopExp_Explorer.hxx> //#include <TopExp_Explorer.hxx>
#include <TopoDS_Vertex.hxx> //#include <TopoDS_Vertex.hxx>
#include <TopoDS.hxx> //#include <TopoDS.hxx>
#include <TColStd_IndexedMapOfInteger.hxx> #include <TColStd_IndexedMapOfInteger.hxx>
#include <BRepBuilderAPI_Transform.hxx> //#include <BRepBuilderAPI_Transform.hxx>
#include <BRepBuilderAPI_MakeWire.hxx> //#include <BRepBuilderAPI_MakeWire.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRepBuilderAPI_MakePolygon.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
class Locker class Locker
{ {
@ -596,13 +599,48 @@ void EntityGUI_3DSketcherDlg::displayPreview( GEOM::GEOM_Object_ptr object,
// Function : createShapes // Function : createShapes
// Purpose : Create applyed wire, and last segment from entry object // Purpose : Create applyed wire, and last segment from entry object
//================================================================ //================================================================
bool EntityGUI_3DSketcherDlg::createShapes( GEOM::GEOM_Object_ptr theObject, bool EntityGUI_3DSketcherDlg::createShapes( GEOM::GEOM_Object_ptr /*theObject*/,
TopoDS_Shape& theApplyedWire, TopoDS_Shape& theApplyedWire,
TopoDS_Shape& theLastSegment ) TopoDS_Shape& theLastSegment )
{ {
QList<gp_Pnt> points;
foreach( XYZ xyz, myPointsList) {
gp_Pnt p(xyz.x, xyz.y, xyz.z);
if ( points.isEmpty() || points.last().Distance(p) > gp::Resolution())
points << p;
}
if ( points.count() == 1 ) {
// only one point is created
BRepBuilderAPI_MakeVertex mkVertex (points.last());
theApplyedWire = mkVertex.Shape();
}
else if ( points.count() > 1 ) {
// wire is created
BRepBuilderAPI_MakePolygon mkWire;
foreach( gp_Pnt p, points )
mkWire.Add(p);
theApplyedWire = mkWire.Shape();
}
XYZ curxyz = getCurrentPoint();
gp_Pnt curpnt(curxyz.x, curxyz.y, curxyz.z);
if ( points.isEmpty() || points.last().Distance(curpnt) <= gp::Resolution() ) {
BRepBuilderAPI_MakeVertex mkVertex (curpnt);
theLastSegment = mkVertex.Shape();
}
else {
BRepBuilderAPI_MakeEdge mkEdge(points.last(), curpnt);
theLastSegment = mkEdge.Shape();
}
/* VSR: old algorithm does not work properly, see bug 0020899
TopoDS_Shape aShape; TopoDS_Shape aShape;
if ( !GEOMBase::GetShape( theObject, aShape ) || if ( !GEOMBase::GetShape( theObject, aShape ) )
aShape.ShapeType() != TopAbs_WIRE && aShape.ShapeType() != TopAbs_VERTEX ) return false;
if( aShape.ShapeType() != TopAbs_WIRE && aShape.ShapeType() != TopAbs_VERTEX )
return false; return false;
theApplyedWire = aShape; theApplyedWire = aShape;
@ -628,7 +666,8 @@ bool EntityGUI_3DSketcherDlg::createShapes( GEOM::GEOM_Object_ptr theObject,
else if ( !theLastSegment.IsNull() ) { else if ( !theLastSegment.IsNull() ) {
TopExp_Explorer vertexExp( theLastSegment, TopAbs_VERTEX ); TopExp_Explorer vertexExp( theLastSegment, TopAbs_VERTEX );
theApplyedWire = vertexExp.Current(); theApplyedWire = vertexExp.Current();
} }
*/
return true; return true;
} }

View File

@ -1454,7 +1454,7 @@ void EntityGUI_SketcherDlg::ActivateThisDialog()
//================================================================================= //=================================================================================
void EntityGUI_SketcherDlg::enterEvent( QEvent* ) void EntityGUI_SketcherDlg::enterEvent( QEvent* )
{ {
if ( !MainWidget->GroupConstructors->isEnabled() ) if ( !isEnabled() )
ActivateThisDialog(); ActivateThisDialog();
} }

View File

@ -189,10 +189,12 @@ GEOM_Engine::GEOM_Engine()
GEOM_Engine::~GEOM_Engine() GEOM_Engine::~GEOM_Engine()
{ {
GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It(_objects); GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It(_objects);
std::list< Handle(GEOM_Object) > objs;
for(; It.More(); It.Next()) for(; It.More(); It.Next())
{ objs.push_back( Handle(GEOM_Object)::DownCast(It.Value()) );
RemoveObject(Handle(GEOM_Object)::DownCast(It.Value())); std::list< Handle(GEOM_Object) >::iterator objit;
} for(objit = objs.begin(); objit != objs.end(); ++objit)
RemoveObject(*objit);
//Close all documents not closed //Close all documents not closed
for(Interface_DataMapIteratorOfDataMapOfIntegerTransient anItr(_mapIDDocument); anItr.More(); anItr.Next()) for(Interface_DataMapIteratorOfDataMapOfIntegerTransient anItr(_mapIDDocument); anItr.More(); anItr.Next())
@ -310,7 +312,7 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
Handle(TColStd_HArray1OfInteger) theIndices, Handle(TColStd_HArray1OfInteger) theIndices,
bool isStandaloneOperation) bool isStandaloneOperation)
{ {
if(theMainShape.IsNull() || theIndices.IsNull()) return NULL; if (theMainShape.IsNull() || theIndices.IsNull()) return NULL;
Handle(TDocStd_Document) aDoc = GetDocument(theMainShape->GetDocID()); Handle(TDocStd_Document) aDoc = GetDocument(theMainShape->GetDocID());
Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main()); Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
@ -319,21 +321,6 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
// if this label has been freed (object deleted) // if this label has been freed (object deleted)
bool useExisting = false; bool useExisting = false;
TDF_Label aChild; TDF_Label aChild;
/*
if (!_lastCleared.IsNull()) {
if (_lastCleared.Root() == aDoc->Main().Root()) {
useExisting = true;
aChild = _lastCleared;
// 0020229: if next label exists and is empty, try to reuse it
Standard_Integer aNextTag = aChild.Tag() + 1;
TDF_Label aNextL = aDoc->Main().FindChild(aNextTag, Standard_False);
if (!aNextL.IsNull() && !aNextL.HasAttribute())
_lastCleared = aNextL;
else
_lastCleared.Nullify();
}
}
*/
int aDocID = theMainShape->GetDocID(); int aDocID = theMainShape->GetDocID();
if (_freeLabels.find(aDocID) != _freeLabels.end()) { if (_freeLabels.find(aDocID) != _freeLabels.end()) {
std::list<TDF_Label>& aFreeLabels = _freeLabels[aDocID]; std::list<TDF_Label>& aFreeLabels = _freeLabels[aDocID];
@ -349,10 +336,10 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
} }
Handle(GEOM_Function) aMainShape = theMainShape->GetLastFunction(); Handle(GEOM_Function) aMainShape = theMainShape->GetLastFunction();
Handle(GEOM_Object) anObject = new GEOM_Object(aChild, 28); //28 is SUBSHAPE type Handle(GEOM_Object) anObject = new GEOM_Object (aChild, 28); //28 is SUBSHAPE type
Handle(GEOM_Function) aFunction = anObject->AddFunction(GEOM_Object::GetSubShapeID(), 1); Handle(GEOM_Function) aFunction = anObject->AddFunction(GEOM_Object::GetSubShapeID(), 1);
GEOM_ISubShape aSSI(aFunction); GEOM_ISubShape aSSI (aFunction);
aSSI.SetMainShape(aMainShape); aSSI.SetMainShape(aMainShape);
aSSI.SetIndices(theIndices); aSSI.SetIndices(theIndices);
@ -372,11 +359,14 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
return NULL; return NULL;
} }
//Put an object in the map of created objects // Put an object in the map of created objects
TCollection_AsciiString anID = BuildIDFromObject(anObject); TCollection_AsciiString anID = BuildIDFromObject(anObject);
if(_objects.IsBound(anID)) _objects.UnBind(anID); if (_objects.IsBound(anID)) _objects.UnBind(anID);
_objects.Bind(anID, anObject); _objects.Bind(anID, anObject);
// Put this subshape in the list of subshapes of theMainShape
aMainShape->AddSubShapeReference(aFunction);
GEOM::TPythonDump pd (aFunction); GEOM::TPythonDump pd (aFunction);
if (isStandaloneOperation) { if (isStandaloneOperation) {
@ -410,9 +400,19 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_Object) theObject)
TCollection_AsciiString anID = BuildIDFromObject(theObject); TCollection_AsciiString anID = BuildIDFromObject(theObject);
if (_objects.IsBound(anID)) _objects.UnBind(anID); if (_objects.IsBound(anID)) _objects.UnBind(anID);
// If subshape, remove it from the list of subshapes of its main shape
if (!theObject->IsMainShape()) {
Handle(GEOM_Function) aFunction = theObject->GetFunction(1);
GEOM_ISubShape aSSI (aFunction);
Handle(GEOM_Function) aMainShape = aSSI.GetMainShape();
//If main shape is not null, then remove
if(!aMainShape.IsNull())
aMainShape->RemoveSubShapeReference(aFunction);
}
int nb = theObject->GetNbFunctions(); int nb = theObject->GetNbFunctions();
Handle(TDataStd_TreeNode) aNode; Handle(TDataStd_TreeNode) aNode;
for (int i = 1; i<=nb; i++) { for (int i = 1; i <= nb; i++) {
Handle(GEOM_Function) aFunction = theObject->GetFunction(i); Handle(GEOM_Function) aFunction = theObject->GetFunction(i);
if (aFunction->GetEntry().FindAttribute(GEOM_Function::GetFunctionTreeID(), aNode)) if (aFunction->GetEntry().FindAttribute(GEOM_Function::GetFunctionTreeID(), aNode))
aNode->Remove(); aNode->Remove();
@ -627,9 +627,11 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
for ( ; anEntryToCommand != anEntryToCommandMap.end(); ++anEntryToCommand ) for ( ; anEntryToCommand != anEntryToCommandMap.end(); ++anEntryToCommand )
aFuncScript += (char*)anEntryToCommand->second.c_str(); aFuncScript += (char*)anEntryToCommand->second.c_str();
// PTv, 0020001 add result objects from RestoreSubShapes into ignore list, // PTv, 0020001 add result objects from RestoreGivenSubShapes into ignore list,
// because they will be published during command execution // because they will be published during command execution
int indx = anAfterScript.Search( "RestoreSubShapes" ); int indx = anAfterScript.Search( "RestoreGivenSubShapes" );
if ( indx == -1 )
indx = anAfterScript.Search( "RestoreSubShapes" );
if ( indx != -1 ) { if ( indx != -1 ) {
TCollection_AsciiString aSubStr = anAfterScript.SubString(1, indx); TCollection_AsciiString aSubStr = anAfterScript.SubString(1, indx);
Handle(TColStd_HSequenceOfInteger) aSeq = FindEntries(aSubStr); Handle(TColStd_HSequenceOfInteger) aSeq = FindEntries(aSubStr);
@ -922,9 +924,11 @@ bool ProcessFunction(Handle(GEOM_Function)& theFunction,
// 0020001 PTv, check for critical functions, which requier dump of objects // 0020001 PTv, check for critical functions, which requier dump of objects
if (theIsPublished) if (theIsPublished)
{ {
// currently, there is only one function "RestoreSubShapes", // currently, there is only one function "RestoreGivenSubShapes",
// later this check could be replaced by iterations on list of such functions // later this check could be replaced by iterations on list of such functions
if (aDescr.Search( "RestoreSubShapes" ) != -1) if (aDescr.Search( "RestoreGivenSubShapes" ) != -1)
theIsDumpCollected = true;
else if (aDescr.Search( "RestoreSubShapes" ) != -1)
theIsDumpCollected = true; theIsDumpCollected = true;
} }
@ -935,7 +939,9 @@ bool ProcessFunction(Handle(GEOM_Function)& theFunction,
bool isBefore = true; bool isBefore = true;
TCollection_AsciiString aSubStr = aDescr.Token("\n\t", i++); TCollection_AsciiString aSubStr = aDescr.Token("\n\t", i++);
while (!aSubStr.IsEmpty()) { while (!aSubStr.IsEmpty()) {
if (isBefore && aSubStr.Search( "RestoreSubShapes" ) == -1) if (isBefore &&
aSubStr.Search( "RestoreGivenSubShapes" ) == -1 &&
aSubStr.Search( "RestoreSubShapes" ) == -1)
theScript += TCollection_AsciiString("\n\t") + aSubStr; theScript += TCollection_AsciiString("\n\t") + aSubStr;
else else
theAfterScript += TCollection_AsciiString("\n\t") + aSubStr; theAfterScript += TCollection_AsciiString("\n\t") + aSubStr;

View File

@ -18,7 +18,6 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // 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
//
#include <Standard_Stream.hxx> #include <Standard_Stream.hxx>
@ -43,6 +42,7 @@
#include <TDataStd_UAttribute.hxx> #include <TDataStd_UAttribute.hxx>
#include <TDataStd_ChildNodeIterator.hxx> #include <TDataStd_ChildNodeIterator.hxx>
#include <TDataStd_ExtStringArray.hxx> #include <TDataStd_ExtStringArray.hxx>
#include <TDataStd_ExtStringList.hxx>
#include <TDocStd_Owner.hxx> #include <TDocStd_Owner.hxx>
#include <TDocStd_Document.hxx> #include <TDocStd_Document.hxx>
#include <TFunction_Function.hxx> #include <TFunction_Function.hxx>
@ -64,6 +64,8 @@
#define RESULT_LABEL 2 #define RESULT_LABEL 2
#define DESCRIPTION_LABEL 3 #define DESCRIPTION_LABEL 3
#define HISTORY_LABEL 4 #define HISTORY_LABEL 4
#define SUBSHAPES_LABEL 5 // 0020756: GetGroups
#define NAMING_LABEL 6 // 002020750: Naming during STEP import
#define ARGUMENTS _label.FindChild((ARGUMENT_LABEL)) #define ARGUMENTS _label.FindChild((ARGUMENT_LABEL))
#define ARGUMENT(thePosition) _label.FindChild((ARGUMENT_LABEL)).FindChild((thePosition)) #define ARGUMENT(thePosition) _label.FindChild((ARGUMENT_LABEL)).FindChild((thePosition))
@ -471,8 +473,8 @@ TCollection_AsciiString GEOM_Function::GetString(int thePosition)
void GEOM_Function::SetReference(int thePosition, Handle(GEOM_Function) theReference) void GEOM_Function::SetReference(int thePosition, Handle(GEOM_Function) theReference)
{ {
_isDone = false; _isDone = false;
if(thePosition <= 0) return; if (thePosition <= 0) return;
if(theReference.IsNull()) return; if (theReference.IsNull()) return;
TDF_Label anArgLabel = ARGUMENT(thePosition); TDF_Label anArgLabel = ARGUMENT(thePosition);
TDF_Reference::Set(anArgLabel, theReference->GetEntry()); TDF_Reference::Set(anArgLabel, theReference->GetEntry());
TDataStd_UAttribute::Set(anArgLabel, GetDependencyID()); TDataStd_UAttribute::Set(anArgLabel, GetDependencyID());
@ -670,6 +672,85 @@ void GEOM_Function::GetDependency(TDF_LabelSequence& theSeq)
} }
} }
//=============================================================================
/*!
* AddSubShapeReference
*/
//=============================================================================
void GEOM_Function::AddSubShapeReference(Handle(GEOM_Function) theSubShape)
{
_isDone = false;
TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
Handle(TDataStd_ExtStringList) aList;
if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) {
aList = new TDataStd_ExtStringList;
aSubShapesLabel.AddAttribute(aList);
}
TCollection_AsciiString anEntry;
TDF_Tool::Entry(theSubShape->GetOwnerEntry(), anEntry);
aList->Append(anEntry);
_isDone = true;
}
//=============================================================================
/*!
* RemoveSubShapeReference
*/
//=============================================================================
void GEOM_Function::RemoveSubShapeReference(Handle(GEOM_Function) theSubShape)
{
_isDone = false;
TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
Handle(TDataStd_ExtStringList) aList;
if (aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) {
TCollection_AsciiString anEntry;
TDF_Tool::Entry(theSubShape->GetOwnerEntry(), anEntry);
aList->Remove(anEntry);
}
_isDone = true;
}
//=============================================================================
/*!
* HasSubShapeReferences
*/
//=============================================================================
bool GEOM_Function::HasSubShapeReferences()
{
_isDone = true;
TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
return aSubShapesLabel.IsAttribute(TDataStd_ExtStringList::GetID());
}
//=============================================================================
/*!
* GetSubShapeReferences
*/
//=============================================================================
const TDataStd_ListOfExtendedString& GEOM_Function::GetSubShapeReferences()
{
_isDone = false;
TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
Handle(TDataStd_ExtStringList) aList;
if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) {
aList = new TDataStd_ExtStringList;
aSubShapesLabel.AddAttribute(aList);
}
_isDone = true;
return aList->List();
}
//============================================================================= //=============================================================================
/*! /*!
* GetHistoryEntry * GetHistoryEntry
@ -713,6 +794,16 @@ TDF_Label GEOM_Function::GetArgumentHistoryEntry (const TDF_Label& theArgu
return aHistoryCurLabel; return aHistoryCurLabel;
} }
//=============================================================================
/*!
* GetNamingEntry
*/
//=============================================================================
TDF_Label GEOM_Function::GetNamingEntry (const Standard_Boolean create)
{
return _label.FindChild(NAMING_LABEL, create);
}
//======================================================================= //=======================================================================
//function : GEOM_Function_Type_ //function : GEOM_Function_Type_
//purpose : //purpose :
@ -721,10 +812,9 @@ Standard_EXPORT Handle_Standard_Type& GEOM_Function_Type_()
{ {
static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared); static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared);
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared); if (aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient); static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient); if (aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL}; static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
static Handle_Standard_Type _aType = new Standard_Type("GEOM_Function", static Handle_Standard_Type _aType = new Standard_Type("GEOM_Function",
@ -751,5 +841,5 @@ const Handle(GEOM_Function) Handle(GEOM_Function)::DownCast(const Handle(Standar
} }
} }
return _anOtherObject ; return _anOtherObject;
} }

View File

@ -18,7 +18,6 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // 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
//
#ifndef _GEOM_Function_HeaderFile #ifndef _GEOM_Function_HeaderFile
#define _GEOM_Function_HeaderFile #define _GEOM_Function_HeaderFile
@ -34,10 +33,10 @@
#endif #endif
#ifndef _Handle_MMgt_TShared_HeaderFile #ifndef _Handle_MMgt_TShared_HeaderFile
#include <Handle_MMgt_TShared.hxx> #include <Handle_MMgt_TShared.hxx>
#endif #endif
#ifndef _MMgt_TShared_HeaderFile #ifndef _MMgt_TShared_HeaderFile
#include <MMgt_TShared.hxx> #include <MMgt_TShared.hxx>
#endif #endif
#ifndef _Standard_GUID_HeaderFile #ifndef _Standard_GUID_HeaderFile
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#endif #endif
@ -65,31 +64,31 @@ class Handle(MMgt_TShared);
class GEOM_Function; class GEOM_Function;
#include <TCollection_AsciiString.hxx> #include <TCollection_AsciiString.hxx>
#include <TDataStd_ListOfExtendedString.hxx>
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOM_Function); Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOM_Function);
class Handle(GEOM_Function) : public Handle(MMgt_TShared) { class Handle(GEOM_Function) : public Handle(MMgt_TShared) {
public: public:
inline void* operator new(size_t,void* anAddress) inline void* operator new(size_t,void* anAddress)
{ {
return anAddress; return anAddress;
} }
inline void* operator new(size_t size) inline void* operator new(size_t size)
{ {
return Standard::Allocate(size); return Standard::Allocate(size);
} }
inline void operator delete(void *anAddress) inline void operator delete(void *anAddress)
{ {
if (anAddress) Standard::Free((Standard_Address&)anAddress); if (anAddress) Standard::Free((Standard_Address&)anAddress);
} }
Handle(GEOM_Function)():Handle(MMgt_TShared)() {} Handle(GEOM_Function)():Handle(MMgt_TShared)() {}
Handle(GEOM_Function)(const Handle(GEOM_Function)& aHandle) : Handle(MMgt_TShared)(aHandle) Handle(GEOM_Function)(const Handle(GEOM_Function)& aHandle) : Handle(MMgt_TShared)(aHandle)
{ {
} }
Handle(GEOM_Function)(const GEOM_Function* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem) Handle(GEOM_Function)(const GEOM_Function* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem)
{ {
} }
@ -105,18 +104,18 @@ class Handle(GEOM_Function) : public Handle(MMgt_TShared) {
return *this; return *this;
} }
GEOM_Function* operator->() GEOM_Function* operator->()
{ {
return (GEOM_Function *)ControlAccess(); return (GEOM_Function *)ControlAccess();
} }
GEOM_Function* operator->() const GEOM_Function* operator->() const
{ {
return (GEOM_Function *)ControlAccess(); return (GEOM_Function *)ControlAccess();
} }
Standard_EXPORT ~Handle(GEOM_Function)() {}; Standard_EXPORT ~Handle(GEOM_Function)() {};
Standard_EXPORT static const Handle(GEOM_Function) DownCast(const Handle(Standard_Transient)& AnObject); Standard_EXPORT static const Handle(GEOM_Function) DownCast(const Handle(Standard_Transient)& AnObject);
}; };
@ -125,24 +124,26 @@ class GEOM_Function : public MMgt_TShared
public: public:
inline void* operator new(size_t,void* anAddress) inline void* operator new(size_t,void* anAddress)
{ {
return anAddress; return anAddress;
} }
inline void* operator new(size_t size) inline void* operator new(size_t size)
{ {
return Standard::Allocate(size); return Standard::Allocate(size);
} }
inline void operator delete(void *anAddress) inline void operator delete(void *anAddress)
{ {
if (anAddress) Standard::Free((Standard_Address&)anAddress); if (anAddress) Standard::Free((Standard_Address&)anAddress);
} }
// Type management // Type management
// //
Standard_EXPORT friend Handle_Standard_Type& GEOM_Function_Type_(); Standard_EXPORT friend Handle_Standard_Type& GEOM_Function_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOM_Function) ; } Standard_EXPORT const Handle(Standard_Type)& DynamicType() const
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOM_Function) == AType || MMgt_TShared::IsKind(AType)); } { return STANDARD_TYPE(GEOM_Function) ; }
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const
{ return (STANDARD_TYPE(GEOM_Function) == AType || MMgt_TShared::IsKind(AType)); }
private: private:
@ -150,22 +151,22 @@ private:
public: public:
//Returns a GUID for a function tree //Returns a GUID for a function tree
Standard_EXPORT static const Standard_GUID& GetFunctionTreeID(); Standard_EXPORT static const Standard_GUID& GetFunctionTreeID();
//Returns the ID which is associated with a reference to another function //Returns the ID which is associated with a reference to another function
Standard_EXPORT static const Standard_GUID& GetDependencyID(); Standard_EXPORT static const Standard_GUID& GetDependencyID();
//Finds and returns a function located on a label theEntry //Finds and returns a function located on a label theEntry
Standard_EXPORT static Handle(GEOM_Function) GetFunction(const TDF_Label& theEntry); Standard_EXPORT static Handle(GEOM_Function) GetFunction(const TDF_Label& theEntry);
Standard_EXPORT GEOM_Function(const TDF_Label& theEntry, const Standard_GUID& theGUID, int theType); Standard_EXPORT GEOM_Function(const TDF_Label& theEntry, const Standard_GUID& theGUID, int theType);
Standard_EXPORT ~GEOM_Function() {;} Standard_EXPORT ~GEOM_Function() {;}
Standard_EXPORT TDF_Label GetOwnerEntry(); Standard_EXPORT TDF_Label GetOwnerEntry();
//Access to properties //Access to properties
//Returns a result of the function built by the function Driver //Returns a result of the function built by the function Driver
Standard_EXPORT TopoDS_Shape GetValue(); Standard_EXPORT TopoDS_Shape GetValue();
@ -177,7 +178,7 @@ public:
Standard_EXPORT TDF_Label& GetEntry() { return _label; } Standard_EXPORT TDF_Label& GetEntry() { return _label; }
//Returns the type of the function //Returns the type of the function
Standard_EXPORT int GetType(); Standard_EXPORT int GetType();
//Returns a function Driver GUID //Returns a function Driver GUID
Standard_EXPORT Standard_GUID GetDriverGUID(); Standard_EXPORT Standard_GUID GetDriverGUID();
@ -185,8 +186,8 @@ public:
//Returns aPython description of the function //Returns aPython description of the function
Standard_EXPORT TCollection_AsciiString GetDescription(); Standard_EXPORT TCollection_AsciiString GetDescription();
//Sets aPython description of the function //Sets aPython description of the function
Standard_EXPORT void SetDescription(const TCollection_AsciiString& theDescription); Standard_EXPORT void SetDescription(const TCollection_AsciiString& theDescription);
//Access to arguments //Access to arguments
@ -206,8 +207,8 @@ public:
Standard_EXPORT void SetInteger(int thePosition, int theValue); Standard_EXPORT void SetInteger(int thePosition, int theValue);
//Returns an integer argument at position thePosition //Returns an integer argument at position thePosition
Standard_EXPORT int GetInteger(int thePosition); Standard_EXPORT int GetInteger(int thePosition);
//Sets an integer array argument at position thePosition //Sets an integer array argument at position thePosition
Standard_EXPORT void SetIntegerArray(int thePosition, const Handle(TColStd_HArray1OfInteger)& theArray); Standard_EXPORT void SetIntegerArray(int thePosition, const Handle(TColStd_HArray1OfInteger)& theArray);
@ -221,18 +222,18 @@ public:
Standard_EXPORT void SetString(int thePosition, const TCollection_AsciiString& theValue); Standard_EXPORT void SetString(int thePosition, const TCollection_AsciiString& theValue);
//Returns a string argument at position thePosition //Returns a string argument at position thePosition
Standard_EXPORT TCollection_AsciiString GetString(int thePosition); Standard_EXPORT TCollection_AsciiString GetString(int thePosition);
//Returns a reference to other function argument at position thePosition //Returns a reference to other function argument at position thePosition
Standard_EXPORT Handle(GEOM_Function) GetReference(int thePosition); Standard_EXPORT Handle(GEOM_Function) GetReference(int thePosition);
//Set an array of ExtendedString //Set an array of ExtendedString
Standard_EXPORT void SetStringArray(int thePosition, const Handle(TColStd_HArray1OfExtendedString)& theArray); Standard_EXPORT void SetStringArray(int thePosition, const Handle(TColStd_HArray1OfExtendedString)& theArray);
//Returns the array of ExtendedString //Returns the array of ExtendedString
Standard_EXPORT Handle(TColStd_HArray1OfExtendedString) GetStringArray(int thePosition); Standard_EXPORT Handle(TColStd_HArray1OfExtendedString) GetStringArray(int thePosition);
//Returns a GUID for a references tree //Returns a GUID for a references tree
Standard_EXPORT static const Standard_GUID& GetReferencesTreeID(); Standard_EXPORT static const Standard_GUID& GetReferencesTreeID();
//Sets a list of references to other function arguments at position thePosition //Sets a list of references to other function arguments at position thePosition
@ -240,33 +241,41 @@ public:
const Handle(TColStd_HSequenceOfTransient)& theRefList); const Handle(TColStd_HSequenceOfTransient)& theRefList);
//Returns a list of references to other function arguments at position thePosition //Returns a list of references to other function arguments at position thePosition
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetReferenceList (int thePosition); Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetReferenceList (int thePosition);
//Sets a TopoDS_Shape argument at position thePosition //Sets a TopoDS_Shape argument at position thePosition
//void SetShape(int thePosition, const TopoDS_Shape& theShape); //void SetShape(int thePosition, const TopoDS_Shape& theShape);
//Returns a TopoDS_Shape argument at position thePosition //Returns a TopoDS_Shape argument at position thePosition
//TopoDS_Shape GetShape(int thePosition); //TopoDS_Shape GetShape(int thePosition);
//Returns true if the last method succided //Returns true if the last method succided
Standard_EXPORT bool IsDone() { return _isDone; } Standard_EXPORT bool IsDone() { return _isDone; }
//Returns a sequence of the external dependencies of this function //Returns a sequence of the external dependencies of this function
Standard_EXPORT void GetDependency(TDF_LabelSequence& theSeq); Standard_EXPORT void GetDependency(TDF_LabelSequence& theSeq);
// Add/Remove/Check/Get subshape references
Standard_EXPORT void AddSubShapeReference (Handle(GEOM_Function) theSubShape);
Standard_EXPORT void RemoveSubShapeReference(Handle(GEOM_Function) theSubShape);
Standard_EXPORT bool HasSubShapeReferences();
Standard_EXPORT const TDataStd_ListOfExtendedString& GetSubShapeReferences();
//Returns top label of this function's history tree //Returns top label of this function's history tree
Standard_EXPORT TDF_Label GetHistoryEntry (const Standard_Boolean create = Standard_True); Standard_EXPORT TDF_Label GetHistoryEntry (const Standard_Boolean create = Standard_True);
//Returns history label, corresponding to the label, //Returns history label, corresponding to the label,
//on which a reference on argument is stored //on which a reference on argument is stored
Standard_EXPORT TDF_Label GetArgumentHistoryEntry (const TDF_Label& theArgumentRefEntry, Standard_EXPORT TDF_Label GetArgumentHistoryEntry (const TDF_Label& theArgumentRefEntry,
const Standard_Boolean create = Standard_True); const Standard_Boolean create = Standard_True);
//Returns top label of this function's naming tree
Standard_EXPORT TDF_Label GetNamingEntry (const Standard_Boolean create = Standard_True);
private: private:
TDF_Label _label;
TDF_Label _label; bool _isDone;
bool _isDone;
}; };
#endif #endif

View File

@ -19,18 +19,16 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// NOTE: This is an intreface to a function for the Shapes
// (Wire, Face, Shell, Solid and Compound) creation.
// NOTE: This is an intreface to a function for the Shapes
// (Wire, Face, Shell, Solid and Compound) creation.
//
#include "GEOM_Function.hxx" #include "GEOM_Function.hxx"
#include "TColStd_HSequenceOfTransient.hxx" #include "TColStd_HSequenceOfTransient.hxx"
#include "TColStd_HArray1OfInteger.hxx" #include "TColStd_HArray1OfInteger.hxx"
#define SHAPE_ARG_MAIN_SHAPE 1 #define SHAPE_ARG_MAIN_SHAPE 1
#define SHAPE_ARG_INDICES 2 #define SHAPE_ARG_INDICES 2
#define SHAPE_ARG_SORTED 3
class GEOM_ISubShape class GEOM_ISubShape
{ {

View File

@ -73,7 +73,7 @@ libGEOMbasic_la_CPPFLAGS = \
libGEOMbasic_la_LDFLAGS = \ libGEOMbasic_la_LDFLAGS = \
$(CORBA_LIBS) \ $(CORBA_LIBS) \
$(KERNEL_LDFLAGS) -lSALOMELocalTrace \ $(KERNEL_LDFLAGS) -lSALOMELocalTrace -lSALOMEBasics \
$(STDLIB) \ $(STDLIB) \
$(CAS_LDPATH) -lTKXSBase \ $(CAS_LDPATH) -lTKXSBase \
$(CAS_OCAF) \ $(CAS_OCAF) \

View File

@ -291,9 +291,15 @@ TopoDS_Shape BlockFix_UnionEdges::Perform(const TopoDS_Shape& Shape,
TopoDS_Shape aResult = myContext->Apply(Shape); TopoDS_Shape aResult = myContext->Apply(Shape);
// processing each solid // processing each solid
TopExp_Explorer exps; TopAbs_ShapeEnum aType = TopAbs_SOLID;
for(exps.Init(Shape, TopAbs_SOLID); exps.More(); exps.Next()) { TopExp_Explorer exps (Shape, aType);
TopoDS_Solid aSolid = TopoDS::Solid(exps.Current()); if (!exps.More()) {
aType = TopAbs_SHELL;
exps.Init(Shape, aType);
}
for (; exps.More(); exps.Next()) {
//TopoDS_Solid aSolid = TopoDS::Solid(exps.Current());
TopoDS_Shape aSolid = exps.Current();
TopTools_IndexedMapOfShape ChangedFaces; TopTools_IndexedMapOfShape ChangedFaces;
@ -307,21 +313,21 @@ TopoDS_Shape BlockFix_UnionEdges::Perform(const TopoDS_Shape& Shape,
// processing each face // processing each face
TopExp_Explorer exp; TopExp_Explorer exp;
for(exp.Init(aRes, TopAbs_FACE); exp.More(); exp.Next()) { for (exp.Init(aRes, TopAbs_FACE); exp.More(); exp.Next()) {
TopoDS_Face aFace = TopoDS_Face aFace =
TopoDS::Face(aContext->Apply(exp.Current().Oriented(TopAbs_FORWARD))); TopoDS::Face(aContext->Apply(exp.Current().Oriented(TopAbs_FORWARD)));
TopTools_IndexedDataMapOfShapeListOfShape aMapFacesEdges; TopTools_IndexedDataMapOfShapeListOfShape aMapFacesEdges;
for(TopExp_Explorer expe(aFace,TopAbs_EDGE); expe.More(); expe.Next()) { for (TopExp_Explorer expe(aFace,TopAbs_EDGE); expe.More(); expe.Next()) {
TopoDS_Edge edge = TopoDS::Edge(expe.Current()); TopoDS_Edge edge = TopoDS::Edge(expe.Current());
if(!aMapEdgeFaces.Contains(edge)) continue; if (!aMapEdgeFaces.Contains(edge)) continue;
const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge); const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge);
TopTools_ListIteratorOfListOfShape anIter(aList); TopTools_ListIteratorOfListOfShape anIter(aList);
for( ; anIter.More(); anIter.Next()) { for ( ; anIter.More(); anIter.Next()) {
TopoDS_Face face = TopoDS::Face(anIter.Value()); TopoDS_Face face = TopoDS::Face(anIter.Value());
TopoDS_Face face1 = TopoDS::Face(aContext->Apply(anIter.Value())); TopoDS_Face face1 = TopoDS::Face(aContext->Apply(anIter.Value()));
if(face1.IsSame(aFace)) continue; if (face1.IsSame(aFace)) continue;
if(aMapFacesEdges.Contains(face)) { if (aMapFacesEdges.Contains(face)) {
aMapFacesEdges.ChangeFromKey(face).Append(edge); aMapFacesEdges.ChangeFromKey(face).Append(edge);
} }
else { else {
@ -332,27 +338,27 @@ TopoDS_Shape BlockFix_UnionEdges::Perform(const TopoDS_Shape& Shape,
} }
} }
for(Standard_Integer i=1; i<=aMapFacesEdges.Extent(); i++) { for (Standard_Integer i=1; i<=aMapFacesEdges.Extent(); i++) {
const TopTools_ListOfShape& ListEdges = aMapFacesEdges.FindFromIndex(i); const TopTools_ListOfShape& ListEdges = aMapFacesEdges.FindFromIndex(i);
TopTools_SequenceOfShape SeqEdges; TopTools_SequenceOfShape SeqEdges;
TopTools_ListIteratorOfListOfShape anIter(ListEdges); TopTools_ListIteratorOfListOfShape anIter(ListEdges);
for( ; anIter.More(); anIter.Next()) { for ( ; anIter.More(); anIter.Next()) {
SeqEdges.Append(anIter.Value()); SeqEdges.Append(anIter.Value());
} }
if(SeqEdges.Length()==1) continue; if (SeqEdges.Length()==1) continue;
TopoDS_Edge E; TopoDS_Edge E;
if( MergeEdges(SeqEdges,aFace,Tol,E) ) { if ( MergeEdges(SeqEdges,aFace,Tol,E) ) {
// now we have only one edge - aChain.Value(1) // now we have only one edge - aChain.Value(1)
// we have to replace old ListEdges with this new edge // we have to replace old ListEdges with this new edge
aContext->Replace(SeqEdges(1),E); aContext->Replace(SeqEdges(1),E);
for(Standard_Integer j=2; j<=SeqEdges.Length(); j++) { for (Standard_Integer j=2; j<=SeqEdges.Length(); j++) {
aContext->Remove(SeqEdges(j)); aContext->Remove(SeqEdges(j));
} }
TopoDS_Face tmpF = TopoDS::Face(exp.Current()); TopoDS_Face tmpF = TopoDS::Face(exp.Current());
if( !ChangedFaces.Contains(tmpF) ) if ( !ChangedFaces.Contains(tmpF) )
ChangedFaces.Add(tmpF); ChangedFaces.Add(tmpF);
tmpF = TopoDS::Face(aMapFacesEdges.FindKey(i)); tmpF = TopoDS::Face(aMapFacesEdges.FindKey(i));
if( !ChangedFaces.Contains(tmpF) ) if ( !ChangedFaces.Contains(tmpF) )
ChangedFaces.Add(tmpF); ChangedFaces.Add(tmpF);
} }
} }
@ -360,7 +366,7 @@ TopoDS_Shape BlockFix_UnionEdges::Perform(const TopoDS_Shape& Shape,
} // end processing each face } // end processing each face
// fix changed faces and replace them in the local context // fix changed faces and replace them in the local context
for(Standard_Integer i=1; i<=ChangedFaces.Extent(); i++) { for (Standard_Integer i=1; i<=ChangedFaces.Extent(); i++) {
TopoDS_Face aFace = TopoDS::Face(aContext->Apply(ChangedFaces.FindKey(i))); TopoDS_Face aFace = TopoDS::Face(aContext->Apply(ChangedFaces.FindKey(i)));
Handle(ShapeFix_Face) sff = new ShapeFix_Face(aFace); Handle(ShapeFix_Face) sff = new ShapeFix_Face(aFace);
sff->SetContext(myContext); sff->SetContext(myContext);
@ -371,11 +377,11 @@ TopoDS_Shape BlockFix_UnionEdges::Perform(const TopoDS_Shape& Shape,
aContext->Replace(aFace,sff->Face()); aContext->Replace(aFace,sff->Face());
} }
if(ChangedFaces.Extent()>0) { if (ChangedFaces.Extent() > 0) {
// fix changed shell and replace it in the local context // fix changed shell and replace it in the local context
TopoDS_Shape aRes1 = aContext->Apply(aRes); TopoDS_Shape aRes1 = aContext->Apply(aRes);
TopExp_Explorer expsh; TopExp_Explorer expsh;
for(expsh.Init(aRes1, TopAbs_SHELL); expsh.More(); expsh.Next()) { for (expsh.Init(aRes1, TopAbs_SHELL); expsh.More(); expsh.Next()) {
TopoDS_Shell aShell = TopoDS::Shell(expsh.Current()); TopoDS_Shell aShell = TopoDS::Shell(expsh.Current());
Handle(ShapeFix_Shell) sfsh = new ShapeFix_Shell; Handle(ShapeFix_Shell) sfsh = new ShapeFix_Shell;
sfsh->FixFaceOrientation(aShell); sfsh->FixFaceOrientation(aShell);

View File

@ -19,12 +19,11 @@
-- --
-- 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: GEOMAlgo.cdl -- File: GEOMAlgo.cdl
-- Created: Sat Dec 04 12:36:22 2004 -- Created: Sat Dec 04 12:36:22 2004
-- Author: Peter KURNEV -- Author: Peter KURNEV
-- <peter@PREFEX> -- <peter@PREFEX>
--
package GEOMAlgo package GEOMAlgo
---Purpose: ---Purpose:
@ -117,7 +116,7 @@ is
deferred class Clsf; deferred class Clsf;
class ClsfSurf; class ClsfSurf;
class ClsfBox; class ClsfBox;
class FinderShapeOn2; --class FinderShapeOn2;
class PassKeyShapeMapHasher; class PassKeyShapeMapHasher;
-- --
-- classes -- classes
@ -131,7 +130,8 @@ is
-- gluer -- gluer
class Gluer; class Gluer;
class Gluer1; class Gluer1;
class GlueAnalyser; class GlueAnalyser;
class CoupleOfShapes; class CoupleOfShapes;
class PassKey; class PassKey;
class PassKeyMapHasher; class PassKeyMapHasher;
@ -146,20 +146,14 @@ is
class ShellSolid; class ShellSolid;
class VertexSolid; class VertexSolid;
class SolidSolid; class SolidSolid;
class FinderShapeOn; --class FinderShapeOn;
-- --
class FinderShapeOn1; --class FinderShapeOn1;
class StateCollector; class StateCollector;
-- adds
deferred class HAlgo;
deferred class Clsf;
class ClsfSurf;
class ClsfBox;
--modified by NIZNHY-PKV Mon Jan 29 10:27:44 2007f
class ClsfSolid; class ClsfSolid;
--modified by NIZNHY-PKV Mon Jan 29 10:27:46 2007t -- class FinderShapeOn2;
class FinderShapeOn2; -- class PassKeyShapeMapHasher;
class PassKeyShapeMapHasher;
-- --
-- Builder/Splitter -- Builder/Splitter
deferred class BuilderShape; deferred class BuilderShape;
@ -177,6 +171,7 @@ is
class WireSplitter; class WireSplitter;
class WireEdgeSet; class WireEdgeSet;
class WESCorrector; class WESCorrector;
class WESScaler;
-- --
-- Pointers -- Pointers
-- --
@ -243,20 +238,9 @@ is
Shape from TopoDS, Shape from TopoDS,
PassKeyShapeMapHasher from GEOMAlgo); PassKeyShapeMapHasher from GEOMAlgo);
class DataMapOfShapeShapeSet instantiates class DataMapOfOrientedShapeShape instantiates
DataMap from TCollection(Shape from TopoDS, DataMap from TCollection (Shape from TopoDS,
ShapeSet from GEOMAlgo, Shape from TopoDS,
ShapeMapHasher from TopTools); OrientedShapeMapHasher from TopTools);
class DataMapOfShapeReal instantiates
DataMap from TCollection(Shape from TopoDS,
Real from Standard,
ShapeMapHasher from TopTools);
class DataMapOfRealListOfShape instantiates
DataMap from TCollection(Real from Standard,
ListOfShape from TopTools,
MapRealHasher from TColStd);
end GEOMAlgo; end GEOMAlgo;

View File

@ -1,4 +1,4 @@
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
// //
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS

View File

@ -0,0 +1,112 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// 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 _GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
#define _GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
#ifndef _TCollection_BasicMapIterator_HeaderFile
#include <TCollection_BasicMapIterator.hxx>
#endif
#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
#endif
class Standard_NoSuchObject;
class TopoDS_Shape;
class TopTools_OrientedShapeMapHasher;
class GEOMAlgo_DataMapOfOrientedShapeShape;
class GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape;
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
class GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape : public TCollection_BasicMapIterator {
public:
void* operator new(size_t,void* anAddress)
{
return anAddress;
}
void* operator new(size_t size)
{
return Standard::Allocate(size);
}
void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC
//
Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape();
Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape(const GEOMAlgo_DataMapOfOrientedShapeShape& aMap);
Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfOrientedShapeShape& aMap) ;
Standard_EXPORT const TopoDS_Shape& Key() const;
Standard_EXPORT const TopoDS_Shape& Value() const;
protected:
// Methods PROTECTED
//
// Fields PROTECTED
//
private:
// Methods PRIVATE
//
// Fields PRIVATE
//
};
// other Inline functions and methods (like "C++: function call" methods)
//
#endif

View File

@ -0,0 +1,54 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// 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
//
#include <GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx>
#ifndef _Standard_NoSuchObject_HeaderFile
#include <Standard_NoSuchObject.hxx>
#endif
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _TopTools_OrientedShapeMapHasher_HeaderFile
#include <TopTools_OrientedShapeMapHasher.hxx>
#endif
#ifndef _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
#include <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
#endif
#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
#include <GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
#endif
#define TheKey TopoDS_Shape
#define TheKey_hxx <TopoDS_Shape.hxx>
#define TheItem TopoDS_Shape
#define TheItem_hxx <TopoDS_Shape.hxx>
#define Hasher TopTools_OrientedShapeMapHasher
#define Hasher_hxx <TopTools_OrientedShapeMapHasher.hxx>
#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape
#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx>
#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_Type_()
#define TCollection_DataMap GEOMAlgo_DataMapOfOrientedShapeShape
#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
#include <TCollection_DataMapIterator.gxx>

View File

@ -0,0 +1,128 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// 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 _GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
#define _GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
#endif
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _TCollection_MapNode_HeaderFile
#include <TCollection_MapNode.hxx>
#endif
#ifndef _TCollection_MapNodePtr_HeaderFile
#include <TCollection_MapNodePtr.hxx>
#endif
class TopoDS_Shape;
class TopTools_OrientedShapeMapHasher;
class GEOMAlgo_DataMapOfOrientedShapeShape;
class GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape;
class GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape : public TCollection_MapNode {
public:
// Methods PUBLIC
//
GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape(const TopoDS_Shape& K,const TopoDS_Shape& I,const TCollection_MapNodePtr& n);
TopoDS_Shape& Key() const;
TopoDS_Shape& Value() const;
//Standard_EXPORT ~GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape();
// Type management
//
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Methods PROTECTED
//
// Fields PROTECTED
//
private:
// Methods PRIVATE
//
// Fields PRIVATE
//
TopoDS_Shape myKey;
TopoDS_Shape myValue;
};
#define TheKey TopoDS_Shape
#define TheKey_hxx <TopoDS_Shape.hxx>
#define TheItem TopoDS_Shape
#define TheItem_hxx <TopoDS_Shape.hxx>
#define Hasher TopTools_OrientedShapeMapHasher
#define Hasher_hxx <TopTools_OrientedShapeMapHasher.hxx>
#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape
#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx>
#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_Type_()
#define TCollection_DataMap GEOMAlgo_DataMapOfOrientedShapeShape
#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
#include <TCollection_DataMapNode.lxx>
#undef TheKey
#undef TheKey_hxx
#undef TheItem
#undef TheItem_hxx
#undef Hasher
#undef Hasher_hxx
#undef TCollection_DataMapNode
#undef TCollection_DataMapNode_hxx
#undef TCollection_DataMapIterator
#undef TCollection_DataMapIterator_hxx
#undef Handle_TCollection_DataMapNode
#undef TCollection_DataMapNode_Type_
#undef TCollection_DataMap
#undef TCollection_DataMap_hxx
// other Inline functions and methods (like "C++: function call" methods)
//
#endif

View File

@ -0,0 +1,100 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// 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
//
#include <GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
#ifndef _Standard_TypeMismatch_HeaderFile
#include <Standard_TypeMismatch.hxx>
#endif
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _TopTools_OrientedShapeMapHasher_HeaderFile
#include <TopTools_OrientedShapeMapHasher.hxx>
#endif
#ifndef _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
#include <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
#endif
#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
#include <GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx>
#endif
//GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape::~GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape() {}
Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_Type_()
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape",
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape),
1,
(Standard_Address)_Ancestors,
(Standard_Address)NULL);
return _aType;
}
// DownCast method
// allow safe downcasting
//
const Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape) Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape) _anOtherObject;
if (!AnObject.IsNull()) {
if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape))) {
_anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)&)AnObject);
}
}
return _anOtherObject ;
}
const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape::DynamicType() const
{
return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape) ;
}
//Standard_Boolean GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape::IsKind(const Handle(Standard_Type)& AType) const
//{
// return (STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape) == AType || TCollection_MapNode::IsKind(AType));
//}
//Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape::~Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape() {}
#define TheKey TopoDS_Shape
#define TheKey_hxx <TopoDS_Shape.hxx>
#define TheItem TopoDS_Shape
#define TheItem_hxx <TopoDS_Shape.hxx>
#define Hasher TopTools_OrientedShapeMapHasher
#define Hasher_hxx <TopTools_OrientedShapeMapHasher.hxx>
#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape
#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx>
#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_Type_()
#define TCollection_DataMap GEOMAlgo_DataMapOfOrientedShapeShape
#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
#include <TCollection_DataMapNode.gxx>

View File

@ -0,0 +1,154 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// 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 _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
#define _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
#ifndef _TCollection_BasicMap_HeaderFile
#include <TCollection_BasicMap.hxx>
#endif
#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
class Standard_DomainError;
class Standard_NoSuchObject;
class TopoDS_Shape;
class TopTools_OrientedShapeMapHasher;
class GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape;
class GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape;
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
class GEOMAlgo_DataMapOfOrientedShapeShape : public TCollection_BasicMap {
public:
void* operator new(size_t,void* anAddress)
{
return anAddress;
}
void* operator new(size_t size)
{
return Standard::Allocate(size);
}
void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC
//
Standard_EXPORT GEOMAlgo_DataMapOfOrientedShapeShape(const Standard_Integer NbBuckets = 1);
Standard_EXPORT GEOMAlgo_DataMapOfOrientedShapeShape& Assign(const GEOMAlgo_DataMapOfOrientedShapeShape& Other) ;
GEOMAlgo_DataMapOfOrientedShapeShape& operator =(const GEOMAlgo_DataMapOfOrientedShapeShape& Other)
{
return Assign(Other);
}
Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
Standard_EXPORT void Clear() ;
~GEOMAlgo_DataMapOfOrientedShapeShape()
{
Clear();
}
Standard_EXPORT Standard_Boolean Bind(const TopoDS_Shape& K,const TopoDS_Shape& I) ;
Standard_EXPORT Standard_Boolean IsBound(const TopoDS_Shape& K) const;
Standard_EXPORT Standard_Boolean UnBind(const TopoDS_Shape& K) ;
Standard_EXPORT const TopoDS_Shape& Find(const TopoDS_Shape& K) const;
const TopoDS_Shape& operator()(const TopoDS_Shape& K) const
{
return Find(K);
}
Standard_EXPORT TopoDS_Shape& ChangeFind(const TopoDS_Shape& K) ;
TopoDS_Shape& operator()(const TopoDS_Shape& K)
{
return ChangeFind(K);
}
protected:
// Methods PROTECTED
//
// Fields PROTECTED
//
private:
// Methods PRIVATE
//
Standard_EXPORT GEOMAlgo_DataMapOfOrientedShapeShape(const GEOMAlgo_DataMapOfOrientedShapeShape& Other);
// Fields PRIVATE
//
};
// other Inline functions and methods (like "C++: function call" methods)
//
#endif

View File

@ -0,0 +1,57 @@
// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// 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
//
#include <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
#ifndef _Standard_DomainError_HeaderFile
#include <Standard_DomainError.hxx>
#endif
#ifndef _Standard_NoSuchObject_HeaderFile
#include <Standard_NoSuchObject.hxx>
#endif
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _TopTools_OrientedShapeMapHasher_HeaderFile
#include <TopTools_OrientedShapeMapHasher.hxx>
#endif
#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
#include <GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
#endif
#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
#include <GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx>
#endif
#define TheKey TopoDS_Shape
#define TheKey_hxx <TopoDS_Shape.hxx>
#define TheItem TopoDS_Shape
#define TheItem_hxx <TopoDS_Shape.hxx>
#define Hasher TopTools_OrientedShapeMapHasher
#define Hasher_hxx <TopTools_OrientedShapeMapHasher.hxx>
#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape
#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx>
#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_Type_()
#define TCollection_DataMap GEOMAlgo_DataMapOfOrientedShapeShape
#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
#include <TCollection_DataMap.gxx>

View File

@ -1,4 +1,4 @@
-- Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -- Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-- --
-- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS

View File

@ -1,23 +1,24 @@
// File generated by CPPExt (Value) // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
// //
// Copyright (C) 1991 - 2000 by // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// Matra Datavision SA. All rights reserved. // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// //
// Copyright (C) 2001 - 2004 by // This library is free software; you can redistribute it and/or
// Open CASCADE SA. All rights reserved. // modify it under the terms of the GNU Lesser General Public
// // License as published by the Free Software Foundation; either
// This file is part of the Open CASCADE Technology software. // 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
// //
// This software may be distributed and/or modified under the terms and
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
// and appearing in the file LICENSE included in the packaging of this file.
//
// This software is distributed on an "AS IS" basis, without warranty of any
// kind, and Open CASCADE SA hereby disclaims all such warranties,
// including without limitation, any warranties of merchantability, fitness
// for a particular purpose or non-infringement. Please see the License for
// the specific terms and conditions governing rights and limitations under the
// License.
#ifndef _GEOMAlgo_Tools_HeaderFile #ifndef _GEOMAlgo_Tools_HeaderFile
#define _GEOMAlgo_Tools_HeaderFile #define _GEOMAlgo_Tools_HeaderFile

Some files were not shown because too many files have changed in this diff Show More