Merge from V5_1_main branch 24/11/2010
@ -19,6 +19,7 @@
|
||||
|
||||
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(BlocksGUI BlocksGUI ${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(NMTDS NMTDS ${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(PrimitiveGUI PrimitiveGUI ${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(STLExport STLExport ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(TransformationGUI TransformationGUI ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(VTKExport VTKExport ${GEOM_ROOT_DIR}/lib/salome)
|
||||
|
@ -28,6 +28,7 @@ nodist_salomescript_DATA = VERSION
|
||||
|
||||
# python files
|
||||
dist_salomescript_PYTHON = \
|
||||
addvars2notebook_GEOM.py \
|
||||
geom_setenv.py
|
||||
|
||||
# distributed files
|
||||
|
50
bin/addvars2notebook_GEOM.py
Normal 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
|
35
configure.ac
@ -24,7 +24,7 @@
|
||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
||||
# 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_CANONICAL_HOST
|
||||
AC_CANONICAL_TARGET
|
||||
@ -282,6 +282,7 @@ if test "${gui_ok}" = "yes"; then
|
||||
echo
|
||||
|
||||
CHECK_QT
|
||||
fi
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
@ -290,7 +291,6 @@ if test "${gui_ok}" = "yes"; then
|
||||
echo
|
||||
|
||||
CHECK_VTK
|
||||
fi
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
@ -324,6 +324,13 @@ echo
|
||||
|
||||
CHECK_HTML_GENERATORS
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo testing sphinx
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
CHECK_SPHINX
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo Testing Kernel
|
||||
@ -341,11 +348,11 @@ echo
|
||||
echo Configure
|
||||
|
||||
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
|
||||
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
|
||||
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
|
||||
|
||||
for var in $variables
|
||||
@ -376,6 +383,19 @@ echo
|
||||
# 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
|
||||
# when adding a new file <filename>.in to manage. When you execute
|
||||
# autoscan, the Makefile list is generated in the output file configure.scan.
|
||||
@ -389,6 +409,7 @@ AC_OUTPUT([ \
|
||||
bin/Makefile \
|
||||
GEOM_version.h \
|
||||
doc/Makefile \
|
||||
doc/docutils/Makefile \
|
||||
doc/salome/Makefile \
|
||||
doc/salome/gui/Makefile \
|
||||
doc/salome/gui/GEOM/Makefile \
|
||||
@ -423,6 +444,8 @@ AC_OUTPUT([ \
|
||||
src/GEOM_I_Superv/Makefile \
|
||||
src/GEOM_SWIG/Makefile \
|
||||
src/GEOM_SWIG_WITHIHM/Makefile \
|
||||
src/GEOM_PY/Makefile \
|
||||
src/GEOM_PY/structelem/Makefile \
|
||||
src/GenerationGUI/Makefile \
|
||||
src/GroupGUI/Makefile \
|
||||
src/IGESExport/Makefile \
|
||||
@ -431,6 +454,7 @@ AC_OUTPUT([ \
|
||||
src/NMTDS/Makefile \
|
||||
src/NMTTools/Makefile \
|
||||
src/OBJECT/Makefile \
|
||||
src/OCC2VTK/Makefile \
|
||||
src/OperationGUI/Makefile \
|
||||
src/PrimitiveGUI/Makefile \
|
||||
src/RepairGUI/Makefile \
|
||||
@ -440,6 +464,7 @@ AC_OUTPUT([ \
|
||||
src/STLExport/Makefile \
|
||||
src/ShHealOper/Makefile \
|
||||
src/TransformationGUI/Makefile \
|
||||
src/VTKExport/Makefile \
|
||||
resources/Makefile \
|
||||
resources/GEOMCatalog.xml \
|
||||
idl/Makefile \
|
||||
|
@ -24,7 +24,7 @@
|
||||
# $Header$
|
||||
# source path
|
||||
#
|
||||
SUBDIRS = salome
|
||||
SUBDIRS = salome docutils
|
||||
|
||||
usr_docs:
|
||||
(cd salome && $(MAKE) $(AM_MAKEFLAGS) usr_docs)
|
||||
|
93
doc/docutils/Makefile.am
Normal 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
@ -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
@ -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:
|
BIN
doc/docutils/images/salome-geom-structuralelements.png
Normal file
After Width: | Height: | Size: 168 KiB |
14
doc/docutils/index.rst
Normal 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
@ -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``.
|
@ -56,7 +56,7 @@ clean-local:
|
||||
@for filen in `find . -maxdepth 1` ; do \
|
||||
case $${filen} in \
|
||||
./Makefile | ./doxyfile | ./doxyfile_py | ./doxyfile_tui ) ;; \
|
||||
. | .. ) ;; \
|
||||
. | .. | ./static ) ;; \
|
||||
*) echo "Removing $${filen}" ; rm -rf $${filen} ;; \
|
||||
esac ; \
|
||||
done ;
|
||||
@ -67,7 +67,7 @@ install-data-local: usr_docs
|
||||
case $${filen} in \
|
||||
./Makefile | ./doxyfile | ./doxyfile_py | ./doxyfile_tui ) ;; \
|
||||
./doxyfile.bak | ./doxyfile_py.bak | ./doxyfile_tui.bak ) ;; \
|
||||
. | .. ) ;; \
|
||||
. | .. | ./static ) ;; \
|
||||
*) echo "Installing $${filen}" ; cp -rp $${filen} $(DESTDIR)$(docdir)/gui/GEOM ;; \
|
||||
esac ; \
|
||||
done ;
|
||||
|
@ -72,3 +72,4 @@ GENERATE_RTF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES = geompy_doc.tag=geompy_doc
|
||||
ALLEXTERNALS = NO
|
||||
SEARCHENGINE = YES
|
||||
|
@ -159,3 +159,4 @@ DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_TAGFILE = geompy_doc.tag
|
||||
TAGFILES = tui_examples.tag=..
|
||||
SEARCHENGINE = YES
|
||||
|
@ -53,7 +53,7 @@ HTML_FOOTER = @srcdir@/static/footer.html
|
||||
HTML_STYLESHEET = @srcdir@/static/doxygen.css
|
||||
TOC_EXPAND = YES
|
||||
DISABLE_INDEX = NO
|
||||
GENERATE_TREEVIEW = YES
|
||||
GENERATE_TREEVIEW = NO
|
||||
TREEVIEW_WIDTH = 300
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
@ -70,3 +70,4 @@ GENERATE_RTF = NO
|
||||
#External reference options
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_TAGFILE = tui_examples.tag
|
||||
SEARCHENGINE = YES
|
||||
|
BIN
doc/salome/gui/GEOM/images/edge1.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
doc/salome/gui/GEOM/images/edge2.png
Normal file
After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 86 KiB |
BIN
doc/salome/gui/GEOM/images/get_in_place_lost_part.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
doc/salome/gui/GEOM/images/limit_tolerance_dlg.png
Normal file
After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 26 KiB |
BIN
doc/salome/gui/GEOM/images/salome-geom-structuralelements.png
Normal file
After Width: | Height: | Size: 168 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 28 KiB |
@ -3,7 +3,7 @@
|
||||
\page chamfer_operation_page Chamfer
|
||||
|
||||
\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 The \b Result will be a \b GEOM_Object.
|
||||
|
@ -2,21 +2,46 @@
|
||||
|
||||
\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
|
||||
Vertex1 and Vertex2 are correspondingly the first and the last vertex
|
||||
of the edge.
|
||||
<b>TUI Command:</b> <em>geompy.MakeEdge(Vertex1, Vertex2)</em><br>
|
||||
<b>Arguments:</b> Name + 2 vertices (Vertex1 and Vertex2 are
|
||||
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"
|
||||
|
||||
|
@ -18,8 +18,8 @@ shell, solid or compsolid).
|
||||
\n <b> Both Directions </b> checkbox allows extruiding the source
|
||||
object both forward and backward.
|
||||
\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
|
||||
shell) serving as base object + 1 vector (for direction of the
|
||||
\n <b>Arguments:</b> Name + one or several shapes (vertex, edge, planar wire, face or
|
||||
shell) serving as base objects + 1 vector (for direction of the
|
||||
extrusion) + 1 value (dimension).
|
||||
|
||||
\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
|
||||
object both forward and backward.
|
||||
\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
|
||||
shell) serving as base object + 2 vertices.
|
||||
\n <b>Arguments:</b> Name + one or several shapes (vertex, edge, planar wire, face or
|
||||
shell) serving as base objects + 2 vertices.
|
||||
|
||||
\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
|
||||
source objects both forward and backward.
|
||||
\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
|
||||
shell) serving as base object + 3 axis directions.
|
||||
\n <b>Arguments:</b> Name + one or several shapes (vertex, edge, planar wire, face or
|
||||
shell) serving as base objects + 3 axis directions.
|
||||
|
||||
\image html extrusion3.png
|
||||
|
||||
|
@ -4,39 +4,38 @@
|
||||
|
||||
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:
|
||||
\n <b>Input Compound</b> - the list of edges/wires used for creation
|
||||
of the surface. Before perform filling algorithm each wire from
|
||||
compound is converted to one edge created on BSpline curve built using
|
||||
curves from all edges from wire.
|
||||
of the surface. To prepare for the filling each wire of the compound
|
||||
is converted to an edge created on a BSpline curve built using curves
|
||||
from all edges of the wire.
|
||||
\n \b Minimum and <b>Maximum Degree</b> of equation of the resulting
|
||||
BSpline or Besier curves describing the surface;
|
||||
\n \b Tolerance for \b 2D and for \b 3D - minimum distance between the
|
||||
created surface and the reference edge;
|
||||
\n <b>Number of
|
||||
Iterations</b> - defines the maximum number of iterations. The
|
||||
\n <b>Number of Iterations</b> - defines the maximum number of iterations. The
|
||||
iterations are repeated until the required tolerance is reached. So, a
|
||||
greater number of iterations allows producing a better surface.
|
||||
\n <b>Method</b> - Kind of method to perform filling operation
|
||||
1. Default - standard behaviour
|
||||
2. Use edges orientation - orientation of edges are used: if edge is
|
||||
reversed curve from this edge is reversed before using in filling
|
||||
1. Default - the standard behaviour.
|
||||
2. Use edges orientation - the edges orientation is used: if an edge is
|
||||
reversed, the curve from this edge is reversed before being used by the filling
|
||||
algorithm.
|
||||
3. Auto-correct edges orientation - change orientation of curves using
|
||||
minimization of sum of distances between ends points of edges.
|
||||
3. Auto-correct edges orientation - curves orientation is changed to
|
||||
minimize the sum of distances between ends points of edges.
|
||||
\n <b>Approximation</b> - if checked, BSpline curves are generated in
|
||||
the process of surface construction (using
|
||||
GeomAPI_PointsToBSplineSurface functionality). By default the surface
|
||||
is created using Besier curves. The usage of <b>Approximation</b>
|
||||
makes the algorithm work slower, but allows building the surface for
|
||||
rather complex cases.
|
||||
slows the algorithm, but allows building the surface for complex cases.
|
||||
|
||||
\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>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
|
||||
|
||||
|
@ -4,10 +4,14 @@
|
||||
|
||||
\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
|
||||
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
|
||||
within this tolerance is detected, the corresponding edges will be modified to
|
||||
connect in the middle of the gap.
|
||||
|
@ -10,7 +10,7 @@ constructed, have to lie in the same plane.
|
||||
\image html fillet1d_2.png
|
||||
|
||||
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
|
||||
vertexes on this wire in the OCC Viewer and define the \b Radius of the Fillet.
|
||||
|
@ -7,7 +7,7 @@ This operation creates fillets on the corners of a <b>2D Planar Face</b>.
|
||||
\image html fillet2d_2.png
|
||||
|
||||
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
|
||||
vertexes on this face in the OCC Viewer and define the \b Radius of the Fillet.
|
||||
|
@ -3,7 +3,7 @@
|
||||
\page fillet_operation_page Fillet
|
||||
|
||||
\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 The \b Result will be a \b GEOM_Object.
|
||||
|
44
doc/salome/gui/GEOM/input/geompypkg.doc
Normal 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"
|
||||
|
||||
*/
|
@ -23,6 +23,8 @@ various algorithms;</li>
|
||||
Almost all geometry module functionalities are accessible via
|
||||
\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"
|
||||
|
||||
|
||||
|
37
doc/salome/gui/GEOM/input/limit_tolerance_operation.doc
Normal 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".
|
||||
|
||||
*/
|
@ -12,7 +12,9 @@ two directions.
|
||||
\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
|
||||
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,
|
||||
Step, NbTimes)</em>
|
||||
\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
|
||||
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.
|
||||
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,
|
||||
Step1, NbTimes1, Dir2, Step2, NbTimes2),</em> where \em Shape is a shape
|
||||
|
@ -2,79 +2,103 @@
|
||||
|
||||
\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.
|
||||
\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>
|
||||
|
||||
\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) +
|
||||
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
|
||||
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
|
||||
shape of this type, Partition fails.
|
||||
|
||||
<b>Keep shapes of lower type</b> checkbox manages standalone shapes of
|
||||
type other than the \em Limit. If it is checked, lower dimension
|
||||
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".
|
||||
|
||||
\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,
|
||||
ListOfMaterials, KeepNonlimitShapes),</em> where where \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.
|
||||
ListOfMaterials, KeepNonlimitShapes)</em>
|
||||
|
||||
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>
|
||||
|
||||
\image html partition2.png
|
||||
|
||||
\n <b>Arguments:</b> Name + a list of shapes which will be intersected
|
||||
+ 1 cutting plane.
|
||||
<b>Arguments:</b> Name + 1 shape to be intersected + 1 cutting plane.
|
||||
|
||||
\n <b>Advanced option:</b>
|
||||
<b>Advanced option:</b>
|
||||
\ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments".
|
||||
|
||||
\n <b>TUI Command:</b> <em> geompy.MakeHalfPartition(Shapes,
|
||||
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.
|
||||
<b>TUI Command:</b>
|
||||
|
||||
\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 partitionsn2.png "Result of intersection"
|
||||
|
||||
\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
|
||||
\ref tui_partition "Basic Operations".
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of \ref tui_partition "Basic Operations".
|
||||
|
||||
*/
|
||||
|
@ -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 glue_faces_operation_page "Glue faces" - unites
|
||||
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" -
|
||||
splits an edge in two.</li>
|
||||
<li>\subpage change_orientation_operation_page "Change orientation" -
|
||||
|
@ -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
|
||||
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
|
||||
process, define its name and operators applied to it during
|
||||
processing.
|
||||
|
@ -31,7 +31,9 @@ of the vector.
|
||||
|
||||
\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>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>
|
||||
|
@ -10,6 +10,10 @@ import geompy
|
||||
import salome
|
||||
gg = salome.ImportComponentGUI("GEOM")
|
||||
|
||||
#
|
||||
# create edge by two points
|
||||
#
|
||||
|
||||
# create vertices
|
||||
p0 = geompy.MakeVertex(0. , 0. , 0. )
|
||||
pxyz = geompy.MakeVertex(100., 100., 100.)
|
||||
@ -18,10 +22,30 @@ pxyz = geompy.MakeVertex(100., 100., 100.)
|
||||
edge = geompy.MakeEdge(p0, pxyz)
|
||||
|
||||
# add object in the study
|
||||
id_edge = geompy.addToStudy(edge,"Edge")
|
||||
id_edge = geompy.addToStudy(edge,"Edge_1")
|
||||
|
||||
# display an 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
|
||||
|
||||
\anchor tui_creation_wire
|
||||
|
@ -289,6 +289,43 @@ gg.createAndDisplayGO(id_glue)
|
||||
gg.setDisplayMode(id_glue,1)
|
||||
\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
|
||||
<br><h2>Add Point on Edge</h2>
|
||||
|
||||
|
@ -99,12 +99,21 @@
|
||||
\anchor swig_GetPoint
|
||||
\until blocksComp (-50, -50, -50)
|
||||
|
||||
\anchor swig_GetVertexNearPoint
|
||||
\until near (40, 40, 40)
|
||||
|
||||
\anchor swig_GetEdge
|
||||
\until by two points
|
||||
|
||||
\anchor swig_GetEdgeNearPoint
|
||||
\until edge near point
|
||||
|
||||
\anchor swig_GetBlockByParts
|
||||
\until "b0 image"
|
||||
|
||||
\anchor swig_GetShapesNearPoint
|
||||
\until "faces near point"
|
||||
|
||||
\anchor swig_GetShapesOnPlane
|
||||
\until Face on Plane
|
||||
|
||||
|
@ -264,4 +264,4 @@ DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = YES
|
||||
SEARCHENGINE = NO
|
||||
|
107
idl/GEOM_Gen.idl
@ -19,10 +19,9 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// File : GEOM_Gen.idl
|
||||
// Author : Sergey RUIN
|
||||
//
|
||||
|
||||
#ifndef __GEOM_GEN__
|
||||
#define __GEOM_GEN__
|
||||
|
||||
@ -167,6 +166,24 @@ module GEOM
|
||||
*/
|
||||
shape_type GetShapeType();
|
||||
|
||||
/*!
|
||||
* Get the topology type of the object value.
|
||||
* In contrast to the shape type, this function returns type of the most
|
||||
* top-level sub-shape of the COMPOUND or COMPSOLID, if there is only one
|
||||
* sub-shape there.
|
||||
* \sa GetShapeType()
|
||||
*/
|
||||
shape_type GetTopologyType();
|
||||
|
||||
/*!
|
||||
* Get a minimal type of the top-level shapes contained in the object.
|
||||
* This function is useful for the compounds only; for simple shapes it
|
||||
* exactly the same value as GetShapeType().
|
||||
* Note, that compounds are procesed recursively.
|
||||
* \sa GetShapeType(), GetTopologyType()
|
||||
*/
|
||||
shape_type GetMinShapeType();
|
||||
|
||||
/*!
|
||||
* Set name of the object.
|
||||
* \param theName is a name which will be associated with this object.
|
||||
@ -1305,6 +1322,17 @@ module GEOM
|
||||
*/
|
||||
GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
|
||||
|
||||
/*!
|
||||
* Create an edge from specified wire.
|
||||
* \param theWire source Wire.
|
||||
* \param theLinearTolerance linear tolerance value
|
||||
* \param theAngularTolerance angular tolerance value
|
||||
* \return New GEOM_Object, containing the created edge.
|
||||
*/
|
||||
GEOM_Object MakeEdgeWire (in GEOM_Object theWire,
|
||||
in double theLinearTolerance,
|
||||
in double theAngularTolerance);
|
||||
|
||||
/*!
|
||||
* Create a wire from the set of edges and wires.
|
||||
* \param theEdgesAndWires List of edge and/or wires.
|
||||
@ -1390,6 +1418,17 @@ module GEOM
|
||||
GEOM_Object MakeGlueFacesByList (in GEOM_Object theShape, in double theTolerance,
|
||||
in ListOfGO theFaces, in boolean doKeepNonSolids);
|
||||
|
||||
/*!
|
||||
* Get all sub-shapes and groups of \a theShape,
|
||||
* that were created already by any other methods.
|
||||
* \param theShape Any shape.
|
||||
* \param theGroupsOnly If this parameter is TRUE, only groups will be
|
||||
* returned, else all found sub-shapes and groups.
|
||||
* \return List of existing sub-objects of \a theShape.
|
||||
*/
|
||||
ListOfGO GetExistingSubObjects (in GEOM_Object theShape,
|
||||
in boolean theGroupsOnly);
|
||||
|
||||
/*!
|
||||
* Deprecated method. Use MakeAllSubShapes() instead.
|
||||
*/
|
||||
@ -1919,6 +1958,15 @@ module GEOM
|
||||
in double theZ,
|
||||
in double theEpsilon);
|
||||
|
||||
/*!
|
||||
* Find a vertex of the given shape, which has minimal distance to the given point.
|
||||
* \param theShape Any shape.
|
||||
* \param thePoint Point, close to the desired vertex.
|
||||
* \return New GEOM_Object, containing the found vertex.
|
||||
*/
|
||||
GEOM_Object GetVertexNearPoint (in GEOM_Object theShape,
|
||||
in GEOM_Object thePoint);
|
||||
|
||||
/*!
|
||||
* Get an edge, found in the given shape by two given vertices.
|
||||
* \param theShape Block or a compound of blocks.
|
||||
@ -1987,6 +2035,22 @@ module GEOM
|
||||
GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
|
||||
in GEOM_Object theVector);
|
||||
|
||||
/*!
|
||||
* Find all subshapes of type \a theShapeType of the given shape,
|
||||
* which have minimal distance to the given point.
|
||||
* \param theShape Any shape.
|
||||
* \param thePoint Point, close to the desired shape.
|
||||
* \param theShapeType Defines what kind of subshapes is searched.
|
||||
* \param theTolerance The tolerance for distances comparison. All shapes
|
||||
* with distances to the given point in interval
|
||||
* [minimal_distance, minimal_distance + theTolerance] will be gathered.
|
||||
* \return New GEOM_Object, containing a group of all found shapes.
|
||||
*/
|
||||
GEOM_Object GetShapesNearPoint (in GEOM_Object theShape,
|
||||
in GEOM_Object thePoint,
|
||||
in long theShapeType,
|
||||
in double theTolerance);
|
||||
|
||||
/*!
|
||||
* Extract blocks from blocks compounds
|
||||
*/
|
||||
@ -2740,6 +2804,14 @@ module GEOM
|
||||
GEOM_Object ChangeOrientation (in GEOM_Object theObject);
|
||||
GEOM_Object ChangeOrientationCopy (in GEOM_Object theObject);
|
||||
|
||||
/*!
|
||||
* Try to limit tolerance of the given object by value \a theTolerance.
|
||||
* \param theObject Shape to be processed.
|
||||
* \param theTolerance Required tolerance value.
|
||||
* \return New GEOM_Object, containing processed shape.
|
||||
*/
|
||||
GEOM_Object LimitTolerance (in GEOM_Object theObject, in double theTolerance);
|
||||
|
||||
};
|
||||
|
||||
/*!
|
||||
@ -2931,7 +3003,6 @@ module GEOM
|
||||
*/
|
||||
GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
|
||||
|
||||
|
||||
/*
|
||||
* Get the vertex by index for 1D objects depends the edge/wire orientation
|
||||
* \param theShape Shape (wire or edge) to find the vertex on it
|
||||
@ -3355,6 +3426,36 @@ module GEOM
|
||||
in boolean theInheritFirstArg,
|
||||
in boolean theAddPrefix);
|
||||
|
||||
/*!
|
||||
* Publish sub-shapes, standing for arguments and sub-shapes of arguments
|
||||
* To be used from python scripts out of geompy.addToStudy (non-default usage)
|
||||
* \param theStudy the study, in which theObject is published already,
|
||||
* and in which the arguments will be published
|
||||
* \param theObject published GEOM object, arguments of which will be published
|
||||
* \param theArgs list of GEOM_Object, operation arguments to be published.
|
||||
* If this list is empty, all operation arguments will be published
|
||||
* \param theFindMethod method to search subshapes, corresponding to arguments and
|
||||
* their subshapes. Value from enumeration GEOM::find_shape_method.
|
||||
* \param theInheritFirstArg set properties of the first argument for \a theObject.
|
||||
* Do not publish subshapes in place of arguments, but only
|
||||
* in place of subshapes of the first argument,
|
||||
* because the whole shape corresponds to the first argument.
|
||||
* Mainly to be used after transformations, but it also can be
|
||||
* usefull after partition with one object shape, and some other
|
||||
* operations, where only the first argument has to be considered.
|
||||
* If theObject has only one argument shape, this flag is automatically
|
||||
* considered as True, not regarding really passed value.
|
||||
* \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
|
||||
* and prefix "from_subshapes_of_" to names of partially restored subshapes.
|
||||
* \return list of published sub-shapes
|
||||
*/
|
||||
ListOfGO RestoreGivenSubShapesO (in SALOMEDS::Study theStudy,
|
||||
in GEOM_Object theObject,
|
||||
in ListOfGO theArgs,
|
||||
in find_shape_method theFindMethod,
|
||||
in boolean theInheritFirstArg,
|
||||
in boolean theAddPrefix);
|
||||
|
||||
/*!
|
||||
* Publish sub-shapes, standing for arguments and sub-shapes of arguments
|
||||
* To be used from GUI and from geompy.addToStudy.
|
||||
|
@ -1,5 +1,5 @@
|
||||
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.Export: libBREPExport
|
||||
@ -26,3 +26,6 @@ STL_ASCII.Pattern: STL ASCII Files ( *.stl )
|
||||
ACIS.Import: libACISImport
|
||||
ACIS.Export: libACISExport
|
||||
ACIS.Pattern: ACIS Files ( *.sat )
|
||||
|
||||
VTK.Export: libVTKExport
|
||||
VTK.Pattern: VTK Files ( *.vtk )
|
||||
|
@ -47,6 +47,7 @@ box2points.png \
|
||||
boxdxyz.png \
|
||||
build_compound.png \
|
||||
build_edge.png \
|
||||
build_edge_wire.png \
|
||||
build_face.png \
|
||||
build_shell.png \
|
||||
build_solid.png \
|
||||
@ -93,6 +94,7 @@ filletface.png \
|
||||
filling.png \
|
||||
fuse.png \
|
||||
geometry.png \
|
||||
limit_tolerance.png \
|
||||
line.png \
|
||||
line2points.png \
|
||||
line2faces.png \
|
||||
@ -109,6 +111,7 @@ multitranslationdouble.png \
|
||||
multitranslationsimple.png \
|
||||
normale.png \
|
||||
offset.png \
|
||||
origin_and_vectors.png \
|
||||
partition.png \
|
||||
partitionkeep.png \
|
||||
partitionplane.png \
|
||||
|
@ -49,6 +49,8 @@
|
||||
<parameter name="isos_color" value="200, 200, 200" />
|
||||
<parameter name="type_of_marker" value="1" />
|
||||
<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" />
|
||||
<!-- Input field precisions -->
|
||||
<parameter name="def_precision" value="3" />
|
||||
|
BIN
resources/build_edge_wire.png
Normal file
After Width: | Height: | Size: 428 B |
BIN
resources/limit_tolerance.png
Normal file
After Width: | Height: | Size: 565 B |
BIN
resources/origin_and_vectors.png
Executable file
After Width: | Height: | Size: 3.2 KiB |
@ -427,7 +427,7 @@ void AdvancedGUI_PipeTShapeDlg::SelectionIntoArgument() {
|
||||
//Find SubShape Object in Father
|
||||
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());
|
||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
|
@ -288,7 +288,7 @@ void BasicGUI_ArcDlg::SelectionIntoArgument()
|
||||
//Find SubShape Object in Father
|
||||
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());
|
||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
}
|
||||
|
@ -70,8 +70,8 @@ BasicGUI_CircleDlg::BasicGUI_CircleDlg( GeometryGUI* theGeometryGUI, QWidget* pa
|
||||
GroupPntVecR = new DlgRef_2Sel1Spin( centralWidget() );
|
||||
GroupPntVecR->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
|
||||
|
||||
GroupPntVecR->TextLabel1->setText( tr( "GEOM_CENTER_POINT" ) + " (Origin by default)" );
|
||||
GroupPntVecR->TextLabel2->setText( tr( "GEOM_VECTOR" ) + " (Z axis by default)" );
|
||||
GroupPntVecR->TextLabel1->setText( tr( "GEOM_CENTER_POINT" ) + " " + tr( "GEOM_CENTER_DEFAULT" ) );
|
||||
GroupPntVecR->TextLabel2->setText( tr( "GEOM_VECTOR" ) + " " + tr( "GEOM_AXIS_DEFAULT" ) );
|
||||
GroupPntVecR->TextLabel3->setText( tr( "GEOM_RADIUS" ) );
|
||||
GroupPntVecR->PushButton1->setIcon( image1 );
|
||||
GroupPntVecR->PushButton2->setIcon( image1 );
|
||||
@ -358,7 +358,7 @@ void BasicGUI_CircleDlg::SelectionIntoArgument()
|
||||
//Find SubShape Object in Father
|
||||
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() );
|
||||
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ void BasicGUI_EllipseDlg::SelectionIntoArgument()
|
||||
//Find SubShape Object in Father
|
||||
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());
|
||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ void BasicGUI_LineDlg::SelectionIntoArgument()
|
||||
//Find SubShape Object in Father
|
||||
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() );
|
||||
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ void BasicGUI_MarkerDlg::onSelectionDone()
|
||||
|
||||
//Find SubShape Object in Father
|
||||
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() );
|
||||
aSelectedObj = aShapesOp->GetSubShape( aSelectedObj, anIndex );
|
||||
}
|
||||
|
@ -470,7 +470,7 @@ void BasicGUI_PlaneDlg::SelectionIntoArgument()
|
||||
//Find SubShape Object in Father
|
||||
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() );
|
||||
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||
}
|
||||
|
@ -510,8 +510,7 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
|
||||
|
||||
//Find SubShape Object in Father
|
||||
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());
|
||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
@ -907,9 +906,11 @@ bool BasicGUI_PointDlg::execute( ObjectList& objects )
|
||||
if ( GEOMBase::GetShape( anObj, aShape ) && !aShape.IsNull() &&
|
||||
aShape.ShapeType() == TopAbs_VERTEX ) {
|
||||
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
||||
myX->setText( QString( "%1" ).arg( aPnt.X() ) );
|
||||
myY->setText( QString( "%1" ).arg( aPnt.Y() ) );
|
||||
myZ->setText( QString( "%1" ).arg( aPnt.Z() ) );
|
||||
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||
int aPrecision = resMgr->integerValue( "Geometry", "length_precision", 6 );
|
||||
myX->setText( DlgRef::PrintDoubleValue( aPnt.X(), aPrecision ) );
|
||||
myY->setText( DlgRef::PrintDoubleValue( aPnt.Y(), aPrecision ) );
|
||||
myZ->setText( DlgRef::PrintDoubleValue( aPnt.Z(), aPrecision ) );
|
||||
}
|
||||
else {
|
||||
myX->setText( "" );
|
||||
|
@ -302,7 +302,7 @@ void BasicGUI_VectorDlg::SelectionIntoArgument()
|
||||
//Find SubShape Object in Father
|
||||
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());
|
||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ void BlocksGUI_BlockDlg::SelectionIntoArgument()
|
||||
//Find SubShape Object in Father
|
||||
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());
|
||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ void BlocksGUI_QuadFaceDlg::SelectionIntoArgument()
|
||||
//Find SubShape Object in Father
|
||||
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());
|
||||
anObj = aShapesOp->GetSubShape(anObj, anIndex);
|
||||
}
|
||||
|
@ -113,6 +113,7 @@ void BuildGUI_CompoundDlg::Init()
|
||||
globalSelection( GEOM_ALLSHAPES );
|
||||
|
||||
initName( tr( "GEOM_COMPOUND" ) );
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <LightApp_SelectionMgr.h>
|
||||
|
||||
#include <GEOMImpl_Types.hxx>
|
||||
#include <TColStd_IndexedMapOfInteger.hxx>
|
||||
|
||||
//=================================================================================
|
||||
// class : BuildGUI_EdgeDlg()
|
||||
@ -47,38 +48,58 @@
|
||||
BuildGUI_EdgeDlg::BuildGUI_EdgeDlg (GeometryGUI* theGeometryGUI, QWidget* parent)
|
||||
: GEOMBase_Skeleton(theGeometryGUI, parent)
|
||||
{
|
||||
QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_BUILD_EDGE")));
|
||||
QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
|
||||
QPixmap image0 (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"));
|
||||
|
||||
/***************************************************************/
|
||||
mainFrame()->GroupConstructors->setTitle(tr("GEOM_EDGE"));
|
||||
mainFrame()->RadioButton1->setIcon(image0);
|
||||
mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose);
|
||||
mainFrame()->RadioButton2->close();
|
||||
mainFrame()->RadioButton1->setIcon(image1);
|
||||
mainFrame()->RadioButton2->setIcon(image2);
|
||||
mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
||||
mainFrame()->RadioButton3->close();
|
||||
|
||||
GroupPoints = new DlgRef_2Sel(centralWidget());
|
||||
// two points
|
||||
|
||||
GroupPoints = new DlgRef_2Sel(centralWidget());
|
||||
GroupPoints->GroupBox1->setTitle(tr("GEOM_POINTS"));
|
||||
GroupPoints->TextLabel1->setText(tr("GEOM_POINT_I").arg(1));
|
||||
GroupPoints->TextLabel2->setText(tr("GEOM_POINT_I").arg(2));
|
||||
GroupPoints->PushButton1->setIcon(image1);
|
||||
GroupPoints->PushButton2->setIcon(image1);
|
||||
|
||||
GroupPoints->PushButton1->setIcon(image0);
|
||||
GroupPoints->PushButton2->setIcon(image0);
|
||||
GroupPoints->LineEdit1->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());
|
||||
layout->setMargin(0); layout->setSpacing(6);
|
||||
layout->addWidget(GroupPoints);
|
||||
layout->addWidget(GroupWire);
|
||||
/***************************************************************/
|
||||
|
||||
setHelpFileName("create_edge_page.html");
|
||||
|
||||
// Initialisation
|
||||
// initialisation
|
||||
Init();
|
||||
}
|
||||
|
||||
@ -98,28 +119,35 @@ BuildGUI_EdgeDlg::~BuildGUI_EdgeDlg()
|
||||
void BuildGUI_EdgeDlg::Init()
|
||||
{
|
||||
// init variables
|
||||
GroupPoints->LineEdit1->setReadOnly(true);
|
||||
GroupPoints->LineEdit2->setReadOnly(true);
|
||||
|
||||
GroupPoints->LineEdit1->setText("");
|
||||
GroupPoints->LineEdit2->setText("");
|
||||
myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil();
|
||||
myOkPoint1 = myOkPoint2 = false;
|
||||
myPoint1 = myPoint2 = myWire = GEOM::GEOM_Object::_nil();
|
||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||
GroupPoints->PushButton1->setDown(true);
|
||||
globalSelection(); // close local contexts, if any
|
||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
||||
|
||||
// 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(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
|
||||
connect(GroupPoints->PushButton1, 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->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"));
|
||||
|
||||
GroupPoints->PushButton1->click();
|
||||
SelectionIntoArgument();
|
||||
ConstructorsClicked( 0 );
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -142,11 +170,60 @@ bool BuildGUI_EdgeDlg::ClickOnApply()
|
||||
return false;
|
||||
|
||||
initName();
|
||||
// activate selection and connect selection manager
|
||||
GroupPoints->PushButton1->click();
|
||||
|
||||
myEditCurrentArgument->setText( "" );
|
||||
ConstructorsClicked( getConstructorId() );
|
||||
|
||||
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()
|
||||
// purpose : Called when selection is changed or on dialog initialization or activation
|
||||
@ -161,39 +238,68 @@ void BuildGUI_EdgeDlg::SelectionIntoArgument()
|
||||
aSelMgr->selectedObjects(aSelList);
|
||||
|
||||
if (aSelList.Extent() != 1) {
|
||||
if (myEditCurrentArgument == GroupPoints->LineEdit1)
|
||||
myOkPoint1 = false;
|
||||
else if (myEditCurrentArgument == GroupPoints->LineEdit2)
|
||||
myOkPoint2 = false;
|
||||
if (myEditCurrentArgument == GroupPoints->LineEdit1) myPoint1 = GEOM::GEOM_Object::_nil();
|
||||
else if (myEditCurrentArgument == GroupPoints->LineEdit2) myPoint2 = GEOM::GEOM_Object::_nil();
|
||||
else if (myEditCurrentArgument == GroupWire->LineEdit1) myWire = GEOM::GEOM_Object::_nil();
|
||||
displayPreview();
|
||||
return;
|
||||
}
|
||||
|
||||
// nbSel == 1
|
||||
Standard_Boolean testResult = Standard_False;
|
||||
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
|
||||
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
|
||||
myGeomGUI->getApp()->selectionMgr()->clearSelected();
|
||||
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
|
||||
this, SLOT(SelectionIntoArgument()));
|
||||
TopoDS_Shape aShape;
|
||||
if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) {
|
||||
TColStd_IndexedMapOfInteger aMap;
|
||||
aSelMgr->GetIndexes( aSelList.First(), aMap );
|
||||
if ( aMap.Extent() == 1 ) { // Local Selection
|
||||
int anIndex = aMap( 1 );
|
||||
aName += ( aNeedType == TopAbs_WIRE ? QString( ":wire_%1" ).arg( anIndex ) : QString( ":vertex_%1" ).arg( anIndex ) );
|
||||
|
||||
//Find SubShape Object in Father
|
||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
|
||||
if ( CORBA::is_nil( aFindedObject ) ) { // Object not found in study
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
||||
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||
}
|
||||
else {
|
||||
aSelectedObject = aFindedObject; // get Object from study
|
||||
}
|
||||
}
|
||||
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;
|
||||
myOkPoint1 = true;
|
||||
if (!myOkPoint2)
|
||||
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
||||
GroupPoints->PushButton2->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
|
||||
myPoint2 = aSelectedObject;
|
||||
myOkPoint2 = true;
|
||||
if (!myOkPoint1)
|
||||
if ( !myPoint2->_is_nil() && myPoint1->_is_nil() )
|
||||
GroupPoints->PushButton1->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == GroupWire->LineEdit1 ) {
|
||||
myWire = aSelectedObject;
|
||||
}
|
||||
}
|
||||
|
||||
displayPreview();
|
||||
}
|
||||
@ -205,7 +311,6 @@ void BuildGUI_EdgeDlg::SelectionIntoArgument()
|
||||
void BuildGUI_EdgeDlg::SetEditCurrentArgument()
|
||||
{
|
||||
QPushButton* send = (QPushButton*)sender();
|
||||
//globalSelection();//??
|
||||
|
||||
if (send == GroupPoints->PushButton1) {
|
||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||
@ -217,19 +322,14 @@ void BuildGUI_EdgeDlg::SetEditCurrentArgument()
|
||||
GroupPoints->PushButton1->setDown(false);
|
||||
GroupPoints->LineEdit1->setEnabled(false);
|
||||
}
|
||||
else if (send == GroupWire->PushButton1) {
|
||||
myEditCurrentArgument = GroupWire->LineEdit1;
|
||||
}
|
||||
|
||||
// enable line edit
|
||||
myEditCurrentArgument->setEnabled(true);
|
||||
myEditCurrentArgument->setFocus();
|
||||
// after setFocus(), because it will be setDown(false) when loses focus
|
||||
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();
|
||||
}
|
||||
|
||||
@ -240,7 +340,7 @@ void BuildGUI_EdgeDlg::SetEditCurrentArgument()
|
||||
void BuildGUI_EdgeDlg::LineEditReturnPressed()
|
||||
{
|
||||
QLineEdit* send = (QLineEdit*)sender();
|
||||
if (send == GroupPoints->LineEdit1 || send == GroupPoints->LineEdit2) {
|
||||
if (send == GroupPoints->LineEdit1 || send == GroupPoints->LineEdit2 || send == GroupWire->LineEdit1 ) {
|
||||
myEditCurrentArgument = send;
|
||||
GEOMBase_Skeleton::LineEditReturnPressed();
|
||||
}
|
||||
@ -257,7 +357,7 @@ void BuildGUI_EdgeDlg::ActivateThisDialog()
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
displayPreview();
|
||||
ConstructorsClicked( getConstructorId() );
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -283,9 +383,18 @@ GEOM::GEOM_IOperations_ptr BuildGUI_EdgeDlg::createOperation()
|
||||
// function : isValid
|
||||
// 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 res = false;
|
||||
GEOM::GEOM_Object_var anObj;
|
||||
|
||||
GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
|
||||
GEOM::GEOM_Object_var anObj = anOper->MakeEdge(myPoint1, myPoint2);
|
||||
|
||||
if (!anObj->_is_nil())
|
||||
objects.push_back(anObj._retn());
|
||||
|
||||
return true;
|
||||
switch ( getConstructorId() ) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
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 );
|
||||
}
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
#include <GEOMBase_Skeleton.h>
|
||||
|
||||
class DlgRef_1Sel2Spin;
|
||||
class DlgRef_2Sel;
|
||||
|
||||
//=================================================================================
|
||||
@ -48,6 +49,7 @@ protected:
|
||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||
virtual bool isValid( QString& );
|
||||
virtual bool execute( ObjectList& );
|
||||
virtual void addSubshapesToStudy();
|
||||
|
||||
private:
|
||||
void Init();
|
||||
@ -55,12 +57,13 @@ private:
|
||||
|
||||
private:
|
||||
GEOM::GEOM_Object_var myPoint1, myPoint2; /* Points containing the edge */
|
||||
bool myOkPoint1; /* true when myPoint is defined */
|
||||
bool myOkPoint2;
|
||||
GEOM::GEOM_Object_var myWire; /* Wire */
|
||||
|
||||
DlgRef_2Sel* GroupPoints;
|
||||
DlgRef_1Sel2Spin* GroupWire;
|
||||
|
||||
private slots:
|
||||
void ConstructorsClicked( int );
|
||||
void ClickOnOk();
|
||||
bool ClickOnApply();
|
||||
void ActivateThisDialog();
|
||||
|
@ -117,6 +117,7 @@ void BuildGUI_SolidDlg::Init()
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
initName( tr( "GEOM_SOLID" ) );
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,8 +36,11 @@
|
||||
#include <SUIT_Session.h>
|
||||
#include <SalomeApp_Application.h>
|
||||
#include <LightApp_SelectionMgr.h>
|
||||
#include <SALOME_ListIteratorOfListIO.hxx>
|
||||
|
||||
#include <TColStd_MapOfInteger.hxx>
|
||||
#include <TColStd_IndexedMapOfInteger.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <Precision.hxx>
|
||||
|
||||
//=================================================================================
|
||||
@ -63,8 +66,14 @@ BuildGUI_WireDlg::BuildGUI_WireDlg( GeometryGUI* theGeometryGUI, QWidget* parent
|
||||
mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
||||
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->TextLabel1->setText( tr( "GEOM_OBJECTS" ) );
|
||||
GroupArgs->PushButton1->setIcon( image1 );
|
||||
@ -78,6 +87,7 @@ BuildGUI_WireDlg::BuildGUI_WireDlg( GeometryGUI* theGeometryGUI, QWidget* parent
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||
layout->addWidget( GroupType );
|
||||
layout->addWidget( GroupArgs );
|
||||
/***************************************************************/
|
||||
|
||||
@ -107,13 +117,11 @@ void BuildGUI_WireDlg::Init()
|
||||
/* init variables */
|
||||
myEditCurrentArgument = GroupArgs->LineEdit1;
|
||||
GroupArgs->LineEdit1->setReadOnly( true );
|
||||
GroupType->RadioButton1->setChecked(true);
|
||||
|
||||
myOkEdgesAndWires = false;
|
||||
|
||||
TColStd_MapOfInteger aMap;
|
||||
aMap.Add( GEOM_WIRE );
|
||||
aMap.Add( GEOM_EDGE );
|
||||
globalSelection( aMap );
|
||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE );
|
||||
|
||||
/* signals and slots connections */
|
||||
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||
@ -122,6 +130,12 @@ void BuildGUI_WireDlg::Init()
|
||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
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" ) );
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
@ -144,13 +158,36 @@ void BuildGUI_WireDlg::ClickOnOk()
|
||||
//=================================================================================
|
||||
bool BuildGUI_WireDlg::ClickOnApply()
|
||||
{
|
||||
if ( !onAccept() )
|
||||
if ( !onAccept() || !myOkEdgesAndWires )
|
||||
return false;
|
||||
|
||||
initName();
|
||||
TypeButtonClicked();
|
||||
myMapToStudy.clear();
|
||||
myEdgesAndWires.length(0);
|
||||
myOkEdgesAndWires = false;
|
||||
myEditCurrentArgument->setText( "" );
|
||||
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()
|
||||
@ -168,14 +205,71 @@ void BuildGUI_WireDlg::SelectionIntoArgument()
|
||||
myOkEdgesAndWires = false;
|
||||
int nbSel = GEOMBase::GetNameOfSelectedIObjects(aSelList, aString);
|
||||
|
||||
if ( nbSel == 0 )
|
||||
if ( nbSel == 0 ) {
|
||||
myMapToStudy.clear();
|
||||
return;
|
||||
if ( nbSel != 1 )
|
||||
aString = tr( "%1_objects" ).arg( nbSel );
|
||||
}
|
||||
|
||||
TopAbs_ShapeEnum aNeedType = TopAbs_EDGE;
|
||||
if (GroupType->RadioButton2->isChecked())
|
||||
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);
|
||||
if ( !myEdgesAndWires.length() )
|
||||
return;
|
||||
} 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 );
|
||||
myOkEdgesAndWires = true;
|
||||
@ -192,10 +286,7 @@ void BuildGUI_WireDlg::SetEditCurrentArgument()
|
||||
if ( send != GroupArgs->PushButton1 )
|
||||
return;
|
||||
|
||||
TColStd_MapOfInteger aMap;
|
||||
aMap.Add( GEOM_WIRE );
|
||||
aMap.Add( GEOM_EDGE );
|
||||
globalSelection( aMap );
|
||||
TypeButtonClicked();
|
||||
myEditCurrentArgument = GroupArgs->LineEdit1;
|
||||
|
||||
myEditCurrentArgument->setFocus();
|
||||
@ -212,12 +303,18 @@ void BuildGUI_WireDlg::ActivateThisDialog()
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
TColStd_MapOfInteger aMap;
|
||||
aMap.Add( GEOM_WIRE );
|
||||
aMap.Add( GEOM_EDGE );
|
||||
globalSelection( aMap );
|
||||
|
||||
TypeButtonClicked();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : DeactivateActiveDialog()
|
||||
// purpose : public slot to deactivate if active
|
||||
//=================================================================================
|
||||
void BuildGUI_WireDlg::DeactivateActiveDialog()
|
||||
{
|
||||
GEOMBase_Skeleton::DeactivateActiveDialog();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : enterEvent()
|
||||
@ -262,3 +359,12 @@ bool BuildGUI_WireDlg::execute (ObjectList& objects)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : addSubshapeToStudy
|
||||
// purpose : virtual method to add new SubObjects if local selection
|
||||
//=================================================================================
|
||||
void BuildGUI_WireDlg::addSubshapesToStudy()
|
||||
{
|
||||
addSubshapesToFather( myMapToStudy );
|
||||
}
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <GEOMBase_Skeleton.h>
|
||||
|
||||
class DlgRef_1Sel1Spin;
|
||||
class DlgRef_3Radio;
|
||||
|
||||
//=================================================================================
|
||||
// class : BuildGUI_WireDlg
|
||||
@ -48,6 +49,7 @@ protected:
|
||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||
virtual bool isValid( QString& );
|
||||
virtual bool execute( ObjectList& );
|
||||
virtual void addSubshapesToStudy();
|
||||
|
||||
private:
|
||||
void Init();
|
||||
@ -58,13 +60,18 @@ private:
|
||||
bool myOkEdgesAndWires; /* to check when arguments is defined */
|
||||
|
||||
DlgRef_1Sel1Spin* GroupArgs;
|
||||
DlgRef_3Radio* GroupType;
|
||||
|
||||
QMap<QString, GEOM::GEOM_Object_var> myMapToStudy;
|
||||
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
bool ClickOnApply();
|
||||
void ActivateThisDialog();
|
||||
void DeactivateActiveDialog();
|
||||
void SelectionIntoArgument();
|
||||
void SetEditCurrentArgument();
|
||||
void TypeButtonClicked();
|
||||
};
|
||||
|
||||
#endif // BUILDGUI_WIREDLG_H
|
||||
|
@ -342,6 +342,7 @@ void DisplayGUI::SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
|
||||
if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
|
||||
SVTK_View* aView = ((SVTK_ViewWindow*)viewWindow)->getView();
|
||||
aView->SetDisplayMode( mode );
|
||||
GeometryGUI::Modified();
|
||||
}
|
||||
else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
|
||||
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 );
|
||||
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() ) {
|
||||
viewWindow->setCustomData( "VectorsMode", QVariant( mode ) );
|
||||
@ -433,6 +436,7 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow )
|
||||
}
|
||||
ite.Next();
|
||||
}
|
||||
GeometryGUI::Modified();
|
||||
}
|
||||
}
|
||||
|
||||
@ -504,6 +508,7 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
|
||||
}
|
||||
}
|
||||
aView->Repaint();
|
||||
GeometryGUI::Modified();
|
||||
}
|
||||
else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
|
||||
OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer();
|
||||
@ -534,6 +539,7 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
|
||||
}
|
||||
}
|
||||
ic->UpdateCurrentViewer();
|
||||
GeometryGUI::Modified();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
//////////////////////////////////////////
|
||||
@ -781,13 +795,12 @@ QString DlgRef::PrintDoubleValue( double theValue, int thePrecision )
|
||||
if ( qAbs(theValue) < prec )
|
||||
return "0";
|
||||
|
||||
QString aRes;
|
||||
aRes.setNum( theValue, 'g', thePrecision );
|
||||
QString aRes = QLocale().toString( theValue, thePrecision >= 0 ? 'f' : 'g', qAbs( thePrecision ) );
|
||||
|
||||
if ( prec > 0 ) {
|
||||
int p = 0;
|
||||
while ( p < thePrecision ) {
|
||||
aRes.setNum( theValue, 'g', p++ );
|
||||
QString aRes = QLocale().toString( theValue, thePrecision >= 0 ? 'f' : 'g', qAbs( p++ ) );
|
||||
double v = aRes.toDouble();
|
||||
double err = qAbs( theValue - v );
|
||||
if ( err > 0 && err <= prec )
|
||||
@ -796,21 +809,19 @@ QString DlgRef::PrintDoubleValue( double theValue, int thePrecision )
|
||||
}
|
||||
|
||||
// remove trailing zeroes
|
||||
QString delim( "." );
|
||||
|
||||
int idx = aRes.lastIndexOf( delim );
|
||||
if ( idx == -1 )
|
||||
return aRes;
|
||||
QRegExp expre( QString( "(%1|%2)[+-]?[0-9]+$" ).arg( QLocale().exponential().toLower(),
|
||||
QLocale().exponential().toUpper() ) );
|
||||
|
||||
QString iPart = aRes.left( idx );
|
||||
QString fPart = aRes.mid( idx + 1 );
|
||||
|
||||
while ( !fPart.isEmpty() && fPart.at( fPart.length() - 1 ) == '0' )
|
||||
fPart.remove( fPart.length() - 1, 1 );
|
||||
|
||||
aRes = iPart;
|
||||
if ( !fPart.isEmpty() )
|
||||
aRes += delim + fPart;
|
||||
|
||||
return aRes;
|
||||
int idx = aRes.indexOf( expre );
|
||||
QString aResExp = "";
|
||||
if ( idx >= 0 ) {
|
||||
aResExp = aRes.mid( idx );
|
||||
aRes = aRes.left( idx );
|
||||
}
|
||||
|
||||
if ( aRes.contains( QLocale().decimalPoint() ) )
|
||||
aRes.remove( QRegExp( QString( "(\\%1|0)0*$" ).arg( QLocale().decimalPoint() ) ) );
|
||||
|
||||
return aRes == "-0" ? QString( "0" ) : aRes + aResExp;
|
||||
}
|
||||
|
@ -339,6 +339,22 @@ public:
|
||||
~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
|
||||
//////////////////////////////////////////
|
||||
|
151
src/DlgRef/DlgRef_2Sel1List2Check_QTD.ui
Normal 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>
|
@ -55,6 +55,7 @@ UIC_FILES = \
|
||||
ui_DlgRef_1SelExt_QTD.h \
|
||||
ui_DlgRef_1Spin_QTD.h \
|
||||
ui_DlgRef_2Sel1List1Check_QTD.h \
|
||||
ui_DlgRef_2Sel1List2Check_QTD.h \
|
||||
ui_DlgRef_2Sel1List_QTD.h \
|
||||
ui_DlgRef_2Sel1Spin2Check_QTD.h \
|
||||
ui_DlgRef_2Sel1Spin_QTD.h \
|
||||
|
@ -39,14 +39,17 @@
|
||||
#include <LightApp_Application.h>
|
||||
#include <LightApp_SelectionMgr.h>
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
//#include <BRep_Tool.hxx>
|
||||
//#include <TopExp.hxx>
|
||||
//#include <TopExp_Explorer.hxx>
|
||||
//#include <TopoDS_Vertex.hxx>
|
||||
//#include <TopoDS.hxx>
|
||||
#include <TColStd_IndexedMapOfInteger.hxx>
|
||||
#include <BRepBuilderAPI_Transform.hxx>
|
||||
#include <BRepBuilderAPI_MakeWire.hxx>
|
||||
//#include <BRepBuilderAPI_Transform.hxx>
|
||||
//#include <BRepBuilderAPI_MakeWire.hxx>
|
||||
#include <BRepBuilderAPI_MakeVertex.hxx>
|
||||
#include <BRepBuilderAPI_MakePolygon.hxx>
|
||||
#include <BRepBuilderAPI_MakeEdge.hxx>
|
||||
|
||||
class Locker
|
||||
{
|
||||
@ -596,13 +599,48 @@ void EntityGUI_3DSketcherDlg::displayPreview( GEOM::GEOM_Object_ptr object,
|
||||
// Function : createShapes
|
||||
// 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& 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;
|
||||
if ( !GEOMBase::GetShape( theObject, aShape ) ||
|
||||
aShape.ShapeType() != TopAbs_WIRE && aShape.ShapeType() != TopAbs_VERTEX )
|
||||
if ( !GEOMBase::GetShape( theObject, aShape ) )
|
||||
return false;
|
||||
|
||||
if( aShape.ShapeType() != TopAbs_WIRE && aShape.ShapeType() != TopAbs_VERTEX )
|
||||
return false;
|
||||
|
||||
theApplyedWire = aShape;
|
||||
@ -629,6 +667,7 @@ bool EntityGUI_3DSketcherDlg::createShapes( GEOM::GEOM_Object_ptr theObject,
|
||||
TopExp_Explorer vertexExp( theLastSegment, TopAbs_VERTEX );
|
||||
theApplyedWire = vertexExp.Current();
|
||||
}
|
||||
*/
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1454,7 +1454,7 @@ void EntityGUI_SketcherDlg::ActivateThisDialog()
|
||||
//=================================================================================
|
||||
void EntityGUI_SketcherDlg::enterEvent( QEvent* )
|
||||
{
|
||||
if ( !MainWidget->GroupConstructors->isEnabled() )
|
||||
if ( !isEnabled() )
|
||||
ActivateThisDialog();
|
||||
}
|
||||
|
||||
|
@ -189,10 +189,12 @@ GEOM_Engine::GEOM_Engine()
|
||||
GEOM_Engine::~GEOM_Engine()
|
||||
{
|
||||
GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It(_objects);
|
||||
std::list< Handle(GEOM_Object) > objs;
|
||||
for(; It.More(); It.Next())
|
||||
{
|
||||
RemoveObject(Handle(GEOM_Object)::DownCast(It.Value()));
|
||||
}
|
||||
objs.push_back( 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
|
||||
for(Interface_DataMapIteratorOfDataMapOfIntegerTransient anItr(_mapIDDocument); anItr.More(); anItr.Next())
|
||||
@ -319,21 +321,6 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
|
||||
// if this label has been freed (object deleted)
|
||||
bool useExisting = false;
|
||||
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();
|
||||
if (_freeLabels.find(aDocID) != _freeLabels.end()) {
|
||||
std::list<TDF_Label>& aFreeLabels = _freeLabels[aDocID];
|
||||
@ -377,6 +364,9 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
|
||||
if (_objects.IsBound(anID)) _objects.UnBind(anID);
|
||||
_objects.Bind(anID, anObject);
|
||||
|
||||
// Put this subshape in the list of subshapes of theMainShape
|
||||
aMainShape->AddSubShapeReference(aFunction);
|
||||
|
||||
GEOM::TPythonDump pd (aFunction);
|
||||
|
||||
if (isStandaloneOperation) {
|
||||
@ -410,6 +400,16 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_Object) theObject)
|
||||
TCollection_AsciiString anID = BuildIDFromObject(theObject);
|
||||
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();
|
||||
Handle(TDataStd_TreeNode) aNode;
|
||||
for (int i = 1; i <= nb; i++) {
|
||||
@ -627,9 +627,11 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
|
||||
for ( ; anEntryToCommand != anEntryToCommandMap.end(); ++anEntryToCommand )
|
||||
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
|
||||
int indx = anAfterScript.Search( "RestoreSubShapes" );
|
||||
int indx = anAfterScript.Search( "RestoreGivenSubShapes" );
|
||||
if ( indx == -1 )
|
||||
indx = anAfterScript.Search( "RestoreSubShapes" );
|
||||
if ( indx != -1 ) {
|
||||
TCollection_AsciiString aSubStr = anAfterScript.SubString(1, indx);
|
||||
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
|
||||
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
|
||||
if (aDescr.Search( "RestoreSubShapes" ) != -1)
|
||||
if (aDescr.Search( "RestoreGivenSubShapes" ) != -1)
|
||||
theIsDumpCollected = true;
|
||||
else if (aDescr.Search( "RestoreSubShapes" ) != -1)
|
||||
theIsDumpCollected = true;
|
||||
}
|
||||
|
||||
@ -935,7 +939,9 @@ bool ProcessFunction(Handle(GEOM_Function)& theFunction,
|
||||
bool isBefore = true;
|
||||
TCollection_AsciiString aSubStr = aDescr.Token("\n\t", i++);
|
||||
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;
|
||||
else
|
||||
theAfterScript += TCollection_AsciiString("\n\t") + aSubStr;
|
||||
|
@ -18,7 +18,6 @@
|
||||
// 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 <Standard_Stream.hxx>
|
||||
|
||||
@ -43,6 +42,7 @@
|
||||
#include <TDataStd_UAttribute.hxx>
|
||||
#include <TDataStd_ChildNodeIterator.hxx>
|
||||
#include <TDataStd_ExtStringArray.hxx>
|
||||
#include <TDataStd_ExtStringList.hxx>
|
||||
#include <TDocStd_Owner.hxx>
|
||||
#include <TDocStd_Document.hxx>
|
||||
#include <TFunction_Function.hxx>
|
||||
@ -64,6 +64,8 @@
|
||||
#define RESULT_LABEL 2
|
||||
#define DESCRIPTION_LABEL 3
|
||||
#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 ARGUMENT(thePosition) _label.FindChild((ARGUMENT_LABEL)).FindChild((thePosition))
|
||||
@ -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
|
||||
@ -713,6 +794,16 @@ TDF_Label GEOM_Function::GetArgumentHistoryEntry (const TDF_Label& theArgu
|
||||
return aHistoryCurLabel;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* GetNamingEntry
|
||||
*/
|
||||
//=============================================================================
|
||||
TDF_Label GEOM_Function::GetNamingEntry (const Standard_Boolean create)
|
||||
{
|
||||
return _label.FindChild(NAMING_LABEL, create);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOM_Function_Type_
|
||||
//purpose :
|
||||
@ -725,7 +816,6 @@ Standard_EXPORT Handle_Standard_Type& GEOM_Function_Type_()
|
||||
static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
|
||||
if (aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);
|
||||
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOM_Function",
|
||||
sizeof(GEOM_Function),
|
||||
|
@ -18,7 +18,6 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#ifndef _GEOM_Function_HeaderFile
|
||||
#define _GEOM_Function_HeaderFile
|
||||
@ -65,7 +64,7 @@ class Handle(MMgt_TShared);
|
||||
class GEOM_Function;
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
#include <TDataStd_ListOfExtendedString.hxx>
|
||||
|
||||
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOM_Function);
|
||||
|
||||
@ -141,8 +140,10 @@ public:
|
||||
// Type management
|
||||
//
|
||||
Standard_EXPORT friend Handle_Standard_Type& GEOM_Function_Type_();
|
||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { 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)); }
|
||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const
|
||||
{ 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:
|
||||
@ -254,6 +255,12 @@ public:
|
||||
//Returns a sequence of the external dependencies of this function
|
||||
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
|
||||
Standard_EXPORT TDF_Label GetHistoryEntry (const Standard_Boolean create = Standard_True);
|
||||
|
||||
@ -262,8 +269,10 @@ public:
|
||||
Standard_EXPORT TDF_Label GetArgumentHistoryEntry (const TDF_Label& theArgumentRefEntry,
|
||||
const Standard_Boolean create = Standard_True);
|
||||
|
||||
private:
|
||||
//Returns top label of this function's naming tree
|
||||
Standard_EXPORT TDF_Label GetNamingEntry (const Standard_Boolean create = Standard_True);
|
||||
|
||||
private:
|
||||
|
||||
TDF_Label _label;
|
||||
bool _isDone;
|
||||
|
@ -19,10 +19,9 @@
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include "GEOM_Function.hxx"
|
||||
|
||||
#include "TColStd_HSequenceOfTransient.hxx"
|
||||
@ -30,7 +29,6 @@
|
||||
|
||||
#define SHAPE_ARG_MAIN_SHAPE 1
|
||||
#define SHAPE_ARG_INDICES 2
|
||||
#define SHAPE_ARG_SORTED 3
|
||||
|
||||
class GEOM_ISubShape
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ libGEOMbasic_la_CPPFLAGS = \
|
||||
|
||||
libGEOMbasic_la_LDFLAGS = \
|
||||
$(CORBA_LIBS) \
|
||||
$(KERNEL_LDFLAGS) -lSALOMELocalTrace \
|
||||
$(KERNEL_LDFLAGS) -lSALOMELocalTrace -lSALOMEBasics \
|
||||
$(STDLIB) \
|
||||
$(CAS_LDPATH) -lTKXSBase \
|
||||
$(CAS_OCAF) \
|
||||
|
@ -291,9 +291,15 @@ TopoDS_Shape BlockFix_UnionEdges::Perform(const TopoDS_Shape& Shape,
|
||||
TopoDS_Shape aResult = myContext->Apply(Shape);
|
||||
|
||||
// processing each solid
|
||||
TopExp_Explorer exps;
|
||||
for(exps.Init(Shape, TopAbs_SOLID); exps.More(); exps.Next()) {
|
||||
TopoDS_Solid aSolid = TopoDS::Solid(exps.Current());
|
||||
TopAbs_ShapeEnum aType = TopAbs_SOLID;
|
||||
TopExp_Explorer exps (Shape, aType);
|
||||
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;
|
||||
|
||||
|
@ -19,12 +19,11 @@
|
||||
--
|
||||
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
--
|
||||
|
||||
-- File: GEOMAlgo.cdl
|
||||
-- Created: Sat Dec 04 12:36:22 2004
|
||||
-- Author: Peter KURNEV
|
||||
-- <peter@PREFEX>
|
||||
--
|
||||
|
||||
package GEOMAlgo
|
||||
|
||||
---Purpose:
|
||||
@ -117,7 +116,7 @@ is
|
||||
deferred class Clsf;
|
||||
class ClsfSurf;
|
||||
class ClsfBox;
|
||||
class FinderShapeOn2;
|
||||
--class FinderShapeOn2;
|
||||
class PassKeyShapeMapHasher;
|
||||
--
|
||||
-- classes
|
||||
@ -132,6 +131,7 @@ is
|
||||
class Gluer;
|
||||
class Gluer1;
|
||||
class GlueAnalyser;
|
||||
|
||||
class CoupleOfShapes;
|
||||
class PassKey;
|
||||
class PassKeyMapHasher;
|
||||
@ -146,20 +146,14 @@ is
|
||||
class ShellSolid;
|
||||
class VertexSolid;
|
||||
class SolidSolid;
|
||||
class FinderShapeOn;
|
||||
--class FinderShapeOn;
|
||||
--
|
||||
class FinderShapeOn1;
|
||||
--class FinderShapeOn1;
|
||||
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;
|
||||
--modified by NIZNHY-PKV Mon Jan 29 10:27:46 2007t
|
||||
class FinderShapeOn2;
|
||||
class PassKeyShapeMapHasher;
|
||||
-- class FinderShapeOn2;
|
||||
-- class PassKeyShapeMapHasher;
|
||||
--
|
||||
-- Builder/Splitter
|
||||
deferred class BuilderShape;
|
||||
@ -177,6 +171,7 @@ is
|
||||
class WireSplitter;
|
||||
class WireEdgeSet;
|
||||
class WESCorrector;
|
||||
class WESScaler;
|
||||
--
|
||||
-- Pointers
|
||||
--
|
||||
@ -243,20 +238,9 @@ is
|
||||
Shape from TopoDS,
|
||||
PassKeyShapeMapHasher from GEOMAlgo);
|
||||
|
||||
class DataMapOfShapeShapeSet instantiates
|
||||
class DataMapOfOrientedShapeShape instantiates
|
||||
DataMap from TCollection (Shape from TopoDS,
|
||||
ShapeSet from GEOMAlgo,
|
||||
ShapeMapHasher 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);
|
||||
Shape from TopoDS,
|
||||
OrientedShapeMapHasher from TopTools);
|
||||
|
||||
end GEOMAlgo;
|
||||
|
@ -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,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
|
@ -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
|
@ -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>
|
||||
|
@ -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
|
@ -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>
|
||||
|
154
src/GEOMAlgo/GEOMAlgo_DataMapOfOrientedShapeShape.hxx
Normal 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
|
57
src/GEOMAlgo/GEOMAlgo_DataMapOfOrientedShapeShape_0.cxx
Normal 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>
|
||||
|
@ -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,
|
||||
-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
|
@ -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
|
||||
// Matra Datavision SA. All rights reserved.
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// Copyright (C) 2001 - 2004 by
|
||||
// Open CASCADE SA. All rights reserved.
|
||||
// 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 file is part of the Open CASCADE Technology software.
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
// 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 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
|
||||
#define _GEOMAlgo_Tools_HeaderFile
|
||||
|
@ -1054,10 +1054,10 @@ void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aEx,
|
||||
Standard_Real aT,
|
||||
gp_Pnt& aPF,
|
||||
gp_Dir& aDNF,
|
||||
IntTools_Context& aCtx)
|
||||
IntTools_Context& )//aCtx)
|
||||
{
|
||||
Standard_Boolean bReverse;
|
||||
Standard_Real aT1, aT2, dT, aU, aV;
|
||||
Standard_Real aT1, aT2, dT;//, aU, aV;
|
||||
gp_Dir aDTT, aDNFT, aDBT;
|
||||
gp_Pnt aPFT, aPFx;
|
||||
Handle(Geom_Curve) aC3D;
|
||||
@ -1099,7 +1099,7 @@ void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aEx,
|
||||
aTS=aGAS.GetType();
|
||||
if (aTS==GeomAbs_BSplineSurface ||
|
||||
aTS==GeomAbs_BezierSurface ||
|
||||
aTS==GeomAbs_Plane) {//modified by NIZNHY-PKV Fri Dec 4 08:23:24 2009ft
|
||||
aTS==GeomAbs_Plane) {
|
||||
Standard_Real aTolEx, aTolFx, aTol, dUR, dVR, dR;
|
||||
//
|
||||
aTolEx=BRep_Tool::Tolerance(aEx);
|
||||
@ -1123,6 +1123,8 @@ void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aEx,
|
||||
aDNF.Reverse();
|
||||
}
|
||||
//
|
||||
//modified by NIZNHY-PKV Wed Sep 22 10:52:54 2010f
|
||||
/*
|
||||
GeomAPI_ProjectPointOnSurf& aProjector=aCtx.ProjPS(aF);
|
||||
//
|
||||
aProjector.Perform(aPFx);
|
||||
@ -1134,4 +1136,6 @@ void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aEx,
|
||||
aDNF.Reverse();
|
||||
}
|
||||
}
|
||||
*/
|
||||
//modified by NIZNHY-PKV Wed Sep 22 10:52:59 2010t
|
||||
}
|
||||
|