-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
SET(${PROJECT_NAME_UC}_PATCH_VERSION 1)
SET(${PROJECT_NAME_UC}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
-SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
+SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
# Find KERNEL
# ===========
LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files")
INCLUDE(SalomeMacros)
FIND_PACKAGE(SalomeKERNEL REQUIRED)
+ KERNEL_WITH_CORBA() # check whether KERNEL builded with CORBA
ELSE(EXISTS ${KERNEL_ROOT_DIR})
MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR")
ENDIF(EXISTS ${KERNEL_ROOT_DIR})
-IF(SALOME_LIGHT_ONLY)
- MESSAGE(FATAL_ERROR "NETGENPLUGIN module can't be built in Light mode (without CORBA)")
-ENDIF()
-
# Platform setup
# ==============
INCLUDE(SalomeSetupPlatform) # From KERNEL
IF(EXISTS ${GUI_ROOT_DIR})
LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
FIND_PACKAGE(SalomeGUI)
+ FULL_GUI(TRUE) # check whether GUI builded in full mode and with CORBA
ELSE(EXISTS ${GUI_ROOT_DIR})
MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR")
ENDIF(EXISTS ${GUI_ROOT_DIR})
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#
###############################################################
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&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) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# This library is 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, or (at your option) any later version.
#
-# 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
-###############################################################
### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
@PACKAGE_INIT@
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#
#########################################################################
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-#
IF(NOT SalomeNETGENPLUGIN_FIND_QUIETLY)
MESSAGE(STATUS "Looking for Salome NETGENPLUGIN ...")
-# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014 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 This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014 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 This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
meshing 2D objects).
\image html netgen2d3d.png
-<center><em>Dialog boxes of <b>Netgen 1D-2D</b> and <b>Netgen
-1D-2D-3D</b> algorithms </em></center>
+<center><em>Hypothesis dialog boxes of <b>Netgen 1D-2D</b> and <b>Netgen
+1D-2D-3D</b> algorithms are same</em></center>
<br>
\image html netgen2d3d_only.png
- <b>Min Size</b> - minimum linear dimensions for mesh cells. It is
ignored if it is more than <b>Max Size</b>.
- <b>Second Order</b> - if this box is checked in, the algorithm will
-create second order nodes on the mesh, which will then become quadratic.
-- <b>Fineness</b> - ranging from Very Coarse to Very Fine allows to set the
-level of meshing detalization using the three parameters below. You
-can select Custom to define them manually.
+create second order mesh.
+- <b>Fineness</b> - ranging from <em>Very Coarse</em> to <em>Very Fine</em>
+allows to set the level of meshing detalization using the three
+parameters below. You can select \a Custom to define them manually.
- <b>Growth rate</b> - allows to define how much the linear dimensions of
two adjacent cells can differ (i.e. 0.3 means 30%).
-- <b>Nb. Segs per Edge</b> and <b>Nb Segs per Radius</b> - allows to define the
-minimum number of mesh segments in which edges and radiuses will be
-split.
-- <b>Allow Quadrangles</b> - allows to use quadrangle elements in a
-triangle 2D mesh. This checkbox is not present in Netgen 3D parameters
-because currently building a tetrahedral mesh with quadrangle faces is
-not possible.
-- <b>Optimize</b> - if this box is checked in, the algorithm will try to
-create regular (possessing even sides) elements.
+- <b>Nb. Segs per Edge</b> - allows to define the minimum number of
+mesh segments in which edges will be split. This parameter is used
+only if <b>Limit Size by Surface Curvature</b> is checked.
+- <b>Nb Segs per Radius</b> - allows to define the size of
+mesh segments and mesh faces in which curved edges and surfaces will
+be split. This parameter is used only if <b>Limit Size by Surface
+Curvature</b> is checked.
+- <b>Limit Size by Surface Curvature</b> - if this box is checked in,
+then size of mesh segments and mesh faces on curved edges and surfaces
+is defined using value of <b>Nb Segs per Radius</b> parameter, and
+number of segments on straight edges is defined by values of
+<b>Nb. Segs per Edge</b> parameter. If this box is not checked in,
+then size of elements is defined by three parameters only:
+<b>Max Size</b>, <b>Min Size</b> and <b>Growth rate</b>.
+- <b>Allow Quadrangles</b> - if this box is checked in, the mesher
+tries to generate quadrangle 2D mesh. Triangle elements are created
+where quadrangles are not possible.
+- <b>Optimize</b> - if this box is checked in, the algorithm will modify
+initially created mesh in order to improve quality of elements. Optimization
+process is rather time consuming comparing to creation of initial mesh.
+- <b>Fuse Coincident Nodes on Edges and Vertices</b> - allows merging
+mesh nodes on vertices and edges which are geometrically coincident
+but are topologically different.
\image html netgen3d_local_size.png
\b 2D group allows defining the size of 2D elements
- <b>Length from edges</b> if checked in, hypothesis forces building of
-2D mesh segments having a length calculated as an average edge length
+2D mesh elements having a length calculated as an average edge length
for a given wire, else
- <b>Max. Element Area</b> specifies expected maximum element area for
each 2d element.
-- <b>Allow Quadrangles</b> - allows to use quadrangle elements in a
-triangle 2D mesh. This checkbox is not present in Netgen 3D simple parameters
-because currently building a tetrahedral mesh with quadrangle faces is
-not possible.
+- <b>Allow Quadrangles</b> - allows to generate quadrangle elements
+wherever possible.
\b 3D groups allows defining the size of 3D elements.
- <b>Length from faces</b> if checked in, the area of sides of
(size at the given point), so local sizes of adjacent edges influence
each other.
- NETGEN additionally restricts the element size according to edge curvature.
-- The local size of edges influences the size of close triangles.
+- The local size of segments influences the size of close triangles.
- The order of elements and their size in the 1D mesh generated by
NETGEN differ from those in the 1D mesh generated by Regular_1D
algorithm, resulting in different 2D and 3D meshes.
-\note In the case where two points are geometrically confounded, a single node is generated.
-
*/
-
-
<ul>
$navpath
<li class="footer">
- Copyright © 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE<br>
+ Copyright © 2007-2014 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>
</li>
</ul>
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
void SetQuadAllowed(in boolean value);
boolean GetQuadAllowed();
+
+ void SetUseSurfaceCurvature(in boolean value);
+ boolean GetUseSurfaceCurvature();
+
+ void SetFuseEdges(in boolean value);
+ boolean GetFuseEdges();
void SetLocalSizeOnShape(in GEOM::GEOM_Object GeomObj, in double localSize);
void SetLocalSizeOnEntry(in string entry, in double localSize);
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
<?xml version='1.0' encoding='us-ascii'?>
<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
<!--
- Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+ Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2.1 of the License.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
opt-hypos="ViscousLayers"
need-geom="false"
input="TRIA,QUAD"
+ output="TETRA,PYRAMID"
dim="3">
<python-wrap>
<algo>NETGEN_3D=Tetrahedron()</algo>
label-id="Netgen 1D-2D-3D"
icon-id="mesh_algo_netgen_2d3d.png"
hypos="NETGEN_Parameters, NETGEN_SimpleParameters_3D"
+ output="TETRA,PYRAMID"
dim="3"
support-submeshes="true">
<python-wrap>
<!--
- Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+ Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2.1 of the License.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
TARGET_LINK_LIBRARIES(NETGENPluginGUI ${_link_LIBRARIES} )
INSTALL(TARGETS NETGENPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(FILES ${NETGENPluginGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+
QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_NETGENPLUGIN_INSTALL_RES_DATA}")
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
{
myGeomSelectionTools = NULL;
myLocalSizeMap.clear();
- myIs2D = ( theHypType.startsWith("NETGEN_Parameters_2D"));
+ myIs2D = ( theHypType.startsWith("NETGEN_Parameters_2D"));
myIsONLY = ( theHypType == "NETGEN_Parameters_2D_ONLY" ||
theHypType == "NETGEN_Parameters_3D");
}
if ( !myIsONLY )
{
mySecondOrder = new QCheckBox( tr( "NETGEN_SECOND_ORDER" ), GroupC1 );
- aGroupLayout->addWidget( mySecondOrder, row, 0 );
+ aGroupLayout->addWidget( mySecondOrder, row, 0, 1, 2 );
row++;
}
tr( "NETGEN_FINE" ) << tr( "NETGEN_VERYFINE" ) << tr( "NETGEN_CUSTOM" );
myFineness->addItems( types );
aGroupLayout->addWidget( myFineness, row, 1 );
+ connect( myFineness, SIGNAL( activated( int ) ), this, SLOT( onFinenessChanged() ) );
row++;
aGroupLayout->addWidget( new QLabel( tr( "NETGEN_GROWTH_RATE" ), GroupC1 ), row, 0 );
aGroupLayout->addWidget( myNbSegPerRadius, row, 1 );
row++;
}
+
+ mySurfaceCurvature = 0;
+ if ( myIs2D || !myIsONLY )
+ {
+ mySurfaceCurvature = new QCheckBox( tr( "NETGEN_SURFACE_CURVATURE" ), GroupC1 );
+ aGroupLayout->addWidget( mySurfaceCurvature, row, 0, 1, 2 );
+ connect( mySurfaceCurvature, SIGNAL( stateChanged( int ) ), this, SLOT( onSurfaceCurvatureChanged() ) );
+ row++;
+ }
+
myAllowQuadrangles = 0;
- if ( myIs2D || !myIsONLY ) // issue 0021676
+ if ( myIs2D || !myIsONLY ) // disable only for NETGEN 3D
{
myAllowQuadrangles = new QCheckBox( tr( "NETGEN_ALLOW_QUADRANGLES" ), GroupC1 );
- aGroupLayout->addWidget( myAllowQuadrangles, row, 0 );
+ aGroupLayout->addWidget( myAllowQuadrangles, row, 0, 1, 2 );
row++;
}
myOptimize = new QCheckBox( tr( "NETGEN_OPTIMIZE" ), GroupC1 );
- aGroupLayout->addWidget( myOptimize, row, 0 );
+ aGroupLayout->addWidget( myOptimize, row, 0, 1, 2 );
row++;
- connect( myFineness, SIGNAL( activated( int ) ), this, SLOT( onFinenessChanged() ) );
+ myFuseEdges = 0;
+ if (!myIsONLY)
+ {
+ myFuseEdges = new QCheckBox( tr( "NETGEN_FUSE_EDGES" ), GroupC1 );
+ aGroupLayout->addWidget( myFuseEdges, row, 0, 1, 2 );
+ row++;
+ }
myLocalSizeTable = 0;
if ( !myIsONLY )
if (myAllowQuadrangles)
myAllowQuadrangles->setChecked( data.myAllowQuadrangles );
+ if (mySurfaceCurvature)
+ mySurfaceCurvature->setChecked( data.mySurfaceCurvature );
+
+ if (myFuseEdges)
+ myFuseEdges->setChecked( data.myFuseEdges );
+
// update widgets
bool isCustom = (myFineness->currentIndex() == UserDefined);
- myGrowthRate->setEnabled(isCustom);
+ bool isSurfaceCurvature = (mySurfaceCurvature ? mySurfaceCurvature->checkState() == Qt::Checked : true);
+ myFineness->setEnabled(isSurfaceCurvature);
+ myGrowthRate->setEnabled(isCustom && isSurfaceCurvature);
if ( myNbSegPerEdge )
- myNbSegPerEdge->setEnabled(isCustom);
+ myNbSegPerEdge->setEnabled(isCustom && isSurfaceCurvature);
if ( myNbSegPerRadius )
- myNbSegPerRadius->setEnabled(isCustom);
+ myNbSegPerRadius->setEnabled(isCustom && isSurfaceCurvature);
if ( myLocalSizeTable )
{
if ( myIs2D && data.myAllowQuadrangles )
valStr += "; " + tr("NETGEN_ALLOW_QUADRANGLES");
+ if ( data.mySurfaceCurvature )
+ valStr += "; " + tr("NETGEN_SURFACE_CURVATURE");
+
+ if ( data.myFuseEdges )
+ valStr += "; " + tr("NETGEN_FUSE_EDGES");
+
return valStr;
}
h_data.myNbSegPerRadiusVar = getVariableName("SetNbSegPerRadius");
h_data.myMinSize = h->GetMinSize();
h_data.myMinSizeVar = getVariableName("SetMinSize");
+ h_data.mySurfaceCurvature = h->GetUseSurfaceCurvature();
+ h_data.myFuseEdges = h->GetFuseEdges();
//if ( myIs2D )
{
if( isCreation() )
SMESH::SetName( SMESH::FindSObject( h ), h_data.myName.toLatin1().data() );
h->SetVarParameter( h_data.myMaxSizeVar.toLatin1().constData(), "SetMaxSize");
- h->SetMaxSize( h_data.myMaxSize );
- h->SetSecondOrder( h_data.mySecondOrder );
- h->SetOptimize( h_data.myOptimize );
+ h->SetMaxSize ( h_data.myMaxSize );
+ h->SetSecondOrder ( h_data.mySecondOrder );
+ h->SetOptimize ( h_data.myOptimize );
int fineness = h_data.myFineness;
- h->SetFineness( fineness );
+ h->SetFineness ( fineness );
if( fineness==UserDefined )
{
- h->SetVarParameter( h_data.myGrowthRateVar.toLatin1().constData(), "SetGrowthRate");
- h->SetGrowthRate( h_data.myGrowthRate );
- h->SetVarParameter( h_data.myNbSegPerEdgeVar.toLatin1().constData(), "SetNbSegPerEdge");
- h->SetNbSegPerEdge( h_data.myNbSegPerEdge );
- h->SetVarParameter( h_data.myNbSegPerRadiusVar.toLatin1().constData(), "SetNbSegPerRadius");
+ h->SetVarParameter ( h_data.myGrowthRateVar.toLatin1().constData(), "SetGrowthRate");
+ h->SetGrowthRate ( h_data.myGrowthRate );
+ h->SetVarParameter ( h_data.myNbSegPerEdgeVar.toLatin1().constData(), "SetNbSegPerEdge");
+ h->SetNbSegPerEdge ( h_data.myNbSegPerEdge );
+ h->SetVarParameter ( h_data.myNbSegPerRadiusVar.toLatin1().constData(), "SetNbSegPerRadius");
h->SetNbSegPerRadius( h_data.myNbSegPerRadius );
}
- h->SetVarParameter( h_data.myMinSizeVar.toLatin1().constData(), "SetMinSize");
- h->SetMinSize( h_data.myMinSize );
+ h->SetVarParameter ( h_data.myMinSizeVar.toLatin1().constData(), "SetMinSize");
+ h->SetMinSize ( h_data.myMinSize );
+ h->SetUseSurfaceCurvature( h_data.mySurfaceCurvature );
+ h->SetFuseEdges ( h_data.myFuseEdges );
//if ( myIs2D )
{
if ( myAllowQuadrangles )
h_data.myAllowQuadrangles = myAllowQuadrangles->isChecked();
+ if ( mySurfaceCurvature )
+ h_data.mySurfaceCurvature = mySurfaceCurvature->isChecked();
+
+ if ( myFuseEdges )
+ h_data.myFuseEdges = myFuseEdges->isChecked();
+
if ( myLocalSizeTable )
{
NETGENPluginGUI_HypothesisCreator* that = (NETGENPluginGUI_HypothesisCreator*)this;
return true;
}
+void NETGENPluginGUI_HypothesisCreator::onSurfaceCurvatureChanged()
+{
+ bool isSurfaceCurvature = (mySurfaceCurvature ? mySurfaceCurvature->isChecked() : true);
+ bool isCustom = (myFineness->currentIndex() == UserDefined);
+ myGrowthRate->setEnabled(isCustom);
+ if ( myNbSegPerEdge )
+ myNbSegPerEdge->setEnabled(isCustom && isSurfaceCurvature);
+ if ( myNbSegPerRadius )
+ myNbSegPerRadius->setEnabled(isCustom && isSurfaceCurvature);
+}
+
void NETGENPluginGUI_HypothesisCreator::onFinenessChanged()
{
bool isCustom = (myFineness->currentIndex() == UserDefined);
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
{
double myMaxSize, myMinSize, myGrowthRate, myNbSegPerEdge, myNbSegPerRadius;
int myFineness;
- bool mySecondOrder, myAllowQuadrangles, myOptimize;
+ bool mySecondOrder, myAllowQuadrangles, myOptimize, mySurfaceCurvature, myFuseEdges;
QString myName;
QString myMaxSizeVar, myMinSizeVar, myGrowthRateVar, myNbSegPerEdgeVar, myNbSegPerRadiusVar;
} NetgenHypothesisData;
protected slots:
virtual void onFinenessChanged();
+ virtual void onSurfaceCurvatureChanged();
virtual void onAddLocalSizeOnVertex();
virtual void onAddLocalSizeOnEdge();
virtual void onAddLocalSizeOnFace();
SMESHGUI_SpinBox* myNbSegPerEdge;
SMESHGUI_SpinBox* myNbSegPerRadius;
QCheckBox* myAllowQuadrangles;
+ QCheckBox* mySurfaceCurvature;
+ QCheckBox* myFuseEdges;
bool myIs2D;
bool myIsONLY;
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
<source>NETGEN_FINENESS</source>
<translation>Fineness</translation>
</message>
+ <message>
+ <source>NETGEN_FUSE_EDGES</source>
+ <translation>Fuse Coincident Nodes on Edges and Vertices</translation>
+ </message>
<message>
<source>NETGEN_GROWTH_RATE</source>
<translation>Growth Rate</translation>
<source>NETGEN_SEG_PER_RADIUS</source>
<translation>Nb. Segs per Radius</translation>
</message>
+ <message>
+ <source>NETGEN_SURFACE_CURVATURE</source>
+ <translation>Limit Size by Surface Curvature</translation>
+ </message>
<message>
<source>NETGEN_VERYCOARSE</source>
<translation>Very Coarse</translation>
<source>NETGEN_FINENESS</source>
<translation>Finesse</translation>
</message>
+ <message>
+ <source>NETGEN_FUSE_EDGES</source>
+ <translation type="unfinished">Fuse Coincident Nodes on Edges and Vertices</translation>
+ </message>
<message>
<source>NETGEN_GROWTH_RATE</source>
<translation>Taux d'accroissement</translation>
<source>NETGEN_SEG_PER_RADIUS</source>
<translation>Nb. segments par rayon</translation>
</message>
+ <message>
+ <source>NETGEN_SURFACE_CURVATURE</source>
+ <translation type="unfinished">Limit Size by Surface Curvature</translation>
+ </message>
<message>
<source>NETGEN_VERYCOARSE</source>
<translation>Très grossier</translation>
<source>NETGEN_FINENESS</source>
<translation>細かさ</translation>
</message>
+ <message>
+ <source>NETGEN_FUSE_EDGES</source>
+ <translation type="unfinished">Fuse Coincident Nodes on Edges and Vertices</translation>
+ </message>
<message>
<source>NETGEN_GROWTH_RATE</source>
<translation>増加率</translation>
<source>NETGEN_SEG_PER_RADIUS</source>
<translation>半径毎の分割数</translation>
</message>
+ <message>
+ <source>NETGEN_SURFACE_CURVATURE</source>
+ <translation type="unfinished">Limit Size by Surface Curvature</translation>
+ </message>
<message>
<source>NETGEN_VERYCOARSE</source>
<translation>非常に粗く</translation>
#include <BRepOffsetAPI_MakeOffsetShape.hxx>
#include <ShapeFix_Shape.hxx>
diff -Naur netgen-4.9.13_orig/libsrc/occ/occgenmesh.cpp netgen-4.9.13_new/libsrc/occ/occgenmesh.cpp
---- netgen-4.9.13_orig/libsrc/occ/occgenmesh.cpp 2010-03-16 09:30:07.000000000 +0300
-+++ netgen-4.9.13_new/libsrc/occ/occgenmesh.cpp 2011-12-20 14:50:26.000000000 +0400
+--- netgen-4.9.13_orig/libsrc/occ/occgenmesh.cpp 2011-12-20 14:50:26.000000000 +0400
++++ netgen-4.9.13_new/libsrc/occ/occgenmesh.cpp 2014-02-05 20:16:34.000000000 +0400
@@ -15,6 +15,8 @@
#define DIVIDEEDGESECTIONS 1000
pnt = c->Value(params[i]);
ps[i-1] = MeshPoint (Point3d(pnt.X(), pnt.Y(), pnt.Z()));
i++;
-@@ -323,6 +336,7 @@
+@@ -323,6 +336,9 @@
(*testout) << "nedges = " << nedges << endl;
double eps = 1e-6 * geom.GetBoundingBox().Diam();
+ const double eps2 = eps * eps; // -- small optimization
++
++ int first_vp = mesh.GetNP()+1; // -- to support SALOME sub-meshes
for (int i = 1; i <= nvertices; i++)
{
-@@ -332,7 +346,8 @@
+@@ -332,7 +348,8 @@
bool exists = 0;
if (merge_solids)
for (PointIndex pi = 1; pi <= mesh.GetNP(); pi++)
{
exists = 1;
break;
-@@ -362,6 +377,7 @@
+@@ -362,6 +379,7 @@
{
TopoDS_Face face = TopoDS::Face(exp1.Current());
int facenr = geom.fmap.FindIndex(face);
if (face2solid[0][facenr-1] == 0)
face2solid[0][facenr-1] = solidnr;
-@@ -381,6 +397,7 @@
+@@ -381,6 +399,7 @@
int facenr = 0;
int edgenr = 0;
(*testout) << "faces = " << geom.fmap.Extent() << endl;
int curr = 0;
-@@ -442,6 +459,7 @@
+@@ -442,6 +461,7 @@
//(*testout) << "ignoring degenerated edge" << endl;
continue;
}
if (geom.vmap.FindIndex(TopExp::FirstVertex (edge)) ==
geom.vmap.FindIndex(TopExp::LastVertex (edge)))
-@@ -479,15 +497,64 @@
+@@ -474,20 +494,104 @@
+
+ if (!merge_solids)
+ {
+- pnums[0] = geom.vmap.FindIndex (TopExp::FirstVertex (edge));
+- pnums[pnums.Size()-1] = geom.vmap.FindIndex (TopExp::LastVertex (edge));
++ //pnums[0] = geom.vmap.FindIndex (TopExp::FirstVertex (edge));
++ //pnums[pnums.Size()-1] = geom.vmap.FindIndex (TopExp::LastVertex (edge));
++ MeshPoint dfltP ( Point<3> ( 0, 0, 0 ) );
++ int *ipp[] = { &pnums[0], &pnums[pnums.Size()-1] };
++ TopoDS_Iterator vIt( edge, false );
++ TopoDS_Vertex v[2];
++ v[0] = TopoDS::Vertex( vIt.Value() ); vIt.Next();
++ v[1] = TopoDS::Vertex( vIt.Value() );
++ if ( v[0].Orientation() == TopAbs_REVERSED )
++ std::swap( v[0], v[1] );
++ for ( int i = 0; i < 2; ++i)
++ {
++ int &ip = *ipp[i];
++ ip = geom.vmap.FindIndex ( v[i] );
++ if ( ip == 0 || ip > nvertices )
++ {
++ int iv = ip;
++ if ( ip == 0 )
++ ip = iv = geom.vmap.Add( v[i] );
++ gp_Pnt pnt = BRep_Tool::Pnt( v[i] );
++ MeshPoint mp( Point<3>(pnt.X(), pnt.Y(), pnt.Z()) );
++ for (PointIndex pi = 1; pi < first_vp; pi++)
++ if ( Dist2 (mesh.Point(pi), Point<3>(mp)) < 1e-100 )
++ {
++ ip = pi;
++ if ( mesh.Point(ip).GetLayer() != dfltP.GetLayer() && mesh.Point(ip).GetLayer() != iv )
++ continue;
++ if ( mesh.Point(ip).GetLayer() == dfltP.GetLayer())
++ mesh.Point(ip) = MeshPoint( mesh.Point(ip), iv );
++ break;
++ }
++ }
++ else
++ {
++ ip += first_vp - 1;
++ }
++ }
}
else
{
}
}
-@@ -633,7 +700,8 @@
+@@ -497,17 +601,20 @@
+ bool exists = 0;
+ int j;
+ for (j = first_ep; j <= mesh.GetNP(); j++)
++ {
++ if (!merge_solids && mesh.Point(j).GetLayer() != geomedgenr ) continue; // to support SALOME fuse edges
+ if ((mesh.Point(j)-Point<3>(mp[i-1])).Length() < eps)
+ {
+ exists = 1;
+ break;
+ }
++ }
+
+ if (exists)
+ pnums[i] = j;
+ else
+ {
+- mesh.AddPoint (mp[i-1]);
++ mesh.AddPoint (mp[i-1], geomedgenr); // to support SALOME fuse edges
+ (*testout) << "add meshpoint " << mp[i-1] << endl;
+ pnums[i] = mesh.GetNP();
+ }
+@@ -591,6 +698,8 @@
+ // (*testout) << "edge " << mesh.LineSegment(i).edgenr << " face " << mesh.LineSegment(i).si
+ // << " p1 " << mesh.LineSegment(i)[0] << " p2 " << mesh.LineSegment(i)[1] << endl;
+ // exit(10);
++ for (int j = 1; j <= mesh.GetNP(); j++) // to support SALOME fuse edges: set level to zero\r
++ mesh.Point(j) = MeshPoint( (Point<3>&) mesh.Point(j) );
+
+ mesh.CalcSurfacesOfNode();
+ multithread.task = savetask;
+@@ -633,7 +742,8 @@
}
(*testout) << "mesh face " << k << endl;
geom.facemeshstatus[k-1] = -1;
-@@ -901,7 +969,8 @@
+@@ -901,7 +1011,8 @@
// if (k != 36) continue;
// (*testout) << "optimize face " << k << endl;
FaceDescriptor & fd = mesh.GetFaceDescriptor(k);
-@@ -1456,3 +1525,4 @@
+@@ -1456,3 +1567,4 @@
}
#endif
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
def SetQuadAllowed(self, toAllow=True):
if self.Parameters(): self.params.SetQuadAllowed(toAllow)
pass
+ ## Sets @c UseSurfaceCurvature flag
+ # @param toUse new value of the @c UseSurfaceCurvature parameter (@c True by default)
+ def SetUseSurfaceCurvature(self, toUse=True):
+ if self.Parameters(): self.params.SetUseSurfaceCurvature(toUse)
+ pass
+ ## Sets @c FuseEdges flag
+ # @param toFuse new value of the @c FuseEdges parameter (@c False by default)
+ def SetFuseEdges(self, toFuse=False):
+ if self.Parameters(): self.params.SetFuseEdges(toFuse)
+ pass
## Sets number of segments overriding the value set by SetLocalLength()
# @param theVal new value of number of segments parameter
def LengthFromEdges(self):
hyp = self.Hypothesis("LengthFromEdges", UseExisting=1, CompareMethod=self.CompareEqualHyp)
return hyp
+
+ ## Sets @c SurfaceCurvature flag
+ # @param toAllow new value of the @c SurfaceCurvature parameter (@c True by default)
+ def SetSurfaceCurvature(self, toAllow=True):
+ if self.Parameters(): self.params.SetSurfaceCurvature(toAllow)
+ pass
## Sets @c QuadAllowed flag.
# @param toAllow new value of the @c QuadAllowed parameter (@c True by default)
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
NETGENPlugin_Hypothesis::NETGENPlugin_Hypothesis (int hypId, int studyId,
SMESH_Gen * gen)
: SMESH_Hypothesis(hypId, studyId, gen),
- _maxSize (GetDefaultMaxSize()),
- _minSize (0),
- _growthRate (GetDefaultGrowthRate()),
- _nbSegPerEdge (GetDefaultNbSegPerEdge()),
- _nbSegPerRadius(GetDefaultNbSegPerRadius()),
- _fineness (GetDefaultFineness()),
- _secondOrder (GetDefaultSecondOrder()),
- _optimize (GetDefaultOptimize()),
- _localSize (GetDefaultLocalSize()),
- _quadAllowed (GetDefaultQuadAllowed())
+ _maxSize (GetDefaultMaxSize()),
+ _minSize (0),
+ _growthRate (GetDefaultGrowthRate()),
+ _nbSegPerEdge (GetDefaultNbSegPerEdge()),
+ _nbSegPerRadius (GetDefaultNbSegPerRadius()),
+ _fineness (GetDefaultFineness()),
+ _secondOrder (GetDefaultSecondOrder()),
+ _optimize (GetDefaultOptimize()),
+ _localSize (GetDefaultLocalSize()),
+ _quadAllowed (GetDefaultQuadAllowed()),
+ _surfaceCurvature(GetDefaultSurfaceCurvature()),
+ _fuseEdges (GetDefaultFuseEdges())
{
_name = "NETGEN_Parameters";
_param_algo_dim = 3;
*
*/
//=============================================================================
+void NETGENPlugin_Hypothesis::SetSurfaceCurvature(bool theVal)
+{
+ if (theVal != _surfaceCurvature)
+ {
+ _surfaceCurvature = theVal;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+bool NETGENPlugin_Hypothesis::GetDefaultSurfaceCurvature()
+{
+ return true;
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+void NETGENPlugin_Hypothesis::SetFuseEdges(bool theVal)
+{
+ if (theVal != _fuseEdges)
+ {
+ _fuseEdges = theVal;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+bool NETGENPlugin_Hypothesis::GetDefaultFuseEdges()
+{
+ return true; // false; -- for SALOME_TESTS/Grids/smesh/3D_mesh_NETGEN_05/F6
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
ostream & NETGENPlugin_Hypothesis::SaveTo(ostream & save)
{
save << _maxSize << " " << _fineness;
}
save << " " << _minSize;
save << " " << _quadAllowed;
+ save << " " << _surfaceCurvature;
+ save << " " << _fuseEdges;
return save;
}
if ( !isOK )
_quadAllowed = GetDefaultQuadAllowed();
+ isOK = ( load >> _surfaceCurvature );
+ if ( !isOK )
+ _surfaceCurvature = GetDefaultSurfaceCurvature();
+
+ isOK = ( load >> _fuseEdges );
+ if ( !isOK )
+ _fuseEdges = GetDefaultFuseEdges();
+
return load;
}
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
void SetQuadAllowed(bool theVal);
bool GetQuadAllowed() const { return _quadAllowed; }
+ void SetSurfaceCurvature(bool theVal);
+ bool GetSurfaceCurvature() const { return _surfaceCurvature; }
+
+ void SetFuseEdges(bool theVal);
+ bool GetFuseEdges() const { return _fuseEdges; }
+
// the default values (taken from NETGEN 4.5 sources)
static double GetDefaultMaxSize();
static bool GetDefaultSecondOrder();
static bool GetDefaultOptimize();
static bool GetDefaultQuadAllowed();
+ static bool GetDefaultSurfaceCurvature();
+ static bool GetDefaultFuseEdges();
// Persistence
virtual ostream & SaveTo(ostream & save);
bool _optimize;
TLocalSize _localSize;
bool _quadAllowed;
+ bool _surfaceCurvature;
+ bool _fuseEdges;
};
#endif
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
return this->GetImpl()->GetQuadAllowed();
}
+//=============================================================================
+
+void NETGENPlugin_Hypothesis_i::SetUseSurfaceCurvature (CORBA::Boolean theValue)
+{
+ if ( NETGENPlugin_Hypothesis_i::isToSetParameter( GetUseSurfaceCurvature(),
+ theValue,
+ METH_SetSurfaceCurvature ))
+ {
+ this->GetImpl()->SetSurfaceCurvature(theValue);
+ SMESH::TPythonDump() << _this() << ".SetUseSurfaceCurvature( " << theValue << " )";
+ }
+}
+
+//=============================================================================
+
+CORBA::Boolean NETGENPlugin_Hypothesis_i::GetUseSurfaceCurvature()
+{
+ return this->GetImpl()->GetSurfaceCurvature();
+}
+
+//=============================================================================
+
+void NETGENPlugin_Hypothesis_i::SetFuseEdges (CORBA::Boolean theValue)
+{
+ if ( NETGENPlugin_Hypothesis_i::isToSetParameter( GetFuseEdges(),
+ theValue,
+ METH_SetFuseEdges ))
+ {
+ this->GetImpl()->SetFuseEdges(theValue);
+ SMESH::TPythonDump() << _this() << ".SetFuseEdges( " << theValue << " )";
+ }
+}
+
+//=============================================================================
+
+CORBA::Boolean NETGENPlugin_Hypothesis_i::GetFuseEdges()
+{
+ return this->GetImpl()->GetFuseEdges();
+}
+
//=============================================================================
/*!
* NETGENPlugin_Hypothesis_i::GetImpl
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
void SetQuadAllowed(CORBA::Boolean theVal);
CORBA::Boolean GetQuadAllowed();
+ void SetUseSurfaceCurvature(CORBA::Boolean theVal);
+ CORBA::Boolean GetUseSurfaceCurvature();
+
+ void SetFuseEdges(CORBA::Boolean theVal);
+ CORBA::Boolean GetFuseEdges();
+
// Get implementation
::NETGENPlugin_Hypothesis* GetImpl();
METH_SetNbSegPerRadius = 128,
METH_SetLocalSizeOnEntry = 256,
METH_SetQuadAllowed = METH_SetLocalSizeOnEntry * 2,
- METH_LAST = METH_SetQuadAllowed
+ METH_SetSurfaceCurvature = METH_SetQuadAllowed * 2,
+ METH_SetFuseEdges = METH_SetSurfaceCurvature * 2,
+ METH_LAST = METH_SetFuseEdges
};
int mySetMethodFlags;
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//extern void OCCSetLocalMeshSize(OCCGeometry & geom, Mesh & mesh);
extern MeshingParameters mparam;
extern volatile multithreadt multithread;
+ extern bool merge_solids;
}
#include <vector>
{
netgen::MeshingParameters& mparams = netgen::mparam;
// maximal mesh edge size
- mparams.maxh = 0;//NETGENPlugin_Hypothesis::GetDefaultMaxSize();
- mparams.minh = 0;
+ mparams.maxh = 0;//NETGENPlugin_Hypothesis::GetDefaultMaxSize();
+ mparams.minh = 0;
// minimal number of segments per edge
mparams.segmentsperedge = NETGENPlugin_Hypothesis::GetDefaultNbSegPerEdge();
// rate of growth of size between elements
- mparams.grading = NETGENPlugin_Hypothesis::GetDefaultGrowthRate();
+ mparams.grading = NETGENPlugin_Hypothesis::GetDefaultGrowthRate();
// safety factor for curvatures (elements per radius)
mparams.curvaturesafety = NETGENPlugin_Hypothesis::GetDefaultNbSegPerRadius();
// create elements of second order
- mparams.secondorder = NETGENPlugin_Hypothesis::GetDefaultSecondOrder() ? 1 : 0;
+ mparams.secondorder = NETGENPlugin_Hypothesis::GetDefaultSecondOrder();
// quad-dominated surface meshing
if (_isVolume)
- mparams.quad = 0;
+ mparams.quad = 0;
else
- mparams.quad = NETGENPlugin_Hypothesis_2D::GetDefaultQuadAllowed() ? 1 : 0;
- _fineness = NETGENPlugin_Hypothesis::GetDefaultFineness();
+ mparams.quad = NETGENPlugin_Hypothesis_2D::GetDefaultQuadAllowed();
+ _fineness = NETGENPlugin_Hypothesis::GetDefaultFineness();
+ mparams.uselocalh = NETGENPlugin_Hypothesis::GetDefaultSurfaceCurvature();
+ netgen::merge_solids = NETGENPlugin_Hypothesis::GetDefaultFuseEdges();
}
//=============================================================================
netgen::MeshingParameters& mparams = netgen::mparam;
// Initialize global NETGEN parameters:
// maximal mesh segment size
- mparams.maxh = hyp->GetMaxSize();
+ mparams.maxh = hyp->GetMaxSize();
// maximal mesh element linear size
- mparams.minh = hyp->GetMinSize();
+ mparams.minh = hyp->GetMinSize();
// minimal number of segments per edge
mparams.segmentsperedge = hyp->GetNbSegPerEdge();
// rate of growth of size between elements
- mparams.grading = hyp->GetGrowthRate();
+ mparams.grading = hyp->GetGrowthRate();
// safety factor for curvatures (elements per radius)
mparams.curvaturesafety = hyp->GetNbSegPerRadius();
// create elements of second order
- mparams.secondorder = hyp->GetSecondOrder() ? 1 : 0;
+ mparams.secondorder = hyp->GetSecondOrder() ? 1 : 0;
// quad-dominated surface meshing
// only triangles are allowed for volumic mesh (before realizing IMP 0021676)
//if (!_isVolume)
- mparams.quad = hyp->GetQuadAllowed() ? 1 : 0;
- _optimize = hyp->GetOptimize();
- _fineness = hyp->GetFineness();
+ mparams.quad = hyp->GetQuadAllowed() ? 1 : 0;
+ _optimize = hyp->GetOptimize();
+ _fineness = hyp->GetFineness();
+ mparams.uselocalh = hyp->GetSurfaceCurvature();
+ netgen::merge_solids = hyp->GetFuseEdges();
_simpleHyp = NULL;
SMESH_Gen_i* smeshGen_i = SMESH_Gen_i::GetSMESHGen();
return str;
}
+ //================================================================================
+ /*!
+ * \brief Looks for triangles lying on a SOLID
+ */
+ //================================================================================
+
+ bool hasBadElemOnSolid( const list<const SMDS_MeshElement*>& elems,
+ SMESH_subMesh* solidSM )
+ {
+ TopTools_IndexedMapOfShape solidSubs;
+ TopExp::MapShapes( solidSM->GetSubShape(), solidSubs );
+ SMESHDS_Mesh* mesh = solidSM->GetFather()->GetMeshDS();
+
+ list<const SMDS_MeshElement*>::const_iterator e = elems.begin();
+ for ( ; e != elems.end(); ++e )
+ {
+ const SMDS_MeshElement* elem = *e;
+ if ( elem->GetType() != SMDSAbs_Face )
+ continue;
+ int nbNodesOnSolid = 0;
+ SMDS_NodeIteratorPtr nIt = elem->nodeIterator();
+ while ( nIt->more() )
+ {
+ const SMDS_MeshNode* n = nIt->next();
+ const TopoDS_Shape& s = mesh->IndexToShape( n->getshapeId() );
+ nbNodesOnSolid += ( !s.IsNull() && solidSubs.Contains( s ));
+ if ( nbNodesOnSolid > 2 )
+ return true;
+ }
+ }
+ return false;
+ }
+
const double edgeMeshingTime = 0.001;
const double faceMeshingTime = 0.019;
const double edgeFaceMeshingTime = edgeMeshingTime + faceMeshingTime;
" growth rate = " << mparams.grading << "\n"
" elements per radius = " << mparams.curvaturesafety << "\n"
" second order = " << mparams.secondorder << "\n"
- " quad allowed = " << mparams.quad);
- //cout << " quad allowed = " << mparams.quad<<endl;
+ " quad allowed = " << mparams.quad << "\n"
+ " surface curvature = " << mparams.uselocalh << "\n"
+ " fuse edges = " << netgen::merge_solids);
SMESH_ComputeErrorPtr error = SMESH_ComputeError::New();
{
smError.reset( new SMESH_ComputeError( *error ));
if ( nbVol && SMESH_Algo::GetMeshError( sm ) == SMESH_Algo::MEr_OK )
+ {
smError->myName = COMPERR_WARNING;
+ }
+ else if ( !smError->myBadElements.empty() ) // bad surface mesh
+ {
+ if ( !hasBadElemOnSolid( smError->myBadElements, sm ))
+ smError.reset();
+ }
}
pb3D = pb3D || ( smError && smError->IsKO() );
}
_coutBuffer = std::cout.rdbuf();
#ifdef _DEBUG_
cout << "NOTE: netgen output is redirected to file " << _outputFileName << endl;
-#endif
+#else
std::cout.rdbuf( netgen::mycout->rdbuf() );
+#endif
_ngMesh = Ng_NewMesh();
}
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MESHCONST_ANALYSE step may lead to a failure, so we make an attempt
// w/o MESHCONST_ANALYSE at the second loop
int err = 1;
- for ( int iLoop = 0; iLoop < 2; iLoop++ )
+ int iLoop = netgen::mparam.uselocalh ? 0 : 1; // uselocalh depends on
+ for ( ; iLoop < 2; iLoop++ )
{
bool isMESHCONST_ANALYSE = false;
InitComputeError();
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of