-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# -* Makefile *-
# Author : Patrick GOLDBRONN (CEA)
# Date : 28/06/2001
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_version.h
// Author : Vadim SANDLER
// Module : SALOME
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
SUBDIRS = unix cmake_files
-# Copyright (C) 2007-2008 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
+# 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
SET(SMESH_CXXFLAGS -I${SMESH_ROOT_DIR}/include/salome)
+FIND_LIBRARY(GeomSelectionTools GeomSelectionTools ${SMESH_ROOT_DIR}/lib/salome)
FIND_LIBRARY(MEFISTO2D MEFISTO2D ${SMESH_ROOT_DIR}/lib/salome)
FIND_LIBRARY(MeshDriverDAT MeshDriverDAT ${SMESH_ROOT_DIR}/lib/salome)
FIND_LIBRARY(MeshDriverMED MeshDriverMED ${SMESH_ROOT_DIR}/lib/salome)
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
admlocal_cmakedir = $(admlocaldir)/cmake_files
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
SUBDIRS = config_files
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
dist_admlocalm4_DATA = \
-dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
dnl
dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
dnl
dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
dnl
+
AC_DEFUN([CHECK_PLATFORM],[
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_CPP])dnl
-dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
dnl
dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
dnl
dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
dnl
+
# Check availability of SMesh binary distribution
#
# Author : Nicolas REJNERI (OPEN CASCADE, 2003)
-# Copyright (C) 2007-2008 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
+# 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
# The following is to avoid PACKAGE_... env variable
# redefinition compilation warnings
# ============================================================
+#
AM_CXXFLAGS = @KERNEL_CXXFLAGS@ -include SALOMEconfig.h
AM_CPPFLAGS = @KERNEL_CXXFLAGS@ -include SALOMEconfig.h
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# -* Makefile *-
# Author : Guillaume Boulant (CSSI)
# Module : SMESH
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 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
+# 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
#!/bin/sh
-# Copyright (C) 2007-2008 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
+# 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
-\r
+@REM Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+@REM
+@REM This library is free software; you can redistribute it and/or
+@REM modify it under the terms of the GNU Lesser General Public
+@REM License as published by the Free Software Foundation; either
+@REM version 2.1 of the License.
+@REM
+@REM This library is distributed in the hope that it will be useful,
+@REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+@REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+@REM Lesser General Public License for more details.
+@REM
+@REM You should have received a copy of the GNU Lesser General Public
+@REM License along with this library; if not, write to the Free Software
+@REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+@REM
+@REM See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+@REM
+
%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\am2cmake.py --smesh\r
#!/bin/bash
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Tool for updating list of .in file for the SALOME project
# and regenerating configure script
# Author : Marc Tajchman - CEA
#!/bin/sh
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
rm -rf autom4te.cache aclocal.m4 configure make_config
find . -name "*~" -print -exec rm {} \;
find . -name "*.pyc" -print -exec rm {} \;
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Author : Marc Tajchman (CEA)
# Date : 28/06/2001
# Modified by : Patrick GOLDBRONN (CEA)
# Modified by : Alexander BORODIN (OCN) - autotools usage
# Created from configure.in.base
#
-AC_INIT([Salome2 Project SMESH module], [5.1.3], [webmaster.salome@opencascade.com], [SalomeSMESH])
+AC_INIT([Salome2 Project SMESH module], [5.1.4], [webmaster.salome@opencascade.com], [SalomeSMESH])
AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
doc/salome/gui/SMESH/Makefile \
doc/salome/gui/SMESH/doxyfile \
doc/salome/gui/SMESH/doxyfile_py \
+ doc/salome/gui/SMESH/static/header.html \
doc/salome/tui/Makefile \
doc/salome/tui/doxyfile \
+ doc/salome/tui/static/header.html \
src/Makefile \
src/Controls/Makefile \
src/Driver/Makefile \
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# -* Makefile *-
# Author : Patrick GOLDBRONN (CEA)
# Date : 30/11/2001
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# -* Makefile *-
# Author : Patrick GOLDBRONN (CEA)
# Date : 30/11/2001
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : Makefile.in
# Author : Vasily Rusyaev (Open Cascade NN)
# Modified by : Alexander BORODIN (OCN) - autotools usage
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : Makefile.in
# Author : Vasily Rusyaev (Open Cascade NN)
# Modified by : Alexander BORODIN (OCN) - autotools usage
#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
-EXTRA_DIST += images input static
+EXTRA_DIST += images input static/footer.html static/doxygen.css
+
+guidocdir = $(docdir)/gui/SMESH
+guidoc_DATA = images/head.png
+
usr_docs: doxyfile_py doxyfile
echo "===========================================" ; \
-# 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
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
-PROJECT_NAME = "Mesh Module Reference Manual v.@VERSION@"
+PROJECT_NAME = "SALOME Mesh User's Guide"
OUTPUT_DIRECTORY = .
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = .
-HTML_HEADER = @srcdir@/static/header.html
+HTML_HEADER = @builddir@/static/header.html
HTML_FOOTER = @srcdir@/static/footer.html
-#HTML_STYLESHEET = @srcdir@/static/doxygen.css
+HTML_STYLESHEET = @srcdir@/static/doxygen.css
TOC_EXPAND = YES
DISABLE_INDEX = NO
GENERATE_TREEVIEW = YES
-# 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
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
-PROJECT_NAME = "Mesh Module Reference Manual v.@VERSION@"
+PROJECT_NAME = "SALOME Mesh User's Guide"
OUTPUT_DIRECTORY = .
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = smeshpy_doc
-HTML_HEADER = @srcdir@/static/header.html
+HTML_HEADER = @builddir@/static/header.html
HTML_FOOTER = @srcdir@/static/footer.html
-#HTML_STYLESHEET = @srcdir@/static/doxygen.css
+HTML_STYLESHEET = @srcdir@/static/doxygen.css
TOC_EXPAND = YES
DISABLE_INDEX = YES
GENERATE_TREEVIEW = NO
\image html hypo_quad_params_res_2.png "The resulting meshes"
-<br>
+<b>See Also</b> a sample TUI Script of a
+\ref tui_quadrangle_parameters "Quadrangle Parameters" hypothesis.
+
\anchor quadrangle_preference_anchor
<h2>Quadrangle Preference</h2>
<li>\subpage ghs3d_hypo_page</li> - works with GHS3D algorithm.
<li>\subpage ghs3dprl_hypo_page</li> - works with GHS3DPRL (tepal) algorithm.
<li>\subpage blsurf_hypo_page</li> - works with BLSURF algorithm.
+<li>\subpage hexotic_hypo_page</li> - works with Hexotic algorithm.
</ul>
There also exist
\image html image126.gif "Example of a hexahedral 3D mesh"
</ul>
+Some of 3D meshing algorithms also can generate 3D meshes from 2D meshes, working without
+geometrical objects. Such algorithms are
+<ul>
+<li>Hexahedron meshing algorithm (i,j,k),</li>
+<li>Tetrahedron (Netgen and GHS3D) meshing algorithms,</li>
+<li>Hexotic.</li>
+</ul>
+
+
\note BLSURF and GHS3D are commercial meshers and require a
license to be used within the Mesh module.
--- /dev/null
+/*!
+
+\page colors_size_page Colors / Size
+
+\image html colors_size.png
+
+Using this dialog you can define the following set of mesh visualization
+parameters:
+<ul>
+<li><b>Elements</b></li>
+<ul>
+<li><b>Fill</b> - color of surface of elements (seen in Shading mode).</li>
+<li><b>Back Face</b> - color of interior surface of elements.</li>
+<li><b>Outline</b> - color of borders of elements.</li>
+<li><b>0D slements</b> - color of 0D elements.</li>
+<li><b>Size of 0D slements</b> - size of 0D elements.</li>
+<li><b>Width</b> - width of lines (edges and borders of elements).</li>
+<li><b>Shrink coef.</b> - relative space of elements compared to gaps between
+ them in shrink mode.</li>
+</ul>
+<li><b>Nodes</b></li>
+<ul>
+<li><b>Color</b> - color of nodes.</li>
+<li><b>Marker</b> - group of options allowing to change the representation of
+ points (see \subpage point_marker_page "Point Marker" page).</li>
+</ul>
+<li><b>Orientation of faces</b></li>
+<ul>
+<li><b>Color</b> - color of orientation vertors.</li>
+<li><b>Scale</b> - size of orientation vectors.</li>
+<li><b>3D vectors</b> - allows to choose between 2D planar and 3D vectors.</li>
+</ul>
+</ul>
+
+*/
\ No newline at end of file
</ul>
The submeshes can become concurrent if their algorithms leads to mesh shared subshape
with different algorithms (or different algorithms parameters, i.e. hypothesises).
-In fact, we have three submeshes with concurrent algorithms, becase
-they has different hypothesises assigned to them.
+In fact, we have three submeshes with concurrent algorithms, because
+they have different hypothesises assigned to them.
The first mesh computation made with:
\image html mesh_order_123.png
<center><em>"Result mesh with order SubMesh_3, SubMesh_2, SubMesh_1 "</em></center>
As we can see each mesh computation has different number of result
-elements and different mesh descretisation on shared edges (edges,
-that shared between <b>Face_1</b>, <b>Face_2</b> and <b>Face_3</b>)
+elements and different mesh discretisation on shared edges (edges
+that are shared between <b>Face_1</b>, <b>Face_2</b> and <b>Face_3</b>)
Additionally, submesh priority (order of algorithms to be applied) can
be modified not only in separate dialog box, but in <b>Preview</b>
\image html mesh_order_preview.png
<center><em>"Preview with submesh priority list box"</em></center>
-If no concurrent submeshes under Mesh object user will see the
+If there are no concurrent submeshes under Mesh object, then user will see the
following information dialog box
\image html mesh_order_no_concurrent.png
<center><em>"No concurrent submeshes detected"</em></center>
-and no mesh order list box appear in Preview dialog box.
+and no mesh order list box will appear in Preview dialog box.
</ol>
--- /dev/null
+/*!
+
+\page hexotic_hypo_page Hexotic Parameters hypothesis
+
+\n Hexotic Parameters hypothesis works only with <b>Hexotic</b>
+algorithm. This algorithm is a commercial software.
+
+\image html hexotic_parameters.png
+
+<ul>
+<li><b>Name</b> - allows to define the name of the hypothesis (Hexotic
+Parameters by default).</li>
+
+<li><b>Nb. Hexes Min Level</b> - allows defining the minimal level of recursive partitioning on the initial octree cube.</li>
+
+<li><b>Nb. Hexes Max Level</b> - allows defining the maximal level of recursive partitioning on the initial octree cube.</li>
+
+<li><b>Salome Quadrangles</b> - not documented.</li>
+
+<li><b>Generate smooth meshes no ridges</b> - specifies that the mesher can ignore ridges. A ridge is a geometrical entity (a sharp edge). The resulting meshes will have better quality elements, at the price of "smoothing" out the geometry.
+</li>
+
+<li><b>Authorize invalid elements</b> - specifies that the mesher must conform as much as possible to the geometry (especially the sharp edges). The resulting meshes may contain invalid elements (but with positive volumes: for example, three vertices of an hexahedron on the same edge), for the benefit of better geometry accuracy.
+</li>
+
+<li><b>Sharp angle threshold in degrees</b> - specifies the angle between two triangles above which the hex mesher will consider the edge common to these two triangles as being a "ridge". A ridge is a geometrical entity (a sharp edge) which has to be kept as it is in the final hex mesh.The default value is 60 (degrees).<br>If you raise this value, the hex mesher will detect less ridges, and the final solid mesh will therefore be smoother. On the other hand, if you reduce this value, more ridges will be detected and the algorithm will face harder situations to conform to.
+</li>
+</ul>
+
+*/
<br>
</li>
<li>To confirm your choice click \b Apply or <b>Apply and Close</b> button.</li>
+</ul>
</ol>
In this picture you see a triangle which coincides with one of the
its elements.</li>
<li>\subpage rotation_page "Rotate" by the indicated axis and angle
the mesh or some of its elements.</li>
+<li>\subpage scale_page "Scale Transform" the mesh or some of its elements.</li>
<li>Create a \subpage symmetry_page "symmetrical copy" of the mesh
through a point or a vector of symmetry.</li>
<li>Unite meshes by \subpage sewing_meshes_page "sewing" free borders,
<li>\subpage changing_orientation_of_elements_page "Change orientation"
of the selected elements.</li>
<li>\subpage cutting_quadrangles_page "Cut a quadrangle" into two triangles.</li>
+<li>\subpage split_to_tetra_page "Split" volumic elements into tetrahedra.</li>
<li>\subpage smoothing_page "Smooth" elements, reducung distortions in
them by adjusting the locations of element corners.</li>
<li>Create an \subpage extrusion_page "extrusion" along a vector.</li>
key-points. Additionally, you may choose the way of getting nodes
coordinates by <b>projecting nodes on the face</b> instead of using
"positions on face" generated by mesher (if there is any). Faces
-having a seam edge can?t be used for automatic pattern creation.
+having a seam edge can't be used for automatic pattern creation.
When creating a pattern from an existing mesh, there are two possible
cases:
<br><b>See Also</b> a sample TUI Script of a
\ref tui_pattern_mapping "Pattern Mapping" operation.
-*/
\ No newline at end of file
+*/
--- /dev/null
+/*!
+
+\page point_marker_page Point Marker
+
+\n You can change the representation of points in
+the 3D viewer either by selecting one of the predefined
+shapes or by loading a custom texture from an external file.
+
+- Standard point markers
+
+The Mesh module provides a set of predefined point marker shapes
+which can be used to display points in 3D viewer.
+Each standard point marker has two attributes: type (defines shape
+form) and scale factor (defines shape size).
+
+\image html point_marker_widget1.png
+
+<br>
+
+\image html std_point_marker.png "Mesh presentation with standard point markers"
+
+- Custom point markers
+
+It is also possible to load a point marker shape from an external file.
+This file should provide a description of the point texture as a set
+of lines; each line is represented as sequence of "0" and "1" symbols,
+where "1" symbol means an opaque pixel and "0" symbol means a
+transparent pixel. The width of the texture correspond to the length
+of the longest line in the file, expanded to the nearest byte-aligned
+value. The height of the texture is equal to the number of non-empty
+lines in the file. Note that missing symbols are replaced by "0".
+
+Here is a texture file sample:
+
+<pre>
+00111100
+00111100
+11111111
+11111111
+11111111
+11111111
+00111100
+00111100
+</pre>
+
+\image html point_marker_widget2.png
+
+<br>
+
+\image html custom_point_marker.png "Mesh presentation with custom point markers"
+
+*/
+
<li>Click \b Apply or <b> Apply and Close</b> button to confirm the
operation.</li>
-
+</ul>
</ol>
--- /dev/null
+/*!
+
+\page scale_page Scale
+
+\n This geometrical operation allows to scale in space your mesh
+or some of its elements.
+
+<em>To scale a mesh:</em>
+
+<ol>
+<li>From the \b Modification menu choose \b Transformation -> \b Scale
+\b Transform item.
+
+One of the following dialogs will appear:
+
+With one scale factor:
+\image html scale01.png
+
+Or with different scale factors for axes:
+\image html scale02.png
+
+</li>
+
+<li>
+In the dialog:
+<ul>
+<li>specify the IDs of the translated elements:
+
+<ul>
+<li><b>Select the whole mesh, submesh or group</b> activating this
+checkbox; or</li>
+<li>choose mesh elements with the mouse in the 3D Viewer. It is
+possible to select a whole area with a mouse frame; or</li>
+<li>input the element IDs directly in <b>ID Elements</b> field. The selected elements will be highlighted in the
+viewer; or</li>
+<li>apply Filters. <b>Set filter</b> button allows to apply a filter to the selection of elements. See more
+about filters in the \ref selection_filter_library_page "Selection filter library" page.</li>
+</ul>
+</li>
+
+<li>specify the base point for scale</li>
+
+<li>specify the scale factor</li>
+
+<li>specify the conditions of scale:
+<ul>
+<li>activate <b>Move elements</b> radio button to create the source
+mesh (or elements) at the new location and erase it from the previous location;</li>
+<li>activate <b>Copy elements</b> radio button to create the source
+mesh (or elements) at the new location, but leave it at the previous
+location, the source mesh will be considered one and single mesh with
+the result of the scale operation;</li>
+<li>activate <b>Create as new mesh</b> radio button to leave the
+source mesh (or elements) at its previous location and create a new
+mesh at the new location, the new mesh appears in the Object Browser
+with the default name MeshName_scaled (it is possible to change this
+name in the adjacent box);</li>
+<li>activate <b> Copy groups </b> checkbox to copy the groups of elements of the source mesh to the newly created mesh.</li>
+</ul>
+</li>
+
+</li>
+
+<li>Click \b Apply or <b> Apply and Close</b> button to confirm the operation.</li>
+</ul>
+</ol>
+
+
+
+<b>Example of using:</b>
+
+1. Create quandrangle mesh 3x3 on simple planar face (200x200)
+
+\image html scaleinit01.png
+
+and union 3 face (along axis Z) to group "gr_faces"
+
+\image html scaleinit02.png
+
+
+
+2. Perform scale operation for whole mesh with creation of new mesh:
+
+\image html scale03.png
+
+result after operation:
+
+\image html scaleres03.png
+
+
+
+3. Perform scale operation for whole mesh with copy of elements:
+
+\image html scale04.png
+
+result after operation:
+
+\image html scaleres04.png
+
+
+
+4. Perform scale operation for group of faces with copy of elements:
+
+\image html scale06.png
+
+result after operation:
+
+\image html scaleres06.png
+
+
+
+5. Perform scale operation for two edges with moving of elements:
+
+\image html scale07.png
+
+result after operation:
+
+\image html scaleres07.png
+
+
+
+6. Perform scale operation for one face with moving of elements:
+
+\image html scale09.png
+
+result after operation:
+
+\image html scaleres09.png
+
+
+<br><b>See Also</b> a sample TUI Script of a \ref tui_scale "Scale" operation.
+
+
+*/
--- /dev/null
+/*!
+
+\page split_to_tetra_page Splitting volumes into tetrahedra
+
+\n This operation allows to split volumic elements into tetrahedra.
+2D mesh is modified accordingly.
+
+<em>To split volumes:</em>
+<ol>
+<li>Display a mesh or a submesh in the 3D viewer.</li>
+<li>In the \b Modification menu select the <b>Split into Tetrahedra</b> item or
+click <em>"Split into Tetrahedra"</em> button in the toolbar.
+
+\image html split_into_tetra_icon.png
+<center><em>"Split into Tetrahedra" button</em></center>
+
+The following dialog box will appear:
+
+\image html split_into_tetra.png
+
+\par
+<ul>
+<li>The main list contains the list of volumes. You can click on
+a volume in the 3D viewer and it will be highlighted (lock Shift
+keyboard button to select several volumes). Click \b Add button and
+the ID of this volume will be added to the list. To remove a
+selected element or elements from the list click \b Remove button. <b>Sort
+list</b> button allows to sort the list of IDs. \b Filter button allows to
+apply a definite filter to the selection of volumes.
+<br><b>Note:</b> If you split not all adjacent non-tetrahedral volumes, your mesh becomes
+non-conform.</li>
+<li><b>Apply to all</b> radio button allows to split all
+volumes of the currently displayed mesh or submesh.</li>
+</ul>
+
+<ul>
+<li>\b Split hexahedron
+
+<ul>
+<li><b>Into 5 tetrahedra</b> and <b>Into 6 tetrahedra</b> allows to
+specify the number of tetrahedra a hexahedron will be split into. If the specified method does
+not allow to get a conform mesh, a generic solution is applied: an additional node
+is created at gravity center of a hexahedron, serving an apex of tetrahedra, all quadrangle sides of the hexahedron are split into two triangles each serving a base of a new tetrahedron.</li>
+</ul>
+
+</li>
+
+<li><b>Select from</b> set of fields allows to choose a submesh or an
+existing group whose elements will be automatically added to the
+list.</li>
+</ul>
+
+<li>Click the \b Apply or <b>Apply and Close</b> button to confirm the operation.</li>
+</ol>
+*/
\n This geometrical operation allows to perform a symmetrical copy of
your mesh or some of its elements.
-<em>To create a symmtrical copy of the mesh:</em>
+<em>To create a symmetrical copy of the mesh:</em>
<ol>
<li>From the \b Modification menu choose \b Transformation -> \b Symmetry item or click
</ul>
<li>Click \b Apply or <b> Apply and Close</b> button to confirm the
operation.</li>
+</ul>
</ol>
</li>
<li>Click \b Apply or <b> Apply and Close</b> button to confirm the operation.</li>
+</ul>
</ol>
<br><b>See Also</b> a sample TUI Script of a \ref tui_translation "Translation" operation.
mesh.Compute()
\endcode
+\anchor tui_quadrangle_parameters
+<h2>Quadrangle Parameters example </h2>
+\code
+import geompy
+import smesh
+import StdMeshers
+
+# Get 1/4 part from the disk face.
+Box_1 = geompy.MakeBoxDXDYDZ(100, 100, 100)
+Disk_1 = geompy.MakeDiskR(100, 1)
+Common_1 = geompy.MakeCommon(Disk_1, Box_1)
+geompy.addToStudy( Disk_1, "Disk_1" )
+geompy.addToStudy( Box_1, "Box_1" )
+geompy.addToStudy( Common_1, "Common_1" )
+
+# Set the Geometry for meshing
+Mesh_1 = smesh.Mesh(Common_1)
+
+# Create Quadrangle parameters and define the Base Vertex.
+Quadrangle_Parameters_1 = smesh.CreateHypothesis('QuadrangleParams')
+Quadrangle_Parameters_1.SetTriaVertex( 8 )
+
+# Define 1D hypothesis and cmpute the mesh
+Regular_1D = Mesh_1.Segment()
+Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
+Nb_Segments_1.SetDistrType( 0 )
+status = Mesh_1.AddHypothesis(Quadrangle_Parameters_1)
+Quadrangle_2D = Mesh_1.Quadrangle()
+Mesh_1.Compute()
+\endcode
\n Other meshing algorithms:
mesh.Rotate([], axisXYZ, angle270, 1)
\endcode
+<br>
+\anchor tui_scale
+<h3>Scale</h3>
+
+\code
+import geompy
+Box = geompy.MakeBoxDXDYDZ(200, 200, 200)
+f = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"])
+
+import smesh,SMESH
+import StdMeshers
+Mesh1 = smesh.Mesh(f[0])
+Regular_1D = Mesh1.Segment()
+Nb_Segments_1 = Regular_1D.NumberOfSegments(3)
+Nb_Segments_1.SetDistrType( 0 )
+Quadrangle_2D = Mesh1.Quadrangle()
+isDone = Mesh1.Compute()
+
+#Perform scale opration for whole mesh with creation of new mesh
+newMesh = Mesh1.ScaleMakeMesh(Mesh1,SMESH.PointStruct(100,100,200),[0.5,0.3,0.7],True,"ScaledMesh")
+
+#Perform scale operation for whole mesh with copy of elements
+Mesh1.Scale(Mesh1,SMESH.PointStruct(200,100,100),[0.5,0.5,0.5],True,True)
+
+#Perform scale opration for two edges with moving of elements
+Mesh1.Scale([1,2],SMESH.PointStruct(-100,100,100),[0.8,1.0,0.7],False)
+
+#Perform scale opration for one face with moving of elements
+Mesh1.Scale([21],SMESH.PointStruct(0,200,200),[0.7,0.7,0.7],False)
+\endcode
+
<br>
\anchor tui_symmetry
<h3>Symmetry</h3>
mesh.SewSideElements([69, 70, 71, 72], [91, 92, 89, 90], 8, 38, 23, 58)
\endcode
-*/
\ No newline at end of file
+*/
<li><b>2D Quadratic</b> - allows to select between the representation
of quadratic edges as broken <b>lines</b> or as <b>arcs</b></li>
<li><b>Orientation of faces</b> - shows vectors of orientation of
-faces of the selected mesh</li>
-<li><b>Colors / Size</b> - allows to select color and size of
+faces of the selected mesh. Vector is shown for each 2D mesh element
+and for each free face of 3D mesh element. Vector direction is calculated by
+the first three nodes of face as a cross product of vectors n1-n2 and n1-n3.</li>
+<li>\subpage colors_size_page "Colors / Size" - allows to select color and size of
meshes.</li>
<li>\subpage transparency_page "Transparency" - allows to change the
transparency of mesh elements.</li>
-H1 {
+body {
+ font-family: Arial, Helvetica, sans-serif;
+ background-color: #ffffff;
+}
+
+h1 {
text-align: center;
+ text-decoration: none;
+ border: none;
+ line-height: 25px;
+ text-align: center;
+// text-transform:uppercase;
+ background: #D9f4fd;
+ font-size: 12pt;
+ font-weight: bold;
+ border: 1px solid #CCCCCC;
+ -moz-border-radius: 8px;
+ -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+/* background-color: rgb(75, 140, 185);
+ color: #ffffff;
+ text-align: center;
+ height: 25px;*/
+
+}
+
+h2 {
+ font-size: 12pt;
+ font-weight: bold;
+}
+
+table {
+ font-size: 10pt;
}
CAPTION {
A.qindexRef {}
-/* Link to any cross-referenced Doxygen element */
-A.el {
- text-decoration: none;
- font-weight: bold
-}
-
-A.elRef {
- font-weight: bold
-}
-
/* Link to any cross-referenced Doxygen element inside a code section
(ex: header)
*/
A:hover {
text-decoration: none;
- background-color: lightblue
+ background-color: lightblue;
+}
+
+div.contents {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 10pt;
+}
+
+div.navpath {
+ font-size: 11pt;
+}
+
+div.version {
+ background-color:#ffffde;
+ border:1px solid #cccccc;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 9pt;
+ text-align: center;
+ width:100px;
+ -moz-border-radius: 8px;
+// -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+div.header {
+ background: url("head.png");
+ background-color: #175783;
+ border: 1px solid;
+ height: 80px;
+ background-repeat: no-repeat;
+ margin-bottom: 10px;
+}
+
+div.tabs {
+ display: none;
+}
+
+div.footer {
+ background-color: #D9f4fd;
+ border: 1px solid #AAAAAA;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ padding: 10px;
+ margin-top: 15px;
}
DL.el {
}
/* A code fragment (ex: header) */
-DIV.fragment {
- width: 100%;
+div.fragment {
border: none;
- background-color: #CCCCCC
}
/* In the alpha list (coumpound index), style of an alphabetical index letter */
font-size: smaller
}
-BODY {
- background: #FFFFFF;
-}
-
/*div.div-page {
background-color: #FFFFFF;
margin-left: 1em;
span.preprocessor { color: #806020 }
span.stringliteral { color: #002080 }
span.charliteral { color: #008080 }
+
+/* @group Code Colorization */
+
+.fragment {
+ font-family: monospace, fixed;
+ font-size: 10pt;
+}
+
+pre.fragment {
+ width: 95%;
+ border: 1px solid #CCCCCC;
+ -moz-border-radius: 8px;
+ -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+ background-color:#EEF3F5;
+ padding: 4px 6px;
+ margin: 4px 1px 4px 1px;
+}
+
+/* Top Navigation style */
+
+div.navigation {
+ margin-bottom:20px;
+}
+
+/* Left navigation panel style */
+
+body.ftvtree {
+ background-color: #D9f4fd;
+ margin: 10px;
+}
+
+div.directory {
+ margin: 0;
+}
+
+div.directory.p {
+ margin: 0;
+}
+
+h3.swap {
+ font-size: 10pt;
+ margin-bottom: 0;
+}
+
+/* Link to any cross-referenced Doxygen element */
+a.el {
+ text-decoration: none;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 9pt;
+ color: #551a8b;
+}
+
+a.el:hover {
+ background-color: transparent;
+}
+
+a.elRef {
+ font-weight: normal;
+}
+
+
+#MSearchBox {
+ -moz-border-radius:8px 8px 8px 8px;
+ background-color:white;
+ border:1px solid #84B0C7;
+ margin:0;
+ padding:0;
+ white-space:nowrap;
+}
+
+div.directory img {
+ vertical-align:-30%;
+}
+
+div.directory p {
+ white-space:nowrap;
+ margin: 0;
+}
+
+div.directory-alt div {
+ display: none;
+ margin: 0px;
+}
+
+
+div.directory div {
+ display: none;
+ margin: 0px;
+}
+
+div.version {
+ background-color:#ffffde;
+ border:1px solid #cccccc;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 9pt;
+ text-align: center;
+ width:100px;
+ -moz-border-radius: 8px;
+// -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+/* @group Member Descriptions */
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+ background-color: #FAFAFA;
+ border: none;
+ margin: 4px;
+ padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+ padding: 0px 8px 4px 8px;
+ color: #555;
+}
+
+.memItemLeft, .memItemRight, .memTemplParams {
+ border-top: 1px solid #ccc;
+}
+
+.memItemLeft, .memTemplItemLeft {
+ white-space: nowrap;
+}
+
+.memTemplParams {
+ color: #606060;
+ white-space: nowrap;
+}
+
+/* @end */
+
+/* Styles for detailed member documentation */
+
+.memtemplate {
+ font-size: 80%;
+ color: #606060;
+ font-weight: normal;
+ margin-left: 3px;
+}
+
+.memnav {
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+
+.memitem {
+ padding: 0;
+ margin-bottom: 10px;
+}
+
+.memname {
+ white-space: nowrap;
+ font-weight: bold;
+}
+
+.memproto, .memdoc {
+ border: 1px solid #84b0c7;
+}
+
+.memproto {
+ padding: 0;
+ background-color: #d5e1e8;
+ font-weight: bold;
+ -webkit-border-top-left-radius: 8px;
+ -webkit-border-top-right-radius: 8px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ -moz-border-radius-topleft: 8px;
+ -moz-border-radius-topright: 8px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+
+}
+
+
+
+.memdoc {
+ padding: 2px 5px;
+ background-color: #eef3f5;
+ border-top-width: 0;
+ -webkit-border-bottom-left-radius: 8px;
+ -webkit-border-bottom-right-radius: 8px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ -moz-border-radius-bottomleft: 8px;
+ -moz-border-radius-bottomright: 8px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+}
+
+.paramkey {
+ text-align: right;
+}
+
+.paramtype {
+ white-space: nowrap;
+}
+
+.paramname {
+ color: #602020;
+ white-space: nowrap;
+}
+.paramname em {
+ font-style: normal;
+}
+
+/* @end */
<head>
</head>
<body>
-<hr style="width: 100%; height: 2px;">
+<div class="footer">
<div style="text-align: center;">
-Copyright © 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE<br>
+Copyright © 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE<br>
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS<br>
</div>
+</div>
</body>
</html>
--- /dev/null
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>$title</title>
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
+</head>
+<div class="header"></div>
+<div align="right"><div class="version">Version: @VERSION@</div></div>
+
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : Makefile.in
# Author : Vasily Rusyaev (Open Cascade NN)
# Module : doc
#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
-EXTRA_DIST += images static
+EXTRA_DIST += images static/doxygen.css static/footer.html
+
+tuidocdir = $(docdir)/tui/SMESH
+tuidoc_DATA = images/head.png images/smeshscreen.png
dist_doc_DATA = \
extra/AddNetgenInSalome2.pdf \
-# 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
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
-PROJECT_NAME = "Mesh Module Programming Guide v.@VERSION@"
+PROJECT_NAME = "SALOME Mesh Module Developer"
PROJECT_NUMBER =
OUTPUT_DIRECTORY = SMESH
CREATE_SUBDIRS = NO
INPUT = @top_srcdir@/src \
@top_srcdir@/bin \
@top_srcdir@/idl \
- @top_builddir@/bin
-FILE_PATTERNS = *.idl *.hxx *.cxx *.h *.c *.hh *.cc @DOXYGEN_PYTHON_EXTENSION@
+ @top_builddir@/bin \
+ @srcdir@/input
+FILE_PATTERNS = *.idl *.hxx *.cxx *.h *.c *.hh *.cc @DOXYGEN_PYTHON_EXTENSION@ *.doc
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
GENERATE_HTML = YES
HTML_OUTPUT = .
HTML_FILE_EXTENSION = .html
-HTML_HEADER = @srcdir@/static/myheader.html
+HTML_HEADER = @builddir@/static/header.html
HTML_FOOTER = @srcdir@/static/footer.html
HTML_STYLESHEET = @srcdir@/static/doxygen.css
HTML_ALIGN_MEMBERS = YES
--- /dev/null
+/*! \mainpage
+
+\image html smeshscreen.png
+
+To browse the \b SALOME Mesh module Developer Documentation, follow the links below or use navigation menu at the top of the page:
+<ul>
+<li> <a href="modules.html">Modules</a> - documentation of TUI functionality.</li>
+<li> <a href="namespaces.html">Name Spaces</a> - list of TUI packages and scripts.</li>
+<li> <a href="annotated.html">Data Structures</a> - list of all data structures and classes with brief descriptions.</li>
+<li> <a href="files.html">Files</a> - list of all files with brief descriptions.</li>
+</ul>
+
+*/
\ No newline at end of file
-H1 {
+body {
+ font-family: Arial, Helvetica, sans-serif;
+ background-color: #ffffff;
+}
+
+h1 {
text-align: center;
+ text-decoration: none;
+ border: none;
+ line-height: 25px;
+ text-align: center;
+// text-transform:uppercase;
+ background: #D9f4fd;
+ font-size: 12pt;
+ font-weight: bold;
+ border: 1px solid #CCCCCC;
+ margin-top: 50px;
+ -moz-border-radius: 8px;
+ -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+h2 {
+ font-size: 12pt;
+ font-weight: bold;
+}
+
+table {
+ font-size: 10pt;
+ padding-left: 20px;
}
CAPTION {
A.qindexRef {}
-/* Link to any cross-referenced Doxygen element */
-A.el {
- text-decoration: none;
- font-weight: bold
-}
-
-A.elRef {
- font-weight: bold
-}
-
/* Link to any cross-referenced Doxygen element inside a code section
(ex: header)
*/
A:hover {
text-decoration: none;
- background-color: lightblue
+ background-color: lightblue;
+}
+
+div.contents {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 10pt;
+ padding: 20px;
+}
+
+div.navpath {
+ font-size: 11pt;
+}
+
+div.header {
+ background: url("head.png");
+ background-color: #175783;
+ border: 1px solid;
+ height: 80px;
+ background-repeat: no-repeat;
+ margin-bottom:20px;
+}
+
+div.tabs {
+ text-align: justify;
+ margin-left : 2px;
+ margin-right : 2px;
+ margin-top : 2px;
+ margin-bottom : 2px
+ font-weight: bold;
+ color: #FFFFFF;
+}
+
+div.footer {
+ background-color: #D9f4fd;
+ border: 1px solid #AAAAAA;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ padding: 10px;
+}
+
+div.div-footer {
+ background-color: #D9f4fd;
+ border: 1px solid #AAAAAA;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ padding: 10px;
+ text-align: center;
}
DL.el {
}
/* A code fragment (ex: header) */
-DIV.fragment {
- width: 100%;
+div.fragment {
border: none;
- background-color: #CCCCCC
}
/* In the alpha list (coumpound index), style of an alphabetical index letter */
font-size: smaller
}
-BODY {
- background: #FFFFFF;
-}
-
/*div.div-page {
background-color: #FFFFFF;
margin-left: 1em;
border-color: #0D299A;
}*/
-DIV.div-footer {
- margin-left: 1em;
- margin-right: 1em;
- margin-bottom: 0.2em;
- text-align: right;
- font-size: 9pt;
+div.tabs {
+ text-align: justify;
+ margin-left : 2px;
+ margin-right : 2px;
+ margin-top : 2px;
+ margin-bottom : 2px
+ font-weight: bold;
+ color: #FFFFFF;
}
/* In File List, Coumpound List, etc, 1st column of the index */
TD.indexkey {
- background-color: #CCCCCC;
+ background-color: #DDDDEE;
font-weight: bold;
padding-right : 10px;
padding-top : 2px;
/* In File List, Coumpound List, etc, 2nd column of the index */
TD.indexvalue {
- background-color: #CCCCCC;
+ background-color: #EEEEFF;
font-style: italic;
padding-right : 10px;
padding-top : 2px;
span.preprocessor { color: #806020 }
span.stringliteral { color: #002080 }
span.charliteral { color: #008080 }
+
+/* @group Code Colorization */
+
+.fragment {
+ font-family: monospace, fixed;
+ font-size: 10pt;
+}
+
+pre.fragment {
+ width: 95%;
+ border: 1px solid #CCCCCC;
+ -moz-border-radius: 8px;
+ -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+ background-color:#EEF3F5;
+ padding: 4px 6px;
+ margin: 20px;
+}
+
+/* Top Navigation style */
+
+div.navigation {
+ margin-bottom:20px;
+}
+
+/* Left navigation panel style */
+
+body.ftvtree {
+ background-color: #D9f4fd;
+ margin: 10px;
+}
+
+div.directory {
+ margin: 0;
+}
+
+div.directory.p {
+ margin: 0;
+}
+
+h3.swap {
+ font-size: 10pt;
+ margin-bottom: 0;
+}
+
+/* Link to any cross-referenced Doxygen element */
+a.el {
+ text-decoration: none;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 10pt;
+ color: #551a8b;
+}
+
+a.el:hover {
+ background-color: transparent;
+ color: #551acc;
+}
+
+a {
+// text-decoration: none;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 10pt;
+ color: #551a8b;
+}
+
+a:hover {
+ background-color: transparent;
+ color: #551acc;
+}
+
+a.elRef {
+ font-weight: normal;
+}
+
+
+#MSearchBox {
+ -moz-border-radius:8px 8px 8px 8px;
+ background-color:white;
+ border:1px solid #84B0C7;
+ margin:0;
+ padding:0;
+ white-space:nowrap;
+}
+
+div.directory img {
+ vertical-align:-30%;
+}
+
+div.directory p {
+ white-space:nowrap;
+ margin: 0;
+}
+
+div.directory-alt div {
+ display: none;
+ margin: 0px;
+}
+
+
+div.directory div {
+ display: none;
+ margin: 0px;
+}
+
+div.version {
+ background-color:#ffffde;
+ border:1px solid #cccccc;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 9pt;
+ text-align: center;
+ width:100px;
+ -moz-border-radius: 8px;
+ // -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+
+/* @group Member Descriptions */
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+ background-color: #FAFAFA;
+ border: none;
+ margin: 4px;
+ padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+ padding: 0px 8px 4px 8px;
+ color: #555;
+}
+
+.memItemLeft, .memItemRight, .memTemplParams {
+ border-top: 1px solid #ccc;
+}
+
+.memItemLeft, .memTemplItemLeft {
+ white-space: nowrap;
+}
+
+.memTemplParams {
+ color: #606060;
+ white-space: nowrap;
+}
+
+/* @end */
+
+/* Styles for detailed member documentation */
+
+.memtemplate {
+ font-size: 80%;
+ color: #606060;
+ font-weight: normal;
+ margin-left: 3px;
+}
+
+.memnav {
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+
+.memitem {
+ padding: 0;
+ margin-bottom: 10px;
+}
+
+.memname {
+ white-space: nowrap;
+ font-weight: bold;
+}
+
+.memproto, .memdoc {
+ border: 1px solid #84b0c7;
+}
+
+.memproto {
+ padding: 0;
+ background-color: #d5e1e8;
+ font-weight: bold;
+ -webkit-border-top-left-radius: 8px;
+ -webkit-border-top-right-radius: 8px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ -moz-border-radius-topleft: 8px;
+ -moz-border-radius-topright: 8px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+
+}
+
+
+
+.memdoc {
+ padding: 2px 5px;
+ background-color: #eef3f5;
+ border-top-width: 0;
+ -webkit-border-bottom-left-radius: 8px;
+ -webkit-border-bottom-right-radius: 8px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ -moz-border-radius-bottomleft: 8px;
+ -moz-border-radius-bottomright: 8px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+}
+
+.paramkey {
+ text-align: right;
+}
+
+.paramtype {
+ white-space: nowrap;
+}
+
+.paramname {
+ color: #602020;
+ white-space: nowrap;
+}
+.paramname em {
+ font-style: normal;
+}
+
+/* @end */
-</DIV>
-<DIV class="div-footer">
-Generated on $datetime for $projectname by <A href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></A> $doxygenversion</DIV>
-</BODY>
-</HTML>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+</head>
+<body>
+<div class="footer">
+<!--hr style="width: 100%; height: 2px;"-->
+<div style="text-align: center;">
+Copyright © 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE<br>
+Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS<br>
+</div>
+</div>
+</body>
+</html>
--- /dev/null
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
+ <title>$title</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head>
+<body>
+<div class="header"></div>
+<div align="right"><div class="version">Version: @VERSION@</div></div>
+</body>
+</html>
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# This Makefile is responsible of generating the client and server
# implementation of IDL interfaces for both C++ and python usage.
# The building process of the C++ files is in charge of each source
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_BasicHypothesis.idl
// Author : Paul RASCLE, EDF
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_Filter.idl
// Author : Alexey Petrov, OCC
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_Gen.idl
// Author : Paul RASCLE, EDF
-
+//
#ifndef _SMESH_GEN_IDL_
#define _SMESH_GEN_IDL_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_Group.idl
// Author : Sergey ANIKIN, OCC
// $Header$
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_Hypothesis.idl
// Author : Paul RASCLE, EDF
// $Header$
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_Mesh.idl
// Author : Paul RASCLE, EDF
//
-
#ifndef _SMESH_MESH_IDL_
#define _SMESH_MESH_IDL_
SMESH_MeshEditor GetMeshEditPreviewer()
raises (SALOME::SALOME_Exception);
+ /*!
+ * Return true if the mesh has been edited since a total re-compute
+ * and those modifications may prevent successful partial re-compute
+ */
+ boolean HasModificationsToDiscard()
+ raises (SALOME::SALOME_Exception);
+
/*! Check group names for duplications.
* Consider maximum group name length stored in MED file.
*/
ElementType GetElementType( in long id, in boolean iselem )
raises (SALOME::SALOME_Exception);
+ EntityType GetElementGeomType( in long id )
+ raises (SALOME::SALOME_Exception);
+
long_array GetSubMeshElementsId(in long ShapeID)
raises (SALOME::SALOME_Exception);
*/
long ElemNbFaces(in long id);
+ /*!
+ * Returns nodes of given face (counted from zero) for given volumic element.
+ */
+ long_array GetElemFaceNodes(in long elemId, in short faceIndex);
+
+ /*!
+ * Returns an element based on all given nodes.
+ */
+ long FindElementByNodes(in long_array nodes);
+
/*!
* Returns true if given element is polygon
*/
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_MeshEditor.idl
//
-
#ifndef _SMESH_MESHEDITOR_IDL_
#define _SMESH_MESHEDITOR_IDL_
interface NumericalFunctor;
interface SMESH_MeshEditor
{
+ /*!
+ * \brief Wrap a sequence of ids in a SMESH_IDSource
+ */
+ SMESH_IDSource MakeIDSource(in long_array IDsOfElements);
+
boolean RemoveElements(in long_array IDsOfElements);
boolean RemoveNodes(in long_array IDsOfNodes);
long BestSplit (in long IDOfQuad,
in NumericalFunctor Criterion);
+ /*!
+ * \brief Split volumic elements into tetrahedrons
+ * \param elems - elements to split
+ * \param methodFlags - flags passing splitting method:
+ * 1 - split the hexahedron into 5 tetrahedrons
+ * 2 - split the hexahedron into 6 tetrahedrons
+ */
+ void SplitVolumesIntoTetra(in SMESH_IDSource elems, in short methodFlags)
+ raises (SALOME::SALOME_Exception);
+
+
enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
boolean Smooth(in long_array IDsOfElements,
in boolean CopyGroups,
in string MeshName);
+ void Scale (in SMESH_IDSource theObject,
+ in PointStruct thePoint,
+ in double_array theScaleFact,
+ in boolean Copy);
+ ListOfGroups ScaleMakeGroups (in SMESH_IDSource theObject,
+ in PointStruct thePoint,
+ in double_array theScaleFact);
+ SMESH_Mesh ScaleMakeMesh (in SMESH_IDSource theObject,
+ in PointStruct thePoint,
+ in double_array theScaleFact,
+ in boolean CopyGroups,
+ in string MeshName);
+
void Rotate (in long_array IDsOfElements,
in AxisStruct Axis,
in double AngleInRadians,
*/
long_array FindElementsByPoint(in double x, in double y, in double z, in ElementType type);
+ /*!
+ * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
+ * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
+ */
+ short GetPointState(in double x, in double y, in double z);
+
enum Sew_Error {
SEW_OK,
SEW_BORDER1_NOT_FOUND,
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_Pattern.idl
// Created : Mon Aug 2 10:48:36 2004
// Author : Edward AGAPOV (eap)
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# -* Makefile *-
# Author : Patrick GOLDBRONN (CEA)
# Date : 28/06/2001
mesh_extractGroup.png \
mesh_precompute.png \
mesh_2d_from_3d.png \
- mesh_free_faces.png
+ mesh_free_faces.png \
+ scale.png \
+ scale_along_axes.png \
+ split_into_tetra.png
# VSR: little trick to avoid putting if SMESHCatalog.xml to the distribution archive
nodist_salomeres_SCRIPTS = SMESHCatalog.xml
<?xml version='1.0' encoding='us-ascii' ?>
<!--
- 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
</path-prefix-list>
<type-list>
- <objref name="SMESH_Mesh" id="IDL:Mesh/SMESH_Mesh:1.0"/>
+ <objref name="SMESH_Mesh" id="IDL:SMESH/SMESH_Mesh:1.0"/>
<objref name="SMESH_Hypothesis" id="IDL:SMESH/SMESH_Hypothesis:1.0"/>
</type-list>
<!--
- 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
<parameter name="backface_color" value="0, 0, 255"/>
<parameter name="elem0d_color" value="0, 255, 0"/>
<parameter name="highlight_color" value="0, 255, 255"/>
- <parameter name="node_size" value="3" />
+ <parameter name="type_of_marker" value="1" />
+ <parameter name="marker_scale" value="9" />
<parameter name="elem0d_size" value="5" />
<parameter name="element_width" value="1" />
<parameter name="shrink_coeff" value="75"/>
<parameter name="quadratic_mode" value="0"/>
<parameter name="max_angle" value="2"/>
<parameter name="documentation" value="smesh_help"/>
+ <!-- Input field precisions -->
+ <parameter name="def_precision" value="3" />
+ <parameter name="length_precision" value="-6" />
+ <parameter name="angle_precision" value="-3" />
+ <parameter name="len_tol_precision" value="-7" />
+ <parameter name="parametric_precision" value="-6" />
+ <parameter name="area_precision" value="-6" />
+ <parameter name="vol_precision" value="-6" />
</section>
<section name="smesh_help" >
<parameter name="sub_menu" value="%1 module"/>
<?xml version='1.0' encoding='us-ascii'?>
<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
<!--
- 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
label-id="Hexahedron (i,j,k)"
icon-id="mesh_algo_hexa.png"
input="QUAD"
+ need-geom="false"
dim="3"/>
<algorithm type="Projection_1D"
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : Makefile.in
# Author : Patrick GOLDBRONN (CEA)
# Modified by : Alexander BORODIN (OCN) - autotools usage
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "SMESH_ControlsDef.hxx"
int main(int argc, char** argv)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "SMESH_ControlsDef.hxx"
#include <set>
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _SMESH_CONTROLS_HXX_
#define _SMESH_CONTROLS_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _SMESH_CONTROLSDEF_HXX_
#define _SMESH_CONTROLSDEF_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "Driver_Document.h"
Driver_Document::Driver_Document():
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVER_DOCUMENT
#define _INCLUDE_DRIVER_DOCUMENT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH Driver : implementaion of driver for reading and writing
// File : Mesh_Reader.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH Driver : implementaion of driver for reading and writing
// File : Mesh_Reader.h
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "Driver_SMDS_Mesh.h"
using namespace std;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVER_SMDS_MESH
#define _INCLUDE_DRIVER_SMDS_MESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "Driver_SMESHDS_Mesh.h"
using namespace std;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVER_SMESHDS_MESH
#define _INCLUDE_DRIVER_SMESHDS_MESH
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH Driver : implementaion of driver for reading and writing
# File : Makefile.in
# Author : Marc Tajchman (CEA)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "DriverDAT_R_SMDS_Mesh.h"
#include "DriverDAT_W_SMDS_Mesh.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include <stdio.h>
#include "DriverDAT_R_SMDS_Mesh.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVERDAT_R_SMDS_MESH
#define _INCLUDE_DRIVERDAT_R_SMDS_MESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "DriverDAT_R_SMESHDS_Document.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVERDAT_R_SMESHDS_DOCUMENT
#define _INCLUDE_DRIVERDAT_R_SMESHDS_DOCUMENT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "DriverDAT_R_SMESHDS_Mesh.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVERDAT_R_SMESHDS_MESH
#define _INCLUDE_DRIVERDAT_R_SMESHDS_MESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include <stdio.h>
#include "DriverDAT_W_SMDS_Mesh.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH DriverDAT : driver to read and write 'dat' files
// File : DriverDAT_W_SMDS_Mesh.h
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "DriverDAT_W_SMESHDS_Document.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVERDAT_W_SMESHDS_DOCUMENT
#define _INCLUDE_DRIVERDAT_W_SMESHDS_DOCUMENT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "DriverDAT_W_SMESHDS_Mesh.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH DriverDAT : driver to read and write 'dat' files
// File : DriverDAT_W_SMESHDS_Mesh.h
// Module : SMESH
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH DriverDAT : driver to read and write 'dat' files
# File : Makefile.in
# Author : Marc Tajchman (CEA)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_DriverDAT.hxx
// Author : Alexander A. BORODIN
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH DriverMED : tool to split groups on families
// File : DriverMED_Family.cxx
// Author : Julia DOROVSKIKH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH DriverMED : tool to split groups on families
// File : DriverMED_Family.hxx
// Author : Julia DOROVSKIKH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "DriverMED_R_SMDS_Mesh.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVERMED_R_SMDS_MESH
#define _INCLUDE_DRIVERMED_R_SMDS_MESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "DriverMED_R_SMESHDS_Document.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVERMED_R_SMESHDS_DOCUMENT
#define _INCLUDE_DRIVERMED_R_SMESHDS_DOCUMENT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH DriverMED : driver to read and write 'med' files
// File : DriverMED_R_SMESHDS_Mesh.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH DriverMED : driver to read and write 'med' files
// File : DriverMED_R_SMESHDS_Mesh.h
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "DriverMED_W_SMDS_Mesh.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVERMED_W_SMDS_MESH
#define _INCLUDE_DRIVERMED_W_SMDS_MESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH DriverMED : driver to read and write 'med' files
// File : DriverMED_W_SMESHDS_Document.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVERMED_W_SMESHDS_DOCUMENT
#define _INCLUDE_DRIVERMED_W_SMESHDS_DOCUMENT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH DriverMED : driver to read and write 'med' files
// File : DriverMED_W_SMESHDS_Mesh.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH DriverMED : driver to read and write 'med' files
// File : DriverMED_W_SMESHDS_Mesh.h
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "DriverMED_R_SMESHDS_Mesh.h"
#include "DriverMED_W_SMESHDS_Mesh.h"
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH DriverMED : driver to read and write 'med' files
# File : Makefile.in
# Author : Marc Tajchman (CEA)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_DriverMED.hxx
// Author : Alexander A. BORODIN
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include <stdio.h>
#include <gp_Pnt.hxx>
//=======================================================================
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVERSTL_R_SMDS_MESH
#define _INCLUDE_DRIVERSTL_R_SMDS_MESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include <stdio.h>
#include "DriverSTL_W_SMDS_Mesh.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH DriverSTL : driver to read and write 'stl' files
// File : DriverSTL_W_SMDS_Mesh.h
// Module : SMESH
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH DriverSTL : driver to read and write 'stl' files
# File : Makefile.in
# Author : Marc Tajchman (CEA)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_DriverSTL.hxx
// Author : Alexander A. BORODIN
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
//#include "DriverSTL_R_SMDS_Mesh.h"
//
#include "DriverSTL_W_SMDS_Mesh.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "DriverUNV_R_SMDS_Mesh.h"
#include "SMDS_Mesh.hxx"
#include "SMDS_MeshGroup.hxx"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVERUNV_R_SMDS_MESH
#define _INCLUDE_DRIVERUNV_R_SMDS_MESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "DriverUNV_R_SMESHDS_Document.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVERUNV_R_SMESHDS_DOCUMENT
#define _INCLUDE_DRIVERUNV_R_SMESHDS_DOCUMENT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "DriverUNV_R_SMESHDS_Mesh.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVERUNV_R_SMESHDS_MESH
#define _INCLUDE_DRIVERUNV_R_SMESHDS_MESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include <algorithm>
#include "DriverUNV_W_SMDS_Mesh.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVERUNV_W_SMDS_MESH
#define _INCLUDE_DRIVERUNV_W_SMDS_MESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "DriverUNV_W_SMESHDS_Document.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVERUNV_W_SMESHDS_DOCUMENT
#define _INCLUDE_DRIVERUNV_W_SMESHDS_DOCUMENT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "DriverUNV_W_SMESHDS_Mesh.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _INCLUDE_DRIVERUNV_W_SMESHDS_MESH
#define _INCLUDE_DRIVERUNV_W_SMESHDS_MESH
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH DriverUNV : driver to read and write 'unv' files
# File : Makefile.in
# Author : Marc Tajchman (CEA)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_DriverUNV.hxx
// Author : Alexander A. BORODIN
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include <fstream>
#include <stdio.h>
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef UNV2411_Structure_HeaderFile
#define UNV2411_Structure_HeaderFile
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include <fstream>
#include <iomanip>
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef UNV2412_Structure_HeaderFile
#define UNV2412_Structure_HeaderFile
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "UNV2417_Structure.hxx"
#include "UNV_Utilities.hxx"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef UNV2417_Structure_HeaderFile
#define UNV2417_Structure_HeaderFile
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "UNV2411_Structure.hxx"
#include "UNV2412_Structure.hxx"
#include "UNV_Utilities.hxx"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "UNV_Utilities.hxx"
using namespace std;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef MED_Utilities_HeaderFile
#define MED_Utilities_HeaderFile
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : Makefile.in
# Author :
# Modified by : Alexander BORODIN (OCN) - autotools usage
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : Makefile.in
# Author : Patrick GOLDBRONN (CEA)
# Modified by : Alexander BORODIN (OCN) - autotools usage
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH OBJECT : interactive object for SMESH visualization
# File : Makefile.in
# Modified by : Alexander BORODIN (OCN) - autotools usage
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH OBJECT : interactive object for SMESH visualization
// File : SMESH_Actor.cxx
// Author : Nicolas REJNERI
// Module : SMESH
-
-
+//
#include "SMESH_ActorDef.h"
#include "SMESH_ActorUtils.h"
#include "SMESH_DeviceActor.h"
#endif
static int aLineWidthInc = 2;
-static int aPointSizeInc = 2;
SMESH_ActorDef* SMESH_ActorDef::New(){
if ( mgr && mgr->booleanValue( "SMESH", "use_precision", false ) )
myControlsPrecision = mgr->integerValue( "SMESH", "controls_precision", -1);
- vtkFloatingPointType aPointSize = SMESH::GetFloat("SMESH:node_size",3);
vtkFloatingPointType aElem0DSize = SMESH::GetFloat("SMESH:elem0d_size",5);
vtkFloatingPointType aLineWidth = SMESH::GetFloat("SMESH:element_width",1);
my1DProp = vtkProperty::New();
my1DProp->DeepCopy(myEdgeProp);
my1DProp->SetLineWidth(aLineWidth + aLineWidthInc);
- my1DProp->SetPointSize(aPointSize);
+ my1DProp->SetPointSize(aElem0DSize);
my1DExtProp = vtkProperty::New();
my1DExtProp->DeepCopy(myEdgeProp);
anRGB[2] = 1 - anRGB[2];
my1DExtProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
my1DExtProp->SetLineWidth(aLineWidth + aLineWidthInc);
- my1DExtProp->SetPointSize(aPointSize + aPointSizeInc);
+ my1DExtProp->SetPointSize(aElem0DSize);
my1DExtActor = SMESH_DeviceActor::New();
my1DExtActor->SetUserMatrix(aMatrix);
myNodeProp = vtkProperty::New();
SMESH::GetColor( "SMESH", "node_color", anRGB[0], anRGB[1], anRGB[2], QColor( 255, 0, 0 ) );
myNodeProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
- myNodeProp->SetPointSize(aPointSize);
myNodeActor = SMESH_DeviceActor::New();
myNodeActor->SetUserMatrix(aMatrix);
anRGB[1] = 1 - anRGB[1];
anRGB[2] = 1 - anRGB[2];
myNodeExtProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
- myNodeExtProp->SetPointSize(aPointSize);
myNodeExtActor = SMESH_DeviceActor::New();
myNodeExtActor->SetUserMatrix(aMatrix);
myHighlightProp->SetSpecular(0.0);
SMESH::GetColor( "SMESH", "selection_object_color", anRGB[0], anRGB[1], anRGB[2], QColor( 255, 255, 255 ) );
myHighlightProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
- //myHighlightProp->SetPointSize(aPointSize);
- myHighlightProp->SetPointSize(std::max(aElem0DSize,aPointSize)); // ??
+ myHighlightProp->SetPointSize(aElem0DSize); // ??
myHighlightProp->SetRepresentation(1);
myPreselectProp = vtkProperty::New();
myPreselectProp->SetSpecular(0.0);
SMESH::GetColor( "SMESH", "highlight_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 255, 255 ) );
myPreselectProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
- //myPreselectProp->SetPointSize(aPointSize);
- myPreselectProp->SetPointSize(std::max(aElem0DSize,aPointSize)); // ??
+ myPreselectProp->SetPointSize(aElem0DSize); // ??
myPreselectProp->SetRepresentation(1);
myHighlitableActor = SMESH_DeviceActor::New();
void SMESH_ActorDef::AddToRender(vtkRenderer* theRenderer){
- SALOME_Actor::AddToRender(theRenderer);
-
theRenderer->AddActor(myNodeActor);
theRenderer->AddActor(myBaseActor);
theRenderer->AddActor2D(myPointLabels);
theRenderer->AddActor2D(myCellsLabels);
+
+ // the superclass' method should be called at the end
+ // (in particular, for correct work of selection)
+ SALOME_Actor::AddToRender(theRenderer);
}
void SMESH_ActorDef::RemoveFromRender(vtkRenderer* theRenderer){
if( dynamic_cast<SMESH_GroupObj*>( myVisualObj.get() ) )
SetIsDisplayNameActor( true );
+ int aMarkerType = mgr->integerValue( "SMESH", "type_of_marker", 1 ); // dot
+ int aMarkerScale = mgr->integerValue( "SMESH", "marker_scale", 9 ); // 5 pixels
+ SetMarkerStd( (VTK::MarkerType)aMarkerType, (VTK::MarkerScale)aMarkerScale );
+
myTimeStamp->Modified();
Modified();
return true;
my0DActor->VisibilityOn();
}
- if(myEntityMode & eEdges){
+ if(myEntityMode & eEdges && GetRepresentation() != ePoint){
my1DActor->VisibilityOn();
}
- if(myEntityMode & eFaces){
+ if(myEntityMode & eFaces && GetRepresentation() != ePoint){
my2DActor->VisibilityOn();
}
- if(myEntityMode & eVolumes){
+ if(myEntityMode & eVolumes && GetRepresentation() != ePoint){
my3DActor->VisibilityOn();
}
SetModeOfExtraction(VTKViewer_ExtractUnstructuredGrid::ePoints);
myHighlitableActor->SetVisibility(anIsVisible);
myHighlitableActor->SetRepresentation(SMESH_DeviceActor::ePoint);
+
+ VTK::MarkerType aMarkerType = GetMarkerType();
+ if(aMarkerType != VTK::MT_USER)
+ myHighlitableActor->SetMarkerStd(aMarkerType, GetMarkerScale());
+ else
+ myHighlitableActor->SetMarkerTexture(GetMarkerTexture(), myMarkerTexture);
}
}
}
void SMESH_ActorDef::Set0DColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){
my0DProp->SetColor(r,g,b);
+ if( SMESH_GroupObj* aGroupObj = dynamic_cast<SMESH_GroupObj*>( myVisualObj.get() ) )
+ if( aGroupObj->GetElementType() == SMDSAbs_0DElement )
+ myNameActor->SetBackgroundColor(r,g,b);
Modified();
}
}
-void SMESH_ActorDef::SetNodeSize(vtkFloatingPointType theVal){
- myNodeProp->SetPointSize(theVal);
- myNodeExtProp->SetPointSize(theVal);
-
- vtkFloatingPointType aPointSize = my0DProp->GetPointSize() > theVal ? my0DProp->GetPointSize() : theVal;
- //myHighlightProp->SetPointSize(theVal);
- myHighlightProp->SetPointSize(aPointSize); // ??
- //myPreselectProp->SetPointSize(theVal);
- myPreselectProp->SetPointSize(aPointSize); // ??
-
- my1DProp->SetPointSize(theVal + aPointSizeInc);
- my1DExtProp->SetPointSize(theVal + aPointSizeInc);
-
- Modified();
-}
-
-vtkFloatingPointType SMESH_ActorDef::GetNodeSize(){
- return myNodeProp->GetPointSize();
-}
-
void SMESH_ActorDef::Set0DSize(vtkFloatingPointType theVal){
my0DProp->SetPointSize(theVal);
-
- vtkFloatingPointType aPointSize = myNodeProp->GetPointSize() > theVal ? myNodeProp->GetPointSize() : theVal;
- //myHighlightProp->SetPointSize(theVal);
- myHighlightProp->SetPointSize(aPointSize); // ??
- //myPreselectProp->SetPointSize(theVal);
- myPreselectProp->SetPointSize(aPointSize); // ??
-
Modified();
}
else
return SMESH_Actor::eLines;
}
+
+void SMESH_ActorDef::SetMarkerStd( VTK::MarkerType theMarkerType, VTK::MarkerScale theMarkerScale )
+{
+ SALOME_Actor::SetMarkerStd( theMarkerType, theMarkerScale );
+ myNodeActor->SetMarkerStd( theMarkerType, theMarkerScale );
+ myNodeExtActor->SetMarkerStd( theMarkerType, theMarkerScale );
+}
+
+void SMESH_ActorDef::SetMarkerTexture( int theMarkerId, VTK::MarkerTexture theMarkerTexture )
+{
+ SALOME_Actor::SetMarkerTexture( theMarkerId, theMarkerTexture );
+ myNodeActor->SetMarkerTexture( theMarkerId, theMarkerTexture );
+ myNodeExtActor->SetMarkerTexture( theMarkerId, theMarkerTexture );
+ myMarkerTexture = theMarkerTexture; // for deferred update of myHighlightActor
+}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH OBJECT : interactive object for SMESH visualization
// File : SMESH_Actor.h
// Author : Nicolas REJNERI
// Module : SMESH
-
+//
#ifndef SMESH_ACTOR_H
#define SMESH_ACTOR_H
virtual vtkFloatingPointType GetLineWidth() = 0;
virtual void SetLineWidth(vtkFloatingPointType theVal) = 0;
- virtual void SetNodeSize(vtkFloatingPointType size) = 0;
- virtual vtkFloatingPointType GetNodeSize() = 0;
-
virtual void Set0DSize(vtkFloatingPointType size) = 0;
virtual vtkFloatingPointType Get0DSize() = 0;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH OBJECT : interactive object for SMESH visualization
// File : SMESH_ActorDef.h
// Author : Nicolas REJNERI
// Module : SMESH
//
-
#ifndef SMESH_ACTORDEF_H
#define SMESH_ACTORDEF_H
virtual vtkFloatingPointType GetLineWidth();
virtual void SetLineWidth(vtkFloatingPointType theVal);
- virtual void SetNodeSize(vtkFloatingPointType size) ;
- virtual vtkFloatingPointType GetNodeSize() ;
-
virtual void Set0DSize(vtkFloatingPointType size);
virtual vtkFloatingPointType Get0DSize();
virtual void SetQuadratic2DRepresentation(EQuadratic2DRepresentation);
virtual EQuadratic2DRepresentation GetQuadratic2DRepresentation();
+ virtual void SetMarkerStd( VTK::MarkerType, VTK::MarkerScale );
+ virtual void SetMarkerTexture( int, VTK::MarkerTexture );
+
protected:
void SetControlMode(eControl theMode, bool theCheckEntityMode);
void SetImplicitFunctionUsed(bool theIsImplicitFunctionUsed);
bool myIsFacesOriented;
+ VTK::MarkerTexture myMarkerTexture;
+
SMESH_ActorDef();
~SMESH_ActorDef();
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "SMESH_ActorUtils.h"
#include "SUIT_Tools.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef SMESH_ACTORUTILS_H
#define SMESH_ACTORUTILS_H
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH OBJECT : interactive object for SMESH visualization
// File : SMESH_DeviceActor.cxx
// Author :
// Module : SMESH
//
-
#include "SMESH_DeviceActor.h"
#include "SMESH_ExtractGeometry.h"
#include "SMESH_ControlsDef.hxx"
#include "SMESH_ActorUtils.h"
#include "SMESH_FaceOrientationFilter.h"
#include "VTKViewer_CellLocationsArray.h"
+#include "VTKViewer_PolyDataMapper.h"
#include <VTKViewer_Transform.h>
#include <VTKViewer_TransformFilter.h>
myRepresentation = eSurface;
myProperty = vtkProperty::New();
- myMapper = vtkPolyDataMapper::New();
+ myMapper = VTKViewer_PolyDataMapper::New();
vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor,
myPolygonOffsetUnits);
myGeomFilter->SetWireframeMode(false);
GetProperty()->SetRepresentation(theMode);
}
+ SetMarkerEnabled(theMode == ePoint);
myRepresentation = theMode;
UpdateFaceOrientation();
GetProperty()->Modified();
vtkFloatingPointType SMESH_DeviceActor::GetQuadraticArcAngle(){
return myGeomFilter->GetQuadraticArcAngle();
}
+
+/*!
+ * Set point marker enabled
+ * \param theMarkerEnabled flag to enable/disable point marker
+ */
+void SMESH_DeviceActor::SetMarkerEnabled( bool theMarkerEnabled )
+{
+ myMapper->SetMarkerEnabled( theMarkerEnabled );
+}
+
+/*!
+ * Set standard point marker
+ * \param theMarkerType type of the marker
+ */
+void SMESH_DeviceActor::SetMarkerStd( VTK::MarkerType theMarkerType, VTK::MarkerScale theMarkerScale )
+{
+ myMapper->SetMarkerStd( theMarkerType, theMarkerScale );
+}
+
+/*!
+ * Set custom point marker
+ * \param theMarkerId id of the marker texture
+ * \param theMarkerTexture marker texture
+ */
+void SMESH_DeviceActor::SetMarkerTexture( int theMarkerId, VTK::MarkerTexture theMarkerTexture )
+{
+ myMapper->SetMarkerTexture( theMarkerId, theMarkerTexture );
+}
+
+/*!
+ * Get type of the point marker
+ * \return type of the point marker
+ */
+VTK::MarkerType SMESH_DeviceActor::GetMarkerType()
+{
+ return myMapper->GetMarkerType();
+}
+
+/*!
+ Get scale of the point marker
+ \return scale of the point marker
+*/
+VTK::MarkerScale SMESH_DeviceActor::GetMarkerScale()
+{
+ return myMapper->GetMarkerScale();
+}
+
+/*!
+ * Get texture identifier of the point marker
+ * \return texture identifier of the point marker
+ */
+int SMESH_DeviceActor::GetMarkerTexture()
+{
+ return myMapper->GetMarkerTexture();
+}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH OBJECT : interactive object for SMESH visualization
// File : SMESH_DeviceActor.h
// Author : Nicolas REJNERI
#define SMESH_DEVICE_ACTOR_H
#include <VTKViewer_GeometryFilter.h>
+#include <VTKViewer_MarkerDef.h>
#include "SMESH_Controls.hxx"
#include "SMESH_Object.h"
class vtkProperty;
class vtkMergeFilter;
class vtkShrinkFilter;
-class vtkPolyDataMapper;
class vtkUnstructuredGrid;
class vtkScalarBarActor;
class vtkLookupTable;
class VTKViewer_Transform;
class VTKViewer_TransformFilter;
class VTKViewer_ExtractUnstructuredGrid;
+class VTKViewer_PolyDataMapper;
class SMESH_ExtractGeometry;
class SMESH_FaceOrientationFilter;
void SetImplicitFunctionUsed(bool theIsImplicitFunctionUsed);
bool IsImplicitFunctionUsed() const{ return myIsImplicitFunctionUsed;}
+ void SetMarkerEnabled( bool );
+ void SetMarkerStd( VTK::MarkerType, VTK::MarkerScale );
+ void SetMarkerTexture( int, VTK::MarkerTexture );
+ VTK::MarkerType GetMarkerType();
+ VTK::MarkerScale GetMarkerScale();
+ int GetMarkerTexture();
+
protected:
void Init(TVisualObjPtr theVisualObj, vtkImplicitBoolean* theImplicitBoolean);
void SetUnstructuredGrid(vtkUnstructuredGrid* theGrid);
- vtkPolyDataMapper *myMapper;
+ VTKViewer_PolyDataMapper *myMapper;
TVisualObjPtr myVisualObj;
vtkProperty *myProperty;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "SMESH_ExtractGeometry.h"
#include <vtkCell.h>
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef SALOME_ExtractGeometry_HeaderFile
#define SALOME_ExtractGeometry_HeaderFile
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "SMESH_FaceOrientationFilter.h"
#include "SMESH_ActorUtils.h"
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef SMESH_FACEORIENTATIONFILTER_H
#define SMESH_FACEORIENTATIONFILTER_H
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH OBJECT : interactive object for SMESH visualization
// File : SMESH_Grid.cxx
// Author : Nicolas REJNERI
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH OBJECT : interactive object for SMESH visualization
// File : SMESH_Object.h
// Author : Nicolas REJNERI
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH OBJECT : interactive object for SMESH visualization
// File : SMESH_Object.h
// Author : Nicolas REJNERI
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH OBJECT : interactive object for SMESH visualization
// File : SMESH_PreviewActorsCollection.cxx
// Author :
// Module : SMESH
//
-
#include "SMESH_PreviewActorsCollection.h"
#include "utilities.h"
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH OBJECT : interactive object for SMESH visualization
// File : SMESH_PreviewActorsCollection.h
// Author : OCN
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// ---
// File : GeomSelectionTools.cxx
// Authors : Nicolas GEIMER (OCC)
// ---
-//
-
#include "GeomSelectionTools.h"
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
-// This library is distributed in the hope that it will be useful,
+//
+// 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.
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// ---
// File : GeomSelectionTools.h
// Authors : Nicolas GEIMER (OCC)
// ---
+
#ifndef _GEOMSELECTIONTOOLS_H_
#define _GEOMSELECTIONTOOLS_H_
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# ---
# File : Makefile.am
# Author : Nicolas GEIMER (OCC)
# ---
-#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
# header files
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH SMDS : implementaion of Salome mesh data structure
# File : Makefile.in
# Author : Patrick GOLDBRONN (CEA)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDSAbs_ElementType.hxx
// Module : SMESH
-
+//
#ifndef _SMDSAbs_ElementType_HeaderFile
#define _SMDSAbs_ElementType_HeaderFile
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_EdgePosition.cxx
// Author : Jean-Michel BOULCOURT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_EdgePosition.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshElement.hxx
// Module : SMESH
// Created: 12.01.05 18:02:52
// Author: Michael Sazonov
-
+//
#ifndef SMDS_ElemIterator_HeaderFile
#define SMDS_ElemIterator_HeaderFile
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
//
#ifdef _MSC_VER
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
//
#ifndef _SMDS_FaceOfEdges_HeaderFile
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
//
#ifdef _MSC_VER
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
//
#ifndef _SMDS_FaceOfNodes_HeaderFile
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_FacePosition.cxx
// Author : Jean-Michel BOULCOURT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_FacePosition.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
//
#ifndef _SMDS_Iterator_HeaderFile
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
//
#ifdef _MSC_VER
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
//
#include "SMESH_SMDS.hxx"
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMDS_MemoryLimit.cxx
// Created : Fri Sep 21 17:16:42 2007
// Author : Edward AGAPOV (eap)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// SMESH SMDS : implementaion of Salome mesh data structure
+// SMESH SMDS : implementaion of Salome mesh data structure
+//
#ifdef _MSC_VER
#pragma warning(disable:4786)
#endif
/// Add a polygon defined by its nodes IDs
///////////////////////////////////////////////////////////////////////////////
-SMDS_MeshFace* SMDS_Mesh::AddPolygonalFaceWithID (std::vector<int> nodes_ids,
+SMDS_MeshFace* SMDS_Mesh::AddPolygonalFaceWithID (vector<int> nodes_ids,
const int ID)
{
int nbNodes = nodes_ids.size();
- std::vector<const SMDS_MeshNode*> nodes (nbNodes);
+ vector<const SMDS_MeshNode*> nodes (nbNodes);
for (int i = 0; i < nbNodes; i++) {
nodes[i] = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(nodes_ids[i]);
if (!nodes[i]) return NULL;
///////////////////////////////////////////////////////////////////////////////
SMDS_MeshFace* SMDS_Mesh::AddPolygonalFaceWithID
- (std::vector<const SMDS_MeshNode*> nodes,
+ (vector<const SMDS_MeshNode*> nodes,
const int ID)
{
SMDS_MeshFace * face;
/// An ID is automatically affected to the created face.
///////////////////////////////////////////////////////////////////////////////
-SMDS_MeshFace* SMDS_Mesh::AddPolygonalFace (std::vector<const SMDS_MeshNode*> nodes)
+SMDS_MeshFace* SMDS_Mesh::AddPolygonalFace (vector<const SMDS_MeshNode*> nodes)
{
return SMDS_Mesh::AddPolygonalFaceWithID(nodes, myElementIDFactory->GetFreeID());
}
///////////////////////////////////////////////////////////////////////////////
SMDS_MeshVolume * SMDS_Mesh::AddPolyhedralVolumeWithID
- (std::vector<int> nodes_ids,
- std::vector<int> quantities,
+ (vector<int> nodes_ids,
+ vector<int> quantities,
const int ID)
{
int nbNodes = nodes_ids.size();
- std::vector<const SMDS_MeshNode*> nodes (nbNodes);
+ vector<const SMDS_MeshNode*> nodes (nbNodes);
for (int i = 0; i < nbNodes; i++) {
nodes[i] = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(nodes_ids[i]);
if (!nodes[i]) return NULL;
///////////////////////////////////////////////////////////////////////////////
SMDS_MeshVolume* SMDS_Mesh::AddPolyhedralVolumeWithID
- (std::vector<const SMDS_MeshNode*> nodes,
- std::vector<int> quantities,
+ (vector<const SMDS_MeshNode*> nodes,
+ vector<int> quantities,
const int ID)
{
SMDS_MeshVolume* volume;
///////////////////////////////////////////////////////////////////////////////
SMDS_MeshVolume* SMDS_Mesh::AddPolyhedralVolume
- (std::vector<const SMDS_MeshNode*> nodes,
- std::vector<int> quantities)
+ (vector<const SMDS_MeshNode*> nodes,
+ vector<int> quantities)
{
int ID = myElementIDFactory->GetFreeID();
SMDS_MeshVolume * v = SMDS_Mesh::AddPolyhedralVolumeWithID(nodes, quantities, ID);
//purpose : find polygon
//=======================================================================
-const SMDS_MeshFace* SMDS_Mesh::FindFace (std::vector<int> nodes_ids) const
+const SMDS_MeshFace* SMDS_Mesh::FindFace (const vector<int>& nodes_ids) const
{
int nbnodes = nodes_ids.size();
- std::vector<const SMDS_MeshNode *> poly_nodes (nbnodes);
+ vector<const SMDS_MeshNode *> poly_nodes (nbnodes);
for (int inode = 0; inode < nbnodes; inode++) {
const SMDS_MeshNode * node = FindNode(nodes_ids[inode]);
if (node == NULL) return NULL;
return FindFace(poly_nodes);
}
-const SMDS_MeshFace* SMDS_Mesh::FindFace (std::vector<const SMDS_MeshNode *> nodes)
+const SMDS_MeshFace* SMDS_Mesh::FindFace (const vector<const SMDS_MeshNode *>& nodes)
+{
+ return (const SMDS_MeshFace*) FindElement( nodes, SMDSAbs_Face );
+}
+
+
+//================================================================================
+/*!
+ * \brief Return element based on all given nodes
+ * \param nodes - node of element
+ * \param type - type of element
+ * \param noMedium - true if medium nodes of quadratic element are not included in <nodes>
+ * \retval const SMDS_MeshElement* - found element or NULL
+ */
+//================================================================================
+
+const SMDS_MeshElement* SMDS_Mesh::FindElement (const vector<const SMDS_MeshNode *>& nodes,
+ const SMDSAbs_ElementType type,
+ const bool noMedium)
{
- if ( nodes.size() > 2 && nodes[0] ) {
- SMDS_ElemIteratorPtr itF = nodes[0]->GetInverseElementIterator(SMDSAbs_Face);
- while (itF->more()) {
- const SMDS_MeshElement* f = itF->next();
- if ( f->NbNodes() == nodes.size() ) {
- SMDS_ElemIteratorPtr it2 = f->nodesIterator();
- while(it2->more()) {
- if ( find( nodes.begin(), nodes.end(), it2->next() ) == nodes.end() ) {
- f = 0;
- break;
- }
+ if ( nodes.size() > 0 && nodes[0] )
+ {
+ SMDS_ElemIteratorPtr itF = nodes[0]->GetInverseElementIterator(type);
+ while (itF->more())
+ {
+ const SMDS_MeshElement* e = itF->next();
+ int nbNodesToCheck = noMedium ? e->NbCornerNodes() : e->NbNodes();
+ if ( nbNodesToCheck == nodes.size() )
+ {
+ for ( int i = 1; e && i < nodes.size(); ++ i )
+ {
+ int nodeIndex = e->GetNodeIndex( nodes[ i ]);
+ if ( nodeIndex < 0 || nodeIndex >= nbNodesToCheck )
+ e = 0;
}
- if ( f )
- return static_cast<const SMDS_MeshFace *> (f);
+ if ( e )
+ return static_cast<const SMDS_MeshFace *> (e);
}
}
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_Mesh.hxx
// Module : SMESH
-
+//
#ifndef _SMDS_Mesh_HeaderFile
#define _SMDS_Mesh_HeaderFile
const SMDS_MeshNode *n7,
const SMDS_MeshNode *n8);
- const SMDS_MeshFace *FindFace(std::vector<int> nodes_ids) const;
- static const SMDS_MeshFace* FindFace(std::vector<const SMDS_MeshNode *> nodes);
+ const SMDS_MeshFace *FindFace(const std::vector<int>& nodes_ids) const;
+ static const SMDS_MeshFace* FindFace(const std::vector<const SMDS_MeshNode *>& nodes);
+ static const SMDS_MeshElement* FindElement(const std::vector<const SMDS_MeshNode *>& nodes,
+ const SMDSAbs_ElementType type=SMDSAbs_All,
+ const bool noMedium=true);
/*!
* \brief Raise an exception if free memory (ram+swap) too low
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_Mesh0DElement.cxx
// Author : Jean-Michel BOULCOURT
// Module : SMESH
-
+//
#ifdef _MSC_VER
#pragma warning(disable:4786)
#endif
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_Mesh0DElement.hxx
// Module : SMESH
-
+//
#ifndef _SMDS_Mesh0DElement_HeaderFile
#define _SMDS_Mesh0DElement_HeaderFile
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshEdge.cxx
// Author : Jean-Michel BOULCOURT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshEdge.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
//
#ifdef _MSC_VER
return false;
}
+//================================================================================
+/*!
+ * \brief Return number of nodes excluding medium ones
+ */
+//================================================================================
+
+int SMDS_MeshElement::NbCornerNodes() const
+{
+ return IsQuadratic() ? NbNodes() - NbEdges() : NbNodes();
+}
+
//================================================================================
/*!
* \brief Check if a node belongs to the element
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshElement.hxx
// Module : SMESH
virtual SMDSAbs_EntityType GetEntityType() const = 0;
virtual bool IsMediumNode(const SMDS_MeshNode* node) const;
+ virtual int NbCornerNodes() const;
friend SMDS_EXPORT std::ostream & operator <<(std::ostream & OS, const SMDS_MeshElement *);
friend SMDS_EXPORT bool SMDS_MeshElementIDFactory::BindID(int ID,SMDS_MeshElement*elem);
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshElementIDFactory.cxx
// Author : Jean-Michel BOULCOURT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshElementIDFactory.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
//
#include "SMDS_MeshFace.hxx"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshFace.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshGroup.cxx
// Author : Jean-Michel BOULCOURT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshGroup.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshIDFactory.cxx
// Author : Jean-Michel BOULCOURT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshIDFactory.hxx
// Module : SMESH
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMDS_MeshInfo.hxx
// Created : Mon Sep 24 18:32:41 2007
// Author : Edward AGAPOV (eap)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
//
#ifdef _MSC_VER
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshNode.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshObject.cxx
// Author : Jean-Michel BOULCOURT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshObject.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshVolume.cxx
// Author : Jean-Michel BOULCOURT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshVolume.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
//
#ifdef _MSC_VER
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
//
#ifndef _SMDS_PolygonalFaceOfNodes_HeaderFile
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
//
#ifdef _MSC_VER
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_PolyhedralVolumeOfNodes.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_Position.cxx
// Author : Jean-Michel BOULCOURT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_Position.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File: SMDS_QuadraticEdge.cxx
// Created: 16.01.06 16:25:42
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_QuadraticEdge.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File: SMDS_QuadraticFaceOfNodes.cxx
// Created: 16.01.06 17:12:58
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_QuadraticVolumeOfNodes.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File: SMDS_QuadraticVolumeOfNodes.cxx
// Created: 17.01.06 09:46:11
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_QuadraticVolumeOfNodes.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_SetIterator.hxx
// Created : Mon Feb 27 16:57:43 2006
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_SpacePosition.cxx
// Author : Jean-Michel BOULCOURT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_SpacePosition.hxx
// Module : SMESH
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
-//
// File : SMDS_StdIterator.hxx
// Created : Fri Feb 5 11:03:46 2010
// Author : Edward AGAPOV (eap)
-
-
+//
#ifndef __SMDS_StdIterator_HXX__
#define __SMDS_StdIterator_HXX__
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_TypeOfPosition.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_VertexPosition.cxx
// Author : Jean-Michel BOULCOURT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_VertexPosition.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_VolumeOfFaces.cxx
// Author : Jean-Michel BOULCOURT
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_VolumeOfFaces.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
//
#ifdef _MSC_VER
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_MeshVolume.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMDS_VolumeTool.cxx
// Created : Tue Jul 13 12:22:13 2004
// Author : Edward AGAPOV (eap)
SMDS_VolumeTool::~SMDS_VolumeTool()
{
- if (myVolumeNodes != NULL) {
- delete [] myVolumeNodes;
- myVolumeNodes = NULL;
- }
- if (myFaceNodes != NULL) {
- delete [] myFaceNodes;
- myFaceNodes = NULL;
- }
+ if ( myVolumeNodes != NULL ) delete [] myVolumeNodes;
+ if ( myFaceNodes != NULL ) delete [] myFaceNodes;
+
+ myFaceNodeIndices = NULL;
+ myVolumeNodes = myFaceNodes = NULL;
}
//=======================================================================
const int* SMDS_VolumeTool::GetFaceNodesIndices( int faceIndex )
{
- if (myVolume->IsPoly()) {
- MESSAGE("Warning: attempt to obtain FaceNodesIndices of polyhedral volume");
- return NULL;
- }
if ( !setFace( faceIndex ))
return 0;
+
+ if (myVolume->IsPoly())
+ {
+ myPolyIndices.resize( myFaceNbNodes + 1 );
+ myFaceNodeIndices = & myPolyIndices[0];
+ for ( int i = 0; i <= myFaceNbNodes; ++i )
+ myFaceNodeIndices[i] = myVolume->GetNodeIndex( myFaceNodes[i] );
+ }
return myFaceNodeIndices;
}
//purpose : return element
//=======================================================================
-const SMDS_MeshVolume* SMDS_VolumeTool::Get() const
+const SMDS_MeshVolume* SMDS_VolumeTool::Element() const
{
return static_cast<const SMDS_MeshVolume*>( myVolume );
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMDS_VolumeTool.hxx
// Module : SMESH
// Set volume.
// Return false if theVolume is not of type SMDSAbs_Volume
- const SMDS_MeshVolume* Get() const;
+ const SMDS_MeshVolume* Element() const;
// return element
int ID() const;
int myNbFaces;
int myVolumeNbNodes;
const SMDS_MeshNode** myVolumeNodes;
+ std::vector< int > myPolyIndices;
bool myExternalFaces;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_SMDS.hxx
// Author : Alexander A. BORODIN
// Module : SMESH
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH SMESH : implementaion of SMESH idl descriptions
# File : Makefile.in
# Author : Paul RASCLE, EDF
SMESH_OctreeNode.hxx \
SMESH_Comment.hxx \
SMESH_ComputeError.hxx \
+ SMESH_File.hxx \
SMESH_SMESH.hxx
# Libraries targets
SMESH_HypoFilter.cxx \
SMESH_MesherHelper.cxx \
SMESH_Octree.cxx \
- SMESH_OctreeNode.cxx
+ SMESH_OctreeNode.cxx \
+ SMESH_File.cxx
# additionnal information to compile and link file
libSMESHimpl_la_CPPFLAGS = \
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_0D_Algo.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_0D_Algo.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_1D_Algo.cxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_1D_Algo.hxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_2D_Algo.cxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_2D_Algo.hxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_3D_Algo.cxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_3D_Algo.hxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_Algo.cxx
// Author : Paul RASCLE, EDF
// Module : SMESH
//
-
#include "SMESH_Algo.hxx"
#include "SMESH_Comment.hxx"
#include "SMESH_Gen.hxx"
#include "utilities.h"
#include <algorithm>
+#include <limits>
using namespace std;
return length;
}
+//================================================================================
+/*!
+ * \brief Calculate normal of a mesh face
+ */
+//================================================================================
+
+bool SMESH_Algo::FaceNormal(const SMDS_MeshElement* F, gp_XYZ& normal, bool normalized)
+{
+ if ( !F || F->GetType() != SMDSAbs_Face )
+ return false;
+
+ normal.SetCoord(0,0,0);
+ int nbNodes = F->IsQuadratic() ? F->NbNodes()/2 : F->NbNodes();
+ for ( int i = 0; i < nbNodes-2; ++i )
+ {
+ gp_XYZ p[3];
+ for ( int n = 0; n < 3; ++n )
+ {
+ const SMDS_MeshNode* node = F->GetNode( i + n );
+ p[n].SetCoord( node->X(), node->Y(), node->Z() );
+ }
+ normal += ( p[2] - p[1] ) ^ ( p[0] - p[1] );
+ }
+ double size2 = normal.SquareModulus();
+ bool ok = ( size2 > numeric_limits<double>::min() * numeric_limits<double>::min());
+ if ( normalized && ok )
+ normal /= sqrt( size2 );
+
+ return ok;
+}
+
//================================================================================
/*!
* \brief Find out elements orientation on a geometrical face
*/
//================================================================================
-GeomAbs_Shape SMESH_Algo::Continuity(const TopoDS_Edge & E1,
- const TopoDS_Edge & E2)
+GeomAbs_Shape SMESH_Algo::Continuity(TopoDS_Edge E1,
+ TopoDS_Edge E2)
{
+ E1.Orientation(TopAbs_FORWARD), E2.Orientation(TopAbs_FORWARD); // avoid pb with internal edges
TopoDS_Vertex V = TopExp::LastVertex (E1, true);
if ( !V.IsSame( TopExp::FirstVertex(E2, true )))
if ( !TopExp::CommonVertex( E1, E2, V ))
return 0;
}
+//=======================================================================
+//function : GetCommonNodes
+//purpose : Return nodes common to two elements
+//=======================================================================
+
+vector< const SMDS_MeshNode*> SMESH_Algo::GetCommonNodes(const SMDS_MeshElement* e1,
+ const SMDS_MeshElement* e2)
+{
+ vector< const SMDS_MeshNode*> common;
+ for ( int i = 0 ; i < e1->NbNodes(); ++i )
+ if ( e2->GetNodeIndex( e1->GetNode( i )) >= 0 )
+ common.push_back( e1->GetNode( i ));
+ return common;
+}
+
//================================================================================
/*!
* \brief Sets event listener to submeshes if necessary
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_Algo.hxx
// Author : Paul RASCLE, EDF
// Module : SMESH
//
-
#ifndef _SMESH_ALGO_HXX_
#define _SMESH_ALGO_HXX_
class SMDS_MeshNode;
class SMESH_subMesh;
class SMESH_MesherHelper;
+class gp_XYZ;
-typedef std::map< SMESH_subMesh*, std::vector<int> > MapShapeNbElems;
-// vector must have size corresponding to EntityType_Last from SMDSAbs:
+typedef std::map< SMESH_subMesh*, std::vector<int> > MapShapeNbElems;
typedef std::map< SMESH_subMesh*, std::vector<int> >::iterator MapShapeNbElemsItr;
+/*!
+ * \brief Root of all algorithms
+ *
+ * Methods of the class are grouped into several parts:
+ * - main lifecycle methods, like Compute()
+ * - methods describing features of the algorithm, like NeedShape()
+ * - methods related to dependencies between sub-meshes imposed by the algorith
+ * - static utilities, like EdgeLength()
+ */
class SMESH_EXPORT SMESH_Algo:public SMESH_Hypothesis
{
public:
*/
static double EdgeLength(const TopoDS_Edge & E);
+ /*!
+ * \brief Calculate normal of a mesh face
+ */
+ static bool FaceNormal(const SMDS_MeshElement* F, gp_XYZ& normal, bool normalized=true);
+
/*!
* \brief Return continuity of two edges
* \param E1 - the 1st edge
* \param E2 - the 2nd edge
* \retval GeomAbs_Shape - regularity at the junction between E1 and E2
*/
- static GeomAbs_Shape Continuity(const TopoDS_Edge & E1, const TopoDS_Edge & E2);
+ static GeomAbs_Shape Continuity(TopoDS_Edge E1, TopoDS_Edge E2);
/*!
* \brief Return true if an edge can be considered as a continuation of another
* \param meshDS - mesh
* \retval const SMDS_MeshNode* - found node or NULL
*/
- static const SMDS_MeshNode* VertexNode(const TopoDS_Vertex& V,
- const SMESHDS_Mesh* meshDS);
+ static const SMDS_MeshNode* VertexNode(const TopoDS_Vertex& V, const SMESHDS_Mesh* meshDS);
+ /*!
+ * \brief Return nodes common to two elements
+ */
+ static std::vector< const SMDS_MeshNode*> GetCommonNodes(const SMDS_MeshElement* e1,
+ const SMDS_MeshElement* e2);
protected:
/*!
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_Pattern.hxx
// Created : Mon Aug 2 10:30:00 2004
// Author : Edward AGAPOV (eap)
TopoDS_Wire anOuterWire =
theShapeAnalysisAlgo ? ShapeAnalysis::OuterWire( theFace ) : BRepTools::OuterWire( theFace );
for ( TopoDS_Iterator wIt (theFace); wIt.More(); wIt.Next() )
- if ( !anOuterWire.IsSame( wIt.Value() ))
- aWireList.push_back( TopoDS::Wire( wIt.Value() ));
- else
- aWireList.push_front( TopoDS::Wire( wIt.Value() ));
+ if ( wIt.Value().ShapeType() == TopAbs_WIRE ) // it can be internal vertex!
+ {
+ if ( !anOuterWire.IsSame( wIt.Value() ))
+ aWireList.push_back( TopoDS::Wire( wIt.Value() ));
+ else
+ aWireList.push_front( TopoDS::Wire( wIt.Value() ));
+ }
// loop on edges of wires
theNbVertexInWires.clear();
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_Block.hxx
// Created : Tue Nov 30 12:42:18 2004
// Author : Edward AGAPOV (eap)
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_Comment.hxx
// Created : Wed Mar 14 18:28:45 2007
this->string::operator=( _s.str() );
}
+ SMESH_Comment & operator=(const SMESH_Comment& c) {
+ _s << c.c_str() ;
+ this->string::operator=( _s.str() );
+ return *this;
+ }
+
template <class T>
SMESH_Comment( const T &anything ) {
_s << anything ;
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_Hypothesis.hxx
// Author : Edward AGAPOV (eap)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: SMESH_DataMapOfElemPtrSequenceOfElemPtr.hxx
// Created: 26.09.05 17:41:10
// Author: Sergey KUUL
--- /dev/null
+// 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
+//
+
+// File : SMESH_File.cxx
+// Created : Wed Mar 10 11:23:25 2010
+// Author : Edward AGAPOV (eap)
+//
+#include "SMESH_File.hxx"
+#include "utilities.h"
+
+#include <OSD_File.hxx>
+#include <OSD_Path.hxx>
+#include <Standard_ProgramError.hxx>
+#include <Standard_ErrorHandler.hxx>
+#include <Standard_Failure.hxx>
+
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#ifdef WIN32
+#include <io.h>
+#else
+#include <sys/mman.h>
+#endif
+
+//================================================================================
+/*!
+ * \brief Creator opening the file for reading by default
+ */
+//================================================================================
+
+SMESH_File::SMESH_File(const std::string& name, bool open)
+ :_name(name), _size(-1), _file(0), _map(0), _pos(0), _end(0)
+{
+ if ( open ) this->open();
+}
+
+//================================================================================
+/*!
+ * \brief Destructor closing the file
+ */
+//================================================================================
+
+SMESH_File::~SMESH_File()
+{
+ close();
+}
+
+//================================================================================
+/*!
+ * \brief Open file for reading. Return true if there is something to read
+ */
+//================================================================================
+
+bool SMESH_File::open()
+{
+ int length = size();
+ if ( !_map && length > 0 )
+ {
+#ifdef WNT
+ _file = CreateFile(_name.data(), GENERIC_READ, FILE_SHARE_READ,
+ NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ bool ok = ( _file != INVALID_HANDLE_VALUE );
+#else
+ _file = ::open(_name.data(), O_RDONLY );
+ bool ok = ( _file > 0 );
+#endif
+ if ( ok )
+ {
+#ifdef WNT
+ _mapObj = CreateFileMapping(_file, NULL, PAGE_READONLY, 0, (DWORD)length, NULL);
+ _map = (void*) MapViewOfFile( _mapObj, FILE_MAP_READ, 0, 0, 0 );
+#else
+ _map = ::mmap(0,length,PROT_READ,MAP_PRIVATE,_file,0);
+ if ( _map == MAP_FAILED ) _map = NULL;
+#endif
+ if ( _map != NULL )
+ {
+ _size = length;
+ _pos = (char*) _map;
+ _end = _pos + _size;
+ }
+ else
+ {
+#ifdef WNT
+ CloseHandle(_mapObj);
+ CloseHandle(_file);
+#else
+ ::close(_file);
+#endif
+ }
+ }
+ }
+ return _pos;
+}
+
+//================================================================================
+/*!
+ * \brief Close the file
+ */
+//================================================================================
+
+void SMESH_File::close()
+{
+ if ( _map != NULL )
+ {
+#ifdef WNT
+ UnmapViewOfFile(_map);
+ CloseHandle(_mapObj);
+ CloseHandle(_file);
+#else
+ ::munmap(_map, _size);
+ ::close(_file);
+#endif
+ _map = NULL;
+ _pos = _end = 0;
+ _size = -1;
+ }
+}
+
+//================================================================================
+/*!
+ * \brief Remove the file
+ */
+//================================================================================
+
+bool SMESH_File::remove()
+{
+ close();
+ try {
+ OSD_Path filePath(TCollection_AsciiString((char*)_name.data()));
+ OSD_File(filePath).Remove();
+ }
+ catch ( Standard_ProgramError ) {
+ MESSAGE("Can't remove file: " << _name << " ; file does not exist or permission denied");
+ return false;
+ }
+ return true;
+}
+
+//================================================================================
+/*!
+ * \brief Return file size
+ */
+//================================================================================
+
+int SMESH_File::size() const
+{
+ if ( _size >= 0 ) return _size; // size of open file
+
+ int size = -1;
+ int file = ::open( _name.data(), O_RDONLY );
+ if ( file > 0 )
+ {
+ struct stat status;
+ int err = fstat( file, &status);
+ if ( !err )
+ size = status.st_size;
+ ::close( file );
+ }
+ return size;
+}
+
+//================================================================================
+/*!
+ * \brief Set cursor to the given position
+ */
+//================================================================================
+
+void SMESH_File::setPos(const char* pos)
+{
+ if ( pos > (const char*)_map && pos < _end )
+ _pos = (char*) pos;
+}
+
+//================================================================================
+/*!
+ * \brief Skip till current line end and return the skipped string
+ */
+//================================================================================
+
+std::string SMESH_File::getLine()
+{
+ std::string line;
+ const char* p = _pos;
+ while ( !eof() )
+ if ( *(++_pos) == '\n' )
+ break;
+ line.append( p, _pos );
+ if ( !eof() ) _pos++;
+ return line;
+}
+
+//================================================================================
+/*!
+ * \brief Move cursor to the file beginning
+ */
+//================================================================================
+
+void SMESH_File::rewind()
+{
+ _pos = (char*) _map;
+}
+
+//================================================================================
+/*!
+ * \brief Fill vector by reading out integers from file. Vector size gives number
+ * of integers to read
+ */
+//================================================================================
+
+bool SMESH_File::getInts(std::vector<int>& ints)
+{
+ int i = 0;
+ while ( i < ints.size() )
+ {
+ while ( !isdigit( *_pos ) && !eof()) ++_pos;
+ if ( eof() ) break;
+ if ( _pos[-1] == '-' ) --_pos;
+ ints[ i++ ] = strtol( _pos, (char**)&_pos, 10 );
+ }
+ return ( i == ints.size() );
+}
--- /dev/null
+// 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
+//
+
+// File : SMESH_File.hxx
+// Created : Wed Mar 10 10:33:04 2010
+// Author : Edward AGAPOV (eap)
+//
+#ifndef __SMESH_File_HXX__
+#define __SMESH_File_HXX__
+
+#include "SMESH_SMESH.hxx"
+
+#include <string>
+#include <vector>
+
+#ifdef WNT
+#include <windows.h>
+#else
+#include <dlfcn.h>
+#endif
+
+/*!
+ * \brief High level util for effective file reading and other file operations
+ */
+class SMESH_EXPORT SMESH_File
+{
+public:
+
+ SMESH_File(const std::string& name, bool open=true);
+
+ ~SMESH_File();
+
+ std::string getName() const { return _name; }
+
+ bool open();
+
+ void close();
+
+ bool remove();
+
+ int size() const;
+
+ // ------------------------
+ // Access to file contents
+ // ------------------------
+
+ operator const char*() const { return _pos; }
+
+ bool operator++() { return ++_pos < _end; }
+
+ void operator +=(int posDelta) { _pos+=posDelta; }
+
+ bool eof() const { return _pos >= _end; }
+
+ const char* getPos() const { return _pos; }
+
+ void setPos(const char* pos);
+
+ std::string getLine();
+
+ void rewind();
+
+ bool getInts(std::vector<int>& ids);
+
+private:
+
+ std::string _name; //!< file name
+ int _size; //!< file size
+#ifdef WNT
+ HANDLE _file, _mapObj;
+#else
+ int _file;
+#endif
+ void* _map;
+ const char* _pos; //!< current position
+ const char* _end; //!< position after file end
+};
+
+#endif
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_Gen.cxx
// Author : Paul RASCLE, EDF
// Module : SMESH
-
+//
#include "SMESH_Gen.hxx"
#include "SMESH_subMesh.hxx"
#include "SMESH_HypoFilter.hxx"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_Gen.hxx
// Author : Paul RASCLE, EDF
// Module : SMESH
//
-
#ifndef _SMESH_GEN_HXX_
#define _SMESH_GEN_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_Group.cxx
// Author : Michael Sazonov (OCC)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_Group.hxx
// Author : Michael Sazonov (OCC)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_HypoFilter.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_HypoFilter.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_Hypothesis.cxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_Hypothesis.hxx
// Author : Paul RASCLE, EDF
// Module : SMESH
//
-
#ifndef _SMESH_HYPOTHESIS_HXX_
#define _SMESH_HYPOTHESIS_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: SMESH_IndexedDataMapOfShapeIndexedMapOfShape.hxx
// Created: 20.09.05 09:51:12
// Author: Sergey KUUL
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_Mesh.cxx
// Author : Paul RASCLE, EDF
_myMeshDS = theDocument->GetMesh(_idDoc);
_isShapeToMesh = false;
_isAutoColor = false;
+ _isModified = false;
_shapeDiagonal = 0.0;
_myMeshDS->ShapeToMesh( PseudoShape() );
}
_shapeDiagonal = 0.0;
_myMeshDS->ShapeToMesh( PseudoShape() );
}
+ _isModified = false;
}
//=======================================================================
sm->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
}
}
-
-// // clear sub-meshes; get ready to re-compute as a side-effect
-
-// if ( SMESH_subMesh *sm = GetSubMeshContaining( GetShapeToMesh() ) )
-// {
-// SMESH_subMeshIteratorPtr smIt = sm->getDependsOnIterator(/*includeSelf=*/true,
-// /*complexShapeFirst=*/false);
-// while ( smIt->more() )
-// {
-// sm = smIt->next();
-// TopAbs_ShapeEnum shapeType = sm->GetSubShape().ShapeType();
-// if ( shapeType == TopAbs_VERTEX || shapeType < TopAbs_SOLID )
-// // all other shapes depends on vertices so they are already cleaned
-// sm->ComputeStateEngine( SMESH_subMesh::CLEAN );
-// // to recompute even if failed
-// sm->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
-// }
-// }
-
-// // clear entities not on sub-meshes
-
-// SMDS_VolumeIteratorPtr vIt = _myMeshDS->volumesIterator();
-// while ( vIt->more() )
-// _myMeshDS->RemoveFreeElement( vIt->next(), 0 );
-
-// SMDS_FaceIteratorPtr fIt = _myMeshDS->facesIterator();
-// while ( fIt->more() )
-// _myMeshDS->RemoveFreeElement( fIt->next(), 0 );
-
-// SMDS_EdgeIteratorPtr eIt = _myMeshDS->edgesIterator();
-// while ( eIt->more() )
-// _myMeshDS->RemoveFreeElement( eIt->next(), 0 );
-
-// SMDS_NodeIteratorPtr nIt = _myMeshDS->nodesIterator();
-// while ( nIt->more() ) {
-// const SMDS_MeshNode * node = nIt->next();
-// if ( node->NbInverseElements() == 0 )
-// _myMeshDS->RemoveFreeNode( node, 0 );
-// else
-// _myMeshDS->RemoveNode(node);
-// }
+ _isModified = false;
}
//=======================================================================
}
}
}
+ HasModificationsToDiscard(); // to reset _isModified flag if mesh become empty
if(MYDEBUG) subMesh->DumpAlgoState(true);
if(MYDEBUG) SCRUTE(ret);
}
}
}
-
+
+ HasModificationsToDiscard(); // to reset _isModified flag if mesh become empty
+
if(MYDEBUG) subMesh->DumpAlgoState(true);
if(MYDEBUG) SCRUTE(ret);
return ret;
}
}
}
+ HasModificationsToDiscard(); // to reset _isModified flag if mesh become empty
}
//=============================================================================
return _isAutoColor;
}
+//=======================================================================
+//function : SetIsModified
+//purpose : Set the flag meaning that the mesh has been edited "manually"
+//=======================================================================
+
+void SMESH_Mesh::SetIsModified(bool isModified)
+{
+ _isModified = isModified;
+
+ if ( _isModified )
+ // check if mesh becomes empty as result of modification
+ HasModificationsToDiscard();
+}
+
+//=======================================================================
+//function : HasModificationsToDiscard
+//purpose : Return true if the mesh has been edited since a total re-compute
+// and those modifications may prevent successful partial re-compute.
+// As a side effect reset _isModified flag if mesh is empty
+//issue : 0020693
+//=======================================================================
+
+bool SMESH_Mesh::HasModificationsToDiscard() const
+{
+ if ( ! _isModified )
+ return false;
+
+ // return true if there the next Compute() will be partial and
+ // existing but changed elements may prevent successful re-compute
+ bool hasComputed = false, hasNotComputed = false;
+ map <int, SMESH_subMesh*>::const_iterator i_sm = _mapSubMesh.begin();
+ for ( ; i_sm != _mapSubMesh.end() ; ++i_sm )
+ switch ( i_sm->second->GetSubShape().ShapeType() )
+ {
+ case TopAbs_EDGE:
+ case TopAbs_FACE:
+ case TopAbs_SOLID:
+ if ( i_sm->second->IsMeshComputed() )
+ hasComputed = true;
+ else
+ hasNotComputed = true;
+ if ( hasComputed && hasNotComputed)
+ return true;
+ }
+
+ if ( !hasComputed )
+ const_cast<SMESH_Mesh*>(this)->_isModified = false;
+
+ return false;
+}
+
//=============================================================================
/*! Export* methods.
* To store mesh contents on disk in different formats.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_Mesh.hxx
// Author : Paul RASCLE, EDF
#include <map>
#include <list>
+#ifdef WNT
+#pragma warning(disable:4251) // Warning DLL Interface ...
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
class SMESH_Gen;
class SMESHDS_Document;
class SMESH_Group;
bool GetAutoColor() throw(SALOME_Exception);
+ /*!
+ * \brief Set the flag meaning that the mesh has been edited "manually".
+ * It is to set to false after Clear() and to set to true by MeshEditor
+ */
+ void SetIsModified(bool isModified);
+
+ bool GetIsModified() const { return _isModified; }
+
+ /*!
+ * \brief Return true if the mesh has been edited since a total re-compute
+ * and those modifications may prevent successful partial re-compute.
+ * As a side effect reset _isModified flag if mesh is empty
+ */
+ bool HasModificationsToDiscard() const;
+
/*!
* \brief Return data map of descendant to ancestor shapes
*/
SMESH_Gen * _gen;
bool _isAutoColor;
+ bool _isModified; //!< modified since last total re-compute, issue 0020693
double _shapeDiagonal; //!< diagonal size of bounding box of shape to mesh
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's classes
// File : SMESH_MeshEditor.cxx
// Created : Mon Apr 12 16:10:22 2004
#include "SMESHDS_Group.hxx"
#include "SMESHDS_Mesh.hxx"
-#include "SMESH_subMesh.hxx"
+#include "SMESH_Algo.hxx"
#include "SMESH_ControlsDef.hxx"
+#include "SMESH_Group.hxx"
#include "SMESH_MesherHelper.hxx"
#include "SMESH_OctreeNode.hxx"
-#include "SMESH_Group.hxx"
+#include "SMESH_subMesh.hxx"
#include "utilities.h"
#include <BRep_Tool.hxx>
#include <ElCLib.hxx>
#include <Extrema_GenExtPS.hxx>
+#include <Extrema_POnCurv.hxx>
#include <Extrema_POnSurf.hxx>
+#include <GC_MakeSegment.hxx>
#include <Geom2d_Curve.hxx>
+#include <GeomAPI_ExtremaCurveCurve.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <Geom_Curve.hxx>
+#include <Geom_Line.hxx>
#include <Geom_Surface.hxx>
+#include <IntAna_IntConicQuad.hxx>
+#include <IntAna_Quadric.hxx>
#include <Precision.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TopAbs_State.hxx>
#include <gp_Vec.hxx>
#include <gp_XY.hxx>
#include <gp_XYZ.hxx>
+
#include <math.h>
#include <map>
int nbnode = node.size();
SMESHDS_Mesh* mesh = GetMeshDS();
switch ( type ) {
+ case SMDSAbs_0DElement:
+ if ( nbnode == 1 )
+ if ( ID ) e = mesh->Add0DElementWithID(node[0], ID);
+ else e = mesh->Add0DElement (node[0] );
+ break;
case SMDSAbs_Edge:
if ( nbnode == 2 )
if ( ID ) e = mesh->AddEdgeWithID(node[0], node[1], ID);
//function : BestSplit
//purpose : Find better diagonal for cutting.
//=======================================================================
+
int SMESH_MeshEditor::BestSplit (const SMDS_MeshElement* theQuad,
SMESH::Controls::NumericalFunctorPtr theCrit)
{
return -1;
}
+namespace
+{
+ // Methods of splitting volumes into tetra
+
+ const int theHexTo5_1[5*4+1] =
+ {
+ 0, 1, 2, 5, 0, 4, 5, 7, 0, 2, 3, 7, 2, 5, 6, 7, 0, 5, 2, 7, -1
+ };
+ const int theHexTo5_2[5*4+1] =
+ {
+ 1, 2, 3, 6, 1, 4, 5, 6, 0, 1, 3, 4, 3, 4, 6, 7, 1, 3, 4, 6, -1
+ };
+ const int* theHexTo5[2] = { theHexTo5_1, theHexTo5_2 };
+
+ const int theHexTo6_1[6*4+1] =
+ {
+ 1, 5, 6, 0, 0, 1, 2, 6, 0, 4, 5, 6, 0, 4, 6, 7, 0, 2, 3, 6, 0, 3, 7, 6, -1
+ };
+ const int theHexTo6_2[6*4+1] =
+ {
+ 2, 6, 7, 1, 1, 2, 3, 7, 1, 5, 6, 7, 1, 5, 7, 4, 1, 3, 0, 7, 1, 0, 4, 7, -1
+ };
+ const int theHexTo6_3[6*4+1] =
+ {
+ 3, 7, 4, 2, 2, 3, 0, 4, 2, 6, 7, 4, 2, 6, 4, 5, 2, 0, 1, 4, 2, 1, 5, 4, -1
+ };
+ const int theHexTo6_4[6*4+1] =
+ {
+ 0, 4, 5, 3, 3, 0, 1, 5, 3, 7, 4, 5, 3, 7, 5, 6, 3, 1, 2, 5, 3, 2, 6, 5, -1
+ };
+ const int* theHexTo6[4] = { theHexTo6_1, theHexTo6_2, theHexTo6_3, theHexTo6_4 };
+
+ const int thePyraTo2_1[2*4+1] =
+ {
+ 0, 1, 2, 4, 0, 2, 3, 4, -1
+ };
+ const int thePyraTo2_2[2*4+1] =
+ {
+ 1, 2, 3, 4, 1, 3, 0, 4, -1
+ };
+ const int* thePyraTo2[2] = { thePyraTo2_1, thePyraTo2_2 };
+
+ const int thePentaTo3_1[3*4+1] =
+ {
+ 0, 1, 2, 3, 1, 3, 4, 2, 2, 3, 4, 5, -1
+ };
+ const int thePentaTo3_2[3*4+1] =
+ {
+ 1, 2, 0, 4, 2, 4, 5, 0, 0, 4, 5, 3, -1
+ };
+ const int thePentaTo3_3[3*4+1] =
+ {
+ 2, 0, 1, 5, 0, 5, 3, 1, 1, 5, 3, 4, -1
+ };
+ const int thePentaTo3_4[3*4+1] =
+ {
+ 0, 1, 2, 3, 1, 3, 4, 5, 2, 3, 1, 5, -1
+ };
+ const int thePentaTo3_5[3*4+1] =
+ {
+ 1, 2, 0, 4, 2, 4, 5, 3, 0, 4, 2, 3, -1
+ };
+ const int thePentaTo3_6[3*4+1] =
+ {
+ 2, 0, 1, 5, 0, 5, 3, 4, 1, 5, 0, 4, -1
+ };
+ const int* thePentaTo3[6] = { thePentaTo3_1, thePentaTo3_2, thePentaTo3_3,
+ thePentaTo3_4, thePentaTo3_5, thePentaTo3_6 };
+
+ struct TTriangleFacet //!< stores indices of three nodes of tetra facet
+ {
+ int _n1, _n2, _n3;
+ TTriangleFacet(int n1, int n2, int n3): _n1(n1), _n2(n2), _n3(n3) {}
+ bool contains(int n) const { return ( n == _n1 || n == _n2 || n == _n3 ); }
+ bool hasAdjacentTetra( const SMDS_MeshElement* elem ) const;
+ };
+ struct TSplitMethod
+ {
+ int _nbTetra;
+ const int* _connectivity; //!< foursomes of tetra connectivy finished by -1
+ bool _baryNode; //!< additional node is to be created at cell barycenter
+ bool _ownConn; //!< to delete _connectivity in destructor
+
+ TSplitMethod( int nbTet=0, const int* conn=0, bool addNode=false)
+ : _nbTetra(nbTet), _connectivity(conn), _baryNode(addNode), _ownConn(false) {}
+ ~TSplitMethod() { if ( _ownConn ) delete [] _connectivity; _connectivity = 0; }
+ bool hasFacet( const TTriangleFacet& facet ) const
+ {
+ const int* tetConn = _connectivity;
+ for ( ; tetConn[0] >= 0; tetConn += 4 )
+ if (( facet.contains( tetConn[0] ) +
+ facet.contains( tetConn[1] ) +
+ facet.contains( tetConn[2] ) +
+ facet.contains( tetConn[3] )) == 3 )
+ return true;
+ return false;
+ }
+ };
+
+ //=======================================================================
+ /*!
+ * \brief return TSplitMethod for the given element
+ */
+ //=======================================================================
+
+ TSplitMethod getSplitMethod( SMDS_VolumeTool& vol, const int theMethodFlags)
+ {
+ int iQ = vol.Element()->IsQuadratic() ? 2 : 1;
+
+ // Find out how adjacent volumes are split
+
+ vector < list< TTriangleFacet > > triaSplitsByFace( vol.NbFaces() ); // splits of each side
+ int hasAdjacentSplits = 0, maxTetConnSize = 0;
+ for ( int iF = 0; iF < vol.NbFaces(); ++iF )
+ {
+ int nbNodes = vol.NbFaceNodes( iF ) / iQ;
+ maxTetConnSize += 4 * ( nbNodes - 2 );
+ if ( nbNodes < 4 ) continue;
+
+ list< TTriangleFacet >& triaSplits = triaSplitsByFace[ iF ];
+ const int* nInd = vol.GetFaceNodesIndices( iF );
+ if ( nbNodes == 4 )
+ {
+ TTriangleFacet t012( nInd[0*iQ], nInd[1*iQ], nInd[2*iQ] );
+ TTriangleFacet t123( nInd[1*iQ], nInd[2*iQ], nInd[3*iQ] );
+ if ( t012.hasAdjacentTetra( vol.Element() )) triaSplits.push_back( t012 );
+ else if ( t123.hasAdjacentTetra( vol.Element() )) triaSplits.push_back( t123 );
+ }
+ else
+ {
+ int iCom = 0; // common node of triangle faces to split into
+ for ( int iVar = 0; iVar < nbNodes; ++iVar, ++iCom )
+ {
+ TTriangleFacet t012( nInd[ iQ * ( iCom )],
+ nInd[ iQ * ( (iCom+1)%nbNodes )],
+ nInd[ iQ * ( (iCom+2)%nbNodes )]);
+ TTriangleFacet t023( nInd[ iQ * ( iCom )],
+ nInd[ iQ * ( (iCom+2)%nbNodes )],
+ nInd[ iQ * ( (iCom+3)%nbNodes )]);
+ if ( t012.hasAdjacentTetra( vol.Element() ) && t023.hasAdjacentTetra( vol.Element() ))
+ {
+ triaSplits.push_back( t012 );
+ triaSplits.push_back( t023 );
+ break;
+ }
+ }
+ }
+ if ( !triaSplits.empty() )
+ hasAdjacentSplits = true;
+ }
+
+ // Among variants of split method select one compliant with adjacent volumes
+
+ TSplitMethod method;
+ if ( !vol.Element()->IsPoly() )
+ {
+ int nbVariants = 2, nbTet = 0;
+ const int** connVariants = 0;
+ switch ( vol.Element()->GetEntityType() )
+ {
+ case SMDSEntity_Hexa:
+ case SMDSEntity_Quad_Hexa:
+ if ( theMethodFlags & SMESH_MeshEditor::HEXA_TO_5 )
+ connVariants = theHexTo5, nbTet = 5;
+ else
+ connVariants = theHexTo6, nbTet = 6, nbVariants = 4;
+ break;
+ case SMDSEntity_Pyramid:
+ case SMDSEntity_Quad_Pyramid:
+ connVariants = thePyraTo2; nbTet = 2;
+ break;
+ case SMDSEntity_Penta:
+ case SMDSEntity_Quad_Penta:
+ connVariants = thePentaTo3; nbTet = 3; nbVariants = 6;
+ break;
+ default:
+ nbVariants = 0;
+ }
+ for ( int variant = 0; variant < nbVariants && method._nbTetra == 0; ++variant )
+ {
+ // check method compliancy with adjacent tetras,
+ // all found splits must be among facets of tetras described by this method
+ method = TSplitMethod( nbTet, connVariants[variant] );
+ if ( hasAdjacentSplits && method._nbTetra > 0 )
+ {
+ bool facetCreated = true;
+ for ( int iF = 0; facetCreated && iF < triaSplitsByFace.size(); ++iF )
+ {
+ list< TTriangleFacet >::const_iterator facet = triaSplitsByFace[iF].begin();
+ for ( ; facetCreated && facet != triaSplitsByFace[iF].end(); ++facet )
+ facetCreated = method.hasFacet( *facet );
+ }
+ if ( !facetCreated )
+ method = TSplitMethod(0); // incompatible method
+ }
+ }
+ }
+ if ( method._nbTetra < 1 )
+ {
+ // No standard method is applicable, use a generic solution:
+ // each facet of a volume is split into triangles and
+ // each of triangles and a volume barycenter form a tetrahedron.
+
+ int* connectivity = new int[ maxTetConnSize + 1 ];
+ method._connectivity = connectivity;
+ method._ownConn = true;
+ method._baryNode = true;
+
+ int connSize = 0;
+ int baryCenInd = vol.NbNodes();
+ for ( int iF = 0; iF < vol.NbFaces(); ++iF )
+ {
+ const int nbNodes = vol.NbFaceNodes( iF ) / iQ;
+ const int* nInd = vol.GetFaceNodesIndices( iF );
+ // find common node of triangle facets of tetra to create
+ int iCommon = 0; // index in linear numeration
+ const list< TTriangleFacet >& triaSplits = triaSplitsByFace[ iF ];
+ if ( !triaSplits.empty() )
+ {
+ // by found facets
+ const TTriangleFacet* facet = &triaSplits.front();
+ for ( ; iCommon < nbNodes-1 ; ++iCommon )
+ if ( facet->contains( nInd[ iQ * iCommon ]) &&
+ facet->contains( nInd[ iQ * ((iCommon+2)%nbNodes) ]))
+ break;
+ }
+ else if ( nbNodes > 3 )
+ {
+ // find the best method of splitting into triangles by aspect ratio
+ SMESH::Controls::NumericalFunctorPtr aspectRatio( new SMESH::Controls::AspectRatio);
+ map< double, int > badness2iCommon;
+ const SMDS_MeshNode** nodes = vol.GetFaceNodes( iF );
+ int nbVariants = ( nbNodes == 4 ? 2 : nbNodes );
+ for ( int iVar = 0; iVar < nbVariants; ++iVar, ++iCommon )
+ for ( int iLast = iCommon+2; iLast < iCommon+nbNodes; ++iLast )
+ {
+ SMDS_FaceOfNodes tria ( nodes[ iQ*( iCommon )],
+ nodes[ iQ*((iLast-1)%nbNodes)],
+ nodes[ iQ*((iLast )%nbNodes)]);
+ double badness = getBadRate( &tria, aspectRatio );
+ badness2iCommon.insert( make_pair( badness, iCommon ));
+ }
+ // use iCommon with lowest badness
+ iCommon = badness2iCommon.begin()->second;
+ }
+ if ( iCommon >= nbNodes )
+ iCommon = 0; // something wrong
+ // fill connectivity of tetra
+ int nbTet = nbNodes - 2;
+ for ( int i = 0; i < nbTet; ++i )
+ {
+ int i1 = (iCommon+1+i) % nbNodes, i2 = (iCommon+2+i) % nbNodes;
+ if ( !vol.IsFaceExternal( iF )) swap( i1, i2 );
+ connectivity[ connSize++ ] = nInd[ iQ * iCommon ];
+ connectivity[ connSize++ ] = nInd[ iQ * i1 ];
+ connectivity[ connSize++ ] = nInd[ iQ * i2 ];
+ connectivity[ connSize++ ] = baryCenInd;
+ ++method._nbTetra;
+ }
+ }
+ connectivity[ connSize++ ] = -1;
+ }
+ return method;
+ }
+ //================================================================================
+ /*!
+ * \brief Check if there is a tetraherdon adjacent to the given element via this facet
+ */
+ //================================================================================
+
+ bool TTriangleFacet::hasAdjacentTetra( const SMDS_MeshElement* elem ) const
+ {
+ // find the tetrahedron including the three nodes of facet
+ const SMDS_MeshNode* n1 = elem->GetNode(_n1);
+ const SMDS_MeshNode* n2 = elem->GetNode(_n2);
+ const SMDS_MeshNode* n3 = elem->GetNode(_n3);
+ SMDS_ElemIteratorPtr volIt1 = n1->GetInverseElementIterator(SMDSAbs_Volume);
+ while ( volIt1->more() )
+ {
+ const SMDS_MeshElement* v = volIt1->next();
+ if ( v->GetEntityType() != ( v->IsQuadratic() ? SMDSEntity_Quad_Tetra : SMDSEntity_Tetra ))
+ continue;
+ SMDS_ElemIteratorPtr volIt2 = n2->GetInverseElementIterator(SMDSAbs_Volume);
+ while ( volIt2->more() )
+ if ( v != volIt2->next() )
+ continue;
+ SMDS_ElemIteratorPtr volIt3 = n3->GetInverseElementIterator(SMDSAbs_Volume);
+ while ( volIt3->more() )
+ if ( v == volIt3->next() )
+ return true;
+ }
+ return false;
+ }
+} // namespace
+
+//=======================================================================
+//function : SplitVolumesIntoTetra
+//purpose : Split volumic elements into tetrahedra.
+//=======================================================================
+
+void SMESH_MeshEditor::SplitVolumesIntoTetra (const TIDSortedElemSet & theElems,
+ const int theMethodFlags)
+{
+ // std-like iterator on coordinates of nodes of mesh element
+ typedef SMDS_StdIterator< TNodeXYZ, SMDS_ElemIteratorPtr > NXyzIterator;
+ NXyzIterator xyzEnd;
+
+ SMDS_VolumeTool volTool;
+ SMESH_MesherHelper helper( *GetMesh());
+
+ SMESHDS_SubMesh* subMesh = GetMeshDS()->MeshElements(1);
+ SMESHDS_SubMesh* fSubMesh = subMesh;
+
+ SMESH_SequenceOfElemPtr newNodes, newElems;
+
+ TIDSortedElemSet::const_iterator elem = theElems.begin();
+ for ( ; elem != theElems.end(); ++elem )
+ {
+ SMDSAbs_EntityType geomType = (*elem)->GetEntityType();
+ if ( geomType <= SMDSEntity_Quad_Tetra )
+ continue; // tetra or face or ...
+
+ if ( !volTool.Set( *elem )) continue; // not volume? strange...
+
+ TSplitMethod splitMethod = getSplitMethod( volTool, theMethodFlags );
+ if ( splitMethod._nbTetra < 1 ) continue;
+
+ // find submesh to add new tetras in
+ if ( !subMesh || !subMesh->Contains( *elem ))
+ {
+ int shapeID = FindShape( *elem );
+ helper.SetSubShape( shapeID ); // helper will add tetras to the found submesh
+ subMesh = GetMeshDS()->MeshElements( shapeID );
+ }
+ int iQ;
+ if ( (*elem)->IsQuadratic() )
+ {
+ iQ = 2;
+ // add quadratic links to the helper
+ for ( int iF = 0; iF < volTool.NbFaces(); ++iF )
+ {
+ const SMDS_MeshNode** fNodes = volTool.GetFaceNodes( iF );
+ for ( int iN = 0; iN < volTool.NbFaceNodes( iF ); iN += iQ )
+ helper.AddTLinkNode( fNodes[iF], fNodes[iF+2], fNodes[iF+1] );
+ }
+ helper.SetIsQuadratic( true );
+ }
+ else
+ {
+ iQ = 1;
+ helper.SetIsQuadratic( false );
+ }
+ vector<const SMDS_MeshNode*> nodes( (*elem)->begin_nodes(), (*elem)->end_nodes() );
+ if ( splitMethod._baryNode )
+ {
+ // make a node at barycenter
+ gp_XYZ gc( 0,0,0 );
+ gc = accumulate( NXyzIterator((*elem)->nodesIterator()), xyzEnd, gc ) / nodes.size();
+ SMDS_MeshNode* gcNode = helper.AddNode( gc.X(), gc.Y(), gc.Z() );
+ nodes.push_back( gcNode );
+ newNodes.Append( gcNode );
+ }
+
+ // make tetras
+ helper.SetElementsOnShape( true );
+ vector<const SMDS_MeshElement* > tetras( splitMethod._nbTetra ); // splits of a volume
+ const int* tetConn = splitMethod._connectivity;
+ for ( int i = 0; i < splitMethod._nbTetra; ++i, tetConn += 4 )
+ newElems.Append( tetras[ i ] = helper.AddVolume( nodes[ tetConn[0] ],
+ nodes[ tetConn[1] ],
+ nodes[ tetConn[2] ],
+ nodes[ tetConn[3] ]));
+
+ ReplaceElemInGroups( *elem, tetras, GetMeshDS() );
+
+ // Split faces on sides of the split volume
+
+ const SMDS_MeshNode** volNodes = volTool.GetNodes();
+ for ( int iF = 0; iF < volTool.NbFaces(); ++iF )
+ {
+ const int nbNodes = volTool.NbFaceNodes( iF ) / iQ;
+ if ( nbNodes < 4 ) continue;
+
+ // find an existing face
+ vector<const SMDS_MeshNode*> fNodes( volTool.GetFaceNodes( iF ),
+ volTool.GetFaceNodes( iF ) + nbNodes*iQ );
+ while ( const SMDS_MeshElement* face = GetMeshDS()->FindFace( fNodes ))
+ {
+ // among possible triangles create ones discribed by split method
+ const int* nInd = volTool.GetFaceNodesIndices( iF );
+ int nbVariants = ( nbNodes == 4 ? 2 : nbNodes );
+ int iCom = 0; // common node of triangle faces to split into
+ list< TTriangleFacet > facets;
+ for ( int iVar = 0; iVar < nbVariants; ++iVar, ++iCom )
+ {
+ TTriangleFacet t012( nInd[ iQ * ( iCom )],
+ nInd[ iQ * ( (iCom+1)%nbNodes )],
+ nInd[ iQ * ( (iCom+2)%nbNodes )]);
+ TTriangleFacet t023( nInd[ iQ * ( iCom )],
+ nInd[ iQ * ( (iCom+2)%nbNodes )],
+ nInd[ iQ * ( (iCom+3)%nbNodes )]);
+ if ( splitMethod.hasFacet( t012 ) && splitMethod.hasFacet( t023 ))
+ {
+ facets.push_back( t012 );
+ facets.push_back( t023 );
+ for ( int iLast = iCom+4; iLast < iCom+nbNodes; ++iLast )
+ facets.push_back( TTriangleFacet( nInd[ iQ * ( iCom )],
+ nInd[ iQ * ((iLast-1)%nbNodes )],
+ nInd[ iQ * ((iLast )%nbNodes )]));
+ break;
+ }
+ }
+ // find submesh to add new faces in
+ if ( !fSubMesh || !fSubMesh->Contains( face ))
+ {
+ int shapeID = FindShape( face );
+ fSubMesh = GetMeshDS()->MeshElements( shapeID );
+ }
+ // make triangles
+ helper.SetElementsOnShape( false );
+ vector< const SMDS_MeshElement* > triangles;
+ list< TTriangleFacet >::iterator facet = facets.begin();
+ for ( ; facet != facets.end(); ++facet )
+ {
+ if ( !volTool.IsFaceExternal( iF ))
+ swap( facet->_n2, facet->_n3 );
+ triangles.push_back( helper.AddFace( volNodes[ facet->_n1 ],
+ volNodes[ facet->_n2 ],
+ volNodes[ facet->_n3 ]));
+ if ( triangles.back() && fSubMesh )
+ fSubMesh->AddElement( triangles.back());
+ newElems.Append( triangles.back() );
+ }
+ ReplaceElemInGroups( face, triangles, GetMeshDS() );
+ GetMeshDS()->RemoveFreeElement( face, fSubMesh, /*fromGroups=*/false );
+ }
+
+ } // loop on volume faces to split them into triangles
+
+ GetMeshDS()->RemoveFreeElement( *elem, subMesh, /*fromGroups=*/false );
+
+ } // loop on volumes to split
+
+ myLastCreatedNodes = newNodes;
+ myLastCreatedElems = newElems;
+}
+
//=======================================================================
//function : AddToSameGroups
//purpose : add elemToAdd to the groups the elemInGroups belongs to
}
}
-//=======================================================================
-//function : ReplaceElemInGroups
-//purpose : replace elemToRm by elemToAdd in the all groups
-//=======================================================================
+//================================================================================
+/*!
+ * \brief Replace elemToRm by elemToAdd in the all groups
+ */
+//================================================================================
void SMESH_MeshEditor::ReplaceElemInGroups (const SMDS_MeshElement* elemToRm,
const SMDS_MeshElement* elemToAdd,
}
}
+//================================================================================
+/*!
+ * \brief Replace elemToRm by elemToAdd in the all groups
+ */
+//================================================================================
+
+void SMESH_MeshEditor::ReplaceElemInGroups (const SMDS_MeshElement* elemToRm,
+ const vector<const SMDS_MeshElement*>& elemToAdd,
+ SMESHDS_Mesh * aMesh)
+{
+ const set<SMESHDS_GroupBase*>& groups = aMesh->GetGroups();
+ if (!groups.empty())
+ {
+ set<SMESHDS_GroupBase*>::const_iterator grIt = groups.begin();
+ for ( ; grIt != groups.end(); grIt++ ) {
+ SMESHDS_Group* group = dynamic_cast<SMESHDS_Group*>( *grIt );
+ if ( group && group->SMDSGroup().Remove( elemToRm ) )
+ for ( int i = 0; i < elemToAdd.size(); ++i )
+ group->SMDSGroup().Add( elemToAdd[ i ] );
+ }
+ }
+}
+
//=======================================================================
//function : QuadToTri
//purpose : Cut quadrangles into triangles.
return newGroupIDs;
}
+
//=======================================================================
-/*!
- * \brief Create groups of elements made during transformation
- * \param nodeGens - nodes making corresponding myLastCreatedNodes
- * \param elemGens - elements making corresponding myLastCreatedElems
- * \param postfix - to append to names of new groups
- */
+//function : Scale
+//purpose :
//=======================================================================
SMESH_MeshEditor::PGroupIDs
-SMESH_MeshEditor::generateGroups(const SMESH_SequenceOfElemPtr& nodeGens,
- const SMESH_SequenceOfElemPtr& elemGens,
- const std::string& postfix,
- SMESH_Mesh* targetMesh)
+SMESH_MeshEditor::Scale (TIDSortedElemSet & theElems,
+ const gp_Pnt& thePoint,
+ const std::list<double>& theScaleFact,
+ const bool theCopy,
+ const bool theMakeGroups,
+ SMESH_Mesh* theTargetMesh)
{
- PGroupIDs newGroupIDs( new list<int> );
- SMESH_Mesh* mesh = targetMesh ? targetMesh : GetMesh();
+ myLastCreatedElems.Clear();
+ myLastCreatedNodes.Clear();
- // Sort existing groups by types and collect their names
+ SMESH_MeshEditor targetMeshEditor( theTargetMesh );
+ SMESHDS_Mesh* aTgtMesh = theTargetMesh ? theTargetMesh->GetMeshDS() : 0;
+ SMESHDS_Mesh* aMesh = GetMeshDS();
- // to store an old group and a generated new one
- typedef pair< SMESHDS_GroupBase*, SMDS_MeshGroup* > TOldNewGroup;
- vector< list< TOldNewGroup > > groupsByType( SMDSAbs_NbElementTypes );
- // group names
- set< string > groupNames;
- //
- SMDS_MeshGroup* nullNewGroup = (SMDS_MeshGroup*) 0;
- SMESH_Mesh::GroupIteratorPtr groupIt = GetMesh()->GetGroups();
- while ( groupIt->more() ) {
- SMESH_Group * group = groupIt->next();
- if ( !group ) continue;
- SMESHDS_GroupBase* groupDS = group->GetGroupDS();
- if ( !groupDS || groupDS->IsEmpty() ) continue;
- groupNames.insert( group->GetName() );
- groupDS->SetStoreName( group->GetName() );
- groupsByType[ groupDS->GetType() ].push_back( make_pair( groupDS, nullNewGroup ));
- }
+ double scaleX=1.0, scaleY=1.0, scaleZ=1.0;
+ std::list<double>::const_iterator itS = theScaleFact.begin();
+ scaleX = (*itS);
+ if(theScaleFact.size()==1) {
+ scaleY = (*itS);
+ scaleZ= (*itS);
+ }
+ if(theScaleFact.size()==2) {
+ itS++;
+ scaleY = (*itS);
+ scaleZ= (*itS);
+ }
+ if(theScaleFact.size()>2) {
+ itS++;
+ scaleY = (*itS);
+ itS++;
+ scaleZ= (*itS);
+ }
+
+ // map old node to new one
+ TNodeNodeMap nodeMap;
- // Groups creation
+ // elements sharing moved nodes; those of them which have all
+ // nodes mirrored but are not in theElems are to be reversed
+ TIDSortedElemSet inverseElemSet;
- // loop on nodes and elements
- for ( int isNodes = 0; isNodes < 2; ++isNodes )
- {
- const SMESH_SequenceOfElemPtr& gens = isNodes ? nodeGens : elemGens;
- const SMESH_SequenceOfElemPtr& elems = isNodes ? myLastCreatedNodes : myLastCreatedElems;
- if ( gens.Length() != elems.Length() )
- throw SALOME_Exception(LOCALIZED("invalid args"));
+ // source elements for each generated one
+ SMESH_SequenceOfElemPtr srcElems, srcNodes;
- // loop on created elements
- for (int iElem = 1; iElem <= elems.Length(); ++iElem )
- {
- const SMDS_MeshElement* sourceElem = gens( iElem );
- if ( !sourceElem ) {
- MESSAGE("generateGroups(): NULL source element");
+ // loop on theElems
+ TIDSortedElemSet::iterator itElem;
+ for ( itElem = theElems.begin(); itElem != theElems.end(); itElem++ ) {
+ const SMDS_MeshElement* elem = *itElem;
+ if ( !elem )
+ continue;
+
+ // loop on elem nodes
+ SMDS_ElemIteratorPtr itN = elem->nodesIterator();
+ while ( itN->more() ) {
+
+ // check if a node has been already transformed
+ const SMDS_MeshNode* node = cast2Node( itN->next() );
+ pair<TNodeNodeMap::iterator,bool> n2n_isnew =
+ nodeMap.insert( make_pair ( node, node ));
+ if ( !n2n_isnew.second )
continue;
+
+ //double coord[3];
+ //coord[0] = node->X();
+ //coord[1] = node->Y();
+ //coord[2] = node->Z();
+ //theTrsf.Transforms( coord[0], coord[1], coord[2] );
+ double dx = (node->X() - thePoint.X()) * scaleX;
+ double dy = (node->Y() - thePoint.Y()) * scaleY;
+ double dz = (node->Z() - thePoint.Z()) * scaleZ;
+ if ( theTargetMesh ) {
+ //const SMDS_MeshNode * newNode = aTgtMesh->AddNode( coord[0], coord[1], coord[2] );
+ const SMDS_MeshNode * newNode =
+ aTgtMesh->AddNode( thePoint.X()+dx, thePoint.Y()+dy, thePoint.Z()+dz );
+ n2n_isnew.first->second = newNode;
+ myLastCreatedNodes.Append(newNode);
+ srcNodes.Append( node );
}
- list< TOldNewGroup > & groupsOldNew = groupsByType[ sourceElem->GetType() ];
+ else if ( theCopy ) {
+ //const SMDS_MeshNode * newNode = aMesh->AddNode( coord[0], coord[1], coord[2] );
+ const SMDS_MeshNode * newNode =
+ aMesh->AddNode( thePoint.X()+dx, thePoint.Y()+dy, thePoint.Z()+dz );
+ n2n_isnew.first->second = newNode;
+ myLastCreatedNodes.Append(newNode);
+ srcNodes.Append( node );
+ }
+ else {
+ //aMesh->MoveNode( node, coord[0], coord[1], coord[2] );
+ aMesh->MoveNode( node, thePoint.X()+dx, thePoint.Y()+dy, thePoint.Z()+dz );
+ // node position on shape becomes invalid
+ const_cast< SMDS_MeshNode* > ( node )->SetPosition
+ ( SMDS_SpacePosition::originSpacePosition() );
+ }
+
+ // keep inverse elements
+ //if ( !theCopy && !theTargetMesh && needReverse ) {
+ // SMDS_ElemIteratorPtr invElemIt = node->GetInverseElementIterator();
+ // while ( invElemIt->more() ) {
+ // const SMDS_MeshElement* iel = invElemIt->next();
+ // inverseElemSet.insert( iel );
+ // }
+ //}
+ }
+ }
+
+ // either create new elements or reverse mirrored ones
+ //if ( !theCopy && !needReverse && !theTargetMesh )
+ if ( !theCopy && !theTargetMesh )
+ return PGroupIDs();
+
+ TIDSortedElemSet::iterator invElemIt = inverseElemSet.begin();
+ for ( ; invElemIt != inverseElemSet.end(); invElemIt++ )
+ theElems.insert( *invElemIt );
+
+ // replicate or reverse elements
+
+ enum {
+ REV_TETRA = 0, // = nbNodes - 4
+ REV_PYRAMID = 1, // = nbNodes - 4
+ REV_PENTA = 2, // = nbNodes - 4
+ REV_FACE = 3,
+ REV_HEXA = 4, // = nbNodes - 4
+ FORWARD = 5
+ };
+ int index[][8] = {
+ { 2, 1, 0, 3, 4, 0, 0, 0 }, // REV_TETRA
+ { 2, 1, 0, 3, 4, 0, 0, 0 }, // REV_PYRAMID
+ { 2, 1, 0, 5, 4, 3, 0, 0 }, // REV_PENTA
+ { 2, 1, 0, 3, 0, 0, 0, 0 }, // REV_FACE
+ { 2, 1, 0, 3, 6, 5, 4, 7 }, // REV_HEXA
+ { 0, 1, 2, 3, 4, 5, 6, 7 } // FORWARD
+ };
+
+ for ( itElem = theElems.begin(); itElem != theElems.end(); itElem++ )
+ {
+ const SMDS_MeshElement* elem = *itElem;
+ if ( !elem || elem->GetType() == SMDSAbs_Node )
+ continue;
+
+ int nbNodes = elem->NbNodes();
+ int elemType = elem->GetType();
+
+ if (elem->IsPoly()) {
+ // Polygon or Polyhedral Volume
+ switch ( elemType ) {
+ case SMDSAbs_Face:
+ {
+ vector<const SMDS_MeshNode*> poly_nodes (nbNodes);
+ int iNode = 0;
+ SMDS_ElemIteratorPtr itN = elem->nodesIterator();
+ while (itN->more()) {
+ const SMDS_MeshNode* node =
+ static_cast<const SMDS_MeshNode*>(itN->next());
+ TNodeNodeMap::iterator nodeMapIt = nodeMap.find(node);
+ if (nodeMapIt == nodeMap.end())
+ break; // not all nodes transformed
+ //if (needReverse) {
+ // // reverse mirrored faces and volumes
+ // poly_nodes[nbNodes - iNode - 1] = (*nodeMapIt).second;
+ //} else {
+ poly_nodes[iNode] = (*nodeMapIt).second;
+ //}
+ iNode++;
+ }
+ if ( iNode != nbNodes )
+ continue; // not all nodes transformed
+
+ if ( theTargetMesh ) {
+ myLastCreatedElems.Append(aTgtMesh->AddPolygonalFace(poly_nodes));
+ srcElems.Append( elem );
+ }
+ else if ( theCopy ) {
+ myLastCreatedElems.Append(aMesh->AddPolygonalFace(poly_nodes));
+ srcElems.Append( elem );
+ }
+ else {
+ aMesh->ChangePolygonNodes(elem, poly_nodes);
+ }
+ }
+ break;
+ case SMDSAbs_Volume:
+ {
+ // ATTENTION: Reversing is not yet done!!!
+ const SMDS_PolyhedralVolumeOfNodes* aPolyedre =
+ dynamic_cast<const SMDS_PolyhedralVolumeOfNodes*>( elem );
+ if (!aPolyedre) {
+ MESSAGE("Warning: bad volumic element");
+ continue;
+ }
+
+ vector<const SMDS_MeshNode*> poly_nodes;
+ vector<int> quantities;
+
+ bool allTransformed = true;
+ int nbFaces = aPolyedre->NbFaces();
+ for (int iface = 1; iface <= nbFaces && allTransformed; iface++) {
+ int nbFaceNodes = aPolyedre->NbFaceNodes(iface);
+ for (int inode = 1; inode <= nbFaceNodes && allTransformed; inode++) {
+ const SMDS_MeshNode* node = aPolyedre->GetFaceNode(iface, inode);
+ TNodeNodeMap::iterator nodeMapIt = nodeMap.find(node);
+ if (nodeMapIt == nodeMap.end()) {
+ allTransformed = false; // not all nodes transformed
+ } else {
+ poly_nodes.push_back((*nodeMapIt).second);
+ }
+ }
+ quantities.push_back(nbFaceNodes);
+ }
+ if ( !allTransformed )
+ continue; // not all nodes transformed
+
+ if ( theTargetMesh ) {
+ myLastCreatedElems.Append(aTgtMesh->AddPolyhedralVolume(poly_nodes, quantities));
+ srcElems.Append( elem );
+ }
+ else if ( theCopy ) {
+ myLastCreatedElems.Append(aMesh->AddPolyhedralVolume(poly_nodes, quantities));
+ srcElems.Append( elem );
+ }
+ else {
+ aMesh->ChangePolyhedronNodes(elem, poly_nodes, quantities);
+ }
+ }
+ break;
+ default:;
+ }
+ continue;
+ }
+
+ // Regular elements
+ int* i = index[ FORWARD ];
+ //if ( needReverse && nbNodes > 2) // reverse mirrored faces and volumes
+ // if ( elemType == SMDSAbs_Face )
+ // i = index[ REV_FACE ];
+ // else
+ // i = index[ nbNodes - 4 ];
+
+ if(elem->IsQuadratic()) {
+ static int anIds[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
+ i = anIds;
+ //if(needReverse) {
+ // if(nbNodes==3) { // quadratic edge
+ // static int anIds[] = {1,0,2};
+ // i = anIds;
+ // }
+ // else if(nbNodes==6) { // quadratic triangle
+ // static int anIds[] = {0,2,1,5,4,3};
+ // i = anIds;
+ // }
+ // else if(nbNodes==8) { // quadratic quadrangle
+ // static int anIds[] = {0,3,2,1,7,6,5,4};
+ // i = anIds;
+ // }
+ // else if(nbNodes==10) { // quadratic tetrahedron of 10 nodes
+ // static int anIds[] = {0,2,1,3,6,5,4,7,9,8};
+ // i = anIds;
+ // }
+ // else if(nbNodes==13) { // quadratic pyramid of 13 nodes
+ // static int anIds[] = {0,3,2,1,4,8,7,6,5,9,12,11,10};
+ // i = anIds;
+ // }
+ // else if(nbNodes==15) { // quadratic pentahedron with 15 nodes
+ // static int anIds[] = {0,2,1,3,5,4,8,7,6,11,10,9,12,14,13};
+ // i = anIds;
+ // }
+ // else { // nbNodes==20 - quadratic hexahedron with 20 nodes
+ // static int anIds[] = {0,3,2,1,4,7,6,5,11,10,9,8,15,14,13,12,16,19,18,17};
+ // i = anIds;
+ // }
+ //}
+ }
+
+ // find transformed nodes
+ vector<const SMDS_MeshNode*> nodes(nbNodes);
+ int iNode = 0;
+ SMDS_ElemIteratorPtr itN = elem->nodesIterator();
+ while ( itN->more() ) {
+ const SMDS_MeshNode* node =
+ static_cast<const SMDS_MeshNode*>( itN->next() );
+ TNodeNodeMap::iterator nodeMapIt = nodeMap.find( node );
+ if ( nodeMapIt == nodeMap.end() )
+ break; // not all nodes transformed
+ nodes[ i [ iNode++ ]] = (*nodeMapIt).second;
+ }
+ if ( iNode != nbNodes )
+ continue; // not all nodes transformed
+
+ if ( theTargetMesh ) {
+ if ( SMDS_MeshElement* copy =
+ targetMeshEditor.AddElement( nodes, elem->GetType(), elem->IsPoly() )) {
+ myLastCreatedElems.Append( copy );
+ srcElems.Append( elem );
+ }
+ }
+ else if ( theCopy ) {
+ if ( SMDS_MeshElement* copy = AddElement( nodes, elem->GetType(), elem->IsPoly() )) {
+ myLastCreatedElems.Append( copy );
+ srcElems.Append( elem );
+ }
+ }
+ else {
+ // reverse element as it was reversed by transformation
+ if ( nbNodes > 2 )
+ aMesh->ChangeElementNodes( elem, &nodes[0], nbNodes );
+ }
+ }
+
+ PGroupIDs newGroupIDs;
+
+ if ( theMakeGroups && theCopy ||
+ theMakeGroups && theTargetMesh ) {
+ string groupPostfix = "scaled";
+ newGroupIDs = generateGroups( srcNodes, srcElems, groupPostfix, theTargetMesh );
+ }
+
+ return newGroupIDs;
+}
+
+
+//=======================================================================
+/*!
+ * \brief Create groups of elements made during transformation
+ * \param nodeGens - nodes making corresponding myLastCreatedNodes
+ * \param elemGens - elements making corresponding myLastCreatedElems
+ * \param postfix - to append to names of new groups
+ */
+//=======================================================================
+
+SMESH_MeshEditor::PGroupIDs
+SMESH_MeshEditor::generateGroups(const SMESH_SequenceOfElemPtr& nodeGens,
+ const SMESH_SequenceOfElemPtr& elemGens,
+ const std::string& postfix,
+ SMESH_Mesh* targetMesh)
+{
+ PGroupIDs newGroupIDs( new list<int> );
+ SMESH_Mesh* mesh = targetMesh ? targetMesh : GetMesh();
+
+ // Sort existing groups by types and collect their names
+
+ // to store an old group and a generated new one
+ typedef pair< SMESHDS_GroupBase*, SMDS_MeshGroup* > TOldNewGroup;
+ vector< list< TOldNewGroup > > groupsByType( SMDSAbs_NbElementTypes );
+ // group names
+ set< string > groupNames;
+ //
+ SMDS_MeshGroup* nullNewGroup = (SMDS_MeshGroup*) 0;
+ SMESH_Mesh::GroupIteratorPtr groupIt = GetMesh()->GetGroups();
+ while ( groupIt->more() ) {
+ SMESH_Group * group = groupIt->next();
+ if ( !group ) continue;
+ SMESHDS_GroupBase* groupDS = group->GetGroupDS();
+ if ( !groupDS || groupDS->IsEmpty() ) continue;
+ groupNames.insert( group->GetName() );
+ groupDS->SetStoreName( group->GetName() );
+ groupsByType[ groupDS->GetType() ].push_back( make_pair( groupDS, nullNewGroup ));
+ }
+
+ // Groups creation
+
+ // loop on nodes and elements
+ for ( int isNodes = 0; isNodes < 2; ++isNodes )
+ {
+ const SMESH_SequenceOfElemPtr& gens = isNodes ? nodeGens : elemGens;
+ const SMESH_SequenceOfElemPtr& elems = isNodes ? myLastCreatedNodes : myLastCreatedElems;
+ if ( gens.Length() != elems.Length() )
+ throw SALOME_Exception(LOCALIZED("invalid args"));
+
+ // loop on created elements
+ for (int iElem = 1; iElem <= elems.Length(); ++iElem )
+ {
+ const SMDS_MeshElement* sourceElem = gens( iElem );
+ if ( !sourceElem ) {
+ MESSAGE("generateGroups(): NULL source element");
+ continue;
+ }
+ list< TOldNewGroup > & groupsOldNew = groupsByType[ sourceElem->GetType() ];
if ( groupsOldNew.empty() ) {
while ( iElem < gens.Length() && gens( iElem+1 ) == sourceElem )
++iElem; // skip all elements made by sourceElem
ElementBndBoxTree(const SMDS_Mesh& mesh, SMDSAbs_ElementType elemType);
void getElementsNearPoint( const gp_Pnt& point, TIDSortedElemSet& foundElems);
+ void getElementsNearLine ( const gp_Ax1& line, TIDSortedElemSet& foundElems);
~ElementBndBoxTree();
protected:
}
}
+ //================================================================================
+ /*!
+ * \brief Return elements which can be intersected by the line
+ */
+ //================================================================================
+
+ void ElementBndBoxTree::getElementsNearLine( const gp_Ax1& line,
+ TIDSortedElemSet& foundElems)
+ {
+ if ( level() && getBox().IsOut( line ))
+ return;
+
+ if ( isLeaf() )
+ {
+ for ( int i = 0; i < _elements.size(); ++i )
+ if ( !_elements[i]->IsOut( line ))
+ foundElems.insert( _elements[i]->_element );
+ }
+ else
+ {
+ for (int i = 0; i < 8; i++)
+ ((ElementBndBoxTree*) myChildren[i])->getElementsNearLine( line, foundElems );
+ }
+ }
+
//================================================================================
/*!
* \brief Construct the element box
//=======================================================================
/*!
- * \brief Implementation of search for the elements by point
+ * \brief Implementation of search for the elements by point and
+ * of classification of point in 2D mesh
*/
//=======================================================================
struct SMESH_ElementSearcherImpl: public SMESH_ElementSearcher
{
- SMESHDS_Mesh* _mesh;
- ElementBndBoxTree* _ebbTree;
- SMESH_NodeSearcherImpl* _nodeSearcher;
- SMDSAbs_ElementType _elementType;
-
- SMESH_ElementSearcherImpl( SMESHDS_Mesh& mesh ): _mesh(&mesh),_ebbTree(0),_nodeSearcher(0) {}
+ SMESHDS_Mesh* _mesh;
+ ElementBndBoxTree* _ebbTree;
+ SMESH_NodeSearcherImpl* _nodeSearcher;
+ SMDSAbs_ElementType _elementType;
+ double _tolerance;
+ bool _outerFacesFound;
+ set<const SMDS_MeshElement*> _outerFaces; // empty means "no internal faces at all"
+
+ SMESH_ElementSearcherImpl( SMESHDS_Mesh& mesh )
+ : _mesh(&mesh),_ebbTree(0),_nodeSearcher(0), _tolerance(-1), _outerFacesFound(false) {}
~SMESH_ElementSearcherImpl()
{
if ( _ebbTree ) delete _ebbTree; _ebbTree = 0;
if ( _nodeSearcher ) delete _nodeSearcher; _nodeSearcher = 0;
}
+ virtual int FindElementsByPoint(const gp_Pnt& point,
+ SMDSAbs_ElementType type,
+ vector< const SMDS_MeshElement* >& foundElements);
+ virtual TopAbs_State GetPointState(const gp_Pnt& point);
- /*!
- * \brief Find elements of given type where the given point is IN or ON.
- * Returns nb of found elements and elements them-selves.
- *
- * 'ALL' type means elements of any type excluding nodes and 0D elements
- */
- int FindElementsByPoint(const gp_Pnt& point,
- SMDSAbs_ElementType type,
- vector< const SMDS_MeshElement* >& foundElements)
+ double getTolerance();
+ bool getIntersParamOnLine(const gp_Lin& line, const SMDS_MeshElement* face,
+ const double tolerance, double & param);
+ void findOuterBoundary(const SMDS_MeshElement* anyOuterFace);
+ bool isOuterBoundary(const SMDS_MeshElement* face) const
+ {
+ return _outerFaces.empty() || _outerFaces.count(face);
+ }
+ struct TInters //!< data of intersection of the line and the mesh face used in GetPointState()
+ {
+ const SMDS_MeshElement* _face;
+ gp_Vec _faceNorm;
+ bool _coincides; //!< the line lays in face plane
+ TInters(const SMDS_MeshElement* face, const gp_Vec& faceNorm, bool coinc=false)
+ : _face(face), _faceNorm( faceNorm ), _coincides( coinc ) {}
+ };
+ struct TFaceLink //!< link and faces sharing it (used in findOuterBoundary())
{
- foundElements.clear();
+ SMESH_TLink _link;
+ TIDSortedElemSet _faces;
+ TFaceLink( const SMDS_MeshNode* n1, const SMDS_MeshNode* n2, const SMDS_MeshElement* face)
+ : _link( n1, n2 ), _faces( &face, &face + 1) {}
+ };
+};
+
+ostream& operator<< (ostream& out, const SMESH_ElementSearcherImpl::TInters& i)
+{
+ return out << "TInters(face=" << ( i._face ? i._face->GetID() : 0)
+ << ", _coincides="<<i._coincides << ")";
+}
+
+//=======================================================================
+/*!
+ * \brief define tolerance for search
+ */
+//=======================================================================
+double SMESH_ElementSearcherImpl::getTolerance()
+{
+ if ( _tolerance < 0 )
+ {
const SMDS_MeshInfo& meshInfo = _mesh->GetMeshInfo();
- // -----------------
- // define tolerance
- // -----------------
- double tolerance = 0;
+ _tolerance = 0;
if ( _nodeSearcher && meshInfo.NbNodes() > 1 )
{
double boxSize = _nodeSearcher->getTree()->maxSize();
- tolerance = 1e-8 * boxSize/* / meshInfo.NbNodes()*/;
+ _tolerance = 1e-8 * boxSize/* / meshInfo.NbNodes()*/;
}
else if ( _ebbTree && meshInfo.NbElements() > 0 )
{
double boxSize = _ebbTree->maxSize();
- tolerance = 1e-8 * boxSize/* / meshInfo.NbElements()*/;
+ _tolerance = 1e-8 * boxSize/* / meshInfo.NbElements()*/;
}
- if ( tolerance == 0 )
+ if ( _tolerance == 0 )
{
// define tolerance by size of a most complex element
int complexType = SMDSAbs_Volume;
while ( complexType > SMDSAbs_All &&
meshInfo.NbElements( SMDSAbs_ElementType( complexType )) < 1 )
--complexType;
- if ( complexType == SMDSAbs_All ) return foundElements.size(); // empty mesh
+ if ( complexType == SMDSAbs_All ) return 0; // empty mesh
double elemSize;
if ( complexType == int( SMDSAbs_Node ))
elemSize = max( dist, elemSize );
}
}
- tolerance = 1e-6 * elemSize;
+ _tolerance = 1e-6 * elemSize;
}
+ }
+ return _tolerance;
+}
+
+//================================================================================
+/*!
+ * \brief Find intersection of the line and an edge of face and return parameter on line
+ */
+//================================================================================
- // =================================================================================
- if ( type == SMDSAbs_Node || type == SMDSAbs_0DElement )
+bool SMESH_ElementSearcherImpl::getIntersParamOnLine(const gp_Lin& line,
+ const SMDS_MeshElement* face,
+ const double tol,
+ double & param)
+{
+ int nbInts = 0;
+ param = 0;
+
+ GeomAPI_ExtremaCurveCurve anExtCC;
+ Handle(Geom_Curve) lineCurve = new Geom_Line( line );
+
+ int nbNodes = face->IsQuadratic() ? face->NbNodes()/2 : face->NbNodes();
+ for ( int i = 0; i < nbNodes && nbInts < 2; ++i )
+ {
+ GC_MakeSegment edge( SMESH_MeshEditor::TNodeXYZ( face->GetNode( i )),
+ SMESH_MeshEditor::TNodeXYZ( face->GetNode( (i+1)%nbNodes) ));
+ anExtCC.Init( lineCurve, edge);
+ if ( anExtCC.NbExtrema() > 0 && anExtCC.LowerDistance() <= tol)
{
- if ( !_nodeSearcher )
- _nodeSearcher = new SMESH_NodeSearcherImpl( _mesh );
+ Quantity_Parameter pl, pe;
+ anExtCC.LowerDistanceParameters( pl, pe );
+ param += pl;
+ if ( ++nbInts == 2 )
+ break;
+ }
+ }
+ if ( nbInts > 0 ) param /= nbInts;
+ return nbInts > 0;
+}
+//================================================================================
+/*!
+ * \brief Find all faces belonging to the outer boundary of mesh
+ */
+//================================================================================
+
+void SMESH_ElementSearcherImpl::findOuterBoundary(const SMDS_MeshElement* outerFace)
+{
+ if ( _outerFacesFound ) return;
+
+ // Collect all outer faces by passing from one outer face to another via their links
+ // and BTW find out if there are internal faces at all.
- const SMDS_MeshNode* closeNode = _nodeSearcher->FindClosestTo( point );
- if ( !closeNode ) return foundElements.size();
+ // checked links and links where outer boundary meets internal one
+ set< SMESH_TLink > visitedLinks, seamLinks;
- if ( point.Distance( SMESH_MeshEditor::TNodeXYZ( closeNode )) > tolerance )
- return foundElements.size(); // to far from any node
+ // links to treat with already visited faces sharing them
+ list < TFaceLink > startLinks;
- if ( type == SMDSAbs_Node )
+ // load startLinks with the first outerFace
+ startLinks.push_back( TFaceLink( outerFace->GetNode(0), outerFace->GetNode(1), outerFace));
+ _outerFaces.insert( outerFace );
+
+ TIDSortedElemSet emptySet;
+ while ( !startLinks.empty() )
+ {
+ const SMESH_TLink& link = startLinks.front()._link;
+ TIDSortedElemSet& faces = startLinks.front()._faces;
+
+ outerFace = *faces.begin();
+ // find other faces sharing the link
+ const SMDS_MeshElement* f;
+ while (( f = SMESH_MeshEditor::FindFaceInSet(link.node1(), link.node2(), emptySet, faces )))
+ faces.insert( f );
+
+ // select another outer face among the found
+ const SMDS_MeshElement* outerFace2 = 0;
+ if ( faces.size() == 2 )
+ {
+ outerFace2 = (outerFace == *faces.begin() ? *faces.rbegin() : *faces.begin());
+ }
+ else if ( faces.size() > 2 )
+ {
+ seamLinks.insert( link );
+
+ // link direction within the outerFace
+ gp_Vec n1n2( SMESH_MeshEditor::TNodeXYZ( link.node1()),
+ SMESH_MeshEditor::TNodeXYZ( link.node2()));
+ int i1 = outerFace->GetNodeIndex( link.node1() );
+ int i2 = outerFace->GetNodeIndex( link.node2() );
+ bool rev = ( abs(i2-i1) == 1 ? i1 > i2 : i2 > i1 );
+ if ( rev ) n1n2.Reverse();
+ // outerFace normal
+ gp_XYZ ofNorm, fNorm;
+ if ( SMESH_Algo::FaceNormal( outerFace, ofNorm, /*normalized=*/false ))
{
- foundElements.push_back( closeNode );
+ // direction from the link inside outerFace
+ gp_Vec dirInOF = gp_Vec( ofNorm ) ^ n1n2;
+ // sort all other faces by angle with the dirInOF
+ map< double, const SMDS_MeshElement* > angle2Face;
+ set< const SMDS_MeshElement*, TIDCompare >::const_iterator face = faces.begin();
+ for ( ; face != faces.end(); ++face )
+ {
+ if ( !SMESH_Algo::FaceNormal( *face, fNorm, /*normalized=*/false ))
+ continue;
+ gp_Vec dirInF = gp_Vec( fNorm ) ^ n1n2;
+ double angle = dirInOF.AngleWithRef( dirInF, n1n2 );
+ if ( angle < 0 ) angle += 2*PI;
+ angle2Face.insert( make_pair( angle, *face ));
+ }
+ if ( !angle2Face.empty() )
+ outerFace2 = angle2Face.begin()->second;
}
- else
+ }
+ // store the found outer face and add its links to continue seaching from
+ if ( outerFace2 )
+ {
+ _outerFaces.insert( outerFace );
+ int nbNodes = outerFace2->NbNodes()/( outerFace2->IsQuadratic() ? 2 : 1 );
+ for ( int i = 0; i < nbNodes; ++i )
{
- SMDS_ElemIteratorPtr elemIt = closeNode->GetInverseElementIterator( SMDSAbs_0DElement );
- while ( elemIt->more() )
- foundElements.push_back( elemIt->next() );
+ SMESH_TLink link2( outerFace2->GetNode(i), outerFace2->GetNode((i+1)%nbNodes));
+ if ( visitedLinks.insert( link2 ).second )
+ startLinks.push_back( TFaceLink( link2.node1(), link2.node2(), outerFace2 ));
}
}
- // =================================================================================
- else // elements more complex than 0D
+ startLinks.pop_front();
+ }
+ _outerFacesFound = true;
+
+ if ( !seamLinks.empty() )
+ {
+ // There are internal boundaries touching the outher one,
+ // find all faces of internal boundaries in order to find
+ // faces of boundaries of holes, if any.
+
+ }
+ else
+ {
+ _outerFaces.clear();
+ }
+}
+
+//=======================================================================
+/*!
+ * \brief Find elements of given type where the given point is IN or ON.
+ * Returns nb of found elements and elements them-selves.
+ *
+ * 'ALL' type means elements of any type excluding nodes and 0D elements
+ */
+//=======================================================================
+
+int SMESH_ElementSearcherImpl::
+FindElementsByPoint(const gp_Pnt& point,
+ SMDSAbs_ElementType type,
+ vector< const SMDS_MeshElement* >& foundElements)
+{
+ foundElements.clear();
+
+ double tolerance = getTolerance();
+
+ // =================================================================================
+ if ( type == SMDSAbs_Node || type == SMDSAbs_0DElement )
+ {
+ if ( !_nodeSearcher )
+ _nodeSearcher = new SMESH_NodeSearcherImpl( _mesh );
+
+ const SMDS_MeshNode* closeNode = _nodeSearcher->FindClosestTo( point );
+ if ( !closeNode ) return foundElements.size();
+
+ if ( point.Distance( SMESH_MeshEditor::TNodeXYZ( closeNode )) > tolerance )
+ return foundElements.size(); // to far from any node
+
+ if ( type == SMDSAbs_Node )
+ {
+ foundElements.push_back( closeNode );
+ }
+ else
+ {
+ SMDS_ElemIteratorPtr elemIt = closeNode->GetInverseElementIterator( SMDSAbs_0DElement );
+ while ( elemIt->more() )
+ foundElements.push_back( elemIt->next() );
+ }
+ }
+ // =================================================================================
+ else // elements more complex than 0D
+ {
+ if ( !_ebbTree || _elementType != type )
+ {
+ if ( _ebbTree ) delete _ebbTree;
+ _ebbTree = new ElementBndBoxTree( *_mesh, _elementType = type );
+ }
+ TIDSortedElemSet suspectElems;
+ _ebbTree->getElementsNearPoint( point, suspectElems );
+ TIDSortedElemSet::iterator elem = suspectElems.begin();
+ for ( ; elem != suspectElems.end(); ++elem )
+ if ( !SMESH_MeshEditor::isOut( *elem, point, tolerance ))
+ foundElements.push_back( *elem );
+ }
+ return foundElements.size();
+}
+
+//================================================================================
+/*!
+ * \brief Classify the given point in the closed 2D mesh
+ */
+//================================================================================
+
+TopAbs_State SMESH_ElementSearcherImpl::GetPointState(const gp_Pnt& point)
+{
+ double tolerance = getTolerance();
+ if ( !_ebbTree || _elementType != SMDSAbs_Face )
+ {
+ if ( _ebbTree ) delete _ebbTree;
+ _ebbTree = new ElementBndBoxTree( *_mesh, _elementType = SMDSAbs_Face );
+ }
+ // Algo: analyse transition of a line starting at the point through mesh boundary;
+ // try three lines parallel to axis of the coordinate system and perform rough
+ // analysis. If solution is not clear perform thorough analysis.
+
+ const int nbAxes = 3;
+ gp_Dir axisDir[ nbAxes ] = { gp::DX(), gp::DY(), gp::DZ() };
+ map< double, TInters > paramOnLine2TInters[ nbAxes ];
+ list< TInters > tangentInters[ nbAxes ]; // of faces whose plane includes the line
+ multimap< int, int > nbInt2Axis; // to find the simplest case
+ for ( int axis = 0; axis < nbAxes; ++axis )
+ {
+ gp_Ax1 lineAxis( point, axisDir[axis]);
+ gp_Lin line ( lineAxis );
+
+ TIDSortedElemSet suspectFaces; // faces possibly intersecting the line
+ _ebbTree->getElementsNearLine( lineAxis, suspectFaces );
+
+ // Intersect faces with the line
+
+ map< double, TInters > & u2inters = paramOnLine2TInters[ axis ];
+ TIDSortedElemSet::iterator face = suspectFaces.begin();
+ for ( ; face != suspectFaces.end(); ++face )
{
- if ( !_ebbTree || _elementType != type )
+ // get face plane
+ gp_XYZ fNorm;
+ if ( !SMESH_Algo::FaceNormal( *face, fNorm, /*normalized=*/false)) continue;
+ gp_Pln facePlane( SMESH_MeshEditor::TNodeXYZ( (*face)->GetNode(0)), fNorm );
+
+ // perform intersection
+ IntAna_IntConicQuad intersection( line, IntAna_Quadric( facePlane ));
+ if ( !intersection.IsDone() )
+ continue;
+ if ( intersection.IsInQuadric() )
+ {
+ tangentInters[ axis ].push_back( TInters( *face, fNorm, true ));
+ }
+ else if ( ! intersection.IsParallel() && intersection.NbPoints() > 0 )
{
- if ( _ebbTree ) delete _ebbTree;
- _ebbTree = new ElementBndBoxTree( *_mesh, _elementType = type );
+ gp_Pnt intersectionPoint = intersection.Point(1);
+ if ( !SMESH_MeshEditor::isOut( *face, intersectionPoint, tolerance ))
+ u2inters.insert(make_pair( intersection.ParamOnConic(1), TInters( *face, fNorm )));
}
- TIDSortedElemSet suspectElems;
- _ebbTree->getElementsNearPoint( point, suspectElems );
- TIDSortedElemSet::iterator elem = suspectElems.begin();
- for ( ; elem != suspectElems.end(); ++elem )
- if ( !SMESH_MeshEditor::isOut( *elem, point, tolerance ))
- foundElements.push_back( *elem );
}
- return foundElements.size();
- }
-}; // struct SMESH_ElementSearcherImpl
+ // Analyse intersections roughly
+
+ int nbInter = u2inters.size();
+ if ( nbInter == 0 )
+ return TopAbs_OUT;
+
+ double f = u2inters.begin()->first, l = u2inters.rbegin()->first;
+ if ( nbInter == 1 ) // not closed mesh
+ return fabs( f ) < tolerance ? TopAbs_ON : TopAbs_UNKNOWN;
+
+ if ( fabs( f ) < tolerance || fabs( l ) < tolerance )
+ return TopAbs_ON;
+
+ if ( (f<0) == (l<0) )
+ return TopAbs_OUT;
+
+ int nbIntBeforePoint = std::distance( u2inters.begin(), u2inters.lower_bound(0));
+ int nbIntAfterPoint = nbInter - nbIntBeforePoint;
+ if ( nbIntBeforePoint == 1 || nbIntAfterPoint == 1 )
+ return TopAbs_IN;
+
+ nbInt2Axis.insert( make_pair( min( nbIntBeforePoint, nbIntAfterPoint ), axis ));
+
+ if ( _outerFacesFound ) break; // pass to thorough analysis
+
+ } // three attempts - loop on CS axes
+
+ // Analyse intersections thoroughly.
+ // We make two loops maximum, on the first one we only exclude touching intersections,
+ // on the second, if situation is still unclear, we gather and use information on
+ // position of faces (internal or outer). If faces position is already gathered,
+ // we make the second loop right away.
+
+ for ( int hasPositionInfo = _outerFacesFound; hasPositionInfo < 2; ++hasPositionInfo )
+ {
+ multimap< int, int >::const_iterator nb_axis = nbInt2Axis.begin();
+ for ( ; nb_axis != nbInt2Axis.end(); ++nb_axis )
+ {
+ int axis = nb_axis->second;
+ map< double, TInters > & u2inters = paramOnLine2TInters[ axis ];
+
+ gp_Ax1 lineAxis( point, axisDir[axis]);
+ gp_Lin line ( lineAxis );
+
+ // add tangent intersections to u2inters
+ double param;
+ list< TInters >::const_iterator tgtInt = tangentInters[ axis ].begin();
+ for ( ; tgtInt != tangentInters[ axis ].end(); ++tgtInt )
+ if ( getIntersParamOnLine( line, tgtInt->_face, tolerance, param ))
+ u2inters.insert(make_pair( param, *tgtInt ));
+ tangentInters[ axis ].clear();
+
+ // Count intersections before and after the point excluding touching ones.
+ // If hasPositionInfo we count intersections of outer boundary only
+
+ int nbIntBeforePoint = 0, nbIntAfterPoint = 0;
+ double f = numeric_limits<double>::max(), l = -numeric_limits<double>::max();
+ map< double, TInters >::iterator u_int1 = u2inters.begin(), u_int2 = u_int1;
+ bool ok = ! u_int1->second._coincides;
+ while ( ok && u_int1 != u2inters.end() )
+ {
+ double u = u_int1->first;
+ bool touchingInt = false;
+ if ( ++u_int2 != u2inters.end() )
+ {
+ // skip intersections at the same point (if the line passes through edge or node)
+ int nbSamePnt = 0;
+ while ( u_int2 != u2inters.end() && fabs( u_int2->first - u ) < tolerance )
+ {
+ ++nbSamePnt;
+ ++u_int2;
+ }
+
+ // skip tangent intersections
+ int nbTgt = 0;
+ const SMDS_MeshElement* prevFace = u_int1->second._face;
+ while ( ok && u_int2->second._coincides )
+ {
+ if ( SMESH_Algo::GetCommonNodes(prevFace , u_int2->second._face).empty() )
+ ok = false;
+ else
+ {
+ nbTgt++;
+ u_int2++;
+ ok = ( u_int2 != u2inters.end() );
+ }
+ }
+ if ( !ok ) break;
+
+ // skip intersections at the same point after tangent intersections
+ if ( nbTgt > 0 )
+ {
+ double u2 = u_int2->first;
+ ++u_int2;
+ while ( u_int2 != u2inters.end() && fabs( u_int2->first - u2 ) < tolerance )
+ {
+ ++nbSamePnt;
+ ++u_int2;
+ }
+ }
+ // decide if we skipped a touching intersection
+ if ( nbSamePnt + nbTgt > 0 )
+ {
+ double minDot = numeric_limits<double>::max(), maxDot = -numeric_limits<double>::max();
+ map< double, TInters >::iterator u_int = u_int1;
+ for ( ; u_int != u_int2; ++u_int )
+ {
+ if ( u_int->second._coincides ) continue;
+ double dot = u_int->second._faceNorm * line.Direction();
+ if ( dot > maxDot ) maxDot = dot;
+ if ( dot < minDot ) minDot = dot;
+ }
+ touchingInt = ( minDot*maxDot < 0 );
+ }
+ }
+ if ( !touchingInt )
+ {
+ if ( !hasPositionInfo || isOuterBoundary( u_int1->second._face ))
+ {
+ if ( u < 0 )
+ ++nbIntBeforePoint;
+ else
+ ++nbIntAfterPoint;
+ }
+ if ( u < f ) f = u;
+ if ( u > l ) l = u;
+ }
+
+ u_int1 = u_int2; // to next intersection
+
+ } // loop on intersections with one line
+
+ if ( ok )
+ {
+ if ( fabs( f ) < tolerance || fabs( l ) < tolerance )
+ return TopAbs_ON;
+
+ if ( nbIntBeforePoint == 0 || nbIntAfterPoint == 0)
+ return TopAbs_OUT;
+
+ if ( nbIntBeforePoint + nbIntAfterPoint == 1 ) // not closed mesh
+ return fabs( f ) < tolerance ? TopAbs_ON : TopAbs_UNKNOWN;
+
+ if ( nbIntBeforePoint == 1 || nbIntAfterPoint == 1 )
+ return TopAbs_IN;
+
+ if ( (f<0) == (l<0) )
+ return TopAbs_OUT;
+
+ if ( hasPositionInfo )
+ return nbIntBeforePoint % 2 ? TopAbs_IN : TopAbs_OUT;
+ }
+ } // loop on intersections of the tree lines - thorough analysis
+
+ if ( !hasPositionInfo )
+ {
+ // gather info on faces position - is face in the outer boundary or not
+ map< double, TInters > & u2inters = paramOnLine2TInters[ 0 ];
+ findOuterBoundary( u2inters.begin()->second._face );
+ }
+
+ } // two attempts - with and w/o faces position info in the mesh
+
+ return TopAbs_UNKNOWN;
+}
//=======================================================================
/*!
SMESHDS_Mesh* aMesh = GetMeshDS();
if (!aMesh)
return false;
- bool res = false;
+ //bool res = false;
+ int nbFree = 0, nbExisted = 0, nbCreated = 0;
SMDS_VolumeIteratorPtr vIt = aMesh->volumesIterator();
while(vIt->more())
{
{
if (!vTool.IsFreeFace(iface))
continue;
+ nbFree++;
vector<const SMDS_MeshNode *> nodes;
int nbFaceNodes = vTool.NbFaceNodes(iface);
const SMDS_MeshNode** faceNodes = vTool.GetFaceNodes(iface);
nodes.push_back(faceNodes[inode]);
// add new face based on volume nodes
- if (aMesh->FindFace( nodes ) )
+ if (aMesh->FindFace( nodes ) ) {
+ nbExisted++;
continue; // face already exsist
+ }
myLastCreatedElems.Append( AddElement(nodes, SMDSAbs_Face, isPoly && iface == 1) );
- res = true;
+ nbCreated++;
}
}
- return res;
+ return ( nbFree==(nbExisted+nbCreated) );
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_MeshEditor.hxx
// Created : Mon Apr 12 14:56:19 2004
/*!
* \brief Find elements of given type where the given point is IN or ON.
* Returns nb of found elements and elements them-selves.
+ * Another task is to find out if the given point is out of closed 2D mesh.
*
* 'ALL' type means elements of any type excluding nodes and 0D elements
*/
virtual int FindElementsByPoint(const gp_Pnt& point,
SMDSAbs_ElementType type,
std::vector< const SMDS_MeshElement* >& foundElems)=0;
+
+ virtual TopAbs_State GetPointState(const gp_Pnt& point) = 0;
};
//=======================================================================
const SMDS_MeshNode* node2() const { return second; }
};
+//=======================================================================
+/*!
+ * \brief SMESH_TLink knowing its orientation
+ */
+//=======================================================================
+
+struct SMESH_OrientedLink: public SMESH_TLink
+{
+ bool _reversed;
+ SMESH_OrientedLink(const SMDS_MeshNode* n1, const SMDS_MeshNode* n2 )
+ : SMESH_TLink( n1, n2 ), _reversed( n1 != node1() ) {}
+};
// ============================================================
/*!
struct TNodeXYZ : public gp_XYZ
{
const SMDS_MeshNode* _node;
- TNodeXYZ( const SMDS_MeshElement* e):_node(0) {
+ TNodeXYZ( const SMDS_MeshElement* e):gp_XYZ(0,0,0),_node(0) {
if (e) {
ASSERT( e->GetType() == SMDSAbs_Node );
_node = static_cast<const SMDS_MeshNode*>(e);
SMESH::Controls::NumericalFunctorPtr theCriterion);
+ enum SplitVolumToTetraFlags { HEXA_TO_5 = 1, HEXA_TO_6 = 2 };//!<arg of SplitVolumesIntoTetra()
+ /*!
+ * \brief Split volumic elements into tetrahedra.
+ */
+ void SplitVolumesIntoTetra (const TIDSortedElemSet & theElems, const int theMethodFlags);
+
+
enum SmoothMethod { LAPLACIAN = 0, CENTROIDAL };
void Smooth (TIDSortedElemSet & theElements,
// Move or copy theElements applying theTrsf to their nodes
+ /*!
+ * Generate new elements by extrusion of theElements
+ * param theElems - list of elements for scale
+ * param thePoint - base point for scale
+ * param theScaleFact - scale factors for axises
+ * param theCopy - allows copying the translated elements
+ * param theMakeGroups - forces the generation of new groups from existing ones
+ * param theTargetMesh - the name of the newly created mesh
+ * return instance of Mesh class
+ */
+ PGroupIDs Scale (TIDSortedElemSet& theElements,
+ const gp_Pnt& thePoint,
+ const std::list<double>& theScaleFact,
+ const bool theCopy,
+ const bool theMakeGroups,
+ SMESH_Mesh* theTargetMesh=0);
+
typedef std::list< std::list< const SMDS_MeshNode* > > TListOfListOfNodes;
void FindCoincidentNodes (std::set<const SMDS_MeshNode*> & theNodes,
SMESHDS_Mesh * aMesh);
// replace elemToRm by elemToAdd in the all groups
+ static void ReplaceElemInGroups (const SMDS_MeshElement* elemToRm,
+ const std::vector<const SMDS_MeshElement*>& elemToAdd,
+ SMESHDS_Mesh * aMesh);
+ // replace elemToRm by elemToAdd in the all groups
+
/*!
* \brief Return nodes linked to the given one in elements of the type
*/
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: SMESH_MesherHelper.cxx
// Created: 15.02.06 15:22:41
// Author: Sergey KUUL
#include <limits>
+using namespace std;
+
#define RETURN_BAD_RESULT(msg) { MESSAGE(msg); return false; }
namespace {
gp_XYZ XYZ(const SMDS_MeshNode* n) { return gp_XYZ(n->X(), n->Y(), n->Z()); }
+ enum { U_periodic = 1, V_periodic = 2 };
}
//================================================================================
//================================================================================
SMESH_MesherHelper::SMESH_MesherHelper(SMESH_Mesh& theMesh)
- : myPar1(0), myPar2(0), myParIndex(0), myMesh(&theMesh), myShapeID(0), myCreateQuadratic(false)
+ : myParIndex(0), myMesh(&theMesh), myShapeID(0), myCreateQuadratic(false)
{
+ myPar1[0] = myPar2[0] = myPar1[1] = myPar2[1] = 0;
mySetElemOnShape = ( ! myMesh->HasShapeToMesh() );
}
+//=======================================================================
+//function : ~SMESH_MesherHelper
+//purpose :
+//=======================================================================
+
+SMESH_MesherHelper::~SMESH_MesherHelper()
+{
+ TID2Projector::iterator i_proj = myFace2Projector.begin();
+ for ( ; i_proj != myFace2Projector.end(); ++i_proj )
+ delete i_proj->second;
+}
+
//=======================================================================
//function : IsQuadraticSubMesh
//purpose : Check submesh for given shape: if all elements on this shape
}
SMESHDS_Mesh* meshDS = GetMeshDS();
myShapeID = meshDS->ShapeToIndex(aSh);
+ myParIndex = 0;
// treatment of periodic faces
for ( TopExp_Explorer eF( aSh, TopAbs_FACE ); eF.More(); eF.Next() )
const TopoDS_Edge& edge = TopoDS::Edge( exp.Current() );
if ( BRep_Tool::IsClosed( edge, face )) {
// initialize myPar1, myPar2 and myParIndex
- if ( mySeamShapeIds.empty() ) {
- gp_Pnt2d uv1, uv2;
- BRep_Tool::UVPoints( edge, face, uv1, uv2 );
- if ( Abs( uv1.Coord(1) - uv2.Coord(1) ) < Abs( uv1.Coord(2) - uv2.Coord(2) ))
- {
- myParIndex = 1; // U periodic
- myPar1 = surface.FirstUParameter();
- myPar2 = surface.LastUParameter();
- }
- else {
- myParIndex = 2; // V periodic
- myPar1 = surface.FirstVParameter();
- myPar2 = surface.LastVParameter();
- }
+ gp_Pnt2d uv1, uv2;
+ BRep_Tool::UVPoints( edge, face, uv1, uv2 );
+ if ( Abs( uv1.Coord(1) - uv2.Coord(1) ) < Abs( uv1.Coord(2) - uv2.Coord(2) ))
+ {
+ myParIndex |= U_periodic;
+ myPar1[0] = surface.FirstUParameter();
+ myPar2[0] = surface.LastUParameter();
+ }
+ else {
+ myParIndex |= V_periodic;
+ myPar1[1] = surface.FirstVParameter();
+ myPar2[1] = surface.LastVParameter();
}
// store seam shape indices, negative if shape encounters twice
int edgeID = meshDS->ShapeToIndex( edge );
gp_Pnt2d SMESH_MesherHelper::GetUVOnSeam( const gp_Pnt2d& uv1, const gp_Pnt2d& uv2 ) const
{
- double p1 = uv1.Coord( myParIndex );
- double p2 = uv2.Coord( myParIndex );
- double p3 = ( Abs( p1 - myPar1 ) < Abs( p1 - myPar2 )) ? myPar2 : myPar1;
- if ( Abs( p2 - p1 ) > Abs( p2 - p3 ))
- p1 = p3;
gp_Pnt2d result = uv1;
- result.SetCoord( myParIndex, p1 );
+ for ( int i = U_periodic; i <= V_periodic ; ++i )
+ {
+ if ( myParIndex & i )
+ {
+ double p1 = uv1.Coord( i );
+ double dp1 = Abs( p1-myPar1[i-1]), dp2 = Abs( p1-myPar2[i-1]);
+ if ( myParIndex == i ||
+ dp1 < ( myPar2[i-1] - myPar2[i-1] ) / 100. ||
+ dp2 < ( myPar2[i-1] - myPar2[i-1] ) / 100. )
+ {
+ double p2 = uv2.Coord( i );
+ double p1Alt = ( dp1 < dp2 ) ? myPar2[i-1] : myPar1[i-1];
+ if ( Abs( p2 - p1 ) > Abs( p2 - p1Alt ))
+ result.SetCoord( i, p1Alt );
+ }
+ }
+ }
return result;
}
const SMDS_MeshNode* n2,
bool* check) const
{
- gp_Pnt2d uv( 1e100, 1e100 );
+ gp_Pnt2d uv( Precision::Infinite(), Precision::Infinite() );
const SMDS_PositionPtr Pos = n->GetPosition();
bool uvOK = false;
if(Pos->GetTypeOfPosition()==SMDS_TOP_FACE)
}
}
else {
+ uvOK = false;
TopTools_ListIteratorOfListOfShape it( myMesh->GetAncestors( V ));
for ( ; it.More(); it.Next() ) {
if ( it.Value().ShapeType() == TopAbs_EDGE ) {
if ( !C2d.IsNull() ) {
double u = ( V == TopExp::FirstVertex( edge ) ) ? f : l;
uv = C2d->Value( u );
+ uvOK = true;
break;
}
}
Handle(Geom_Surface) surface = BRep_Tool::Surface( F,loc );
gp_Pnt nodePnt = XYZ( n );
if ( !loc.IsIdentity() ) nodePnt.Transform( loc.Transformation().Inverted() );
- if ( nodePnt.Distance( surface->Value( uv.X(), uv.Y() )) > tol )
+ if ( Precision::IsInfinite( uv.X() ) ||
+ Precision::IsInfinite( uv.Y() ) ||
+ nodePnt.Distance( surface->Value( uv.X(), uv.Y() )) > tol )
{
// uv incorrect, project the node to surface
- GeomAPI_ProjectPointOnSurf projector( nodePnt, surface, tol );
+ GeomAPI_ProjectPointOnSurf& projector = GetProjector( F, loc, tol );
+ projector.Perform( nodePnt );
if ( !projector.IsDone() || projector.NbPoints() < 1 )
{
MESSAGE( "SMESH_MesherHelper::CheckNodeUV() failed to project" );
return true;
}
+//=======================================================================
+//function : GetProjector
+//purpose : Return projector intitialized by given face without location, which is returned
+//=======================================================================
+
+GeomAPI_ProjectPointOnSurf& SMESH_MesherHelper::GetProjector(const TopoDS_Face& F,
+ TopLoc_Location& loc,
+ double tol ) const
+{
+ Handle(Geom_Surface) surface = BRep_Tool::Surface( F,loc );
+ int faceID = GetMeshDS()->ShapeToIndex( F );
+ TID2Projector& i2proj = const_cast< TID2Projector&>( myFace2Projector );
+ TID2Projector::iterator i_proj = i2proj.find( faceID );
+ if ( i_proj == i2proj.end() )
+ {
+ if ( tol == 0 ) tol = BRep_Tool::Tolerance( F );
+ double U1, U2, V1, V2;
+ surface->Bounds(U1, U2, V1, V2);
+ GeomAPI_ProjectPointOnSurf* proj = new GeomAPI_ProjectPointOnSurf();
+ proj->Init( surface, U1, U2, V1, V2, tol );
+ i_proj = i2proj.insert( make_pair( faceID, proj )).first;
+ }
+ return *( i_proj->second );
+}
+
+namespace
+{
+ gp_XY AverageUV(const gp_XY& uv1, const gp_XY& uv2) { return ( uv1 + uv2 ) / 2.; }
+ gp_XY_FunPtr(Added); // define gp_XY_Added pointer to function calling gp_XY::Added(gp_XY)
+ gp_XY_FunPtr(Subtracted);
+}
+
+//=======================================================================
+//function : applyIn2D
+//purpose : Perform given operation on two 2d points in parameric space of given surface.
+// It takes into account period of the surface. Use gp_XY_FunPtr macro
+// to easily define pointer to function of gp_XY class.
+//=======================================================================
+
+gp_XY SMESH_MesherHelper::applyIn2D(const Handle(Geom_Surface)& surface,
+ const gp_XY& uv1,
+ const gp_XY& uv2,
+ xyFunPtr fun,
+ const bool resultInPeriod)
+{
+ Standard_Boolean isUPeriodic = surface.IsNull() ? false : surface->IsUPeriodic();
+ Standard_Boolean isVPeriodic = surface.IsNull() ? false : surface->IsVPeriodic();
+ if ( !isUPeriodic && !isVPeriodic )
+ return fun(uv1,uv2);
+
+ // move uv2 not far than half-period from uv1
+ double u2 =
+ uv2.X()+(isUPeriodic ? ShapeAnalysis::AdjustByPeriod(uv2.X(),uv1.X(),surface->UPeriod()) :0);
+ double v2 =
+ uv2.Y()+(isVPeriodic ? ShapeAnalysis::AdjustByPeriod(uv2.Y(),uv1.Y(),surface->VPeriod()) :0);
+
+ // execute operation
+ gp_XY res = fun( uv1, gp_XY(u2,v2) );
+
+ // move result within period
+ if ( resultInPeriod )
+ {
+ Standard_Real UF,UL,VF,VL;
+ surface->Bounds(UF,UL,VF,VL);
+ if ( isUPeriodic )
+ res.SetX( res.X() + ShapeAnalysis::AdjustToPeriod(res.X(),UF,UL));
+ if ( isVPeriodic )
+ res.SetY( res.Y() + ShapeAnalysis::AdjustToPeriod(res.Y(),VF,VL));
+ }
+
+ return res;
+}
//=======================================================================
//function : GetMiddleUV
//purpose : Return middle UV taking in account surface period
const gp_XY& p1,
const gp_XY& p2)
{
- if ( surface.IsNull() )
- return 0.5 * ( p1 + p2 );
- //checking if surface is periodic
- Standard_Real UF,UL,VF,VL;
- surface->Bounds(UF,UL,VF,VL);
-
- Standard_Real u,v;
- Standard_Boolean isUPeriodic = surface->IsUPeriodic();
- if(isUPeriodic) {
- Standard_Real UPeriod = surface->UPeriod();
- Standard_Real p2x = p2.X()+ShapeAnalysis::AdjustByPeriod(p2.X(),p1.X(),UPeriod);
- Standard_Real pmid = (p1.X()+p2x)/2.;
- u = pmid+ShapeAnalysis::AdjustToPeriod(pmid,UF,UL);
- }
- else {
- u= (p1.X()+p2.X())/2.;
- }
- Standard_Boolean isVPeriodic = surface->IsVPeriodic();
- if(isVPeriodic) {
- Standard_Real VPeriod = surface->VPeriod();
- Standard_Real p2y = p2.Y()+ShapeAnalysis::AdjustByPeriod(p2.Y(),p1.Y(),VPeriod);
- Standard_Real pmid = (p1.Y()+p2y)/2.;
- v = pmid+ShapeAnalysis::AdjustToPeriod(pmid,VF,VL);
- }
- else {
- v = (p1.Y()+p2.Y())/2.;
- }
- return gp_XY( u,v );
+ return applyIn2D( surface, p1, p2, & AverageUV );
}
//=======================================================================
if ( uvOK[0] && uvOK[1] )
{
if ( IsDegenShape( Pos1->GetShapeId() ))
- uv[0].SetCoord( myParIndex, uv[1].Coord( myParIndex ));
+ if ( myParIndex & U_periodic ) uv[0].SetCoord( 1, uv[1].Coord( 1 ));
+ else uv[0].SetCoord( 2, uv[1].Coord( 2 ));
else if ( IsDegenShape( Pos2->GetShapeId() ))
- uv[1].SetCoord( myParIndex, uv[0].Coord( myParIndex ));
+ if ( myParIndex & U_periodic ) uv[1].SetCoord( 1, uv[0].Coord( 1 ));
+ else uv[1].SetCoord( 2, uv[0].Coord( 2 ));
TopLoc_Location loc;
Handle(Geom_Surface) S = BRep_Tool::Surface(F,loc);
CheckNodeU( E, n12, U, BRep_Tool::Tolerance( E ), /*force=*/true);
meshDS->SetNodeOnEdge(n12, edgeID, U);
}
- else
+ else if ( myShapeID > 1 )
{
meshDS->SetNodeInVolume(n12, myShapeID);
}
const TopoDS_Edge& theBaseEdge,
SMESHDS_Mesh* theMesh)
{
- // get vertices of theBaseEdge
- TopoDS_Vertex vfb, vlb, vft; // first and last, bottom and top vertices
- TopoDS_Edge eFrw = TopoDS::Edge( theBaseEdge.Oriented( TopAbs_FORWARD ));
- TopExp::Vertices( eFrw, vfb, vlb );
-
- // find the other edges of theFace and orientation of e1
- TopoDS_Edge e1, e2, eTop;
- bool rev1, CumOri = false;
- TopExp_Explorer exp( theFace, TopAbs_EDGE );
- int nbEdges = 0;
- for ( ; exp.More(); exp.Next() ) {
- if ( ++nbEdges > 4 ) {
- return false; // more than 4 edges in theFace
- }
- TopoDS_Edge e = TopoDS::Edge( exp.Current() );
- if ( theBaseEdge.IsSame( e ))
- continue;
- TopoDS_Vertex vCommon;
- if ( !TopExp::CommonVertex( theBaseEdge, e, vCommon ))
- eTop = e;
- else if ( vCommon.IsSame( vfb )) {
- e1 = e;
- vft = TopExp::LastVertex( e1, CumOri );
- rev1 = vfb.IsSame( vft );
- if ( rev1 )
- vft = TopExp::FirstVertex( e1, CumOri );
- }
- else
- e2 = e;
- }
- if ( nbEdges < 4 ) {
- return false; // less than 4 edges in theFace
- }
- if ( e2.IsNull() && vfb.IsSame( vlb ))
- e2 = e1;
-
- // submeshes corresponding to shapes
- SMESHDS_SubMesh* smFace = theMesh->MeshElements( theFace );
- SMESHDS_SubMesh* smb = theMesh->MeshElements( theBaseEdge );
- SMESHDS_SubMesh* smt = theMesh->MeshElements( eTop );
- SMESHDS_SubMesh* sm1 = theMesh->MeshElements( e1 );
- SMESHDS_SubMesh* sm2 = theMesh->MeshElements( e2 );
- SMESHDS_SubMesh* smVfb = theMesh->MeshElements( vfb );
- SMESHDS_SubMesh* smVlb = theMesh->MeshElements( vlb );
- SMESHDS_SubMesh* smVft = theMesh->MeshElements( vft );
- if (!smFace || !smb || !smt || !sm1 || !sm2 || !smVfb || !smVlb || !smVft ) {
- RETURN_BAD_RESULT( "NULL submesh " <<smFace<<" "<<smb<<" "<<smt<<" "<<
- sm1<<" "<<sm2<<" "<<smVfb<<" "<<smVlb<<" "<<smVft);
- }
- if ( smb->NbNodes() != smt->NbNodes() || sm1->NbNodes() != sm2->NbNodes() ) {
- RETURN_BAD_RESULT(" Diff nb of nodes on opposite edges" );
- }
- if (smVfb->NbNodes() != 1 || smVlb->NbNodes() != 1 || smVft->NbNodes() != 1) {
- RETURN_BAD_RESULT("Empty submesh of vertex");
- }
- // define whether mesh is quadratic
- bool isQuadraticMesh = false;
- SMDS_ElemIteratorPtr eIt = smFace->GetElements();
- if ( !eIt->more() ) {
- RETURN_BAD_RESULT("No elements on the face");
- }
- const SMDS_MeshElement* e = eIt->next();
- isQuadraticMesh = e->IsQuadratic();
-
- if ( sm1->NbNodes() * smb->NbNodes() != smFace->NbNodes() ) {
- // check quadratic case
- if ( isQuadraticMesh ) {
- // what if there are quadrangles and triangles mixed?
-// int n1 = sm1->NbNodes()/2;
-// int n2 = smb->NbNodes()/2;
-// int n3 = sm1->NbNodes() - n1;
-// int n4 = smb->NbNodes() - n2;
-// int nf = sm1->NbNodes()*smb->NbNodes() - n3*n4;
-// if( nf != smFace->NbNodes() ) {
-// MESSAGE( "Wrong nb face nodes: " <<
-// sm1->NbNodes()<<" "<<smb->NbNodes()<<" "<<smFace->NbNodes());
-// return false;
-// }
- }
- else {
- RETURN_BAD_RESULT( "Wrong nb face nodes: " <<
- sm1->NbNodes()<<" "<<smb->NbNodes()<<" "<<smFace->NbNodes());
- }
+ SMESHDS_SubMesh* faceSubMesh = theMesh->MeshElements( theFace );
+ if ( !faceSubMesh || faceSubMesh->NbElements() == 0 )
+ return false;
+
+ // get nodes on theBaseEdge sorted by param on edge and initialize theParam2ColumnMap with them
+
+ map< double, const SMDS_MeshNode*> sortedBaseNodes;
+ if ( !SMESH_Algo::GetSortedNodesOnEdge( theMesh, theBaseEdge,/*noMedium=*/true, sortedBaseNodes)
+ || sortedBaseNodes.size() < 2 )
+ return false;
+
+ int nbRows = faceSubMesh->NbElements() / ( sortedBaseNodes.size()-1 ) + 1;
+ map< double, const SMDS_MeshNode*>::iterator u_n = sortedBaseNodes.begin();
+ double f = u_n->first, range = sortedBaseNodes.rbegin()->first - f;
+ for ( ; u_n != sortedBaseNodes.end(); u_n++ )
+ {
+ double par = ( u_n->first - f ) / range;
+ vector<const SMDS_MeshNode*>& nCol = theParam2ColumnMap[ par ];
+ nCol.resize( nbRows );
+ nCol[0] = u_n->second;
}
- // IJ size
- int vsize = sm1->NbNodes() + 2;
- int hsize = smb->NbNodes() + 2;
- if(isQuadraticMesh) {
- vsize = vsize - sm1->NbNodes()/2 -1;
- hsize = hsize - smb->NbNodes()/2 -1;
- }
-
- // load nodes from theBaseEdge
-
- std::set<const SMDS_MeshNode*> loadedNodes;
- const SMDS_MeshNode* nullNode = 0;
-
- std::vector<const SMDS_MeshNode*> & nVecf = theParam2ColumnMap[ 0.];
- nVecf.resize( vsize, nullNode );
- loadedNodes.insert( nVecf[ 0 ] = smVfb->GetNodes()->next() );
-
- std::vector<const SMDS_MeshNode*> & nVecl = theParam2ColumnMap[ 1.];
- nVecl.resize( vsize, nullNode );
- loadedNodes.insert( nVecl[ 0 ] = smVlb->GetNodes()->next() );
-
- double f, l;
- BRep_Tool::Range( eFrw, f, l );
- double range = l - f;
- SMDS_NodeIteratorPtr nIt = smb->GetNodes();
- const SMDS_MeshNode* node;
- while ( nIt->more() ) {
- node = nIt->next();
- if(IsMedium(node, SMDSAbs_Edge))
- continue;
- const SMDS_EdgePosition* pos =
- dynamic_cast<const SMDS_EdgePosition*>( node->GetPosition().get() );
- if ( !pos ) {
- return false;
- }
- double u = ( pos->GetUParameter() - f ) / range;
- std::vector<const SMDS_MeshNode*> & nVec = theParam2ColumnMap[ u ];
- nVec.resize( vsize, nullNode );
- loadedNodes.insert( nVec[ 0 ] = node );
- }
- if ( theParam2ColumnMap.size() != hsize ) {
- RETURN_BAD_RESULT( "Wrong node positions on theBaseEdge" );
- }
-
- // load nodes from e1
-
- std::map< double, const SMDS_MeshNode*> sortedNodes; // sort by param on edge
- nIt = sm1->GetNodes();
- while ( nIt->more() ) {
- node = nIt->next();
- if(IsMedium(node))
- continue;
- const SMDS_EdgePosition* pos =
- dynamic_cast<const SMDS_EdgePosition*>( node->GetPosition().get() );
- if ( !pos ) {
- return false;
- }
- sortedNodes.insert( std::make_pair( pos->GetUParameter(), node ));
- }
- loadedNodes.insert( nVecf[ vsize - 1 ] = smVft->GetNodes()->next() );
- std::map< double, const SMDS_MeshNode*>::iterator u_n = sortedNodes.begin();
- int row = rev1 ? vsize - 1 : 0;
- int dRow = rev1 ? -1 : +1;
- for ( ; u_n != sortedNodes.end(); u_n++ ) {
- row += dRow;
- loadedNodes.insert( nVecf[ row ] = u_n->second );
- }
-
- // try to load the rest nodes
-
- // get all faces from theFace
- TIDSortedElemSet allFaces, foundFaces;
- eIt = smFace->GetElements();
- while ( eIt->more() ) {
- const SMDS_MeshElement* e = eIt->next();
- if ( e->GetType() == SMDSAbs_Face )
- allFaces.insert( e );
- }
- // Starting from 2 neighbour nodes on theBaseEdge, look for a face
- // the nodes belong to, and between the nodes of the found face,
- // look for a not loaded node considering this node to be the next
- // in a column of the starting second node. Repeat, starting
- // from nodes next to the previous starting nodes in their columns,
- // and so on while a face can be found. Then go the the next pair
- // of nodes on theBaseEdge.
- TParam2ColumnMap::iterator par_nVec_1 = theParam2ColumnMap.begin();
- TParam2ColumnMap::iterator par_nVec_2 = par_nVec_1;
- // loop on columns
- int col = 0;
- for ( par_nVec_2++; par_nVec_2 != theParam2ColumnMap.end(); par_nVec_1++, par_nVec_2++ ) {
- col++;
- row = 0;
- const SMDS_MeshNode* n1 = par_nVec_1->second[ row ];
- const SMDS_MeshNode* n2 = par_nVec_2->second[ row ];
- const SMDS_MeshElement* face = 0;
- bool lastColOnClosedFace = ( nVecf[ row ] == n2 );
- do {
- // look for a face by 2 nodes
- face = SMESH_MeshEditor::FindFaceInSet( n1, n2, allFaces, foundFaces );
- if ( face ) {
- int nbFaceNodes = face->NbNodes();
- if ( face->IsQuadratic() )
- nbFaceNodes /= 2;
- if ( nbFaceNodes>4 ) {
- RETURN_BAD_RESULT(" Too many nodes in a face: " << nbFaceNodes );
- }
- // look for a not loaded node of the <face>
- bool found = false;
- const SMDS_MeshNode* n3 = 0; // a node defferent from n1 and n2
- for ( int i = 0; i < nbFaceNodes && !found; ++i ) {
- node = face->GetNode( i );
- found = loadedNodes.insert( node ).second;
- if ( !found && node != n1 && node != n2 )
- n3 = node;
- }
- if ( lastColOnClosedFace && row + 1 < vsize ) {
- node = nVecf[ row + 1 ];
- found = ( face->GetNodeIndex( node ) >= 0 );
- }
- if ( found ) {
- if ( ++row > vsize - 1 ) {
- RETURN_BAD_RESULT( "Too many nodes in column "<< col <<": "<< row+1);
- }
- par_nVec_2->second[ row ] = node;
- foundFaces.insert( face );
- n2 = node;
- if ( nbFaceNodes==4 ) {
- n1 = par_nVec_1->second[ row ];
- }
- }
- else if ( nbFaceNodes==3 && n3 == par_nVec_1->second[ row + 1 ] ) {
- n1 = n3;
- }
- else {
- RETURN_BAD_RESULT( "Not quad mesh, column "<< col );
- }
+
+ // fill theParam2ColumnMap column by column by passing from nodes on
+ // theBaseEdge up via mesh faces on theFace
+
+ TParam2ColumnMap::iterator par_nVec_2 = theParam2ColumnMap.begin();
+ TParam2ColumnMap::iterator par_nVec_1 = par_nVec_2++;
+ TIDSortedElemSet emptySet, avoidSet;
+ for ( ; par_nVec_2 != theParam2ColumnMap.end(); ++par_nVec_1, ++par_nVec_2 )
+ {
+ vector<const SMDS_MeshNode*>& nCol1 = par_nVec_1->second;
+ vector<const SMDS_MeshNode*>& nCol2 = par_nVec_2->second;
+
+ int i1, i2, iRow = 0;
+ const SMDS_MeshNode *n1 = nCol1[0], *n2 = nCol2[0];
+ // find face sharing node n1 and n2 and belonging to faceSubMesh
+ while ( const SMDS_MeshElement* face =
+ SMESH_MeshEditor::FindFaceInSet( n1, n2, emptySet, avoidSet, &i1, &i2))
+ {
+ if ( faceSubMesh->Contains( face ))
+ {
+ int nbNodes = face->IsQuadratic() ? face->NbNodes()/2 : face->NbNodes();
+ if ( nbNodes != 4 )
+ return false;
+ n1 = face->GetNode( (i2+2) % 4 ); // opposite corner of quadrangle face
+ n2 = face->GetNode( (i1+2) % 4 );
+ if ( ++iRow >= nbRows )
+ return false;
+ nCol1[ iRow ] = n1;
+ nCol2[ iRow ] = n2;
+ avoidSet.clear();
}
+ avoidSet.insert( face );
}
- while ( face && n1 && n2 );
-
- if ( row < vsize - 1 ) {
- MESSAGE( "Too few nodes in column "<< col <<": "<< row+1);
- MESSAGE( "Base node 1: "<< par_nVec_1->second[0]);
- MESSAGE( "Base node 2: "<< par_nVec_2->second[0]);
- if ( n1 ) { MESSAGE( "Current node 1: "<< n1); }
- else { MESSAGE( "Current node 1: NULL"); }
- if ( n2 ) { MESSAGE( "Current node 2: "<< n2); }
- else { MESSAGE( "Current node 2: NULL"); }
- MESSAGE( "first base node: "<< theParam2ColumnMap.begin()->second[0]);
- MESSAGE( "last base node: "<< theParam2ColumnMap.rbegin()->second[0]);
- return false;
- }
- } // loop on columns
-
+ if ( iRow + 1 < nbRows ) // compact if necessary
+ nCol1.resize( iRow + 1 ), nCol2.resize( iRow + 1 );
+ }
return true;
}
return ancestors.Extent();
}
+//=======================================================================
+//function : GetSubShapeOri
+//purpose : Return orientation of sub-shape in the main shape
+//=======================================================================
+
+TopAbs_Orientation SMESH_MesherHelper::GetSubShapeOri(const TopoDS_Shape& shape,
+ const TopoDS_Shape& subShape)
+{
+ TopAbs_Orientation ori = TopAbs_Orientation(-1);
+ if ( !shape.IsNull() && !subShape.IsNull() )
+ {
+ TopExp_Explorer e( shape, subShape.ShapeType() );
+ if ( shape.Orientation() >= TopAbs_INTERNAL ) // TopAbs_INTERNAL or TopAbs_EXTERNAL
+ e.Init( shape.Oriented(TopAbs_FORWARD), subShape.ShapeType() );
+ for ( ; e.More(); e.Next())
+ if ( subShape.IsSame( e.Current() ))
+ break;
+ if ( e.More() )
+ ori = e.Current().Orientation();
+ }
+ return ori;
+}
+
+//=======================================================================
+//function : IsSubShape
+//purpose :
+//=======================================================================
+
+bool SMESH_MesherHelper::IsSubShape( const TopoDS_Shape& shape,
+ const TopoDS_Shape& mainShape )
+{
+ if ( !shape.IsNull() && !mainShape.IsNull() )
+ {
+ for ( TopExp_Explorer exp( mainShape, shape.ShapeType());
+ exp.More();
+ exp.Next() )
+ if ( shape.IsSame( exp.Current() ))
+ return true;
+ }
+ SCRUTE((shape.IsNull()));
+ SCRUTE((mainShape.IsNull()));
+ return false;
+}
+
+//=======================================================================
+//function : IsSubShape
+//purpose :
+//=======================================================================
+
+bool SMESH_MesherHelper::IsSubShape( const TopoDS_Shape& shape, SMESH_Mesh* aMesh )
+{
+ if ( shape.IsNull() || !aMesh )
+ return false;
+ return
+ aMesh->GetMeshDS()->ShapeToIndex( shape ) ||
+ // PAL16202
+ shape.ShapeType() == TopAbs_COMPOUND && aMesh->GetMeshDS()->IsGroupOfSubShapes( shape );
+}
+
//=======================================================================
//function : IsQuadraticMesh
//purpose : Check mesh without geometry for: if all elements on this shape are quadratic,
double SMESH_MesherHelper::GetOtherParam(const double param) const
{
- return fabs(param-myPar1) < fabs(param-myPar2) ? myPar2 : myPar1;
+ int i = myParIndex & U_periodic ? 0 : 1;
+ return fabs(param-myPar1[i]) < fabs(param-myPar2[i]) ? myPar2[i] : myPar1[i];
}
//=======================================================================
mutable vector< const QLink* > _sides;
mutable bool _sideIsAdded[4]; // added in chain of links
gp_Vec _normal;
+#ifdef _DEBUG_
+ mutable const SMDS_MeshElement* _face;
+#endif
- QFace( const vector< const QLink*>& links );
+ QFace( const vector< const QLink*>& links, const SMDS_MeshElement* face=0 );
void SetVolume(const SMDS_MeshElement* v) const { _volumes[ _volumes[0] ? 1 : 0 ] = v; }
for (int i=0; i<_sides.size(); ++i ) if ( _sides[i] == side ) return i;
return -1;
}
- bool GetLinkChain( int iSide, TChain& chain, SMDS_TypeOfPosition pos, int& error) const;
+ bool GetLinkChain( int iSide, TChain& chain, SMDS_TypeOfPosition pos, int& err) const;
- bool GetLinkChain( TChainLink& link, TChain& chain, SMDS_TypeOfPosition pos, int& error) const
+ bool GetLinkChain( TChainLink& link, TChain& chain, SMDS_TypeOfPosition pos, int& err) const
{
int i = LinkIndex( link._qlink );
if ( i < 0 ) return true;
_sideIsAdded[i] = true;
link.SetFace( this );
// continue from opposite link
- return GetLinkChain( (i+2)%_sides.size(), chain, pos, error );
+ return GetLinkChain( (i+2)%_sides.size(), chain, pos, err );
}
bool IsBoundary() const { return !_volumes[1]; }
const TChainLink& avoidLink,
TLinkInSet * notBoundaryLink = 0,
const SMDS_MeshNode* nodeToContain = 0,
- bool * isAdjacentUsed = 0) const;
+ bool * isAdjacentUsed = 0,
+ int nbRecursionsLeft = -1) const;
TLinkInSet GetLinkByNode( const TLinkSet& links,
const TChainLink& avoidLink,
*/
//================================================================================
- QFace::QFace( const vector< const QLink*>& links )
+ QFace::QFace( const vector< const QLink*>& links, const SMDS_MeshElement* face )
{
_volumes[0] = _volumes[1] = 0;
_sides = links;
_normal /= sqrt( normSqSize );
else
_normal.SetCoord(1e-33,0,0);
+
+#ifdef _DEBUG_
+ _face = face;
+#endif
}
//================================================================================
/*!
if ( _sides.size() != 4 ) { // triangle - visit all my continous faces
MSGBEG( *this );
- for ( int i = 0; i < _sides.size(); ++i ) {
- if ( !_sideIsAdded[i] && _sides[i] ) {
- _sideIsAdded[i]=true;
- TChain::iterator chLink = chain.insert( chain.begin(), TChainLink(_sides[i]));
- chLink->SetFace( this );
- if ( _sides[i]->MediumPos() >= pos )
- if ( const QFace* f = _sides[i]->GetContinuesFace( this ))
- f->GetLinkChain( *chLink, chain, pos, error );
+ list< const QFace* > faces( 1, this );
+ for (list< const QFace* >::iterator fIt = faces.begin(); fIt != faces.end(); ++fIt ) {
+ const QFace* face = *fIt;
+ for ( int i = 0; i < face->_sides.size(); ++i ) {
+ if ( !face->_sideIsAdded[i] && face->_sides[i] ) {
+ face->_sideIsAdded[i] = true;
+ TChain::iterator chLink = chain.insert( chain.begin(), TChainLink(face->_sides[i]));
+ chLink->SetFace( face );
+ if ( face->_sides[i]->MediumPos() >= pos )
+ if ( const QFace* contFace = face->_sides[i]->GetContinuesFace( face ))
+ faces.push_back( contFace );
+ }
}
}
if ( error < ERR_TRI )
chLink->SetFace( this );
MSGBEG( *this );
- // propagate from rectangle to neighbour faces
+ // propagate from quadrangle to neighbour faces
if ( link->MediumPos() >= pos ) {
int nbLinkFaces = link->_faces.size();
if ( nbLinkFaces == 4 || nbLinkFaces < 4 && link->OnBoundary()) {
* \param nodeToContain - node the returned link must contain; if provided, search
* also performed on adjacent faces
* \param isAdjacentUsed - returns true if link is found in adjacent faces
+ * \param nbRecursionsLeft - to limit recursion
*/
//================================================================================
const TChainLink& avoidLink,
TLinkInSet * notBoundaryLink,
const SMDS_MeshNode* nodeToContain,
- bool * isAdjacentUsed) const
+ bool * isAdjacentUsed,
+ int nbRecursionsLeft) const
{
TLinkInSet linksEnd = links.end(), boundaryLink = linksEnd;
continue;
TLinkInSet link = links.find( _sides[iL] );
if ( link == linksEnd ) continue;
+ if ( (*link)->MediumPos() > SMDS_TOP_FACE )
+ continue; // We work on faces here, don't go into a volume
// check link
if ( link->IsBoundary() ) {
if ( boundaryLink != linksEnd ) break;
}
- if ( boundaryLink == linksEnd && nodeToContain ) // cellect adjacent faces
+ if ( boundaryLink == linksEnd && nodeToContain ) // collect adjacent faces
if ( const QFace* adj = link->NextFace( this ))
if ( adj->Contains( nodeToContain ))
adjacentFaces.push_back( make_pair( adj, link ));
}
if ( isAdjacentUsed ) *isAdjacentUsed = false;
- if ( boundaryLink == linksEnd && nodeToContain ) // check adjacent faces
+ if ( boundaryLink == linksEnd && nodeToContain && nbRecursionsLeft) // check adjacent faces
{
+ if ( nbRecursionsLeft < 0 )
+ nbRecursionsLeft = nodeToContain->NbInverseElements();
TFaceLinkList::iterator adj = adjacentFaces.begin();
for ( ; boundaryLink == linksEnd && adj != adjacentFaces.end(); ++adj )
- boundaryLink = adj->first->GetBoundaryLink( links, *(adj->second),
- 0, nodeToContain, isAdjacentUsed);
+ boundaryLink = adj->first->GetBoundaryLink( links, *(adj->second), 0, nodeToContain,
+ isAdjacentUsed, nbRecursionsLeft-1);
if ( isAdjacentUsed ) *isAdjacentUsed = true;
}
return boundaryLink;
int iL1 = (iL + 1) % 3, iL2 = (iL + 2) % 3; // indices of the two other links of triangle
TLinkInSet link1 = theLinks.find( _sides[iL1] );
TLinkInSet link2 = theLinks.find( _sides[iL2] );
+ if ( link1 == theLinks.end() || link2 == theLinks.end() )
+ return thePrevLen;
const QFace* f1 = link1->NextFace( this ); // adjacent faces
const QFace* f2 = link2->NextFace( this );
hasRectFaces = hasRectFaces ||
( volTool.GetVolumeType() == SMDS_VolumeTool::QUAD_HEXA ||
volTool.GetVolumeType() == SMDS_VolumeTool::QUAD_PENTA );
+#ifdef _DEBUG_
+ if ( nbN == 6 )
+ pFace->_face = GetMeshDS()->FindFace(faceNodes[0],faceNodes[2],faceNodes[4]);
+ else
+ pFace->_face = GetMeshDS()->FindFace(faceNodes[0],faceNodes[2],
+ faceNodes[4],faceNodes[6] );
+#endif
}
}
set< QLink >::iterator pLink = links.begin();
// not treat boundary of volumic submesh
int isInside = ( elemType == SMDSAbs_Volume && volumeOnly ) ? 1 : 0;
for ( ; isInside < 2; ++isInside ) {
- MSG( "--------------- LOOP " << isInside << " ------------------");
+ MSG( "--------------- LOOP (inside=" << isInside << ") ------------------");
SMDS_TypeOfPosition pos = isInside ? SMDS_TOP_3DSPACE : SMDS_TOP_FACE;
for ( pFace = faces.begin(); pFace != faces.end(); ++pFace ) {
if ( !pFace->GetLinkChain( dir+2, rawChain, pos, error ) && error ==ERR_UNKNOWN ) continue;
vector< TChain > chains;
- if ( error == ERR_OK ) { // chains contains continues rectangles
+ if ( error == ERR_OK ) { // chain contains continues rectangles
chains.resize(1);
chains[0].splice( chains[0].begin(), rawChain );
}
- else if ( error == ERR_TRI ) { // chains contains continues triangles
+ else if ( error == ERR_TRI ) { // chain contains continues triangles
TSplitTriaResult res = splitTrianglesIntoChains( rawChain, chains, pos );
- if ( res != _OK ) { // not rectangles split into triangles
+ if ( res != _OK ) { // not quadrangles split into triangles
fixTriaNearBoundary( rawChain, *this );
break;
}
}
- else if ( error == ERR_PRISM ) { // side faces of prisms
+ else if ( error == ERR_PRISM ) { // quadrangle side faces of prisms
fixPrism( rawChain );
break;
}
// compute node displacement of end links in parametric space of face
const SMDS_MeshNode* nodeOnFace = (*(++chain.begin()))->_mediumNode;
TopoDS_Shape f = GetSubShapeByNode( nodeOnFace, GetMeshDS() );
- if ( !f.IsNull() && f.ShapeType() == TopAbs_FACE ) {
+ if ( !f.IsNull() && f.ShapeType() == TopAbs_FACE )
+ {
face = TopoDS::Face( f );
- for ( int is1 = 0; is1 < 2; ++is1 ) { // move0 or move1
+ Handle(Geom_Surface) surf = BRep_Tool::Surface(face,loc);
+ for ( int is1 = 0; is1 < 2; ++is1 ) // move0 or move1
+ {
TChainLink& link = is1 ? chain.back() : chain.front();
+ gp_XY uvm = GetNodeUV( face, link->_mediumNode, nodeOnFace, &checkUV);
gp_XY uv1 = GetNodeUV( face, link->node1(), nodeOnFace, &checkUV);
gp_XY uv2 = GetNodeUV( face, link->node2(), nodeOnFace, &checkUV);
- gp_XY uvm = GetNodeUV( face, link->_mediumNode, nodeOnFace, &checkUV);
- gp_XY uvMove = uvm - GetMiddleUV( BRep_Tool::Surface(face,loc), uv1, uv2);
- if ( is1 ) move1.SetCoord( uvMove.X(), uvMove.Y(), 0 );
- else move0.SetCoord( uvMove.X(), uvMove.Y(), 0 );
+ gp_XY uv12 = GetMiddleUV( surf, uv1, uv2);
+ // uvMove = uvm - uv12
+ gp_XY uvMove = applyIn2D(surf, uvm, uv12, gp_XY_Subtracted, /*inPeriod=*/false);
+ ( is1 ? move1 : move0 ).SetCoord( uvMove.X(), uvMove.Y(), 0 );
}
if ( move0.SquareMagnitude() < straightTol2 &&
move1.SquareMagnitude() < straightTol2 ) {
}
else {
// compute 3D displacement by 2D one
+ Handle(Geom_Surface) s = BRep_Tool::Surface(face,loc);
gp_XY oldUV = GetNodeUV( face, (*link1)->_mediumNode, 0, &checkUV);
- gp_XY newUV = oldUV + gp_XY( move.X(), move.Y() );
- gp_Pnt newPnt = BRep_Tool::Surface(face,loc)->Value( newUV.X(), newUV.Y());
+ gp_XY newUV = applyIn2D( s, oldUV, gp_XY( move.X(),move.Y()), gp_XY_Added);
+ gp_Pnt newPnt = s->Value( newUV.X(), newUV.Y());
move = gp_Vec( XYZ((*link1)->_mediumNode), newPnt.Transformed(loc) );
#ifdef _DEBUG_
if ( (XYZ((*link1)->node1()) - XYZ((*link1)->node2())).SquareModulus() <
}
}
}
+
+//=======================================================================
+/*!
+ * \brief Iterator on ancestors of the given type
+ */
+//=======================================================================
+
+struct TAncestorsIterator : public SMDS_Iterator<const TopoDS_Shape*>
+{
+ TopTools_ListIteratorOfListOfShape _ancIter;
+ TopAbs_ShapeEnum _type;
+ TAncestorsIterator( const TopTools_ListOfShape& ancestors, TopAbs_ShapeEnum type)
+ : _ancIter( ancestors ), _type( type )
+ {
+ if ( _ancIter.More() && _ancIter.Value().ShapeType() != _type ) next();
+ }
+ virtual bool more()
+ {
+ return _ancIter.More();
+ }
+ virtual const TopoDS_Shape* next()
+ {
+ const TopoDS_Shape* s = _ancIter.More() ? & _ancIter.Value() : 0;
+ if ( _ancIter.More() )
+ for ( _ancIter.Next(); _ancIter.More(); _ancIter.Next())
+ if ( _ancIter.Value().ShapeType() == _type )
+ break;
+ return s;
+ }
+};
+
+//=======================================================================
+/*!
+ * \brief Return iterator on ancestors of the given type
+ */
+//=======================================================================
+
+PShapeIteratorPtr SMESH_MesherHelper::GetAncestors(const TopoDS_Shape& shape,
+ const SMESH_Mesh& mesh,
+ TopAbs_ShapeEnum ancestorType)
+{
+ return PShapeIteratorPtr( new TAncestorsIterator( mesh.GetAncestors(shape), ancestorType));
+}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: SMESH_MesherHelper.hxx
// Created: 15.02.06 14:48:09
// Author: Sergey KUUL
#include <map>
+class GeomAPI_ProjectPointOnSurf;
+
typedef std::map<SMESH_TLink, const SMDS_MeshNode*> TLinkNodeMap;
typedef std::map<SMESH_TLink, const SMDS_MeshNode*>::iterator ItTLinkNode;
+typedef SMDS_Iterator<const TopoDS_Shape*> PShapeIterator;
+typedef boost::shared_ptr< PShapeIterator > PShapeIteratorPtr;
+
+typedef std::vector<const SMDS_MeshNode* > TNodeColumn;
+typedef std::map< double, TNodeColumn > TParam2ColumnMap;
+
+typedef gp_XY (*xyFunPtr)(const gp_XY& uv1, const gp_XY& uv2);
+
+//=======================================================================
/*!
* \brief It helps meshers to add elements
*
* It defines degree of elements to create when IsQuadraticSubMesh()
* is called.
*/
-
-typedef std::vector<const SMDS_MeshNode* > TNodeColumn;
-typedef std::map< double, TNodeColumn > TParam2ColumnMap;
+//=======================================================================
class SMESH_EXPORT SMESH_MesherHelper
{
static int NbAncestors(const TopoDS_Shape& shape,
const SMESH_Mesh& mesh,
TopAbs_ShapeEnum ancestorType=TopAbs_SHAPE);
+ /*!
+ * \brief Return iterator on ancestors of the given type
+ */
+ static PShapeIteratorPtr GetAncestors(const TopoDS_Shape& shape,
+ const SMESH_Mesh& mesh,
+ TopAbs_ShapeEnum ancestorType);
+
+ /*!
+ * \brief Return orientation of sub-shape in the main shape
+ */
+ static TopAbs_Orientation GetSubShapeOri(const TopoDS_Shape& shape,
+ const TopoDS_Shape& subShape);
+
+ static bool IsSubShape( const TopoDS_Shape& shape, const TopoDS_Shape& mainShape );
+
+ static bool IsSubShape( const TopoDS_Shape& shape, SMESH_Mesh* aMesh );
+
public:
// ---------- PUBLIC INSTANCE METHODS ----------
/*!
* \brief Return the shape set by IsQuadraticSubMesh() or SetSubShape()
*/
- TopoDS_Shape GetSubShape() const { return myShape; }
+ const TopoDS_Shape& GetSubShape() const { return myShape; }
/*!
* Creates a node
static gp_XY GetMiddleUV(const Handle(Geom_Surface)& surface,
const gp_XY& uv1,
const gp_XY& uv2);
+ /*!
+ * \brief Define a pointer to wrapper over a function of gp_XY class,
+ * suitable to pass as xyFunPtr to applyIn2D().
+ * For exaple gp_XY_FunPtr(Added) defines pointer gp_XY_Added to function
+ * calling gp_XY::Added(gp_XY), which is to be used like following
+ * applyIn2D(surf, uv1, uv2, gp_XY_Added)
+ */
+#define gp_XY_FunPtr(meth) \
+ static gp_XY __gpXY_##meth (const gp_XY& uv1, const gp_XY& uv2) { return uv1.meth( uv2 ); } \
+ static xyFunPtr gp_XY_##meth = & __gpXY_##meth
+
+ /*!
+ * \brief Perform given operation on two 2d points in parameric space of given surface.
+ * It takes into account period of the surface. Use gp_XY_FunPtr macro
+ * to easily define pointer to function of gp_XY class.
+ */
+ static gp_XY applyIn2D(const Handle(Geom_Surface)& surface,
+ const gp_XY& uv1,
+ const gp_XY& uv2,
+ xyFunPtr fun,
+ const bool resultInPeriod=true);
+
/*!
* \brief Check if inFaceNode argument is necessary for call GetNodeUV(F,..)
* \retval bool - return true if the face is periodic
*/
bool GetNodeUVneedInFaceNode(const TopoDS_Face& F = TopoDS_Face()) const;
+ /*!
+ * \brief Return projector intitialized by given face without location, which is returned
+ */
+ GeomAPI_ProjectPointOnSurf& GetProjector(const TopoDS_Face& F,
+ TopLoc_Location& loc,
+ double tol=0 ) const;
+
/*!
* \brief Check if shape is a degenerated edge or it's vertex
* \param subShape - edge or vertex index in SMESHDS
enum MType{ LINEAR, QUADRATIC, COMP };
MType IsQuadraticMesh();
+ virtual ~SMESH_MesherHelper();
+
protected:
/*!
std::set< int > myDegenShapeIds;
std::set< int > mySeamShapeIds;
- double myPar1, myPar2; // bounds of a closed periodic surface
- int myParIndex; // bounds' index (1-U, 2-V)
+ double myPar1[2], myPar2[2]; // U and V bounds of a closed periodic surface
+ int myParIndex; // bounds' index (1-U, 2-V, 3-both)
+
+ typedef std::map< int, GeomAPI_ProjectPointOnSurf* > TID2Projector;
+ TID2Projector myFace2Projector;
TopoDS_Shape myShape;
SMESH_Mesh* myMesh;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_Octree : global Octree implementation
-//
// File : SMESH_Octree.cxx
// Created : Tue Jan 16 16:00:00 2007
// Author : Nicolas Geimer & Aurélien Motteux(OCC)
// Module : SMESH
-
+//
#include "SMESH_Octree.hxx"
//===========================================================================
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_Octree : global Octree implementation
-//
// File : SMESH_Octree.hxx
// Created : Tue Jan 16 16:00:00 2007
// Author : Nicolas Geimer & Aurélien Motteux (OCC)
// Module : SMESH
-
+//
#ifndef _SMESH_OCTREE_HXX_
#define _SMESH_OCTREE_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_OctreeNode : Octree with Nodes set
// inherites global class SMESH_Octree
-//
// File : SMESH_OctreeNode.cxx
// Created : Tue Jan 16 16:00:00 2007
// Author : Nicolas Geimer & Aurélien Motteux (OCC)
// Module : SMESH
-
+//
#include "SMESH_OctreeNode.hxx"
#include "SMDS_MeshNode.hxx"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_OctreeNode : Octree with Nodes set
// inherites global class SMESH_Octree
-//
// File : SMESH_OctreeNode.hxx
// Created : Tue Jan 16 16:00:00 2007
// Author : Nicolas Geimer & Aurélien Motteux (OCC)
// Module : SMESH
-
+//
#ifndef _SMESH_OCTREENODE_HXX_
#define _SMESH_OCTREENODE_HXX_
public:
// Constructor
- SMESH_OctreeNode (const std::set<const SMDS_MeshNode*>& theNodes, const int maxLevel = -1,
+ SMESH_OctreeNode (const std::set<const SMDS_MeshNode*>& theNodes, const int maxLevel = 8,
const int maxNbNodes = 5, const double minBoxSize = 0.);
//=============================
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_Pattern.hxx
// Created : Mon Aug 2 10:30:00 2004
// Author : Edward AGAPOV (eap)
point->myXYZ.Z());
nodesVector [ pIndex ] = node;
- if ( true /*subMeshDS*/ ) {
+ if ( !S.IsNull() /*subMeshDS*/ ) {
// !!!!! do not merge new nodes with ones existing on submeshes (see method comment)
switch ( S.ShapeType() ) {
case TopAbs_VERTEX: {
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_Pattern.hxx
// Created : Mon Aug 2 10:30:00 2004
// Author : Edward AGAPOV (eap)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_SMESH.hxx
// Author : Alexander A. BORODIN
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: SMESH_SequenceOfElemPtr.hxx
// Created: 26.09.05 17:41:10
// Author: Sergey KUUL
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: SMESH_SequenceOfNode.hxx
// Created: 11.11.05 10:00:04
// Author: Sergey KUUL
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_subMesh.cxx
// Author : Paul RASCLE, EDF
#include "utilities.h"
#include "OpUtil.hxx"
+#include "Basics_Utils.hxx"
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
algo->InitComputeError();
MemoryReserve aMemoryReserve;
SMDS_Mesh::CheckMemory();
+ Kernel_Utils::Localizer loc;
if ( !_father->HasShapeToMesh() ) // no shape
{
SMESH_MesherHelper helper( *_father );
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_subMesh.hxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_subMeshEventListener.hxx
// Created : Mon Nov 13 10:45:49 2006
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# GEOM GEOMClient : tool to transfer BREP files from GEOM server to GEOM client
# File : Makefile.in
# Author : Pavel TELKOV (OCC)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File :
// Author :
// Module :
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHClient : tool to update client mesh structure by mesh from server
// File : SMESH_Client.cxx
// Author : Pavel TELKOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHClient : tool to update client mesh structure by mesh from server
// File : SMESH_Client.hxx
// Author : Pavel TELKOV
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH SMESHDS : management of mesh data and SMESH document
# File : Makefile.in
# Author : Patrick GOLDBRONN (CEA)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : management of mesh data and SMESH document
// File : SMESH_Command.cxx
// Author : Yves FRICAUD, OCC
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : management of mesh data and SMESH document
// File : SMESHDS_Command.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : management of mesh data and SMESH document
// File : SMESHDS_CommandType.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: SMESHDS_DataMapOfShape.hxx
// Created: 20.09.05 09:51:12
// Author: Alexander BORODIN
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : management of mesh data and SMESH document
// File : SMESHDS_Document.cxx
// Author : Yves FRICAUD, OCC
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : management of mesh data and SMESH document
// File : SMESHDS_Document.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : idl implementation based on 'SMESH' unit's classes
// File : SMESHDS_Group.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : management of mesh data and SMESH document
// File : SMESHDS_Group.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : idl implementation based on 'SMESH' unit's classes
// File : SMESHDS_Group.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : management of mesh data and SMESH document
// File : SMESHDS_Group.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : idl implementation based on 'SMESH' unit's classes
// File : SMESHDS_GroupOnGeom.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : management of mesh data and SMESH document
// File : SMESHDS_GroupOnGeom.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : management of mesh data and SMESH document
// File : SMESHDS_Hypothesis.cxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : management of mesh data and SMESH document
// File : SMESHDS_Hypothesis.hxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : management of mesh data and SMESH document
// File : SMESH_Mesh.cxx
// Author : Yves FRICAUD, OCC
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : management of mesh data and SMESH document
// File : SMESHDS_Mesh.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : management of mesh data and SMESH document
// File : SMESH_Script.cxx
// Author : Yves FRICAUD, OCC
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : management of mesh data and SMESH document
// File : SMESHDS_Script.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : management of mesh data and SMESH document
// File : SMESH_SubMesh.cxx
// Author : Yves FRICAUD, OCC
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHDS : management of mesh data and SMESH document
// File : SMESHDS_SubMesh.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_SMESHDS.hxx
// Author : Alexander A. BORODIN
// Module : SMESH
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH SMESHFiltersSelection : filter selector for viewer
# File : Makefile.in
# Author : Patrick GOLDBRONN (CEA)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_LogicalFilter.cxx
// Module : SMESH
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_LogicalFilter.hxx
// Module : SMESH
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_NumberFilter.cxx
// Module : SMESH
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_NumberFilter.hxx
// Module : SMESH
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_Type.h
// Created : Mon Jun 03 15:14:15 2002
// Author : Nicolas REJNERI
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "SMESH_TypeFilter.hxx"
#include <SUIT_Session.h>
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_TypeFilter.hxx
// Module : SMESH
//
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH SMESHGUI : GUI for SMESH component
# File : Makefile.am
# Author : Alexander BORODIN, Open CASCADE S.A.S.
SMESHGUI_RevolutionDlg.h \
SMESHGUI_RotationDlg.h \
SMESHGUI_TranslationDlg.h \
+ SMESHGUI_ScaleDlg.h \
SMESHGUI_SymmetryDlg.h \
SMESHGUI_SewingDlg.h \
SMESHGUI_EditMeshDlg.h \
SMESHGUI_RevolutionDlg.cxx \
SMESHGUI_RotationDlg.cxx \
SMESHGUI_TranslationDlg.cxx \
+ SMESHGUI_ScaleDlg.cxx \
SMESHGUI_SymmetryDlg.cxx \
SMESHGUI_SewingDlg.cxx \
SMESHGUI_EditMeshDlg.cxx \
SMESHGUI_FileInfoDlg.cxx \
SMESHGUI_MeshInfosBox.cxx \
SMESHGUI_Make2DFrom3DOp.cxx \
+ SMESHGUI_FindElemByPointDlg.cxx \
SMESHGUI_MeshOrderDlg.cxx \
SMESHGUI_MeshOrderOp.cxx \
SMESHGUI_FileValidator.cxx
SMESHGUI_RevolutionDlg_moc.cxx \
SMESHGUI_RotationDlg_moc.cxx \
SMESHGUI_TranslationDlg_moc.cxx \
+ SMESHGUI_ScaleDlg_moc.cxx \
SMESHGUI_SymmetryDlg_moc.cxx \
SMESHGUI_SewingDlg_moc.cxx \
SMESHGUI_EditMeshDlg_moc.cxx \
SMESHGUI_FileInfoDlg_moc.cxx \
SMESHGUI_MeshInfosBox_moc.cxx \
SMESHGUI_Make2DFrom3DOp_moc.cxx \
- SMESHGUI_FindElemByPointDlg.cxx \
SMESHGUI_FindElemByPointDlg_moc.cxx \
SMESHGUI_MeshOrderDlg_moc.cxx \
SMESHGUI_MeshOrderOp_moc.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI.cxx
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
// SMESH includes
-
+//
#include "SMESHGUI.h"
#include "SMESHGUI_AddMeshElementDlg.h"
#include "SMESHGUI_AddQuadraticElementDlg.h"
#include "SMESHGUI_StandardMeshInfosDlg.h"
#include "SMESHGUI_SymmetryDlg.h"
#include "SMESHGUI_TranslationDlg.h"
+#include "SMESHGUI_ScaleDlg.h"
#include "SMESHGUI_TransparencyDlg.h"
#include "SMESHGUI_WhatIsDlg.h"
void ExportMeshToFile(int theCommandID);
- void SetDisplayMode(int theCommandID);
+ void SetDisplayMode(int theCommandID, SMESHGUI_StudyId2MarkerMap& theMarkerMap);
void SetDisplayEntity(int theCommandID);
aReservedColors.append( aColor );
_PTR(SObject) aGroupSObject = SMESH::FindSObject(aGroupObject);
- if(SMESH_Actor *anActor = SMESH::FindActorByEntry(aGroupSObject->GetID().c_str()))
- {
- if( aGroupObject->GetType() == SMESH::NODE )
- anActor->SetNodeColor( aColor.R, aColor.G, aColor.B );
- else if( aGroupObject->GetType() == SMESH::EDGE )
- anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B );
- else
- anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B );
+ if (aGroupSObject) {
+ if(SMESH_Actor *anActor = SMESH::FindActorByEntry(aGroupSObject->GetID().c_str())) {
+ if( aGroupObject->GetType() == SMESH::NODE )
+ anActor->SetNodeColor( aColor.R, aColor.G, aColor.B );
+ else if( aGroupObject->GetType() == SMESH::EDGE )
+ anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B );
+ else if( aGroupObject->GetType() == SMESH::ELEM0D )
+ anActor->Set0DColor( aColor.R, aColor.G, aColor.B );
+ else
+ anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B );
+ }
}
}
}
}
- void SetDisplayMode(int theCommandID){
+ void SetDisplayMode(int theCommandID, SMESHGUI_StudyId2MarkerMap& theMarkerMap){
SALOME_ListIO selected;
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
if( !app )
int Edgewidth = (int)anActor->GetLineWidth();
if(Edgewidth == 0)
Edgewidth = 1;
- int intValue = int(anActor->GetNodeSize());
vtkFloatingPointType Shrink = anActor->GetShrinkFactor();
vtkFloatingPointType faces_orientation_color[3];
aDlg->SetColor(5, c0D);
aDlg->SetColor(6, o);
aDlg->SetIntValue(1, Edgewidth);
- aDlg->SetIntValue(2, intValue);
- aDlg->SetIntValue(3, int(Shrink*100.));
- aDlg->SetIntValue(4, size0D);
+ aDlg->SetIntValue(2, int(Shrink*100.));
+ aDlg->SetIntValue(3, size0D);
aDlg->SetDoubleValue(1, faces_orientation_scale);
aDlg->SetBooleanValue(1, faces_orientation_3dvectors);
+
+ aDlg->setCustomMarkerMap( theMarkerMap[ aStudy->StudyId() ] );
+
+ VTK::MarkerType aMarkerTypeCurrent = anActor->GetMarkerType();
+ VTK::MarkerScale aMarkerScaleCurrent = anActor->GetMarkerScale();
+ int aMarkerTextureCurrent = anActor->GetMarkerTexture();
+ if( aMarkerTypeCurrent != VTK::MT_USER )
+ aDlg->setStandardMarker( aMarkerTypeCurrent, aMarkerScaleCurrent );
+ else
+ aDlg->setCustomMarker( aMarkerTextureCurrent );
+
if(aDlg->exec()){
QColor color = aDlg->GetColor(1);
QColor edgecolor = aDlg->GetColor(2);
vtkFloatingPointType (edgecolor.blue()) / 255.);
/* Shrink factor and size edges */
- anActor->SetShrinkFactor(aDlg->GetIntValue(3) / 100.);
+ anActor->SetShrinkFactor(aDlg->GetIntValue(2) / 100.);
anActor->SetLineWidth(aDlg->GetIntValue(1));
/* Nodes color and size */
anActor->SetNodeColor(vtkFloatingPointType (nodecolor.red()) / 255.,
vtkFloatingPointType (nodecolor.green()) / 255.,
vtkFloatingPointType (nodecolor.blue()) / 255.);
- anActor->SetNodeSize(aDlg->GetIntValue(2));
/* 0D elements */
anActor->Set0DColor(vtkFloatingPointType (color0D.red()) / 255.,
vtkFloatingPointType (color0D.green()) / 255.,
vtkFloatingPointType (color0D.blue()) / 255.);
- anActor->Set0DSize(aDlg->GetIntValue(4));
+ anActor->Set0DSize(aDlg->GetIntValue(3));
/* Faces orientation */
vtkFloatingPointType c[3] = {vtkFloatingPointType(faces_orientation_color.redF()),
anActor->SetFacesOrientationScale(aDlg->GetDoubleValue(1));
anActor->SetFacesOrientation3DVectors(aDlg->GetBooleanValue(1));
+ /* Point marker */
+ theMarkerMap[ aStudy->StudyId() ] = aDlg->getCustomMarkerMap();
+
+ VTK::MarkerType aMarkerTypeNew = aDlg->getMarkerType();
+ VTK::MarkerScale aMarkerScaleNew = aDlg->getStandardMarkerScale();
+ int aMarkerTextureNew = aDlg->getCustomMarkerID();
+ if( aMarkerTypeNew != VTK::MT_USER )
+ anActor->SetMarkerStd( aMarkerTypeNew, aMarkerScaleNew );
+ else {
+ const VTK::MarkerMap& aMarkerMap = theMarkerMap[ aStudy->StudyId() ];
+ VTK::MarkerMap::const_iterator anIter = aMarkerMap.find( aMarkerTextureNew );
+ if( anIter != aMarkerMap.end() )
+ anActor->SetMarkerTexture( aMarkerTextureNew, anIter->second.second );
+ }
+
SMESH::SMESH_GroupBase_var aGroupObject = SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IObject);
if( !aGroupObject->_is_nil() )
{
case 213: // Nodes
case 212: // Nodes
case 211: // Nodes
- ::SetDisplayMode(theCommandID);
+ ::SetDisplayMode(theCommandID, myMarkerMap);
break;
//2D quadratic representation
case 231:
case 232:
- ::SetDisplayMode(theCommandID);
+ ::SetDisplayMode(theCommandID, myMarkerMap);
break;
// Display Entity
( new SMESHGUI_UnionOfTwoTrianglesDlg( this ) )->show();
break;
}
- case 409: // Change orientation
- case 410: // Union of triangles
- case 411: // Cutting of quadrangles
+ case 409: // Change orientation
+ case 410: // Union of triangles
+ case 411: // Cutting of quadrangles
+ case 419: // Splitting volumes into tetrahedra
{
if ( !vtkwnd )
{
aDlg = new SMESHGUI_ChangeOrientationDlg(this);
else if ( theCommandID == 410 )
aDlg = new SMESHGUI_UnionOfTrianglesDlg(this);
+ else if ( theCommandID == 419 )
+ aDlg = new SMESHGUI_CuttingIntoTetraDlg(this);
else
aDlg = new SMESHGUI_CuttingOfQuadsDlg(this);
startOperation( 4067 );
break;
+ case 4068: // SCALE
+ {
+ if(checkLock(aStudy)) break;
+ if ( vtkwnd ) {
+ EmitSignalDeactivateDialog();
+ ( new SMESHGUI_ScaleDlg( this ) )->show();
+ }
+ else {
+ SUIT_MessageBox::warning(SMESHGUI::desktop(),
+ tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+ }
+ break;
+ }
+
case 5105: // Library of selection filters
{
static QList<int> aTypes;
createSMESHAction( 4065, "MERGE", "ICON_SMESH_MERGE_NODES" );
createSMESHAction( 4066, "MERGE_ELEMENTS", "ICON_DLG_MERGE_ELEMENTS" );
createSMESHAction( 4067, "MESH_THROU_POINT","ICON_DLG_MESH_THROU_POINT" );
+ createSMESHAction( 4068, "SCALE", "ICON_DLG_MESH_SCALE" );
createSMESHAction( 406, "MOVE", "ICON_DLG_MOVE_NODE" );
createSMESHAction( 407, "INV", "ICON_DLG_MESH_DIAGONAL" );
createSMESHAction( 408, "UNION2", "ICON_UNION2TRI" );
createSMESHAction( 416, "EXTRUSION_ALONG", "ICON_EXTRUSION_ALONG" );
createSMESHAction( 417, "CONV_TO_QUAD", "ICON_CONV_TO_QUAD" );
createSMESHAction( 418, "2D_FROM_3D", "ICON_2D_FROM_3D" );
+ createSMESHAction( 419, "SPLIT_TO_TETRA", "ICON_SPLIT_TO_TETRA" );
createSMESHAction( 200, "RESET" );
createSMESHAction( 201, "SCALAR_BAR_PROP" );
createSMESHAction( 211, "WIRE", "ICON_WIRE", 0, true );
createMenu( 4064, transfId, -1 );
createMenu( 4065, transfId, -1 );
createMenu( 4066, transfId, -1 );
+ createMenu( 4068, transfId, -1 );
createMenu( 406, modifyId, -1 );
createMenu( 4067,modifyId, -1 );
createMenu( 409, modifyId, -1 );
createMenu( 410, modifyId, -1 );
createMenu( 411, modifyId, -1 );
+ createMenu( 419, modifyId, -1 );
createMenu( 412, modifyId, -1 );
createMenu( 413, modifyId, -1 );
createMenu( 416, modifyId, -1 );
createTool( 4064, addRemTb );
createTool( 4065, addRemTb );
createTool( 4066, addRemTb );
+ createTool( 4068, addRemTb );
createTool( separator(), addRemTb );
createTool( 406, modifyTb );
createTool( 409, modifyTb );
createTool( 410, modifyTb );
createTool( 411, modifyTb );
+ createTool( 419, modifyTb );
createTool( 412, modifyTb );
createTool( 413, modifyTb );
createTool( 416, modifyTb );
"SMESH", "nb_segments_per_edge" );
setPreferenceProperty( nbSeg, "min", 1 );
setPreferenceProperty( nbSeg, "max", 10000000 );
+
+ // Quantities with individual precision settings
+ int precGroup = addPreference( tr( "SMESH_PREF_GROUP_PRECISION" ), genTab );
+ setPreferenceProperty( precGroup, "columns", 2 );
+
+ const int nbQuantities = 6;
+ int precs[nbQuantities], ii = 0;
+ precs[ii++] = addPreference( tr( "SMESH_PREF_length_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "SMESH", "length_precision" );
+ precs[ii++] = addPreference( tr( "SMESH_PREF_angle_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "SMESH", "angle_precision" );
+ precs[ii++] = addPreference( tr( "SMESH_PREF_len_tol_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "SMESH", "len_tol_precision" );
+ precs[ii++] = addPreference( tr( "SMESH_PREF_parametric_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "SMESH", "parametric_precision" );
+ precs[ii++] = addPreference( tr( "SMESH_PREF_area_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "SMESH", "area_precision" );
+ precs[ii ] = addPreference( tr( "SMESH_PREF_vol_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "SMESH", "vol_precision" );
+
+ // Set property for precision value for spinboxes
+ for ( ii = 0; ii < nbQuantities; ii++ ){
+ setPreferenceProperty( precs[ii], "min", -10 );
+ setPreferenceProperty( precs[ii], "max", 10 );
+ setPreferenceProperty( precs[ii], "precision", 2 );
+ }
// Mesh tab ------------------------------------------------------------------------
int meshTab = addPreference( tr( "PREF_TAB_MESH" ) );
int nodeGroup = addPreference( tr( "PREF_GROUP_NODES" ), meshTab );
- setPreferenceProperty( nodeGroup, "columns", 2 );
+ setPreferenceProperty( nodeGroup, "columns", 3 );
addPreference( tr( "PREF_COLOR" ), nodeGroup, LightApp_Preferences::Color, "SMESH", "node_color" );
- int nodeSz = addPreference( tr( "PREF_SIZE" ), nodeGroup, LightApp_Preferences::IntSpin, "SMESH", "node_size" );
- setPreferenceProperty( nodeSz, "min", 1 );
- setPreferenceProperty( nodeSz, "max", 5 );
+ int typeOfMarker = addPreference( tr( "PREF_TYPE_OF_MARKER" ), nodeGroup, LightApp_Preferences::Selector, "SMESH", "type_of_marker" );
+
+ SUIT_ResourceMgr* aResourceMgr = SMESH::GetResourceMgr(this);
+ QList<QVariant> aMarkerTypeIndicesList;
+ QList<QVariant> aMarkerTypeIconsList;
+ for ( int i = VTK::MT_POINT; i < VTK::MT_USER; i++ ) {
+ QString icoFile = QString( "ICON_VERTEX_MARKER_%1" ).arg( i );
+ QPixmap pixmap = aResourceMgr->loadPixmap( "VTKViewer", tr( qPrintable( icoFile ) ) );
+ aMarkerTypeIndicesList << i;
+ aMarkerTypeIconsList << pixmap;
+ }
+ setPreferenceProperty( typeOfMarker, "indexes", aMarkerTypeIndicesList );
+ setPreferenceProperty( typeOfMarker, "icons", aMarkerTypeIconsList );
+
+ int markerScale = addPreference( tr( "PREF_MARKER_SCALE" ), nodeGroup, LightApp_Preferences::Selector, "SMESH", "marker_scale" );
+
+ QList<QVariant> aMarkerScaleIndicesList;
+ QStringList aMarkerScaleValuesList;
+ for ( int i = VTK::MS_10; i <= VTK::MS_70; i++ ) {
+ aMarkerScaleIndicesList << i;
+ aMarkerScaleValuesList << QString::number( (i-(int)VTK::MS_10)*0.5 + 1.0 );
+ }
+ setPreferenceProperty( markerScale, "strings", aMarkerScaleValuesList );
+ setPreferenceProperty( markerScale, "indexes", aMarkerScaleIndicesList );
int elemGroup = addPreference( tr( "PREF_GROUP_ELEMENTS" ), meshTab );
setPreferenceProperty( elemGroup, "columns", 2 );
const char gSeparator = '_'; // character used to separate parameter names
const char gDigitsSep = ':'; // character used to separate numeric parameter values (color = r:g:b)
+const char gPathSep = '|'; // character used to separate paths
/*!
* \brief Store visual parameters
savePoint);
_PTR(IParameters) ip = ClientFactory::getIParameters(ap);
+ // store map of custom markers
+ const VTK::MarkerMap& aMarkerMap = myMarkerMap[ studyDS->StudyId() ];
+ if( !aMarkerMap.empty() )
+ {
+ VTK::MarkerMap::const_iterator anIter = aMarkerMap.begin();
+ for( ; anIter != aMarkerMap.end(); anIter++ )
+ {
+ int anId = anIter->first;
+ VTK::MarkerData aMarkerData = anIter->second;
+ std::string aMarkerFileName = aMarkerData.first;
+ VTK::MarkerTexture aMarkerTexture = aMarkerData.second;
+ if( aMarkerTexture.size() < 3 )
+ continue; // should contain at least width, height and the first value
+
+ QString aPropertyName( "texture" );
+ aPropertyName += gSeparator;
+ aPropertyName += QString::number( anId );
+
+ QString aPropertyValue = aMarkerFileName.c_str();
+ aPropertyValue += gPathSep;
+
+ VTK::MarkerTexture::const_iterator aTextureIter = aMarkerTexture.begin();
+ ushort aWidth = *aTextureIter++;
+ ushort aHeight = *aTextureIter++;
+ aPropertyValue += QString::number( aWidth ); aPropertyValue += gDigitsSep;
+ aPropertyValue += QString::number( aHeight ); aPropertyValue += gDigitsSep;
+ for( ; aTextureIter != aMarkerTexture.end(); aTextureIter++ )
+ aPropertyValue += QString::number( *aTextureIter );
+
+ ip->setProperty( aPropertyName.toStdString(), aPropertyValue.toStdString() );
+ }
+ }
+
// viewers counters are used for storing view_numbers in IParameters
int vtkViewers = 0;
// Sizes of lines and points
QString sizeStr ("line");
sizeStr += gDigitsSep; sizeStr += QString::number((int)aSmeshActor->GetLineWidth());
- sizeStr += gDigitsSep; sizeStr += "node";
- sizeStr += gDigitsSep; sizeStr += QString::number((int)aSmeshActor->GetNodeSize());
sizeStr += gDigitsSep; sizeStr += "shrink";
sizeStr += gDigitsSep; sizeStr += QString::number(aSmeshActor->GetShrinkFactor());
param = vtkParam + "Sizes";
ip->setParameter(entry, param, sizeStr.toLatin1().data());
+ // Point marker
+ QString markerStr;
+
+ VTK::MarkerType aMarkerType = aSmeshActor->GetMarkerType();
+ if( aMarkerType == VTK::MT_USER ) {
+ markerStr += "custom";
+ markerStr += gDigitsSep;
+ markerStr += QString::number( aSmeshActor->GetMarkerTexture() );
+ }
+ else {
+ markerStr += "std";
+ markerStr += gDigitsSep;
+ markerStr += QString::number( (int)aMarkerType );
+ markerStr += gDigitsSep;
+ markerStr += QString::number( (int)aSmeshActor->GetMarkerScale() );
+ }
+
+ param = vtkParam + "PointMarker";
+ ip->setParameter(entry, param, markerStr.toLatin1().data());
+
// Opacity
param = vtkParam + "Opacity";
ip->setParameter(entry, param,
savePoint);
_PTR(IParameters) ip = ClientFactory::getIParameters(ap);
+ // restore map of custom markers
+ VTK::MarkerMap& aMarkerMap = myMarkerMap[ studyDS->StudyId() ];
+
+ std::vector<std::string> properties = ip->getProperties();
+ for (std::vector<std::string>::iterator propIt = properties.begin(); propIt != properties.end(); ++propIt)
+ {
+ std::string property = *propIt;
+ QString aPropertyName( property.c_str() );
+ QString aPropertyValue( ip->getProperty( property ).c_str() );
+
+ QStringList aPropertyNameList = aPropertyName.split( gSeparator, QString::SkipEmptyParts );
+ if( aPropertyNameList.size() != 2 )
+ continue;
+
+ int anId = 0;
+ bool ok = false;
+ if( aPropertyNameList[0] == "texture" )
+ anId = aPropertyNameList[1].toInt( &ok );
+
+ if( !ok || anId < 1 )
+ continue;
+
+ QStringList aPropertyValueList = aPropertyValue.split( gPathSep, QString::SkipEmptyParts );
+ if( aPropertyValueList.size() != 2 )
+ continue;
+
+ std::string aMarkerFileName = aPropertyValueList[0].toStdString();
+ QString aMarkerTextureString = aPropertyValueList[1];
+ QStringList aMarkerTextureStringList = aMarkerTextureString.split( gDigitsSep, QString::SkipEmptyParts );
+ if( aMarkerTextureStringList.size() != 3 )
+ continue;
+
+ ok = false;
+ ushort aWidth = aMarkerTextureStringList[0].toUShort( &ok );
+ if( !ok )
+ continue;
+
+ ok = false;
+ ushort aHeight = aMarkerTextureStringList[1].toUShort( &ok );
+ if( !ok )
+ continue;
+
+ VTK::MarkerTexture aMarkerTexture;
+ aMarkerTexture.push_back( aWidth );
+ aMarkerTexture.push_back( aHeight );
+
+ QString aMarkerTextureData = aMarkerTextureStringList[2];
+ for( int i = 0, n = aMarkerTextureData.length(); i < n; i++ )
+ {
+ QChar aChar = aMarkerTextureData.at( i );
+ if( aChar.isDigit() )
+ aMarkerTexture.push_back( aChar.digitValue() );
+ }
+
+ aMarkerMap[ anId ] = VTK::MarkerData( aMarkerFileName, aMarkerTexture );
+ }
+
std::vector<std::string> entries = ip->getEntries();
for (std::vector<std::string>::iterator entIt = entries.begin(); entIt != entries.end(); ++entIt)
// Sizes of lines and points
else if (paramNameStr == "Sizes") {
QStringList sizes = val.split(gDigitsSep, QString::SkipEmptyParts);
- if (sizes.count() == 6) {
+ if (sizes.count() == 4) {
+ if (sizes[0] != "line" || sizes[2] != "shrink") {
+ MESSAGE("Invalid order of data in Sizes, must be: "
+ "line:int:shrink:float");
+ }
+ else {
+ aSmeshActor->SetLineWidth(sizes[1].toInt());
+ aSmeshActor->SetShrinkFactor(sizes[3].toFloat());
+ }
+ }
+ else if (sizes.count() == 6) { // just to support old format
if (sizes[0] != "line" || sizes[2] != "node" || sizes[4] != "shrink") {
MESSAGE("Invalid order of data in Sizes, must be: "
"line:int:node:int:shrink:float");
}
else {
aSmeshActor->SetLineWidth(sizes[1].toInt());
- aSmeshActor->SetNodeSize(sizes[3].toInt());
+ //aSmeshActor->SetNodeSize(sizes[3].toInt()); // made obsolete
aSmeshActor->SetShrinkFactor(sizes[5].toFloat());
}
}
}
+ // Point marker
+ else if (paramNameStr == "PointMarker") {
+ QStringList data = val.split(gDigitsSep, QString::SkipEmptyParts);
+ if( data.count() >= 2 ) {
+ bool ok = false;
+ int aParam1 = data[1].toInt( &ok );
+ if( ok ) {
+ if( data[0] == "std" && data.count() == 3 ) {
+ int aParam2 = data[2].toInt( &ok );
+ aSmeshActor->SetMarkerStd( (VTK::MarkerType)aParam1, (VTK::MarkerScale)aParam2 );
+ }
+ else if( data[0] == "custom" ) {
+ VTK::MarkerMap::const_iterator markerIt = aMarkerMap.find( aParam1 );
+ if( markerIt != aMarkerMap.end() ) {
+ VTK::MarkerData aMarkerData = markerIt->second;
+ aSmeshActor->SetMarkerTexture( aParam1, aMarkerData.second );
+ }
+ }
+ }
+ }
+ }
// Opacity
else if (paramNameStr == "Opacity") {
aSmeshActor->SetOpacity(val.toFloat());
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI.h
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
// SALOME GUI includes
#include <SalomeApp_Module.h>
+#include <VTKViewer_MarkerDef.h>
#include <SALOME_InteractiveObject.hxx>
// IDL includes
class SMESHGUI_FilterLibraryDlg;
+typedef std::map<int, VTK::MarkerMap> SMESHGUI_StudyId2MarkerMap;
+
//=================================================================================
// class : SMESHGUI
// purpose :
LightApp_Displayer* myDisplayer;
SMESHGUI_FilterLibraryDlg* myFilterLibraryDlg;
+
+ SMESHGUI_StudyId2MarkerMap myMarkerMap;
};
#endif // SMESHGUI_H
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_AddMeshElementDlg.cxx
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
-
// SMESH includes
+//
#include "SMESHGUI_AddMeshElementDlg.h"
#include "SMESHGUI.h"
else
anArrayOfIndices[i] = aListId[ i ].toInt();
+ bool addToGroup = GroupGroups->isChecked();
+ QString aGroupName;
+
+ SMESH::SMESH_GroupBase_var aGroup;
+ int idx = 0;
+ if( addToGroup ) {
+ aGroupName = ComboBox_GroupName->currentText();
+ for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
+ QString aName = ComboBox_GroupName->itemText( i );
+ if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
+ idx = i;
+ }
+ if ( idx > 0 ) {
+ SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
+ if ( !aGeomGroup->_is_nil() ) {
+ int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
+ tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
+ tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
+ if ( res == 1 ) return;
+ }
+ aGroup = myGroups[idx-1];
+ }
+ }
+
long anElemId = -1;
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
switch (myElementType) {
}
case SMDSAbs_Volume:
anElemId = aMeshEditor->AddVolume(anArrayOfIndices.inout()); break;
- default:;
+ default: break;
}
- if( anElemId != -1 && GroupGroups->isChecked() ) {
- SMESH::SMESH_Group_var aGroup;
- QString aGroupName = ComboBox_GroupName->currentText();
- SMESH::ListOfGroups aListOfGroups = *myMesh->GetGroups();
- for( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
- SMESH::SMESH_GroupBase_var aGroupBase = aListOfGroups[i];
- if( !aGroupBase->_is_nil() ) {
- SMESH::SMESH_Group_var aRefGroup = SMESH::SMESH_Group::_narrow( aGroupBase );
- if( !aRefGroup->_is_nil() ) {
- QString aRefGroupName( aRefGroup->GetName() );
- if( aRefGroupName == aGroupName ) {
- aGroup = aRefGroup; // // add node to existing group
- break;
- }
- }
- }
+ if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
+ SMESH::SMESH_Group_var aGroupUsed;
+ if ( aGroup->_is_nil() ) {
+ // create new group
+ aGroupUsed = SMESH::AddGroup( myMesh, (SMESH::ElementType)myElementType, aGroupName );
+ if ( !aGroupUsed->_is_nil() ) {
+ myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
+ ComboBox_GroupName->addItem( aGroupName );
+ }
+ }
+ else {
+ SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
+ if ( !aGeomGroup->_is_nil() ) {
+ aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
+ if ( !aGroupUsed->_is_nil() && idx > 0 ) {
+ myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
+ SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
+ }
+ }
+ else
+ aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
}
- if( aGroup->_is_nil() ) // create new group
- aGroup = SMESH::AddGroup( myMesh, (SMESH::ElementType)myElementType, aGroupName );
- if( !aGroup->_is_nil() ) {
+ if ( !aGroupUsed->_is_nil() ) {
SMESH::long_array_var anIdList = new SMESH::long_array;
anIdList->length( 1 );
anIdList[0] = anElemId;
- aGroup->Add( anIdList.inout() );
+ aGroupUsed->Add( anIdList.inout() );
}
}
// process groups
if ( !myMesh->_is_nil() && myEntry != aCurrentEntry ) {
+ myGroups.clear();
ComboBox_GroupName->clear();
ComboBox_GroupName->addItem( QString() );
SMESH::ListOfGroups aListOfGroups = *myMesh->GetGroups();
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
- SMESH::SMESH_GroupBase_var aGroupBase = aListOfGroups[i];
- if ( !aGroupBase->_is_nil() && aGroupBase->GetType() == (SMESH::ElementType)myElementType ) {
- SMESH::SMESH_Group_var aGroup = SMESH::SMESH_Group::_narrow( aGroupBase );
- if ( !aGroup->_is_nil() ) {
- QString aGroupName( aGroup->GetName() );
- if ( !aGroupName.isEmpty() )
- ComboBox_GroupName->addItem( aGroupName );
- }
+ SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
+ if ( !aGroup->_is_nil() && aGroup->GetType() == (SMESH::ElementType)myElementType ) {
+ QString aGroupName( aGroup->GetName() );
+ if ( !aGroupName.isEmpty() ) {
+ myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
+ ComboBox_GroupName->addItem( aGroupName );
+ }
}
}
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_AddMeshElementDlg.h
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
bool isValid();
+ typedef QList<SMESH::SMESH_GroupBase_var> GrpList;
+
SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
int myNbOkNodes; /* to check when arguments is defined */
SMESH_Actor* myActor;
SMESH::TElementSimulation* mySimulation;
QString myEntry;
+ GrpList myGroups;
QGroupBox* GroupConstructors;
QRadioButton* Constructor1;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_AddMeshElementDlg.cxx
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
for (int i = 0; i < aNumberOfIds; i++)
anArrayOfIdeces[i] = anIds[ i ];
+ bool addToGroup = GroupGroups->isChecked();
+ QString aGroupName;
+
+ SMESH::SMESH_GroupBase_var aGroup;
+ int idx = 0;
+ if( addToGroup ) {
+ aGroupName = ComboBox_GroupName->currentText();
+ for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
+ QString aName = ComboBox_GroupName->itemText( i );
+ if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
+ idx = i;
+ }
+ if ( idx > 0 ) {
+ SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
+ if ( !aGeomGroup->_is_nil() ) {
+ int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
+ tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
+ tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
+ if ( res == 1 ) return;
+ }
+ aGroup = myGroups[idx-1];
+ }
+ }
+
SMESH::ElementType anElementType;
long anElemId = -1;
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
case QUAD_HEXAHEDRON:
anElementType = SMESH::VOLUME;
anElemId = aMeshEditor->AddVolume(anArrayOfIdeces.inout()); break;
+ default: break;
}
- if( anElemId != -1 && GroupGroups->isChecked() ) {
- SMESH::SMESH_Group_var aGroup;
- QString aGroupName = ComboBox_GroupName->currentText();
- SMESH::ListOfGroups aListOfGroups = *myMesh->GetGroups();
- for( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
- SMESH::SMESH_GroupBase_var aGroupBase = aListOfGroups[i];
- if( !aGroupBase->_is_nil() ) {
- SMESH::SMESH_Group_var aRefGroup = SMESH::SMESH_Group::_narrow( aGroupBase );
- if( !aRefGroup->_is_nil() ) {
- QString aRefGroupName( aRefGroup->GetName() );
- if( aRefGroupName == aGroupName ) {
- aGroup = aRefGroup; // // add node to existing group
- break;
- }
- }
+ if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
+ SMESH::SMESH_Group_var aGroupUsed;
+ if ( aGroup->_is_nil() ) {
+ // create new group
+ aGroupUsed = SMESH::AddGroup( myMesh, anElementType, aGroupName );
+ if ( !aGroupUsed->_is_nil() ) {
+ myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
+ ComboBox_GroupName->addItem( aGroupName );
}
}
- if( aGroup->_is_nil() ) // create new group
- aGroup = SMESH::AddGroup( myMesh, anElementType, aGroupName );
-
- if( !aGroup->_is_nil() ) {
+ else {
+ SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
+ if ( !aGeomGroup->_is_nil() ) {
+ aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
+ if ( !aGroupUsed->_is_nil() && idx > 0 ) {
+ myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
+ SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
+ }
+ }
+ else
+ aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
+ }
+
+ if ( !aGroupUsed->_is_nil() ) {
SMESH::long_array_var anIdList = new SMESH::long_array;
anIdList->length( 1 );
anIdList[0] = anElemId;
- aGroup->Add( anIdList.inout() );
+ aGroupUsed->Add( anIdList.inout() );
}
}
case QUAD_HEXAHEDRON:
anElementType = SMESH::VOLUME; break;
}
+ myGroups.clear();
ComboBox_GroupName->clear();
ComboBox_GroupName->addItem( QString() );
SMESH::ListOfGroups aListOfGroups = *myMesh->GetGroups();
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
- SMESH::SMESH_GroupBase_var aGroupBase = aListOfGroups[i];
- if ( !aGroupBase->_is_nil() && aGroupBase->GetType() == anElementType ) {
- SMESH::SMESH_Group_var aGroup = SMESH::SMESH_Group::_narrow( aGroupBase );
- if ( !aGroup->_is_nil() ) {
- QString aGroupName( aGroup->GetName() );
- if ( !aGroupName.isEmpty() )
- ComboBox_GroupName->addItem( aGroupName );
- }
+ SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
+ if ( !aGroup->_is_nil() && aGroup->GetType() == anElementType ) {
+ QString aGroupName( aGroup->GetName() );
+ if ( !aGroupName.isEmpty() ) {
+ myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
+ ComboBox_GroupName->addItem( aGroupName );
+ }
}
}
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_AddMeshElementDlg.h
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
~SMESHGUI_AddQuadraticElementDlg();
private:
+ typedef QList<SMESH::SMESH_GroupBase_var> GrpList;
+
void Init();
void closeEvent( QCloseEvent* );
void hideEvent( QHideEvent* ); /* ESC key */
SMESH_Actor* myActor;
SMESH::TElementSimulation* mySimulation;
QString myEntry;
+ GrpList myGroups;
int myType;
bool myIsEditCorners;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_BuildCompoundDlg.cxx
// Author : Alexander KOVALEV, Open CASCADE S.A.S.
TextLabelTol = new QLabel(tr("SMESH_TOLERANCE"), GroupArgs);
TextLabelTol->setAlignment(Qt::AlignCenter);
SpinBoxTol = new SMESHGUI_SpinBox(GroupArgs);
- SpinBoxTol->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, 6);
+ SpinBoxTol->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, "len_tol_precision" );
GroupArgsLayout->addWidget(TextLabelMeshes, 0, 0);
GroupArgsLayout->addWidget(SelectButton, 0, 1);
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_BuildCompoundDlg.h
// Author : Alexander KOVALEV, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_ClippingDlg.cxx
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
SMESHGUI_ClippingDlgLayout->setMargin(MARGIN);
// Controls for selecting, creating, deleting planes
- QGroupBox* GroupPlanes = new QGroupBox(tr("Clipping planes"), this);
+ QGroupBox* GroupPlanes = new QGroupBox(tr("CLIP_PLANES"), this);
QHBoxLayout* GroupPlanesLayout = new QHBoxLayout(GroupPlanes);
GroupPlanesLayout->setSpacing(SPACING);
GroupPlanesLayout->setMargin(MARGIN);
SpinBoxDistance = new SMESHGUI_SpinBox(GroupParameters);
- TextLabelRot1 = new QLabel(tr("Rotation around X (Y to Z):"), GroupParameters);
+ TextLabelRot1 = new QLabel(tr("ROTATION_AROUND_X_Y2Z"), GroupParameters);
SpinBoxRot1 = new SMESHGUI_SpinBox(GroupParameters);
- TextLabelRot2 = new QLabel(tr("Rotation around Y (X to Z):"), GroupParameters);
+ TextLabelRot2 = new QLabel(tr("ROTATION_AROUND_Y_X2Z"), GroupParameters);
SpinBoxRot2 = new SMESHGUI_SpinBox(GroupParameters);
- PreviewCheckBox = new QCheckBox(tr("Show preview"), GroupParameters);
+ PreviewCheckBox = new QCheckBox(tr("SHOW_PREVIEW"), GroupParameters);
PreviewCheckBox->setChecked(true);
- AutoApplyCheckBox = new QCheckBox(tr("Auto Apply"), GroupParameters);
+ AutoApplyCheckBox = new QCheckBox(tr("AUTO_APPLY"), GroupParameters);
AutoApplyCheckBox->setChecked(false);
GroupParametersLayout->addWidget(TextLabelOrientation, 0, 0);
SMESHGUI_ClippingDlgLayout->addWidget(GroupButtons);
// Initial state
- SpinBoxDistance->RangeStepAndValidator(0.0, 1.0, 0.01, 3);
- SpinBoxRot1->RangeStepAndValidator(-180.0, 180.0, 1, 3);
- SpinBoxRot2->RangeStepAndValidator(-180.0, 180.0, 1, 3);
+ SpinBoxDistance->RangeStepAndValidator(0.0, 1.0, 0.01, "length_precision" );
+ SpinBoxRot1->RangeStepAndValidator(-180.0, 180.0, 1, "angle_precision" );
+ SpinBoxRot2->RangeStepAndValidator(-180.0, 180.0, 1, "angle_precision" );
- ComboBoxOrientation->addItem(tr("|| X-Y"));
- ComboBoxOrientation->addItem(tr("|| Y-Z"));
- ComboBoxOrientation->addItem(tr("|| Z-X"));
+ ComboBoxOrientation->addItem(tr("ALONG_XY"));
+ ComboBoxOrientation->addItem(tr("ALONG_YZ"));
+ ComboBoxOrientation->addItem(tr("ALONG_ZX"));
SpinBoxDistance->SetValue(0.5);
return;
if (theItem == 0) {
- TextLabelRot1->setText(tr("Rotation around X (Y to Z):"));
- TextLabelRot2->setText(tr("Rotation around Y (X to Z):"));
+ TextLabelRot1->setText(tr("ROTATION_AROUND_X_Y2Z"));
+ TextLabelRot2->setText(tr("ROTATION_AROUND_Y_X2Z"));
}
else if (theItem == 1) {
- TextLabelRot1->setText(tr("Rotation around Y (Z to X):"));
- TextLabelRot2->setText(tr("Rotation around Z (Y to X):"));
+ TextLabelRot1->setText(tr("ROTATION_AROUND_Y_Z2X"));
+ TextLabelRot2->setText(tr("ROTATION_AROUND_Z_Y2X"));
}
else if (theItem == 2) {
- TextLabelRot1->setText(tr("Rotation around Z (X to Y):"));
- TextLabelRot2->setText(tr("Rotation around X (Z to Y):"));
+ TextLabelRot1->setText(tr("ROTATION_AROUND_Z_X2Y"));
+ TextLabelRot2->setText(tr("ROTATION_AROUND_X_Z2Y"));
}
if((QComboBox*)sender() == ComboBoxOrientation)
QString aName;
for(int i = 1; i<=aNbPlanes; i++) {
- aName = QString(tr("Plane# %1")).arg(i);
+ aName = QString(tr("PLANE_NUM")).arg(i);
ComboBoxPlanes->addItem(aName);
}
if (anIsControlsEnable) {
onSelectPlane(aPos);
} else {
- ComboBoxPlanes->addItem(tr("No planes"));
+ ComboBoxPlanes->addItem(tr("NO_PLANES"));
SpinBoxRot1->SetValue(0.0);
SpinBoxRot2->SetValue(0.0);
SpinBoxDistance->SetValue(0.5);
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_ClippingDlg.h
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_ComputeDlg.cxx
// Author : Edward AGAPOV, Open CASCADE S.A.S.
// SMESH includes
if ( errors->length() > 0 ) {
aHypErrors = SMESH::GetMessageOnAlgoStateErrors( errors.in() );
}
+ if ( myMesh->HasModificationsToDiscard() && // issue 0020693
+ SUIT_MessageBox::question( desktop(), tr( "SMESH_WARNING" ),
+ tr( "FULL_RECOMPUTE_QUESTION" ),
+ tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 1, 0 ) == 0 )
+ myMesh->Clear();
SUIT_OverrideCursor aWaitCursor;
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
{
QTableWidget* tbl = aCompDlg->myTable;
SMESH::long_array_var aRes = myMesh->GetMeshInfo();
- aCompDlg->myFullInfo->SetMeshInfo( aRes );
+ aCompDlg->myBriefInfo->SetMeshInfo( aRes );
aCompDlg->myBriefInfo->show();
aCompDlg->myFullInfo->hide();
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_ComputeDlg.h
// Author : Edward AGAPOV, Open CASCADE S.A.S.
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_ConvToQuadDlg.cxx
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_ConvToQuadDlg.h
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_ConvToQuadOp.cxx
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_ConvToQuadOp.h
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_CreatePatternDlg.cxx
// Author : Sergey LITONIN, Open CASCADE S.A.S.
// SMESH includes
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_CreatePatternDlg.h
// Author : Sergey LITONIN, Open CASCADE S.A.S.
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_CreatePolyhedralVolumeDlg.cxx
// Author : Michael ZORIN, Open CASCADE S.A.S.
if(checkEditLine(false) == -1) {return;}
busy = true;
long anElemId = -1;
+
+ bool addToGroup = GroupGroups->isChecked();
+ QString aGroupName;
+
+ SMESH::SMESH_GroupBase_var aGroup;
+ int idx = 0;
+ if( addToGroup ) {
+ aGroupName = ComboBox_GroupName->currentText();
+ for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
+ QString aName = ComboBox_GroupName->itemText( i );
+ if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
+ idx = i;
+ }
+ if ( idx > 0 ) {
+ SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
+ if ( !aGeomGroup->_is_nil() ) {
+ int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
+ tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
+ tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
+ if ( res == 1 ) return;
+ }
+ aGroup = myGroups[idx-1];
+ }
+ }
+
if (GetConstructorId() == 0)
{
SMESH::long_array_var anIdsOfNodes = new SMESH::long_array;
}
}
- if( anElemId != -1 && GroupGroups->isChecked() ) {
- SMESH::SMESH_Group_var aGroup;
- QString aGroupName = ComboBox_GroupName->currentText();
- SMESH::ListOfGroups aListOfGroups = *myMesh->GetGroups();
- for( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
- SMESH::SMESH_GroupBase_var aGroupBase = aListOfGroups[i];
- if( !aGroupBase->_is_nil() ) {
- SMESH::SMESH_Group_var aRefGroup = SMESH::SMESH_Group::_narrow( aGroupBase );
- if( !aRefGroup->_is_nil() ) {
- QString aRefGroupName( aRefGroup->GetName() );
- if( aRefGroupName == aGroupName ) {
- aGroup = aRefGroup; // // add node to existing group
- break;
- }
- }
- }
- }
- if( aGroup->_is_nil() ) // create new group
- aGroup = SMESH::AddGroup( myMesh, SMESH::VOLUME, aGroupName );
-
- if( !aGroup->_is_nil() ) {
+ if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
+ SMESH::SMESH_Group_var aGroupUsed;
+ if ( aGroup->_is_nil() ) {
+ // create new group
+ aGroupUsed = SMESH::AddGroup( myMesh, SMESH::VOLUME, aGroupName );
+ if ( !aGroupUsed->_is_nil() ) {
+ myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
+ ComboBox_GroupName->addItem( aGroupName );
+ }
+ }
+ else {
+ SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
+ if ( !aGeomGroup->_is_nil() ) {
+ aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
+ if ( !aGroupUsed->_is_nil() && idx > 0 ) {
+ myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
+ SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
+ }
+ }
+ else
+ aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
+ }
+
+ if ( !aGroupUsed->_is_nil() ) {
SMESH::long_array_var anIdList = new SMESH::long_array;
anIdList->length( 1 );
anIdList[0] = anElemId;
- aGroup->Add( anIdList.inout() );
+ aGroupUsed->Add( anIdList.inout() );
}
}
// process groups
if ( !myMesh->_is_nil() && myEntry != aCurrentEntry ) {
+ myGroups.clear();
ComboBox_GroupName->clear();
ComboBox_GroupName->addItem( QString() );
SMESH::ListOfGroups aListOfGroups = *myMesh->GetGroups();
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
- SMESH::SMESH_GroupBase_var aGroupBase = aListOfGroups[i];
- if ( !aGroupBase->_is_nil() && aGroupBase->GetType() == SMESH::VOLUME ) {
- SMESH::SMESH_Group_var aGroup = SMESH::SMESH_Group::_narrow( aGroupBase );
- if ( !aGroup->_is_nil() ) {
- QString aGroupName( aGroup->GetName() );
- if ( !aGroupName.isEmpty() )
- ComboBox_GroupName->addItem( aGroupName );
+ SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
+ if ( !aGroup->_is_nil() && aGroup->GetType() == SMESH::VOLUME ) {
+ QString aGroupName( aGroup->GetName() );
+ if ( !aGroupName.isEmpty() ) {
+ myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
+ ComboBox_GroupName->addItem( aGroupName );
}
}
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_CreatePolyhedralVolumeDlg.h
// Author : Michael ZORIN, Open CASCADE S.A.S.
~SMESHGUI_CreatePolyhedralVolumeDlg();
private:
+ typedef QList<SMESH::SMESH_GroupBase_var> GrpList;
+
void Init();
void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
SMESH_Actor* myActor;
SMESH::TPolySimulation* mySimulation;
QString myEntry;
+ GrpList myGroups;
QGroupBox* ConstructorsBox;
QButtonGroup* GroupConstructors;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_DeleteGroupDlg.cxx
// Author : Sergey LITONIN, Open CASCADE S.A.S.
// SMESH includes
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_DeleteGroupDlg.h
// Author : Sergey LITONIN, Open CASCADE S.A.S.
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_Dialog.cxx
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_Dialog.h
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : Displayer for SMESH module
// File : SMESHGUI_Displayer.cxx
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : Displayer for SMESH module
// File : SMESHGUI_Displayer.h
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_EditMeshDlg.cxx
// Author : Open CASCADE S.A.S.
void SMESHGUI_EditMeshDlg::Init()
{
if (myAction == 0) {
- SpinBoxTolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, 5);
+ SpinBoxTolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, "len_tol_precision");
SpinBoxTolerance->SetValue(1e-05);
}
}
SMESH::UpdateView();
- onDetect();
return true;
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_EditMeshDlg.h
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_ExtrusionAlongPathDlg.cxx
// Author : Vadim SANDLER, Open CASCADE S.A.S.
/***************************************************************/
// Initialisations
- XSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- YSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- ZSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- AngleSpin->RangeStepAndValidator(-180.0, 180.0, 5.0, 3);
+ XSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ YSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ ZSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ AngleSpin->RangeStepAndValidator(-180.0, 180.0, 5.0, "angle_precision");
mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
//if (myMesh->_is_nil() || MeshCheck->isChecked() && myIDSource->_is_nil() ||
// !myMeshActor || myPathMesh->_is_nil() || myPathShape->_is_nil())
if ( myMesh->_is_nil() || MeshCheck->isChecked() && myIDSource->_is_nil() ||
- !myMeshActor || myPath->_is_nil() )
+ /*!myMeshActor ||*/ myPath->_is_nil() )
return false;
if (!isValid())
// If "Select whole mesh, submesh or group" check box is off ->
// use only elements of given type selected by user
- SMDS_Mesh* aMesh = myMeshActor->GetObject()->GetMesh();
+ SMDS_Mesh* aMesh;
+ if ( myMeshActor )
+ aMesh = myMeshActor->GetObject()->GetMesh();
+
if (aMesh) {
QStringList aListElementsId = ElementsLineEdit->text().split(" ", QString::SkipEmptyParts);
anElementsId = new SMESH::long_array;
}
//mySelectionMgr->clearSelected();
- SMESH::Update( myMeshActor->getIO(), myMeshActor->GetVisibility() );
+ if ( myMeshActor )
+ SMESH::Update( myMeshActor->getIO(), myMeshActor->GetVisibility() );
+
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() )
mySMESHGUI->updateObjBrowser(true); // new groups may appear
//SMESH::UpdateView();
}
// find actor
myMeshActor = SMESH::FindActorByObject(myMesh);
- if (!myMeshActor)
+ if (!myMeshActor && !MeshCheck->isChecked())
return;
if (MeshCheck->isChecked()) {
void SMESHGUI_ExtrusionAlongPathDlg::SetEditCurrentArgument (QToolButton* button)
{
disconnect(mySelectionMgr, 0, this, 0);
- mySelectionMgr->clearSelected();
+ // mySelectionMgr->clearSelected();
mySelectionMgr->clearFilters();
SMESH::SetPickable();
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_ExtrusionAlongPathDlg.h
// Author : Vadim SANDLER, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_ExtrusionDlg.cxx
// Author : Michael ZORIN, Open CASCADE S.A.S.
SMESHGUI_ExtrusionDlgLayout->addWidget(GroupButtons);
/* Initialisations */
- SpinBox_Vx->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, 3);
- SpinBox_Vy->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, 3);
- SpinBox_Vz->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, 3);
+ SpinBox_Vx->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, "length_precision");
+ SpinBox_Vy->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, "length_precision");
+ SpinBox_Vz->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, "length_precision");
- SpinBox_Dx->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_Dy->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_Dz->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
+ SpinBox_Dx->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_Dy->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_Dz->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
SpinBox_NbSteps->setRange(1, 999999);
- SpinBox_VDist->RangeStepAndValidator(0, COORD_MAX, 10.0, 3);
+ SpinBox_VDist->RangeStepAndValidator(0, COORD_MAX, 10.0, "length_precision");
RadioButton1->setChecked(true);
RadioButton3->setChecked(true);
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_ExtrusionDlg.h
// Author : Michael ZORIN, Open CASCADE S.A.S.
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_FileInfoDlg.cxx
// Author : Alexandre SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com)
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_FileInfoDlg.h
// Author : Alexandre SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com)
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_FileValidator.cxx
// Author : Oleg UVAROV
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_FileValidator.h
// Author : Oleg UVAROV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESHGUI_Filter : Filters for VTK viewer
// File : SMESHGUI_Filter.cxx
// Author : Sergey LITONIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESHGUI_Filter : Filters for VTK viewer
// File : SMESHGUI_Filter.h
// Author : Sergey LITONIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_FilterDlg.cxx
// Author : Sergey LITONIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_FilterDlg.h
// Author : Sergey LITONIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_FilterLibraryDlg.cxx
// Author : Sergey LITONIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_FilterLibraryDlg.h
// Author : Sergey LITONIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_FilterUtils.cxx
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_FilterUtils.h
// Author : Open CASCADE S.A.S.
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_FindElemByPointDlg.cxx
// Author : Edward AGAPOV, Open CASCADE S.A.S.
// SMESH includes
QLabel* aZLabel = new QLabel(tr("SMESH_Z"), aCoordGrp);
myZ = new SMESHGUI_SpinBox(aCoordGrp);
- myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
+ myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
myX->SetValue(0);
myY->SetValue(0);
myZ->SetValue(0);
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef SMESHGUI_FindElemByPointDLG_H
#define SMESHGUI_FindElemByPointDLG_H
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_GEOMGenUtils.cxx
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_GEOMGenUtils.h
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_GroupDlg.cxx
// Author : Natalia KOPNOVA, Open CASCADE S.A.S.
// SMESH includes
-
+//
#include "SMESHGUI_GroupDlg.h"
#include "SMESHGUI.h"
if (!aGroupShape->_is_nil())
{
_PTR(SObject) aGroupShapeSO = aStudy->FindObjectID(aGroupShape->GetStudyEntry());
- aShapeName = aGroupShapeSO->GetName().c_str();
+ if ( aGroupShapeSO )
+ aShapeName = aGroupShapeSO->GetName().c_str();
}
myGeomGroupLine->setText( aShapeName );
myNameChanged = true;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_GroupDlg.h
// Author : Natalia KOPNOVA, Open CASCADE S.A.S.
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_GroupOnShapeDlg.cxx
// Created : Wed Sep 17 18:36:51 2008
: SMESHGUI_SelectionOp(ActorSelection),
myDlg( 0 )
{
- myHelpFileName = "creating_groups_page.html";
+ myHelpFileName = "create_groups_from_geometry_page.html";
}
SMESHGUI_GroupOnShapeOp::~SMESHGUI_GroupOnShapeOp()
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_GroupOnShapeDlg.h
// Author : Edard AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_GroupOpDlg.cxx
// Author : Sergey LITONIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_GroupOpDlg.h
// Author : Sergey LITONIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_GroupUtils.cxx
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_GroupUtils.h
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_Hypotheses.cxx
// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_Hypotheses.h
// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_HypothesesUtils.cxx
// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
-
// SMESH includes
+//
#include "SMESHGUI_HypothesesUtils.h"
#include "SMESHGUI.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_HypothesesUtils.h
// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
-
+//
#ifndef SMESHGUI_HYPOTHESESUTILS_H
#define SMESHGUI_HYPOTHESESUTILS_H
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_IdValidator.h
// Author : Edward AGAPOV, Open CASCADE S.A.S.
-// Copyright (C) 2007-2009 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_Make2DFrom3DOp.cxx
// Author : Open CASCADE S.A.S.
// SMESH includes
-// Copyright (C) 2007-2009 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_Make2DFrom3D.h
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_MakeNodeAtPointDlg.cxx
// Author : Edward AGAPOV, Open CASCADE S.A.S.
// SMESH includes
QLabel* aZLabel = new QLabel(tr("SMESH_Z"), aCoordGrp);
myZ = new SMESHGUI_SpinBox(aCoordGrp);
- myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
+ myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
aCoordGrpLayout->addWidget(myCoordBtn);
aCoordGrpLayout->addWidget(aXLabel);
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_MakeNodeAtPointDlg.h
// Author : Edward AGAPOV, Open CASCADE S.A.S.
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_MeshDlg.cxx
// Author : Sergey LITONIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_MeshDlg.h
// Author : Sergey LITONIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_MeshEditPreview.cxx
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_MeshEditPreview.h
// Author : Open CASCADE S.A.S.
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_MeshInfosBox.cxx
// Author : Edward AGAPOV, Open CASCADE S.A.S.
// SMESH includes
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_MeshInfosBox.h
// Author : Edward AGAPOV, Open CASCADE S.A.S.
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_MeshInfosDlg.cxx
// Author : Nicolas BARBEROU
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_MeshInfosDlg.h
// Author : Nicolas BARBEROU
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_MeshOp.cxx
// Author : Sergey LITONIN, Open CASCADE S.A.S.
-
// SMESH includes
+//
#include "SMESHGUI_MeshOp.h"
#include "SMESHGUI.h"
}
}
- return SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(),
- aServerLib.toLatin1().data(),
- aMeshVar,
- aGeomVar,
- /*byMesh = */isSubMesh);
-
+ SMESH::SMESH_Hypothesis_var hyp =
+ SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(),
+ aServerLib.toLatin1().data(),
+ aMeshVar,
+ aGeomVar,
+ /*byMesh = */isSubMesh);
+ if ( hyp->_is_nil() && isSubMesh )
+ hyp = SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(),
+ aServerLib.toLatin1().data(),
+ aMeshVar,
+ aGeomVar,
+ /*byMesh = */false);
+ return hyp;
}
//================================================================================
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_MeshOp.h
// Author : Sergey LITONIN, Open CASCADE S.A.S.
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_MeshOrderDlg.cxx
// Author : Pavel TELKOV, Open CASCADE S.A.S.
// SMESH includes
-// Copyright (C) 2007-2009 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_MeshOrderDlg.h
// Author : Pavel TELKOV, Open CASCADE S.A.S.
//
-// Copyright (C) 2007-2009 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_MeshOrderOp.cxx
// Author : Pavel TELKOV, Open CASCADE S.A.S.
//
-
#include "SMESHGUI_MeshOrderOp.h"
#include "SMESHGUI.h"
-// Copyright (C) 2007-2009 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_MeshOrderOp.h
// Author : Pavel TELKOV, Open CASCADE S.A.S.
//
-
#ifndef SMESHGUI_MeshOrderOp_H
#define SMESHGUI_MeshOrderOp_H
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_MeshPatternDlg.cxx
// Author : Sergey LITONIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_MeshPatternDlg.h
// Author : Sergey LITONIN, Open CASCADE S.A.S.
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_MeshUtils.cxx
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_MeshUtils.h
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_MoveNodesDlg.cxx
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
aCoordGrpLayout->addWidget(myZ);
//------------------------------------------------------------
- myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, DBL_DIGITS_DISPLAY);
- myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, DBL_DIGITS_DISPLAY);
- myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, DBL_DIGITS_DISPLAY);
+ myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, "length_precision");
+ myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, "length_precision");
+ myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, "length_precision");
//------------------------------------------------------------
QVBoxLayout* aLay = new QVBoxLayout(aFrame);
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_MoveNodesDlg.h
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_MultiEditDlg.cxx
// Author : Sergey LITONIN, Open CASCADE S.A.S.
// SMESH includes
#include <SMDS_Mesh.hxx>
// SALOME GUI includes
-#include <SUIT_ResourceMgr.h>
#include <SUIT_Desktop.h>
-#include <SUIT_Session.h>
#include <SUIT_MessageBox.h>
+#include <SUIT_OverrideCursor.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
#include <LightApp_SelectionMgr.h>
#include <LightApp_Application.h>
#include <SALOME_ListIO.hxx>
#include <SALOME_ListIteratorOfListIO.hxx>
+#include <SalomeApp_Tools.h>
#include <SVTK_Selector.h>
#include <SVTK_ViewWindow.h>
bool SMESHGUI_MultiEditDlg::isValid (const bool /*theMess*/)
{
return (!myMesh->_is_nil() &&
- (myListBox->count() > 0 || (myToAllChk->isChecked() && myActor)));
+ (myListBox->count() > 0 || (myToAllChk->isChecked()/* && myActor*/)));
}
//=======================================================================
//=======================================================================
// name : SMESHGUI_MultiEditDlg::getIds
-// Purpose : Retrive identifiers from list box
+// Purpose : Retrive identifiers from list box or the whole object
//=======================================================================
-SMESH::long_array_var SMESHGUI_MultiEditDlg::getIds()
+
+SMESH::long_array_var SMESHGUI_MultiEditDlg::getIds(SMESH::SMESH_IDSource_var& obj)
{
SMESH::long_array_var anIds = new SMESH::long_array;
if (myToAllChk->isChecked())
{
myIds.Clear();
- SMESH_Actor * anActor = SMESH::FindActorByObject(myMesh);
- if (!anActor)
- anActor = myActor;
- if (anActor != 0)
- {
- // skl 07.02.2006
- SMDS_Mesh* aMesh = myActor->GetObject()->GetMesh();
- if( myFilterType == SMESH::TriaFilter ||
- myFilterType == SMESH::QuadFilter ||
- myFilterType == SMESH::FaceFilter ) {
- SMDS_FaceIteratorPtr it = aMesh->facesIterator();
- while(it->more()) {
- const SMDS_MeshFace* f = it->next();
- if(myFilterType == SMESH::FaceFilter) {
- myIds.Add(f->GetID());
- }
- else if( myFilterType==SMESH::TriaFilter &&
- ( f->NbNodes()==3 || f->NbNodes()==6 ) ) {
- myIds.Add(f->GetID());
- }
- else if( myFilterType==SMESH::QuadFilter &&
- ( f->NbNodes()==4 || f->NbNodes()==8 ) ) {
- myIds.Add(f->GetID());
- }
- }
- }
- else if(myFilterType == SMESH::VolumeFilter) {
- SMDS_VolumeIteratorPtr it = aMesh->volumesIterator();
- while(it->more()) {
- const SMDS_MeshVolume* f = it->next();
- myIds.Add(f->GetID());
- }
- }
- /* commented by skl 07.02.2006
+ obj = SMESH::SMESH_IDSource::_narrow( myMesh );
+// SMESH_Actor * anActor = SMESH::FindActorByObject(myMesh);
+// if (!anActor)
+// anActor = myActor;
+// if (anActor != 0)
+// {
+// // skl 07.02.2006
+// SMDS_Mesh* aMesh = myActor->GetObject()->GetMesh();
+// if( myFilterType == SMESH::TriaFilter ||
+// myFilterType == SMESH::QuadFilter ||
+// myFilterType == SMESH::FaceFilter ) {
+// SMDS_FaceIteratorPtr it = aMesh->facesIterator();
+// while(it->more()) {
+// const SMDS_MeshFace* f = it->next();
+// if(myFilterType == SMESH::FaceFilter) {
+// myIds.Add(f->GetID());
+// }
+// else if( myFilterType==SMESH::TriaFilter &&
+// ( f->NbNodes()==3 || f->NbNodes()==6 ) ) {
+// myIds.Add(f->GetID());
+// }
+// else if( myFilterType==SMESH::QuadFilter &&
+// ( f->NbNodes()==4 || f->NbNodes()==8 ) ) {
+// myIds.Add(f->GetID());
+// }
+// }
+// }
+// else if(myFilterType == SMESH::VolumeFilter) {
+// SMDS_VolumeIteratorPtr it = aMesh->volumesIterator();
+// while(it->more()) {
+// const SMDS_MeshVolume* f = it->next();
+// myIds.Add(f->GetID());
+// }
+// }
+ /* commented by skl 07.02.2006 - to work with quadratic elements
TVisualObjPtr aVisualObj = anActor->GetObject();
vtkUnstructuredGrid* aGrid = aVisualObj->GetUnstructuredGrid();
if (aGrid != 0) {
}
}
*/
- }
+ //}
}
anIds->length(myIds.Extent());
myBusy = true;
- SMESH::long_array_var anIds = getIds();
+ SUIT_OverrideCursor aWaitCursor;
+
+ SMESH::SMESH_IDSource_var obj;
+ SMESH::long_array_var anIds = getIds(obj);
- bool aResult = process(aMeshEditor, anIds.inout());
+ bool aResult = process(aMeshEditor, anIds.inout(), obj);
if (aResult) {
if (myActor) {
SALOME_ListIO sel;
}
bool SMESHGUI_ChangeOrientationDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
- const SMESH::long_array& theIds)
+ const SMESH::long_array& theIds,
+ SMESH::SMESH_IDSource_ptr obj)
{
- return theEditor->Reorient(theIds);
+ if ( CORBA::is_nil( obj ))
+ return theEditor->Reorient(theIds);
+ else
+ return theEditor->ReorientObject( obj );
}
/*!
QLabel* aLab = new QLabel (tr("MAXIMUM_ANGLE"), aMaxAngleGrp);
myMaxAngleSpin = new SMESHGUI_SpinBox (aMaxAngleGrp);
- myMaxAngleSpin->RangeStepAndValidator(0, 180.0, 1.0, 3);
+ myMaxAngleSpin->RangeStepAndValidator(0, 180.0, 1.0, "angle_precision");
myMaxAngleSpin->SetValue(30.0);
aMaxAngleGrpLayout->addWidget(aLab);
}
bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
- const SMESH::long_array& theIds)
+ const SMESH::long_array& theIds,
+ SMESH::SMESH_IDSource_ptr obj)
{
SMESH::NumericalFunctor_var aCriterion = getNumericalFunctor();
double aMaxAngle = myMaxAngleSpin->GetValue() * PI / 180.0;
- bool ok = theEditor->TriToQuad(theIds, aCriterion, aMaxAngle);
+ bool ok;
+ if ( CORBA::is_nil( obj ))
+ ok = theEditor->TriToQuad(theIds, aCriterion, aMaxAngle);
+ else
+ ok = theEditor->TriToQuadObject(obj, aCriterion, aMaxAngle);
if( ok ) {
QStringList aParameters;
aParameters << myMaxAngleSpin->text();
}
bool SMESHGUI_CuttingOfQuadsDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
- const SMESH::long_array& theIds)
+ const SMESH::long_array& theIds,
+ SMESH::SMESH_IDSource_ptr obj)
{
+ bool hasObj = (! CORBA::is_nil( obj ));
switch (myGroupChoice->checkedId()) {
case 0: // use diagonal 1-3
- return theEditor->SplitQuad(theIds, true);
+ return hasObj ? theEditor->SplitQuadObject(obj, true) : theEditor->SplitQuad(theIds, true);
case 1: // use diagonal 2-4
- return theEditor->SplitQuad(theIds, false);
+ return hasObj ? theEditor->SplitQuadObject(obj, false) : theEditor->SplitQuad(theIds, false);
default: // use numeric functor
break;
}
- SMESH::NumericalFunctor_var aCriterion = getNumericalFunctor();
- return theEditor->QuadToTri(theIds, aCriterion);
+ SMESH::NumericalFunctor_var aCrit = getNumericalFunctor();
+ return hasObj ? theEditor->QuadToTriObject(obj, aCrit) : theEditor->QuadToTri(theIds, aCrit);
}
void SMESHGUI_CuttingOfQuadsDlg::onCriterionRB()
erasePreview();
// get Ids of elements
- SMESH::long_array_var anElemIds = getIds();
- if (getIds()->length() == 0)
+ SMESH::SMESH_IDSource_var obj;
+ SMESH::long_array_var anElemIds = getIds(obj);
+ if (anElemIds->length() == 0 && obj->_is_nil() )
return;
SMDS_Mesh* aMesh = myActor->GetObject()->GetMesh();
aCellTypesArray->Delete();
aCellLocationsArray->Delete();
}
+
+/*!
+ * Class : SMESHGUI_CuttingIntoTetraDlg
+ * Description : Modification of orientation of faces
+ */
+
+SMESHGUI_CuttingIntoTetraDlg::SMESHGUI_CuttingIntoTetraDlg(SMESHGUI* theModule)
+ : SMESHGUI_MultiEditDlg(theModule, SMESH::VolumeFilter, false)
+{
+ setWindowTitle(tr("CAPTION"));
+ myHelpFileName = "split_to_tetra_page.html";
+ myEntityType = SMESH::VolumeFilter;
+
+ myToAllChk->setChecked( true ); //aplly to the whole mesh by default
+
+ bool hasHexa = true;//myMesh->_is_nil() ? false : myMesh->NbHexas();
+
+ if ( hasHexa )
+ {
+ myGroupChoice->button(2)->hide();
+ myGroupChoice->button(0)->setText( tr("SPLIT_HEX_TO_5_TETRA"));
+ myGroupChoice->button(1)->setText( tr("SPLIT_HEX_TO_6_TETRA"));
+
+ myCriterionGrp->setTitle( tr("SPLIT_METHOD"));
+ myCriterionGrp->show();
+ myComboBoxFunctor->hide();
+ myChoiceWidget->show();
+ }
+ setSelectionMode();
+ updateButtons();
+}
+
+SMESHGUI_CuttingIntoTetraDlg::~SMESHGUI_CuttingIntoTetraDlg()
+{
+}
+
+bool SMESHGUI_CuttingIntoTetraDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
+ const SMESH::long_array& theIds,
+ SMESH::SMESH_IDSource_ptr theObj)
+{
+ SMESH::SMESH_IDSource_var obj = theObj;
+ if ( CORBA::is_nil( obj ))
+ obj = theEditor->MakeIDSource( theIds );
+ try {
+ theEditor->SplitVolumesIntoTetra( obj, myGroupChoice->checkedId()+1 );
+ }
+ catch ( const SALOME::SALOME_Exception& S_ex ) {
+ SalomeApp_Tools::QtCatchCorbaException( S_ex );
+ return false;
+ }
+ return true;
+}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_MultiEditDlg.h
// Author : Sergey LITONIN, Open CASCADE S.A.S.
//
QWidget* createButtonFrame( QWidget* );
QWidget* createMainFrame( QWidget*, const bool );
virtual bool isValid( const bool );
- SMESH::long_array_var getIds();
+ SMESH::long_array_var getIds(SMESH::SMESH_IDSource_var& obj);
void updateButtons();
void setSelectionMode();
virtual bool isIdValid( const int ) const;
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
- const SMESH::long_array& ) = 0;
+ const SMESH::long_array& ,
+ SMESH::SMESH_IDSource_ptr obj) = 0;
int entityType();
protected:
virtual ~SMESHGUI_ChangeOrientationDlg();
protected:
- virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
+ virtual bool process( SMESH::SMESH_MeshEditor_ptr,
+ const SMESH::long_array& ,
+ SMESH::SMESH_IDSource_ptr obj);
};
/*!
protected:
virtual bool isValid( const bool );
- virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
+ virtual bool process( SMESH::SMESH_MeshEditor_ptr,
+ const SMESH::long_array&,
+ SMESH::SMESH_IDSource_ptr obj );
private:
SMESHGUI_SpinBox* myMaxAngleSpin;
virtual ~SMESHGUI_CuttingOfQuadsDlg();
protected:
- virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
+ virtual bool process( SMESH::SMESH_MeshEditor_ptr,
+ const SMESH::long_array& ,
+ SMESH::SMESH_IDSource_ptr obj);
protected slots:
virtual void onClose();
QCheckBox* myPreviewChk;
};
+/*!
+ * Class : SMESHGUI_CuttingIntoTetraDlg
+ * Description : Split all volumes into tetrahedrons
+ */
+class SMESHGUI_CuttingIntoTetraDlg : public SMESHGUI_MultiEditDlg
+{
+ Q_OBJECT
+
+public:
+ SMESHGUI_CuttingIntoTetraDlg( SMESHGUI* );
+ virtual ~SMESHGUI_CuttingIntoTetraDlg();
+
+protected:
+ virtual bool process( SMESH::SMESH_MeshEditor_ptr,
+ const SMESH::long_array&,
+ SMESH::SMESH_IDSource_ptr obj );
+};
+
#endif // SMESHGUI_MULTIEDITDLG_H
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_NodesDlg.cxx
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
+#include <SalomeApp_Application.h>
+
#include <SVTK_ViewWindow.h>
#include <VTKViewer_Algorithm.h>
#include <VTKViewer_CellLocationsArray.h>
double step = 25.0;
/* min, max, step and decimals for spin boxes */
- SpinBox_X->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY );
- SpinBox_Y->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY );
- SpinBox_Z->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY );
+ SpinBox_X->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, "length_precision" );
+ SpinBox_Y->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, "length_precision" );
+ SpinBox_Z->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, "length_precision" );
SpinBox_X->SetValue( 0.0 );
SpinBox_Y->SetValue( 0.0 );
SpinBox_Z->SetValue( 0.0 );
aParameters << SpinBox_Y->text();
aParameters << SpinBox_Z->text();
+ bool addToGroup = GroupGroups->isChecked();
+ QString aGroupName;
+
+ SMESH::SMESH_GroupBase_var aGroup;
+ int idx = 0;
+ if( addToGroup ) {
+ aGroupName = ComboBox_GroupName->currentText();
+ for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
+ QString aName = ComboBox_GroupName->itemText( i );
+ if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
+ idx = i;
+ }
+ if ( idx > 0 ) {
+ SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
+ if ( !aGeomGroup->_is_nil() ) {
+ int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
+ tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
+ tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
+ if ( res == 1 ) return false;
+ }
+ aGroup = myGroups[idx-1];
+ }
+ }
+
mySimulation->SetVisibility( false );
+
long aNodeId = SMESH::AddNode( myMesh, x, y, z, aParameters );
+
SMESH::SetPointRepresentation( true );
- if( aNodeId != -1 && GroupGroups->isChecked() ) {
- SMESH::SMESH_Group_var aGroup;
- QString aGroupName = ComboBox_GroupName->currentText();
- SMESH::ListOfGroups aListOfGroups = *myMesh->GetGroups();
- for( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
- SMESH::SMESH_GroupBase_var aGroupBase = aListOfGroups[i];
- if( !aGroupBase->_is_nil() ) {
- SMESH::SMESH_Group_var aRefGroup = SMESH::SMESH_Group::_narrow( aGroupBase );
- if( !aRefGroup->_is_nil() ) {
- QString aRefGroupName( aRefGroup->GetName() );
- if( aRefGroupName == aGroupName ) {
- aGroup = aRefGroup; // // add node to existing group
- break;
- }
- }
+ if ( aNodeId != -1 && addToGroup && !aGroupName.isEmpty() ) {
+ SMESH::SMESH_Group_var aGroupUsed;
+ if ( aGroup->_is_nil() ){
+ // create new group
+ aGroupUsed = SMESH::AddGroup( myMesh, SMESH::NODE, aGroupName );
+ if ( !aGroupUsed->_is_nil() ) {
+ myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
+ ComboBox_GroupName->addItem( aGroupName );
+ }
+ }
+ else {
+ SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
+ if ( !aGeomGroup->_is_nil() ) {
+ aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
+ if ( !aGroupUsed->_is_nil() && idx > 0 ) {
+ myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
+ SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
+ }
}
+ else
+ aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
}
- if( aGroup->_is_nil() ) // create new group
- aGroup = SMESH::AddGroup( myMesh, SMESH::NODE, aGroupName );
- if( !aGroup->_is_nil() ) {
+ if ( !aGroupUsed->_is_nil() ) {
SMESH::long_array_var anIdList = new SMESH::long_array;
anIdList->length( 1 );
anIdList[0] = aNodeId;
- aGroup->Add( anIdList.inout() );
+ aGroupUsed->Add( anIdList.inout() );
}
}
// process groups
if ( !myMesh->_is_nil() && myEntry != aCurrentEntry ) {
+ myGroups.clear();
ComboBox_GroupName->clear();
ComboBox_GroupName->addItem( QString() );
SMESH::ListOfGroups aListOfGroups = *myMesh->GetGroups();
for( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
- SMESH::SMESH_GroupBase_var aGroupBase = aListOfGroups[i];
- if ( !aGroupBase->_is_nil() && aGroupBase->GetType() == SMESH::NODE ) {
- SMESH::SMESH_Group_var aGroup = SMESH::SMESH_Group::_narrow( aGroupBase );
- if ( !aGroup->_is_nil() ) {
- QString aGroupName( aGroup->GetName() );
- if ( !aGroupName.isEmpty() )
- ComboBox_GroupName->addItem( aGroupName );
+ SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
+ if ( !aGroup->_is_nil() && aGroup->GetType() == SMESH::NODE ) {
+ QString aGroupName( aGroup->GetName() );
+ if ( !aGroupName.isEmpty() ) {
+ myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
+ ComboBox_GroupName->addItem( aGroupName );
}
}
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_NodesDlg.h
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
~SMESHGUI_NodesDlg();
private:
+ typedef QList<SMESH::SMESH_GroupBase_var> GrpList;
+
LightApp_SelectionMgr* mySelectionMgr;
SVTK_Selector* mySelector;
SMESHGUI* mySMESHGUI;
SMESH::SMESH_Mesh_var myMesh;
SMESH::TNodeSimulation* mySimulation;
QString myEntry;
+ GrpList myGroups;
void Init();
void enterEvent( QEvent* );
void keyPressEvent( QKeyEvent* );
bool isValid();
-
+
QGroupBox* GroupConstructors;
QRadioButton* Constructor1;
QGroupBox* GroupCoordinates;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMESHGUI_Operation.cxx
// Author : Sergey LITONIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMDS : implementaion of Salome mesh data structure
// File : SMESHGUI_Operation.h
// Author : Sergey LITONIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_PatternUtils.cxx
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_PatternUtils.h
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_PatternWidget.cxx
// Author : Michael ZORIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_PatternWidget.h
// Author : Michael ZORIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_Preferences_ColorDlg.cxx
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
#include "SMESHGUI_Preferences_ColorDlg.h"
#include "SMESHGUI.h"
+#include "SMESHGUI_SpinBox.h"
#include "SMESHGUI_Utils.h"
// SALOME GUI includes
#include <SUIT_Desktop.h>
#include <QtxColorButton.h>
-#include <QtxDoubleSpinBox.h>
-#include <QtxIntSpinBox.h>
+#include <VTKViewer_MarkerWidget.h>
+#include <SalomeApp_IntSpinBox.h>
// Qt includes
#include <QGroupBox>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QGridLayout>
-#include <QSpinBox>
#include <QCheckBox>
#define SPACING 6
btn0DElementsColor = new QtxColorButton( ButtonGroup1 );
QLabel* TextLabel_0DElements_Size = new QLabel( tr( "Size of 0D elements" ), ButtonGroup1 );
- SpinBox_0DElements_Size = new QSpinBox( ButtonGroup1 );
+ SpinBox_0DElements_Size = new SalomeApp_IntSpinBox( ButtonGroup1 );
+ SpinBox_0DElements_Size->setAcceptNames( false ); // No Notebook variables allowed
SpinBox_0DElements_Size->setRange( 1, 10 );
SpinBox_0DElements_Size->setSingleStep( 1 );
SpinBox_0DElements_Size->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SpinBox_0DElements_Size->setButtonSymbols( QSpinBox::PlusMinus );
QLabel* TextLabel_Width = new QLabel( tr( "Width" ), ButtonGroup1 );
- SpinBox_Width = new QSpinBox( ButtonGroup1 );
+ SpinBox_Width = new SalomeApp_IntSpinBox( ButtonGroup1 );
+ SpinBox_Width->setAcceptNames( false ); // No Notebook variables allowed
SpinBox_Width->setRange( 0, 5 );
SpinBox_Width->setSingleStep( 1 );
SpinBox_Width->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SpinBox_Width->setButtonSymbols( QSpinBox::PlusMinus );
QLabel* TextLabel_ShrinkCoeff = new QLabel( tr( "Shrink coef." ), ButtonGroup1 );
- SpinBox_Shrink = new QtxIntSpinBox( ButtonGroup1 );
+ SpinBox_Shrink = new SalomeApp_IntSpinBox( ButtonGroup1 );
+ SpinBox_Shrink->setAcceptNames( false ); // No Notebook variables allowed
SpinBox_Shrink->setRange( 20, 100 );
SpinBox_Shrink->setSingleStep( 1 );
SpinBox_Shrink->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
// -------------------------------
QGroupBox* ButtonGroup2 = new QGroupBox( tr( "Nodes" ), this );
- QHBoxLayout* ButtonGroup2Layout = new QHBoxLayout( ButtonGroup2 );
+ QGridLayout* ButtonGroup2Layout = new QGridLayout( ButtonGroup2 );
ButtonGroup2Layout->setSpacing( SPACING );
ButtonGroup2Layout->setMargin( MARGIN );
QLabel* TextLabel_Nodes_Color = new QLabel( tr( "Color" ), ButtonGroup2 );
btnNodeColor = new QtxColorButton( ButtonGroup2 );
- QLabel* TextLabel_Nodes_Size = new QLabel( tr( "Size" ), ButtonGroup2 );
- SpinBox_Nodes_Size = new QSpinBox( ButtonGroup2 );
- SpinBox_Nodes_Size->setRange( 0, 5 );
- SpinBox_Nodes_Size->setSingleStep( 1 );
- SpinBox_Nodes_Size->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- SpinBox_Nodes_Size->setButtonSymbols( QSpinBox::PlusMinus );
+ QGroupBox* MarkerGroup = new QGroupBox( tr( "Marker" ), ButtonGroup2 );
+ QVBoxLayout* MarkerGroupLayout = new QVBoxLayout( MarkerGroup );
+ MarkerGroupLayout->setSpacing( 0 );
+ MarkerGroupLayout->setMargin( 0 );
+
+ MarkerWidget = new VTKViewer_MarkerWidget( MarkerGroup );
+
+ MarkerGroupLayout->addWidget( MarkerWidget );
- ButtonGroup2Layout->addWidget( TextLabel_Nodes_Color );
- ButtonGroup2Layout->addWidget( btnNodeColor );
- ButtonGroup2Layout->addWidget( TextLabel_Nodes_Size );
- ButtonGroup2Layout->addWidget( SpinBox_Nodes_Size );
+ ButtonGroup2Layout->addWidget( TextLabel_Nodes_Color, 0, 0 );
+ ButtonGroup2Layout->addWidget( btnNodeColor, 0, 1 );
+ ButtonGroup2Layout->addWidget( MarkerGroup, 1, 0, 1, 3 );
+ ButtonGroup2Layout->setColumnStretch( 2, 1 );
// -------------------------------
QGroupBox* ButtonGroup3 = new QGroupBox( tr( "Orientation of faces" ), this );
btnOrientationColor = new QtxColorButton( ButtonGroup3 );
QLabel* TextLabel_Orientation_Scale = new QLabel( tr( "Scale" ), ButtonGroup3 );
- SpinBox_Orientation_Scale = new QtxDoubleSpinBox( ButtonGroup3 );
- SpinBox_Orientation_Scale->setRange( 0.05, 0.5 );
- SpinBox_Orientation_Scale->setSingleStep( 0.05 );
+ SpinBox_Orientation_Scale = new SMESHGUI_SpinBox( ButtonGroup3 );
+ SpinBox_Orientation_Scale->setAcceptNames( false ); // No Notebook variables allowed
+ SpinBox_Orientation_Scale->RangeStepAndValidator( .05, .5, .05, "parametric_precision" );
SpinBox_Orientation_Scale->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SpinBox_Orientation_Scale->setButtonSymbols( QSpinBox::PlusMinus );
{
switch ( type ) {
case 1 : SpinBox_Width->setValue( value ); break; // width
- case 2 : SpinBox_Nodes_Size->setValue( value ); break; // nodes size = value; break;
- case 3 : SpinBox_Shrink->setValue( value ); break; // shrink coeff
- case 4 : SpinBox_0DElements_Size->setValue( value ); break; // 0d elements
+ case 2 : SpinBox_Shrink->setValue( value ); break; // shrink coeff
+ case 3 : SpinBox_0DElements_Size->setValue( value ); break; // 0d elements
default: break;
}
}
int res = 0;
switch ( type ) {
case 1 : res = SpinBox_Width->value(); break; // width
- case 2 : res = SpinBox_Nodes_Size->value(); break; // nodes size
- case 3 : res = SpinBox_Shrink->value(); break; // shrink coeff
- case 4 : res = SpinBox_0DElements_Size->value(); break; // 0d elements
+ case 2 : res = SpinBox_Shrink->value(); break; // shrink coeff
+ case 3 : res = SpinBox_0DElements_Size->value(); break; // 0d elements
default: break;
}
return res;
}
return res;
}
+
+//=================================================================================
+// function : setCustomMarkerMap()
+// purpose :
+//=================================================================================
+void SMESHGUI_Preferences_ColorDlg::setCustomMarkerMap( VTK::MarkerMap theMarkerMap )
+{
+ MarkerWidget->setCustomMarkerMap( theMarkerMap );
+}
+
+//=================================================================================
+// function : getCustomMarkerMap()
+// purpose :
+//=================================================================================
+VTK::MarkerMap SMESHGUI_Preferences_ColorDlg::getCustomMarkerMap()
+{
+ return MarkerWidget->getCustomMarkerMap();
+}
+
+//=================================================================================
+// function : setStandardMarker()
+// purpose :
+//=================================================================================
+void SMESHGUI_Preferences_ColorDlg::setStandardMarker( VTK::MarkerType theMarkerType,
+ VTK::MarkerScale theMarkerScale )
+{
+ MarkerWidget->setStandardMarker( theMarkerType, theMarkerScale );
+}
+
+//=================================================================================
+// function : setCustomMarker()
+// purpose :
+//=================================================================================
+void SMESHGUI_Preferences_ColorDlg::setCustomMarker( int theId )
+{
+ MarkerWidget->setCustomMarker( theId );
+}
+
+//=================================================================================
+// function : getMarkerType()
+// purpose :
+//=================================================================================
+VTK::MarkerType SMESHGUI_Preferences_ColorDlg::getMarkerType() const
+{
+ return MarkerWidget->getMarkerType();
+}
+
+//=================================================================================
+// function : getStandardMarkerScale()
+// purpose :
+//=================================================================================
+VTK::MarkerScale SMESHGUI_Preferences_ColorDlg::getStandardMarkerScale() const
+{
+ return MarkerWidget->getStandardMarkerScale();
+}
+
+//=================================================================================
+// function : getCustomMarkerID()
+// purpose :
+//=================================================================================
+int SMESHGUI_Preferences_ColorDlg::getCustomMarkerID() const
+{
+ return MarkerWidget->getCustomMarkerID();
+}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_Preferences_ColorDlg.h
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
// SMESH includes
#include "SMESH_SMESHGUI.hxx"
+// SALOME GUI includes
+#include <VTKViewer_MarkerDef.h>
+
// Qt includes
#include <QDialog>
class QCheckBox;
-class QSpinBox;
class SMESHGUI;
-class QtxDoubleSpinBox;
-class QtxIntSpinBox;
+class SMESHGUI_SpinBox;
+class SalomeApp_IntSpinBox;
class QtxColorButton;
+class VTKViewer_MarkerWidget;
class SMESHGUI_EXPORT SMESHGUI_Preferences_ColorDlg : public QDialog
{
void SetBooleanValue( int, bool );
bool GetBooleanValue( int );
+ void setCustomMarkerMap( VTK::MarkerMap );
+ VTK::MarkerMap getCustomMarkerMap();
+
+ void setStandardMarker( VTK::MarkerType, VTK::MarkerScale );
+ void setCustomMarker( int );
+ VTK::MarkerType getMarkerType() const;
+ VTK::MarkerScale getStandardMarkerScale() const;
+ int getCustomMarkerID() const;
+
protected:
void closeEvent( QCloseEvent* );
QtxColorButton* btnBackFaceColor;
QtxColorButton* btnOutlineColor;
QtxColorButton* btn0DElementsColor;
- QSpinBox* SpinBox_0DElements_Size;
- QSpinBox* SpinBox_Width;
- QtxIntSpinBox* SpinBox_Shrink;
+ SalomeApp_IntSpinBox* SpinBox_0DElements_Size;
+ SalomeApp_IntSpinBox* SpinBox_Width;
+ SalomeApp_IntSpinBox* SpinBox_Shrink;
QtxColorButton* btnNodeColor;
- QSpinBox* SpinBox_Nodes_Size;
+ VTKViewer_MarkerWidget* MarkerWidget;
QtxColorButton* btnOrientationColor;
- QtxDoubleSpinBox* SpinBox_Orientation_Scale;
+ SMESHGUI_SpinBox* SpinBox_Orientation_Scale;
QCheckBox* CheckBox_Orientation_3DVectors;
};
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_Preferences_ScalarBarDlg.cxx
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
#include "SMESHGUI_Preferences_ScalarBarDlg.h"
#include "SMESHGUI.h"
+#include "SMESHGUI_SpinBox.h"
#include "SMESHGUI_VTKUtils.h"
#include "SMESHGUI_Utils.h"
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
#include <SALOME_ListIO.hxx>
+#include <SalomeApp_IntSpinBox.h>
-#include <QtxDoubleSpinBox.h>
#include <QtxColorButton.h>
// Qt includes
#include <QLineEdit>
#include <QPushButton>
#include <QRadioButton>
-#include <QSpinBox>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QGridLayout>
QHBoxLayout* myLabColorGrpLayout = new QHBoxLayout( myLabColorGrp );
myLabColorGrpLayout->setSpacing( SPACING_SIZE ); myLabColorGrpLayout->setMargin( MARGIN_SIZE );
- myColorsSpin = new QSpinBox( myLabColorGrp );
+ myColorsSpin = new SalomeApp_IntSpinBox( myLabColorGrp );
+ myColorsSpin->setAcceptNames( false ); // No Notebook variables allowed
myColorsSpin->setRange( 2, 256 );
myColorsSpin->setSingleStep( 1 );
myColorsSpin->setMinimumWidth( MINIMUM_WIDTH );
myColorsSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myLabelsSpin = new QSpinBox( myLabColorGrp );
+ myLabelsSpin = new SalomeApp_IntSpinBox( myLabColorGrp );
+ myLabelsSpin->setAcceptNames( false ); // No Notebook variables allowed
myLabelsSpin->setRange( 2, 65 );
myLabelsSpin->setSingleStep( 1 );
myLabelsSpin->setMinimumWidth( MINIMUM_WIDTH );
QGridLayout* myOriginDimGrpLayout = new QGridLayout( myOriginDimGrp );
myOriginDimGrpLayout->setSpacing( SPACING_SIZE ); myOriginDimGrpLayout->setMargin( MARGIN_SIZE );
- myXSpin = new QtxDoubleSpinBox (0.0, 1.0, 0.1, myOriginDimGrp);
+ myXSpin = new SMESHGUI_SpinBox(myOriginDimGrp);
+ myXSpin->setAcceptNames( false );
+ myXSpin->RangeStepAndValidator( 0.0, 1.0, 0.1, "parametric_precision" );
myXSpin->setMinimumWidth( MINIMUM_WIDTH );
myXSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myYSpin = new QtxDoubleSpinBox(0.0, 1.0, 0.1, myOriginDimGrp);
+ myYSpin = new SMESHGUI_SpinBox(myOriginDimGrp);
+ myYSpin->setAcceptNames( false );
+ myYSpin->RangeStepAndValidator( 0.0, 1.0, 0.1, "parametric_precision" );
myYSpin->setMinimumWidth( MINIMUM_WIDTH );
myYSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myWidthSpin = new QtxDoubleSpinBox(0.0, 1.0, 0.1, myOriginDimGrp);
+ myWidthSpin = new SMESHGUI_SpinBox(myOriginDimGrp);
+ myWidthSpin->setAcceptNames( false );
+ myWidthSpin->RangeStepAndValidator( 0.0, 1.0, 0.1, "parametric_precision" );
myWidthSpin->setMinimumWidth( MINIMUM_WIDTH );
myWidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myHeightSpin = new QtxDoubleSpinBox(0.0, 1.0, 0.1, myOriginDimGrp);
+ myHeightSpin = new SMESHGUI_SpinBox(myOriginDimGrp);
+ myHeightSpin->setAcceptNames( false );
+ myHeightSpin->RangeStepAndValidator( 0.0, 1.0, 0.1, "parametric_precision" );
myHeightSpin->setMinimumWidth( MINIMUM_WIDTH );
myHeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_Preferences_ScalarBarDlg.h
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
class QPushButton;
class QToolButton;
class QRadioButton;
-class QSpinBox;
class SMESHGUI;
class SMESH_Actor;
-class QtxDoubleSpinBox;
+class SMESHGUI_SpinBox;
+class SalomeApp_IntSpinBox;
class QtxColorButton;
class LightApp_SelectionMgr;
QCheckBox* myLabelsShadowCheck;
QGroupBox* myLabColorGrp;
- QSpinBox* myColorsSpin;
- QSpinBox* myLabelsSpin;
+ SalomeApp_IntSpinBox* myColorsSpin;
+ SalomeApp_IntSpinBox* myLabelsSpin;
QGroupBox* myOrientationGrp;
QRadioButton* myVertRadioBtn;
QRadioButton* myHorizRadioBtn;
QGroupBox* myOriginDimGrp;
- QtxDoubleSpinBox* myXSpin;
- QtxDoubleSpinBox* myYSpin;
- QtxDoubleSpinBox* myWidthSpin;
- QtxDoubleSpinBox* myHeightSpin;
+ SMESHGUI_SpinBox* myXSpin;
+ SMESHGUI_SpinBox* myYSpin;
+ SMESHGUI_SpinBox* myWidthSpin;
+ SMESHGUI_SpinBox* myHeightSpin;
QGroupBox* myButtonGrp;
QPushButton* myOkBtn;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_RemoveElementsDlg.cxx
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_RemoveElementsDlg.h
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_RemoveNodesDlg.cxx
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_RemoveNodesDlg.h
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_RenumberingDlg.cxx
// Author : Michael ZORIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_RenumberingDlg.h
// Author : Michael ZORIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_RevolutionDlg.cxx
// Author : Michael ZORIN, Open CASCADE S.A.S.
SMESHGUI_RevolutionDlgLayout->addWidget(GroupButtons);
/* Initialisations */
- SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
+ SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
RadioButton3->setChecked(true);
- SpinBox_Angle->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5.0, 3);
+ SpinBox_Angle->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5.0, "angle_precision");
SpinBox_NbSteps->setRange(1, 999999);
- SpinBox_Tolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, 6);
+ SpinBox_Tolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, "len_tol_precision");
RadioButton1->setChecked(true);
SMESH_Actor* anActor = SMESH::FindActorByObject(aMeshVar);
if (!anActor)
anActor = SMESH::FindActorByEntry(IO->getEntry());
- if (!anActor)
+ if (!anActor && !CheckBoxMesh->isChecked())
return;
int aNbUnits = 0;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_RevolutionDlg.h
// Author : Michael ZORIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_RotationDlg.cxx
// Author : Michael ZORIN, Open CASCADE S.A.S.
SMESHGUI_RotationDlgLayout->addWidget(GroupButtons);
/* Initialisations */
- SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
+ SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
- SpinBox_Angle->RangeStepAndValidator(-360.0, +360.0, 5.0, 3);
+ SpinBox_Angle->RangeStepAndValidator(-360.0, +360.0, 5.0, "angle_precision");
myConstructorId = 0;
RadioButton1->setChecked(true);
myActor = SMESH::FindActorByObject(myMesh);
if (!myActor)
myActor = SMESH::FindActorByEntry(IO->getEntry());
- if (!myActor)
+ if (!myActor && !CheckBoxMesh->isChecked())
return;
int aNbUnits = 0;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_RotationDlg.h
// Author : Michael ZORIN, Open CASCADE S.A.S.
--- /dev/null
+// 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
+//
+
+// SMESH SMESHGUI : GUI for SMESH component
+// File : SMESHGUI_ScaleDlg.cxx
+// Author : Michael ZORIN, Open CASCADE S.A.S.
+// SMESH includes
+//
+#include "SMESHGUI_ScaleDlg.h"
+
+#include "SMESHGUI.h"
+#include "SMESHGUI_SpinBox.h"
+#include "SMESHGUI_Utils.h"
+#include "SMESHGUI_VTKUtils.h"
+#include "SMESHGUI_MeshUtils.h"
+#include "SMESHGUI_IdValidator.h"
+#include "SMESHGUI_FilterDlg.h"
+
+#include <SMESH_Actor.h>
+#include <SMESH_TypeFilter.hxx>
+#include <SMESH_LogicalFilter.hxx>
+#include <SMDS_Mesh.hxx>
+
+// SALOME GUI includes
+#include <SUIT_Desktop.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_OverrideCursor.h>
+
+#include <LightApp_Application.h>
+#include <LightApp_SelectionMgr.h>
+
+#include <SVTK_ViewModel.h>
+#include <SVTK_ViewWindow.h>
+#include <SALOME_ListIO.hxx>
+
+// SALOME KERNEL includes
+#include <SALOMEDSClient_SObject.hxx>
+
+// OCCT includes
+#include <TColStd_MapOfInteger.hxx>
+
+// Qt includes
+#include <QApplication>
+#include <QButtonGroup>
+#include <QGroupBox>
+#include <QLabel>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QRadioButton>
+#include <QCheckBox>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
+#include <QGridLayout>
+#include <QSpinBox>
+#include <QKeyEvent>
+
+// IDL includes
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SMESH_Group)
+#include CORBA_SERVER_HEADER(SMESH_MeshEditor)
+
+enum { MOVE_ELEMS_BUTTON = 0, COPY_ELEMS_BUTTON, MAKE_MESH_BUTTON }; //!< action type
+
+/*!
+ \class BusyLocker
+ \brief Simple 'busy state' flag locker.
+ \internal
+*/
+
+class BusyLocker
+{
+public:
+ //! Constructor. Sets passed boolean flag to \c true.
+ BusyLocker( bool& busy ) : myBusy( busy ) { myBusy = true; }
+ //! Destructor. Clear external boolean flag passed as parameter to the constructor to \c false.
+ ~BusyLocker() { myBusy = false; }
+private:
+ bool& myBusy; //! External 'busy state' boolean flag
+};
+
+#define SPACING 6
+#define MARGIN 11
+
+//=================================================================================
+// class : SMESHGUI_ScaleDlg()
+// purpose :
+//=================================================================================
+SMESHGUI_ScaleDlg::SMESHGUI_ScaleDlg( SMESHGUI* theModule )
+ : QDialog( SMESH::GetDesktop( theModule ) ),
+ mySMESHGUI( theModule ),
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
+ myFilterDlg(0),
+ mySelectedObject(SMESH::SMESH_IDSource::_nil())
+{
+ QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_MESH_SCALE")));
+ QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_SCALE_ALONG_AXES")));
+ QPixmap image2 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
+
+ setModal(false);
+ setAttribute(Qt::WA_DeleteOnClose, true);
+ setWindowTitle(tr("SMESH_SCALE_TITLE"));
+ setSizeGripEnabled(true);
+
+ QVBoxLayout* SMESHGUI_ScaleDlgLayout = new QVBoxLayout(this);
+ SMESHGUI_ScaleDlgLayout->setSpacing(SPACING);
+ SMESHGUI_ScaleDlgLayout->setMargin(MARGIN);
+
+ /***************************************************************/
+ ConstructorsBox = new QGroupBox(tr("SMESH_SCALE"), this);
+ GroupConstructors = new QButtonGroup(this);
+ QHBoxLayout* ConstructorsBoxLayout = new QHBoxLayout(ConstructorsBox);
+ ConstructorsBoxLayout->setSpacing(SPACING);
+ ConstructorsBoxLayout->setMargin(MARGIN);
+
+ RadioButton1= new QRadioButton(ConstructorsBox);
+ RadioButton1->setIcon(image0);
+ RadioButton2= new QRadioButton(ConstructorsBox);
+ RadioButton2->setIcon(image1);
+
+ ConstructorsBoxLayout->addWidget(RadioButton1);
+ ConstructorsBoxLayout->addWidget(RadioButton2);
+ GroupConstructors->addButton(RadioButton1, 0);
+ GroupConstructors->addButton(RadioButton2, 1);
+
+ /***************************************************************/
+ GroupArguments = new QGroupBox(tr("SMESH_ARGUMENTS"), this);
+ QGridLayout* GroupArgumentsLayout = new QGridLayout(GroupArguments);
+ GroupArgumentsLayout->setSpacing(SPACING);
+ GroupArgumentsLayout->setMargin(MARGIN);
+
+ myIdValidator = new SMESHGUI_IdValidator(this);
+
+ // Controls for elements selection
+ TextLabelElements = new QLabel(tr("SMESH_ID_ELEMENTS"), GroupArguments);
+ SelectElementsButton = new QPushButton(GroupArguments);
+ SelectElementsButton->setIcon(image2);
+ LineEditElements = new QLineEdit(GroupArguments);
+ LineEditElements->setValidator(myIdValidator);
+ myFilterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
+ connect(myFilterBtn, SIGNAL(clicked()), this, SLOT(setFilters()));
+
+ // Control for the whole mesh selection
+ CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
+
+ // Controls for vector and points selection
+ TextLabel1 = new QLabel(tr("SMESH_BASE_POINT"), GroupArguments);
+ SelectButton1 = new QPushButton(GroupArguments);
+ SelectButton1->setIcon(image2);
+
+ TextLabel1_1 = new QLabel(tr("SMESH_X"), GroupArguments);
+ SpinBox1_1 = new SMESHGUI_SpinBox(GroupArguments);
+ TextLabel1_2 = new QLabel(tr("SMESH_Y"), GroupArguments);
+ SpinBox1_2 = new SMESHGUI_SpinBox(GroupArguments);
+ TextLabel1_3 = new QLabel(tr("SMESH_Z"), GroupArguments);
+ SpinBox1_3 = new SMESHGUI_SpinBox(GroupArguments);
+
+ TextLabel2 = new QLabel(tr("SMESH_SCALE_FACTOR"), GroupArguments);
+ SpinBox_FX = new SMESHGUI_SpinBox(GroupArguments);
+
+ TextLabel3 = new QLabel(tr("SMESH_SCALE_FACTOR_Y"), GroupArguments);
+ SpinBox_FY = new SMESHGUI_SpinBox(GroupArguments);
+
+ TextLabel4 = new QLabel(tr("SMESH_SCALE_FACTOR_Z"), GroupArguments);
+ SpinBox_FZ = new SMESHGUI_SpinBox(GroupArguments);
+
+
+ // switch of action type
+ ActionBox = new QGroupBox(GroupArguments);
+ ActionGroup = new QButtonGroup(GroupArguments);
+ QVBoxLayout* ActionBoxLayout = new QVBoxLayout(ActionBox);
+ ActionBoxLayout->addSpacing(SPACING);
+ ActionBoxLayout->setMargin(MARGIN);
+
+ QRadioButton* aMoveElements = new QRadioButton(tr("SMESH_MOVE_ELEMENTS"), ActionBox);
+ QRadioButton* aCopyElements = new QRadioButton(tr("SMESH_COPY_ELEMENTS"), ActionBox);
+ QRadioButton* aCreateMesh = new QRadioButton(tr("SMESH_CREATE_MESH"), ActionBox);
+
+ ActionBoxLayout->addWidget(aMoveElements);
+ ActionBoxLayout->addWidget(aCopyElements);
+ ActionBoxLayout->addWidget(aCreateMesh);
+ ActionGroup->addButton(aMoveElements, MOVE_ELEMS_BUTTON);
+ ActionGroup->addButton(aCopyElements, COPY_ELEMS_BUTTON);
+ ActionGroup->addButton(aCreateMesh, MAKE_MESH_BUTTON);
+
+ // CheckBox for groups generation
+ MakeGroupsCheck = new QCheckBox(tr("SMESH_MAKE_GROUPS"), GroupArguments);
+ MakeGroupsCheck->setChecked(false);
+
+ // Name of a mesh to create
+ LineEditNewMesh = new QLineEdit(GroupArguments);
+
+ // layout
+ GroupArgumentsLayout->addWidget(TextLabelElements, 0, 0);
+ GroupArgumentsLayout->addWidget(SelectElementsButton, 0, 1);
+ GroupArgumentsLayout->addWidget(LineEditElements, 0, 2, 1, 5);
+ GroupArgumentsLayout->addWidget(myFilterBtn, 0, 7);
+ GroupArgumentsLayout->addWidget(CheckBoxMesh, 1, 0, 1, 8);
+ GroupArgumentsLayout->addWidget(TextLabel1, 2, 0);
+ GroupArgumentsLayout->addWidget(SelectButton1, 2, 1);
+ GroupArgumentsLayout->addWidget(TextLabel1_1, 2, 2);
+ GroupArgumentsLayout->addWidget(SpinBox1_1, 2, 3);
+ GroupArgumentsLayout->addWidget(TextLabel1_2, 2, 4);
+ GroupArgumentsLayout->addWidget(SpinBox1_2, 2, 5);
+ GroupArgumentsLayout->addWidget(TextLabel1_3, 2, 6);
+ GroupArgumentsLayout->addWidget(SpinBox1_3, 2, 7);
+ GroupArgumentsLayout->addWidget(TextLabel2, 3, 0);
+ GroupArgumentsLayout->addWidget(SpinBox_FX, 3, 3);
+ GroupArgumentsLayout->addWidget(TextLabel3, 4, 0);
+ GroupArgumentsLayout->addWidget(SpinBox_FY, 4, 3);
+ GroupArgumentsLayout->addWidget(TextLabel4, 5, 0);
+ GroupArgumentsLayout->addWidget(SpinBox_FZ, 5, 3);
+ GroupArgumentsLayout->addWidget(ActionBox, 7, 0, 3, 4);
+ GroupArgumentsLayout->addWidget(MakeGroupsCheck, 7, 5, 1, 4);
+ GroupArgumentsLayout->addWidget(LineEditNewMesh, 8, 5, 1, 4);
+
+ /***************************************************************/
+ GroupButtons = new QGroupBox(this);
+ QHBoxLayout* GroupButtonsLayout = new QHBoxLayout(GroupButtons);
+ GroupButtonsLayout->setSpacing(SPACING);
+ GroupButtonsLayout->setMargin(MARGIN);
+
+ buttonOk = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), GroupButtons);
+ buttonOk->setAutoDefault(true);
+ buttonOk->setDefault(true);
+ buttonApply = new QPushButton(tr("SMESH_BUT_APPLY"), GroupButtons);
+ buttonApply->setAutoDefault(true);
+ buttonCancel = new QPushButton(tr("SMESH_BUT_CLOSE"), GroupButtons);
+ buttonCancel->setAutoDefault(true);
+ buttonHelp = new QPushButton(tr("SMESH_BUT_HELP"), GroupButtons);
+ buttonHelp->setAutoDefault(true);
+
+ GroupButtonsLayout->addWidget(buttonOk);
+ GroupButtonsLayout->addSpacing(10);
+ GroupButtonsLayout->addWidget(buttonApply);
+ GroupButtonsLayout->addSpacing(10);
+ GroupButtonsLayout->addStretch();
+ GroupButtonsLayout->addWidget(buttonCancel);
+ GroupButtonsLayout->addWidget(buttonHelp);
+
+ /***************************************************************/
+ SMESHGUI_ScaleDlgLayout->addWidget(ConstructorsBox);
+ SMESHGUI_ScaleDlgLayout->addWidget(GroupArguments);
+ SMESHGUI_ScaleDlgLayout->addWidget(GroupButtons);
+
+ /* Initialisations */
+ SpinBox1_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox1_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox1_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_FX->RangeStepAndValidator(1.e-6, 1.e+6, 1.0, "parametric_precision");
+ SpinBox_FX->SetStep(0.1);
+ SpinBox_FY->RangeStepAndValidator(1.e-6, 1.e+6, 1.0, "parametric_precision");
+ SpinBox_FY->SetStep(0.1);
+ SpinBox_FZ->RangeStepAndValidator(1.e-6, 1.e+6, 1.0, "parametric_precision");
+ SpinBox_FZ->SetStep(0.1);
+
+ RadioButton1->setChecked(true);
+
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
+ mySMESHGUI->SetActiveDialogBox((QDialog*)this);
+
+ // Costruction of the logical filter
+ SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
+ SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP);
+
+ QList<SUIT_SelectionFilter*> aListOfFilters;
+ if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
+ if (aSmeshGroupFilter) aListOfFilters.append(aSmeshGroupFilter);
+
+ myMeshOrSubMeshOrGroupFilter =
+ new SMESH_LogicalFilter(aListOfFilters, SMESH_LogicalFilter::LO_OR);
+
+ myHelpFileName = "scale_page.html";
+
+ Init();
+
+ /* signals and slots connections */
+ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+ connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
+ connect(GroupConstructors, SIGNAL(buttonClicked(int)), SLOT(ConstructorsClicked(int)));
+
+ connect(SelectElementsButton, SIGNAL (clicked()), this, SLOT(SetEditCurrentArgument()));
+ connect(SelectButton1, SIGNAL (clicked()), this, SLOT(SetEditCurrentArgument()));
+
+ connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
+ connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+ /* to close dialog if study change */
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
+ connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
+ connect(ActionGroup, SIGNAL(buttonClicked(int)), SLOT(onActionClicked(int)));
+
+ ConstructorsClicked(0);
+ SelectionIntoArgument();
+ onActionClicked(MOVE_ELEMS_BUTTON);
+}
+
+//=================================================================================
+// function : ~SMESHGUI_ScaleDlg()
+// purpose : Destroys the object and frees any allocated resources
+//=================================================================================
+SMESHGUI_ScaleDlg::~SMESHGUI_ScaleDlg()
+{
+ if ( myFilterDlg ) {
+ myFilterDlg->setParent( 0 );
+ delete myFilterDlg;
+ myFilterDlg = 0;
+ }
+}
+
+//=================================================================================
+// function : Init()
+// purpose :
+//=================================================================================
+void SMESHGUI_ScaleDlg::Init (bool ResetControls)
+{
+ myBusy = false;
+
+ myEditCurrentArgument = 0;
+ LineEditElements->clear();
+ myElementsId = "";
+ myNbOkElements = 0;
+
+ buttonOk->setEnabled(false);
+ buttonApply->setEnabled(false);
+
+ myActor = 0;
+ myMesh = SMESH::SMESH_Mesh::_nil();
+
+ if (ResetControls) {
+ SpinBox1_1->SetValue(0.0);
+ SpinBox1_2->SetValue(0.0);
+ SpinBox1_3->SetValue(0.0);
+ SpinBox_FX->SetValue(1.0);
+ SpinBox_FY->SetValue(1.0);
+ SpinBox_FZ->SetValue(1.0);
+
+ ActionGroup->button( MOVE_ELEMS_BUTTON )->setChecked(true);
+ CheckBoxMesh->setChecked(false);
+ onSelectMesh(false);
+ }
+}
+
+//=================================================================================
+// function : ConstructorsClicked()
+// purpose : Radio button management
+//=================================================================================
+void SMESHGUI_ScaleDlg::ConstructorsClicked (int constructorId)
+{
+ disconnect(mySelectionMgr, 0, this, 0);
+
+ switch (constructorId) {
+ case 0:
+ {
+ TextLabel2->setText(tr("SMESH_SCALE_FACTOR"));
+ TextLabel3->hide();
+ TextLabel4->hide();
+ SpinBox_FY->hide();
+ SpinBox_FZ->hide();
+ break;
+ }
+ case 1:
+ {
+ TextLabel2->setText(tr("SMESH_SCALE_FACTOR_X"));
+ TextLabel3->show();
+ TextLabel4->show();
+ SpinBox_FY->show();
+ SpinBox_FZ->show();
+ break;
+ }
+ }
+
+ if (myEditCurrentArgument != (QWidget*)LineEditElements) {
+ SMESH::SetPointRepresentation(false);
+ if (!CheckBoxMesh->isChecked())
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( CellSelection );
+ }
+
+ myEditCurrentArgument = (QWidget*)LineEditElements;
+ LineEditElements->setFocus();
+
+ if (CheckBoxMesh->isChecked())
+ onSelectMesh(true);
+
+ connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+ QApplication::instance()->processEvents();
+ updateGeometry();
+ resize(100,100);
+}
+
+//=================================================================================
+// function : ClickOnApply()
+// purpose :
+//=================================================================================
+bool SMESHGUI_ScaleDlg::ClickOnApply()
+{
+ if (mySMESHGUI->isActiveStudyLocked())
+ return false;
+
+ if( !isValid() )
+ return false;
+
+ if (myNbOkElements) {
+ QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
+
+ SMESH::long_array_var anElementsId = new SMESH::long_array;
+
+ anElementsId->length(aListElementsId.count());
+ for (int i = 0; i < aListElementsId.count(); i++)
+ anElementsId[i] = aListElementsId[i].toInt();
+
+ SMESH::PointStruct aPoint;
+ aPoint.x = SpinBox1_1->GetValue();
+ aPoint.y = SpinBox1_2->GetValue();
+ aPoint.z = SpinBox1_3->GetValue();
+ SMESH::double_array_var aScaleFact = new SMESH::double_array;
+ aScaleFact->length(3);
+ aScaleFact[0] = SpinBox_FX->GetValue();
+ if (GetConstructorId() == 0) {
+ aScaleFact[1] = SpinBox_FX->GetValue();
+ aScaleFact[2] = SpinBox_FX->GetValue();
+ }
+ else {
+ aScaleFact[1] = SpinBox_FY->GetValue();
+ aScaleFact[2] = SpinBox_FZ->GetValue();
+ }
+
+ QStringList aParameters;
+ aParameters << SpinBox1_1->text();
+ aParameters << SpinBox1_2->text();
+ aParameters << SpinBox1_3->text();
+ aParameters << SpinBox_FX->text();
+ if (GetConstructorId() == 1) {
+ aParameters << SpinBox_FX->text();
+ aParameters << SpinBox_FX->text();
+ }
+ else {
+ aParameters << SpinBox_FY->text();
+ aParameters << SpinBox_FZ->text();
+ }
+
+ int actionButton = ActionGroup->checkedId();
+ bool makeGroups = ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() );
+ try {
+ SUIT_OverrideCursor aWaitCursor;
+ SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
+ switch ( actionButton ) {
+ case MOVE_ELEMS_BUTTON:
+ if(CheckBoxMesh->isChecked()) {
+ aMeshEditor->Scale(mySelectedObject, aPoint, aScaleFact, false);
+ }
+ else {
+ SMESH::SMESH_IDSource_ptr anObj = aMeshEditor->MakeIDSource(anElementsId);
+ aMeshEditor->Scale(anObj, aPoint, aScaleFact, false);
+ }
+ if( !myMesh->_is_nil())
+ myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ break;
+ case COPY_ELEMS_BUTTON:
+ if ( makeGroups ) {
+ SMESH::ListOfGroups_var groups;
+ if(CheckBoxMesh->isChecked()) {
+ groups = aMeshEditor->ScaleMakeGroups(mySelectedObject, aPoint, aScaleFact);
+ }
+ else {
+ groups = aMeshEditor->ScaleMakeGroups(aMeshEditor->MakeIDSource(anElementsId),
+ aPoint, aScaleFact);
+ }
+ }
+ else {
+ if(CheckBoxMesh->isChecked()) {
+ aMeshEditor->Scale(mySelectedObject, aPoint, aScaleFact, true);
+ }
+ else {
+ aMeshEditor->Scale(aMeshEditor->MakeIDSource(anElementsId),
+ aPoint, aScaleFact, true);
+ }
+ }
+ if( !myMesh->_is_nil())
+ myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ break;
+ case MAKE_MESH_BUTTON:
+ SMESH::SMESH_Mesh_var mesh;
+ if(CheckBoxMesh->isChecked()) {
+ mesh = aMeshEditor->ScaleMakeMesh(mySelectedObject, aPoint, aScaleFact, makeGroups,
+ LineEditNewMesh->text().toLatin1().data());
+ }
+ else {
+ mesh = aMeshEditor->ScaleMakeMesh(aMeshEditor->MakeIDSource(anElementsId),
+ aPoint, aScaleFact, makeGroups,
+ LineEditNewMesh->text().toLatin1().data());
+ }
+ if( !mesh->_is_nil())
+ mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ }
+ } catch (...) {
+ }
+
+ SMESH::UpdateView();
+ if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
+ actionButton == MAKE_MESH_BUTTON )
+ mySMESHGUI->updateObjBrowser(true); // new groups may appear
+ Init(false);
+ ConstructorsClicked(GetConstructorId());
+ mySelectedObject = SMESH::SMESH_IDSource::_nil();
+ SelectionIntoArgument();
+ }
+
+ return true;
+}
+
+//=================================================================================
+// function : ClickOnOk()
+// purpose :
+//=================================================================================
+void SMESHGUI_ScaleDlg::ClickOnOk()
+{
+ if( ClickOnApply() )
+ ClickOnCancel();
+}
+
+//=================================================================================
+// function : ClickOnCancel()
+// purpose :
+//=================================================================================
+void SMESHGUI_ScaleDlg::ClickOnCancel()
+{
+ disconnect(mySelectionMgr, 0, this, 0);
+ mySelectionMgr->clearFilters();
+ //mySelectionMgr->clearSelected();
+ if (SMESH::GetCurrentVtkView()) {
+ SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
+ SMESH::SetPointRepresentation(false);
+ }
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( ActorSelection );
+ mySMESHGUI->ResetState();
+ reject();
+}
+
+//=================================================================================
+// function : ClickOnHelp()
+// purpose :
+//=================================================================================
+void SMESHGUI_ScaleDlg::ClickOnHelp()
+{
+ LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+ if (app)
+ app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
+ else {
+ QString platform;
+#ifdef WIN32
+ platform = "winapplication";
+#else
+ platform = "application";
+#endif
+ SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser",
+ platform)).
+ arg(myHelpFileName));
+ }
+}
+
+//=======================================================================
+// function : onTextChange()
+// purpose :
+//=======================================================================
+void SMESHGUI_ScaleDlg::onTextChange (const QString& theNewText)
+{
+ QLineEdit* send = (QLineEdit*)sender();
+
+ if (myBusy) return;
+ BusyLocker lock( myBusy );
+
+ if (send == LineEditElements)
+ myNbOkElements = 0;
+
+ buttonOk->setEnabled(false);
+ buttonApply->setEnabled(false);
+
+ // hilight entered elements
+ SMDS_Mesh* aMesh = 0;
+ if (myActor)
+ aMesh = myActor->GetObject()->GetMesh();
+
+ if (aMesh) {
+ Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
+
+ TColStd_MapOfInteger newIndices;
+
+ QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
+
+ if (send == LineEditElements) {
+ for (int i = 0; i < aListId.count(); i++) {
+ const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
+ if (e)
+ newIndices.Add(e->GetID());
+ myNbOkElements++;
+ }
+ }
+
+ mySelector->AddOrRemoveIndex( anIO, newIndices, false );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( anIO, true, true );
+
+ myElementsId = theNewText;
+ }
+
+ if (myNbOkElements) {
+ buttonOk->setEnabled(true);
+ buttonApply->setEnabled(true);
+ }
+}
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose : Called when selection as changed or other case
+//=================================================================================
+void SMESHGUI_ScaleDlg::SelectionIntoArgument()
+{
+ if (myBusy) return;
+ BusyLocker lock( myBusy );
+ // clear
+ myActor = 0;
+ QString aString = "";
+
+ if (myEditCurrentArgument == (QWidget*)LineEditElements) {
+ LineEditElements->setText(aString);
+ myNbOkElements = 0;
+ buttonOk->setEnabled(false);
+ buttonApply->setEnabled(false);
+ }
+
+ if (!GroupButtons->isEnabled()) // inactive
+ return;
+
+ // get selected mesh
+ SALOME_ListIO aList;
+ mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
+
+ int nbSel = aList.Extent();
+ if (nbSel != 1)
+ return;
+
+ Handle(SALOME_InteractiveObject) IO = aList.First();
+ myMesh = SMESH::GetMeshByIO(IO);
+ if (myMesh->_is_nil())
+ return;
+
+ myActor = SMESH::FindActorByObject(myMesh);
+ if (!myActor)
+ myActor = SMESH::FindActorByEntry(IO->getEntry());
+ if (!myActor && !CheckBoxMesh->isChecked())
+ return;
+
+ int aNbUnits = 0;
+
+ if (myEditCurrentArgument == (QWidget*)LineEditElements) {
+ myElementsId = "";
+
+ // MakeGroups is available if there are groups and "Copy"
+ if ( myMesh->NbGroups() == 0 ) {
+ MakeGroupsCheck->setChecked(false);
+ MakeGroupsCheck->setEnabled(false);
+ }
+ else if ( ActionGroup->checkedId() != MOVE_ELEMS_BUTTON ) {
+ MakeGroupsCheck->setEnabled(true);
+ }
+
+ if (CheckBoxMesh->isChecked()) {
+ SMESH::GetNameOfSelectedIObjects( mySelectionMgr, aString );
+
+ if (!SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(IO)->_is_nil()) { //MESH, SUBMESH, OR GROUP
+ mySelectedObject = SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(IO);
+ }
+ else
+ return;
+ // get IDs from mesh
+ /*
+ SMDS_Mesh* aSMDSMesh = myActor->GetObject()->GetMesh();
+ if (!aSMDSMesh)
+ return;
+
+ for (int i = aSMDSMesh->MinElementID(); i <= aSMDSMesh->MaxElementID(); i++) {
+ const SMDS_MeshElement * e = aSMDSMesh->FindElement(i);
+ if (e) {
+ myElementsId += QString(" %1").arg(i);
+ aNbUnits++;
+ }
+ }
+ } else if (!SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO)->_is_nil()) { //SUBMESH
+ // get submesh
+ SMESH::SMESH_subMesh_var aSubMesh = SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO);
+
+ // get IDs from submesh
+ SMESH::long_array_var anElementsIds = new SMESH::long_array;
+ anElementsIds = aSubMesh->GetElementsId();
+ for (int i = 0; i < anElementsIds->length(); i++) {
+ myElementsId += QString(" %1").arg(anElementsIds[i]);
+ }
+ aNbUnits = anElementsIds->length();
+ } else { // GROUP
+ // get smesh group
+ SMESH::SMESH_GroupBase_var aGroup =
+ SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IO);
+ if (aGroup->_is_nil())
+ return;
+
+ // get IDs from smesh group
+ SMESH::long_array_var anElementsIds = new SMESH::long_array;
+ anElementsIds = aGroup->GetListOfID();
+ for (int i = 0; i < anElementsIds->length(); i++) {
+ myElementsId += QString(" %1").arg(anElementsIds[i]);
+ }
+ aNbUnits = anElementsIds->length();
+ }
+ */
+ } else {
+ aNbUnits = SMESH::GetNameOfSelectedElements(mySelector, IO, aString);
+ myElementsId = aString;
+ if (aNbUnits < 1)
+ return;
+ }
+
+ myNbOkElements = true;
+ } else {
+ aNbUnits = SMESH::GetNameOfSelectedNodes(mySelector, IO, aString);
+ if (aNbUnits != 1)
+ return;
+
+ SMDS_Mesh* aMesh = myActor->GetObject()->GetMesh();
+ if (!aMesh)
+ return;
+
+ const SMDS_MeshNode * n = aMesh->FindNode(aString.toInt());
+ if (!n)
+ return;
+
+ double x = n->X();
+ double y = n->Y();
+ double z = n->Z();
+
+ if (myEditCurrentArgument == (QWidget*)SpinBox1_1) {
+ SpinBox1_1->SetValue(x);
+ SpinBox1_2->SetValue(y);
+ SpinBox1_3->SetValue(z);
+ }
+ else if (myEditCurrentArgument == (QWidget*)SpinBox_FX) {
+ SpinBox_FX->SetValue(x);
+ SpinBox_FY->SetValue(y);
+ SpinBox_FZ->SetValue(z);
+ }
+ }
+
+ if (myEditCurrentArgument == (QWidget*)LineEditElements) {
+ LineEditElements->setText(aString);
+ LineEditElements->repaint();
+ LineEditElements->setEnabled(false); // to fully update lineedit IPAL 19809
+ LineEditElements->setEnabled(true);
+ setNewMeshName();
+ }
+
+ // OK
+ if (myNbOkElements) {
+ buttonOk->setEnabled(true);
+ buttonApply->setEnabled(true);
+ }
+}
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose :
+//=================================================================================
+void SMESHGUI_ScaleDlg::SetEditCurrentArgument()
+{
+ QPushButton* send = (QPushButton*)sender();
+
+ disconnect(mySelectionMgr, 0, this, 0);
+ mySelectionMgr->clearSelected();
+ mySelectionMgr->clearFilters();
+
+ if (send == SelectElementsButton) {
+ myEditCurrentArgument = (QWidget*)LineEditElements;
+ SMESH::SetPointRepresentation(false);
+ if (CheckBoxMesh->isChecked()) {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( ActorSelection );
+ mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
+ }
+ else {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( CellSelection );
+ }
+ }
+ else if (send == SelectButton1) {
+ myEditCurrentArgument = (QWidget*)SpinBox1_1;
+ SMESH::SetPointRepresentation(true);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( NodeSelection );
+ }
+
+ myEditCurrentArgument->setFocus();
+ connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+ SelectionIntoArgument();
+}
+
+//=================================================================================
+// function : DeactivateActiveDialog()
+// purpose :
+//=================================================================================
+void SMESHGUI_ScaleDlg::DeactivateActiveDialog()
+{
+ if (ConstructorsBox->isEnabled()) {
+ ConstructorsBox->setEnabled(false);
+ GroupArguments->setEnabled(false);
+ GroupButtons->setEnabled(false);
+ mySMESHGUI->ResetState();
+ mySMESHGUI->SetActiveDialogBox(0);
+ }
+}
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose :
+//=================================================================================
+void SMESHGUI_ScaleDlg::ActivateThisDialog()
+{
+ /* Emit a signal to deactivate the active dialog */
+ mySMESHGUI->EmitSignalDeactivateDialog();
+ ConstructorsBox->setEnabled(true);
+ GroupArguments->setEnabled(true);
+ GroupButtons->setEnabled(true);
+
+ mySMESHGUI->SetActiveDialogBox((QDialog*)this);
+
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( CellSelection );
+
+ SelectionIntoArgument();
+}
+
+//=================================================================================
+// function : enterEvent()
+// purpose :
+//=================================================================================
+void SMESHGUI_ScaleDlg::enterEvent (QEvent*)
+{
+ if (!ConstructorsBox->isEnabled())
+ ActivateThisDialog();
+}
+
+//=================================================================================
+// function : closeEvent()
+// purpose :
+//=================================================================================
+void SMESHGUI_ScaleDlg::closeEvent (QCloseEvent*)
+{
+ /* same than click on cancel button */
+ ClickOnCancel();
+}
+
+//=======================================================================
+//function : hideEvent
+//purpose : caused by ESC key
+//=======================================================================
+void SMESHGUI_ScaleDlg::hideEvent (QHideEvent*)
+{
+ if (!isMinimized())
+ ClickOnCancel();
+}
+
+//=======================================================================
+//function : onSelectMesh
+//purpose :
+//=======================================================================
+void SMESHGUI_ScaleDlg::onSelectMesh (bool toSelectMesh)
+{
+ if (toSelectMesh)
+ TextLabelElements->setText(tr("SMESH_NAME"));
+ else
+ TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
+ myFilterBtn->setEnabled(!toSelectMesh);
+
+ if (myEditCurrentArgument != LineEditElements) {
+ LineEditElements->clear();
+ return;
+ }
+
+ mySelectionMgr->clearFilters();
+ SMESH::SetPointRepresentation(false);
+
+ if (toSelectMesh) {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( ActorSelection );
+ mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
+ LineEditElements->setReadOnly(true);
+ LineEditElements->setValidator(0);
+ } else {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( CellSelection );
+ LineEditElements->setReadOnly(false);
+ LineEditElements->setValidator(myIdValidator);
+ onTextChange(LineEditElements->text());
+ }
+
+ SelectionIntoArgument();
+}
+
+//=======================================================================
+//function : onActionClicked
+//purpose : slot called when an action type changed
+//=======================================================================
+
+void SMESHGUI_ScaleDlg::onActionClicked(int button)
+{
+ switch ( button ) {
+ case MOVE_ELEMS_BUTTON:
+ MakeGroupsCheck->setEnabled(false);
+ LineEditNewMesh->setEnabled(false);
+ break;
+ case COPY_ELEMS_BUTTON:
+ LineEditNewMesh->setEnabled(false);
+ MakeGroupsCheck->setText( tr("SMESH_MAKE_GROUPS"));
+ if ( myMesh->_is_nil() || myMesh->NbGroups() > 0)
+ MakeGroupsCheck->setEnabled(true);
+ else
+ MakeGroupsCheck->setEnabled(false);
+ break;
+ case MAKE_MESH_BUTTON:
+ LineEditNewMesh->setEnabled(true);
+ MakeGroupsCheck->setText( tr("SMESH_COPY_GROUPS"));
+ if ( myMesh->_is_nil() || myMesh->NbGroups() > 0)
+ MakeGroupsCheck->setEnabled(true);
+ else
+ MakeGroupsCheck->setEnabled(false);
+ break;
+ }
+ setNewMeshName();
+}
+
+//=======================================================================
+//function : setNewMeshName
+//purpose : update contents of LineEditNewMesh
+//=======================================================================
+
+void SMESHGUI_ScaleDlg::setNewMeshName()
+{
+ LineEditNewMesh->setText("");
+ if ( LineEditNewMesh->isEnabled() && !myMesh->_is_nil() ) {
+ QString name;
+ if ( CheckBoxMesh->isChecked() ) {
+ name = LineEditElements->text();
+ }
+ else {
+ _PTR(SObject) meshSO = SMESH::FindSObject( myMesh );
+ name = meshSO->GetName().c_str();
+ }
+ if ( !name.isEmpty() )
+ LineEditNewMesh->setText( SMESH::UniqueMeshName( name, "scaled"));
+ }
+}
+
+//=================================================================================
+// function : GetConstructorId()
+// purpose :
+//=================================================================================
+int SMESHGUI_ScaleDlg::GetConstructorId()
+{
+ return GroupConstructors->checkedId();
+}
+
+//=================================================================================
+// function : keyPressEvent()
+// purpose :
+//=================================================================================
+void SMESHGUI_ScaleDlg::keyPressEvent( QKeyEvent* e )
+{
+ QDialog::keyPressEvent( e );
+ if ( e->isAccepted() )
+ return;
+
+ if ( e->key() == Qt::Key_F1 ) {
+ e->accept();
+ ClickOnHelp();
+ }
+}
+
+//=================================================================================
+// function : setFilters()
+// purpose : SLOT. Called when "Filter" button pressed.
+//=================================================================================
+void SMESHGUI_ScaleDlg::setFilters()
+{
+ if(myMesh->_is_nil()) {
+ SUIT_MessageBox::critical(this,
+ tr("SMESH_ERROR"),
+ tr("NO_MESH_SELECTED"));
+ return;
+ }
+ if ( !myFilterDlg )
+ myFilterDlg = new SMESHGUI_FilterDlg( mySMESHGUI, SMESH::ALL );
+
+ myFilterDlg->SetSelection();
+ myFilterDlg->SetMesh( myMesh );
+ myFilterDlg->SetSourceWg( LineEditElements );
+
+ myFilterDlg->show();
+}
+
+//=================================================================================
+// function : isValid
+// purpose :
+//=================================================================================
+bool SMESHGUI_ScaleDlg::isValid()
+{
+ bool ok = true;
+ QString msg;
+
+ ok = SpinBox1_1->isValid( msg, true ) && ok;
+ ok = SpinBox1_2->isValid( msg, true ) && ok;
+ ok = SpinBox1_3->isValid( msg, true ) && ok;
+ ok = SpinBox_FX->isValid( msg, true ) && ok;
+ if (GetConstructorId() == 1) {
+ ok = SpinBox_FY->isValid( msg, true ) && ok;
+ ok = SpinBox_FZ->isValid( msg, true ) && ok;
+ }
+
+ if( !ok ) {
+ QString str( tr( "SMESH_INCORRECT_INPUT" ) );
+ if ( !msg.isEmpty() )
+ str += "\n" + msg;
+ SUIT_MessageBox::critical( this, tr( "SMESH_ERROR" ), str );
+ return false;
+ }
+ return true;
+}
--- /dev/null
+// 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
+//
+
+// SMESH SMESHGUI : GUI for SMESH component
+// File : SMESHGUI_ScaleDlg.h
+// Author : Sergey Kuul, Open CASCADE S.A.S.
+//
+#ifndef SMESHGUI_SCALEDLG_H
+#define SMESHGUI_SCALEDLG_H
+
+// SMESH includes
+#include "SMESH_SMESHGUI.hxx"
+
+// Qt includes
+#include <QDialog>
+
+// IDL includes
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SMESH_Mesh)
+
+class QButtonGroup;
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QRadioButton;
+class QCheckBox;
+class SMESHGUI;
+class SMESHGUI_IdValidator;
+class SMESHGUI_SpinBox;
+class SMESHGUI_FilterDlg;
+class SMESH_Actor;
+class SVTK_Selector;
+class LightApp_SelectionMgr;
+class SMESH_LogicalFilter;
+
+//=================================================================================
+// class : SMESHGUI_ScaleDlg
+// purpose :
+//=================================================================================
+class SMESHGUI_EXPORT SMESHGUI_ScaleDlg : public QDialog
+{
+ Q_OBJECT
+
+public:
+ SMESHGUI_ScaleDlg( SMESHGUI* );
+ ~SMESHGUI_ScaleDlg();
+
+private:
+ void Init( bool = true );
+ void closeEvent( QCloseEvent* );
+ void enterEvent( QEvent* ); /* mouse enter the QWidget */
+ void hideEvent( QHideEvent* ); /* ESC key */
+ void keyPressEvent( QKeyEvent* );
+ int GetConstructorId();
+ void setNewMeshName();
+
+ bool isValid();
+
+ SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
+ SMESHGUI_IdValidator* myIdValidator;
+ LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
+ QString myElementsId;
+ int myNbOkElements; /* to check when elements are defined */
+
+ SVTK_Selector* mySelector;
+
+ QWidget* myEditCurrentArgument;
+
+ bool myBusy;
+ SMESH::SMESH_Mesh_var myMesh;
+ SMESH_Actor* myActor;
+ SMESH_LogicalFilter* myMeshOrSubMeshOrGroupFilter;
+
+ SMESH::SMESH_IDSource_var mySelectedObject;
+
+ QGroupBox* ConstructorsBox;
+ QButtonGroup* GroupConstructors;
+ QRadioButton* RadioButton1;
+ QRadioButton* RadioButton2;
+ QGroupBox* GroupButtons;
+ QPushButton* buttonOk;
+ QPushButton* buttonCancel;
+ QPushButton* buttonApply;
+ QPushButton* buttonHelp;
+ QGroupBox* GroupArguments;
+ QLabel* TextLabelElements;
+ QPushButton* SelectElementsButton;
+ QLineEdit* LineEditElements;
+ QCheckBox* CheckBoxMesh;
+ QLabel* TextLabel1;
+ QPushButton* SelectButton1;
+ QLabel* TextLabel1_1;
+ SMESHGUI_SpinBox* SpinBox1_1;
+ QLabel* TextLabel1_2;
+ SMESHGUI_SpinBox* SpinBox1_2;
+ QLabel* TextLabel1_3;
+ SMESHGUI_SpinBox* SpinBox1_3;
+ QLabel* TextLabel2;
+ SMESHGUI_SpinBox* SpinBox_FX;
+ QLabel* TextLabel3;
+ SMESHGUI_SpinBox* SpinBox_FY;
+ QLabel* TextLabel4;
+ SMESHGUI_SpinBox* SpinBox_FZ;
+ QGroupBox* ActionBox;
+ QButtonGroup* ActionGroup;
+ QCheckBox* MakeGroupsCheck;
+ QLineEdit* LineEditNewMesh;
+
+ QString myHelpFileName;
+
+ QPushButton* myFilterBtn;
+ SMESHGUI_FilterDlg* myFilterDlg;
+
+private slots:
+ void ConstructorsClicked( int );
+ void ClickOnOk();
+ void ClickOnCancel();
+ bool ClickOnApply();
+ void ClickOnHelp();
+ void SetEditCurrentArgument();
+ void SelectionIntoArgument();
+ void DeactivateActiveDialog();
+ void ActivateThisDialog();
+ void onTextChange( const QString& );
+ void onSelectMesh( bool );
+ void onActionClicked( int );
+ void setFilters();
+};
+
+#endif // SMESHGUI_SCALEDLG_H
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI_Selection
// File : SMESHGUI_Selection.cxx
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI_Selection
// File : SMESHGUI_Selection.h
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_SelectionOp.cxx
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
// SMESH includes
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_SelectionOp.h
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_SewingDlg.cxx
// Author : Michael ZORIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_SewingDlg.h
// Author : Michael ZORIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_ShapeByMeshDlg.cxx
// Author : Edward AGAPOV, Open CASCADE S.A.S.
// SMESH includes
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_ShapeByMeshDlg.h
// Author : Edward AGAPOV, Open CASCADE S.A.S.
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_SingleEditDlg.cxx
// Author : Sergey LITONIN, Open CASCADE S.A.S.
// SMESH includes
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESHGUI_SingleEditDlg.h
// Author : Sergey LITONIN, Open CASCADE S.A.S.
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_SmoothingDlg.cxx
// Author : Michael ZORIN, Open CASCADE S.A.S.
SpinBox_IterationLimit->setRange(1, 999999);
SpinBox_IterationLimit->setValue(20);
- SpinBox_AspectRatio->RangeStepAndValidator(0.0, +999999.999, 0.1, 3);
+ SpinBox_AspectRatio->RangeStepAndValidator(0.0, +999999.999, 0.1, "parametric_precision");
SpinBox_AspectRatio->SetValue(1.1);
GroupArguments->show();
}
if (aResult) {
- Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
+ if ( myActor ) {
+ Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
+ SALOME_ListIO aList;
+ aList.Append(anIO);
+ mySelectionMgr->setSelectedObjects(aList, false);
+ }
- SALOME_ListIO aList;
- aList.Append(anIO);
- mySelectionMgr->setSelectedObjects(aList, false);
SMESH::UpdateView();
Init();
return;
myActor = SMESH::FindActorByObject(myMesh);
- if (!myActor)
+ if (!myActor && !CheckBoxMesh->isChecked())
return;
int aNbUnits = 0;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_SmoothingDlg.h
// Author : Michael ZORIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_SpinBox.cxx
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
//
#include "SMESHGUI_SpinBox.h"
+#include <SUIT_Session.h>
+#include <SUIT_ResourceMgr.h>
+
// Qt includes
-#include <QDoubleValidator>
#include <QLineEdit>
+#include <QVariant>
//=================================================================================
// class : SMESHGUI_SpinBox()
return SalomeApp_DoubleSpinBox::lineEdit();
}
-//=================================================================================
-// function : validator()
-// purpose : returns validator
-//=================================================================================
-QDoubleValidator* SMESHGUI_SpinBox::validator() const
-{
- return (QDoubleValidator*)editor()->validator();
-}
-
//=================================================================================
// function : RangeStepAndValidator()
// purpose :
void SMESHGUI_SpinBox::RangeStepAndValidator( double min,
double max,
double step,
- unsigned short precision )
+ const char* quantity )
{
- setPrecision(precision*(-1)); // PAL8769. Minus is for using 'g' double->string conversion specifier,
- // see QtxDoubleSpinBox::mapValueToText( double v )
- setDecimals(32);
+ // Obtain precision from preferences
+ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+ int precision = resMgr->integerValue( "SMESH", quantity, -3 );
+
+ setPrecision(precision); // PAL8769. Minus is for using 'g' double->string conversion specifier,
+ // see QtxDoubleSpinBox::mapValueToText( double v )
+ // san: this can be achieved using preferences
+ setDecimals(qAbs(precision));
setRange(min, max);
setSingleStep( step );
setDefaultValue( min );
+
+ // Add a hint for the user saying how to tune precision
+ QString userPropName = QObject::tr( QString( "SMESH_PREF_%1" ).arg( quantity ).toLatin1().constData() );
+ setProperty( "validity_tune_hint",
+ QVariant( QObject::tr( "SMESH_PRECISION_HINT" ).arg( userPropName ) ) );
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_SpinBox.h
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
void RangeStepAndValidator( double = -1000000.0,
double = +1000000.0,
double = 100.0,
- unsigned short = 3 );
+ const char* = "length_precision" );
void SetValue( double );
double GetValue() const;
QString GetString() const;
QLineEdit* editor() const;
- QDoubleValidator* validator() const;
public slots:
void SetStep( double );
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_StandardMeshInfosDlg.cxx
// Author : Michael ZORIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_StandardMeshInfosDlg.h
// Author : Michael ZORIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_SymmetryDlg.cxx
// Author : Michael ZORIN, Open CASCADE S.A.S.
SMESHGUI_SymmetryDlgLayout->addWidget(GroupButtons);
/* Initialisations */
- SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
- SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
+ SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
RadioButton1->setChecked(true);
myActor = SMESH::FindActorByObject(myMesh);
if (!myActor)
myActor = SMESH::FindActorByEntry(IO->getEntry());
- if (!myActor)
+ if (!myActor && !CheckBoxMesh->isChecked())
return;
int aNbUnits = 0;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_SymmetryDlg.h
// Author : Michael ZORIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_TranslationDlg.cxx
// Author : Michael ZORIN, Open CASCADE S.A.S.
SMESHGUI_TranslationDlgLayout->addWidget(GroupButtons);
/* Initialisations */
- SpinBox1_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- SpinBox1_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- SpinBox1_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- SpinBox2_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- SpinBox2_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
- SpinBox2_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
+ SpinBox1_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox1_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox1_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox2_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox2_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+ SpinBox2_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
RadioButton1->setChecked(true);
myActor = SMESH::FindActorByObject(myMesh);
if (!myActor)
myActor = SMESH::FindActorByEntry(IO->getEntry());
- if (!myActor)
- return;
+
+ if (!myActor && !CheckBoxMesh->isChecked())
+ return;
int aNbUnits = 0;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_TranslationDlg.h
// Author : Michael ZORIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_TransparencyDlg.cxx
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_TransparencyDlg.h
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_Utils.cxx
// Author : Open CASCADE S.A.S.
if (theSObject->FindAttribute(anAttr, "AttributeIOR")) {
_PTR(AttributeIOR) anIOR = anAttr;
CORBA::String_var aVal = anIOR->Value().c_str();
- return app->orb()->string_to_object(aVal);
+ // string_to_object() DOC: If the input string is not valid ...
+ // a CORBA::SystemException is thrown.
+ if ( aVal && strlen( aVal ) > 0 )
+ return app->orb()->string_to_object(aVal);
}
}
return CORBA::Object::_nil();
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_Utils.h
// Author : Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_VTKUtils.cxx
// Author : Open CASCADE S.A.S.
anActor->SetNodeColor( aColor.R, aColor.G, aColor.B );
else if( aGroup->GetType() == SMESH::EDGE )
anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B );
+ else if( aGroup->GetType() == SMESH::ELEM0D )
+ anActor->Set0DColor( aColor.R, aColor.G, aColor.B );
else
anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B );
}
PW = mgr->integerValue( "SMESH", "highlight_width", 5 );
// adjust highlight_width to the width of mesh entities
- int aPointSize = mgr->integerValue("SMESH", "node_size", 3);
int aElem0DSize = mgr->integerValue("SMESH", "elem0d_size", 5);
int aLineWidth = mgr->integerValue("SMESH", "element_width", 1);
- int maxSize = aPointSize;
+ int maxSize = aElem0DSize;
if (aElem0DSize > maxSize) maxSize = aElem0DSize;
if (aLineWidth > maxSize) maxSize = aLineWidth;
if (PW < maxSize + 2) PW = maxSize + 2;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_VTKUtils.h
// Author : Open CASCADE S.A.S.
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_WhatIsDlg.cxx
// Author : Vladimir TURIN, Open CASCADE S.A.S.
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_WhatIsDlg.h
// Author : Vladimir TURIN, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : reading of xml file with list of available hypotheses and algorithms
// File : SMESHGUI_XmlHandler.cxx
// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : reading of xml file with list of available hypotheses and algorithms
// File : SMESHGUI_XmlHandler.h
// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_SMESHGUI.hxx
// Author : Alexander BORODIN, Open CASCADE S.A.S.
//
<!DOCTYPE TS>
<!--
- 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
<source>ICON_SMESH_TRANSLATION_VECTOR</source>
<translation>mesh_translation_vector.png</translation>
</message>
+ <message>
+ <source>ICON_DLG_MESH_SCALE</source>
+ <translation>scale.png</translation>
+ </message>
+ <message>
+ <source>ICON_DLG_SCALE_ALONG_AXES</source>
+ <translation>scale_along_axes.png</translation>
+ </message>
<message>
<source>ICON_SMESH_TREE_ALGO</source>
<translation>mesh_tree_algo.png</translation>
<source>ICON_2D_FROM_3D</source>
<translation>mesh_2d_from_3d.png</translation>
</message>
+ <message>
+ <source>ICON_SPLIT_TO_TETRA</source>
+ <translation>split_into_tetra.png</translation>
+ </message>
</context>
</TS>
<!DOCTYPE TS>
<!--
- 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
<source>MEN_TRANS</source>
<translation>Translation</translation>
</message>
+ <message>
+ <source>MEN_SCALE</source>
+ <translation>Scale Transform</translation>
+ </message>
<message>
<source>MEN_TRANSF</source>
<translation>Transformation</translation>
<source>MEN_WIRE</source>
<translation>Wireframe</translation>
</message>
+ <message>
+ <source>MEN_SPLIT_TO_TETRA</source>
+ <translation>Split into Tetrahedra</translation>
+ </message>
+ <message>
+ <source>TOP_SPLIT_TO_TETRA</source>
+ <translation>Split into Tetrahedra</translation>
+ </message>
+ <message>
+ <source>STB_SPLIT_TO_TETRA</source>
+ <translation>Split into Tetrahedra</translation>
+ </message>
<message>
<source>MESHERS_FILE_CANT_OPEN</source>
<translation>Can not open resource file</translation>
</message>
<message>
<source>GROUP_NAME_IS_EMPTY</source>
- <translation>Name of group is empty
-Please input a name of new group or choose the existing one</translation>
+ <translation>Name of group is not specified.
+Please enter a name of new group to be created or choose an existing one.</translation>
+ </message>
+ <message>
+ <source>MESH_STANDALONE_GRP_CHOSEN</source>
+ <translation>Group on geometry is chosen: %1.
+Do you want to convert it to the standalone group?</translation>
</message>
<message>
<source>NODE_ID</source>
<source>SMESH_POINT_2</source>
<translation>Point 2</translation>
</message>
+ <message>
+ <source>SMESH_BASE_POINT</source>
+ <translation>Base Point</translation>
+ </message>
<message>
<source>SMESH_POLYEDRE_CREATE_ERROR</source>
<translation>Polyedron creation error</translation>
<source>SMESH_TRANSLATION</source>
<translation>Translation</translation>
</message>
+ <message>
+ <source>SMESH_SCALE_TITLE</source>
+ <translation>Scale Transform</translation>
+ </message>
+ <message>
+ <source>SMESH_SCALE</source>
+ <translation>Scale</translation>
+ </message>
+ <message>
+ <source>SMESH_SCALE_FACTOR</source>
+ <translation>Scale Factor :</translation>
+ </message>
+ <message>
+ <source>SMESH_SCALE_FACTOR_X</source>
+ <translation>Scale Factor X :</translation>
+ </message>
+ <message>
+ <source>SMESH_SCALE_FACTOR_Y</source>
+ <translation>Scale Factor Y :</translation>
+ </message>
+ <message>
+ <source>SMESH_SCALE_FACTOR_Z</source>
+ <translation>Scale Factor Z :</translation>
+ </message>
<message>
<source>SMESH_TRANSPARENCY_OPAQUE</source>
<translation>---> Opaque</translation>
<source>STB_TRANS</source>
<translation>Translation</translation>
</message>
+ <message>
+ <source>STB_SCALE</source>
+ <translation>Scale Transform</translation>
+ </message>
<message>
<source>STB_TRANSP</source>
<translation>Transparency</translation>
<source>TOP_TRANS</source>
<translation>Translation</translation>
</message>
+ <message>
+ <source>TOP_SCALE</source>
+ <translation>Scale Transform</translation>
+ </message>
<message>
<source>TOP_TRANSP</source>
<translation>Transparency</translation>
<source>NO_MESH_SELECTED</source>
<translation>No mesh selected</translation>
</message>
+ <message>
+ <source>SMESH_PREF_def_precision</source>
+ <translation>Default precision</translation>
+ </message>
+ <message>
+ <source>SMESH_PREF_length_precision</source>
+ <translation>Length precision</translation>
+ </message>
+ <message>
+ <source>SMESH_PREF_angle_precision</source>
+ <translation>Angular precision</translation>
+ </message>
+ <message>
+ <source>SMESH_PREF_len_tol_precision</source>
+ <translation>Length tolerance precision</translation>
+ </message>
+ <message>
+ <source>SMESH_PREF_parametric_precision</source>
+ <translation>Parametric precision</translation>
+ </message>
+ <message>
+ <source>SMESH_PREF_area_precision</source>
+ <translation>Area precision</translation>
+ </message>
+ <message>
+ <source>FULL_RECOMPUTE_QUESTION</source>
+ <translation>
+The mesh has been edited since a last total re-compute
+that may prevent successful computation.
+Do you wish to re-compute the mesh totally to discard the modifications?
+ </translation>
+ </message>
+ <message>
+ <source>SMESH_PREF_vol_precision</source>
+ <translation>Volume precision</translation>
+ </message>
+ <message>
+ <source>SMESH_PRECISION_HINT</source>
+ <translation>
+Input value precision can be adjusted using
+'%1' parameter in Mesh module preferences.</translation>
+ </message>
</context>
<context>
<name>SMESHGUI</name>
<source>PREF_NOTIFY_MODE</source>
<translation>Show a computation result notification</translation>
</message>
+ <message>
+ <source>SMESH_PREF_GROUP_PRECISION</source>
+ <translation>Input fields precision</translation>
+ </message>
<message>
<source>PREF_GROUP_ELEMENTS</source>
<translation>Elements</translation>
<source>PREF_LABELS_COLOR</source>
<translation>Labels color</translation>
</message>
+ <message>
+ <source>PREF_MARKER_SCALE</source>
+ <translation>Scale of marker</translation>
+ </message>
<message>
<source>PREF_NODES</source>
<translation>Nodes</translation>
<source>PREF_SHRINK_COEFF</source>
<translation>Shrink coef.</translation>
</message>
- <message>
- <source>PREF_SIZE</source>
- <translation>Size</translation>
- </message>
<message>
<source>PREF_TAB_GENERAL</source>
<translation>General</translation>
<source>PREF_TITLE_COLOR</source>
<translation>Title color</translation>
</message>
+ <message>
+ <source>PREF_TYPE_OF_MARKER</source>
+ <translation>Type of marker</translation>
+ </message>
<message>
<source>PREF_COLOR_0D</source>
<translation>0D elements</translation>
<translation>Use numeric functor</translation>
</message>
</context>
+ <context>
+ <name>SMESHGUI_CuttingIntoTetraDlg</name>
+ <message>
+ <source>CAPTION</source>
+ <translation>Splitting volumes into tetrahedra</translation>
+ </message>
+ <message>
+ <source>SPLIT_METHOD</source>
+ <translation>Split hexahedron</translation>
+ </message>
+ <message>
+ <source>SPLIT_HEX_TO_5_TETRA</source>
+ <translation>Into 5 tetrahedra</translation>
+ </message>
+ <message>
+ <source>SPLIT_HEX_TO_6_TETRA</source>
+ <translation>Into 6 tetrahedra</translation>
+ </message>
+ </context>
<context>
<name>SMESHGUI_PrecisionDlg</name>
<message>
<translation>No concurent submeshes detected</translation>
</message>
</context>
+ <context>
+ <name>SMESHGUI_ClippingDlg</name>
+ <message>
+ <source>CLIP_PLANES</source>
+ <translation>Clipping planes</translation>
+ </message>
+ <message>
+ <source>ROTATION_AROUND_X_Y2Z</source>
+ <translation>Rotation around X (Y to Z):</translation>
+ </message>
+ <message>
+ <source>ROTATION_AROUND_Y_X2Z</source>
+ <translation>Rotation around Y (X to Z):</translation>
+ </message>
+ <message>
+ <source>ROTATION_AROUND_Z_Y2X</source>
+ <translation>Rotation around Z (Y to X):</translation>
+ </message>
+ <message>
+ <source>ROTATION_AROUND_X_Z2Y</source>
+ <translation>Rotation around X (Z to Y):</translation>
+ </message>
+ <message>
+ <source>ROTATION_AROUND_Y_Z2X</source>
+ <translation>Rotation around Y (Z to X):</translation>
+ </message>
+ <message>
+ <source>ROTATION_AROUND_Z_X2Y</source>
+ <translation>Rotation around Z (X to Y):</translation>
+ </message>
+ <message>
+ <source>SHOW_PREVIEW</source>
+ <translation>Show preview</translation>
+ </message>
+ <message>
+ <source>AUTO_APPLY</source>
+ <translation>Auto Apply</translation>
+ </message>
+ <message>
+ <source>ALONG_XY</source>
+ <translation>|| X-Y</translation>
+ </message>
+ <message>
+ <source>ALONG_YZ</source>
+ <translation>|| Y-Z</translation>
+ </message>
+ <message>
+ <source>ALONG_ZX</source>
+ <translation>|| Z-X</translation>
+ </message>
+ <message>
+ <source>PLANE_NUM</source>
+ <translation>Plane# %1</translation>
+ </message>
+ <message>
+ <source>NO_PLANES</source>
+ <translation>No planes</translation>
+ </message>
+ </context>
</TS>
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
# File : Makefile.in
# Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I :
// File : SMESH.hxx
// Author : Michael ZORIN
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
int main(int argc, char** argv)
{
return 1;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_0D_Algo_i.cxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_0D_Algo_i.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_1D_Algo_i.cxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_1D_Algo_i.hxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_2D_Algo_i.cxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_2D_Algo_i.hxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
-//
// File : SMESH_2smeshpy.cxx
// Created : Fri Nov 18 13:20:10 2005
// Author : Edward AGAPOV (eap)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_smesh.hxx
// Created : Fri Nov 18 12:05:18 2005
// Author : Edward AGAPOV (eap)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_3D_Algo_i.cxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_3D_Algo_i.hxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Algo_i.cxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Algo_i.hxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_Gen_i_DumpPython.cxx
// Created : Thu Mar 24 17:17:59 2005
// Author : Julia DOROVSKIKH
return *this;
}
+ TPythonDump&
+ TPythonDump::
+ operator<<(SMESH::SMESH_IDSource_ptr theArg)
+ {
+ SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
+ SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy();
+ SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,theArg);
+ if(!aSObject->_is_nil() || CORBA::is_nil( theArg ))
+ return *this << aSObject;
+ SMESH::long_array_var anElementsId = theArg->GetIDs();
+ return *this << anElementsId;
+ }
+
TPythonDump&
TPythonDump::
operator<<(SMESH::FilterLibrary_i* theArg)
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Filter_i.cxx
// Author : Alexey Petrov, OCC
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Filter_i.hxx
// Author : Alexey Petrov, OCC
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Gen_i.cxx
// Author : Paul RASCLE, EDF
#ifdef WNT
#include <windows.h>
+ #include <process.h>
#else
#include <dlfcn.h>
#endif
aDataset->WriteOnDisk( anAutoColor );
aDataset->CloseOnDisk();
+ // issue 0020693. Store _isModified flag
+ int isModified = myImpl->GetImpl().GetIsModified();
+ aSize[ 0 ] = 1;
+ aDataset = new HDFdataset( "_isModified", aTopGroup, HDF_INT32, aSize, 1 );
+ aDataset->CreateOnDisk();
+ aDataset->WriteOnDisk( &isModified );
+ aDataset->CloseOnDisk();
+
// write reference on a shape if exists
SALOMEDS::SObject_var myRef;
bool shapeRefFound = false;
if ( nbNodes == 0 ) continue;
int aShapeID = (*itSubM).first;
+ if ( aShapeID < 1 || aShapeID > mySMESHDSMesh->MaxShapeIndex() )
+ continue;
int aShapeType = mySMESHDSMesh->IndexToShape( aShapeID ).ShapeType();
// write only SMDS_FacePosition and SMDS_EdgePosition
switch ( aShapeType ) {
}
}
}
+
+ // issue 0020693. Restore _isModified flag
+ if( aTopGroup->ExistInternalObject( "_isModified" ) )
+ {
+ aDataset = new HDFdataset( "_isModified", aTopGroup );
+ aDataset->OpenOnDisk();
+ size = aDataset->GetSize();
+ int* isModified = new int[ size ];
+ aDataset->ReadFromDisk( isModified );
+ aDataset->CloseOnDisk();
+ myNewMeshImpl->GetImpl().SetIsModified( bool(*isModified));
+ }
}
}
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Gen_i.hxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Gen_i_1.cxx
// Created : Thu Oct 21 17:24:06 2004
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
// File : SMESH_Group_i.cxx
// Author : Sergey ANIKIN, OCC
SMDSAbs_ElementType aSMDSType = aGroupDS->GetType();
SMESH::ElementType aType;
switch (aSMDSType) {
- case SMDSAbs_Node: aType = SMESH::NODE; break;
- case SMDSAbs_Edge: aType = SMESH::EDGE; break;
- case SMDSAbs_Face: aType = SMESH::FACE; break;
- case SMDSAbs_Volume: aType = SMESH::VOLUME; break;
- default: aType = SMESH::ALL; break;
+ case SMDSAbs_Node: aType = SMESH::NODE; break;
+ case SMDSAbs_Edge: aType = SMESH::EDGE; break;
+ case SMDSAbs_Face: aType = SMESH::FACE; break;
+ case SMDSAbs_Volume: aType = SMESH::VOLUME; break;
+ case SMDSAbs_0DElement: aType = SMESH::ELEM0D; break;
+ default: aType = SMESH::ALL; break;
}
return aType;
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
// File : SMESH_Group_i.hxx
// Author : Sergey ANIKIN, OCC
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Hypothesis_i.cxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Hypothesis_i.hxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_MEDFamily_i.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_MEDFamily_i.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_MEDMesh_i.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_MEDMesh_i.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_MEDSupport_i.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_MEDSupport_i.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_MeshEditor_i.cxx
// Author : Nicolas REJNERI
// Module : SMESH
-
+//
#include "SMESH_MeshEditor_i.hxx"
#include "SMDS_Mesh0DElement.hxx"
}
}
+//=======================================================================
+//function : MakeIDSource
+//purpose : Wrap a sequence of ids in a SMESH_IDSource
+//=======================================================================
+
+struct _IDSource : public POA_SMESH::SMESH_IDSource
+{
+ SMESH::long_array _ids;
+ SMESH::long_array* GetIDs() { return new SMESH::long_array( _ids ); }
+ SMESH::long_array* GetMeshInfo() { return 0; }
+};
+
+SMESH::SMESH_IDSource_ptr SMESH_MeshEditor_i::MakeIDSource(const SMESH::long_array& ids)
+{
+ _IDSource* anIDSource = new _IDSource;
+ anIDSource->_ids = ids;
+ SMESH::SMESH_IDSource_var anIDSourceVar = anIDSource->_this();
+
+ return anIDSourceVar._retn();
+}
+
//=============================================================================
/*!
*
// Update Python script
TPythonDump() << "isDone = " << this << ".RemoveElements( " << IDsOfElements << " )";
-#ifdef _DEBUG_
- TPythonDump() << "print 'RemoveElements: ', isDone";
-#endif
+
+ if ( IDsOfElements.length() )
+ myMesh->SetIsModified( true ); // issue 0020693
+
// Remove Elements
return anEditor.Remove( IdList, false );
}
// Update Python script
TPythonDump() << "isDone = " << this << ".RemoveNodes( " << IDsOfNodes << " )";
-#ifdef _DEBUG_
- TPythonDump() << "print 'RemoveNodes: ', isDone";
-#endif
+
+ if ( IDsOfNodes.length() )
+ myMesh->SetIsModified( true ); // issue 0020693
return anEditor.Remove( IdList, true );
}
TPythonDump() << "nodeID = " << this << ".AddNode( "
<< x << ", " << y << ", " << z << " )";
+ myMesh->SetIsModified( true ); // issue 0020693
+
return N->GetID();
}
// Update Python script
TPythonDump() << "elem0d = " << this << ".Add0DElement( " << IDOfNode <<" )";
+ myMesh->SetIsModified( true ); // issue 0020693
+
if (elem)
return elem->GetID();
}
if(elem)
- return elem->GetID();
+ return myMesh->SetIsModified( true ), elem->GetID();
return 0;
}
TPythonDump() << "faceID = " << this << ".AddFace( " << IDsOfNodes << " )";
if(elem)
- return elem->GetID();
+ return myMesh->SetIsModified( true ), elem->GetID();
return 0;
}
// Update Python script
TPythonDump() <<"faceID = "<<this<<".AddPolygonalFace( "<<IDsOfNodes<<" )";
-#ifdef _DEBUG_
- TPythonDump() << "print 'AddPolygonalFace: ', faceID";
-#endif
-
- if(elem)
- return elem->GetID();
- return 0;
+ return elem ? ( myMesh->SetIsModified( true ), elem->GetID()) : 0;
}
//=============================================================================
// Update Python script
TPythonDump() << "volID = " << this << ".AddVolume( " << IDsOfNodes << " )";
-#ifdef _DEBUG_
- TPythonDump() << "print 'AddVolume: ', volID";
-#endif
if(elem)
- return elem->GetID();
+ return myMesh->SetIsModified( true ), elem->GetID();
return 0;
}
// Update Python script
TPythonDump() << "volID = " << this << ".AddPolyhedralVolume( "
<< IDsOfNodes << ", " << Quantities << " )";
-#ifdef _DEBUG_
- TPythonDump() << "print 'AddPolyhedralVolume: ', volID";
-#endif
-
- if(elem)
- return elem->GetID();
- return 0;
+ return elem ? ( myMesh->SetIsModified( true ), elem->GetID()) : 0;
}
//=============================================================================
// Update Python script
TPythonDump() << "volID = " << this << ".AddPolyhedralVolumeByFaces( "
<< IdsOfFaces << " )";
-#ifdef _DEBUG_
- TPythonDump() << "print 'AddPolyhedralVolume: ', volID";
-#endif
-
- if(elem)
- return elem->GetID();
- return 0;
+ return elem ? ( myMesh->SetIsModified( true ), elem->GetID()) : 0;
}
//=============================================================================
THROW_SALOME_CORBA_EXCEPTION("Invalid VertexID", SALOME::BAD_PARAM);
mesh->SetNodeOnVertex( node, VertexID );
+
+ myMesh->SetIsModified( true );
}
//=============================================================================
THROW_SALOME_CORBA_EXCEPTION("Invalid paramOnEdge", SALOME::BAD_PARAM);
mesh->SetNodeOnEdge( node, EdgeID, paramOnEdge );
+
+ myMesh->SetIsModified( true );
}
//=============================================================================
}
mesh->SetNodeOnFace( node, FaceID, u, v );
+
+ myMesh->SetIsModified( true );
}
//=============================================================================
THROW_SALOME_CORBA_EXCEPTION("Invalid SolidID", SALOME::BAD_PARAM);
mesh->SetNodeInVolume( node, SolidID );
+
+ // myMesh->SetIsModified( true ); - SetNodeInVolume() can't prevent re-compute, I believe
}
//=============================================================================
THROW_SALOME_CORBA_EXCEPTION("Invalid shape type", SALOME::BAD_PARAM);
mesh->SetMeshElementOnShape( elem, ShapeID );
+
+ myMesh->SetIsModified( true );
}
//=============================================================================
TPythonDump() << "isDone = " << this << ".InverseDiag( "
<< NodeID1 << ", " << NodeID2 << " )";
+ myMesh->SetIsModified( true );
+
::SMESH_MeshEditor aMeshEditor( myMesh );
return aMeshEditor.InverseDiag ( n1, n2 );
}
bool stat = aMeshEditor.DeleteDiag ( n1, n2 );
+ if ( stat )
+ myMesh->SetIsModified( true ); // issue 0020693
+
storeResult(aMeshEditor);
return stat;
// Update Python script
TPythonDump() << "isDone = " << this << ".Reorient( " << IDsOfElements << " )";
+ if ( IDsOfElements.length() )
+ myMesh->SetIsModified( true ); // issue 0020693
+
return true;
}
{
initData();
+ TPythonDump aTPythonDump; // suppress dump in Reorient()
+
SMESH::long_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = Reorient(anElementsId);
- // Clear python line, created by Reorient()
- SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-
// Update Python script
- TPythonDump() << "isDone = " << this << ".ReorientObject( " << theObject << " )";
+ aTPythonDump << "isDone = " << this << ".ReorientObject( " << theObject << " )";
return isDone;
}
// Update Python script
TPythonDump() << "isDone = " << this << ".TriToQuad( "
<< IDsOfElements << ", " << aNumericalFunctor << ", " << MaxAngle << " )";
-#ifdef _DEBUG_
- TPythonDump() << "print 'TriToQuad: ', isDone";
-#endif
::SMESH_MeshEditor anEditor( myMesh );
bool stat = anEditor.TriToQuad( faces, aCrit, MaxAngle );
+ if ( stat )
+ myMesh->SetIsModified( true ); // issue 0020693
storeResult(anEditor);
{
initData();
+ TPythonDump aTPythonDump; // suppress dump in TriToQuad()
SMESH::long_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = TriToQuad(anElementsId, Criterion, MaxAngle);
- // Clear python line(s), created by TriToQuad()
- SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-#ifdef _DEBUG_
- aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-#endif
-
SMESH::NumericalFunctor_i* aNumericalFunctor =
SMESH::DownCast<SMESH::NumericalFunctor_i*>( Criterion );
// Update Python script
- TPythonDump() << "isDone = " << this << ".TriToQuadObject("
- << theObject << ", " << aNumericalFunctor << ", " << MaxAngle << " )";
-#ifdef _DEBUG_
- TPythonDump() << "print 'TriToQuadObject: ', isDone";
-#endif
+ aTPythonDump << "isDone = " << this << ".TriToQuadObject("
+ << theObject << ", " << aNumericalFunctor << ", " << MaxAngle << " )";
return isDone;
}
// Update Python script
TPythonDump() << "isDone = " << this << ".QuadToTri( " << IDsOfElements << ", " << aNumericalFunctor << " )";
-#ifdef _DEBUG_
- TPythonDump() << "print 'QuadToTri: ', isDone";
-#endif
::SMESH_MeshEditor anEditor( myMesh );
CORBA::Boolean stat = anEditor.QuadToTri( faces, aCrit );
+ if ( stat )
+ myMesh->SetIsModified( true ); // issue 0020693
storeResult(anEditor);
{
initData();
+ TPythonDump aTPythonDump; // suppress dump in QuadToTri()
+
SMESH::long_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = QuadToTri(anElementsId, Criterion);
- // Clear python line(s), created by QuadToTri()
- SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-#ifdef _DEBUG_
- aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-#endif
-
SMESH::NumericalFunctor_i* aNumericalFunctor =
SMESH::DownCast<SMESH::NumericalFunctor_i*>( Criterion );
// Update Python script
- TPythonDump() << "isDone = " << this << ".QuadToTriObject( " << theObject << ", " << aNumericalFunctor << " )";
-#ifdef _DEBUG_
- TPythonDump() << "print 'QuadToTriObject: ', isDone";
-#endif
+ aTPythonDump << "isDone = " << this << ".QuadToTriObject( " << theObject << ", " << aNumericalFunctor << " )";
return isDone;
}
// Update Python script
TPythonDump() << "isDone = " << this << ".SplitQuad( "
<< IDsOfElements << ", " << Diag13 << " )";
-#ifdef _DEBUG_
- TPythonDump() << "print 'SplitQuad: ', isDone";
-#endif
::SMESH_MeshEditor anEditor( myMesh );
CORBA::Boolean stat = anEditor.QuadToTri( faces, Diag13 );
+ if ( stat )
+ myMesh->SetIsModified( true ); // issue 0020693
+
storeResult(anEditor);
{
initData();
+ TPythonDump aTPythonDump; // suppress dump in SplitQuad()
+
SMESH::long_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = SplitQuad(anElementsId, Diag13);
- // Clear python line(s), created by SplitQuad()
- SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-#ifdef _DEBUG_
- aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-#endif
-
// Update Python script
- TPythonDump() << "isDone = " << this << ".SplitQuadObject( "
- << theObject << ", " << Diag13 << " )";
-#ifdef _DEBUG_
- TPythonDump() << "print 'SplitQuadObject: ', isDone";
-#endif
+ aTPythonDump << "isDone = " << this << ".SplitQuadObject( "
+ << theObject << ", " << Diag13 << " )";
return isDone;
}
return -1;
}
+//================================================================================
+/*!
+ * \brief Split volumic elements into tetrahedrons
+ */
+//================================================================================
+
+void SMESH_MeshEditor_i::SplitVolumesIntoTetra (SMESH::SMESH_IDSource_ptr elems,
+ CORBA::Short methodFlags)
+ throw (SALOME::SALOME_Exception)
+{
+ Unexpect aCatch(SALOME_SalomeException);
+
+ SMESH::long_array_var anElementsId = elems->GetIDs();
+ TIDSortedElemSet elemSet;
+ arrayToSet( anElementsId, GetMeshDS(), elemSet, SMDSAbs_Volume );
+
+ ::SMESH_MeshEditor anEditor (myMesh);
+ anEditor.SplitVolumesIntoTetra( elemSet, int( methodFlags ));
+
+ storeResult(anEditor);
+
+// if ( myLastCreatedElems.length() ) - it does not influence Compute()
+// myMesh->SetIsModified( true ); // issue 0020693
+
+ TPythonDump() << this << ".SplitVolumesIntoTetra( "
+ << elems << ", " << methodFlags << " )";
+}
//=======================================================================
//function : Smooth
anEditor.Smooth(elements, fixedNodes, method,
MaxNbOfIterations, MaxAspectRatio, IsParametric );
+ myMesh->SetIsModified( true ); // issue 0020693
+
storeResult(anEditor);
// Update Python script
<< "SMESH.SMESH_MeshEditor."
<< ( Method == SMESH::SMESH_MeshEditor::CENTROIDAL_SMOOTH ?
"CENTROIDAL_SMOOTH )" : "LAPLACIAN_SMOOTH )");
-#ifdef _DEBUG_
- TPythonDump() << "print 'Smooth: ', isDone";
-#endif
return true;
}
{
initData();
+ TPythonDump aTPythonDump; // suppress dump in smooth()
+
SMESH::long_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = smooth (anElementsId, IDsOfFixedNodes, MaxNbOfIterations,
MaxAspectRatio, Method, IsParametric);
- // Clear python line(s), created by Smooth()
- SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-#ifdef _DEBUG_
- aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-#endif
-
// Update Python script
- TPythonDump() << "isDone = " << this << "."
- << (IsParametric ? "SmoothParametricObject( " : "SmoothObject( ")
- << theObject << ", " << IDsOfFixedNodes << ", "
- << MaxNbOfIterations << ", " << MaxAspectRatio << ", "
- << "SMESH.SMESH_MeshEditor."
- << ( Method == SMESH::SMESH_MeshEditor::CENTROIDAL_SMOOTH ?
- "CENTROIDAL_SMOOTH )" : "LAPLACIAN_SMOOTH )");
-#ifdef _DEBUG_
- TPythonDump() << "print 'SmoothObject: ', isDone";
-#endif
+ aTPythonDump << "isDone = " << this << "."
+ << (IsParametric ? "SmoothParametricObject( " : "SmoothObject( ")
+ << theObject << ", " << IDsOfFixedNodes << ", "
+ << MaxNbOfIterations << ", " << MaxAspectRatio << ", "
+ << "SMESH.SMESH_MeshEditor."
+ << ( Method == SMESH::SMESH_MeshEditor::CENTROIDAL_SMOOTH ?
+ "CENTROIDAL_SMOOTH )" : "LAPLACIAN_SMOOTH )");
return isDone;
}
theNbOfSteps, theTolerance, theMakeGroups, makeWalls);
storeResult(anEditor);
+ // myMesh->SetIsModified( true ); -- it does not influence Compute()
+
return theMakeGroups ? getGroups(groupIds.get()) : 0;
}
::SMESH_MeshEditor::PGroupIDs groupIds =
anEditor.Transform (elements, aTrsf, theCopy, theMakeGroups, theTargetMesh);
- if(theCopy) {
+ if(theCopy)
storeResult(anEditor);
- }
+ else
+ myMesh->SetIsModified( true );
+
return theMakeGroups ? getGroups(groupIds.get()) : 0;
}
if(theCopy)
storeResult(anEditor);
+ else
+ myMesh->SetIsModified( true );
return theMakeGroups ? getGroups(groupIds.get()) : 0;
}
::SMESH_MeshEditor::PGroupIDs groupIds =
anEditor.Transform (elements, aTrsf, theCopy, theMakeGroups, theTargetMesh);
- if(theCopy) {
+ if(theCopy)
storeResult(anEditor);
- }
+ else
+ myMesh->SetIsModified( true );
+
return theMakeGroups ? getGroups(groupIds.get()) : 0;
}
return mesh._retn();
}
+
+//=======================================================================
+//function : scale
+//purpose :
+//=======================================================================
+
+SMESH::ListOfGroups*
+SMESH_MeshEditor_i::scale(const SMESH::long_array & theIDsOfElements,
+ const SMESH::PointStruct& thePoint,
+ const SMESH::double_array& theScaleFact,
+ CORBA::Boolean theCopy,
+ const bool theMakeGroups,
+ ::SMESH_Mesh* theTargetMesh)
+{
+ initData();
+
+ TIDSortedElemSet elements;
+ arrayToSet(theIDsOfElements, GetMeshDS(), elements);
+
+ gp_Pnt aPnt( thePoint.x, thePoint.y, thePoint.z );
+ list<double> aScaleFact;
+ for (int i = 0; i < theScaleFact.length(); i++) {
+ aScaleFact.push_back( theScaleFact[i] );
+ }
+
+ ::SMESH_MeshEditor anEditor( myMesh );
+ ::SMESH_MeshEditor::PGroupIDs groupIds =
+ anEditor.Scale (elements, aPnt, aScaleFact, theCopy,
+ theMakeGroups, theTargetMesh);
+
+ if(theCopy)
+ storeResult(anEditor);
+ else
+ myMesh->SetIsModified( true );
+
+ return theMakeGroups ? getGroups(groupIds.get()) : 0;
+}
+
+
+//=======================================================================
+//function : Scale
+//purpose :
+//=======================================================================
+
+void SMESH_MeshEditor_i::Scale(SMESH::SMESH_IDSource_ptr theObject,
+ const SMESH::PointStruct& thePoint,
+ const SMESH::double_array& theScaleFact,
+ CORBA::Boolean theCopy)
+{
+ if ( !myPreviewMode ) {
+ TPythonDump() << this << ".Scale( "
+ << theObject << ", "
+ << "SMESH.PointStruct( " << thePoint.x << ", "
+ << thePoint.y << ", " << thePoint.z << " ) ,"
+ << theScaleFact << ", "
+ << theCopy << " )";
+ }
+ SMESH::long_array_var anElementsId = theObject->GetIDs();
+ scale(anElementsId, thePoint, theScaleFact, theCopy, false);
+}
+
+
+//=======================================================================
+//function : ScaleMakeGroups
+//purpose :
+//=======================================================================
+
+SMESH::ListOfGroups*
+SMESH_MeshEditor_i::ScaleMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
+ const SMESH::PointStruct& thePoint,
+ const SMESH::double_array& theScaleFact)
+{
+ SMESH::long_array_var anElementsId = theObject->GetIDs();
+ SMESH::ListOfGroups * aGroups =
+ scale(anElementsId, thePoint, theScaleFact, true, true);
+
+ if ( !myPreviewMode ) {
+
+ TPythonDump aPythonDump;
+ DumpGroupsList(aPythonDump,aGroups);
+ aPythonDump << this << ".Scale("
+ << theObject << ","
+ << "SMESH.PointStruct(" <<thePoint.x << ","
+ << thePoint.y << "," << thePoint.z << "),"
+ << theScaleFact << ",True,True)";
+ }
+ return aGroups;
+}
+
+
+//=======================================================================
+//function : ScaleMakeMesh
+//purpose :
+//=======================================================================
+
+SMESH::SMESH_Mesh_ptr
+SMESH_MeshEditor_i::ScaleMakeMesh(SMESH::SMESH_IDSource_ptr theObject,
+ const SMESH::PointStruct& thePoint,
+ const SMESH::double_array& theScaleFact,
+ CORBA::Boolean theCopyGroups,
+ const char* theMeshName)
+{
+ SMESH_Mesh_i* mesh_i;
+ SMESH::SMESH_Mesh_var mesh;
+ { // open new scope to dump "MakeMesh" command
+ // and then "GetGroups" using SMESH_Mesh::GetGroups()
+
+ TPythonDump pydump; // to prevent dump at mesh creation
+ mesh = makeMesh( theMeshName );
+ mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
+
+ if ( mesh_i ) {
+ SMESH::long_array_var anElementsId = theObject->GetIDs();
+ scale(anElementsId, thePoint, theScaleFact,
+ false, theCopyGroups, & mesh_i->GetImpl());
+ mesh_i->CreateGroupServants();
+ }
+ if ( !myPreviewMode ) {
+ pydump << mesh << " = " << this << ".ScaleMakeMesh( "
+ << theObject << ", "
+ << "SMESH.PointStruct( " << thePoint.x << ", "
+ << thePoint.y << ", " << thePoint.z << " ) ,"
+ << theScaleFact << ", "
+ << theCopyGroups << ", '"
+ << theMeshName << "' )";
+ }
+ }
+
+ //dump "GetGroups"
+ if(!myPreviewMode && mesh_i)
+ mesh_i->GetGroups();
+
+ return mesh._retn();
+}
+
+
//=======================================================================
//function : FindCoincidentNodes
//purpose :
SMESHDS_Mesh* aMesh = GetMeshDS();
set<const SMDS_MeshNode*> nodes;
- if ( !CORBA::is_nil(SMESH::SMESH_GroupBase::_narrow(theObject)) &&
- SMESH::SMESH_GroupBase::_narrow(theObject)->GetType() == SMESH::NODE) {
+ SMESH::SMESH_GroupBase_var group = SMESH::SMESH_GroupBase::_narrow(theObject);
+ if ( !group->_is_nil() && group->GetType() == SMESH::NODE)
+ {
for(int i = 0; i < aElementsId->length(); i++) {
CORBA::Long ind = aElementsId[i];
const SMDS_MeshNode * elem = aMesh->FindNode(ind);
anEditor.MergeNodes( aListOfListOfNodes );
aTPythonDump << "])";
+
+ myMesh->SetIsModified( true );
}
//=======================================================================
SMESH::array_of_long_array_out GroupsOfElementsID)
{
initData();
- if ( !(!CORBA::is_nil(SMESH::SMESH_GroupBase::_narrow(theObject)) &&
- SMESH::SMESH_GroupBase::_narrow(theObject)->GetType() == SMESH::NODE) ) {
+
+ SMESH::SMESH_GroupBase_var group = SMESH::SMESH_GroupBase::_narrow(theObject);
+ if ( !(!group->_is_nil() && group->GetType() == SMESH::NODE) )
+ {
typedef list<int> TListOfIDs;
set<const SMDS_MeshElement*> elems;
SMESH::long_array_var aElementsId = theObject->GetIDs();
::SMESH_MeshEditor anEditor( myMesh );
anEditor.MergeElements(aListOfListOfElementsID);
+ myMesh->SetIsModified( true );
+
aTPythonDump << "] )";
}
TPythonDump() << "isDone = " << this << ".MoveNode( "
<< NodeID << ", " << x << ", " << y << ", " << z << " )";
+ myMesh->SetIsModified( true );
+
return true;
}
}
}
- if ( !myPreviewMode ) {
+ if ( !myPreviewMode )
+ {
TPythonDump() << "nodeID = " << this
<< ".MoveClosestNodeToPoint( "<< x << ", " << y << ", " << z
<< ", " << nodeID << " )";
+
+ myMesh->SetIsModified( true );
}
return nodeID;
return res._retn();
}
+//=======================================================================
+//function : GetPointState
+//purpose : Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
+// TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
+//=======================================================================
+
+CORBA::Short SMESH_MeshEditor_i::GetPointState(CORBA::Double x,
+ CORBA::Double y,
+ CORBA::Double z)
+{
+ theSearchersDeleter.Set( myMesh );
+ if ( !theElementSearcher ) {
+ ::SMESH_MeshEditor anEditor( myMesh );
+ theElementSearcher = anEditor.GetElementSearcher();
+ }
+ return CORBA::Short( theElementSearcher->GetPointState( gp_Pnt( x,y,z )));
+}
+
//=======================================================================
//function : convError
//purpose :
storeResult(anEditor);
+ myMesh->SetIsModified( true );
+
return error;
}
storeResult(anEditor);
+ myMesh->SetIsModified( true );
+
return error;
}
storeResult(anEditor);
+ myMesh->SetIsModified( true );
+
return error;
}
storeResult(anEditor);
+ myMesh->SetIsModified( true );
+
return error;
}
}
TPythonDump() << "isDone = " << this << ".ChangeElemNodes( "
<< ide << ", " << newIDs << " )";
-#ifdef _DEBUG_
- TPythonDump() << "print 'ChangeElemNodes: ', isDone";
-#endif
- return GetMeshDS()->ChangeElementNodes( elem, & aNodes[0], nbn1+1 );
+ bool res = GetMeshDS()->ChangeElementNodes( elem, & aNodes[0], nbn1+1 );
+
+ if ( res )
+ myMesh->SetIsModified( true );
+
+ return res;
}
//================================================================================
::SMESH_MeshEditor anEditor( myMesh );
anEditor.ConvertToQuadratic(theForce3d);
TPythonDump() << this << ".ConvertToQuadratic( " << theForce3d << " )";
+ myMesh->SetIsModified( true );
}
//=======================================================================
::SMESH_MeshEditor anEditor( myMesh );
CORBA::Boolean isDone = anEditor.ConvertFromQuadratic();
TPythonDump() << this << ".ConvertFromQuadratic()";
+ if ( isDone )
+ myMesh->SetIsModified( true );
return isDone;
}
bool aResult = aMeshEditor.DoubleNodes( aListOfNodes, aListOfElems );
storeResult( aMeshEditor) ;
+ if ( aResult )
+ myMesh->SetIsModified( true );
return aResult;
}
SMESH::long_array_var aNodes = new SMESH::long_array;
aNodes->length( 1 );
aNodes[ 0 ] = theNodeId;
- return DoubleNodes( aNodes, theModifiedElems );
+ bool done = DoubleNodes( aNodes, theModifiedElems );
+ if ( done )
+ myMesh->SetIsModified( true );
+ return done;
}
//================================================================================
aModifiedElems->length( 0 );
}
- return DoubleNodes( aNodes, aModifiedElems );
+ bool done = DoubleNodes( aNodes, aModifiedElems );
+
+ if ( done )
+ myMesh->SetIsModified( true );
+
+ return done;
}
//================================================================================
storeResult( aMeshEditor) ;
+ if ( aResult )
+ myMesh->SetIsModified( true );
+
return aResult;
}
storeResult( aMeshEditor) ;
+ if ( aResult )
+ myMesh->SetIsModified( true );
+
// Update Python script
TPythonDump() << "isDone = " << this << ".DoubleNodes( " << theElems << ", "
<< theNodesNot << ", " << theAffectedElems << " )";
storeResult( aMeshEditor) ;
+ if ( aResult )
+ myMesh->SetIsModified( true );
+
// Update Python script
TPythonDump() << "isDone = " << this << ".DoubleNodesInRegion( " << theElems << ", "
<< theNodesNot << ", " << theShape << " )";
arrayToSet( anIDs, theMeshDS, theElemSet, theType);
}
-CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroup(
- SMESH::SMESH_GroupBase_ptr theElems,
+CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroup(SMESH::SMESH_GroupBase_ptr theElems,
SMESH::SMESH_GroupBase_ptr theNodesNot,
- SMESH::SMESH_GroupBase_ptr theAffectedElems )
-
+ SMESH::SMESH_GroupBase_ptr theAffectedElems)
{
if ( CORBA::is_nil( theElems ) && theElems->GetType() == SMESH::NODE )
return false;
storeResult( aMeshEditor) ;
+ if ( aResult )
+ myMesh->SetIsModified( true );
+
// Update Python script
TPythonDump() << "isDone = " << this << ".DoubleNodeGroup( " << theElems << ", "
<< theNodesNot << ", " << theAffectedElems << " )";
storeResult( aMeshEditor) ;
+ if ( aResult )
+ myMesh->SetIsModified( true );
+
// Update Python script
TPythonDump() << "isDone = " << this << ".DoubleNodeGroupInRegion( " << theElems << ", "
<< theNodesNot << ", " << theShape << " )";
}
}
-CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroups(
- const SMESH::ListOfGroups& theElems,
+CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroups(const SMESH::ListOfGroups& theElems,
const SMESH::ListOfGroups& theNodesNot,
- const SMESH::ListOfGroups& theAffectedElems )
+ const SMESH::ListOfGroups& theAffectedElems)
{
initData();
storeResult( aMeshEditor) ;
+ if ( aResult )
+ myMesh->SetIsModified( true );
+
// Update Python script
- TPythonDump() << "isDone = " << this << ".DoubleNodeGroups( " << &theElems << ", "
+ TPythonDump() << "isDone = " << this << ".DoubleNodeElemGroups( " << &theElems << ", "
<< &theNodesNot << ", " << &theAffectedElems << " )";
return aResult;
}
*/
//================================================================================
-CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroupsInRegion(
- const SMESH::ListOfGroups& theElems,
- const SMESH::ListOfGroups& theNodesNot,
- GEOM::GEOM_Object_ptr theShape )
+CORBA::Boolean
+SMESH_MeshEditor_i::DoubleNodeElemGroupsInRegion(const SMESH::ListOfGroups& theElems,
+ const SMESH::ListOfGroups& theNodesNot,
+ GEOM::GEOM_Object_ptr theShape )
{
initData();
storeResult( aMeshEditor) ;
+ if ( aResult )
+ myMesh->SetIsModified( true );
+
// Update Python script
TPythonDump() << "isDone = " << this << ".DoubleNodeGroupsInRegion( " << &theElems << ", "
<< &theNodesNot << ", " << theShape << " )";
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_MeshEditor_i.hxx
// Author : Nicolas REJNERI
class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
{
- public:
+public:
SMESH_MeshEditor_i(SMESH_Mesh_i * theMesh, bool isPreview);
virtual ~ SMESH_MeshEditor_i();
// --- CORBA
+
+ /*!
+ * \brief Wrap a sequence of ids in a SMESH_IDSource
+ */
+ SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::long_array& IDsOfElements);
+
CORBA::Boolean RemoveElements(const SMESH::long_array & IDsOfElements);
CORBA::Boolean RemoveNodes(const SMESH::long_array & IDsOfNodes);
CORBA::Boolean Diag13);
CORBA::Long BestSplit (CORBA::Long IDOfQuad,
SMESH::NumericalFunctor_ptr Criterion);
+ void SplitVolumesIntoTetra (SMESH::SMESH_IDSource_ptr elems,
+ CORBA::Short methodFlags) throw (SALOME::SALOME_Exception);
CORBA::Boolean Smooth(const SMESH::long_array & IDsOfElements,
const SMESH::long_array & IDsOfFixedNodes,
CORBA::Boolean CopyGroups,
const char* MeshName);
+ void Scale(SMESH::SMESH_IDSource_ptr theObject,
+ const SMESH::PointStruct& thePoint,
+ const SMESH::double_array& theScaleFact,
+ CORBA::Boolean theCopy);
+
+ SMESH::ListOfGroups* ScaleMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
+ const SMESH::PointStruct& thePoint,
+ const SMESH::double_array& theScaleFact);
+
+ SMESH::SMESH_Mesh_ptr ScaleMakeMesh(SMESH::SMESH_IDSource_ptr Object,
+ const SMESH::PointStruct& Point,
+ const SMESH::double_array& theScaleFact,
+ CORBA::Boolean CopyGroups,
+ const char* MeshName);
+
void FindCoincidentNodes (CORBA::Double Tolerance,
SMESH::array_of_long_array_out GroupsOfNodes);
void FindCoincidentNodesOnPart(SMESH::SMESH_IDSource_ptr Object,
CORBA::Double z);
/*!
* Return elements of given type where the given point is IN or ON.
- *
* 'ALL' type means elements of any type excluding nodes
*/
SMESH::long_array* FindElementsByPoint(CORBA::Double x,
CORBA::Double z,
SMESH::ElementType type);
+ /*!
+ * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
+ * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
+ */
+ CORBA::Short GetPointState(CORBA::Double x, CORBA::Double y, CORBA::Double z);
SMESH::SMESH_MeshEditor::Sew_Error
SewFreeBorders(CORBA::Long FirstNodeID1,
const bool MakeGroups,
::SMESH_Mesh* TargetMesh=0);
+ SMESH::ListOfGroups* scale(const SMESH::long_array & theIDsOfElements,
+ const SMESH::PointStruct& thePoint,
+ const SMESH::double_array& theScaleFact,
+ CORBA::Boolean theCopy,
+ const bool theMakeGroups,
+ ::SMESH_Mesh* theTargetMesh=0);
+
SMESH::SMESH_Mesh_ptr makeMesh(const char* theMeshName);
void DumpGroupsList(SMESH::TPythonDump & theDumpPython,
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Mesh_i.cxx
// Author : Paul RASCLE, EDF
//=============================================================================
/*!
* \brief Create standalone group instead if group on geometry
- *
*/
//=============================================================================
_mapGroups[anId] = SMESH::SMESH_GroupBase::_duplicate( aGroup );
// register CORBA object for persistence
- //int nextId = _gen_i->RegisterObject( aGroup );
- //if(MYDEBUG) MESSAGE( "Add group to map with id = "<< nextId);
+ /*int nextId =*/ _gen_i->RegisterObject( aGroup );
+
builder->SetIOR( aGroupSO, _gen_i->GetORB()->object_to_string( aGroup ) );
return aGroup._retn();
return aMesh._retn();
}
+//================================================================================
+/*!
+ * \brief Return true if the mesh has been edited since a last total re-compute
+ * and those modifications may prevent successful partial re-compute
+ */
+//================================================================================
+
+CORBA::Boolean SMESH_Mesh_i::HasModificationsToDiscard() throw(SALOME::SALOME_Exception)
+{
+ Unexpect aCatch(SALOME_SalomeException);
+ return _impl->HasModificationsToDiscard();
+}
+
//=============================================================================
/*!
*
return ( SMESH::ElementType )_impl->GetElementType( id, iselem );
}
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+
+SMESH::EntityType SMESH_Mesh_i::GetElementGeomType( const CORBA::Long id )
+ throw (SALOME::SALOME_Exception)
+{
+ const SMDS_MeshElement* e = _impl->GetMeshDS()->FindElement(id);
+ if ( !e )
+ THROW_SALOME_CORBA_EXCEPTION( "invalid element id", SALOME::BAD_PARAM );
+
+ return ( SMESH::EntityType ) e->GetEntityType();
+}
//=============================================================================
/*!
return elem->NbFaces();
}
+//=======================================================================
+//function : GetElemFaceNodes
+//purpose : Returns nodes of given face (counted from zero) for given element.
+//=======================================================================
+
+SMESH::long_array* SMESH_Mesh_i::GetElemFaceNodes(CORBA::Long elemId,
+ CORBA::Short faceIndex)
+{
+ SMESH::long_array_var aResult = new SMESH::long_array();
+ if ( SMESHDS_Mesh* aSMESHDS_Mesh = _impl->GetMeshDS() )
+ {
+ if ( const SMDS_MeshElement* elem = aSMESHDS_Mesh->FindElement(elemId) )
+ {
+ SMDS_VolumeTool vtool( elem );
+ if ( faceIndex < vtool.NbFaces() )
+ {
+ aResult->length( vtool.NbFaceNodes( faceIndex ));
+ const SMDS_MeshNode** nn = vtool.GetFaceNodes( faceIndex );
+ for ( int i = 0; i < aResult->length(); ++i )
+ aResult[ i ] = nn[ i ]->GetID();
+ }
+ }
+ }
+ return aResult._retn();
+}
+
+//=======================================================================
+//function : FindElementByNodes
+//purpose : Returns an element based on all given nodes.
+//=======================================================================
+
+CORBA::Long SMESH_Mesh_i::FindElementByNodes(const SMESH::long_array& nodes)
+{
+ CORBA::Long elemID(0);
+ if ( SMESHDS_Mesh* mesh = _impl->GetMeshDS() )
+ {
+ vector< const SMDS_MeshNode * > nn( nodes.length() );
+ for ( int i = 0; i < nodes.length(); ++i )
+ if ( !( nn[i] = mesh->FindNode( nodes[i] )))
+ return elemID;
+
+ const SMDS_MeshElement* elem = mesh->FindElement( nn );
+ if ( !elem && ( _impl->NbEdges( ORDER_QUADRATIC ) ||
+ _impl->NbFaces( ORDER_QUADRATIC ) ||
+ _impl->NbVolumes( ORDER_QUADRATIC )))
+ elem = mesh->FindElement( nn, SMDSAbs_All, /*noMedium=*/true );
+
+ if ( elem ) elemID = CORBA::Long( elem->GetID() );
+ }
+ return elemID;
+}
//=============================================================================
/*!
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Mesh_i.hxx
// Author : Paul RASCLE, EDF
SMESH::SMESH_MeshEditor_ptr GetMeshEditPreviewer();
+ CORBA::Boolean HasModificationsToDiscard() throw (SALOME::SALOME_Exception);
+
void ClearLog()
throw (SALOME::SALOME_Exception);
SMESH::ElementType GetElementType( CORBA::Long id, bool iselem )
throw (SALOME::SALOME_Exception);
+ SMESH::EntityType GetElementGeomType( CORBA::Long id )
+ throw (SALOME::SALOME_Exception);
+
/*!
* Returns ID of elements for given submesh
*/
* Returns number of faces for given element
*/
CORBA::Long ElemNbFaces(CORBA::Long id);
-
+ /*!
+ * Returns nodes of given face (counted from zero) for given element.
+ */
+ SMESH::long_array* GetElemFaceNodes(CORBA::Long elemId, CORBA::Short faceIndex);
+
+ /*!
+ * Returns an element based on all given nodes.
+ */
+ CORBA::Long FindElementByNodes(const SMESH::long_array& nodes);
+
/*!
* Returns true if given element is polygon
*/
-// Copyright (C) 2008 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// 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 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.
+// 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
+// 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
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_NoteBook.cxx
// Author : Roman NIKOLAEV
-
+//
#include "SMESH_2smeshpy.hxx"
#include "SMESH_NoteBook.hxx"
#include "SMESH_Gen_i.hxx"
using namespace std;
-void SetVariable(Handle(_pyCommand) theCommand,const ObjectStates* theStates, int position, int theArgNb);
+void SetVariable(Handle(_pyCommand) theCommand,const SMESH_ObjectStates* theStates, int position, int theArgNb);
//================================================================================
/*!
* \brief Constructor
*/
//================================================================================
-ObjectStates::ObjectStates(TCollection_AsciiString theType)
+SMESH_ObjectStates::SMESH_ObjectStates(TCollection_AsciiString theType)
{
_type = theType;
_dumpstate = 0;
* \brief Destructor
*/
//================================================================================
-ObjectStates::~ObjectStates()
+SMESH_ObjectStates::~SMESH_ObjectStates()
{
}
* \param theState - Object state (vector of notebook variable)
*/
//================================================================================
-void ObjectStates::AddState(const TState &theState)
+void SMESH_ObjectStates::AddState(const TState &theState)
{
_states.push_back(theState);
}
* \\retval state - Object state (vector of notebook variable)
*/
//================================================================================
-TState ObjectStates::GetCurrectState() const
+TState SMESH_ObjectStates::GetCurrectState() const
{
if(_states.size() > _dumpstate)
return _states[_dumpstate];
*
*/
//================================================================================
-TAllStates ObjectStates::GetAllStates() const
+TAllStates SMESH_ObjectStates::GetAllStates() const
{
return _states;
}
*
*/
//================================================================================
-void ObjectStates::IncrementState()
+void SMESH_ObjectStates::IncrementState()
{
_dumpstate++;
}
*
*/
//================================================================================
-TCollection_AsciiString ObjectStates::GetObjectType() const{
+TCollection_AsciiString SMESH_ObjectStates::GetObjectType() const{
return _type;
}
*/
//================================================================================
LayerDistributionStates::LayerDistributionStates():
- ObjectStates("LayerDistribution")
+ SMESH_ObjectStates("LayerDistribution")
{
}
//================================================================================
if(it != _objectMap.end()) {
if(MYDEBUG)
cout << "Found object : " << (*it).first << endl;
- ObjectStates *aStates = (*it).second;
+ SMESH_ObjectStates *aStates = (*it).second;
// Case for LocalLength hypothesis
if(aStates->GetObjectType().IsEqual("LocalLength") && aStates->GetCurrectState().size() >= 2) {
if(aMethod.IsEqual("SetLength")) {
}
if(MYDEBUG)
cout<<"The object Type : "<<anObjType<<endl;
- ObjectStates *aState = NULL;
+ SMESH_ObjectStates *aState = NULL;
if(anObjType == "LayerDistribution") {
aState = new LayerDistributionStates();
}
else
- aState = new ObjectStates(anObjType);
+ aState = new SMESH_ObjectStates(anObjType);
for(int i = 0; i < aSections->length(); i++) {
TState aVars;
}
aState->AddState(aVars);
}
- _objectMap.insert(pair<TCollection_AsciiString,ObjectStates*>(TCollection_AsciiString(aSObject->GetID()),aState));
+ _objectMap.insert(pair<TCollection_AsciiString,SMESH_ObjectStates*>(TCollection_AsciiString(aSObject->GetID()),aState));
}
}
}
/*!
- * Set variable of the ObjectStates from position to the _pyCommand
+ * Set variable of the SMESH_ObjectStates from position to the _pyCommand
* method as nbArg argument
*/
-void SetVariable(Handle(_pyCommand) theCommand, const ObjectStates* theStates, int position, int theArgNb)
+void SetVariable(Handle(_pyCommand) theCommand, const SMESH_ObjectStates* theStates, int position, int theArgNb)
{
if(theStates->GetCurrectState().size() > position)
if(!theStates->GetCurrectState().at(position).IsEmpty())
-// Copyright (C) 2008 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// 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 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.
+// 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
+// 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
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_NoteBook.hxx
// Author : Roman NIKOLAEV ()
-
-
+//
#ifndef SMESH_NoteBook_HeaderFile
#define SMESH_NoteBook_HeaderFile
typedef std::vector<TState> TAllStates;
typedef TCollection_AsciiString _pyID;
-class ObjectStates{
+class SMESH_ObjectStates{
public:
- ObjectStates(TCollection_AsciiString theType);
- virtual ~ObjectStates();
+ SMESH_ObjectStates(TCollection_AsciiString theType);
+ virtual ~SMESH_ObjectStates();
void AddState(const TState &theState);
int _dumpstate;
};
-class LayerDistributionStates : public ObjectStates
+class LayerDistributionStates : public SMESH_ObjectStates
{
public:
typedef std::map<TCollection_AsciiString,TCollection_AsciiString> TDistributionMap;
class SMESH_NoteBook
{
public:
- typedef std::map<TCollection_AsciiString,ObjectStates*> TVariablesMap;
+ typedef std::map<TCollection_AsciiString,SMESH_ObjectStates*> TVariablesMap;
typedef std::map<TCollection_AsciiString,TCollection_AsciiString> TMeshEditorMap;
SMESH_NoteBook();
~SMESH_NoteBook();
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Pattern_i.cxx
// Created : Fri Aug 20 16:15:49 2004
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Pattern_i.hxx
// Created : Fri Aug 20 16:03:15 2004
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _SMESH_PYTHONDUMP_HXX_
#define _SMESH_PYTHONDUMP_HXX_
TPythonDump&
operator<<(SMESH::SMESH_Hypothesis_ptr theArg);
+ TPythonDump&
+ operator<<(SMESH::SMESH_IDSource_ptr theArg);
+
TPythonDump&
operator<<(SALOMEDS::SObject_ptr theArg);
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_subMesh_i.cxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_subMesh_i.hxx
// Author : Paul RASCLE, EDF
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
# File : smeshpy.py
# Module : SMESH
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : Makefile.in
# Author : Nicolas REJNERI, Paul RASCLE
# Modified by : Alexander BORODIN (OCN) - autotools usage
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
import salome
import geompy
import smesh
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SMESH_testExtrusion2D.py
# Module : SMESH
# Description : Create meshes to test extrusion of mesh elements along path
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SMESH_testExtrusion3D.py
# Module : SMESH
# Description : Create meshes to test extrusion of mesh elements along path
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
import salome
import smesh
import math
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
from SMESH_test1 import *
## Old style
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SMESH_BuildCompound.py
# Author : Alexander KOVALEV
# Module : SMESH
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SMESH_GroupFromGeom.py
# Module : SMESH
#
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
#==============================================================================
# Info.
# Bug (from script, bug) : SMESH_GroupFromGeom.py, PAL6945
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
import salome
import smesh
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
#####################################################################
#Created :17/02/2005
#Auhtor :MASLOV Eugeny, KOVALTCHUK Alexey
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Tetrahedrization of the geometry generated by the Python script GEOM_Partition1.py
# Hypothesis and algorithms for the mesh generation are global
# -- Rayon de la bariere
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# GEOM GEOM_SWIG : binding of C++ omplementaion with Python
# File : GEOM_Sphere.py
# Author : Damien COQUERET, Open CASCADE
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH SMESH_SWIG : binding of C++ implementaion with Python
# File : SMESH_blocks.py
# Author : Julia DOROVSKIKH
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
#==============================================================================
# Info.
# Bug (from script, bug) : box.py, PAL5223
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Tetrahedrization of the geometry union of 2 boxes having a face in common
# Hypothesis and algorithms for the mesh generation are global
#
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Tetrahedrization of the geometry union of 3 boxes aligned where the middle
# one has a race in common with the two others.
# Hypothesis and algorithms for the mesh generation are global
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Tetrahedrization of a simple box. Hypothesis and algorithms for
# the mesh generation are global
#
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SMESH_control.py
# Author : Sergey LITONIN
# Module : SMESH
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
#==============================================================================
# Info.
# Bug (from script, bug) : SMESH_demo_hexa2_upd.py, PAL6781
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SMESH_fix_volute.py
# Author : Paul RASCLE, EDF
# Module : SMESH
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Hexahedrization of the geometry generated by the Python script
# SMESH_fixation.py
# Hypothesis and algorithms for the mesh generation are global
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Tetrahedrization of the geometry generated by the Python script
# SMESH_fixation.py
# The new Netgen algorithm is used that discretizes baoundaries itself
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Tetrahedrization of the geometry generated by the Python script
# SMESH_fixation.py
# Hypothesis and algorithms for the mesh generation are global
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Triangulation of the skin of the geometry from a Brep representing a plane
# Hypothesis and algorithms for the mesh generation are global
#
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
import salome
import geompy
import smesh
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
#==============================================================================
# Info.
# Bug (from script, bug) : hexaedre_modified.py, PAL6194, PAL7153
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SMESH_withHole.py
# Author : Lucien PIGNOLONI
# Module : SMESH
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SMESH_withHole.py
# Author : Lucien PIGNOLONI
# Module : SMESH
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Quadrangulation of the geometry generated by the Python script
# SMESH_mechanic.py
# The new Netgen algorithm is used that discretizes baoundaries itself
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SMESH_withHole.py
# Author : Lucien PIGNOLONI
# Module : SMESH
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SMESH_reg.py
# Module : SMESH
#
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
"""
"""
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
# File : SMESH_test.py
# Module : SMESH
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SMESH_test0.py
# Module : SMESH
#
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SMESH_test1.py
# Module : SMESH
#
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SMESH_test1.py
# Module : SMESH
#
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SMESH_test2.py
# Module : SMESH
#
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SMESH_test3.py
# Module : SMESH
#import salome
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
import salome
import geompy
import smesh
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SMESH_test5.py
# Module : SMESH
#
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
import os
import re
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : batchmode_smesh.py
# Author : Oksana TCHEBANOVA
# Module : SMESH
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# ==================================
# Load all examples
# -----------------
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# ==================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# Compound
# --------
-piece = RemoveExtraEdges(MakeCompound(cpd), 0)
+piece = RemoveExtraEdges(MakeCompound(cpd), True)
# Ajouter la piece dans l'etude
# -----------------------------
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# ==================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# ==================================
#
from geompy import *
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# ==================================
#
import math
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# =======================================
# Procedure that take a triangulation and split all triangles in 4 others triangles
#
# -*- coding: iso-8859-1 -*-
+# 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
+#
import sys
import salome
# -*- coding: iso-8859-1 -*-
-# CEA/LGLS 2008, Christian Van Wambeke (CEA/LGLS), Francis KLOSS (OCC)
-# ====================================================================
+# 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
+#
+# ====================================================================
+#
import os
import geompy
# -*- coding: iso-8859-1 -*-
+# 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
+#
import sys
import salome
# -*- coding: iso-8859-1 -*-
-# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : smesh.py
# Author : Francis KLOSS, OCC
# Module : SMESH
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : smesh.py
# Author : Francis KLOSS, OCC
# Module : SMESH
Hexotic = 9
BLSURF = 10
GHS3DPRL = 11
-QUARDANGLE = 0
+QUADRANGLE = 0
RADIAL_QUAD = 1
# MirrorType enumeration
PrecisionConfusion = 1e-07
+# TopAbs_State enumeration
+[TopAbs_IN, TopAbs_OUT, TopAbs_ON, TopAbs_UNKNOWN] = range(4)
+
+
## Converts an angle from degrees to radians
def DegreesToRadians(AngleInDegrees):
from math import pi
elif status == HYP_NOTCONFORM :
reason = "a non-conform mesh would be built"
elif status == HYP_ALREADY_EXIST :
+ if isAlgo: return # it does not influence anything
reason = hypType + " of the same dimension is already assigned to this shape"
elif status == HYP_BAD_DIM :
reason = hypType + " mismatches the shape"
# If the optional \a geom parameter is not set, this algorithm is global.
# \n Otherwise, this algorithm defines a submesh based on \a geom subshape.
# @param geom If defined, the subshape to be meshed (GEOM_Object)
- # @param algo values are: smesh.QUARDANGLE || smesh.RADIAL_QUAD
+ # @param algo values are: smesh.QUADRANGLE || smesh.RADIAL_QUAD
# @return an instance of Mesh_Quadrangle algorithm
# @ingroup l3_algos_basic
- def Quadrangle(self, geom=0, algo=QUARDANGLE):
+ def Quadrangle(self, geom=0, algo=QUADRANGLE):
if algo==RADIAL_QUAD:
return Mesh_RadialQuadrangle1D2D(self,geom)
else:
## Computes the mesh and returns the status of the computation
+ # @param discardModifs if True and the mesh has been edited since
+ # a last total re-compute and that may prevent successful partial re-compute,
+ # then the mesh is cleaned before Compute()
# @return True or False
# @ingroup l2_construct
- def Compute(self, geom=0):
+ def Compute(self, geom=0, discardModifs=False):
if geom == 0 or not isinstance(geom, geompyDC.GEOM._objref_GEOM_Object):
if self.geom == 0:
geom = self.mesh.GetShapeToMesh()
geom = self.geom
ok = False
try:
+ if discardModifs and self.mesh.HasModificationsToDiscard(): # issue 0020693
+ self.mesh.Clear()
ok = self.smeshpyD.Compute(self.mesh, geom)
except SALOME.SALOME_Exception, ex:
print "Mesh computation failed, exception caught:"
print "Mesh computation failed, exception caught:"
traceback.print_exc()
if True:#not ok:
- errors = self.smeshpyD.GetAlgoState( self.mesh, geom )
allReasons = ""
+
+ # Treat compute errors
+ computeErrors = self.smeshpyD.GetComputeErrors( self.mesh, geom )
+ for err in computeErrors:
+ shapeText = ""
+ if self.mesh.HasShapeToMesh():
+ try:
+ mainIOR = salome.orb.object_to_string(geom)
+ for sname in salome.myStudyManager.GetOpenStudies():
+ s = salome.myStudyManager.GetStudyByName(sname)
+ if not s: continue
+ mainSO = s.FindObjectIOR(mainIOR)
+ if not mainSO: continue
+ if err.subShapeID == 1:
+ shapeText = ' on "%s"' % mainSO.GetName()
+ subIt = s.NewChildIterator(mainSO)
+ while subIt.More():
+ subSO = subIt.Value()
+ subIt.Next()
+ obj = subSO.GetObject()
+ if not obj: continue
+ go = obj._narrow( geompyDC.GEOM._objref_GEOM_Object )
+ if not go: continue
+ ids = go.GetSubShapeIndices()
+ if len(ids) == 1 and ids[0] == err.subShapeID:
+ shapeText = ' on "%s"' % subSO.GetName()
+ break
+ if not shapeText:
+ shape = self.geompyD.GetSubShape( geom, [err.subShapeID])
+ if shape:
+ shapeText = " on %s #%s" % (shape.GetShapeType(), err.subShapeID)
+ else:
+ shapeText = " on subshape #%s" % (err.subShapeID)
+ except:
+ shapeText = " on subshape #%s" % (err.subShapeID)
+ errText = ""
+ stdErrors = ["OK", #COMPERR_OK
+ "Invalid input mesh", #COMPERR_BAD_INPUT_MESH
+ "std::exception", #COMPERR_STD_EXCEPTION
+ "OCC exception", #COMPERR_OCC_EXCEPTION
+ "SALOME exception", #COMPERR_SLM_EXCEPTION
+ "Unknown exception", #COMPERR_EXCEPTION
+ "Memory allocation problem", #COMPERR_MEMORY_PB
+ "Algorithm failed", #COMPERR_ALGO_FAILED
+ "Unexpected geometry"]#COMPERR_BAD_SHAPE
+ if err.code > 0:
+ if err.code < len(stdErrors): errText = stdErrors[err.code]
+ else:
+ errText = "code %s" % -err.code
+ if errText: errText += ". "
+ errText += err.comment
+ if allReasons != "":allReasons += "\n"
+ allReasons += '"%s" failed%s. Error: %s' %(err.algoName, shapeText, errText)
+ pass
+
+ # Treat hyp errors
+ errors = self.smeshpyD.GetAlgoState( self.mesh, geom )
for err in errors:
if err.isGlobalAlgo:
glob = "global"
reason = "For unknown reason."+\
" Revise Mesh.Compute() implementation in smeshDC.py!"
pass
- if allReasons != "":
- allReasons += "\n"
- pass
+ if allReasons != "":allReasons += "\n"
allReasons += reason
pass
if allReasons != "":
def GetElementType(self, id, iselem):
return self.mesh.GetElementType(id, iselem)
+ ## Returns the geometric type of mesh element
+ # @return the value from SMESH::EntityType enumeration
+ # @ingroup l1_meshinfo
+ def GetElementGeomType(self, id):
+ return self.mesh.GetElementGeomType(id)
+
## Returns the list of submesh elements IDs
# @param Shape a geom object(subshape) IOR
# Shape must be the subshape of a ShapeToMesh()
def ElemNbFaces(self, id):
return self.mesh.ElemNbFaces(id)
+ ## Returns nodes of given face (counted from zero) for given volumic element.
+ # @ingroup l1_meshinfo
+ def GetElemFaceNodes(self,elemId, faceIndex):
+ return self.mesh.GetElemFaceNodes(elemId, faceIndex)
+
+ ## Returns an element based on all given nodes.
+ # @ingroup l1_meshinfo
+ def FindElementByNodes(self,nodes):
+ return self.mesh.FindElementByNodes(nodes)
+
## Returns true if the given element is a polygon
# @ingroup l1_meshinfo
def IsPoly(self, id):
def FindElementsByPoint(self, x, y, z, elementType = SMESH.ALL):
return self.editor.FindElementsByPoint(x, y, z, elementType)
+ # Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
+ # TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
+
+ def GetPointState(self, x, y, z):
+ return self.editor.GetPointState(x, y, z)
## Finds the node closest to a point and moves it to a point location
# @param x the X coordinate of a point
def BestSplit (self, IDOfQuad, theCriterion):
return self.editor.BestSplit(IDOfQuad, self.smeshpyD.GetFunctor(theCriterion))
+ ## Splits volumic elements into tetrahedrons
+ # @param elemIDs either list of elements or mesh or group or submesh
+ # @param method flags passing splitting method:
+ # 1 - split the hexahedron into 5 tetrahedrons
+ # 2 - split the hexahedron into 6 tetrahedrons
+ # @ingroup l2_modif_cutquadr
+ def SplitVolumesIntoTetra(self, elemIDs, method=1 ):
+ if isinstance( elemIDs, Mesh ):
+ elemIDs = elemIDs.GetMesh()
+ self.editor.SplitVolumesIntoTetra(elemIDs, method)
+
## Splits quadrangle faces near triangular facets of volumes
#
# @ingroup l1_auxiliary
mesh.SetParameters(Parameters)
return Mesh( self.smeshpyD, self.geompyD, mesh )
+
+
+ ## Scales the object
+ # @param theObject - the object to translate (mesh, submesh, or group)
+ # @param thePoint - base point for scale
+ # @param theScaleFact - scale factors for axises
+ # @param Copy - allows copying the translated elements
+ # @param MakeGroups - forces the generation of new groups from existing
+ # ones (if Copy)
+ # @return list of created groups (SMESH_GroupBase) if MakeGroups=True,
+ # empty list otherwise
+ def Scale(self, theObject, thePoint, theScaleFact, Copy, MakeGroups=False):
+ if ( isinstance( theObject, Mesh )):
+ theObject = theObject.GetMesh()
+ if ( isinstance( theObject, list )):
+ theObject = self.editor.MakeIDSource(theObject)
+
+ thePoint, Parameters = ParsePointStruct(thePoint)
+ self.mesh.SetParameters(Parameters)
+
+ if Copy and MakeGroups:
+ return self.editor.ScaleMakeGroups(theObject, thePoint, theScaleFact)
+ self.editor.Scale(theObject, thePoint, theScaleFact, Copy)
+ return []
+
+ ## Creates a new mesh from the translated object
+ # @param theObject - the object to translate (mesh, submesh, or group)
+ # @param thePoint - base point for scale
+ # @param theScaleFact - scale factors for axises
+ # @param MakeGroups - forces the generation of new groups from existing ones
+ # @param NewMeshName - the name of the newly created mesh
+ # @return instance of Mesh class
+ def ScaleMakeMesh(self, theObject, thePoint, theScaleFact, MakeGroups=False, NewMeshName=""):
+ if (isinstance(theObject, Mesh)):
+ theObject = theObject.GetMesh()
+ if ( isinstance( theObject, list )):
+ theObject = self.editor.MakeIDSource(theObject)
+
+ mesh = self.editor.ScaleMakeMesh(theObject, thePoint, theScaleFact,
+ MakeGroups, NewMeshName)
+ #mesh.SetParameters(Parameters)
+ return Mesh( self.smeshpyD, self.geompyD, mesh )
+
+
+
## Rotates the elements
# @param IDsOfElements list of elements ids
# @param Axis the axis of rotation (AxisStruct or geom line)
## Creates a hole in a mesh by doubling the nodes of some particular elements
# This method provided for convenience works as DoubleNodes() described above.
- # @param theNodes identifiers of node to be doubled
+ # @param theNodeId identifiers of node to be doubled
# @param theModifiedElems identifiers of elements to be updated
# @return TRUE if operation has been completed successfully, FALSE otherwise
# @ingroup l2_modif_edit
# will be created while other elements will be quadrangles.
# Vertex can be either a GEOM_Object or a vertex ID within the
# shape to mesh
+ # @param UseExisting: if ==true - searches for the existing hypothesis created with
+ # the same parameters, else (default) - creates a new one
#
# @ingroup l3_hypos_additi
def TriangleVertex(self, vertex, UseExisting=0):
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH SMESHGUI : GUI for SMESH component
# File : Makefile.am
# Author : Alexander BORODIN, Open CASCADE S.A.S.
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : GUI for SMESH component
// File : libSMESH_Swig.cxx
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : GUI for SMESH component
// File : libSMESH_Swig.h
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : libSMESH_Swig.i
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH StdMeshers : implementaion of SMESH idl descriptions
# File : Makefile.in
# Author : Julia DOROVSKIKH
StdMeshers_CompositeHexa_3D.hxx \
StdMeshers_MaxLength.hxx \
StdMeshers_QuadrangleParams.hxx \
- StdMeshers_RadialQuadrangle_1D2D.hxx
+ StdMeshers_RadialQuadrangle_1D2D.hxx \
+ StdMeshers_HexaFromSkin_3D.hxx
# Libraries targets
StdMeshers_CompositeHexa_3D.cxx \
StdMeshers_MaxLength.cxx \
StdMeshers_QuadrangleParams.cxx \
- StdMeshers_RadialQuadrangle_1D2D.cxx
+ StdMeshers_RadialQuadrangle_1D2D.cxx \
+ StdMeshers_HexaFromSkin_3D.cxx
# additionnal information to compil and link file
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_StdMeshers.hxx
// Author : Alexander BORODIN
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Arithmetic1D.cxx
// Author : Damien COQUERET, OCC
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Arithmetic1D.hxx
// Author : Damien COQUERET, OCC
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_AutomaticLength.cxx
// Author : Edward AGAPOV, OCC
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_AutomaticLength.hxx
// Author : Edward AGAPOV, OCC
// Module : SMESH
-
+//
#ifndef _SMESH_AutomaticLength_HXX_
#define _SMESH_AutomaticLength_HXX_
-// SMESH SMESH : implementaion of SMESH idl descriptions
+// 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
//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
+// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_CompositeHexa_3D.cxx
// Module : SMESH
// Created : Tue Nov 25 11:04:59 2008
// Author : Edward AGAPOV (eap)
-
+//
#include "StdMeshers_CompositeHexa_3D.hxx"
#include "SMDS_Mesh.hxx"
-// SMESH SMESH : implementaion of SMESH idl descriptions
+// 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.
//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// 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
//
+
+// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_CompositeBlock_3D.hxx
// Module : SMESH
-
+//
#ifndef _SMESH_CompositeSegment_1D_HXX_
#define _SMESH_CompositeSegment_1D_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Regular_1D.cxx
// Moved here from SMESH_Regular_1D.cxx
*/
//================================================================================
- TopoDS_Edge nextC1Edge(const TopoDS_Edge& edge,
- SMESH_Mesh & aMesh,
- const bool forward)
+ TopoDS_Edge nextC1Edge(TopoDS_Edge edge,
+ SMESH_Mesh & aMesh,
+ const bool forward)
{
+ if (edge.Orientation() > TopAbs_REVERSED) // INTERNAL
+ edge.Orientation( TopAbs_FORWARD );
TopoDS_Edge eNext;
TopTools_MapOfShape edgeCounter;
edgeCounter.Add( edge );
- TopoDS_Vertex v;
- v = forward ? TopExp::LastVertex( edge,1 ) : TopExp::FirstVertex( edge,1 );
+ TopoDS_Vertex v = forward ? TopExp::LastVertex(edge,true) : TopExp::FirstVertex(edge,true);
TopTools_ListIteratorOfListOfShape ancestIt = aMesh.GetAncestors( v );
for ( ; ancestIt.More(); ancestIt.Next() )
{
if ( edgeCounter.Extent() < 3 && !eNext.IsNull() ) {
if ( SMESH_Algo::IsContinuous( edge, eNext )) {
// care of orientation
- bool reverse;
- if ( forward )
- reverse = ( !v.IsSame( TopExp::FirstVertex( eNext, true )));
- else
- reverse = ( !v.IsSame( TopExp::LastVertex( eNext, true )));
+ if (eNext.Orientation() > TopAbs_REVERSED) // INTERNAL
+ eNext.Orientation( TopAbs_FORWARD );
+ TopoDS_Vertex vn =
+ forward ? TopExp::FirstVertex(eNext,true) : TopExp::LastVertex(eNext,true);
+ bool reverse = (!v.IsSame(vn));
if ( reverse )
eNext.Reverse();
return eNext;
const bool ignoreMeshed)
{
list< TopoDS_Edge > edges;
- edges.push_back( anEdge );
+ if ( anEdge.Orientation() <= TopAbs_REVERSED )
+ edges.push_back( anEdge );
+ else
+ edges.push_back( TopoDS::Edge( anEdge.Oriented( TopAbs_FORWARD ))); // PAL21718
list <const SMESHDS_Hypothesis *> hypList;
SMESH_Algo* theAlgo = aMesh.GetGen()->GetAlgo( aMesh, anEdge );
if ( theAlgo ) hypList = theAlgo->GetUsedHypothesis(aMesh, anEdge, false);
for ( int forward = 0; forward < 2; ++forward )
{
- TopoDS_Edge eNext = nextC1Edge( anEdge, aMesh, forward );
+ TopoDS_Edge eNext = nextC1Edge( edges.back(), aMesh, forward );
while ( !eNext.IsNull() ) {
if ( ignoreMeshed ) {
// eNext must not have computed mesh
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_CompositeSegment_1D.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers_Deflection1D : implementaion of SMESH idl descriptions
// File : StdMeshers_Deflection1D.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers : implementaion of SMESH idl descriptions
// File : StdMeshers_Deflection1D.hxx
// Module : SMESH
//
-
#ifndef _StdMeshers_Deflection1D_HXX_
#define _StdMeshers_Deflection1D_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers : implementaion of point distribution algorithm
// File : StdMeshers_Distribution.cxx
// Author : Alexandre SOLOVYOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers : implementaion of point distribution algorithm
// File : StdMeshers_Distribution.hxx
// Author : Alexandre SOLOVYOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_FaceSide.hxx
// Created : Wed Jan 31 18:41:25 2007
#include "SMDS_MeshNode.hxx"
#include "SMESHDS_Mesh.hxx"
#include "SMESHDS_SubMesh.hxx"
-//#include "SMESH_Algo.hxx"
+#include "SMESH_Algo.hxx"
#include "SMESH_Mesh.hxx"
#include "SMESH_MesherHelper.hxx"
#include "SMESH_ComputeError.hxx"
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
+#include <GCPnts_AbscissaPoint.hxx>
+#include <Geom2dAdaptor_Curve.hxx>
+
#include <map>
#include "utilities.h"
int nbEdges = theEdges.size();
myEdge.resize( nbEdges );
myC2d.resize( nbEdges );
+ myC3dAdaptor.resize( nbEdges );
myFirst.resize( nbEdges );
myLast.resize( nbEdges );
myNormPar.resize( nbEdges );
+ myEdgeLength.resize( nbEdges );
+ myIsUniform.resize( nbEdges, true );
myLength = 0;
myNbPonits = myNbSegments = 0;
myMesh = theMesh;
if ( nbEdges == 0 ) return;
SMESHDS_Mesh* meshDS = theMesh->GetMeshDS();
- vector<double> len( nbEdges );
int nbDegen = 0;
list<TopoDS_Edge>::iterator edge = theEdges.begin();
for ( int index = 0; edge != theEdges.end(); ++index, ++edge )
{
int i = theIsForward ? index : nbEdges - index - 1;
- len[i] = SMESH_Algo::EdgeLength( *edge );
- if ( len[i] < DBL_MIN ) nbDegen++;
- myLength += len[i];
+ myEdgeLength[i] = SMESH_Algo::EdgeLength( *edge );
+ if ( myEdgeLength[i] < DBL_MIN ) nbDegen++;
+ myLength += myEdgeLength[i];
myEdge[i] = *edge;
if ( !theIsForward ) myEdge[i].Reverse();
myNbPonits += nbN;
myNbSegments += sm->NbElements();
}
+ // TopExp::FirstVertex() and TopExp::LastVertex() return NULL from INTERNAL edge
vExp.Initialize( *edge );
+ if ( vExp.Value().Orientation() == TopAbs_REVERSED ) vExp.Next();
if ( SMESH_Algo::VertexNode( TopoDS::Vertex( vExp.Value()), meshDS ))
myNbPonits += 1; // for the first end
else
myMissingVertexNodes = true;
+
+ // check if edge has non-uniform parametrization (issue 0020705)
+ if ( !myC2d[i].IsNull() && myEdgeLength[i] > DBL_MIN)
+ {
+ Geom2dAdaptor_Curve A2dC( myC2d[i] );
+ double p2 = myFirst[i]+(myLast[i]-myFirst[i])/2., p4 = myFirst[i]+(myLast[i]-myFirst[i])/4.;
+ double d2 = GCPnts_AbscissaPoint::Length( A2dC, myFirst[i], p2 );
+ double d4 = GCPnts_AbscissaPoint::Length( A2dC, myFirst[i], p4 );
+ //cout<<"len = "<<len<<" d2 = "<<d2<<" fabs(2*d2/len-1.0) = "<<fabs(2*d2/len-1.0)<<endl;
+ myIsUniform[i] = !( fabs(2*d2/myEdgeLength[i]-1.0) > 0.01 || fabs(2*d4/d2-1.0) > 0.01 );
+ if ( !myIsUniform[i] )
+ {
+ double fp,lp;
+ TopLoc_Location L;
+ Handle(Geom_Curve) C3d = BRep_Tool::Curve(myEdge[i],L,fp,lp);
+ myC3dAdaptor[i].Load( C3d, fp,lp );
+ }
+ }
}
- vExp.Next();
+ vExp.Initialize( theEdges.back() );
+ if ( vExp.Value().Orientation() != TopAbs_REVERSED ) vExp.Next();
if ( vExp.More() )
{
if ( SMESH_Algo::VertexNode( TopoDS::Vertex( vExp.Value()), meshDS ))
totLength += myLength * degenNormLen * nbDegen;
double prevNormPar = 0;
for ( int i = 0; i < nbEdges; ++i ) {
- if ( len[ i ] < DBL_MIN )
- len[ i ] = myLength * degenNormLen;
- myNormPar[ i ] = prevNormPar + len[i]/totLength;
+ if ( myEdgeLength[ i ] < DBL_MIN )
+ myEdgeLength[ i ] = myLength * degenNormLen;
+ myNormPar[ i ] = prevNormPar + myEdgeLength[i]/totLength;
prevNormPar = myNormPar[ i ];
}
}
if ( NbEdges() == 0 ) return myPoints;
SMESHDS_Mesh* meshDS = myMesh->GetMeshDS();
+ SMESH_MesherHelper helper(*myMesh);
+ bool paramOK;
// sort nodes of all edges putting them into a map
map< double, const SMDS_MeshNode*> u2node;
//int nbOnDegen = 0;
- for ( int i = 0; i < myEdge.size(); ++i ) {
- // put 1st vertex node
+ for ( int i = 0; i < myEdge.size(); ++i )
+ {
+ // Put 1st vertex node of a current edge
TopoDS_Vertex VV[2]; // TopExp::FirstVertex() returns NULL for INTERNAL edge
for ( TopoDS_Iterator vIt(myEdge[i]); vIt.More(); vIt.Next() )
VV[ VV[0].IsNull() ? 0 : 1 ] = TopoDS::Vertex(vIt.Value());
return myPoints;
}
- // put 2nd vertex node for a last edge
+ // Put internal nodes
+ SMESHDS_SubMesh* sm = meshDS->MeshElements( myEdge[i] );
+ if ( !sm ) continue;
+ vector< pair< double, const SMDS_MeshNode*> > u2nodeVec;
+ u2nodeVec.reserve( sm->NbNodes() );
+ SMDS_NodeIteratorPtr nItr = sm->GetNodes();
+ double paramSize = myLast[i] - myFirst[i];
+ double r = myNormPar[i] - prevNormPar;
+ if ( !myIsUniform[i] )
+ while ( nItr->more() )
+ {
+ const SMDS_MeshNode* node = nItr->next();
+ if ( myIgnoreMediumNodes && SMESH_MeshEditor::IsMedium( node, SMDSAbs_Edge ))
+ continue;
+ double u = helper.GetNodeU( myEdge[i], node, ¶mOK );
+ double aLenU = GCPnts_AbscissaPoint::Length
+ ( const_cast<GeomAdaptor_Curve&>( myC3dAdaptor[i]), myFirst[i], u );
+ if ( myEdgeLength[i] < aLenU ) // nonregression test "3D_mesh_NETGEN/G6"
+ {
+ u2nodeVec.clear();
+ break;
+ }
+ double normPar = prevNormPar + r*aLenU/myEdgeLength[i];
+ u2nodeVec.push_back( make_pair( normPar, node ));
+ }
+ nItr = sm->GetNodes();
+ if ( u2nodeVec.empty() )
+ while ( nItr->more() )
+ {
+ const SMDS_MeshNode* node = nItr->next();
+ if ( myIgnoreMediumNodes && SMESH_MeshEditor::IsMedium( node, SMDSAbs_Edge ))
+ continue;
+ double u = helper.GetNodeU( myEdge[i], node, ¶mOK );
+
+ // paramSize is signed so orientation is taken into account
+ double normPar = prevNormPar + r * ( u - myFirst[i] ) / paramSize;
+ u2nodeVec.push_back( make_pair( normPar, node ));
+ }
+ u2node.insert( u2nodeVec.begin(), u2nodeVec.end() );
+
+ // Put 2nd vertex node for a last edge
if ( i+1 == myEdge.size() ) {
node = SMESH_Algo::VertexNode( VV[1], meshDS );
if ( !node ) {
}
u2node.insert( make_pair( 1., node ));
}
-
- // put internal nodes
- SMESHDS_SubMesh* sm = meshDS->MeshElements( myEdge[i] );
- if ( !sm ) continue;
- SMDS_NodeIteratorPtr nItr = sm->GetNodes();
- double paramSize = myLast[i] - myFirst[i], r = myNormPar[i] - prevNormPar;
- while ( nItr->more() ) {
- const SMDS_MeshNode* node = nItr->next();
- if ( myIgnoreMediumNodes && SMESH_MeshEditor::IsMedium( node, SMDSAbs_Edge ))
- continue;
- const SMDS_EdgePosition* epos =
- static_cast<const SMDS_EdgePosition*>(node->GetPosition().get());
- double u = epos->GetUParameter();
- // paramSize is signed so orientation is taken into account
- double normPar = prevNormPar + r * ( u - myFirst[i] ) / paramSize;
-#ifdef _DEBUG_
- if ( normPar > 1 || normPar < 0) {
- dump("DEBUG");
- MESSAGE ( "WRONG normPar: "<<normPar<< " prevNormPar="<<prevNormPar
- << " u="<<u << " myFirst[i]="<<myFirst[i]<< " myLast[i]="<<myLast[i]
- << " paramSize="<<paramSize );
- }
-#endif
- u2node.insert( make_pair( normPar, node ));
- }
}
if ( u2node.size() != myNbPonits ) {
MESSAGE("Wrong node parameters on edges, u2node.size():"
if ( nbEdges > 1 ) {
reverse( myEdge );
reverse( myC2d );
+ reverse( myC3dAdaptor );
reverse( myFirst );
reverse( myLast );
reverse( myNormPar );
+ reverse( myEdgeLength );
+ reverse( myIsUniform );
}
myNormPar[nbEdges-1]=1.;
myPoints.clear();
return new BRepAdaptor_CompCurve( aWire );
}
+
//================================================================================
/*!
* \brief Return 2D point by normalized parameter
int i = EdgeIndex( U );
double prevU = i ? myNormPar[ i-1 ] : 0;
double r = ( U - prevU )/ ( myNormPar[ i ] - prevU );
- return myC2d[ i ]->Value( myFirst[i] * ( 1 - r ) + myLast[i] * r );
+
+ double par = myFirst[i] * ( 1 - r ) + myLast[i] * r;
+
+ // check parametrization of curve
+ if( !myIsUniform[i] )
+ {
+ double aLen3dU = r * myEdgeLength[i] * ( myFirst[i]>myLast[i] ? -1. : 1.);
+ GCPnts_AbscissaPoint AbPnt
+ ( const_cast<GeomAdaptor_Curve&>( myC3dAdaptor[i]), aLen3dU, myFirst[i] );
+ if( AbPnt.IsDone() ) {
+ par = AbPnt.Parameter();
+ }
+ }
+ return myC2d[ i ]->Value(par);
+
}
- //return gp_Pnt2d( 1e+100, 1e+100 );
return myDefaultPnt2d;
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_FaceSide.hxx
// Created : Wed Jan 31 18:41:25 2007
#ifndef StdMeshers_FaceSide_HeaderFile
#define StdMeshers_FaceSide_HeaderFile
-#include <gp_Pnt2d.hxx>
+#include <Geom2d_Curve.hxx>
+#include <GeomAdaptor_Curve.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
-#include <Geom2d_Curve.hxx>
-#include <TopExp.hxx>
+#include <gp_Pnt2d.hxx>
#include "SMESH_StdMeshers.hxx"
-#include "SMESH_Algo.hxx"
#include <vector>
#include <list>
class Adaptor3d_Curve;
class BRepAdaptor_CompCurve;
class TopoDS_Face;
-class SMESH_ComputeError;
+struct SMESH_ComputeError;
typedef struct uvPtStruct
{
protected:
+
+ // DON't FORGET tO update Reverse() when adding one more vector!
std::vector<uvPtStruct> myPoints, myFalsePoints;
std::vector<TopoDS_Edge> myEdge;
std::vector<Handle(Geom2d_Curve)> myC2d;
+ std::vector<GeomAdaptor_Curve> myC3dAdaptor;
std::vector<double> myFirst, myLast;
std::vector<double> myNormPar;
+ std::vector<double> myEdgeLength;
+ std::vector<double> myIsUniform;
double myLength;
int myNbPonits, myNbSegments;
SMESH_Mesh* myMesh;
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_FixedPoints1D.cxx
// Author : Damien COQUERET, OCC
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_FixedPoints1D.hxx
// Author : Damien COQUERET, OCC
--- /dev/null
+// 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
+//
+
+// File : StdMeshers_HexaFromSkin_3D.cxx
+// Created : Wed Jan 27 12:28:07 2010
+// Author : Edward AGAPOV (eap)
+//
+#include "StdMeshers_HexaFromSkin_3D.hxx"
+
+#include "SMDS_VolumeOfNodes.hxx"
+#include "SMDS_VolumeTool.hxx"
+#include "SMESH_Block.hxx"
+#include "SMESH_MesherHelper.hxx"
+
+#include <gp_Ax2.hxx>
+
+//#include "utilities.h"
+
+// Define error message
+#ifdef _DEBUG_
+#define BAD_MESH_ERR \
+ error(SMESH_Comment("Can't detect block-wise structure of the input 2D mesh.\n" \
+ __FILE__ ":" )<<__LINE__)
+#else
+#define BAD_MESH_ERR \
+ error(SMESH_Comment("Can't detect block-wise structure of the input 2D mesh"))
+#endif
+
+// Debug output
+#define _DUMP_(msg) //cout << msg << endl
+
+
+
+namespace
+{
+ enum EBoxSides //!< sides of the block
+ {
+ B_BOTTOM=0, B_RIGHT, B_TOP, B_LEFT, B_FRONT, B_BACK, B_UNDEFINED
+ };
+ const char* SBoxSides[] = //!< names of block sides
+ {
+ "BOTTOM", "RIGHT", "TOP", "LEFT", "FRONT", "BACK", "UNDEFINED"
+ };
+ enum EQuadEdge //!< edges of quadrangle side
+ {
+ Q_BOTTOM, Q_RIGHT, Q_TOP, Q_LEFT, Q_UNDEFINED
+ };
+
+
+ //================================================================================
+ /*!
+ * \brief return logical coordinates (i.e. min or max) of ends of edge
+ */
+ //================================================================================
+
+ bool getEdgeEnds(EQuadEdge edge, bool& xMax1, bool& yMax1, bool& xMax2, bool& yMax2 )
+ {
+ xMax1=0, yMax1=0, xMax2=1, yMax2=1;
+ switch( edge )
+ {
+ case Q_BOTTOM: yMax2 = 0; break;
+ case Q_RIGHT: xMax1 = 1; break;
+ case Q_TOP: yMax1 = 1; break;
+ case Q_LEFT: xMax2 = 0; break;
+ default:
+ return false;
+ }
+ return true;
+ }
+
+ //================================================================================
+ /*!
+ * \brief return true if a node is at block corner
+ */
+ //================================================================================
+
+ bool isCornerNode( const SMDS_MeshNode* n )
+ {
+ return n && n->NbInverseElements( SMDSAbs_Face ) % 2;
+ }
+
+ //================================================================================
+ /*!
+ * \brief check element type
+ */
+ //================================================================================
+
+ bool isQuadrangle(const SMDS_MeshElement* e)
+ {
+ return ( e && e->NbNodes() == ( e->IsQuadratic() ? 8 : 4 ));
+ }
+
+ //================================================================================
+ /*!
+ * \brief return opposite node of a quadrangle face
+ */
+ //================================================================================
+
+ const SMDS_MeshNode* oppositeNode(const SMDS_MeshElement* quad, int iNode)
+ {
+ return quad->GetNode( (iNode+2) % 4 );
+ }
+
+ //================================================================================
+ /*!
+ * \brief Convertor of a pair of integers to a sole index
+ */
+ struct _Indexer
+ {
+ int _xSize, _ySize;
+ _Indexer( int xSize=0, int ySize=0 ): _xSize(xSize), _ySize(ySize) {}
+ int size() const { return _xSize * _ySize; }
+ int operator()(int x, int y) const { return y * _xSize + x; }
+ };
+ //================================================================================
+ /*!
+ * \brief Oriented convertor of a pair of integers to a sole index
+ */
+ class _OrientedIndexer : public _Indexer
+ {
+ public:
+ enum OriFlags //!< types of block side orientation
+ {
+ REV_X = 1, REV_Y = 2, SWAP_XY = 4, MAX_ORI = REV_X|REV_Y|SWAP_XY
+ };
+ _OrientedIndexer( const _Indexer& indexer, const int oriFlags ):
+ _Indexer( indexer._xSize, indexer._ySize ),
+ _xSize (indexer._xSize), _ySize(indexer._ySize),
+ _xRevFun((oriFlags & REV_X) ? & reverse : & lazy),
+ _yRevFun((oriFlags & REV_Y) ? & reverse : & lazy),
+ _swapFun((oriFlags & SWAP_XY ) ? & swap : & lazy)
+ {
+ (*_swapFun)( _xSize, _ySize );
+ }
+ //!< Return index by XY
+ int operator()(int x, int y) const
+ {
+ (*_xRevFun)( x, const_cast<int&>( _xSize ));
+ (*_yRevFun)( y, const_cast<int&>( _ySize ));
+ (*_swapFun)( x, y );
+ return _Indexer::operator()(x,y);
+ }
+ //!< Return index for a corner
+ int corner(bool xMax, bool yMax) const
+ {
+ int x = xMax, y = yMax, size = 2;
+ (*_xRevFun)( x, size );
+ (*_yRevFun)( y, size );
+ (*_swapFun)( x, y );
+ return _Indexer::operator()(x ? _Indexer::_xSize-1 : 0 , y ? _Indexer::_ySize-1 : 0);
+ }
+ int xSize() const { return _xSize; }
+ int ySize() const { return _ySize; }
+ private:
+ _Indexer _indexer;
+ int _xSize, _ySize;
+
+ typedef void (*TFun)(int& x, int& y);
+ TFun _xRevFun, _yRevFun, _swapFun;
+
+ static void lazy(int&, int&) {}
+ static void reverse(int& x, int& size) { x = size - x - 1; }
+ static void swap(int& x, int& y) { std::swap(x,y); }
+ };
+ //================================================================================
+ /*!
+ * \brief Structure corresponding to the meshed side of block
+ */
+ struct _BlockSide
+ {
+ vector<const SMDS_MeshNode*> _grid;
+ _Indexer _index;
+ int _nbBlocksExpected;
+ int _nbBlocksFound;
+
+#ifdef _DEBUG_
+#define _grid_access_(args) _grid.at( args )
+#else
+#define _grid_access_(args) _grid[ args ]
+#endif
+ //!< Return node at XY
+ const SMDS_MeshNode* getNode(int x, int y) const { return _grid_access_( _index( x, y )); }
+ //!< Set node at XY
+ void setNode(int x, int y, const SMDS_MeshNode* n) { _grid_access_( _index( x, y )) = n; }
+ //!< Return an edge
+ SMESH_OrientedLink getEdge(EQuadEdge edge) const
+ {
+ bool x1, y1, x2, y2; getEdgeEnds( edge, x1, y1, x2, y2 );
+ return SMESH_OrientedLink( getCornerNode ( x1, y1 ), getCornerNode( x2, y2 ));
+ }
+ //!< Return a corner node
+ const SMDS_MeshNode* getCornerNode(bool isXMax, bool isYMax) const
+ {
+ return getNode( isXMax ? _index._xSize-1 : 0 , isYMax ? _index._ySize-1 : 0 );
+ }
+ const SMDS_MeshElement* getCornerFace(const SMDS_MeshNode* cornerNode) const;
+ //!< True if all blocks this side belongs to have beem found
+ bool isBound() const { return _nbBlocksExpected <= _nbBlocksFound; }
+ //!< Return coordinates of node at XY
+ gp_XYZ getXYZ(int x, int y) const { return SMESH_MeshEditor::TNodeXYZ( getNode( x, y )); }
+ //!< Return gravity center of the four corners and the middle node
+ gp_XYZ getGC() const
+ {
+ gp_XYZ xyz =
+ getXYZ( 0, 0 ) +
+ getXYZ( _index._xSize-1, 0 ) +
+ getXYZ( 0, _index._ySize-1 ) +
+ getXYZ( _index._xSize-1, _index._ySize-1 ) +
+ getXYZ( _index._xSize/2, _index._ySize/2 );
+ return xyz / 5;
+ }
+ //!< Return number of mesh faces
+ int getNbFaces() const { return (_index._xSize-1) * (_index._ySize-1); }
+ };
+ //================================================================================
+ /*!
+ * \brief _BlockSide with changed orientation
+ */
+ struct _OrientedBlockSide
+ {
+ _BlockSide* _side;
+ _OrientedIndexer _index;
+
+ _OrientedBlockSide( _BlockSide* side=0, const int oriFlags=0 ):
+ _side(side), _index(side ? side->_index : _Indexer(), oriFlags ) {}
+ //!< return coordinates by XY
+ gp_XYZ xyz(int x, int y) const
+ {
+ return SMESH_MeshEditor::TNodeXYZ( _side->_grid_access_( _index( x, y )) );
+ }
+ //!< safely return a node by XY
+ const SMDS_MeshNode* node(int x, int y) const
+ {
+ int i = _index( x, y );
+ return ( i < 0 || i >= _side->_grid.size()) ? 0 : _side->_grid[i];
+ }
+ //!< Return an edge
+ SMESH_OrientedLink edge(EQuadEdge edge) const
+ {
+ bool x1, y1, x2, y2; getEdgeEnds( edge, x1, y1, x2, y2 );
+ return SMESH_OrientedLink( cornerNode ( x1, y1 ), cornerNode( x2, y2 ));
+ }
+ //!< Return a corner node
+ const SMDS_MeshNode* cornerNode(bool isXMax, bool isYMax) const
+ {
+ return _side->_grid_access_( _index.corner( isXMax, isYMax ));
+ }
+ //!< return its size in nodes
+ int getHoriSize() const { return _index.xSize(); }
+ int getVertSize() const { return _index.ySize(); }
+ //!< True if _side has been initialized
+ operator bool() const { return _side; }
+ //! Direct access to _side
+ const _BlockSide* operator->() const { return _side; }
+ _BlockSide* operator->() { return _side; }
+ };
+ //================================================================================
+ /*!
+ * \brief Meshed skin of block
+ */
+ struct _Block
+ {
+ _OrientedBlockSide _side[6]; // 6 sides of a sub-block
+
+ const _OrientedBlockSide& getSide(int i) const { return _side[i]; }
+ bool hasSide( const _OrientedBlockSide& s) const
+ {
+ if ( s ) for (int i=0;i<6;++i) if ( _side[i] && _side[i]._side == s._side ) return true;
+ return false;
+ }
+ };
+ //================================================================================
+ /*!
+ * \brief Skin mesh possibly containing several meshed blocks
+ */
+ class _Skin
+ {
+ public:
+
+ int findBlocks(SMESH_Mesh& mesh);
+ //!< return i-th block
+ const _Block& getBlock(int i) const { return _blocks[i]; }
+ //!< return error description
+ const SMESH_Comment& error() const { return _error; }
+
+ private:
+ bool fillSide( _BlockSide& side, const SMDS_MeshElement* cornerQuad);
+ bool fillRowsUntilCorner(const SMDS_MeshElement* quad,
+ const SMDS_MeshNode* n1,
+ const SMDS_MeshNode* n2,
+ vector<const SMDS_MeshNode*>& verRow1,
+ vector<const SMDS_MeshNode*>& verRow2,
+ bool alongN1N2 );
+ _OrientedBlockSide findBlockSide( EBoxSides startBlockSide,
+ EQuadEdge sharedSideEdge1,
+ EQuadEdge sharedSideEdge2);
+ //!< update own data and data of the side bound to block
+ void setSideBoundToBlock( _BlockSide& side )
+ {
+ side._nbBlocksFound++;
+ if ( side.isBound() )
+ {
+ for ( int e = 0; e < int(Q_UNDEFINED); ++e )
+ _edge2sides[ side.getEdge( (EQuadEdge) e ) ].erase( &side );
+ }
+ }
+ //!< store reason of error
+ int error(const SMESH_Comment& reason) { _error = reason; return 0; }
+
+ SMESH_Comment _error;
+
+ list< _BlockSide > _allSides;
+ vector< _Block > _blocks;
+
+ //map< const SMDS_MeshNode*, set< _BlockSide* > > _corner2sides;
+ map< SMESH_OrientedLink, set< _BlockSide* > > _edge2sides;
+ };
+
+ //================================================================================
+ /*!
+ * \brief Find and return number of submeshes corresponding to blocks
+ */
+ //================================================================================
+
+ int _Skin::findBlocks(SMESH_Mesh& mesh)
+ {
+ SMESHDS_Mesh* meshDS = mesh.GetMeshDS();
+
+ // Find a node at any block corner
+
+ SMDS_NodeIteratorPtr nIt = meshDS->nodesIterator(/*idInceasingOrder=*/true);
+ if ( !nIt->more() ) return error("Empty mesh");
+
+ const SMDS_MeshNode* nCorner = 0;
+ while ( nIt->more() )
+ {
+ nCorner = nIt->next();
+ if ( isCornerNode( nCorner ))
+ break;
+ else
+ nCorner = 0;
+ }
+ if ( !nCorner )
+ return BAD_MESH_ERR;
+
+ // --------------------------------------------------------------------
+ // Find all block sides starting from mesh faces sharing the corner node
+ // --------------------------------------------------------------------
+
+ int nbFacesOnSides = 0;
+ TIDSortedElemSet cornerFaces; // corner faces of found _BlockSide's
+ list< const SMDS_MeshNode* > corners( 1, nCorner );
+ list< const SMDS_MeshNode* >::iterator corner = corners.begin();
+ while ( corner != corners.end() )
+ {
+ SMDS_ElemIteratorPtr faceIt = (*corner)->GetInverseElementIterator( SMDSAbs_Face );
+ while ( faceIt->more() )
+ {
+ const SMDS_MeshElement* face = faceIt->next();
+ if ( !cornerFaces.insert( face ).second )
+ continue; // already loaded block side
+
+ if ( !isQuadrangle( face ))
+ return error("Non-quadrangle elements in the input mesh");
+
+ if ( _allSides.empty() || !_allSides.back()._grid.empty() )
+ _allSides.push_back( _BlockSide() );
+
+ _BlockSide& side = _allSides.back();
+ if ( !fillSide( side, face ) )
+ {
+ if ( !_error.empty() )
+ return false;
+ }
+ else
+ {
+ for ( int isXMax = 0; isXMax < 2; ++isXMax )
+ for ( int isYMax = 0; isYMax < 2; ++isYMax )
+ {
+ const SMDS_MeshNode* nCorner = side.getCornerNode(isXMax,isYMax );
+ if ( !isCornerNode( nCorner ))
+ return BAD_MESH_ERR;
+ //_corner2sides[ nCorner ].insert( &side );
+ corners.push_back( nCorner );
+ cornerFaces.insert( side.getCornerFace( nCorner ));
+ }
+ for ( int e = 0; e < int(Q_UNDEFINED); ++e )
+ _edge2sides[ side.getEdge( (EQuadEdge) e ) ].insert( &side );
+
+ nbFacesOnSides += side.getNbFaces();
+ }
+ }
+ ++corner;
+
+ // find block sides of other domains if any
+ if ( corner == corners.end() && nbFacesOnSides < mesh.NbQuadrangles() )
+ {
+ while ( nIt->more() )
+ {
+ nCorner = nIt->next();
+ if ( isCornerNode( nCorner ))
+ corner = corners.insert( corner, nCorner );
+ }
+ nbFacesOnSides = mesh.NbQuadrangles();
+ }
+ }
+
+ if ( _allSides.empty() )
+ return BAD_MESH_ERR;
+ if ( _allSides.back()._grid.empty() )
+ _allSides.pop_back();
+
+ // ---------------------------
+ // Organize sides into blocks
+ // ---------------------------
+
+ // analyse sharing of sides by blocks
+ int nbBlockSides = 0; // nb of block sides taking into account their sharing
+ list < _BlockSide >::iterator sideIt = _allSides.begin();
+ for ( ; sideIt != _allSides.end(); ++sideIt )
+ {
+ _BlockSide& side = *sideIt;
+ bool isSharedSide = true;
+ for ( int e = 0; e < int(Q_UNDEFINED) && isSharedSide; ++e )
+ isSharedSide = _edge2sides[ side.getEdge( (EQuadEdge) e ) ].size() > 2;
+ side._nbBlocksFound = 0;
+ side._nbBlocksExpected = isSharedSide ? 2 : 1;
+ nbBlockSides += side._nbBlocksExpected;
+ }
+
+ // find sides of each block
+ int nbBlocks = 0;
+ while ( nbBlockSides >= 6 )
+ {
+ // get any side not bound to all blocks it belongs to
+ sideIt = _allSides.begin();
+ while ( sideIt != _allSides.end() && sideIt->isBound())
+ ++sideIt;
+
+ // start searching for block sides from the got side
+ bool ok = true;
+ if ( _blocks.empty() || _blocks.back()._side[B_FRONT] )
+ _blocks.resize( _blocks.size() + 1 );
+
+ _Block& block = _blocks.back();
+ block._side[B_FRONT] = &(*sideIt);
+ setSideBoundToBlock( *sideIt );
+ nbBlockSides--;
+
+ // edges of neighbour sides of B_FRONT corresponding to front's edges
+ EQuadEdge edgeOfFront[4] = { Q_BOTTOM, Q_RIGHT, Q_TOP, Q_LEFT };
+ EQuadEdge edgeToFind [4] = { Q_BOTTOM, Q_LEFT, Q_BOTTOM, Q_LEFT };
+ for ( int i = Q_BOTTOM; ok && i <= Q_LEFT; ++i )
+ ok = ( block._side[i] = findBlockSide( B_FRONT, edgeOfFront[i], edgeToFind[i]));
+ if ( ok )
+ ok = ( block._side[B_BACK] = findBlockSide( B_TOP, Q_TOP, Q_TOP ));
+
+ if ( ok )
+ {
+ // check if just found block is same as one of previously found
+ bool isSame = false;
+ for ( int i = 1; i < _blocks.size() && !isSame; ++i )
+ {
+ _Block& prevBlock = _blocks[i-1];
+ isSame = true;
+ for ( int j = 0; j < 6 && isSame; ++j )
+ isSame = prevBlock.hasSide( block._side[ j ]);
+ }
+ ok = !isSame;
+ }
+
+ // count the found sides
+ _DUMP_(endl);
+ for (int i = 0; i < B_UNDEFINED; ++i )
+ {
+ _DUMP_("** Block side "<< SBoxSides[i] <<" "<< block._side[ i ]._side);
+ if ( block._side[ i ] )
+ {
+ if ( ok && i != B_FRONT)
+ {
+ setSideBoundToBlock( *block._side[ i ]._side );
+ nbBlockSides--;
+ }
+ _DUMP_("Corner 0,0 "<< block._side[ i ].cornerNode(0,0));
+ _DUMP_("Corner 1,0 "<< block._side[ i ].cornerNode(1,0));
+ _DUMP_("Corner 1,1 "<< block._side[ i ].cornerNode(1,1));
+ _DUMP_("Corner 0,1 "<< block._side[ i ].cornerNode(0,1));
+ }
+ else
+ {
+ _DUMP_("Not found"<<endl);
+ }
+ }
+ if ( !ok )
+ block._side[0] = block._side[1] = block._side[2] =
+ block._side[3] = block._side[4] = block._side[5] = 0;
+ else
+ nbBlocks++;
+ }
+ if ( nbBlocks == 0 && _error.empty() )
+ return BAD_MESH_ERR;
+
+ return nbBlocks;
+ }
+
+ //================================================================================
+ /*!
+ * \brief Fill block side data starting from its corner quadrangle
+ */
+ //================================================================================
+
+ bool _Skin::fillSide( _BlockSide& side, const SMDS_MeshElement* cornerQuad)
+ {
+ // Find out size of block side mesured in nodes and by the way find two rows
+ // of nodes in two directions.
+
+ int x, y, nbX, nbY;
+ const SMDS_MeshElement* firstQuad = cornerQuad;
+ {
+ // get corner node of cornerQuad
+ const SMDS_MeshNode* nCorner = 0;
+ for ( int i = 0; i < 4 && !nCorner; ++i )
+ if ( isCornerNode( firstQuad->GetNode(i)))
+ nCorner = firstQuad->GetNode(i);
+ if ( !nCorner ) return false;
+
+ // get a node on block edge
+ int iCorner = firstQuad->GetNodeIndex( nCorner );
+ const SMDS_MeshNode* nOnEdge = firstQuad->GetNode( (iCorner+1) % 4);
+
+ // find out size of block side
+ vector<const SMDS_MeshNode*> horRow1, horRow2, verRow1, verRow2;
+ if ( !fillRowsUntilCorner( firstQuad, nCorner, nOnEdge, horRow1, horRow2, true ) ||
+ !fillRowsUntilCorner( firstQuad, nCorner, nOnEdge, verRow1, verRow2, false ))
+ return false;
+ nbX = horRow1.size(), nbY = verRow1.size();
+
+ // store found nodes
+ side._index._xSize = horRow1.size();
+ side._index._ySize = verRow1.size();
+ side._grid.resize( side._index.size(), NULL );
+
+ for ( x = 0; x < horRow1.size(); ++x )
+ {
+ side.setNode( x, 0, horRow1[x] );
+ side.setNode( x, 1, horRow2[x] );
+ }
+ for ( y = 0; y < verRow1.size(); ++y )
+ {
+ side.setNode( 0, y, verRow1[y] );
+ side.setNode( 1, y, verRow2[y] );
+ }
+ }
+ // Find the rest nodes
+
+ y = 1; // y of the row to fill
+ TIDSortedElemSet emptySet, avoidSet;
+ while ( ++y < nbY )
+ {
+ // get next firstQuad in the next row of quadrangles
+ //
+ // n2up
+ // o---o <- y row
+ // | |
+ // o---o o o o o <- found nodes
+ //n1down n2down
+ //
+ int i1down, i2down, i2up;
+ const SMDS_MeshNode* n1down = side.getNode( 0, y-1 );
+ const SMDS_MeshNode* n2down = side.getNode( 1, y-1 );
+ avoidSet.clear(); avoidSet.insert( firstQuad );
+ firstQuad = SMESH_MeshEditor::FindFaceInSet( n1down, n2down, emptySet, avoidSet,
+ &i1down, &i2down);
+ if ( !isQuadrangle( firstQuad ))
+ return BAD_MESH_ERR;
+
+ const SMDS_MeshNode* n2up = oppositeNode( firstQuad, i1down );
+ avoidSet.clear(); avoidSet.insert( firstQuad );
+
+ // find the rest nodes in the y-th row by faces in the row
+
+ x = 1;
+ while ( ++x < nbX )
+ {
+ const SMDS_MeshElement* quad = SMESH_MeshEditor::FindFaceInSet( n2up, n2down, emptySet,
+ avoidSet, &i2up, &i2down);
+ if ( !isQuadrangle( quad ))
+ return BAD_MESH_ERR;
+
+ n2up = oppositeNode( quad, i2down );
+ n2down = oppositeNode( quad, i2up );
+ avoidSet.clear(); avoidSet.insert( quad );
+
+ side.setNode( x, y, n2up );
+ }
+ }
+
+ return true;
+ }
+
+ //================================================================================
+ /*!
+ * \brief Try to find a block side adjacent to the given side by given edge
+ */
+ //================================================================================
+
+ _OrientedBlockSide _Skin::findBlockSide( EBoxSides startBlockSide,
+ EQuadEdge sharedSideEdge1,
+ EQuadEdge sharedSideEdge2)
+ {
+ _Block& block = _blocks.back();
+ _OrientedBlockSide& side1 = block._side[ startBlockSide ];
+
+ // get corner nodes of the given block edge
+ SMESH_OrientedLink edge = side1.edge( sharedSideEdge1 );
+ const SMDS_MeshNode* n1 = edge.node1();
+ const SMDS_MeshNode* n2 = edge.node2();
+ if ( edge._reversed ) swap( n1, n2 );
+
+ // find all sides sharing both nodes n1 and n2
+ set< _BlockSide* > sidesOnEdge = _edge2sides[ edge ]; // copy a set
+
+ // exclude loaded sides of block from sidesOnEdge
+ int nbLoadedSides = 0;
+ for (int i = 0; i < B_UNDEFINED; ++i )
+ {
+ if ( block._side[ i ] )
+ {
+ nbLoadedSides++;
+ sidesOnEdge.erase( block._side[ i ]._side );
+ }
+ }
+ int nbSidesOnEdge = sidesOnEdge.size();
+ _DUMP_("nbSidesOnEdge "<< nbSidesOnEdge << " " << n1->GetID() << "-" << n2->GetID() );
+ if ( nbSidesOnEdge == 0 )
+ return 0;
+
+ _BlockSide* foundSide = 0;
+ if ( nbSidesOnEdge == 1 /*|| nbSidesOnEdge == 2 && nbLoadedSides == 1 */)
+ {
+ foundSide = *sidesOnEdge.begin();
+ }
+ else
+ {
+ // Select one of found sides most close to startBlockSide
+
+ // gravity center of already loaded block sides
+ gp_XYZ gc(0,0,0);
+ for (int i = 0; i < B_UNDEFINED; ++i )
+ if ( block._side[ i ] )
+ gc += block._side[ i ]._side->getGC();
+ gc /= nbLoadedSides;
+
+ gp_XYZ p1 ( n1->X(),n1->Y(),n1->Z()), p2 (n2->X(),n2->Y(),n2->Z());
+ gp_Vec p1p2( p1, p2 );
+
+ const SMDS_MeshElement* face1 = side1->getCornerFace( n1 );
+ gp_XYZ p1Op = SMESH_MeshEditor::TNodeXYZ( oppositeNode( face1, face1->GetNodeIndex(n1)));
+ gp_Vec side1Dir( p1, p1Op );
+ gp_Ax2 pln( p1, p1p2, side1Dir ); // plane with normal p1p2 and X dir side1Dir
+ _DUMP_(" Select adjacent for "<< side1._side << " - side dir ("
+ << side1Dir.X() << ", " << side1Dir.Y() << ", " << side1Dir.Z() << ")" );
+
+ map < double , _BlockSide* > angleOfSide;
+ set< _BlockSide* >::iterator sideIt = sidesOnEdge.begin();
+ for (; sideIt != sidesOnEdge.end(); ++sideIt )
+ {
+ _BlockSide* sideI = *sideIt;
+ const SMDS_MeshElement* faceI = sideI->getCornerFace( n1 );
+ gp_XYZ p1Op = SMESH_MeshEditor::TNodeXYZ( oppositeNode( faceI, faceI->GetNodeIndex(n1)));
+ gp_Vec sideIDir( p1, p1Op );
+ // compute angle of (sideIDir projection to pln) and (X dir of pln)
+ gp_Vec2d sideIDirProj( sideIDir * pln.XDirection(), sideIDir * pln.YDirection());
+ double angle = sideIDirProj.Angle( gp::DX2d() );
+ if ( angle < 0 ) angle += 2 * PI;
+ angleOfSide.insert( make_pair( angle, sideI ));
+ _DUMP_(" "<< sideI << " - side dir ("
+ << sideIDir.X() << ", " << sideIDir.Y() << ", " << sideIDir.Z() << ")"
+ << " angle " << angle);
+ }
+ gp_Vec gcDir( p1, gc );
+ gp_Vec2d gcDirProj( gcDir * pln.XDirection(), gcDir * pln.YDirection());
+ double gcAngle = gcDirProj.Angle( gp::DX2d() );
+ foundSide = gcAngle < 0 ? angleOfSide.rbegin()->second : angleOfSide.begin()->second;
+ _DUMP_(" selected "<< foundSide );
+ }
+
+ // Orient the found side correctly
+
+ // corners of found side corresponding to nodes n1 and n2
+ bool xMax1, yMax1, xMax2, yMax2;
+ if ( !getEdgeEnds( sharedSideEdge2, xMax1, yMax1, xMax2, yMax2 ))
+ return error(SMESH_Comment("Internal error at ")<<__FILE__<<":"<<__LINE__),
+ _OrientedBlockSide(0);
+
+ for ( int ori = 0; ori < _OrientedIndexer::MAX_ORI+1; ++ori )
+ {
+ _OrientedBlockSide orientedSide( foundSide, ori );
+ const SMDS_MeshNode* n12 = orientedSide.cornerNode( xMax1, yMax1);
+ const SMDS_MeshNode* n22 = orientedSide.cornerNode( xMax2, yMax2);
+ if ( n1 == n12 && n2 == n22 )
+ return orientedSide;
+ }
+ error(SMESH_Comment("Failed to orient a block side found by edge ")<<sharedSideEdge1
+ << " of side " << startBlockSide
+ << " of block " << _blocks.size());
+ return 0;
+ }
+
+ //================================================================================
+ /*!
+ * \brief: Fill rows (which are actually columns,if !alongN1N2) of nodes starting
+ * from the given quadrangle until another block corner encounters.
+ * n1 and n2 are at bottom of quad, n1 is at block corner.
+ */
+ //================================================================================
+
+ bool _Skin::fillRowsUntilCorner(const SMDS_MeshElement* quad,
+ const SMDS_MeshNode* n1,
+ const SMDS_MeshNode* n2,
+ vector<const SMDS_MeshNode*>& row1,
+ vector<const SMDS_MeshNode*>& row2,
+ const bool alongN1N2 )
+ {
+ const SMDS_MeshNode* corner1 = n1;
+
+ // Store nodes of quad in the rows and find new n1 and n2 to get
+ // the next face so that new n2 is on block edge
+ int i1 = quad->GetNodeIndex( n1 );
+ int i2 = quad->GetNodeIndex( n2 );
+ row1.clear(); row2.clear();
+ row1.push_back( n1 );
+ if ( alongN1N2 )
+ {
+ row1.push_back( n2 );
+ row2.push_back( oppositeNode( quad, i2 ));
+ row2.push_back( n1 = oppositeNode( quad, i1 ));
+ }
+ else
+ {
+ row2.push_back( n2 );
+ row1.push_back( n2 = oppositeNode( quad, i2 ));
+ row2.push_back( n1 = oppositeNode( quad, i1 ));
+ }
+
+ // Find the rest nodes
+ TIDSortedElemSet emptySet, avoidSet;
+ while ( !isCornerNode( n2 ))
+ {
+ avoidSet.clear(); avoidSet.insert( quad );
+ quad = SMESH_MeshEditor::FindFaceInSet( n1, n2, emptySet, avoidSet, &i1, &i2 );
+ if ( !isQuadrangle( quad ))
+ return BAD_MESH_ERR;
+
+ row1.push_back( n2 = oppositeNode( quad, i1 ));
+ row2.push_back( n1 = oppositeNode( quad, i2 ));
+ }
+ return n1 != corner1;
+ }
+
+ //================================================================================
+ /*!
+ * \brief Return a corner face by a corner node
+ */
+ //================================================================================
+
+ const SMDS_MeshElement* _BlockSide::getCornerFace(const SMDS_MeshNode* cornerNode) const
+ {
+ int x, y, isXMax, isYMax, found = 0;
+ for ( isXMax = 0; isXMax < 2; ++isXMax )
+ {
+ for ( isYMax = 0; isYMax < 2; ++isYMax )
+ {
+ x = isXMax ? _index._xSize-1 : 0;
+ y = isYMax ? _index._ySize-1 : 0;
+ found = ( getNode(x,y) == cornerNode );
+ if ( found ) break;
+ }
+ if ( found ) break;
+ }
+ if ( !found ) return 0;
+ int dx = isXMax ? -1 : +1;
+ int dy = isYMax ? -1 : +1;
+ const SMDS_MeshNode* n1 = getNode(x,y);
+ const SMDS_MeshNode* n2 = getNode(x+dx,y);
+ const SMDS_MeshNode* n3 = getNode(x,y+dy);
+ const SMDS_MeshNode* n4 = getNode(x+dx,y+dy);
+ return SMDS_Mesh::FindFace(n1, n2, n3, n4 );
+ }
+
+}
+
+//=======================================================================
+//function : StdMeshers_HexaFromSkin_3D
+//purpose :
+//=======================================================================
+
+StdMeshers_HexaFromSkin_3D::StdMeshers_HexaFromSkin_3D(int hypId, int studyId, SMESH_Gen* gen)
+ :SMESH_3D_Algo(hypId, studyId, gen)
+{
+ MESSAGE("StdMeshers_HexaFromSkin_3D::StdMeshers_HexaFromSkin_3D");
+ _name = "HexaFromSkin_3D";
+}
+
+StdMeshers_HexaFromSkin_3D::~StdMeshers_HexaFromSkin_3D()
+{
+ MESSAGE("StdMeshers_HexaFromSkin_3D::~StdMeshers_HexaFromSkin_3D");
+}
+
+//================================================================================
+/*!
+ * \brief Main method, which generates hexaheda
+ */
+//================================================================================
+
+bool StdMeshers_HexaFromSkin_3D::Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper)
+{
+ _Skin skin;
+ int nbBlocks = skin.findBlocks(aMesh);
+ if ( nbBlocks == 0 )
+ return error( skin.error());
+
+ vector< vector< const SMDS_MeshNode* > > columns;
+ int x, xSize, y, ySize, z, zSize;
+ _Indexer colIndex;
+
+ for ( int i = 0; i < nbBlocks; ++i )
+ {
+ const _Block& block = skin.getBlock( i );
+
+ // ------------------------------------------
+ // Fill columns of nodes with existing nodes
+ // ------------------------------------------
+
+ xSize = block.getSide(B_BOTTOM).getHoriSize();
+ ySize = block.getSide(B_BOTTOM).getVertSize();
+ zSize = block.getSide(B_FRONT ).getVertSize();
+ int X = xSize - 1, Y = ySize - 1, Z = zSize - 1;
+ colIndex = _Indexer( xSize, ySize );
+ columns.resize( colIndex.size() );
+
+ // fill node columns by front and back box sides
+ for ( x = 0; x < xSize; ++x ) {
+ vector< const SMDS_MeshNode* >& column0 = columns[ colIndex( x, 0 )];
+ vector< const SMDS_MeshNode* >& column1 = columns[ colIndex( x, Y )];
+ column0.resize( zSize );
+ column1.resize( zSize );
+ for ( z = 0; z < zSize; ++z ) {
+ column0[ z ] = block.getSide(B_FRONT).node( x, z );
+ column1[ z ] = block.getSide(B_BACK) .node( x, z );
+ }
+ }
+ // fill node columns by left and right box sides
+ for ( y = 1; y < ySize-1; ++y ) {
+ vector< const SMDS_MeshNode* >& column0 = columns[ colIndex( 0, y )];
+ vector< const SMDS_MeshNode* >& column1 = columns[ colIndex( X, y )];
+ column0.resize( zSize );
+ column1.resize( zSize );
+ for ( z = 0; z < zSize; ++z ) {
+ column0[ z ] = block.getSide(B_LEFT) .node( y, z );
+ column1[ z ] = block.getSide(B_RIGHT).node( y, z );
+ }
+ }
+ // get nodes from top and bottom box sides
+ for ( x = 1; x < xSize-1; ++x ) {
+ for ( y = 1; y < ySize-1; ++y ) {
+ vector< const SMDS_MeshNode* >& column = columns[ colIndex( x, y )];
+ column.resize( zSize );
+ column.front() = block.getSide(B_BOTTOM).node( x, y );
+ column.back() = block.getSide(B_TOP) .node( x, y );
+ }
+ }
+
+ // ----------------------------
+ // Add internal nodes of a box
+ // ----------------------------
+ // projection points of internal nodes on box subshapes by which
+ // coordinates of internal nodes are computed
+ vector<gp_XYZ> pointOnShape( SMESH_Block::ID_Shell );
+
+ // projections on vertices are constant
+ pointOnShape[ SMESH_Block::ID_V000 ] = block.getSide(B_BOTTOM).xyz( 0, 0 );
+ pointOnShape[ SMESH_Block::ID_V100 ] = block.getSide(B_BOTTOM).xyz( X, 0 );
+ pointOnShape[ SMESH_Block::ID_V010 ] = block.getSide(B_BOTTOM).xyz( 0, Y );
+ pointOnShape[ SMESH_Block::ID_V110 ] = block.getSide(B_BOTTOM).xyz( X, Y );
+ pointOnShape[ SMESH_Block::ID_V001 ] = block.getSide(B_TOP).xyz( 0, 0 );
+ pointOnShape[ SMESH_Block::ID_V101 ] = block.getSide(B_TOP).xyz( X, 0 );
+ pointOnShape[ SMESH_Block::ID_V011 ] = block.getSide(B_TOP).xyz( 0, Y );
+ pointOnShape[ SMESH_Block::ID_V111 ] = block.getSide(B_TOP).xyz( X, Y );
+
+ for ( x = 1; x < xSize-1; ++x )
+ {
+ gp_XYZ params; // normalized parameters of internal node within a unit box
+ params.SetCoord( 1, x / double(X) );
+ for ( y = 1; y < ySize-1; ++y )
+ {
+ params.SetCoord( 2, y / double(Y) );
+ // column to fill during z loop
+ vector< const SMDS_MeshNode* >& column = columns[ colIndex( x, y )];
+ // projections on horizontal edges
+ pointOnShape[ SMESH_Block::ID_Ex00 ] = block.getSide(B_BOTTOM).xyz( x, 0 );
+ pointOnShape[ SMESH_Block::ID_Ex10 ] = block.getSide(B_BOTTOM).xyz( x, Y );
+ pointOnShape[ SMESH_Block::ID_E0y0 ] = block.getSide(B_BOTTOM).xyz( 0, y );
+ pointOnShape[ SMESH_Block::ID_E1y0 ] = block.getSide(B_BOTTOM).xyz( X, y );
+ pointOnShape[ SMESH_Block::ID_Ex01 ] = block.getSide(B_TOP).xyz( x, 0 );
+ pointOnShape[ SMESH_Block::ID_Ex11 ] = block.getSide(B_TOP).xyz( x, Y );
+ pointOnShape[ SMESH_Block::ID_E0y1 ] = block.getSide(B_TOP).xyz( 0, y );
+ pointOnShape[ SMESH_Block::ID_E1y1 ] = block.getSide(B_TOP).xyz( X, y );
+ // projections on horizontal sides
+ pointOnShape[ SMESH_Block::ID_Fxy0 ] = block.getSide(B_BOTTOM).xyz( x, y );
+ pointOnShape[ SMESH_Block::ID_Fxy1 ] = block.getSide(B_TOP) .xyz( x, y );
+ for ( z = 1; z < zSize-1; ++z ) // z loop
+ {
+ params.SetCoord( 3, z / double(Z) );
+ // projections on vertical edges
+ pointOnShape[ SMESH_Block::ID_E00z ] = block.getSide(B_FRONT).xyz( 0, z );
+ pointOnShape[ SMESH_Block::ID_E10z ] = block.getSide(B_FRONT).xyz( X, z );
+ pointOnShape[ SMESH_Block::ID_E01z ] = block.getSide(B_BACK).xyz( 0, z );
+ pointOnShape[ SMESH_Block::ID_E11z ] = block.getSide(B_BACK).xyz( X, z );
+ // projections on vertical sides
+ pointOnShape[ SMESH_Block::ID_Fx0z ] = block.getSide(B_FRONT).xyz( x, z );
+ pointOnShape[ SMESH_Block::ID_Fx1z ] = block.getSide(B_BACK) .xyz( x, z );
+ pointOnShape[ SMESH_Block::ID_F0yz ] = block.getSide(B_LEFT) .xyz( y, z );
+ pointOnShape[ SMESH_Block::ID_F1yz ] = block.getSide(B_RIGHT).xyz( y, z );
+
+ // compute internal node coordinates
+ gp_XYZ coords;
+ SMESH_Block::ShellPoint( params, pointOnShape, coords );
+ column[ z ] = aHelper->AddNode( coords.X(), coords.Y(), coords.Z() );
+
+#ifdef DEB_GRID
+ // debug
+ //cout << "----------------------------------------------------------------------"<<endl;
+ //for ( int id = SMESH_Block::ID_V000; id < SMESH_Block::ID_Shell; ++id)
+ //{
+ // gp_XYZ p = pointOnShape[ id ];
+ // SMESH_Block::DumpShapeID( id,cout)<<" ( "<<p.X()<<", "<<p.Y()<<", "<<p.Z()<<" )"<<endl;
+ //}
+ //cout << "Params: ( "<< params.X()<<", "<<params.Y()<<", "<<params.Z()<<" )"<<endl;
+ //cout << "coords: ( "<< coords.X()<<", "<<coords.Y()<<", "<<coords.Z()<<" )"<<endl;
+#endif
+ }
+ }
+ }
+ // ----------------
+ // Add hexahedrons
+ // ----------------
+
+ // find out orientation
+ const SMDS_MeshNode* n000 = block.getSide(B_BOTTOM).cornerNode( 0, 0 );
+ const SMDS_MeshNode* n100 = block.getSide(B_BOTTOM).cornerNode( 1, 0 );
+ const SMDS_MeshNode* n010 = block.getSide(B_BOTTOM).cornerNode( 0, 1 );
+ const SMDS_MeshNode* n110 = block.getSide(B_BOTTOM).cornerNode( 1, 1 );
+ const SMDS_MeshNode* n001 = block.getSide(B_TOP).cornerNode( 0, 0 );
+ const SMDS_MeshNode* n101 = block.getSide(B_TOP).cornerNode( 1, 0 );
+ const SMDS_MeshNode* n011 = block.getSide(B_TOP).cornerNode( 0, 1 );
+ const SMDS_MeshNode* n111 = block.getSide(B_TOP).cornerNode( 1, 1 );
+ SMDS_VolumeOfNodes probeVolume (n000,n010,n110,n100,
+ n001,n011,n111,n101);
+ bool isForw = SMDS_VolumeTool( &probeVolume ).IsForward();
+
+ // add elements
+ for ( x = 0; x < xSize-1; ++x ) {
+ for ( y = 0; y < ySize-1; ++y ) {
+ vector< const SMDS_MeshNode* >& col00 = columns[ colIndex( x, y )];
+ vector< const SMDS_MeshNode* >& col10 = columns[ colIndex( x+1, y )];
+ vector< const SMDS_MeshNode* >& col01 = columns[ colIndex( x, y+1 )];
+ vector< const SMDS_MeshNode* >& col11 = columns[ colIndex( x+1, y+1 )];
+ // bottom face normal of a hexa mush point outside the volume
+ if ( isForw )
+ for ( z = 0; z < zSize-1; ++z )
+ aHelper->AddVolume(col00[z], col01[z], col11[z], col10[z],
+ col00[z+1], col01[z+1], col11[z+1], col10[z+1]);
+ else
+ for ( z = 0; z < zSize-1; ++z )
+ aHelper->AddVolume(col00[z], col10[z], col11[z], col01[z],
+ col00[z+1], col10[z+1], col11[z+1], col01[z+1]);
+ }
+ }
+ } // loop on blocks
+
+ return true;
+}
+
+//================================================================================
+/*!
+ * \brief Evaluate nb of hexa
+ */
+//================================================================================
+
+bool StdMeshers_HexaFromSkin_3D::Evaluate(SMESH_Mesh & aMesh,
+ const TopoDS_Shape & aShape,
+ MapShapeNbElems& aResMap)
+{
+ _Skin skin;
+ int nbBlocks = skin.findBlocks(aMesh);
+ if ( nbBlocks == 0 )
+ return error( skin.error());
+
+ bool secondOrder = aMesh.NbFaces( ORDER_QUADRATIC );
+
+ int entity = secondOrder ? SMDSEntity_Quad_Hexa : SMDSEntity_Hexa;
+ vector<int>& nbByType = aResMap[ aMesh.GetSubMesh( aShape )];
+ if ( entity >= nbByType.size() )
+ nbByType.resize( SMDSEntity_Last, 0 );
+
+ for ( int i = 0; i < nbBlocks; ++i )
+ {
+ const _Block& block = skin.getBlock( i );
+
+ int nbX = block.getSide(B_BOTTOM).getHoriSize();
+ int nbY = block.getSide(B_BOTTOM).getVertSize();
+ int nbZ = block.getSide(B_FRONT ).getVertSize();
+
+ int nbHexa = (nbX-1) * (nbY-1) * (nbZ-1);
+ int nbNodes = (nbX-2) * (nbY-2) * (nbZ-2);
+ if ( secondOrder )
+ nbNodes +=
+ (nbX-2) * (nbY-2) * (nbZ-1) +
+ (nbX-2) * (nbY-1) * (nbZ-2) +
+ (nbX-1) * (nbY-2) * (nbZ-2);
+
+
+ nbByType[ entity ] += nbHexa;
+ nbByType[ SMDSEntity_Node ] += nbNodes;
+ }
+
+ return true;
+}
+
+//================================================================================
+/*!
+ * \brief Abstract method must be defined but does nothing
+ */
+//================================================================================
+
+bool StdMeshers_HexaFromSkin_3D::CheckHypothesis(SMESH_Mesh&, const TopoDS_Shape&,
+ Hypothesis_Status& aStatus)
+{
+ aStatus = SMESH_Hypothesis::HYP_OK;
+ return true;
+}
+
+//================================================================================
+/*!
+ * \brief Abstract method must be defined but just reports an error as this
+ * algo is not intended to work with shapes
+ */
+//================================================================================
+
+bool StdMeshers_HexaFromSkin_3D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
+{
+ return error("Algorithm can't work with geometrical shapes");
+}
+
--- /dev/null
+// 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
+//
+
+// File : StdMeshers_HexaFromSkin_3D.hxx
+// Created : Wed Jan 27 12:23:21 2010
+// Author : Edward AGAPOV (eap)
+//
+#ifndef __StdMeshers_HexaFromSkin_3D_HXX__
+#define __StdMeshers_HexaFromSkin_3D_HXX__
+
+#include "SMESH_StdMeshers.hxx"
+#include "SMESH_3D_Algo.hxx"
+
+/*!
+ * \brief Alorithm generating hexahedral mesh from 2D skin of block
+ */
+
+class STDMESHERS_EXPORT StdMeshers_HexaFromSkin_3D : public SMESH_3D_Algo
+{
+public:
+ StdMeshers_HexaFromSkin_3D(int hypId, int studyId, SMESH_Gen* gen);
+ virtual ~StdMeshers_HexaFromSkin_3D();
+
+ virtual bool Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper);
+
+ virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
+ const TopoDS_Shape& aShape,
+ Hypothesis_Status& aStatus);
+
+ virtual bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape);
+
+ virtual bool Evaluate(SMESH_Mesh & aMesh,
+ const TopoDS_Shape & aShape,
+ MapShapeNbElems& aResMap);
+
+};
+
+#endif
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Hexa_3D.cxx
// Moved here from SMESH_Hexa_3D.cxx
// Module : SMESH
//
#include "StdMeshers_Hexa_3D.hxx"
+
#include "StdMeshers_CompositeHexa_3D.hxx"
#include "StdMeshers_FaceSide.hxx"
+#include "StdMeshers_HexaFromSkin_3D.hxx"
#include "StdMeshers_Penta_3D.hxx"
#include "StdMeshers_Prism_3D.hxx"
#include "StdMeshers_Quadrangle_2D.hxx"
MESSAGE("StdMeshers_Hexa_3D::StdMeshers_Hexa_3D");
_name = "Hexa_3D";
_shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID); // 1 bit /shape type
+ _requireShape = false;
}
//=============================================================================
return true;
}
+//================================================================================
+/*!
+ * \brief Computes hexahedral mesh from 2D mesh of block
+ */
+//================================================================================
+
+bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper)
+{
+ static StdMeshers_HexaFromSkin_3D * algo = 0;
+ if ( !algo ) {
+ SMESH_Gen* gen = aMesh.GetGen();
+ algo = new StdMeshers_HexaFromSkin_3D( gen->GetANewId(), 0, gen );
+ }
+ algo->InitComputeError();
+ algo->Compute( aMesh, aHelper );
+ return error( algo->GetComputeError());
+}
//=============================================================================
/*!
- *
+ *
*/
//=============================================================================
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Hexa_3D.hxx
// Moved here from SMESH_Hexa_3D.hxx
const TopoDS_Shape& aShape,
SMESH_Hypothesis::Hypothesis_Status& aStatus);
- virtual bool Compute(SMESH_Mesh& aMesh,
- const TopoDS_Shape& aShape)
- /*throw (SALOME_Exception)*/;
+ virtual bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape);
+
+ virtual bool Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper);
virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
MapShapeNbElems& aResMap);
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_LayerDistribution.cxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_LayerDistribution.hxx
// Author : Edward AGAPOV
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_LayerDistribution2D.cxx
// Author : Edward AGAPOV
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_LayerDistribution2D.hxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_LengthFromEdges.cxx
// Moved here from SMESH_LengthFromEdges.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_LengthFromEdges.hxx
// Moved here from SMESH_LengthFromEdges.hxx
// Author : Paul RASCLE, EDF
// Module : SMESH
//
-
#ifndef _SMESH_LENGTHFROMEDGES_HXX_
#define _SMESH_LENGTHFROMEDGES_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_LocalLength.cxx
// Moved here from SMESH_LocalLength.cxx
// Author : Paul RASCLE, EDF
// Module : SMESH
//
-
#include "StdMeshers_LocalLength.hxx"
#include "SMESH_Mesh.hxx"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_LocalLength.hxx
// Moved here from SMESH_LocalLength.hxx
// Author : Paul RASCLE, EDF
// Module : SMESH
//
-
#ifndef _SMESH_LOCALLENGTH_HXX_
#define _SMESH_LOCALLENGTH_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_MEFISTO_2D.cxx
// Moved here from SMESH_MEFISTO_2D.cxx
fixOverlappedLinkUV (uvslf[ mB ], uvslf[ m ], uvslf[ mA ]);
}
}
+// cout << "MEFISTO INPUT************" << endl;
+// for ( int i =0; i < m; ++i )
+// cout << i << ": \t" << uvslf[i].x << ", " << uvslf[i].y << " Node " << mefistoToDS[i]->GetID()<< endl;
return true;
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_MEFISTO_2D.hxx
// Moved here from SMESH_MEFISTO_2D.hxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_MaxElementArea.cxx
// Moved here from SMESH_MaxElementArea.cxx
// Author : Paul RASCLE, EDF
// Module : SMESH
//
-
#include "StdMeshers_MaxElementArea.hxx"
#include "SMESH_ControlsDef.hxx"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_MaxElementArea.hxx
// Moved here from SMESH_MaxElementArea.hxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_MaxElementVolume.cxx
// Moved here from SMESH_MaxElementVolume.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_MaxElementVolume.hxx
// Moved here from SMESH_MaxElementVolume.hxx
// Author : Paul RASCLE, EDF
// Module : SMESH
-
+//
#ifndef _SMESH_MAXELEMENTVOLUME_HXX_
#define _SMESH_MAXELEMENTVOLUME_HXX_
-// SMESH SMESH : implementaion of SMESH idl descriptions
+// 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
//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
+// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_MaxLength.cxx
// Module : SMESH
-
+//
#include "StdMeshers_MaxLength.hxx"
#include "SMESH_Mesh.hxx"
-// SMESH SMESH : implementaion of SMESH idl descriptions
+// 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
//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_MaxLength.hxx
// Module : SMESH
-
+//
#ifndef _SMESH_MaxLength_HXX_
#define _SMESH_MaxLength_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers : implementaion of SMESH idl descriptions
// File : StdMeshers_NotConformAllowed.cxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers : implementaion of SMESH idl descriptions
// File : StdMeshers_NotConformAllowed.hxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_NumberOfLayers.cxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_NumberOfLayers.hxx
// Author : Edward AGAPOV
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_NumberOfLayers2D.cxx
// Author : Edward AGAPOV
// Module : SMESH
//
-
#include "StdMeshers_NumberOfLayers2D.hxx"
#include "utilities.h"
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_NumberOfLayers2D.hxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_NumberOfSegments.cxx
// Moved here from SMESH_NumberOfSegments.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_NumberOfSegments.hxx
// Moved here from SMESH_NumberOfSegments.hxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers_Penta_3D implementaion of SMESH idl descriptions
// File : StdMeshers_Penta_3D.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers : implementaion of SMESH idl descriptions
// File : StdMeshers_Penta_3D.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Prism_3D.cxx
// Module : SMESH
return gp_Ax2( O, Z, X);
}
+
+ //================================================================================
+ /*!
+ * \brief Removes submeshes meshed with regular grid from given list
+ * \retval int - nb of removed submeshes
+ */
+ //================================================================================
+
+ int removeQuasiQuads(list< SMESH_subMesh* >& notQuadSubMesh)
+ {
+ int oldNbSM = notQuadSubMesh.size();
+ SMESHDS_Mesh* mesh = notQuadSubMesh.front()->GetFather()->GetMeshDS();
+ list< SMESH_subMesh* >::iterator smIt = notQuadSubMesh.begin();
+#define __NEXT_SM { ++smIt; continue; }
+ while ( smIt != notQuadSubMesh.end() )
+ {
+ SMESH_subMesh* faceSm = *smIt;
+ SMESHDS_SubMesh* faceSmDS = faceSm->GetSubMeshDS();
+ int nbQuads = faceSmDS->NbElements();
+ if ( nbQuads == 0 ) __NEXT_SM;
+
+ // get oredered edges
+ list< TopoDS_Edge > orderedEdges;
+ list< int > nbEdgesInWires;
+ TopoDS_Vertex V000;
+ int nbWires = SMESH_Block::GetOrderedEdges( TopoDS::Face( faceSm->GetSubShape() ),
+ V000, orderedEdges, nbEdgesInWires );
+ if ( nbWires != 1 || nbEdgesInWires.front() <= 4 )
+ __NEXT_SM;
+
+ // get nb of segements on edges
+ list<int> nbSegOnEdge;
+ list< TopoDS_Edge >::iterator edge = orderedEdges.begin();
+ for ( ; edge != orderedEdges.end(); ++edge )
+ {
+ if ( SMESHDS_SubMesh* edgeSmDS = mesh->MeshElements( *edge ))
+ nbSegOnEdge.push_back( edgeSmDS->NbElements() );
+ else
+ nbSegOnEdge.push_back(0);
+ }
+
+ // unite nbSegOnEdge of continues edges
+ int nbEdges = nbEdgesInWires.front();
+ list<int>::iterator nbSegIt = nbSegOnEdge.begin();
+ for ( edge = orderedEdges.begin(); edge != orderedEdges.end(); )
+ {
+ const TopoDS_Edge& e1 = *edge++;
+ const TopoDS_Edge& e2 = ( edge == orderedEdges.end() ? orderedEdges.front() : *edge );
+ if ( SMESH_Algo::IsContinuous( e1, e2 ))
+ {
+ // common vertex of continues edges must be shared by two 2D mesh elems of geom face
+ TopoDS_Vertex vCommon = TopExp::LastVertex( e1, true );
+ const SMDS_MeshNode* vNode = SMESH_Algo::VertexNode( vCommon, mesh );
+ int nbF = 0;
+ if ( vNode )
+ {
+ SMDS_ElemIteratorPtr fIt = vNode->GetInverseElementIterator(SMDSAbs_Face);
+ while ( fIt->more() )
+ nbF += faceSmDS->Contains( fIt->next() );
+ }
+ list<int>::iterator nbSegIt1 = nbSegIt++;
+ if ( !vNode || nbF == 2 ) // !vNode - two edges can be meshed as one
+ {
+ // unite
+ if ( nbSegIt == nbSegOnEdge.end() ) nbSegIt = nbSegOnEdge.begin();
+ *nbSegIt += *nbSegIt1;
+ nbSegOnEdge.erase( nbSegIt1 );
+ --nbEdges;
+ }
+ }
+ else
+ {
+ ++nbSegIt;
+ }
+ }
+ vector<int> nbSegVec( nbSegOnEdge.begin(), nbSegOnEdge.end());
+ if ( nbSegVec.size() == 4 &&
+ nbSegVec[0] == nbSegVec[2] &&
+ nbSegVec[1] == nbSegVec[3] &&
+ nbSegVec[0] * nbSegVec[1] == nbQuads
+ )
+ smIt = notQuadSubMesh.erase( smIt );
+ else
+ __NEXT_SM;
+ }
+
+ return oldNbSM - notQuadSubMesh.size();
+ }
}
//=======================================================================
// Projections on the top and bottom faces are taken from nodes existing
// on these faces; find correspondence between bottom and top nodes
myBotToColumnMap.clear();
- if ( !assocOrProjBottom2Top() ) // it also fill myBotToColumnMap
+ if ( !assocOrProjBottom2Top() ) // it also fills myBotToColumnMap
return false;
const SMDS_MeshNode* topNode = bN_tN->second;
if ( botNode->GetPosition()->GetTypeOfPosition() != SMDS_TOP_FACE )
continue; // wall columns are contained in myBlock
- // compute bottom node params
- TNode bN( botNode );
-// if ( zSize > 2 ) {
-// gp_XYZ paramHint(-1,-1,-1);
-// if ( prevTNode.IsNeighbor( bN ))
-// paramHint = prevTNode.GetParams();
-// if ( !myBlock.ComputeParameters( bN.GetCoords(), bN.ChangeParams(),
-// ID_BOT_FACE, paramHint ))
-// return error(TCom("Can't compute normalized parameters for node ")
-// << botNode->GetID() << " on the face #"<< botSM->GetId() );
-// prevTNode = bN;
-// }
// create node column
+ TNode bN( botNode );
TNode2ColumnMap::iterator bN_col =
myBotToColumnMap.insert( make_pair ( bN, TNodeColumn() )).first;
TNodeColumn & column = bN_col->second;
}
// ----------------------------------------------------------------------
- // Analyse faces mesh and topology: choose the bottom submesh.
+ // Analyse mesh and topology of faces: choose the bottom submesh.
// If there are not quadrangle geom faces, they are top and bottom ones.
// Not quadrangle geom faces must be only on top and bottom.
// ----------------------------------------------------------------------
bool hasNotQuad = ( nbNotQuad || nbNotQuadMeshed );
// detect bad cases
- if ( nbNotQuad > 0 && nbNotQuad != 2 )
- return error(COMPERR_BAD_SHAPE,
- TCom("More than 2 not quadrilateral faces: ")
- <<nbNotQuad);
if ( nbNotQuadMeshed > 2 )
+ {
return error(COMPERR_BAD_INPUT_MESH,
TCom("More than 2 faces with not quadrangle elements: ")
<<nbNotQuadMeshed);
+ }
+ int nbQuasiQuads = 0;
+ if ( nbNotQuad > 0 && nbNotQuad != 2 )
+ {
+ // Issue 0020843 - one of side faces is quasi-quadrilateral.
+ // Remove from notQuadGeomSubMesh faces meshed with regular grid
+ nbQuasiQuads = removeQuasiQuads( notQuadGeomSubMesh );
+ nbNotQuad -= nbQuasiQuads;
+ if ( nbNotQuad > 0 && nbNotQuad != 2 )
+ return error(COMPERR_BAD_SHAPE,
+ TCom("More than 2 not quadrilateral faces: ")
+ <<nbNotQuad);
+ }
// get found submeshes
if ( hasNotQuad )
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Prism_3D.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_ProjectionSource1D.cxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_ProjectionSource1D.hxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_ProjectionSource2D.cxx
// Author : Edward AGAPOV
// Module : SMESH
-
+//
#include "StdMeshers_ProjectionSource2D.hxx"
#include "SMESH_Mesh.hxx"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_ProjectionSource2D.hxx
// Author : Edward AGAPOV
// Module : SMESH
-
+//
#ifndef _SMESH_ProjectionSource2D_HXX_
#define _SMESH_ProjectionSource2D_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_ProjectionSource3D.cxx
// Author : Edward AGAPOV
// Module : SMESH
-
+//
#include "StdMeshers_ProjectionSource3D.hxx"
#include "utilities.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_ProjectionSource3D.hxx
// Author : Edward AGAPOV
// Module : SMESH
-
+//
#ifndef _SMESH_ProjectionSource3D_HXX_
#define _SMESH_ProjectionSource3D_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_ProjectionUtils.cxx
// Created : Fri Oct 27 10:24:28 2006
return false;
}
-//=======================================================================
-//function : IsSubShape
-//purpose :
-//=======================================================================
-
-bool StdMeshers_ProjectionUtils::IsSubShape( const TopoDS_Shape& shape,
- SMESH_Mesh* aMesh )
-{
- if ( shape.IsNull() || !aMesh )
- return false;
- return
- aMesh->GetMeshDS()->ShapeToIndex( shape ) ||
- // PAL16202
- shape.ShapeType() == TopAbs_COMPOUND && aMesh->GetMeshDS()->IsGroupOfSubShapes( shape );
-}
-
-//=======================================================================
-//function : IsSubShape
-//purpose :
-//=======================================================================
-
-bool StdMeshers_ProjectionUtils::IsSubShape( const TopoDS_Shape& shape,
- const TopoDS_Shape& mainShape )
-{
- if ( !shape.IsNull() && !mainShape.IsNull() )
- {
- for ( TopExp_Explorer exp( mainShape, shape.ShapeType());
- exp.More();
- exp.Next() )
- if ( shape.IsSame( exp.Current() ))
- return true;
- }
- SCRUTE((shape.IsNull()));
- SCRUTE((mainShape.IsNull()));
- return false;
-}
-
-
//=======================================================================
/*!
* \brief Finds an edge by its vertices in a main shape of the mesh
if ( !assocMap.IsBound( e2 ))
RETURN_BAD_RESULT("Association not found for edge " << meshDS2->ShapeToIndex( e2 ));
TopoDS_Edge e1 = TopoDS::Edge( assocMap( e2 ));
- if ( !IsSubShape( e1, face1 ))
+ if ( !helper1.IsSubShape( e1, face1 ))
RETURN_BAD_RESULT("Wrong association, edge " << meshDS1->ShapeToIndex( e1 ) <<
" isn't a subshape of face " << meshDS1->ShapeToIndex( face1 ));
// check that there are nodes on edges
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_ProjectionUtils.hxx
// Created : Thu Oct 26 15:37:24 2006
TShapeShapeMap & theAssociationMap,
const bool theBidirectional=true);
- static bool IsSubShape( const TopoDS_Shape& shape, SMESH_Mesh* aMesh );
-
- static bool IsSubShape( const TopoDS_Shape& shape, const TopoDS_Shape& mainShape );
-
/*!
* \brief Finds an edge by its vertices in a main shape of the mesh
*/
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Projection_1D.cxx
// Module : SMESH
if ( _sourceHypo->HasVertexAssociation() )
{
// source and target vertices
- if ( !TAssocTool::IsSubShape( _sourceHypo->GetSourceVertex(), srcMesh ) ||
- !TAssocTool::IsSubShape( _sourceHypo->GetTargetVertex(), tgtMesh ) ||
- !TAssocTool::IsSubShape( _sourceHypo->GetSourceVertex(),
- _sourceHypo->GetSourceEdge() ))
+ if ( !SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceVertex(), srcMesh ) ||
+ !SMESH_MesherHelper::IsSubShape( _sourceHypo->GetTargetVertex(), tgtMesh ) ||
+ !SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceVertex(),
+ _sourceHypo->GetSourceEdge() ))
{
aStatus = HYP_BAD_PARAMETER;
- SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetSourceVertex(), srcMesh )));
- SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetTargetVertex(), tgtMesh )));
- SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetSourceVertex(),
- _sourceHypo->GetSourceEdge() )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceVertex(), srcMesh )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( _sourceHypo->GetTargetVertex(), tgtMesh )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceVertex(),
+ _sourceHypo->GetSourceEdge() )));
}
// PAL16202
- else
+ else
{
- bool isSub = TAssocTool::IsSubShape( _sourceHypo->GetTargetVertex(), aShape );
+ bool isSub = SMESH_MesherHelper::IsSubShape( _sourceHypo->GetTargetVertex(), aShape );
if ( !_sourceHypo->IsCompoundSource() ) {
if ( !isSub ) {
aStatus = HYP_BAD_PARAMETER;
- SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetTargetVertex(), aShape)));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( _sourceHypo->GetTargetVertex(), aShape)));
}
}
else if ( isSub ) {
{
const TopoDS_Shape& ancestor = ancestIt.Value();
if ( ancestor.ShapeType() == TopAbs_EDGE &&
- TAssocTool::IsSubShape( ancestor, _sourceHypo->GetSourceEdge() ))
+ SMESH_MesherHelper::IsSubShape( ancestor, _sourceHypo->GetSourceEdge() ))
{
if ( sharingEdge.IsNull() || ancestor.IsSame( sharingEdge ))
sharingEdge = ancestor;
}
}
// check source edge
- if ( !TAssocTool::IsSubShape( _sourceHypo->GetSourceEdge(), srcMesh ) ||
+ if ( !SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceEdge(), srcMesh ) ||
( srcMesh == tgtMesh && aShape == _sourceHypo->GetSourceEdge() ))
{
aStatus = HYP_BAD_PARAMETER;
- SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetSourceEdge(), srcMesh )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceEdge(), srcMesh )));
SCRUTE((srcMesh == tgtMesh));
SCRUTE(( aShape == _sourceHypo->GetSourceEdge() ));
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Projection_1D.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Projection_2D.cxx
// Module : SMESH
#include <TopExp_Explorer.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopoDS.hxx>
+#include <gp_Ax2.hxx>
+#include <gp_Ax3.hxx>
using namespace std;
TopoDS_Shape edge = TAssocTool::GetEdgeByVertices
( srcMesh, _sourceHypo->GetSourceVertex(1), _sourceHypo->GetSourceVertex(2) );
if ( edge.IsNull() ||
- !TAssocTool::IsSubShape( edge, srcMesh ) ||
- !TAssocTool::IsSubShape( edge, _sourceHypo->GetSourceFace() ))
+ !SMESH_MesherHelper::IsSubShape( edge, srcMesh ) ||
+ !SMESH_MesherHelper::IsSubShape( edge, _sourceHypo->GetSourceFace() ))
{
theStatus = HYP_BAD_PARAMETER;
SCRUTE((edge.IsNull()));
- SCRUTE((TAssocTool::IsSubShape( edge, srcMesh )));
- SCRUTE((TAssocTool::IsSubShape( edge, _sourceHypo->GetSourceFace() )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( edge, srcMesh )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( edge, _sourceHypo->GetSourceFace() )));
}
else
{
// target vertices
edge = TAssocTool::GetEdgeByVertices
( tgtMesh, _sourceHypo->GetTargetVertex(1), _sourceHypo->GetTargetVertex(2) );
- if ( edge.IsNull() || !TAssocTool::IsSubShape( edge, tgtMesh ))
+ if ( edge.IsNull() || !SMESH_MesherHelper::IsSubShape( edge, tgtMesh ))
{
theStatus = HYP_BAD_PARAMETER;
SCRUTE((edge.IsNull()));
- SCRUTE((TAssocTool::IsSubShape( edge, tgtMesh )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( edge, tgtMesh )));
}
// PAL16203
else if ( !_sourceHypo->IsCompoundSource() &&
- !TAssocTool::IsSubShape( edge, theShape ))
+ !SMESH_MesherHelper::IsSubShape( edge, theShape ))
{
theStatus = HYP_BAD_PARAMETER;
- SCRUTE((TAssocTool::IsSubShape( edge, theShape )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( edge, theShape )));
}
}
}
// check a source face
- if ( !TAssocTool::IsSubShape( _sourceHypo->GetSourceFace(), srcMesh ) ||
+ if ( !SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceFace(), srcMesh ) ||
( srcMesh == tgtMesh && theShape == _sourceHypo->GetSourceFace() ))
{
theStatus = HYP_BAD_PARAMETER;
- SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetSourceFace(), srcMesh )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceFace(), srcMesh )));
SCRUTE((srcMesh == tgtMesh));
SCRUTE(( theShape == _sourceHypo->GetSourceFace() ));
}
namespace {
-
//================================================================================
/*!
* \brief define if a node is new or old
- * \param node - node to check
- * \retval bool - true if the node existed before Compute() is called
+ * \param node - node to check
+ * \retval bool - true if the node existed before Compute() is called
*/
//================================================================================
//================================================================================
/*!
- * \brief Preform projection in case if tgtFace.IsPartner( srcFace )
+ * \brief Preform projection in case if tgtFace.IsPartner( srcFace ) and in case
+ * if projection by transformation is possible
* \param tgtFace - target face
* \param srcFace - source face
* \param tgtMesh - target mesh
SMESH_Mesh * srcMesh,
const TAssocTool::TShapeShapeMap& shape2ShapeMap)
{
- if ( !tgtFace.IsPartner( srcFace ))
- return false;
+ const double tol = 1e-6;
+
+ gp_Trsf trsf; // transformation to get location of target nodes from source ones
+ if ( tgtFace.IsPartner( srcFace ))
+ {
+ gp_Trsf srcTrsf = srcFace.Location();
+ gp_Trsf tgtTrsf = tgtFace.Location();
+ trsf = srcTrsf.Inverted() * tgtTrsf;
+ }
+ else
+ {
+ // Try to find the transformation
+
+ // make any local coord systems of src and tgt faces
+ vector<gp_Pnt> srcPP, tgtPP; // 3 points on face boundaries to make axes of CS
+ SMESH_subMesh * srcSM = srcMesh->GetSubMesh( srcFace );
+ SMESH_subMeshIteratorPtr smIt = srcSM->getDependsOnIterator(/*includeSelf=*/false,false);
+ srcSM = smIt->next(); // sm of a vertex
+ while ( smIt->more() && srcPP.size() < 3 )
+ {
+ srcSM = smIt->next();
+ SMESHDS_SubMesh* srcSmds = srcSM->GetSubMeshDS();
+ if ( !srcSmds ) continue;
+ SMDS_NodeIteratorPtr nIt = srcSmds->GetNodes();
+ while ( nIt->more() )
+ {
+ SMESH_MeshEditor::TNodeXYZ p ( nIt->next());
+ bool pOK = false;
+ switch ( srcPP.size() )
+ {
+ case 0: pOK = true; break;
+
+ case 1: pOK = ( srcPP[0].SquareDistance( p ) > tol ); break;
+
+ case 2:
+ {
+ gp_Vec p0p1( srcPP[0], srcPP[1] ), p0p( srcPP[0], p );
+ pOK = !p0p1.IsParallel( p0p, tol );
+ break;
+ }
+ }
+ if ( !pOK )
+ continue;
+
+ // find corresponding point on target shape
+ pOK = false;
+ gp_Pnt tgtP;
+ const TopoDS_Shape& tgtShape = shape2ShapeMap( srcSM->GetSubShape() );
+ if ( tgtShape.ShapeType() == TopAbs_VERTEX )
+ {
+ tgtP = BRep_Tool::Pnt( TopoDS::Vertex( tgtShape ));
+ pOK = true;
+ //cout << "V - nS " << p._node->GetID() << " - nT " << SMESH_Algo::VertexNode(TopoDS::Vertex( tgtShape),tgtMesh->GetMeshDS())->GetID() << endl;
+ }
+ else if ( tgtPP.size() > 0 )
+ {
+ if ( SMESHDS_SubMesh* tgtSmds = tgtMesh->GetMeshDS()->MeshElements( tgtShape ))
+ {
+ double srcDist = srcPP[0].Distance( p );
+ double eTol = BRep_Tool::Tolerance( TopoDS::Edge( tgtShape ));
+ SMDS_NodeIteratorPtr nItT = tgtSmds->GetNodes();
+ while ( nItT->more() && !pOK )
+ {
+ const SMDS_MeshNode* n = nItT->next();
+ tgtP = SMESH_MeshEditor::TNodeXYZ( n );
+ pOK = ( fabs( srcDist - tgtPP[0].Distance( tgtP )) < 2*eTol );
+ //cout << "E - nS " << p._node->GetID() << " - nT " << n->GetID()<< " OK - " << pOK<< " " << fabs( srcDist - tgtPP[0].Distance( tgtP ))<< " tol " << eTol<< endl;
+ }
+ }
+ }
+ if ( !pOK )
+ continue;
+
+ srcPP.push_back( p );
+ tgtPP.push_back( tgtP );
+ }
+ }
+ if ( srcPP.size() != 3 )
+ return false;
+
+ // make transformation
+ gp_Trsf fromTgtCS, toSrcCS; // from/to global CS
+ gp_Ax2 srcCS( srcPP[0], gp_Vec( srcPP[0], srcPP[1] ), gp_Vec( srcPP[0], srcPP[2]));
+ gp_Ax2 tgtCS( tgtPP[0], gp_Vec( tgtPP[0], tgtPP[1] ), gp_Vec( tgtPP[0], tgtPP[2]));
+ toSrcCS .SetTransformation( gp_Ax3( srcCS ));
+ fromTgtCS.SetTransformation( gp_Ax3( tgtCS ));
+ fromTgtCS.Invert();
+
+ trsf = fromTgtCS * toSrcCS;
+ }
// Fill map of src to tgt nodes with nodes on edges
for ( TopExp_Explorer srcEdge( srcFace, TopAbs_EDGE); srcEdge.More(); srcEdge.Next() )
{
const TopoDS_Shape& tgtEdge = shape2ShapeMap( srcEdge.Current() );
- if ( !tgtEdge.IsPartner( srcEdge.Current() ))
- return false;
map< double, const SMDS_MeshNode* > srcNodes, tgtNodes;
if ( !SMESH_Algo::GetSortedNodesOnEdge( srcMesh->GetMeshDS(),
srcNodes.size() != tgtNodes.size())
return false;
+ if ( !tgtEdge.IsPartner( srcEdge.Current() ))
+ {
+ // check that transormation is OK by three nodes
+ gp_Pnt p0S = SMESH_MeshEditor::TNodeXYZ( (srcNodes.begin()) ->second);
+ gp_Pnt p1S = SMESH_MeshEditor::TNodeXYZ( (srcNodes.rbegin()) ->second);
+ gp_Pnt p2S = SMESH_MeshEditor::TNodeXYZ( (++srcNodes.begin())->second);
+
+ gp_Pnt p0T = SMESH_MeshEditor::TNodeXYZ( (tgtNodes.begin()) ->second);
+ gp_Pnt p1T = SMESH_MeshEditor::TNodeXYZ( (tgtNodes.rbegin()) ->second);
+ gp_Pnt p2T = SMESH_MeshEditor::TNodeXYZ( (++tgtNodes.begin())->second);
+
+ // transform source points, they must coinside with target ones
+ if ( p0T.SquareDistance( p0S.Transformed( trsf )) > tol ||
+ p1T.SquareDistance( p1S.Transformed( trsf )) > tol ||
+ p2T.SquareDistance( p2S.Transformed( trsf )) > tol )
+ {
+ //cout << "KO trsf, 3 dist: "
+ //<< p0T.SquareDistance( p0S.Transformed( trsf ))<< ", "
+ //<< p1T.SquareDistance( p1S.Transformed( trsf ))<< ", "
+ //<< p2T.SquareDistance( p2S.Transformed( trsf ))<< ", "<<endl;
+ return false;
+ }
+ }
+
map< double, const SMDS_MeshNode* >::iterator u_tn = tgtNodes.begin();
map< double, const SMDS_MeshNode* >::iterator u_sn = srcNodes.begin();
for ( ; u_tn != tgtNodes.end(); ++u_tn, ++u_sn)
// Make new faces
- // transformation to get location of target nodes from source ones
- gp_Trsf srcTrsf = srcFace.Location();
- gp_Trsf tgtTrsf = tgtFace.Location();
- gp_Trsf trsf = srcTrsf.Inverted() * tgtTrsf;
-
// prepare the helper adding quadratic elements if necessary
SMESH_MesherHelper helper( *tgtMesh );
helper.IsQuadraticSubMesh( tgtFace );
RETURN_BAD_RESULT("Not associated vertices, srcV1 " << srcV1.TShape().operator->() );
TopoDS_Vertex tgtV1 = TopoDS::Vertex( shape2ShapeMap( srcV1 ));
- if ( !TAssocTool::IsSubShape( srcV1, srcFace ))
+ if ( !SMESH_MesherHelper::IsSubShape( srcV1, srcFace ))
RETURN_BAD_RESULT("Wrong srcV1 " << srcV1.TShape().operator->());
- if ( !TAssocTool::IsSubShape( tgtV1, tgtFace ))
+ if ( !SMESH_MesherHelper::IsSubShape( tgtV1, tgtFace ))
RETURN_BAD_RESULT("Wrong tgtV1 " << tgtV1.TShape().operator->());
// try to find out orientation by order of edges
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Projection_2D.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Projection_3D.cxx
// Module : SMESH
TopoDS_Shape edge = TAssocTool::GetEdgeByVertices
( srcMesh, _sourceHypo->GetSourceVertex(1), _sourceHypo->GetSourceVertex(2) );
if ( edge.IsNull() ||
- !TAssocTool::IsSubShape( edge, srcMesh ) ||
- !TAssocTool::IsSubShape( edge, _sourceHypo->GetSource3DShape() ))
+ !SMESH_MesherHelper::IsSubShape( edge, srcMesh ) ||
+ !SMESH_MesherHelper::IsSubShape( edge, _sourceHypo->GetSource3DShape() ))
{
SCRUTE((edge.IsNull()));
- SCRUTE((TAssocTool::IsSubShape( edge, srcMesh )));
- SCRUTE((TAssocTool::IsSubShape( edge, _sourceHypo->GetSource3DShape() )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( edge, srcMesh )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( edge, _sourceHypo->GetSource3DShape() )));
aStatus = SMESH_Hypothesis::HYP_BAD_PARAMETER;
}
else
edge = TAssocTool::GetEdgeByVertices
( tgtMesh, _sourceHypo->GetTargetVertex(1), _sourceHypo->GetTargetVertex(2) );
if ( edge.IsNull() ||
- !TAssocTool::IsSubShape( edge, tgtMesh ) ||
- !TAssocTool::IsSubShape( edge, aShape ))
+ !SMESH_MesherHelper::IsSubShape( edge, tgtMesh ) ||
+ !SMESH_MesherHelper::IsSubShape( edge, aShape ))
{
SCRUTE((edge.IsNull()));
- SCRUTE((TAssocTool::IsSubShape( edge, tgtMesh )));
- SCRUTE((TAssocTool::IsSubShape( edge, aShape )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( edge, tgtMesh )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( edge, aShape )));
aStatus = SMESH_Hypothesis::HYP_BAD_PARAMETER;
}
}
}
// check a source shape
- if ( !TAssocTool::IsSubShape( _sourceHypo->GetSource3DShape(), srcMesh ) ||
+ if ( !SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSource3DShape(), srcMesh ) ||
( srcMesh == tgtMesh && aShape == _sourceHypo->GetSource3DShape()))
{
- SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetSource3DShape(), srcMesh)));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSource3DShape(), srcMesh)));
SCRUTE((srcMesh == tgtMesh));
SCRUTE((aShape == _sourceHypo->GetSource3DShape()));
aStatus = SMESH_Hypothesis::HYP_BAD_PARAMETER;
return error("Association of subshapes failed" );
srcV000 = TopoDS::Vertex( shape2ShapeMap( tgtV000 ));
srcV100 = TopoDS::Vertex( shape2ShapeMap( tgtV100 ));
- if ( !TAssocTool::IsSubShape( srcV000, srcShell ) ||
- !TAssocTool::IsSubShape( srcV100, srcShell ))
+ if ( !SMESH_MesherHelper::IsSubShape( srcV000, srcShell ) ||
+ !SMESH_MesherHelper::IsSubShape( srcV100, srcShell ))
return error("Incorrect association of subshapes" );
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Projection_3D.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Propagation.cxx
// Module : SMESH
-
+//
#include "StdMeshers_Propagation.hxx"
#include "utilities.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Propagation.hxx
// Module : SMESH
-
+//
#ifndef _SMESH_PROPAGATION_HXX_
#define _SMESH_PROPAGATION_HXX_
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_QuadToTriaAdaptor.cxx
// Module : SMESH
#include <gp_Lin.hxx>
#include <gp_Pln.hxx>
+#include <numeric>
+
using namespace std;
enum EQuadNature { NOT_QUAD, QUAD, DEGEN_QUAD };
+ // sdt-like iterator used to get coordinates of nodes of mesh element
+typedef SMDS_StdIterator< SMESH_MeshEditor::TNodeXYZ, SMDS_ElemIteratorPtr > TXyzIterator;
+
//================================================================================
/*!
* \brief Destructor
if( a < (b+c)/2 )
return PC;
else {
- // find shift along V in order to a became equal to (b+c)/2
+ // find shift along V in order a to became equal to (b+c)/2
double shift = sqrt( a*a + (b*b-c*c)*(b*b-c*c)/16/a/a - (b*b+c*c)/2 );
gp_Dir aDir(V);
gp_Pnt Pbest = PC.XYZ() + aDir.XYZ() * shift;
if ( volumes[0] )
{
// get volume gc
- gp_XYZ volGC(0,0,0);
SMDS_ElemIteratorPtr nodeIt = volumes[0]->nodesIterator();
- while ( nodeIt->more() )
- volGC += SMESH_MeshEditor::TNodeXYZ( nodeIt->next() );
- volGC /= volumes[0]->NbNodes();
+ gp_XYZ volGC(0,0,0);
+ volGC = accumulate( TXyzIterator(nodeIt), TXyzIterator(), volGC ) / volumes[0]->NbNodes();
if ( VNorm * gp_Vec( PC, volGC ) < 0 )
swap( volumes[0], volumes[1] );
triaList.push_back( new SMDS_FaceOfNodes( NewNode, FNodes[i], FNodes[i+1] ));
// create pyramid
+ if ( isRev ) swap( FNodes[1], FNodes[3]);
SMDS_MeshVolume* aPyram =
helper.AddVolume( FNodes[0], FNodes[1], FNodes[2], FNodes[3], NewNode );
myPyram2Trias.insert(make_pair(aPyram, & triaList));
const SMDS_MeshElement* F = *itF;
if(F==face) continue;
Handle(TColgp_HSequenceOfPnt) aContour = new TColgp_HSequenceOfPnt;
- for ( i = 0; i < 4; ++i )
+ int nbN = F->NbNodes() / ( F->IsQuadratic() ? 2 : 1 );
+ for ( i = 0; i < nbN; ++i )
aContour->Append( SMESH_MeshEditor::TNodeXYZ( F->GetNode(i) ));
gp_Pnt intP;
for ( int isRev = 0; isRev < 2; ++isRev )
if(myPyram2Trias.empty())
return true;
- // sdt-like iterator used to get coordinates of nodes of mesh element
- typedef SMDS_StdIterator< SMESH_MeshEditor::TNodeXYZ, SMDS_ElemIteratorPtr > TXyzIterator;
- TXyzIterator xyzEnd;
-
int k = 0;
// for each pyramid store list of merged pyramids with their faces
TPyram2Merged::iterator pMergesI = MergesInfo.find( PrmI );
TXyzIterator xyzIt( PrmI->nodesIterator() );
- vector<gp_Pnt> PsI( xyzIt, xyzEnd );
+ vector<gp_Pnt> PsI( xyzIt, TXyzIterator() );
// compare PrmI with all the rest pyramids
bool NeedMove = false;
continue; // already merged
xyzIt = TXyzIterator( PrmJ->nodesIterator() );
- vector<gp_Pnt> PsJ( xyzIt, xyzEnd );
+ vector<gp_Pnt> PsJ( xyzIt, TXyzIterator() );
bool hasInt = false;
gp_Pnt Pint;
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_QuadToTriaAdaptor.hxx
// Module : SMESH
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_QuadrangleParams.cxx
// Author : Sergey KUUL, OCC
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_QuadrangleParams.hxx
// Author : Sergey KUUL, OCC
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers_QuadranglePreference : implementaion of SMESH idl descriptions
// File : StdMeshers_QuadranglePreference.cxx
// Module : SMESH
-
+//
#include "StdMeshers_QuadranglePreference.hxx"
#include "utilities.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers : implementaion of SMESH idl descriptions
// File : StdMeshers_QuadranglePreference.hxx
// Module : SMESH
-
+//
#ifndef _StdMeshers_QuadranglePreference_HXX_
#define _StdMeshers_QuadranglePreference_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Quadrangle_2D.cxx
// Moved here from SMESH_Quadrangle_2D.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Quadrangle_2D.hxx
// Moved here from SMESH_Quadrangle_2D.hxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers_QuadraticMesh : implementaion of SMESH idl descriptions
// File : StdMeshers_QuadraticMesh.cxx
// Module : SMESH
-
+//
#include "StdMeshers_QuadraticMesh.hxx"
#include "utilities.h"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers : implementaion of SMESH idl descriptions
// File : StdMeshers_QuadraticMesh.hxx
// Module : SMESH
-
+//
#ifndef _StdMeshers_QuadraticMesh_HXX_
#define _StdMeshers_QuadraticMesh_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_RadialPrism_3D.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_RadialPrism_3D.hxx
// Module : SMESH
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_RadialQuadrangle_1D2D.cxx
// Module : SMESH
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_RadialQuadrangle_1D2D.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Regular_1D.cxx
// Moved here from SMESH_Regular_1D.cxx
// Author : Paul RASCLE, EDF
// Module : SMESH
-
+//
#include "StdMeshers_Regular_1D.hxx"
#include "StdMeshers_Distribution.hxx"
return false;
prevU = U;
}
+ if ( theReverse )
+ theParams.reverse();
return true;
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_Regular_1D.hxx
// Moved here from SMESH_Regular_1D.hxx
// Author : Paul RASCLE, EDF
// Module : SMESH
-
+//
#ifndef _SMESH_REGULAR_1D_HXX_
#define _SMESH_REGULAR_1D_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_SegmentAroundVertex_0D.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_SegmentAroundVertex_0D.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_SegmentLengthAroundVertex.cxx
// Module : SMESH
-
+//
#include "StdMeshers_SegmentLengthAroundVertex.hxx"
#include "SMESH_Mesh.hxx"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_SegmentLengthAroundVertex.hxx
// Author : Paul RASCLE, EDF
// Module : SMESH
-
+//
#ifndef _SMESH_SegmentLengthAroundVertex_HXX_
#define _SMESH_SegmentLengthAroundVertex_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers_StartEndLength : implementaion of SMESH idl descriptions
// File : StdMeshers_StartEndLength.cxx
// Module : SMESH
-
+//
#include "StdMeshers_StartEndLength.hxx"
#include "SMESH_Algo.hxx"
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers : implementaion of SMESH idl descriptions
// File : StdMeshers_StartEndLength.hxx
// Module : SMESH
-
+//
#ifndef _STDMESHERS_STARTENDLENGTH_HXX_
#define _STDMESHERS_STARTENDLENGTH_HXX_
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers_TrianglePreference
// File : StdMeshers_TrianglePreference.cxx
// Module : SMESH
-
+//
#include "StdMeshers_TrianglePreference.hxx"
#include "utilities.h"
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers : implementaion of SMESH idl descriptions
// File : StdMeshers_TrianglePreference.hxx
// Module : SMESH
-
+//
#ifndef _StdMeshers_TrianglePreference_HXX_
#define _StdMeshers_TrianglePreference_HXX_
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_UseExisting_1D2D.cxx
// Module : SMESH
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_UseExisting_1D2D.hxx
// Module : SMESH
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH StdMeshersGUI : GUI for StdMeshers plugin
# File : Makefile.in
# Author : Julia DOROVSKIKH
../SMESHGUI/libSMESH.la \
../OBJECT/libSMESHObject.la \
$(GUI_LDFLAGS) -lSalomeApp \
- $(CAS_LDPATH) -lTKernel -lTKBO -lTKAdvTools
+ $(CAS_LDPATH) -lTKernel -lTKBO -lTKAdvTools \
+ $(QWT_LIBS)
# resources files
nodist_salomeres_DATA= \
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_StdMeshersGUI.hxx
// Author : Alexander BORODIN, Open CASCADE S.A.S.
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI.cxx
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
// SMESH includes
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_DistrPreview.cxx
// Author : Open CASCADE S.A.S.
// SMESH includes
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_DistrPreview.h
// Author : Open CASCADE S.A.S.
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_DistrTable.cxx
// Author : Open CASCADE S.A.S.
// SMESH includes
//
#include "StdMeshersGUI_DistrTable.h"
+#include <SMESHGUI_SpinBox.h>
+
// Qt incldues
#include <QItemDelegate>
#include <QTableWidget>
-#include <QDoubleSpinBox>
#include <QPushButton>
#include <QVBoxLayout>
#include <QHBoxLayout>
struct EditorData
{
int r, c;
- QDoubleSpinBox* sb;
+ SMESHGUI_SpinBox* sb;
EditorData() { reset(); }
void reset() { r = -1; c = -1; sb = 0; }
};
void addRow();
void deleteRow();
- void setEditor( int, int, QDoubleSpinBox* );
+ void setEditor( int, int, SMESHGUI_SpinBox* );
protected:
void closeEditor( QWidget*, QAbstractItemDelegate::EndEditHint );
const QStyleOptionViewItem& /*option*/,
const QModelIndex& index ) const
{
- QDoubleSpinBox* sb = new QDoubleSpinBox( parent );
- sb->setFrame(false);
- sb->setMinimum( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
+ SMESHGUI_SpinBox* sb = new SMESHGUI_SpinBox( parent );
+
+ sb->setAcceptNames(false); // No Notebook variables allowed
+ double aMin = index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
myTable->argMinimum( index.row() ) :
- myTable->funcMinimum( index.row() ) );
- sb->setMaximum( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
+ myTable->funcMinimum( index.row() );
+ double aMax = index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
myTable->argMaximum( index.row() ) :
- myTable->funcMaximum( index.row() ) );
- sb->setSingleStep( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
+ myTable->funcMaximum( index.row() );
+ double aStep = index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ?
myTable->argStep( index.row() ) :
- myTable->funcStep( index.row() ) );
- myTable->setEditor( index.row(), index.column(), sb );
+ myTable->funcStep( index.row() );
+ sb->RangeStepAndValidator( aMin, aMax, aStep, "parametric_precision" );
+ sb->setFrame(false);
+
+ myTable->setEditor( index.row(), index.column(), sb );
return sb;
}
setEditorData( QWidget* editor, const QModelIndex& index ) const
{
QString value = index.model()->data(index, Qt::DisplayRole).toString();
- QDoubleSpinBox* sb = static_cast<QDoubleSpinBox*>(editor);
+ SMESHGUI_SpinBox* sb = static_cast<SMESHGUI_SpinBox*>(editor);
bool bOk = false;
double v = value.toDouble( &bOk );
setModelData( QWidget* editor, QAbstractItemModel* model,
const QModelIndex& index ) const
{
- QDoubleSpinBox* sb = static_cast<QDoubleSpinBox*>(editor);
+ SMESHGUI_SpinBox* sb = static_cast<SMESHGUI_SpinBox*>(editor);
model->setData( index, QString::number( sb->value() ), Qt::DisplayRole );
}
void
StdMeshersGUI_DistrTableFrame::Table::
-setEditor( int r, int c, QDoubleSpinBox* sb )
+setEditor( int r, int c, SMESHGUI_SpinBox* sb )
{
myEditorData.r = r;
myEditorData.c = c;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_DistrTable.h
// Author : Open CASCADE S.A.S.
//
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_FixedPointsParamWdg.cxx
// Author : Open CASCADE S.A.S.
// SMESH includes
//
#include "StdMeshersGUI_FixedPointsParamWdg.h"
-#include <QtxIntSpinBox.h>
-#include <QtxDoubleSpinBox.h>
+#include <SMESHGUI_SpinBox.h>
+
+#include <SalomeApp_IntSpinBox.h>
// Qt includes
#include <QPushButton>
{
QWidget* w = 0;
if ( (index.column() == 1 ) ) {
- QtxIntSpinBox* sb = new QtxIntSpinBox( parent );
+ SalomeApp_IntSpinBox* sb = new SalomeApp_IntSpinBox( parent );
+ sb->setAcceptNames( false ); // No Notebook variables allowed
sb->setFrame( false );
sb->setRange( 1, 999);
w = sb;
QAbstractItemModel* model,
const QModelIndex& index ) const
{
- model->setData( index, qobject_cast<QtxIntSpinBox*>( editor )->value(), Qt::EditRole );
- model->setData( index, qobject_cast<QtxIntSpinBox*>( editor )->value(), Qt::UserRole );
+ model->setData( index, qobject_cast<SalomeApp_IntSpinBox*>( editor )->value(), Qt::EditRole );
+ model->setData( index, qobject_cast<SalomeApp_IntSpinBox*>( editor )->value(), Qt::UserRole );
}
//================================================================================
myListWidget = new QListWidget( this );
myTreeWidget = new QTreeWidget( this );
- mySpinBox = new QtxDoubleSpinBox( this );
+ mySpinBox = new SMESHGUI_SpinBox( this );
myAddButton = new QPushButton( tr( "SMESH_BUT_ADD" ), this );
myRemoveButton = new QPushButton( tr( "SMESH_BUT_REMOVE" ), this );
mySameValues = new QCheckBox( tr("SMESH_SAME_NB_SEGMENTS"), this);
myListWidget->setMinimumWidth( 80 );
myTreeWidget->setMinimumWidth( 200 );
- mySpinBox->setRange( 0, 1 );
- mySpinBox->setSingleStep( 0.1 );
- mySpinBox->setDecimals( 4 );
- mySpinBox->setPrecision( 4 );
+ mySpinBox->setAcceptNames( false ); // No Notebook variables allowed
+ mySpinBox->RangeStepAndValidator( 0., 1., .1, "parametric_precision" );
myListWidget->setMinimumWidth( 70 );
connect( myAddButton, SIGNAL( clicked() ), SLOT( onAdd() ) );
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_FixedPointsParamWdg.h
// Author : Open CASCADE S.A.S. (dmv)
//
#include <QStringList>
class SMESHGUI;
-class QtxDoubleSpinBox;
+class SMESHGUI_SpinBox;
class QPushButton;
class QLineEdit;
class QCheckBox;
private:
QListWidget* myListWidget;
QTreeWidget* myTreeWidget;
- QtxDoubleSpinBox* mySpinBox;
+ SMESHGUI_SpinBox* mySpinBox;
QPushButton* myAddButton;
QPushButton* myRemoveButton;
QCheckBox* mySameValues;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_LayerDistributionParamWdg.cxx
// Author : Open CASCADE S.A.S.
// SMESH includes
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_LayerDistributionParamWdg.h
// Author : Open CASCADE S.A.S.
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_NbSegmentsCreator.cxx
// Author : Open CASCADE S.A.S.
// SMESH includes
// 3) scale
myGroupLayout->addWidget( myLScale = new QLabel( tr( "SMESH_NB_SEGMENTS_SCALE_PARAM" ), GroupC1 ), row, 0 );
myScale = new SMESHGUI_SpinBox( GroupC1 );
- myScale->RangeStepAndValidator( 1E-5, 1E+5, 0.1, 6 );
+ myScale->RangeStepAndValidator( 1E-5, 1E+5, 0.1, "parametric_precision" );
myGroupLayout->addWidget( myScale, row, 1 );
row++;
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_NbSegmentsCreator.h
// Author : Open CASCADE S.A.S.
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_ObjectReferenceParamWdg.cxx
// Author : Open CASCADE S.A.S.
// SMESH includes
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_ObjectReferenceParamWdg.h
// Author : Open CASCADE S.A.S.
//
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_StdHypothesisCreator.cxx
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
// SMESH includes
anEntry = h->GetObjectEntry();
aDirectionWidget->SetGeomShapeEntry( anEntry );
aDirectionWidget->SetMainShapeEntry( aMainEntry );
- SMESH::long_array_var aVec = new SMESH::long_array;
- int vertID = h->GetTriaVertex();
- if(vertID>0) {
- aVec->length(1);
- aVec[0] = vertID;
- aDirectionWidget->SetListOfIDs( aVec );
+ if ( !isCreation() ) {
+ SMESH::long_array_var aVec = new SMESH::long_array;
+ int vertID = h->GetTriaVertex();
+ if(vertID>0) {
+ aVec->length(1);
+ aVec[0] = vertID;
+ aDirectionWidget->SetListOfIDs( aVec );
+ }
}
aDirectionWidget->showPreview( true );
customWidgets()->append ( aDirectionWidget );
if( hypType()=="LocalLength" && sb )
{
if (sb->objectName() == tr("SMESH_LOCAL_LENGTH_PARAM"))
- sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+ sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
else if (sb->objectName() == tr("SMESH_LOCAL_LENGTH_PRECISION"))
- sb->RangeStepAndValidator( 0.0, 1.0, 0.05, 7 );
+ sb->RangeStepAndValidator( 0.0, 1.0, 0.05, "len_tol_precision" );
}
else if( hypType()=="Arithmetic1D" && sb )
{
- sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+ sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "parametric_precision" );
}
else if( hypType()=="MaxLength" && sb )
{
- sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+ sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
sb->setEnabled( !widget< QCheckBox >( 1 )->isChecked() );
}
else if( hypType()=="MaxElementArea" && sb )
{
- sb->RangeStepAndValidator( VALUE_SMALL_2, VALUE_MAX_2, 1.0, 6 );
+ sb->RangeStepAndValidator( VALUE_SMALL_2, VALUE_MAX_2, 1.0, "area_precision" );
}
else if( hypType()=="MaxElementVolume" && sb )
{
- sb->RangeStepAndValidator( VALUE_SMALL_3, VALUE_MAX_3, 1.0, 6 );
+ sb->RangeStepAndValidator( VALUE_SMALL_3, VALUE_MAX_3, 1.0, "vol_precision" );
}
else if( hypType()=="StartEndLength" && sb )
{
- sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+ sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
}
else if( hypType()=="Deflection1D" && sb )
{
- sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+ sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "parametric_precision" );
}
else if ( sb ) // default validator for possible ancestors
{
- sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+ sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
}
}
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_StdHypothesisCreator.h
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
//
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_SubShapeSelectorWdg.cxx
// Author : Open CASCADE S.A.S. (dmv)
// SMESH includes
//
-
#include "StdMeshersGUI_SubShapeSelectorWdg.h"
// SMESH Includes
::StdMeshersGUI_SubShapeSelectorWdg( QWidget * parent ):
QWidget( parent ),
myPreviewActor( 0 ),
- myMaxSize( 0 )
+ myMaxSize( -1 )
{
QPixmap image0( SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap( "SMESH", tr( "ICON_SELECT" ) ) );
myListOfIDs.clear();
mySelectedIDs.clear();
+ myAddButton->setEnabled( false );
+ myRemoveButton->setEnabled( false );
+
mySMESHGUI = SMESHGUI::GetSMESHGUI();
mySelectionMgr = SMESH::GetSelectionMgr( mySMESHGUI );
mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
mySelectionMgr->selectedObjects( aList );
int nbSel = aList.Extent();
- if (nbSel < 1)
- return;
-
- SALOME_ListIteratorOfListIO anIt (aList);
+ if (nbSel > 0) {
+ SALOME_ListIteratorOfListIO anIt (aList);
- for ( ; anIt.More(); anIt.Next()) { // Loop on selected objects
- Handle(SALOME_InteractiveObject) IO = anIt.Value();
-
- GEOM::GEOM_Object_var aGeomObj = GetGeomObjectByEntry( IO->getEntry() );
- if ( !CORBA::is_nil( aGeomObj ) ) { // Selected Object From Study
- GEOM::GEOM_Object_ptr aGeomFatherObj = aGeomObj->GetMainShape();
- QString aFatherEntry = "";
- QString aMainFatherEntry = "";
- TopoDS_Shape shape;
- if ( !CORBA::is_nil( aGeomFatherObj ) ) {
- // Get Main Shape
- GEOM::GEOM_Object_var aGeomMain = GetGeomObjectByEntry( myEntry );
- if ( !CORBA::is_nil( aGeomMain ) && aGeomMain->GetType() == 37 ) { // Main Shape is a Group
- GEOM::GEOM_Object_ptr aMainFatherObj = aGeomMain->GetMainShape();
- if ( !CORBA::is_nil( aMainFatherObj ) )
- aMainFatherEntry = aMainFatherObj->GetStudyEntry();
- }
- aFatherEntry = aGeomFatherObj->GetStudyEntry();
- }
+ for ( ; anIt.More(); anIt.Next()) { // Loop on selected objects
+ Handle(SALOME_InteractiveObject) IO = anIt.Value();
- if ( aFatherEntry != "" && ( aFatherEntry == myEntry || aFatherEntry == aMainFatherEntry ) ) {
- if ( aGeomObj->GetType() == 37 /*GEOM_GROUP*/ ) { // Selected Group that belongs the main object
- GEOMBase::GetShape(aGeomObj, shape);
- if ( !shape.IsNull() ) {
- TopExp_Explorer exp( shape, mySubShType );
- for ( ; exp.More(); exp.Next() ) {
- int index = myPreviewActor->GetIndexByShape( exp.Current() );
+ GEOM::GEOM_Object_var aGeomObj = GetGeomObjectByEntry( IO->getEntry() );
+ if ( !CORBA::is_nil( aGeomObj ) ) { // Selected Object From Study
+ GEOM::GEOM_Object_ptr aGeomFatherObj = aGeomObj->GetMainShape();
+ QString aFatherEntry = "";
+ QString aMainFatherEntry = "";
+ TopoDS_Shape shape;
+ if ( !CORBA::is_nil( aGeomFatherObj ) ) {
+ // Get Main Shape
+ GEOM::GEOM_Object_var aGeomMain = GetGeomObjectByEntry( myEntry );
+ if ( !CORBA::is_nil( aGeomMain ) && aGeomMain->GetType() == 37 ) { // Main Shape is a Group
+ GEOM::GEOM_Object_ptr aMainFatherObj = aGeomMain->GetMainShape();
+ if ( !CORBA::is_nil( aMainFatherObj ) )
+ aMainFatherEntry = aMainFatherObj->GetStudyEntry();
+ }
+ aFatherEntry = aGeomFatherObj->GetStudyEntry();
+ }
+
+ if ( aFatherEntry != "" && ( aFatherEntry == myEntry || aFatherEntry == aMainFatherEntry ) ) {
+ if ( aGeomObj->GetType() == 37 /*GEOM_GROUP*/ ) { // Selected Group that belongs the main object
+ GEOMBase::GetShape(aGeomObj, shape);
+ if ( !shape.IsNull() ) {
+ TopExp_Explorer exp( shape, mySubShType );
+ for ( ; exp.More(); exp.Next() ) {
+ int index = myPreviewActor->GetIndexByShape( exp.Current() );
+ if ( index ) {
+ mySelectedIDs.append( index );
+ myPreviewActor->HighlightID( index );
+ }
+ }
+ }
+ } else if ( aGeomObj->GetType() == 28 /*GEOM_SUBSHAPE*/ ) {
+ GEOMBase::GetShape(aGeomObj, shape);
+ if ( !shape.IsNull() && shape.ShapeType() == mySubShType ) {
+ int index = myPreviewActor->GetIndexByShape( shape );
if ( index ) {
mySelectedIDs.append( index );
myPreviewActor->HighlightID( index );
}
}
}
- } else if ( aGeomObj->GetType() == 28 /*GEOM_SUBSHAPE*/ ) {
- GEOMBase::GetShape(aGeomObj, shape);
- if ( !shape.IsNull() && shape.ShapeType() == mySubShType ) {
- int index = myPreviewActor->GetIndexByShape( shape );
- if ( index ) {
- mySelectedIDs.append( index );
- myPreviewActor->HighlightID( index );
- }
- }
}
+ } else { // Selected Actor from Actor Collection
+ QString anEntry = IO->getEntry();
+ QString str = "_";
+ int index = anEntry.lastIndexOf( str );
+ anEntry.remove(0, index+1);
+ int ind = anEntry.toInt();
+ if ( ind )
+ mySelectedIDs.append( ind );
}
- } else { // Selected Actor from Actor Collection
- QString anEntry = IO->getEntry();
- QString str = "_";
- int index = anEntry.lastIndexOf( str );
- anEntry.remove(0, index+1);
- int ind = anEntry.toInt();
- if ( ind )
- mySelectedIDs.append( ind );
+ }
+ }
+ // update add button
+ myAddButton->setEnabled( myListWidget->count() < myMaxSize && mySelectedIDs.size() > 0 && ( mySelectedIDs.size() <= myMaxSize || myMaxSize == -1 ) );
+
+ //Connect Selected Ids in viewer and dialog's Ids list
+ myListWidget->clearSelection();
+ if ( mySelectedIDs.size() > 0 ) {
+ for (int i = 0; i < mySelectedIDs.size(); i++) {
+ QString anID = QString(" %1").arg( mySelectedIDs.at(i) );
+ QList<QListWidgetItem*> anItems = myListWidget->findItems ( anID, Qt::MatchExactly );
+ QListWidgetItem* item;
+ foreach(item, anItems)
+ item->setSelected(true);
}
}
}
return;
myListWidget->blockSignals( true );
- for (int i = 0; i < mySelectedIDs.size() && (myMaxSize < 1 || myListOfIDs.size() < myMaxSize); i++) {
+ for (int i = 0; i < mySelectedIDs.size() && (myMaxSize == -1 || myListOfIDs.size() < myMaxSize); i++) {
if ( myListOfIDs.indexOf( mySelectedIDs.at(i) ) == -1 ) {
QString anID = QString(" %1").arg( mySelectedIDs.at(i) );
}
onListSelectionChanged();
myListWidget->blockSignals( false );
- myAddButton->setEnabled( myListOfIDs.size() < myMaxSize );
+ myAddButton->setEnabled( myMaxSize == -1 || myListOfIDs.size() < myMaxSize );
}
//=================================================================================
QListWidgetItem* anItem;
foreach(anItem, selItems)
myPreviewActor->HighlightID( anItem->text().toInt() );
+
+ // update remove button
+ myRemoveButton->setEnabled( selItems.size() > 0 );
}
//=================================================================================
state = true;
myListWidget->setEnabled( state );
- myAddButton->setEnabled( state );
- myRemoveButton->setEnabled( state );
+ myAddButton->setEnabled( mySelectedIDs.size() > 0 );
if (state) {
myPreviewActor = new SMESH_PreviewActorsCollection();
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshersGUI_SubShapeSelectorWdg.h
// Author : Open CASCADE S.A.S. (dmv)
//
<!DOCTYPE TS>
<!--
- 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
<!DOCTYPE TS>
<!--
- 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
-# Copyright (C) 2007-2008 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
+# 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
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SMESH StdMeshers_I : idl implementation based on 'StdMeshersPlugin' unit's classes
# File : Makefile.in
# Author : Julia DOROVSKIKH
# Modified by : Alexander BORODIN (OCN) - autotools usage
# Module : SMESH
-
+#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
# header files
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SMESH_StdMeshers_I.hxx
// Author : Alexander BORODIN
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Arithmetic1D_i.cxx
// Author : Damien COQUERET, OCC
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Arithmetic1D_i.hxx
// Author : Damien COQUERET, OCC
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_AutomaticLength_i.cxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_AutomaticLength_i.hxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_CompositeSegment_1D_i.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_CompositeSegment_1D_i.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Deflection1D_i.cxx
// Moved here from SMESH_LocalLength_i.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Deflection1D_i.hxx
// Moved here from SMESH_LocalLength_i.hxx
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_FixedPoints1D_i.cxx
// Author : Damien COQUERET, OCC
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_FixedPoints1D_i.hxx
// Author : Damien COQUERET, OCC
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Hexa_3D_i.cxx
// Moved here from SMESH_Hexa_3D_i.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Hexa_3D_i.hxx
// Moved here from SMESH_Hexa_3D_i.hxx
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_LayerDistribution2D_i.cxx
// Author : Edward AGAPOV
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_LayerDistribution2D_i.hxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_LayerDistribution_i.cxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_LayerDistribution_i.hxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_LengthFromEdges_i.cxx
// Moved here from SMESH_LengthFromEdges_i.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_LengthFromEdges_i.hxx
// Moved here from SMESH_LengthFromEdges_i.hxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_LocalLength_i.cxx
// Moved here from SMESH_LocalLength_i.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_LocalLength_i.hxx
// Moved here from SMESH_LocalLength_i.hxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_MEFISTO_2D_i.cxx
// Moved here from SMESH_MEFISTO_2D_i.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_MEFISTO_2D_i.hxx
// Moved here from SMESH_MEFISTO_2D_i.hxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_MaxElementArea_i.cxx
// Moved here from SMESH_MaxElementArea_i.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_MaxElementArea_i.hxx
// Moved here from SMESH_MaxElementArea_i.hxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_MaxElementVolume_i.cxx
// Moved here from SMESH_MaxElementVolume_i.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_MaxElementVolume_i.hxx
// Moved here from SMESH_MaxElementVolume_i.hxx
-// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
+// 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
//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
+// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_MaxLength_i.cxx
// Module : SMESH
-
+//
#include "StdMeshers_MaxLength_i.hxx"
#include "SMESH_Gen_i.hxx"
#include "SMESH_Gen.hxx"
-// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
+// 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
//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
+// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_MaxLength_i.hxx
// Module : SMESH
-
+//
#ifndef _SMESH_MaxLength_I_HXX_
#define _SMESH_MaxLength_I_HXX_
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers_I : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_NotConformAllowed_i.cxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers_I : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_NotConformAllowed_i.hxx
// Author : Paul RASCLE, EDF
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_NumberOfLayers2D_i.cxx
// Author : Edward AGAPOV
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_NumberOfLayers2D_i.hxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_NumberOfLayers_i.cxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_NumberOfLayers_i.hxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_NumberOfSegments_i.cxx
// Moved here from SMESH_NumberOfSegments_i.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_NumberOfSegments_i.hxx
// Moved here from SMESH_NumberOfSegments_i.hxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_ObjRefUlils.cxx
// Created : Wed Oct 18 15:38:22 2006
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : StdMeshers_ObjRefUlils.hxx
// Created : Wed Oct 18 15:15:27 2006
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Prism_3D_i.cxx
// Moved here from SMESH_Prism_3D_i.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Prism_3D_i.hxx
// Moved here from SMESH_Prism_3D_i.hxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_ProjectionSource1D_i.cxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_ProjectionSource1D_i.hxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_ProjectionSource2D_i.cxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_ProjectionSource2D_i.hxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
// File : StdMeshers_ProjectionSource3D_i.cxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_ProjectionSource3D_i.hxx
// Author : Edward AGAPOV
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Projection_3D_i.cxx
// Moved here from SMESH_Projection_3D_i.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Hexa_3D_i.hxx
// Moved here from SMESH_Hexa_3D_i.hxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Propagation_i.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Propagation_i.hxx
// Module : SMESH
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_QuadrangleParams_i.cxx
// Author : Sergey KUUL, OCC
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_QuadrangleParams_i.hxx
// Author : Sergey KUUL, OCC
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_QuadranglePreference_i.cxx
// Moved here from SMESH_LocalLength_i.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_QuadranglePreference_i.hxx
// Moved here from SMESH_LocalLength_i.hxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Quadrangle_2D_i.cxx
// Moved here from SMESH_Quadrangle_2D_i.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Quadrangle_2D_i.hxx
// Moved here from SMESH_Quadrangle_2D_i.hxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_QuadraticMesh_i.cxx
// Moved here from SMESH_LocalLength_i.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_QuadraticMesh_i.hxx
// Moved here from SMESH_LocalLength_i.hxx
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_RadialQuadrangle_1D2D_i.cxx
// Author : Paul RASCLE, EDF
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_RadialQuadrangle_1D2D_i.hxx
// Author : Paul RASCLE, EDF
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Regular_1D_i.cxx
// Moved here from SMESH_Regular_1D_i.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Regular_1D_i.hxx
// Moved here from SMESH_Regular_1D_i.hxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Projection_3D_i.cxx
// Moved here from SMESH_Projection_3D_i.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_SegmentAroundVertex_0D.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_SegmentLengthAroundVertex_i.cxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_SegmentLengthAroundVertex_i.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_StartEndLength_i.cxx
// Moved here from SMESH_LocalLength_i.cxx
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_StartEndLength_i.hxx
// Moved here from SMESH_LocalLength_i.hxx
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshers_TrianglePreference_i.cxx
// Author :
// Module : SMESH
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : StdMeshers_TrianglePreference_i.hxx
// Author :
// Module : SMESH
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_Projection_3D_i.cxx
// Moved here from SMESH_Projection_3D_i.cxx
-// Copyright (C) 2007-2008 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
+// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : StdMeshers_UseExisting_1D2D.hxx
// Module : SMESH
-// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH StdMeshers : implementaion of SMESH idl descriptions
// File : StdMeshers_i.cxx
// Author : Julia DOROVSKIKH
// Module : SMESH
-
+//
#include "SMESH_StdMeshers_I.hxx"
#include "SMESH_Gen_i.hxx"