Compare commits
149 Commits
master
...
BR_plugins
Author | SHA1 | Date | |
---|---|---|---|
|
eb106a2d2b | ||
|
c4b4efc985 | ||
|
a6a291ea7c | ||
|
b92ee90187 | ||
|
c4d4d6d3c1 | ||
|
1a511115bf | ||
|
c43976566f | ||
|
07a9dd5379 | ||
|
5000caa05b | ||
|
f219b089c5 | ||
|
e713154fa3 | ||
|
6529fef188 | ||
|
11d8d0791e | ||
|
3b785eeae9 | ||
|
9363872fba | ||
|
3060644580 | ||
|
fff3f03c3a | ||
|
85460a3754 | ||
|
f24fcd75c9 | ||
|
9dd6e6252a | ||
|
6e9adf3812 | ||
|
542d99e088 | ||
|
fe27cee3d3 | ||
|
ce0b4856b5 | ||
|
8508f51dda | ||
|
72dc83bdda | ||
|
e881630dee | ||
|
238b9bc557 | ||
|
eb09a83f3d | ||
|
48519d8868 | ||
|
1273dc58a7 | ||
|
6eeed530c5 | ||
|
f6d900d8a6 | ||
|
ab7bc69cf5 | ||
|
576090645e | ||
|
d1405e806a | ||
|
703a139ed3 | ||
|
dc96874dba | ||
|
2ed83ef1a2 | ||
|
8fb05d8785 | ||
|
8097c3fa57 | ||
|
7c7b7b476d | ||
|
b2022dadb0 | ||
|
2b19ca89c1 | ||
|
8923d63e34 | ||
|
c63b5761ca | ||
|
403e97bf9c | ||
|
f4f7958614 | ||
|
4349d5586e | ||
|
be89b9ecdb | ||
|
0b96783951 | ||
|
5e7b2cae3b | ||
|
8e0093180f | ||
|
d736f1af2c | ||
|
6923ab131d | ||
|
3cc645d8a7 | ||
|
8294573dc9 | ||
|
6968bbae2a | ||
|
0e4677714e | ||
|
acd8b67399 | ||
|
6783937b28 | ||
|
46c6691b1a | ||
|
f1bcf210f5 | ||
|
c8e362ac31 | ||
|
69acc2e649 | ||
|
64f826e87f | ||
|
e4d12c0ea7 | ||
|
81d6498051 | ||
|
51cc06831d | ||
|
ac9fa07f93 | ||
|
5acc32009d | ||
|
8730f3b877 | ||
|
33726b59c7 | ||
|
28ae5104e3 | ||
|
7bd3db0b50 | ||
|
8239d06798 | ||
|
393bc8699a | ||
|
48ccb54bfd | ||
|
2e1e059770 | ||
|
7dbbc5de6e | ||
|
2cdf1b2ac7 | ||
|
c9d186bf9d | ||
|
146662ddce | ||
|
cce42b80fd | ||
|
66dfbb110c | ||
|
179e18323f | ||
|
47599c088a | ||
|
11e4fa67a4 | ||
|
81b8deb165 | ||
|
881022af01 | ||
|
c4fe195950 | ||
|
7aacc6b391 | ||
|
8d245c0e35 | ||
|
97990c642a | ||
|
00217d4eb2 | ||
|
276238d114 | ||
|
090c556dd9 | ||
|
fa2966afd4 | ||
|
d7d66641f1 | ||
|
b347c8933d | ||
|
be001649f7 | ||
|
3a8cdae661 | ||
|
2792422baf | ||
|
91c1d3465a | ||
|
b6d4daa757 | ||
|
290e356071 | ||
|
6d27b01928 | ||
|
42b43269f4 | ||
|
f8b902ad9a | ||
|
388d346ae9 | ||
|
7a9566f1d2 | ||
|
fc79403acc | ||
|
10fc3eb3e0 | ||
|
ab2d564ff9 | ||
|
9744d220ed | ||
|
5ca9caacaa | ||
|
4a9ffe08f7 | ||
|
f39abee419 | ||
|
26f711647c | ||
|
b09de1d401 | ||
|
417c06b5ac | ||
|
347223da4b | ||
|
fb14d85a93 | ||
|
86ce9df746 | ||
|
59cd9829d6 | ||
|
10408a1fcd | ||
|
f40c6eace6 | ||
|
a2e972884c | ||
|
fd6f6eae03 | ||
|
84651dec8d | ||
|
3cd53c4b5e | ||
|
9a0411d941 | ||
|
fa15077ca0 | ||
|
5b90097c3f | ||
|
75c7a9333a | ||
|
58429b7405 | ||
|
4178edae0a | ||
|
b32d520638 | ||
|
0857e7bffe | ||
|
46adf58292 | ||
|
4db4ace92a | ||
|
1552ad307a | ||
|
92aed1e510 | ||
|
74459a0d46 | ||
|
e3e64a8856 | ||
|
d044e30e9c | ||
|
19f84535d7 | ||
|
93b251f66d | ||
|
af62c662c5 |
36
Makefile.am
@ -1,24 +1,22 @@
|
||||
# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is 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
|
||||
#
|
||||
|
||||
# -* Makefile *-
|
||||
# Author : Patrick GOLDBRONN (CEA)
|
||||
# Date : 28/06/2001
|
||||
@ -41,11 +39,11 @@ else !NETGENPLUGIN_ENABLE_GUI
|
||||
-I ${SMESH_ROOT_DIR}/adm_local/unix/config_files
|
||||
endif
|
||||
|
||||
SUBDIRS = idl adm_local resources src bin
|
||||
SUBDIRS = idl adm_local resources src bin doc
|
||||
|
||||
DIST_SUBDIRS = idl adm_local resources src bin
|
||||
DIST_SUBDIRS = idl adm_local resources src bin doc
|
||||
|
||||
DISTCLEANFILES = a.out aclocal.m4 configure
|
||||
DISTCLEANFILES = a.out aclocal.m4 configure local-install.sh hack_libtool
|
||||
|
||||
salomeinclude_DATA = NETGENPLUGIN_version.h
|
||||
|
||||
|
@ -1,24 +1,25 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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 : NETGENPLUGIN_version.h
|
||||
// Author : Vadim SANDLER
|
||||
// Module : SALOME
|
||||
@ -32,5 +33,6 @@
|
||||
|
||||
#define NETGENPLUGIN_VERSION_STR "@VERSION@"
|
||||
#define NETGENPLUGIN_VERSION @XVERSION@
|
||||
#define NETGENPLUGIN_DEVELOPMENT @VERSION_DEV@
|
||||
|
||||
#endif // __NETGENPLUGIN_VERSION_H__
|
||||
|
@ -1,24 +1,22 @@
|
||||
# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is 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
|
||||
#
|
||||
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
SUBDIRS = unix
|
||||
|
84
adm_local/cmake_files/FindNETGEN.cmake
Normal file
@ -0,0 +1,84 @@
|
||||
# Copyright (C) 2007-2012 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
|
||||
#
|
||||
|
||||
SET(NETGENHOME $ENV{NETGENHOME})
|
||||
FIND_PATH(NETGEN_INCLUDES_DIR nglib.h ${NETGENHOME}/include)
|
||||
SET(NETGEN_INCLUDES)
|
||||
SET(NETGEN_INCLUDES ${NETGEN_INCLUDES} -I${NETGEN_INCLUDES_DIR} -I${NETGENHOME}/share/netgen/include)
|
||||
SET(NETGEN_INCLUDES ${NETGEN_INCLUDES} -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
|
||||
|
||||
SET(NETGEN_LIBS)
|
||||
FIND_LIBRARY(NETGEN_LIB_csg csg PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
#FIND_LIBRARY(NETGEN_LIB_gen gen PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
FIND_LIBRARY(NETGEN_LIB_geom2d geom2d PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
#FIND_LIBRARY(NETGEN_LIB_gprim gprim PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
FIND_LIBRARY(NETGEN_LIB_interface interface PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
#FIND_LIBRARY(NETGEN_LIB_la la PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
FIND_LIBRARY(NETGEN_LIB_mesh mesh PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
FIND_LIBRARY(NETGEN_LIB_occ occ PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
FIND_LIBRARY(NETGEN_LIB_stl stl PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
FIND_LIBRARY(NETGEN_LIB_nglib nglib PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
|
||||
FOREACH(LIBNAME
|
||||
${NETGEN_LIB_csg}
|
||||
# ${NETGEN_LIB_gen}
|
||||
${NETGEN_LIB_geom2d}
|
||||
# ${NETGEN_LIB_gprim}
|
||||
${NETGEN_LIB_interface}
|
||||
# ${NETGEN_LIB_la}
|
||||
${NETGEN_LIB_mesh}
|
||||
${NETGEN_LIB_occ}
|
||||
${NETGEN_LIB_stl}
|
||||
${NETGEN_LIB_nglib}
|
||||
)
|
||||
IF(LIBNAME)
|
||||
SET(NETGEN_LIBS ${NETGEN_LIBS} ${LIBNAME})
|
||||
ENDIF(LIBNAME)
|
||||
ENDFOREACH(LIBNAME )
|
||||
|
||||
# Check Netgen version
|
||||
SET(NETGEN_V5 OFF)
|
||||
SET(tmp_check_netgen ${CMAKE_BINARY_DIR}/tmp_check_netgen.cxx)
|
||||
FILE(WRITE ${tmp_check_netgen}
|
||||
"#include <iostream> \n"
|
||||
"#include <fstream> \n"
|
||||
"namespace nglib { \n"
|
||||
"#include \"nglib.h\" \n"
|
||||
"} \n"
|
||||
"#include <occgeom.hpp> \n"
|
||||
"int main() { \n"
|
||||
"nglib::Ng_Init(); \n"
|
||||
"netgen::Mesh* ngMesh; \n"
|
||||
"ngMesh->CalcLocalH(1.0); \n"
|
||||
"nglib::Ng_Exit(); \n"
|
||||
"return 0; \n"
|
||||
"} \n"
|
||||
)
|
||||
TRY_COMPILE(NETGEN_V5
|
||||
${CMAKE_BINARY_DIR}
|
||||
${tmp_check_netgen}
|
||||
CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=${NETGEN_LIB_nglib}"
|
||||
COMPILE_DEFINITIONS ${CAS_CPPFLAGS} ${NETGEN_INCLUDES}
|
||||
OUTPUT_VARIABLE OUTPUT
|
||||
)
|
||||
FILE(REMOVE ${tmp_check_netgen})
|
||||
|
||||
IF(NETGEN_V5)
|
||||
SET(NETGEN_INCLUDES ${NETGEN_INCLUDES} -DNETGEN_V5)
|
||||
ENDIF(NETGEN_V5)
|
@ -1,24 +1,22 @@
|
||||
# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is 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
|
||||
#
|
||||
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
SUBDIRS = config_files
|
||||
|
@ -1,24 +1,22 @@
|
||||
# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is 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
|
||||
#
|
||||
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
dist_admlocalm4_DATA = \
|
||||
|
@ -1,165 +1,259 @@
|
||||
dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
dnl Copyright (C) 2007-2012 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 Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
dnl
|
||||
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 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
|
||||
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 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
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 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
dnl
|
||||
dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
dnl
|
||||
|
||||
AC_DEFUN([CHECK_NETGEN],[
|
||||
|
||||
AC_REQUIRE([AC_PROG_CXX])dnl
|
||||
AC_REQUIRE([AC_PROG_CXXCPP])dnl
|
||||
AC_REQUIRE([CHECK_CAS])dnl
|
||||
|
||||
AC_CHECKING(for Netgen 4.5 and higher Libraries)
|
||||
AC_CHECKING([for Netgen])
|
||||
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
|
||||
AC_ARG_WITH(netgen,
|
||||
[ --with-netgen=DIR root directory path of NETGEN installation],
|
||||
NETGEN_HOME=$withval,NETGEN_HOME="")
|
||||
AC_ARG_WITH([netgen],
|
||||
[AC_HELP_STRING([--with-netgen=DIR], [root directory path to NETGEN library installation])],
|
||||
[NETGEN_HOME=$withval],[NETGEN_HOME=yes])
|
||||
|
||||
NETGEN_INCLUDES=""
|
||||
NETGEN_LIBS_DIR=""
|
||||
NETGEN_LIBS=""
|
||||
NETGEN_V5=no
|
||||
|
||||
AC_SUBST(NETGEN_INCLUDES)
|
||||
AC_SUBST(NETGEN_LIBS)
|
||||
|
||||
Netgen_ok=no
|
||||
|
||||
if test "x$NETGEN_HOME" == "x" ; then
|
||||
if test "x$NETGEN_HOME" = "x" -o "x$NETGEN_HOME" = "xyes" -o "x$NETGEN_HOME" = "xauto" ; then
|
||||
# auto-detection
|
||||
|
||||
# no --with-netgen option used
|
||||
if test "x$NETGENHOME" != "x" ; then
|
||||
|
||||
# NETGENHOME environment variable defined
|
||||
NETGEN_HOME=$NETGENHOME
|
||||
|
||||
fi
|
||||
#
|
||||
if test "x$NETGENHOME" != "x" ; then
|
||||
# - by environment variable NETGENHOME
|
||||
NETGEN_HOME=$NETGENHOME
|
||||
else
|
||||
# - by searching NETGEN executables
|
||||
AC_PATH_PROG([TEMP], [ng_stl])
|
||||
if test "x$TEMP" != "x" ; then
|
||||
NETGEN_BIN_DIR=`dirname $TEMP`
|
||||
NETGEN_HOME=`dirname $NETGEN_BIN_DIR`
|
||||
else
|
||||
NETGEN_HOME=""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
echo NETGEN_HOME=$NETGEN_HOME
|
||||
|
||||
if test "x$NETGEN_HOME" != "x"; then
|
||||
|
||||
echo
|
||||
echo
|
||||
echo -------------------------------------------------
|
||||
echo ----------------------------------------------------------
|
||||
echo You are about to choose to use somehow the
|
||||
echo Netgen Library to generate Tetrahedric mesh.
|
||||
echo
|
||||
echo WARNING
|
||||
echo ----------------------------------------------------------
|
||||
echo ----------------------------------------------------------
|
||||
echo You are strongly advised to consult the file
|
||||
echo NETGENPLUGIN_SRC/src/NETGEN/ReadMeForNgUsers, particularly about
|
||||
echo assumptions made on the installation of the Netgen
|
||||
echo NETGENPLUGIN_SRC/src/NETGEN/ReadMeForNgUsers, particularly
|
||||
echo about assumptions made on the installation of the Netgen
|
||||
echo application and libraries.
|
||||
echo Ask your system administrator for those details.
|
||||
echo ----------------------------------------------------------
|
||||
echo ----------------------------------------------------------
|
||||
echo
|
||||
echo
|
||||
|
||||
NETGEN_INCLUDES="-I${NETGEN_HOME}/include -I${NETGEN_HOME}/share/netgen/include"
|
||||
NETGEN_LIBS_OLD="-L${NETGEN_HOME}/lib -lnglib"
|
||||
NETGEN_LIBS_NEW="-L${NETGEN_HOME}/lib -lnglib -linterface -lgeom2d -lcsg -lstl -locc -lmesh"
|
||||
|
||||
dnl check Netgen headers availability
|
||||
|
||||
NETGEN_INCLUDES="-I${NETGEN_HOME}/include"
|
||||
|
||||
# check ${NETGEN_HOME}/lib/LINUX directory for libraries
|
||||
if test -f ${NETGEN_HOME}/lib/LINUX/libcsg.a ; then
|
||||
NETGEN_LIBS_DIR="${NETGEN_HOME}/lib/LINUX"
|
||||
else
|
||||
# check ${NETGEN_HOME}/lib/LINUX64 directory for libraries
|
||||
if test -f ${NETGEN_HOME}/lib/LINUX64/libcsg.a ; then
|
||||
NETGEN_LIBS_DIR="${NETGEN_HOME}/lib/LINUX64"
|
||||
else
|
||||
NETGEN_LIBS_DIR="${NETGEN_HOME}/lib"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "NETGEN_LIBS_DIR = $NETGEN_LIBS_DIR"
|
||||
|
||||
CPPFLAGS_old="$CPPFLAGS"
|
||||
CXXFLAGS_old="$CXXFLAGS"
|
||||
CPPFLAGS="$NETGEN_INCLUDES $CAS_CPPFLAGS $CPPFLAGS"
|
||||
CXXFLAGS="$NETGEN_INCLUDES $CAS_CPPFLAGS $CXXFLAGS"
|
||||
CPPFLAGS="$CAS_CPPFLAGS $NETGEN_INCLUDES $CPPFLAGS"
|
||||
CXXFLAGS="$CAS_CXXFLAGS $NETGEN_INCLUDES $CXXFLAGS"
|
||||
|
||||
AC_MSG_CHECKING(for Netgen header file)
|
||||
AC_MSG_CHECKING([for Netgen header file])
|
||||
|
||||
AC_CHECK_HEADER(nglib.h,Netgen_ok=yes,Netgen_ok=no)
|
||||
if test "x$Netgen_ok" == "xyes"; then
|
||||
AC_CHECK_HEADER([nglib.h], [Netgen_ok=yes], [Netgen_ok=no])
|
||||
|
||||
AC_MSG_CHECKING(for Netgen libraries)
|
||||
dnl check Netgen libraries
|
||||
|
||||
LDFLAGS_old="$LDFLAGS"
|
||||
LDFLAGS="-L. -lNETGEN $CAS_LDPATH -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES -lTKSTL -lTKTopAlgo $LDFLAGS"
|
||||
NETGEN_LIBS=${NETGEN_LIBS_NEW}
|
||||
|
||||
AC_TRY_COMPILE(#include <iostream>
|
||||
#include <fstream>
|
||||
namespace nglib {
|
||||
#include "nglib.h"
|
||||
}
|
||||
#define OCCGEOMETRY
|
||||
#include <occgeom.hpp>
|
||||
,nglib::Ng_Init();
|
||||
netgen::OCCGeometry occgeo;
|
||||
nglib::Ng_Exit();,Netgen_ok=yes;ar x "$NETGEN_LIBS_DIR/libnginterface.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libocc.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libcsg.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libgprim.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libmesh.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libopti.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libgen.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libla.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libstlgeom.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libgeom2d.a";
|
||||
$CXX -shared linopt.o bfgs.o linsearch.o global.o bisect.o meshtool.o refine.o ruler3.o improve3.o adfront3.o tetrarls.o prism2rls.o profiler.o pyramidrls.o pyramid2rls.o netrule3.o ruler2.o meshclass.o improve2.o adfront2.o netrule2.o triarls.o geomsearch.o secondorder.o meshtype.o parser3.o quadrls.o specials.o parser2.o meshing2.o meshing3.o meshfunc.o localh.o improve2gen.o delaunay.o boundarylayer.o msghandler.o meshfunc2d.o smoothing2.o smoothing3.o topology.o curvedelems_new.o clusters.o zrefine.o ngexception.o geomtest3d.o geom2d.o geom2dmesh.o geom3d.o adtree.o transform3d.o geomfuncs.o polynomial.o densemat.o vector.o basemat.o sparsmat.o algprim.o brick.o manifold.o bspline2d.o meshsurf.o csgeom.o polyhedra.o curve2d.o singularref.o edgeflw.o solid.o explicitcurve2d.o specpoin.o gencyl.o revolution.o genmesh.o genmesh2d.o spline3d.o surface.o identify.o triapprox.o meshstlsurface.o stlline.o stltopology.o stltool.o stlgeom.o stlgeomchart.o stlgeommesh.o table.o optmem.o spbita2d.o hashtabl.o sort.o flags.o seti.o bitarray.o array.o symbolta.o mystring.o moveablemem.o spline.o splinegeometry.o ngnewdelete.o nglib.o hprefinement.o Partition_Inter2d.o Partition_Loop.o Partition_Loop3d.o Partition_Inter3d.o Partition_Loop2d.o Partition_Spliter.o occgeom.o occgenmesh.o occmeshsurf.o -o libNETGEN.so;
|
||||
rm -rf linopt.o bfgs.o linsearch.o global.o bisect.o meshtool.o refine.o ruler3.o improve3.o adfront3.o tetrarls.o prism2rls.o profiler.o pyramidrls.o pyramid2rls.o netrule3.o ruler2.o meshclass.o improve2.o adfront2.o netrule2.o triarls.o geomsearch.o secondorder.o meshtype.o parser3.o quadrls.o specials.o parser2.o meshing2.o meshing3.o meshfunc.o localh.o improve2gen.o delaunay.o boundarylayer.o msghandler.o meshfunc2d.o smoothing2.o smoothing3.o topology.o curvedelems_new.o clusters.o zrefine.o ngexception.o geomtest3d.o geom2d.o geom2dmesh.o geom3d.o adtree.o transform3d.o geomfuncs.o polynomial.o densemat.o vector.o basemat.o sparsmat.o algprim.o brick.o manifold.o bspline2d.o meshsurf.o csgeom.o polyhedra.o curve2d.o singularref.o edgeflw.o solid.o explicitcurve2d.o specpoin.o gencyl.o revolution.o genmesh.o genmesh2d.o spline3d.o surface.o identify.o triapprox.o meshstlsurface.o stlline.o stltopology.o stltool.o stlgeom.o stlgeomchart.o stlgeommesh.o table.o optmem.o spbita2d.o hashtabl.o sort.o flags.o seti.o bitarray.o array.o symbolta.o mystring.o moveablemem.o spline.o splinegeometry.o ngnewdelete.o nglib.o hprefinement.o Partition_Inter2d.o Partition_Loop.o Partition_Loop3d.o Partition_Inter3d.o Partition_Loop2d.o Partition_Spliter.o occgeom.o occgenmesh.o occmeshsurf.o csgparser.o dynamicmem.o extrusion.o occconstruction.o parthreads.o readuser.o writeabaqus.o writediffpack.o writeelmer.o writefeap.o writefluent.o writegmsh.o writejcm.o writepermas.o writetecplot.o writetochnog.o writeuser.o wuchemnitz.o,
|
||||
Netgen_ok=no)
|
||||
LIBS_old="$LIBS"
|
||||
LIBS="$NETGEN_LIBS $CAS_LDPATH -lTKernel -lTKMath -lTKG3d -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES -lTKSTL -lTKTopAlgo -lTKGeomBase $LIBS_old"
|
||||
|
||||
AC_CACHE_VAL(salome_netgen_lib,[
|
||||
AC_TRY_LINK(
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
namespace nglib {
|
||||
#include "nglib.h"
|
||||
}
|
||||
#define OCCGEOMETRY
|
||||
#include <occgeom.hpp>
|
||||
,nglib::Ng_Init();
|
||||
netgen::OCCGeometry occgeo;
|
||||
nglib::Ng_Exit();,
|
||||
eval "salome_netgen_lib=yes";rm -rf libNETGEN.so,eval "salome_netgen_lib=no";rm -rf libNETGEN.so)
|
||||
])
|
||||
Netgen_ok="$salome_netgen_lib"
|
||||
if test "x$Netgen_ok" = "xyes"; then
|
||||
|
||||
AC_MSG_NOTICE([checking for Netgen libraries])
|
||||
|
||||
AC_MSG_CHECKING([libraries ... try new style ])
|
||||
|
||||
AC_TRY_LINK(
|
||||
[
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
namespace nglib {
|
||||
#include "nglib.h"
|
||||
}
|
||||
],
|
||||
[
|
||||
nglib::Ng_Init();
|
||||
nglib::Ng_Exit();
|
||||
],
|
||||
[Netgen_ok=yes],
|
||||
[Netgen_ok=no])
|
||||
|
||||
if test "x$Netgen_ok" = "xno" ; then
|
||||
|
||||
AC_MSG_RESULT([no])
|
||||
|
||||
AC_MSG_CHECKING([libraries ... try old style])
|
||||
|
||||
NETGEN_LIBS=${NETGEN_LIBS_OLD}
|
||||
LIBS="$NETGEN_LIBS $CAS_LDPATH -lTKernel -lTKMath -lTKG3d -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES -lTKSTL -lTKTopAlgo -lTKGeomBase $LIBS_old"
|
||||
|
||||
AC_TRY_LINK(
|
||||
[
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
namespace nglib {
|
||||
#include "nglib.h"
|
||||
}
|
||||
],
|
||||
[
|
||||
nglib::Ng_Init();
|
||||
nglib::Ng_Exit();
|
||||
],
|
||||
[Netgen_ok=yes],
|
||||
[Netgen_ok=no])
|
||||
|
||||
fi
|
||||
|
||||
LDFLAGS="$LDFLAGS_old"
|
||||
fi
|
||||
|
||||
dnl check if Netgen of v5 or v4
|
||||
|
||||
if test "$Netgen_ok" = "yes" ; then
|
||||
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
AC_MSG_CHECKING([Netgen version])
|
||||
|
||||
AC_TRY_LINK(
|
||||
[
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#define OCCGEOMETRY
|
||||
namespace nglib {
|
||||
#include "nglib.h"
|
||||
}
|
||||
#include <occgeom.hpp>
|
||||
],
|
||||
[
|
||||
nglib::Ng_Init();
|
||||
netgen::Mesh* ngMesh;
|
||||
ngMesh->CalcLocalH(1.0);
|
||||
nglib::Ng_Exit();
|
||||
],
|
||||
[NETGEN_V5=yes],
|
||||
[NETGEN_V5=no])
|
||||
|
||||
fi
|
||||
|
||||
dnl check OCCT support in Netgen
|
||||
|
||||
if test "$Netgen_ok" = "yes" ; then
|
||||
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
AC_MSG_CHECKING([for OCCT support in Netgen library])
|
||||
|
||||
AC_TRY_LINK(
|
||||
[
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#define OCCGEOMETRY
|
||||
namespace nglib {
|
||||
#include "nglib.h"
|
||||
}
|
||||
],
|
||||
[
|
||||
nglib::Ng_Init();
|
||||
nglib::Ng_OCC_Geometry* ng_occ_geom = nglib::Ng_OCC_NewGeometry();
|
||||
nglib::Ng_Exit();
|
||||
],
|
||||
[Netgen_ok=yes],
|
||||
[Netgen_ok=no])
|
||||
|
||||
fi
|
||||
|
||||
dnl check SALOME patch in Netgen
|
||||
|
||||
if test "$Netgen_ok" = "yes" ; then
|
||||
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
AC_MSG_CHECKING([for SALOME patch in Netgen library])
|
||||
|
||||
AC_TRY_LINK(
|
||||
[
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#define OCCGEOMETRY
|
||||
namespace nglib {
|
||||
#include "nglib.h"
|
||||
}
|
||||
#include <occgeom.hpp>
|
||||
],
|
||||
[
|
||||
nglib::Ng_Init();
|
||||
netgen::OCCGeometry occgeo;
|
||||
nglib::Ng_Exit();
|
||||
],
|
||||
[Netgen_ok=yes],
|
||||
[Netgen_ok=no])
|
||||
|
||||
fi
|
||||
|
||||
LIBS="$LIBS_old"
|
||||
CPPFLAGS="$CPPFLAGS_old"
|
||||
CXXFLAGS="$CXXFLAGS_old"
|
||||
|
||||
if test "x$Netgen_ok" == xno ; then
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_WARN(Netgen libraries not found or not properly installed)
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(NETGEN_INCLUDES)
|
||||
AC_SUBST(NETGEN_LIBS_DIR)
|
||||
if test "x$Netgen_ok" = xyes ; then
|
||||
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
if test "x$NETGEN_V5" = "xyes" ; then
|
||||
AC_MSG_RESULT([Netgen is of version 5.0 or newer])
|
||||
NETGEN_INCLUDES="$NETGEN_INCLUDES -DNETGEN_V5"
|
||||
else
|
||||
AC_MSG_RESULT([Netgen is of version 4.9.13 or older])
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Netgen is not properly installed. Read NETGENPLUGIN_SRC/src/NETGEN/ReadMeForNgUsers for more details.])
|
||||
|
||||
fi
|
||||
|
||||
AC_LANG_RESTORE
|
||||
|
||||
|
@ -1,24 +1,25 @@
|
||||
dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
dnl Copyright (C) 2007-2012 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 Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
dnl
|
||||
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 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
|
||||
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 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
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 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
dnl
|
||||
dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
dnl
|
||||
|
||||
#------------------------------------------------------------
|
||||
# Check availability of Salome NETGEN mesh plugin module
|
||||
# distribution
|
||||
|
@ -1,24 +1,30 @@
|
||||
# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is 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
|
||||
|
||||
# ============================================================
|
||||
# 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
|
||||
|
||||
# ============================================================
|
||||
# This file defines the common definitions used in several
|
||||
# Makefile. This file must be included, if needed, by the file
|
||||
|
@ -1,24 +1,22 @@
|
||||
# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is 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
|
||||
#
|
||||
|
||||
# -* Makefile *-
|
||||
# Author : Guillaume Boulant (CSSI)
|
||||
# Module : KERNEL
|
||||
|
@ -1 +1,3 @@
|
||||
THIS IS SALOME - NETGENPLUGIN VERSION: @VERSION@
|
||||
[SALOME NETGENPLUGIN] : @VERSION@
|
||||
[DEVELOPMENT] : @VERSION_DEV@
|
||||
[DESCRIPTION] : Netgen meshing plug-in for SALOME Mesh module
|
||||
|
27
build_cmake
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2007-2012 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
|
||||
#
|
||||
|
||||
CURRENT_DIR=`pwd`
|
||||
CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
|
||||
cd ${CONF_DIR}
|
||||
python $KERNEL_ROOT_DIR/salome_adm/cmake_files/deprecated/am2cmake.py --netgenplugin
|
||||
status=$?
|
||||
cd ${CURRENT_DIR}
|
||||
exit $status
|
20
build_cmake.bat
Normal file
@ -0,0 +1,20 @@
|
||||
@REM Copyright (C) 2007-2012 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\deprecated\am2cmake.py --netgenplugin
|
100
build_configure
@ -1,25 +1,26 @@
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
# Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
# Tool for updating list of .in file for the SALOME project
|
||||
# and regenerating configure script
|
||||
# Author : Marc Tajchman - CEA
|
||||
@ -30,7 +31,6 @@
|
||||
#
|
||||
ORIG_DIR=`pwd`
|
||||
CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
|
||||
NETGENPLUGIN_WITH_GUI="yes"
|
||||
|
||||
########################################################################
|
||||
# Test if the KERNEL_ROOT_DIR is set correctly
|
||||
@ -46,27 +46,6 @@ fi
|
||||
# echo "failed : KERNEL_SRC variable is not correct !"
|
||||
# exit
|
||||
#fi
|
||||
for option
|
||||
do
|
||||
case $option in
|
||||
-with-gui | --with-gui)
|
||||
NETGENPLUGIN_WITH_GUI="yes"
|
||||
break;;
|
||||
-without-gui | --without-gui | -with-gui=no | --with-gui=no)
|
||||
NETGENPLUGIN_WITH_GUI="no"
|
||||
break;;
|
||||
esac
|
||||
done
|
||||
|
||||
########################################################################
|
||||
# Test if the GUI_ROOT_DIR is set correctly
|
||||
|
||||
if test ${NETGENPLUGIN_WITH_GUI} = yes; then
|
||||
if test ! -d "${GUI_ROOT_DIR}"; then
|
||||
echo "failed : GUI_ROOT_DIR variable is not correct !"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
########################################################################
|
||||
# Test if the MED_ROOT_DIR is set correctly
|
||||
@ -96,40 +75,17 @@ cd ${CONF_DIR}
|
||||
ABS_CONF_DIR=`pwd`
|
||||
|
||||
#######################################################################
|
||||
# Update configure.ac script: to set NETGENPLUGIN_WITH_GUI variable
|
||||
sed -e s/NETGENPLUGIN_WITH_GUI=[a-z]*/NETGENPLUGIN_WITH_GUI=${NETGENPLUGIN_WITH_GUI}/g configure.ac > configure.tmp
|
||||
mv -f configure.tmp configure.ac
|
||||
|
||||
mkdir -p salome_adm/unix/config_files
|
||||
#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/* salome_adm/unix/config_files
|
||||
#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/pythonbe.py salome_adm/unix
|
||||
|
||||
cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
|
||||
|
||||
#cp -f ${GUI_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
|
||||
#cp -f ${MED_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
|
||||
#cp -f ${GEOM_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
|
||||
#cp -f ${SMESH_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
|
||||
|
||||
# remove KERNEL deprecated configure files
|
||||
#for deprecated in ac_cc_warnings.m4 ac_cxx_partial_specialization.m4 \
|
||||
# check_mico.m4 config.guess ltmain.sh ac_cxx_bool.m4 ltconfig ac_cxx_typename.m4 \
|
||||
# check_pthreads.m4 config.sub libtool.m4 ac_cxx_mutable.m4 missing
|
||||
# do
|
||||
# rm -f salome_adm/unix/config_files/${deprecated}
|
||||
# done
|
||||
|
||||
|
||||
# ____________________________________________________________________
|
||||
# aclocal creates the aclocal.m4 file from the standard macro and the
|
||||
# custom macro embedded in the directory salome_adm/unix/config_files
|
||||
# custom macro embedded in the directory adm_local/unix/config_files
|
||||
# and KERNEL config_files directory.
|
||||
# output:
|
||||
# aclocal.m4
|
||||
# autom4te.cache (directory)
|
||||
echo "====================================================== aclocal"
|
||||
echo "======================================================= aclocal"
|
||||
|
||||
if test ${NETGENPLUGIN_WITH_GUI} = yes; then
|
||||
if test -d "${GUI_ROOT_DIR}"; then
|
||||
aclocal -I adm_local/unix/config_files \
|
||||
-I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
|
||||
-I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
|
||||
@ -150,10 +106,10 @@ fi
|
||||
# version. The files are created in the directory specified with the
|
||||
# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
|
||||
# output:
|
||||
# salome_adm/unix/config_files/config.guess
|
||||
# salome_adm/unix/config_files/config.sub
|
||||
# salome_adm/unix/config_files/ltmain.sh
|
||||
#echo "====================================================== libtoolize"
|
||||
# adm_local/unix/config_files/config.guess
|
||||
# adm_local/unix/config_files/config.sub
|
||||
# adm_local/unix/config_files/ltmain.sh
|
||||
echo "==================================================== libtoolize"
|
||||
|
||||
libtoolize --force --copy --automake || exit 1
|
||||
|
||||
@ -173,11 +129,11 @@ autoconf
|
||||
# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
|
||||
# creates the Makefile.in files from the Makefile.am files.
|
||||
# output:
|
||||
# salome_adm/unix/config_files/compile
|
||||
# salome_adm/unix/config_files/depcomp
|
||||
# salome_adm/unix/config_files/install-sh
|
||||
# salome_adm/unix/config_files/missing
|
||||
# salome_adm/unix/config_files/py-compile
|
||||
# adm_local/unix/config_files/compile
|
||||
# adm_local/unix/config_files/depcomp
|
||||
# adm_local/unix/config_files/install-sh
|
||||
# adm_local/unix/config_files/missing
|
||||
# adm_local/unix/config_files/py-compile
|
||||
# Makefile.in (from Makefile.am)
|
||||
echo "====================================================== automake"
|
||||
|
||||
|
@ -1,35 +1,28 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is 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
|
||||
#
|
||||
|
||||
rm -rf autom4te.cache aclocal.m4 configure make_config
|
||||
find . -name "*~" -print -exec rm {} \;
|
||||
find . -name "*.pyc" -print -exec rm {} \;
|
||||
#exit
|
||||
# ==================== ON SORT AVANT
|
||||
|
||||
find bin -name Makefile.in | xargs rm -f
|
||||
find doc -name Makefile.in | xargs rm -f
|
||||
find idl -name Makefile.in | xargs rm -f
|
||||
find resources -name Makefile.in | xargs rm -f
|
||||
find salome_adm -name Makefile.in | xargs rm -f
|
||||
find src -name Makefile.in | xargs rm -f
|
||||
rm -f Makefile.in
|
||||
find . -name Makefile.in | xargs rm -f
|
||||
( cd adm_local/unix/config_files && rm -f config.* depcomp install-sh ltmain.sh missing py-compile )
|
||||
|
176
configure.ac
@ -1,24 +1,22 @@
|
||||
# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is 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
|
||||
#
|
||||
|
||||
# PLEASE DO NOT MODIFY configure.in FILE
|
||||
# ALL CHANGES WILL BE DISCARDED BY THE NEXT
|
||||
# build_configure COMMAND
|
||||
@ -31,14 +29,16 @@
|
||||
# Reorganization for usage of autotools
|
||||
# Created from configure.in.base
|
||||
#
|
||||
AC_INIT([Salome2 Project NETGENPLUGIN module], [5.1.0], [webmaster.salome@opencascade.com], [SalomeNETGENPLUGIN])
|
||||
AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
|
||||
AC_INIT([Salome2 Project NETGENPLUGIN module], [7.1.0], [webmaster.salome@opencascade.com], [SalomeNETGENPLUGIN])
|
||||
AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
|
||||
AC_CANONICAL_HOST
|
||||
AC_CANONICAL_TARGET
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_INIT_AUTOMAKE([-Wno-portability])
|
||||
|
||||
XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
|
||||
AC_SUBST(XVERSION)
|
||||
VERSION_DEV=0
|
||||
AC_SUBST(VERSION_DEV)
|
||||
|
||||
# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
|
||||
MODULE_NAME=netgenplugin
|
||||
@ -80,6 +80,7 @@ echo
|
||||
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_INSTALL
|
||||
AC_LOCAL_INSTALL
|
||||
dnl
|
||||
dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
|
||||
|
||||
@ -101,7 +102,7 @@ dnl Fix up the INSTALL macro if it s a relative path. We want the
|
||||
dnl full-path to the binary instead.
|
||||
case "$INSTALL" in
|
||||
*install-sh*)
|
||||
INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh
|
||||
INSTALL='\${KERNEL_ROOT_DIR}'/adm_local/unix/config_files/install-sh
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -161,7 +162,15 @@ dnl testing MPICH
|
||||
dnl ---------------------------------------------
|
||||
dnl
|
||||
|
||||
CHECK_MPICH
|
||||
dnl CHECK_MPICH
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo testing MPI
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
CHECK_MPI
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
@ -237,11 +246,34 @@ AC_SUBST_FILE(CORBA)
|
||||
corba=make_$ORB
|
||||
CORBA=adm_local/unix/$corba
|
||||
|
||||
NETGENPLUGIN_WITH_GUI=yes
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo Testing GUI
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
AM_CONDITIONAL(NETGENPLUGIN_ENABLE_GUI, [test "${NETGENPLUGIN_WITH_GUI}" = "yes"])
|
||||
CHECK_GUI_MODULE
|
||||
|
||||
if test "${NETGENPLUGIN_WITH_GUI}" = "yes"; then
|
||||
gui_ok=no
|
||||
if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then
|
||||
gui_ok=yes
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(NETGENPLUGIN_ENABLE_GUI, [test "${gui_ok}" = "yes"])
|
||||
|
||||
if test "${SalomeGUI_need}" == "yes"; then
|
||||
if test "${FullGUI_ok}" != "yes"; then
|
||||
AC_MSG_WARN(For configure NETGENPLUGIN module necessary full GUI!)
|
||||
fi
|
||||
elif test "${SalomeGUI_need}" == "auto"; then
|
||||
if test "${FullGUI_ok}" != "yes"; then
|
||||
AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
|
||||
fi
|
||||
elif test "${SalomeGUI_need}" == "no"; then
|
||||
echo Build without GUI option has been chosen
|
||||
fi
|
||||
|
||||
if test "${gui_ok}" = "yes"; then
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo testing openGL
|
||||
@ -257,36 +289,16 @@ if test "${NETGENPLUGIN_WITH_GUI}" = "yes"; then
|
||||
echo
|
||||
|
||||
CHECK_QT
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo testing VTK
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
CHECK_VTK
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo Testing GUI
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
CHECK_SALOME_GUI
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo Testing full GUI
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
CHECK_CORBA_IN_GUI
|
||||
if test "x${CORBA_IN_GUI}" != "xyes"; then
|
||||
echo "failed : For configure NETGENPLUGIN module necessary full GUI !"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo testing VTK
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
CHECK_VTK
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo testing HDF5
|
||||
@ -357,14 +369,17 @@ echo Summary
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
AM_CONDITIONAL(CMAKE_BUILD, false)
|
||||
#AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
|
||||
|
||||
echo Configure
|
||||
if test "${NETGENPLUGIN_WITH_GUI}" = "yes"; then
|
||||
variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok SMesh_ok Netgen_ok"
|
||||
fi
|
||||
if test "${NETGENPLUGIN_WITH_GUI}" = "no"; then
|
||||
variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok SMesh_ok Netgen_ok"
|
||||
|
||||
if test "${gui_ok}" = "yes"; then
|
||||
variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok gui_ok Geom_ok SMesh_ok Netgen_ok"
|
||||
elif test "${SalomeGUI_need}" != "no"; then
|
||||
variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok gui_ok Geom_ok SMesh_ok Netgen_ok"
|
||||
else
|
||||
variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok SMesh_ok Netgen_ok"
|
||||
fi
|
||||
|
||||
for var in $variables
|
||||
@ -385,6 +400,9 @@ else
|
||||
AC_SUBST(SETX) SETX="set -x"
|
||||
fi
|
||||
|
||||
dnl Build with SMESH cancel compute feature
|
||||
AC_DEFINE(WITH_SMESH_CANCEL_COMPUTE)
|
||||
|
||||
dnl copy shells and utilities contained in the bin directory
|
||||
dnl excluding .in files (treated in AC-OUTPUT below) and CVS
|
||||
dnl directory
|
||||
@ -400,23 +418,41 @@ echo
|
||||
# chmod +x ./bin/salome/*;
|
||||
#])
|
||||
|
||||
AC_HACK_LIBTOOL
|
||||
AC_CONFIG_COMMANDS([hack_libtool],[
|
||||
sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
|
||||
$(pwd)/hack_libtool \1 \"\$[@]\" \n\
|
||||
}\n\
|
||||
CC=\"hack_libtool\"%g" libtool
|
||||
sed -i "s%\(\s*\)for searchdir in \$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path; do%\1searchdirs=\"\$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path\"\n\1for searchdir in \$searchdirs; do%g" libtool
|
||||
sed -i "s%\(\s*\)searchdirs=\"\$newlib_search_path \$lib_search_path \(.*\)\"%\1searchdirs=\"\$newlib_search_path \$lib_search_path\"\n\1sss_beg=\"\"\n\1sss_end=\"\2\"%g" libtool
|
||||
sed -i "s%\(\s*\)\(for searchdir in \$searchdirs; do\)%\1for sss in \$searchdirs; do\n\1 if ! test -d \$sss; then continue; fi\n\1 ssss=\$(cd \$sss; pwd)\n\1 if test \"\$ssss\" != \"\" \&\& test -d \$ssss; then\n\1 case \$ssss in\n\1 /usr/lib | /usr/lib64 ) ;;\n\1 * ) sss_beg=\"\$sss_beg \$ssss\" ;;\n\1 esac\n\1 fi\n\1done\n\1searchdirs=\"\$sss_beg \$sss_end\"\n\1\2%g" libtool
|
||||
],[])
|
||||
|
||||
# This list is initiated using autoscan and must be updated manually
|
||||
# when adding a new file <filename>.in to manage. When you execute
|
||||
# autoscan, the Makefile list is generated in the output file configure.scan.
|
||||
# This could be helpfull to update de configuration.
|
||||
AC_OUTPUT([ \
|
||||
./salome_adm/unix/SALOMEconfig.h \
|
||||
./adm_local/Makefile \
|
||||
./adm_local/unix/Makefile \
|
||||
./adm_local/unix/config_files/Makefile \
|
||||
./bin/VERSION \
|
||||
./bin/Makefile \
|
||||
./NETGENPLUGIN_version.h \
|
||||
./src/Makefile \
|
||||
./src/GUI/Makefile \
|
||||
./src/NETGEN/Makefile \
|
||||
./src/NETGENPlugin/Makefile \
|
||||
./resources/Makefile \
|
||||
./idl/Makefile \
|
||||
adm_local/Makefile \
|
||||
adm_local/unix/Makefile \
|
||||
adm_local/unix/config_files/Makefile \
|
||||
bin/VERSION \
|
||||
bin/Makefile \
|
||||
NETGENPLUGIN_version.h \
|
||||
doc/Makefile \
|
||||
doc/salome/Makefile \
|
||||
doc/salome/examples/Makefile \
|
||||
doc/salome/gui/Makefile \
|
||||
doc/salome/gui/NETGENPLUGIN/Makefile \
|
||||
doc/salome/gui/NETGENPLUGIN/doxyfile \
|
||||
doc/salome/gui/NETGENPLUGIN/doxyfile_py \
|
||||
doc/salome/gui/NETGENPLUGIN/static/header.html \
|
||||
doc/salome/gui/NETGENPLUGIN/static/header_py.html \
|
||||
src/Makefile \
|
||||
src/GUI/Makefile \
|
||||
src/NETGENPlugin/Makefile \
|
||||
resources/Makefile \
|
||||
idl/Makefile \
|
||||
Makefile \
|
||||
])
|
||||
|
32
doc/Makefile.am
Normal file
@ -0,0 +1,32 @@
|
||||
# Copyright (C) 2007-2012 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
|
||||
#
|
||||
|
||||
# -* Makefile *-
|
||||
# Author : Patrick GOLDBRONN (CEA)
|
||||
# Date : 30/11/2001
|
||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
||||
# $Header$
|
||||
# source path
|
||||
#
|
||||
SUBDIRS = salome
|
||||
|
||||
usr_docs:
|
||||
(cd salome && $(MAKE) $(AM_MAKEFLAGS) usr_docs)
|
||||
|
||||
docs: usr_docs
|
34
doc/salome/Makefile.am
Normal file
@ -0,0 +1,34 @@
|
||||
# Copyright (C) 2007-2012 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
|
||||
#
|
||||
|
||||
# -* Makefile *-
|
||||
# Author : Patrick GOLDBRONN (CEA)
|
||||
# Date : 30/11/2001
|
||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
||||
# $Header:
|
||||
#
|
||||
SUBDIRS = examples gui
|
||||
SUBDIRSGUI = gui
|
||||
|
||||
usr_docs:
|
||||
@@SETX@; for d in $(SUBDIRSGUI); do \
|
||||
(cd $$d && $(MAKE) $@) || exit 1; \
|
||||
done;
|
||||
|
||||
docs: usr_docs
|
31
doc/salome/examples/Makefile.am
Normal file
@ -0,0 +1,31 @@
|
||||
# Copyright (C) 2007-2012 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 : Makefile
|
||||
# Author : Alexander KOVALEV (Open Cascade NN)
|
||||
# Modified by :
|
||||
# Module : doc
|
||||
#
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
pyexamplesdir = $(docdir)/examples/NETGENPLUGIN
|
||||
|
||||
pyexamples_SCRIPTS = netgendemo.py
|
||||
|
||||
EXTRA_DIST += $(pyexamples_SCRIPTS)
|
50
doc/salome/examples/netgendemo.py
Normal file
@ -0,0 +1,50 @@
|
||||
# 2d and 3d mesh generation with NETGEN
|
||||
|
||||
import salome
|
||||
salome.salome_init()
|
||||
import GEOM
|
||||
from salome.geom import geomBuilder
|
||||
geompy = geomBuilder.New(salome.myStudy)
|
||||
|
||||
import SMESH, SALOMEDS
|
||||
from salome.smesh import smeshBuilder
|
||||
smesh = smeshBuilder.New(salome.myStudy)
|
||||
|
||||
# create a box
|
||||
box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
|
||||
geompy.addToStudy(box, "Box")
|
||||
|
||||
|
||||
# 1. Create a triangular 2D mesh on the box with NETGEN_1D2D algorithm
|
||||
triaN = smesh.Mesh(box, "Box : triangular mesh by NETGEN_1D2D")
|
||||
|
||||
# create a Netgen_1D2D algorithm for solids
|
||||
algo2D = triaN.Triangle(smeshBuilder.NETGEN_1D2D)
|
||||
|
||||
# define hypotheses
|
||||
n12_params = algo2D.Parameters()
|
||||
|
||||
# define number of segments
|
||||
n12_params.SetNbSegPerEdge(19)
|
||||
|
||||
# define max element
|
||||
n12_params.SetMaxSize(300)
|
||||
|
||||
# 2. Create a tetrahedral mesh on the box with NETGEN_1D2D3D algorithm (full netgen)
|
||||
tetraN = smesh.Mesh(box, "Box : tetrahedrical mesh by NETGEN_1D2D3D")
|
||||
|
||||
# create a Netgen_1D2D3D algorithm for solids
|
||||
algo3D = tetraN.Tetrahedron(smeshBuilder.FULL_NETGEN)
|
||||
|
||||
# define hypotheses
|
||||
n123_params = algo3D.Parameters()
|
||||
|
||||
# define number of segments
|
||||
n123_params.SetNbSegPerEdge(11)
|
||||
|
||||
# define max element size
|
||||
n123_params.SetMaxSize(300)
|
||||
|
||||
# compute the meshes
|
||||
triaN.Compute()
|
||||
tetraN.Compute()
|
32
doc/salome/gui/Makefile.am
Normal file
@ -0,0 +1,32 @@
|
||||
# Copyright (C) 2007-2012 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 : Makefile.in
|
||||
# Author : Vasily Rusyaev (Open Cascade NN)
|
||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
||||
# Module : doc
|
||||
#
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
SUBDIRS = NETGENPLUGIN
|
||||
|
||||
usr_docs:
|
||||
(cd NETGENPLUGIN && $(MAKE) $(AM_MAKEFLAGS) usr_docs)
|
||||
|
||||
docs: usr_docs
|
77
doc/salome/gui/NETGENPLUGIN/CMakeLists.txt
Executable file
@ -0,0 +1,77 @@
|
||||
# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
|
||||
|
||||
SET(top_builddir ${CMAKE_BINARY_DIR})
|
||||
SET(top_srcdir ${CMAKE_SOURCE_DIR})
|
||||
SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
SET(builddir ${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET(datadir ${CMAKE_INSTALL_PREFIX}/share)
|
||||
SET(docdir ${datadir}/doc/salome)
|
||||
SET(guidocdir ${docdir}/gui/NETGENPLUGIN)
|
||||
|
||||
SALOME_CONFIGURE_FILE(doxyfile.in doxyfile)
|
||||
SALOME_CONFIGURE_FILE(doxyfile_py.in doxyfile_py)
|
||||
SALOME_CONFIGURE_FILE(static/header.html.in ${builddir}/static/header.html)
|
||||
SALOME_CONFIGURE_FILE(static/header_py.html.in ${builddir}/static/header_py.html)
|
||||
|
||||
SET(DOC_SMESH_MeshersList NETGENPlugin)
|
||||
SET(f "$(SMESH_ROOT_DIR)/bin/salome/collect_mesh_methods.py")
|
||||
IF(WINDOWS)
|
||||
STRING(REPLACE "/" "\\" f ${f})
|
||||
STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=${OMNIORB_ROOT_USER}/lib/x86_win32\;%PYTHONPATH%
|
||||
@SET PYTHONPATH=${OMNIORB_ROOT_USER}/lib/python\;%PYTHONPATH%
|
||||
@SET PATH=${OMNIORB_ROOT_USER}/lib/x86_win32\;%PATH%
|
||||
@SET PATH=$ENV{KERNEL_ROOT_DIR}/lib/salome\;%PATH%
|
||||
@SET PYTHONPATH=$ENV{KERNEL_ROOT_DIR}/bin/salome\;%PYTHONPATH%
|
||||
@SET PYTHONPATH=$ENV{KERNEL_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome\;%PYTHONPATH%
|
||||
@SET PYTHONPATH=$ENV{MED_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome\;%PYTHONPATH%
|
||||
@SET PYTHONPATH=$ENV{MED_ROOT_DIR}/bin/salome\;%PYTHONPATH%
|
||||
@SET PYTHONPATH=$ENV{GEOM_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome\;%PYTHONPATH%
|
||||
@SET PYTHONPATH=$ENV{GEOM_ROOT_DIR}/bin/salome\;%PYTHONPATH%
|
||||
@SET PYTHONPATH=$ENV{SMESH_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome\;%PYTHONPATH%
|
||||
@SET PYTHONPATH=$ENV{SMESH_ROOT_DIR}/bin/salome\;%PYTHONPATH%
|
||||
@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/salome\;%PYTHONPATH%
|
||||
@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}/bin/salome\;%PYTHONPATH%
|
||||
@SET SMESH_MeshersList=${DOC_SMESH_MeshersList}
|
||||
")
|
||||
SET(EXT "bat")
|
||||
SET(CALL_STR "call")
|
||||
ELSE(WINDOWS)
|
||||
SET(DOC_PYTHONPATH ${CMAKE_INSTALL_PREFIX}/bin/salome:${SMESH_ROOT_DIR}/bin/salome:${SMESH_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${MED_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${GEOM_ROOT_DIR}/bin/salome:${GEOM_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${KERNEL_ROOT_DIR}/bin/salome:${KERNEL_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${OMNIORB_ROOT_USER}/lib/python${PYTHON_VERSION}/site-packages:${OMNIORB_ROOT_USER}/lib64/python${PYTHON_VERSION}/site-packages)
|
||||
SET(DOC_LD_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/lib/salome:${SMESH_ROOT_DIR}/lib/salome:${MED_ROOT_DIR}/lib/salome:${GEOM_ROOT_DIR}/lib/salome:${KERNEL_ROOT_DIR}/lib/salome")
|
||||
SET(SCR "export PYTHONPATH=${DOC_PYTHONPATH}:\${PYTHONPATH}
|
||||
export LD_LIBRARY_PATH=${DOC_LD_LIBRARY_PATH}:\${LD_LIBRARY_PATH}
|
||||
export SMESH_MeshersList=${DOC_SMESH_MeshersList}
|
||||
")
|
||||
SET(EXT "sh")
|
||||
SET(CALL_STR ".")
|
||||
ENDIF(WINDOWS)
|
||||
|
||||
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/tmp_env.${EXT} "${SCR}")
|
||||
|
||||
ADD_CUSTOM_TARGET(usr_docs ${CALL_STR} ${CMAKE_CURRENT_BINARY_DIR}/tmp_env.${EXT} && ${PYTHON_EXECUTABLE} ${f} -d -o smesh.py NETGENPlugin
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.remove(r'''smesh.py'''); os.remove(r'''tmp_env.${EXT}''')"
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/NETGENPLUGIN''',True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''',r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/NETGENPLUGIN''', ignore=shutil.ignore_patterns('*usr_docs*', '*CMakeFiles*', '*.cmake', 'doxyfile*', '*.vcproj', 'static', 'Makefile*')); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''',r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/NETGENPLUGIN'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''',r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/NETGENPLUGIN/netgenpluginpy_doc''')"
|
||||
VERBATIM
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
63
doc/salome/gui/NETGENPLUGIN/Makefile.am
Executable file
@ -0,0 +1,63 @@
|
||||
# Copyright (C) 2007-2012 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 : Makefile.in
|
||||
# Author : Vasily Rusyaev (Open Cascade NN)
|
||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
||||
# Module : doc
|
||||
#
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
EXTRA_DIST += images input static/footer.html static/doxygen.css
|
||||
|
||||
guidocdir = $(docdir)/gui/NETGENPLUGIN
|
||||
guidoc_DATA = images/head.png
|
||||
|
||||
DOC_PYTHONPATH=$(prefix)/bin/salome:$(SMESH_ROOT_DIR)/bin/salome:$(SMESH_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(MED_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(GEOM_ROOT_DIR)/bin/salome:$(GEOM_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/bin/salome:$(KERNEL_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages
|
||||
DOC_SMESH_MeshersList=NETGENPlugin
|
||||
|
||||
usr_docs: doxyfile_py doxyfile
|
||||
@$(DOXYGEN) doxyfile_py ; \
|
||||
$(DOXYGEN) doxyfile
|
||||
|
||||
docs: usr_docs
|
||||
|
||||
clean-local:
|
||||
@for filen in `find . -maxdepth 1` ; do \
|
||||
case $${filen} in \
|
||||
./Makefile | ./doxyfile | ./doxyfile_py ) ;; \
|
||||
. | .. | ./static ) ;; \
|
||||
*) echo "Removing $${filen}" ; rm -rf $${filen} ;; \
|
||||
esac ; \
|
||||
done ;
|
||||
|
||||
install-data-local: usr_docs
|
||||
$(INSTALL) -d $(DESTDIR)$(docdir)/gui/NETGENPLUGIN
|
||||
@for filen in `find . -maxdepth 1` ; do \
|
||||
case $${filen} in \
|
||||
./Makefile | ./doxyfile | ./doxyfile_py ) ;; \
|
||||
./doxyfile.bak | ./doxyfile_py.bak ) ;; \
|
||||
. | .. | ./static ) ;; \
|
||||
*) echo "Installing $${filen}" ; cp -rp $${filen} $(DESTDIR)$(docdir)/gui/NETGENPLUGIN ;; \
|
||||
esac ; \
|
||||
done ;
|
||||
cp -rp $(srcdir)/images/head.png $(DESTDIR)$(docdir)/gui/NETGENPLUGIN/netgenpluginpy_doc ;
|
||||
|
||||
uninstall-local:
|
||||
rm -rf $(DESTDIR)$(docdir)/gui/NETGENPLUGIN
|
120
doc/salome/gui/NETGENPLUGIN/doxyfile.in
Executable file
@ -0,0 +1,120 @@
|
||||
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = "SALOME NETGENPLUGIN User's Guide"
|
||||
OUTPUT_DIRECTORY = .
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
TAB_SIZE = 5
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#Input related options
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = @srcdir@/input
|
||||
FILE_PATTERNS = *.doc
|
||||
EXCLUDE =
|
||||
IMAGE_PATH = @srcdir@/images
|
||||
EXAMPLE_PATH = @top_srcdir@/doc/salome/examples
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#HTML related options
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = .
|
||||
HTML_HEADER = @builddir@/static/header.html
|
||||
HTML_FOOTER = @srcdir@/static/footer.html
|
||||
HTML_STYLESHEET = @srcdir@/static/doxygen.css
|
||||
TOC_EXPAND = YES
|
||||
DISABLE_INDEX = NO
|
||||
GENERATE_TREEVIEW = YES
|
||||
TREEVIEW_WIDTH = 300
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool...
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = NO
|
||||
HIDE_UNDOC_RELATIONS = NO
|
||||
HAVE_DOT = NO
|
||||
CLASS_GRAPH = NO
|
||||
COLLABORATION_GRAPH = NO
|
||||
GROUP_GRAPHS = NO
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = NO
|
||||
INCLUDED_BY_GRAPH = NO
|
||||
CALL_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = NO
|
||||
DIRECTORY_GRAPH = NO
|
||||
DOT_IMAGE_FORMAT = jpg
|
||||
DOT_FONTNAME = Arial
|
||||
DOT_PATH =.
|
||||
DOTFILE_DIRS =.
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
MAX_DOT_GRAPH_HEIGHT = 1200
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
DOT_TRANSPARENT = NO
|
||||
DOT_MULTI_TARGETS = NO
|
||||
|
||||
|
||||
GENERATE_LEGEND = NO
|
||||
DOT_CLEANUP = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#SORT related options
|
||||
#---------------------------------------------------------------------------
|
||||
SORT_GROUP_NAMES = NO
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#LaTeX related option
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
EXTRA_PACKAGES = amsmath
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#RTF related options
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#External reference options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
#rnv: 07.04.2011 Workaround for the doxygen 1.7.3:
|
||||
#because it wrongly defines location of the html files for search.
|
||||
TAGFILES = netgenpluginpy_doc.tag=../NETGENPLUGIN/netgenpluginpy_doc
|
||||
SEARCHENGINE = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#Custom commands
|
||||
#---------------------------------------------------------------------------
|
||||
ALIASES += tui_script{1}="\include \1 <a href=\"../../examples/NETGENPLUGIN/\1\">Download this script</a>"
|
164
doc/salome/gui/NETGENPLUGIN/doxyfile_py.in
Executable file
@ -0,0 +1,164 @@
|
||||
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = "SALOME NETGENPLUGIN User's Guide"
|
||||
OUTPUT_DIRECTORY = .
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
USE_WINDOWS_ENCODING = NO
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ALWAYS_DETAILED_SEC = YES
|
||||
INLINE_INHERITED_MEMB = YES
|
||||
FULL_PATH_NAMES = NO
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = NO
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 5
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_JAVA = YES
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
SUBGROUPING = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = YES
|
||||
EXTRACT_STATIC = NO
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = YES
|
||||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = YES
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = NO
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
MAX_INITIALIZER_LINES = 25
|
||||
SHOW_USED_FILES = NO
|
||||
SHOW_DIRECTORIES = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = NO
|
||||
REFERENCES_RELATION = YES
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = NO
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#Input related options
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = @top_srcdir@/src/NETGENPlugin/NETGENPluginBuilder.py \
|
||||
@SMESH_ROOT_DIR@/lib/python@PYTHON_VERSION@/site-packages/salome/salome/smesh/smeshBuilder.py \
|
||||
@SMESH_ROOT_DIR@/lib/python@PYTHON_VERSION@/site-packages/salome/salome/smesh/smesh_algorithm.py
|
||||
FILE_PATTERNS =
|
||||
IMAGE_PATH = @srcdir@/images
|
||||
RECURSIVE = NO
|
||||
EXAMPLE_PATH =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#HTML related options
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = netgenpluginpy_doc
|
||||
HTML_HEADER = @builddir@/static/header_py.html
|
||||
HTML_FOOTER = @srcdir@/static/footer.html
|
||||
HTML_STYLESHEET = @srcdir@/static/doxygen.css
|
||||
TOC_EXPAND = YES
|
||||
DISABLE_INDEX = NO
|
||||
GENERATE_TREEVIEW = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#LaTeX related option
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#RTF related options
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = NO
|
||||
HIDE_UNDOC_RELATIONS = NO
|
||||
HAVE_DOT = YES
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = NO
|
||||
GROUP_GRAPHS = NO
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = YES
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_FONTNAME = Arial
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
MAX_DOT_GRAPH_DEPTH = 1000
|
||||
DOT_TRANSPARENT = NO
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = NO
|
||||
DOT_CLEANUP = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#External reference options
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_TAGFILE = netgenpluginpy_doc.tag
|
||||
SEARCHENGINE = YES
|
BIN
doc/salome/gui/NETGENPLUGIN/images/head.png
Executable file
After Width: | Height: | Size: 77 KiB |
BIN
doc/salome/gui/NETGENPLUGIN/images/image1.png
Executable file
After Width: | Height: | Size: 17 KiB |
BIN
doc/salome/gui/NETGENPLUGIN/images/image2.gif
Executable file
After Width: | Height: | Size: 4.6 KiB |
BIN
doc/salome/gui/NETGENPLUGIN/images/netgen2d3d.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
doc/salome/gui/NETGENPLUGIN/images/netgen2d3d_only.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
doc/salome/gui/NETGENPLUGIN/images/netgen2d3d_simple.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
doc/salome/gui/NETGENPLUGIN/images/netgen3d_local_size.png
Normal file
After Width: | Height: | Size: 16 KiB |
28
doc/salome/gui/NETGENPLUGIN/input/additional_hypo.doc
Normal file
@ -0,0 +1,28 @@
|
||||
/*!
|
||||
|
||||
\page additional_hypo_page Additional Hypotheses
|
||||
|
||||
\n <b>Additional Hypotheses</b> can be applied as a supplement to the
|
||||
main hypotheses, introducing additional concepts to mesh creation.
|
||||
|
||||
Following additional hypotheses can be used together with NETGEN algoritm:
|
||||
<ul>
|
||||
|
||||
<li><b>Quadrangle Preference</b> - This additional hypothesis can be used together with Netgen 2D algorithm.
|
||||
It allows Netgen 2D to build quadrangular meshes.</li>
|
||||
<br>
|
||||
This hypothesis has one restriction on its work: the total quantity of
|
||||
segments on all four sides of the face must be even (divisible by 2).
|
||||
|
||||
|
||||
<li><b>Viscous Layers</b> additional hypothesis can be used together with NETGEN 3D.
|
||||
This hypothesis allows creation of layers of highly stretched prisms near
|
||||
mesh boundary, which is beneficial for high quality viscous
|
||||
computations. The prisms constructed on the quadrangular mesh faces are
|
||||
actually the hexahedrons.</li>
|
||||
</ul>
|
||||
|
||||
For more detailed description of the described above hypothesis please refer SALOME Mesh User's Guide.
|
||||
*/
|
||||
|
||||
|
20
doc/salome/gui/NETGENPLUGIN/input/index.doc
Normal file
@ -0,0 +1,20 @@
|
||||
/*!
|
||||
|
||||
\mainpage Introduction to NETGENPLUGIN
|
||||
|
||||
\b NETGENPLUGIN plugin is destined for:
|
||||
- Meshing 1D, 2D and 3D geometric entities.
|
||||
- Faces are split into triangular elements.
|
||||
- Volumes are split into tetrahedral (pyramidal) elements.
|
||||
- Generating 3D meshes from 2D meshes, working without geometrical objects.
|
||||
|
||||
To manage parameters of the NETGENPLUGIN use \subpage netgen_2d_3d_hypo_page and \subpage additional_hypo_page.
|
||||
|
||||
Also all NETGENPLUGIN functionalities are accessible via
|
||||
\subpage netgenplugin_python_interface_page "NETGENPLUGIN Python interface".
|
||||
|
||||
\image html image1.png "Example of a triangular 2D mesh"
|
||||
|
||||
\image html image2.gif "Example of a tetrahedral 3D mesh"
|
||||
|
||||
*/
|
101
doc/salome/gui/NETGENPLUGIN/input/netgen_2d_3d_hypo.doc
Normal file
@ -0,0 +1,101 @@
|
||||
/*!
|
||||
|
||||
\page netgen_2d_3d_hypo_page Netgen 2D and 3D hypotheses
|
||||
|
||||
<b>Netgen 2D Parameters</b> and <b>Netgen 3D Parameters</b> hypotheses work only with
|
||||
<b>Netgen 1D-2D</b>, <b>Netgen 2D</b>, <b>Netgen 1D-2D-3D</b> and
|
||||
<b>Netgen 3D</b> algorithms. <b>Netgen 1D-2D</b> and <b>Netgen
|
||||
1D-2D-3D</b> algorithms do not require definition of lower-level
|
||||
hypotheses and algorithms (2D and 1D for meshing 3D objects and 1D for
|
||||
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>
|
||||
<br>
|
||||
|
||||
\image html netgen2d3d_only.png
|
||||
<center><em>Dialog boxes of <b>Netgen 2D</b> and <b>Netgen 3D</b>
|
||||
algorithms </em></center>
|
||||
|
||||
- <b>Name</b> - allows to define the name for the algorithm (Netgen
|
||||
2D (or 3D) Parameters by default).
|
||||
- <b>Max Size</b> - maximum linear dimensions for mesh cells.
|
||||
- <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.
|
||||
- <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.
|
||||
|
||||
\image html netgen3d_local_size.png
|
||||
|
||||
- <b>Local sizes</b> - allows to define size of elements on and
|
||||
around specified geometrical edges and vertices. To define the local
|
||||
size it is necessary to select a geometrical edge or vertex in the
|
||||
object browser or in the viewer, and to click <b>On Edge</b> or <b>On
|
||||
Vertex</b> correspondingly. <b>Name</b> of the geometrical object and
|
||||
a default <b>Value</b> will be added in the table where the
|
||||
<b>Value</b> can be changed.
|
||||
- <b>Remove</b> - deletes a selected row from the table.
|
||||
|
||||
\image html netgen2d3d_simple.png
|
||||
|
||||
<b>Netgen 2D simple parameters</b> and <b>Netgen 3D simple
|
||||
parameters</b> allow defining the size of elements for each
|
||||
dimension.
|
||||
|
||||
\b 1D group allows defining the size of 1D elements in either of two ways:
|
||||
- <b>Number of Segments</b> allows specifying number of segments, that
|
||||
will split each edge, with equidistant distribution.
|
||||
- <b>Local Length</b> can be applied for meshing of edges
|
||||
composing geometrical object. Definition of this hypothesis
|
||||
consists of setting required \b length of segments.
|
||||
|
||||
\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
|
||||
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 3D groups allows defining the size of 3D elements.
|
||||
- <b>Length from faces</b> if checked in, the area of sides of
|
||||
volumic elements will be equal to an average area of 2D elements, else
|
||||
- <b>Max. Element Volume</b> specifies expected maximum element volume
|
||||
of each 3d element.
|
||||
|
||||
\note Netgen algorithm does not strictly follow the input
|
||||
parameters. The actual mesh can be more or less dense than
|
||||
required. There are several factors in it:
|
||||
- NETGEN does not actually use "NbOfSegments" parameter for discretization of
|
||||
edge. This parameter is used only to define the local element size
|
||||
(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 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.
|
||||
|
||||
*/
|
||||
|
||||
|
@ -0,0 +1,19 @@
|
||||
/*!
|
||||
|
||||
\page netgenplugin_python_interface_page Python Interface
|
||||
|
||||
Python package NETGENPlugin defines several classes, destined for
|
||||
creation of the 2D and 3D meshes.
|
||||
|
||||
NETGEN meshing plugin dynamically adds several methods to the
|
||||
\ref SMESH_SWIG.smeshBuilder.Mesh "class Mesh" to create meshing algorithms.
|
||||
|
||||
Below you can see an example of usage of the NETGENPlugin package for mesh generation:
|
||||
|
||||
\anchor example_NETGENPlugin
|
||||
<h2>Example of 2d and 3d mesh generation with NETGEN:</h2>
|
||||
\tui_script{netgendemo.py}
|
||||
|
||||
*/
|
||||
|
||||
|
836
doc/salome/gui/NETGENPLUGIN/static/doxygen.css
Executable file
@ -0,0 +1,836 @@
|
||||
/* The standard CSS for doxygen */
|
||||
|
||||
body, table, div, p, dl {
|
||||
font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* @group Heading Levels */
|
||||
|
||||
h1 {
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.multicol {
|
||||
-moz-column-gap: 1em;
|
||||
-webkit-column-gap: 1em;
|
||||
-moz-column-count: 3;
|
||||
-webkit-column-count: 3;
|
||||
}
|
||||
|
||||
p.startli, p.startdd, p.starttd {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
p.endli {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
p.enddd {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
p.endtd {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
caption {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
span.legend {
|
||||
font-size: 70%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h3.version {
|
||||
font-size: 90%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.qindex, div.navtab{
|
||||
background-color: #EBEFF6;
|
||||
border: 1px solid #A3B4D7;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
div.qindex, div.navpath {
|
||||
width: 100%;
|
||||
line-height: 140%;
|
||||
}
|
||||
|
||||
div.navtab {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
/* @group Link Styling */
|
||||
|
||||
a {
|
||||
color: #3D578C;
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.contents a:visited {
|
||||
color: #4665A2;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a.qindex {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a.qindexHL {
|
||||
font-weight: bold;
|
||||
background-color: #9CAFD4;
|
||||
color: #ffffff;
|
||||
border: 1px double #869DCA;
|
||||
}
|
||||
|
||||
.contents a.qindexHL:visited {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
a.el {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a.elRef {
|
||||
}
|
||||
|
||||
a.code {
|
||||
color: #4665A2;
|
||||
}
|
||||
|
||||
a.codeRef {
|
||||
color: #4665A2;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
dl.el {
|
||||
margin-left: -1cm;
|
||||
}
|
||||
|
||||
.fragment {
|
||||
font-family: monospace, fixed;
|
||||
font-size: 105%;
|
||||
}
|
||||
|
||||
pre.fragment {
|
||||
border: 1px solid #C4CFE5;
|
||||
background-color: #FBFCFD;
|
||||
padding: 4px 6px;
|
||||
margin: 4px 8px 4px 2px;
|
||||
overflow: auto;
|
||||
word-wrap: break-word;
|
||||
font-size: 9pt;
|
||||
line-height: 125%;
|
||||
}
|
||||
|
||||
div.ah {
|
||||
background-color: black;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
margin-bottom: 3px;
|
||||
margin-top: 3px;
|
||||
padding: 0.2em;
|
||||
border: solid thin #333;
|
||||
border-radius: 0.5em;
|
||||
-webkit-border-radius: .5em;
|
||||
-moz-border-radius: .5em;
|
||||
box-shadow: 2px 2px 3px #999;
|
||||
-webkit-box-shadow: 2px 2px 3px #999;
|
||||
-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
|
||||
background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
|
||||
}
|
||||
|
||||
div.groupHeader {
|
||||
margin-left: 16px;
|
||||
margin-top: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.version {
|
||||
border:1px solid #0000FF;
|
||||
color: #CCCCCC;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 9pt;
|
||||
text-align: center;
|
||||
width:100px;
|
||||
-moz-border-radius: 8px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
div.footer1 {
|
||||
background-color: #DFE5F1;
|
||||
border: 1px solid #AAAAAA;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
padding: 10px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
|
||||
div.groupText {
|
||||
margin-left: 16px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
body {
|
||||
background: white;
|
||||
color: black;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.contents {
|
||||
margin-top: 10px;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
td.indexkey {
|
||||
background-color: #EBEFF6;
|
||||
font-weight: bold;
|
||||
border: 1px solid #C4CFE5;
|
||||
margin: 2px 0px 2px 0;
|
||||
padding: 2px 10px;
|
||||
}
|
||||
|
||||
td.indexvalue {
|
||||
background-color: #EBEFF6;
|
||||
border: 1px solid #C4CFE5;
|
||||
padding: 2px 10px;
|
||||
margin: 2px 0px;
|
||||
}
|
||||
|
||||
tr.memlist {
|
||||
background-color: #EEF1F7;
|
||||
}
|
||||
|
||||
p.formulaDsp {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
img.formulaDsp {
|
||||
|
||||
}
|
||||
|
||||
img.formulaInl {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.center {
|
||||
text-align: center;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
div.center img {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
address.footer {
|
||||
text-align: right;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
img.footer {
|
||||
border: 0px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* @group Code Colorization */
|
||||
|
||||
span.keyword {
|
||||
color: #008000
|
||||
}
|
||||
|
||||
span.keywordtype {
|
||||
color: #604020
|
||||
}
|
||||
|
||||
span.keywordflow {
|
||||
color: #e08000
|
||||
}
|
||||
|
||||
span.comment {
|
||||
color: #800000
|
||||
}
|
||||
|
||||
span.preprocessor {
|
||||
color: #806020
|
||||
}
|
||||
|
||||
span.stringliteral {
|
||||
color: #002080
|
||||
}
|
||||
|
||||
span.charliteral {
|
||||
color: #008080
|
||||
}
|
||||
|
||||
span.vhdldigit {
|
||||
color: #ff00ff
|
||||
}
|
||||
|
||||
span.vhdlchar {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
span.vhdlkeyword {
|
||||
color: #700070
|
||||
}
|
||||
|
||||
span.vhdllogic {
|
||||
color: #ff0000
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
/*
|
||||
.search {
|
||||
color: #003399;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
form.search {
|
||||
margin-bottom: 0px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
input.search {
|
||||
font-size: 75%;
|
||||
color: #000080;
|
||||
font-weight: normal;
|
||||
background-color: #e8eef2;
|
||||
}
|
||||
*/
|
||||
|
||||
td.tiny {
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
.dirtab {
|
||||
padding: 4px;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #A3B4D7;
|
||||
}
|
||||
|
||||
th.dirtab {
|
||||
background: #EBEFF6;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 0px;
|
||||
border: none;
|
||||
border-top: 1px solid #4A6AAA;
|
||||
}
|
||||
|
||||
hr.footer {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
/* @group Member Descriptions */
|
||||
|
||||
table.memberdecls {
|
||||
border-spacing: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.mdescLeft, .mdescRight,
|
||||
.memItemLeft, .memItemRight,
|
||||
.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
|
||||
background-color: #F9FAFC;
|
||||
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 #C4CFE5;
|
||||
}
|
||||
|
||||
.memItemLeft, .memTemplItemLeft {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.memTemplParams {
|
||||
color: #4665A2;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
/* @group Member Details */
|
||||
|
||||
/* Styles for detailed member documentation */
|
||||
|
||||
.memtemplate {
|
||||
font-size: 80%;
|
||||
color: #4665A2;
|
||||
font-weight: normal;
|
||||
margin-left: 9px;
|
||||
}
|
||||
|
||||
.memnav {
|
||||
background-color: #EBEFF6;
|
||||
border: 1px solid #A3B4D7;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
margin-right: 15px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.memitem {
|
||||
padding: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.memname {
|
||||
white-space: nowrap;
|
||||
font-weight: bold;
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.memproto {
|
||||
border-top: 1px solid #A8B8D9;
|
||||
border-left: 1px solid #A8B8D9;
|
||||
border-right: 1px solid #A8B8D9;
|
||||
padding: 6px 0px 6px 0px;
|
||||
color: #253555;
|
||||
font-weight: bold;
|
||||
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
|
||||
/* opera specific markup */
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
border-top-right-radius: 8px;
|
||||
border-top-left-radius: 8px;
|
||||
/* firefox specific markup */
|
||||
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
|
||||
-moz-border-radius-topright: 8px;
|
||||
-moz-border-radius-topleft: 8px;
|
||||
/* webkit specific markup */
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
-webkit-border-top-right-radius: 8px;
|
||||
-webkit-border-top-left-radius: 8px;
|
||||
background-image:url('nav_f.png');
|
||||
background-repeat:repeat-x;
|
||||
background-color: #E2E8F2;
|
||||
|
||||
}
|
||||
|
||||
.memdoc {
|
||||
border-bottom: 1px solid #A8B8D9;
|
||||
border-left: 1px solid #A8B8D9;
|
||||
border-right: 1px solid #A8B8D9;
|
||||
padding: 2px 5px;
|
||||
background-color: #FBFCFD;
|
||||
border-top-width: 0;
|
||||
/* opera specific markup */
|
||||
border-bottom-left-radius: 8px;
|
||||
border-bottom-right-radius: 8px;
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
/* firefox specific markup */
|
||||
-moz-border-radius-bottomleft: 8px;
|
||||
-moz-border-radius-bottomright: 8px;
|
||||
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
|
||||
background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7);
|
||||
/* webkit specific markup */
|
||||
-webkit-border-bottom-left-radius: 8px;
|
||||
-webkit-border-bottom-right-radius: 8px;
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7));
|
||||
}
|
||||
|
||||
.paramkey {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.paramtype {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.paramname {
|
||||
color: #602020;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.paramname em {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.params, .retval, .exception, .tparams {
|
||||
border-spacing: 6px 2px;
|
||||
}
|
||||
|
||||
.params .paramname, .retval .paramname {
|
||||
font-weight: bold;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.params .paramtype {
|
||||
font-style: italic;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.params .paramdir {
|
||||
font-family: "courier new",courier,monospace;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* @end */
|
||||
|
||||
/* @group Directory (tree) */
|
||||
|
||||
/* for the tree view */
|
||||
|
||||
.ftvtree {
|
||||
font-family: sans-serif;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/* these are for tree view when used as main index */
|
||||
|
||||
.directory {
|
||||
font-size: 9pt;
|
||||
font-weight: bold;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.directory h3 {
|
||||
margin: 0px;
|
||||
margin-top: 1em;
|
||||
font-size: 11pt;
|
||||
}
|
||||
|
||||
/*
|
||||
The following two styles can be used to replace the root node title
|
||||
with an image of your choice. Simply uncomment the next two styles,
|
||||
specify the name of your image and be sure to set 'height' to the
|
||||
proper pixel height of your image.
|
||||
*/
|
||||
|
||||
/*
|
||||
.directory h3.swap {
|
||||
height: 61px;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url("yourimage.gif");
|
||||
}
|
||||
.directory h3.swap span {
|
||||
display: none;
|
||||
}
|
||||
*/
|
||||
|
||||
.directory > h3 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.directory p {
|
||||
margin: 0px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.directory div {
|
||||
display: none;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.directory img {
|
||||
vertical-align: -30%;
|
||||
}
|
||||
|
||||
/* these are for tree view when not used as main index */
|
||||
|
||||
.directory-alt {
|
||||
font-size: 100%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.directory-alt h3 {
|
||||
margin: 0px;
|
||||
margin-top: 1em;
|
||||
font-size: 11pt;
|
||||
}
|
||||
|
||||
.directory-alt > h3 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.directory-alt p {
|
||||
margin: 0px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.directory-alt div {
|
||||
display: none;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.directory-alt img {
|
||||
vertical-align: -30%;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
div.dynheader {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
address {
|
||||
font-style: normal;
|
||||
color: #2A3D61;
|
||||
}
|
||||
|
||||
table.doxtable {
|
||||
border-collapse:collapse;
|
||||
}
|
||||
|
||||
table.doxtable td, table.doxtable th {
|
||||
border: 1px solid #2D4068;
|
||||
padding: 3px 7px 2px;
|
||||
}
|
||||
|
||||
table.doxtable th {
|
||||
background-color: #374F7F;
|
||||
color: #FFFFFF;
|
||||
font-size: 110%;
|
||||
padding-bottom: 4px;
|
||||
padding-top: 5px;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.tabsearch {
|
||||
top: 0px;
|
||||
left: 10px;
|
||||
height: 36px;
|
||||
background-image: url('tab_b.png');
|
||||
z-index: 101;
|
||||
overflow: hidden;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.navpath ul
|
||||
{
|
||||
font-size: 11px;
|
||||
background-image:url('tab_b.png');
|
||||
background-repeat:repeat-x;
|
||||
height:30px;
|
||||
line-height:30px;
|
||||
color:#8AA0CC;
|
||||
border:solid 1px #C2CDE4;
|
||||
overflow:hidden;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
.navpath li
|
||||
{
|
||||
list-style-type:none;
|
||||
float:left;
|
||||
padding-left:10px;
|
||||
padding-right:15px;
|
||||
background-image:url('bc_s.png');
|
||||
background-repeat:no-repeat;
|
||||
background-position:right;
|
||||
color:#364D7C;
|
||||
}
|
||||
|
||||
.navpath li.navelem a
|
||||
{
|
||||
height:32px;
|
||||
display:block;
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.navpath li.navelem a:hover
|
||||
{
|
||||
color:#6884BD;
|
||||
}
|
||||
|
||||
.navpath li.footer
|
||||
{
|
||||
list-style-type:none;
|
||||
float:right;
|
||||
padding-left:10px;
|
||||
padding-right:15px;
|
||||
background-image:none;
|
||||
background-repeat:no-repeat;
|
||||
background-position:right;
|
||||
color:#364D7C;
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
|
||||
div.summary
|
||||
{
|
||||
float: right;
|
||||
font-size: 8pt;
|
||||
padding-right: 5px;
|
||||
width: 50%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.summary a
|
||||
{
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.ingroups
|
||||
{
|
||||
font-size: 8pt;
|
||||
padding-left: 5px;
|
||||
width: 50%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.ingroups a
|
||||
{
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.header
|
||||
{
|
||||
background-image:url('nav_h.png');
|
||||
background-repeat:repeat-x;
|
||||
background-color: #F9FAFC;
|
||||
margin: 0px;
|
||||
border-bottom: 1px solid #C4CFE5;
|
||||
}
|
||||
|
||||
div.headertitle
|
||||
{
|
||||
padding: 5px 5px 5px 10px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 150%;
|
||||
font-weight: bold;
|
||||
margin: 10px 2px;
|
||||
}
|
||||
|
||||
dl
|
||||
{
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
|
||||
dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug
|
||||
{
|
||||
border-left:4px solid;
|
||||
padding: 0 0 0 6px;
|
||||
}
|
||||
|
||||
dl.note
|
||||
{
|
||||
border-color: #D0D000;
|
||||
}
|
||||
|
||||
dl.warning, dl.attention
|
||||
{
|
||||
border-color: #FF0000;
|
||||
}
|
||||
|
||||
dl.pre, dl.post, dl.invariant
|
||||
{
|
||||
border-color: #00D000;
|
||||
}
|
||||
|
||||
dl.deprecated
|
||||
{
|
||||
border-color: #505050;
|
||||
}
|
||||
|
||||
dl.todo
|
||||
{
|
||||
border-color: #00C0E0;
|
||||
}
|
||||
|
||||
dl.test
|
||||
{
|
||||
border-color: #3030E0;
|
||||
}
|
||||
|
||||
dl.bug
|
||||
{
|
||||
border-color: #C08050;
|
||||
}
|
||||
|
||||
#projectlogo
|
||||
{
|
||||
text-align: center;
|
||||
vertical-align: bottom;
|
||||
border-collapse: separate;
|
||||
}
|
||||
|
||||
#projectlogo img
|
||||
{
|
||||
border: 0px none;
|
||||
}
|
||||
|
||||
#projectname
|
||||
{
|
||||
background-color: #175783;
|
||||
border: 1px solid;
|
||||
height: 80px;
|
||||
background-repeat: no-repeat;
|
||||
/* font: 300% arial,sans-serif;*/
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#projectbrief
|
||||
{
|
||||
font: 120% arial,sans-serif;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#projectnumber
|
||||
{
|
||||
font: 50% arial,sans-serif;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#titlearea
|
||||
{
|
||||
background: url("head.png");
|
||||
background-color: #175783;
|
||||
border: 1px solid;
|
||||
height: 80px;
|
||||
background-repeat: no-repeat;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #5373B4;
|
||||
}
|
||||
|
12
doc/salome/gui/NETGENPLUGIN/static/footer.html
Executable file
@ -0,0 +1,12 @@
|
||||
<li class="footer"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer1">
|
||||
<div style="text-align: center;">
|
||||
Copyright © 2007-2012 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>
|
||||
|
22
doc/salome/gui/NETGENPLUGIN/static/header.html.in
Executable file
@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>$title</title>
|
||||
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="$relpath^jquery.js"></script>
|
||||
<script type="text/javascript" src="$relpath^dynsections.js"></script>
|
||||
$treeview
|
||||
$search
|
||||
$mathjax
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="$relpath$doxygen.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body onload='searchBox.OnSelectItem(0);'>
|
||||
<div id="top"><!-- do not remove this div! -->
|
||||
<div id="titlearea"><div align="right"><div class="version">Version: @VERSION@</div></div></div>
|
||||
|
||||
</div>
|
23
doc/salome/gui/NETGENPLUGIN/static/header_py.html.in
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>$title</title>
|
||||
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="$relpath^jquery.js"></script>
|
||||
<script type="text/javascript" src="$relpath^dynsections.js"></script>
|
||||
$treeview
|
||||
$search
|
||||
$mathjax
|
||||
<script type="text/javascript">
|
||||
$(document).ready(initResizable);
|
||||
</script>
|
||||
<link href="$relpath$doxygen.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body onload='searchBox.OnSelectItem(0);'>
|
||||
<div id="top"><!-- do not remove this div! -->
|
||||
<div id="titlearea"><div align="right"><div class="version">Version: @VERSION@</div></div></div>
|
||||
<div align="bottom-left"><a href=../index.html>Home</a></div>
|
||||
|
||||
</div>
|
@ -1,24 +1,22 @@
|
||||
# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is 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
|
||||
#
|
||||
|
||||
# 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
|
||||
@ -28,6 +26,8 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
BASEIDL_FILES= NETGENPlugin_Algorithm.idl
|
||||
|
||||
BASEIDL_FILES_PY=$(BASEIDL_FILES:%.idl=%_idl.py)
|
||||
|
||||
# This variable defines the files to be installed
|
||||
dist_salomeidl_DATA = $(BASEIDL_FILES)
|
||||
|
||||
@ -46,7 +46,6 @@ libSalomeIDLNETGENPLUGIN_la_CPPFLAGS = \
|
||||
$(SMESH_CXXFLAGS) \
|
||||
@CORBA_CXXFLAGS@ \
|
||||
@CORBA_INCLUDES@ \
|
||||
-I$(top_builddir)/salome_adm/unix \
|
||||
-I$(top_builddir)/idl
|
||||
|
||||
libSalomeIDLNETGENPLUGIN_la_LDFLAGS = -no-undefined -version-info=0:0:0
|
||||
@ -71,8 +70,7 @@ IDLCXXFLAGS = \
|
||||
-I$(top_builddir)/idl/salome \
|
||||
-I$(KERNEL_ROOT_DIR)/idl/salome \
|
||||
-I$(GEOM_ROOT_DIR)/idl/salome \
|
||||
-I$(SMESH_ROOT_DIR)/idl/salome \
|
||||
-I$(top_builddir)/salome_adm/unix
|
||||
-I$(SMESH_ROOT_DIR)/idl/salome
|
||||
IDLPYFLAGS = \
|
||||
@IDLPYFLAGS@ \
|
||||
-I$(KERNEL_ROOT_DIR)/idl/salome \
|
||||
@ -92,9 +90,15 @@ install-exec-local: $(BASEIDL_FILES:%=$(top_srcdir)/idl/%)
|
||||
$(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
|
||||
done
|
||||
|
||||
# uninstall-local removes too much, but it works in distcheck
|
||||
# we want to remove only staff generated for IDL files and nothing more
|
||||
uninstall-local:
|
||||
rm -rf $(DESTDIR)$(salomepythondir)/*
|
||||
@for modulen in NETGENPlugin ; do \
|
||||
test -d $(DESTDIR)$(salomepythondir)/$${modulen} && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen} ; \
|
||||
test -d $(DESTDIR)$(salomepythondir)/$${modulen}__POA && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}__POA" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen}__POA ; \
|
||||
done ; \
|
||||
for filen in $(BASEIDL_FILES_PY) ; do \
|
||||
echo "Removing $(DESTDIR)$(salomepythondir)/$${filen}" && rm -f $(DESTDIR)$(salomepythondir)/$${filen}* ; \
|
||||
done
|
||||
|
||||
mostlyclean-local:
|
||||
-rm -f *.hh *.cc .depidl
|
||||
@ -108,7 +112,7 @@ mostlyclean-local:
|
||||
@for dep in $^ dummy; do \
|
||||
if [ $$dep != "dummy" ]; then \
|
||||
echo Building dependencies for $$dep; \
|
||||
$(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome -I$(GEOM_ROOT_DIR)/idl/salome -I$(SMESH_ROOT_DIR)/idl/salome -I$(top_builddir)/salome_adm/unix $$dep 2>/dev/null | \
|
||||
$(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome -I$(GEOM_ROOT_DIR)/idl/salome -I$(SMESH_ROOT_DIR)/idl/salome $$dep 2>/dev/null | \
|
||||
sed 's/\.o/\SK.cc/' >>$@; \
|
||||
fi; \
|
||||
done ;
|
||||
|
@ -1,39 +1,41 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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 : NETGENPlugin_Algorithm.idl
|
||||
// Author : Julia DOROVSKIKH
|
||||
// $Header$
|
||||
//
|
||||
#ifndef _SMESH_NETGENALGORITHM_IDL_
|
||||
#define _SMESH_NETGENALGORITHM_IDL_
|
||||
|
||||
#include "SALOME_Exception.idl"
|
||||
#include "SMESH_Hypothesis.idl"
|
||||
#include "GEOM_Gen.idl"
|
||||
|
||||
/*!
|
||||
* NETGENPlugin: interfaces to NETGEN related hypotheses and algorithms
|
||||
*/
|
||||
module NETGENPlugin
|
||||
{
|
||||
typedef sequence<string> string_array;
|
||||
/*!
|
||||
* NETGENPlugin_NETGEN_3D: interface of "Tetrahedron (Netgen)" algorithm
|
||||
*/
|
||||
@ -72,6 +74,9 @@ module NETGENPlugin
|
||||
void SetMaxSize(in double value);
|
||||
double GetMaxSize();
|
||||
|
||||
void SetMinSize(in double value);
|
||||
double GetMinSize();
|
||||
|
||||
void SetSecondOrder(in boolean value);
|
||||
boolean GetSecondOrder();
|
||||
|
||||
@ -89,6 +94,15 @@ module NETGENPlugin
|
||||
|
||||
void SetNbSegPerRadius(in double value);
|
||||
double GetNbSegPerRadius();
|
||||
|
||||
void SetQuadAllowed(in boolean value);
|
||||
boolean GetQuadAllowed();
|
||||
|
||||
void SetLocalSizeOnShape(in GEOM::GEOM_Object GeomObj, in double localSize);
|
||||
void SetLocalSizeOnEntry(in string entry, in double localSize);
|
||||
double GetLocalSizeOnEntry(in string entry);
|
||||
string_array GetLocalSizeEntries();
|
||||
void UnsetLocalSizeOnEntry(in string entry);
|
||||
};
|
||||
|
||||
/*!
|
||||
@ -96,8 +110,20 @@ module NETGENPlugin
|
||||
*/
|
||||
interface NETGENPlugin_Hypothesis_2D : NETGENPlugin_Hypothesis
|
||||
{
|
||||
void SetQuadAllowed(in boolean value);
|
||||
boolean GetQuadAllowed();
|
||||
};
|
||||
|
||||
/*!
|
||||
* interface of "NETGEN 2D parameters" hypothesis used by NETGENPlugin_NETGEN_2D_ONLY algoritm
|
||||
*/
|
||||
interface NETGENPlugin_Hypothesis_2D_ONLY : NETGENPlugin_Hypothesis_2D
|
||||
{
|
||||
};
|
||||
|
||||
/*!
|
||||
* interface of "NETGEN 3D parameters" hypothesis used by NETGENPlugin_NETGEN_3D algorithm
|
||||
*/
|
||||
interface NETGENPlugin_Hypothesis_3D : NETGENPlugin_Hypothesis
|
||||
{
|
||||
};
|
||||
|
||||
/*!
|
||||
@ -139,6 +165,15 @@ module NETGENPlugin
|
||||
* Can be zero in case of LengthFromEdges()
|
||||
*/
|
||||
double GetMaxElementArea();
|
||||
|
||||
/*!
|
||||
* Enables/disables generation of quadrangular faces
|
||||
*/
|
||||
void SetAllowQuadrangles(in boolean toAllow);
|
||||
/*!
|
||||
* Returns true if generation of quadrangular faces is enabled
|
||||
*/
|
||||
boolean GetAllowQuadrangles();
|
||||
};
|
||||
|
||||
/*!
|
||||
|
@ -1,24 +1,22 @@
|
||||
# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is 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
|
||||
#
|
||||
|
||||
# -* Makefile *-
|
||||
# Author : Patrick GOLDBRONN (CEA)
|
||||
# Date : 28/06/2001
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?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-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
|
||||
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
@ -41,6 +41,14 @@
|
||||
label-id="NETGEN 2D Parameters"
|
||||
icon-id="mesh_hypo_netgen_2d.png"
|
||||
dim="2"/>
|
||||
<hypothesis type="NETGEN_Parameters_3D"
|
||||
label-id="NETGEN 3D Parameters"
|
||||
icon-id="mesh_hypo_netgen.png"
|
||||
dim="3"/>
|
||||
<hypothesis type="NETGEN_Parameters_2D_ONLY"
|
||||
label-id="NETGEN 2D Parameters"
|
||||
icon-id="mesh_hypo_netgen_2d.png"
|
||||
dim="2"/>
|
||||
<hypothesis type="NETGEN_SimpleParameters_2D"
|
||||
label-id="NETGEN 2D Simple Parameters"
|
||||
icon-id="mesh_hypo_netgen_2d.png"
|
||||
@ -54,33 +62,66 @@
|
||||
<algorithm type="NETGEN_3D"
|
||||
label-id="Tetrahedron (Netgen)"
|
||||
icon-id="mesh_algo_tetra.png"
|
||||
hypos="MaxElementVolume"
|
||||
hypos="MaxElementVolume,NETGEN_Parameters_3D"
|
||||
opt-hypos="ViscousLayers"
|
||||
need-geom="false"
|
||||
input="TRIA,QUAD"
|
||||
dim="3"/>
|
||||
dim="3">
|
||||
<python-wrap>
|
||||
<algo>NETGEN_3D=Tetrahedron()</algo>
|
||||
<hypo>MaxElementVolume=MaxElementVolume(SetMaxElementVolume())</hypo>
|
||||
<hypo>NETGEN_Parameters_3D=Parameters()</hypo>
|
||||
<hypo>ViscousLayers=ViscousLayers(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreFaces())</hypo>
|
||||
</python-wrap>
|
||||
</algorithm>
|
||||
|
||||
<algorithm type="NETGEN_2D_ONLY"
|
||||
label-id="Netgen 2D"
|
||||
icon-id="mesh_algo_netgen_2d.png"
|
||||
hypos="LengthFromEdges,MaxElementArea,NETGEN_Parameters_2D_ONLY"
|
||||
opt-hypos="QuadranglePreference,ViscousLayers2D"
|
||||
input="EDGE"
|
||||
output="TRIA,QUAD"
|
||||
dim="2">
|
||||
<python-wrap>
|
||||
<algo>NETGEN_2D_ONLY=Triangle(algo=smeshBuilder.NETGEN_2D)</algo>
|
||||
<hypo>LengthFromEdges=LengthFromEdges()</hypo>
|
||||
<hypo>MaxElementArea=MaxElementArea(SetMaxElementArea())</hypo>
|
||||
<hypo>NETGEN_Parameters_2D_ONLY=Parameters()</hypo>
|
||||
<hypo>QuadranglePreference=SetQuadAllowed()</hypo>
|
||||
<hypo>ViscousLayers2D=ViscousLayers2D(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreEdges())</hypo>
|
||||
</python-wrap>
|
||||
</algorithm>
|
||||
|
||||
<algorithm type="NETGEN_2D"
|
||||
label-id="Netgen 1D-2D"
|
||||
icon-id="mesh_algo_netgen_2d.png"
|
||||
hypos="NETGEN_Parameters_2D, NETGEN_SimpleParameters_2D"
|
||||
opt-hypos="ViscousLayers2D"
|
||||
output="TRIA,QUAD"
|
||||
dim="2"
|
||||
support-submeshes="true"
|
||||
/>
|
||||
support-submeshes="true">
|
||||
<python-wrap>
|
||||
<algo>NETGEN_2D=Triangle(algo=smeshBuilder.NETGEN_1D2D)</algo>
|
||||
<hypo>NETGEN_Parameters_2D=Parameters()</hypo>
|
||||
<hypo>NETGEN_SimpleParameters_2D=Parameters(smesh.SIMPLE)</hypo>
|
||||
<hypo>ViscousLayers2D=ViscousLayers2D(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreEdges())</hypo>
|
||||
</python-wrap>
|
||||
</algorithm>
|
||||
|
||||
<algorithm type="NETGEN_2D3D"
|
||||
label-id="Netgen 1D-2D-3D"
|
||||
icon-id="mesh_algo_netgen_2d3d.png"
|
||||
hypos="NETGEN_Parameters, NETGEN_SimpleParameters_3D"
|
||||
dim="3"
|
||||
support-submeshes="true"
|
||||
/>
|
||||
<algorithm type="NETGEN_2D_ONLY"
|
||||
label-id="Netgen 2D"
|
||||
icon-id="mesh_algo_netgen_2d.png"
|
||||
hypos="LengthFromEdges,MaxElementArea"
|
||||
opt-hypos="QuadranglePreference"
|
||||
input="EDGE"
|
||||
output="TRIA,QUAD"
|
||||
dim="2"/>
|
||||
support-submeshes="true">
|
||||
<python-wrap>
|
||||
<algo>NETGEN_2D3D=Tetrahedron(algo=smeshBuilder.NETGEN_1D2D3D)</algo>
|
||||
<hypo>NETGEN_Parameters=Parameters()</hypo>
|
||||
<hypo>NETGEN_SimpleParameters_3D=Parameters(smesh.SIMPLE)</hypo>
|
||||
</python-wrap>
|
||||
</algorithm>
|
||||
|
||||
</algorithms>
|
||||
</meshers-group>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
|
||||
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
@ -29,4 +29,7 @@
|
||||
<!-- Default SMESH module plugins -->
|
||||
<parameter name="plugins" value="NETGENPlugin,GHS3DPlugin"/>
|
||||
</section>
|
||||
<section name="smesh_help">
|
||||
<parameter name="Plug-ins/NETGEN plugin User's Guide" value="${NETGENPLUGIN_ROOT_DIR}/share/doc/salome/gui/NETGENPLUGIN/index.html"/>
|
||||
</section>
|
||||
</document>
|
||||
|
@ -1,24 +1,22 @@
|
||||
# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is 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 : Makefile.in
|
||||
# Author : Michael Sazonov
|
||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
||||
@ -51,8 +49,9 @@ nodist_libNETGENPluginGUI_la_SOURCES= \
|
||||
# additionnal information to compil and link file
|
||||
|
||||
libNETGENPluginGUI_la_CPPFLAGS = \
|
||||
$(QT_INCLUDES) \
|
||||
$(CAS_CPPFLAGS) \
|
||||
$(NETGEN_INCLUDES) \
|
||||
$(QT_INCLUDES) \
|
||||
$(PYTHON_INCLUDES) \
|
||||
$(KERNEL_CXXFLAGS) \
|
||||
$(GUI_CXXFLAGS) \
|
||||
@ -63,16 +62,19 @@ libNETGENPluginGUI_la_CPPFLAGS = \
|
||||
$(CORBA_CXXFLAGS) \
|
||||
$(CORBA_INCLUDES) \
|
||||
-I$(srcdir)/../NETGENPlugin \
|
||||
-I$(top_builddir)/idl \
|
||||
-I$(top_builddir)/salome_adm/unix
|
||||
-I$(top_builddir)/idl
|
||||
|
||||
libNETGENPluginGUI_la_LDFLAGS = \
|
||||
../../idl/libSalomeIDLNETGENPLUGIN.la \
|
||||
../NETGENPlugin/libNETGENEngine.la \
|
||||
${SMESH_LDFLAGS} -lSMESH \
|
||||
${QT_MT_LIBS} \
|
||||
${GUI_LDFLAGS} -lSalomeApp -lqtx -lsuit -lSalomeObject -lLightApp \
|
||||
${SMESH_LDFLAGS} -lSMESH -lGeomSelectionTools \
|
||||
$(CAS_KERNEL)
|
||||
|
||||
# resources files
|
||||
nodist_salomeres_DATA= \
|
||||
NETGENPlugin_images.qm \
|
||||
NETGENPlugin_msg_en.qm
|
||||
NETGENPlugin_msg_en.qm \
|
||||
NETGENPlugin_msg_fr.qm
|
||||
|
||||
|
@ -1,24 +1,25 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin GUI: GUI for plugged-in mesher NETGENPlugin
|
||||
// File : NETGENPluginGUI.cxx
|
||||
// Author : Michael Zorin
|
||||
@ -40,11 +41,18 @@ extern "C"
|
||||
SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator( const QString& aHypType )
|
||||
{
|
||||
SMESHGUI_GenericHypothesisCreator* aCreator = NULL;
|
||||
if( aHypType=="NETGEN_Parameters_2D" || aHypType=="NETGEN_Parameters" )
|
||||
if( aHypType=="NETGEN_Parameters_2D" || // 1D-2D
|
||||
aHypType=="NETGEN_Parameters" || // 1D-2D-3D
|
||||
aHypType=="NETGEN_Parameters_2D_ONLY" || // 2D
|
||||
aHypType=="NETGEN_Parameters_3D" ) // 3D
|
||||
{
|
||||
aCreator = new NETGENPluginGUI_HypothesisCreator( aHypType );
|
||||
}
|
||||
else if ( aHypType=="NETGEN_SimpleParameters_2D" ||
|
||||
aHypType=="NETGEN_SimpleParameters_3D" )
|
||||
{
|
||||
aCreator = new NETGENPluginGUI_SimpleCreator( aHypType );
|
||||
}
|
||||
return aCreator;
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +1,22 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is 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
|
||||
//
|
||||
|
||||
// NETGENPlugin GUI: GUI for plugged-in mesher NETGENPlugin
|
||||
// File : NETGENPluginGUI.h
|
||||
// Author : Alexander A. BORODIN
|
||||
@ -26,7 +24,7 @@
|
||||
// $Header:
|
||||
//
|
||||
#ifdef WIN32
|
||||
#ifdef NETGENPLUGIN_GUI_EXPORTS
|
||||
#if defined NETGENPLUGIN_GUI_EXPORTS || defined NETGENPluginGUI_EXPORTS
|
||||
#define NETGENPLUGIN_GUI_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
#define NETGENPLUGIN_GUI_EXPORT __declspec( dllimport )
|
||||
|
@ -1,35 +1,36 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin GUI: GUI for plugged-in mesher NETGENPlugin
|
||||
// File : NETGENPluginGUI_HypothesisCreator.cxx
|
||||
// Author : Michael Zorin
|
||||
// Module : NETGENPlugin
|
||||
// $Header:
|
||||
//
|
||||
#include "NETGENPluginGUI_HypothesisCreator.h"
|
||||
|
||||
#include <SMESHGUI_Utils.h>
|
||||
#include <SMESHGUI_HypothesesUtils.h>
|
||||
#include <SMESHGUI.h>
|
||||
#include <SMESHGUI_SpinBox.h>
|
||||
#include <GeomSelectionTools.h>
|
||||
|
||||
#include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm)
|
||||
|
||||
@ -37,8 +38,8 @@
|
||||
#include <SUIT_ResourceMgr.h>
|
||||
|
||||
#include <SalomeApp_Tools.h>
|
||||
|
||||
#include <SalomeApp_DoubleSpinBox.h>
|
||||
#include <LightApp_SelectionMgr.h>
|
||||
#include <SALOME_ListIteratorOfListIO.hxx>
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QLabel>
|
||||
@ -48,21 +49,49 @@
|
||||
#include <QLineEdit>
|
||||
#include <QCheckBox>
|
||||
#include <QPixmap>
|
||||
#include <QTableWidget>
|
||||
#include <QHeaderView>
|
||||
#include <QPushButton>
|
||||
|
||||
enum Fineness
|
||||
{
|
||||
VeryCoarse,
|
||||
Coarse,
|
||||
Moderate,
|
||||
Fine,
|
||||
VeryFine,
|
||||
UserDefined
|
||||
};
|
||||
enum Fineness
|
||||
{
|
||||
VeryCoarse,
|
||||
Coarse,
|
||||
Moderate,
|
||||
Fine,
|
||||
VeryFine,
|
||||
UserDefined
|
||||
};
|
||||
|
||||
enum {
|
||||
STD_TAB = 0,
|
||||
LSZ_TAB
|
||||
};
|
||||
|
||||
enum {
|
||||
LSZ_ENTRY_COLUMN = 0,
|
||||
LSZ_NAME_COLUMN,
|
||||
LSZ_LOCALSIZE_COLUMN,
|
||||
LSZ_NB_COLUMNS
|
||||
};
|
||||
|
||||
enum {
|
||||
LSZ_BTNS = 0,
|
||||
LSZ_VERTEX_BTN,
|
||||
LSZ_EDGE_BTN,
|
||||
LSZ_FACE_BTN,
|
||||
LSZ_SEPARATOR2,
|
||||
LSZ_REMOVE_BTN
|
||||
};
|
||||
|
||||
NETGENPluginGUI_HypothesisCreator::NETGENPluginGUI_HypothesisCreator( const QString& theHypType )
|
||||
: SMESHGUI_GenericHypothesisCreator( theHypType ),
|
||||
myIs2D(false)
|
||||
: SMESHGUI_GenericHypothesisCreator( theHypType )
|
||||
{
|
||||
myGeomSelectionTools = NULL;
|
||||
myLocalSizeMap.clear();
|
||||
myIs2D = ( theHypType.startsWith("NETGEN_Parameters_2D"));
|
||||
myIsONLY = ( theHypType == "NETGEN_Parameters_2D_ONLY" ||
|
||||
theHypType == "NETGEN_Parameters_3D");
|
||||
}
|
||||
|
||||
NETGENPluginGUI_HypothesisCreator::~NETGENPluginGUI_HypothesisCreator()
|
||||
@ -75,12 +104,19 @@ bool NETGENPluginGUI_HypothesisCreator::checkParams(QString& msg) const
|
||||
readParamsFromHypo( data_old );
|
||||
readParamsFromWidgets( data_new );
|
||||
bool res = storeParamsToHypo( data_new );
|
||||
storeParamsToHypo( data_old );
|
||||
//storeParamsToHypo( data_old ); -- issue 0021364: Dump of netgen parameters has duplicate lines
|
||||
|
||||
res = myMaxSize->isValid(msg,true) && res;
|
||||
res = myMinSize->isValid(msg,true) && res;
|
||||
res = myGrowthRate->isValid(msg,true) && res; ;
|
||||
res = myNbSegPerEdge->isValid(msg,true) && res;
|
||||
res = myNbSegPerRadius->isValid(msg,true) && res;
|
||||
if ( myNbSegPerEdge )
|
||||
res = myNbSegPerEdge->isValid(msg,true) && res;
|
||||
if ( myNbSegPerRadius )
|
||||
res = myNbSegPerRadius->isValid(msg,true) && res;
|
||||
|
||||
if ( !res ) // -- issue 0021364: Dump of netgen parameters has duplicate lines
|
||||
storeParamsToHypo( data_old );
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -92,8 +128,12 @@ QFrame* NETGENPluginGUI_HypothesisCreator::buildFrame()
|
||||
lay->setMargin( 5 );
|
||||
lay->setSpacing( 0 );
|
||||
|
||||
QGroupBox* GroupC1 = new QGroupBox( tr( "SMESH_ARGUMENTS" ), fr );
|
||||
lay->addWidget( GroupC1 );
|
||||
QTabWidget* tab = new QTabWidget( fr );
|
||||
tab->setTabShape( QTabWidget::Rounded );
|
||||
tab->setTabPosition( QTabWidget::North );
|
||||
lay->addWidget( tab );
|
||||
QWidget* GroupC1 = new QWidget();
|
||||
tab->insertTab( STD_TAB, GroupC1, tr( "SMESH_ARGUMENTS" ) );
|
||||
|
||||
QGridLayout* aGroupLayout = new QGridLayout( GroupC1 );
|
||||
aGroupLayout->setSpacing( 6 );
|
||||
@ -105,23 +145,31 @@ QFrame* NETGENPluginGUI_HypothesisCreator::buildFrame()
|
||||
{
|
||||
aGroupLayout->addWidget( new QLabel( tr( "SMESH_NAME" ), GroupC1 ), row, 0 );
|
||||
myName = new QLineEdit( GroupC1 );
|
||||
myName->setMinimumWidth(160);
|
||||
aGroupLayout->addWidget( myName, row, 1 );
|
||||
row++;
|
||||
}
|
||||
|
||||
aGroupLayout->addWidget( new QLabel( tr( "NETGEN_MAX_SIZE" ), GroupC1 ), row, 0 );
|
||||
myMaxSize = new SalomeApp_DoubleSpinBox( GroupC1 );
|
||||
myMaxSize->setDecimals( 7 );
|
||||
myMaxSize->setMinimum( 1e-07 );
|
||||
myMaxSize->setMaximum( 1e+06 );
|
||||
myMaxSize->setSingleStep( 10 );
|
||||
myMaxSize = new SMESHGUI_SpinBox( GroupC1 );
|
||||
myMaxSize->RangeStepAndValidator( 1e-07, 1e+06, 10., "length_precision" );
|
||||
aGroupLayout->addWidget( myMaxSize, row, 1 );
|
||||
row++;
|
||||
|
||||
mySecondOrder = new QCheckBox( tr( "NETGEN_SECOND_ORDER" ), GroupC1 );
|
||||
aGroupLayout->addWidget( mySecondOrder, row, 0 );
|
||||
|
||||
aGroupLayout->addWidget( new QLabel( tr( "NETGEN_MIN_SIZE" ), GroupC1 ), row, 0 );
|
||||
myMinSize = new SMESHGUI_SpinBox( GroupC1 );
|
||||
myMinSize->RangeStepAndValidator( 0.0, 1e+06, 10., "length_precision" );
|
||||
aGroupLayout->addWidget( myMinSize, row, 1 );
|
||||
row++;
|
||||
|
||||
|
||||
mySecondOrder = 0;
|
||||
if ( !myIsONLY )
|
||||
{
|
||||
mySecondOrder = new QCheckBox( tr( "NETGEN_SECOND_ORDER" ), GroupC1 );
|
||||
aGroupLayout->addWidget( mySecondOrder, row, 0 );
|
||||
row++;
|
||||
}
|
||||
|
||||
aGroupLayout->addWidget( new QLabel( tr( "NETGEN_FINENESS" ), GroupC1 ), row, 0 );
|
||||
myFineness = new QComboBox( GroupC1 );
|
||||
QStringList types;
|
||||
@ -132,43 +180,84 @@ QFrame* NETGENPluginGUI_HypothesisCreator::buildFrame()
|
||||
row++;
|
||||
|
||||
aGroupLayout->addWidget( new QLabel( tr( "NETGEN_GROWTH_RATE" ), GroupC1 ), row, 0 );
|
||||
myGrowthRate = new SalomeApp_DoubleSpinBox( GroupC1 );
|
||||
myGrowthRate->setMinimum( 0.1 );
|
||||
myGrowthRate->setMaximum( 10 );
|
||||
myGrowthRate->setSingleStep( 0.1 );
|
||||
myGrowthRate = new SMESHGUI_SpinBox( GroupC1 );
|
||||
myGrowthRate->RangeStepAndValidator( .0001, 10., .1, "parametric_precision" );
|
||||
aGroupLayout->addWidget( myGrowthRate, row, 1 );
|
||||
row++;
|
||||
|
||||
const double VALUE_MAX = 1.0e+6;
|
||||
myNbSegPerEdge = 0;
|
||||
myNbSegPerRadius = 0;
|
||||
if ( !myIsONLY )
|
||||
{
|
||||
const double VALUE_MAX = 1.0e+6;
|
||||
|
||||
aGroupLayout->addWidget( new QLabel( tr( "NETGEN_SEG_PER_EDGE" ), GroupC1 ), row, 0 );
|
||||
myNbSegPerEdge = new SalomeApp_DoubleSpinBox( GroupC1 );
|
||||
myNbSegPerEdge->setMinimum( 0.2 );
|
||||
myNbSegPerEdge->setMaximum( VALUE_MAX ); // (PAL14890) max value in native netgen gui is 5
|
||||
aGroupLayout->addWidget( myNbSegPerEdge, row, 1 );
|
||||
row++;
|
||||
|
||||
aGroupLayout->addWidget( new QLabel( tr( "NETGEN_SEG_PER_RADIUS" ), GroupC1 ), row, 0 );
|
||||
myNbSegPerRadius = new SalomeApp_DoubleSpinBox( GroupC1 );
|
||||
myNbSegPerRadius->setMinimum( 0.2 );
|
||||
myNbSegPerRadius->setMaximum( VALUE_MAX ); // (PAL14890) max value in native netgen gui is 5
|
||||
aGroupLayout->addWidget( myNbSegPerRadius, row, 1 );
|
||||
row++;
|
||||
aGroupLayout->addWidget( new QLabel( tr( "NETGEN_SEG_PER_EDGE" ), GroupC1 ), row, 0 );
|
||||
myNbSegPerEdge = new SMESHGUI_SpinBox( GroupC1 );
|
||||
myNbSegPerEdge->RangeStepAndValidator( .2, VALUE_MAX, .1, "parametric_precision" );
|
||||
aGroupLayout->addWidget( myNbSegPerEdge, row, 1 );
|
||||
row++;
|
||||
|
||||
if ( hypType()=="NETGEN_Parameters_2D" )
|
||||
aGroupLayout->addWidget( new QLabel( tr( "NETGEN_SEG_PER_RADIUS" ), GroupC1 ), row, 0 );
|
||||
myNbSegPerRadius = new SMESHGUI_SpinBox( GroupC1 );
|
||||
myNbSegPerRadius->RangeStepAndValidator( .2, VALUE_MAX, .1, "parametric_precision" );
|
||||
aGroupLayout->addWidget( myNbSegPerRadius, row, 1 );
|
||||
row++;
|
||||
}
|
||||
myAllowQuadrangles = 0;
|
||||
if ( myIs2D || !myIsONLY ) // issue 0021676
|
||||
{
|
||||
myAllowQuadrangles = new QCheckBox( tr( "NETGEN_ALLOW_QUADRANGLES" ), GroupC1 );
|
||||
aGroupLayout->addWidget( myAllowQuadrangles, row, 0 );
|
||||
myIs2D = true;
|
||||
row++;
|
||||
}
|
||||
|
||||
myOptimize = new QCheckBox( tr( "NETGEN_OPTIMIZE" ), GroupC1 );
|
||||
aGroupLayout->addWidget( myOptimize, row, 0 );
|
||||
row++;
|
||||
|
||||
|
||||
connect( myFineness, SIGNAL( activated( int ) ), this, SLOT( onFinenessChanged() ) );
|
||||
|
||||
|
||||
myLocalSizeTable = 0;
|
||||
if ( !myIsONLY )
|
||||
{
|
||||
QWidget* localSizeGroup = new QWidget();
|
||||
QGridLayout* localSizeLayout = new QGridLayout(localSizeGroup);
|
||||
|
||||
myLocalSizeTable = new QTableWidget(0, LSZ_NB_COLUMNS, localSizeGroup);
|
||||
localSizeLayout->addWidget(myLocalSizeTable, 1, 0, 8, 1);
|
||||
QStringList localSizeHeaders;
|
||||
localSizeHeaders << tr( "LSZ_ENTRY_COLUMN" )<< tr( "LSZ_NAME_COLUMN" ) << tr( "LSZ_LOCALSIZE_COLUMN" );
|
||||
myLocalSizeTable->setHorizontalHeaderLabels(localSizeHeaders);
|
||||
myLocalSizeTable->horizontalHeader()->hideSection(LSZ_ENTRY_COLUMN);
|
||||
myLocalSizeTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
|
||||
myLocalSizeTable->resizeColumnToContents(LSZ_NAME_COLUMN);
|
||||
myLocalSizeTable->resizeColumnToContents(LSZ_LOCALSIZE_COLUMN);
|
||||
myLocalSizeTable->setAlternatingRowColors(true);
|
||||
myLocalSizeTable->verticalHeader()->hide();
|
||||
|
||||
QPushButton* addVertexButton = new QPushButton(tr("NETGEN_LSZ_VERTEX"), localSizeGroup);
|
||||
localSizeLayout->addWidget(addVertexButton, LSZ_VERTEX_BTN, 1, 1, 1);
|
||||
QPushButton* addEdgeButton = new QPushButton(tr("NETGEN_LSZ_EDGE"), localSizeGroup);
|
||||
localSizeLayout->addWidget(addEdgeButton, LSZ_EDGE_BTN, 1, 1, 1);
|
||||
QPushButton* addFaceButton = new QPushButton(tr("NETGEN_LSZ_FACE"), localSizeGroup);
|
||||
localSizeLayout->addWidget(addFaceButton, LSZ_FACE_BTN, 1, 1, 1);
|
||||
|
||||
QFrame *line2 = new QFrame(localSizeGroup);
|
||||
line2->setFrameShape(QFrame::HLine);
|
||||
line2->setFrameShadow(QFrame::Sunken);
|
||||
localSizeLayout->addWidget(line2, LSZ_SEPARATOR2, 1, 1, 1);
|
||||
|
||||
QPushButton* removeButton = new QPushButton(tr("NETGEN_LSZ_REMOVE"), localSizeGroup);
|
||||
localSizeLayout->addWidget(removeButton, LSZ_REMOVE_BTN, 1, 1, 1);
|
||||
|
||||
connect( addVertexButton, SIGNAL(clicked()), this, SLOT(onAddLocalSizeOnVertex()));
|
||||
connect( addEdgeButton, SIGNAL(clicked()), this, SLOT(onAddLocalSizeOnEdge()));
|
||||
connect( addFaceButton, SIGNAL(clicked()), this, SLOT(onAddLocalSizeOnFace()));
|
||||
connect( removeButton, SIGNAL(clicked()), this, SLOT(onRemoveLocalSizeOnShape()));
|
||||
connect( myLocalSizeTable, SIGNAL(cellChanged(int, int)), this, SLOT(onSetLocalSize(int, int)));
|
||||
|
||||
tab->insertTab(LSZ_TAB, localSizeGroup, tr("NETGEN_LOCAL_SIZE"));
|
||||
}
|
||||
return fr;
|
||||
}
|
||||
|
||||
@ -183,9 +272,16 @@ void NETGENPluginGUI_HypothesisCreator::retrieveParams() const
|
||||
myMaxSize->setValue( data.myMaxSize );
|
||||
else
|
||||
myMaxSize->setText( data.myMaxSizeVar );
|
||||
|
||||
mySecondOrder->setChecked( data.mySecondOrder );
|
||||
myOptimize->setChecked( data.myOptimize );
|
||||
|
||||
if(data.myMinSizeVar.isEmpty())
|
||||
myMinSize->setValue( data.myMinSize );
|
||||
else
|
||||
myMinSize->setText( data.myMinSizeVar );
|
||||
|
||||
if ( mySecondOrder )
|
||||
mySecondOrder->setChecked( data.mySecondOrder );
|
||||
if ( myOptimize )
|
||||
myOptimize->setChecked( data.myOptimize );
|
||||
myFineness->setCurrentIndex( data.myFineness );
|
||||
|
||||
if(data.myGrowthRateVar.isEmpty())
|
||||
@ -193,24 +289,53 @@ void NETGENPluginGUI_HypothesisCreator::retrieveParams() const
|
||||
else
|
||||
myGrowthRate->setText( data.myGrowthRateVar );
|
||||
|
||||
if(data.myNbSegPerEdgeVar.isEmpty())
|
||||
myNbSegPerEdge->setValue( data.myNbSegPerEdge );
|
||||
else
|
||||
myNbSegPerEdge->setText( data.myNbSegPerEdgeVar );
|
||||
|
||||
if(data.myNbSegPerRadiusVar.isEmpty())
|
||||
myNbSegPerRadius->setValue( data.myNbSegPerRadius );
|
||||
else
|
||||
myNbSegPerRadius->setText( data.myNbSegPerRadiusVar );
|
||||
|
||||
if (myIs2D)
|
||||
if ( myNbSegPerEdge )
|
||||
{
|
||||
if(data.myNbSegPerEdgeVar.isEmpty())
|
||||
myNbSegPerEdge->setValue( data.myNbSegPerEdge );
|
||||
else
|
||||
myNbSegPerEdge->setText( data.myNbSegPerEdgeVar );
|
||||
}
|
||||
if ( myNbSegPerRadius )
|
||||
{
|
||||
if(data.myNbSegPerRadiusVar.isEmpty())
|
||||
myNbSegPerRadius->setValue( data.myNbSegPerRadius );
|
||||
else
|
||||
myNbSegPerRadius->setText( data.myNbSegPerRadiusVar );
|
||||
}
|
||||
if (myAllowQuadrangles)
|
||||
myAllowQuadrangles->setChecked( data.myAllowQuadrangles );
|
||||
|
||||
// update widgets
|
||||
bool isCustom = (myFineness->currentIndex() == UserDefined);
|
||||
myGrowthRate->setEnabled(isCustom);
|
||||
myNbSegPerEdge->setEnabled(isCustom);
|
||||
myNbSegPerRadius->setEnabled(isCustom);
|
||||
if ( myNbSegPerEdge )
|
||||
myNbSegPerEdge->setEnabled(isCustom);
|
||||
if ( myNbSegPerRadius )
|
||||
myNbSegPerRadius->setEnabled(isCustom);
|
||||
|
||||
if ( myLocalSizeTable )
|
||||
{
|
||||
NETGENPluginGUI_HypothesisCreator* that = (NETGENPluginGUI_HypothesisCreator*)this;
|
||||
QMapIterator<QString, QString> i(myLocalSizeMap);
|
||||
GeomSelectionTools* geomSelectionTools = that->getGeomSelectionTools();
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
const QString entry = i.key();
|
||||
std::string shapeName = geomSelectionTools->getNameFromEntry(entry.toStdString());
|
||||
const QString localSize = i.value();
|
||||
int row = myLocalSizeTable->rowCount();
|
||||
myLocalSizeTable->setRowCount(row+1);
|
||||
myLocalSizeTable->setItem(row, LSZ_ENTRY_COLUMN, new QTableWidgetItem(entry));
|
||||
myLocalSizeTable->item(row, LSZ_ENTRY_COLUMN)->setFlags(0);
|
||||
myLocalSizeTable->setItem(row, LSZ_NAME_COLUMN, new QTableWidgetItem(QString::fromStdString(shapeName)));
|
||||
myLocalSizeTable->item(row, LSZ_NAME_COLUMN)->setFlags(0);
|
||||
myLocalSizeTable->setItem(row, LSZ_LOCALSIZE_COLUMN, new QTableWidgetItem(localSize));
|
||||
myLocalSizeTable->item(row, LSZ_LOCALSIZE_COLUMN)->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEditable|Qt::ItemIsEnabled);
|
||||
}
|
||||
myLocalSizeTable->resizeColumnToContents(LSZ_NAME_COLUMN);
|
||||
myLocalSizeTable->resizeColumnToContents(LSZ_LOCALSIZE_COLUMN);
|
||||
}
|
||||
}
|
||||
|
||||
QString NETGENPluginGUI_HypothesisCreator::storeParams() const
|
||||
@ -220,6 +345,7 @@ QString NETGENPluginGUI_HypothesisCreator::storeParams() const
|
||||
storeParamsToHypo( data );
|
||||
|
||||
QString valStr = tr("NETGEN_MAX_SIZE") + " = " + QString::number( data.myMaxSize ) + "; ";
|
||||
valStr += tr("NETGEN_MIN_SIZE") + " = " + QString::number( data.myMinSize ) + "; ";
|
||||
if ( data.mySecondOrder )
|
||||
valStr += tr("NETGEN_SECOND_ORDER") + "; ";
|
||||
if ( data.myOptimize )
|
||||
@ -242,30 +368,49 @@ bool NETGENPluginGUI_HypothesisCreator::readParamsFromHypo( NetgenHypothesisData
|
||||
HypothesisData* data = SMESH::GetHypothesisData( hypType() );
|
||||
h_data.myName = isCreation() && data ? data->Label : "";
|
||||
|
||||
SMESH::ListOfParameters_var aParameters = h->GetLastParameters();
|
||||
|
||||
h_data.myMaxSize = h->GetMaxSize();
|
||||
h_data.myMaxSizeVar = (aParameters->length() > 0) ? QString(aParameters[0].in()) : QString("");
|
||||
h_data.myMaxSizeVar = getVariableName("SetMaxSize");
|
||||
h_data.mySecondOrder = h->GetSecondOrder();
|
||||
h_data.myOptimize = h->GetOptimize();
|
||||
|
||||
h_data.myFineness = (int) h->GetFineness();
|
||||
h_data.myGrowthRate = h->GetGrowthRate();
|
||||
h_data.myGrowthRateVar = (aParameters->length() > 1) ? QString(aParameters[1].in()) : QString("");
|
||||
h_data.myGrowthRateVar = getVariableName("SetGrowthRate");
|
||||
h_data.myNbSegPerEdge = h->GetNbSegPerEdge();
|
||||
h_data.myNbSegPerEdgeVar = (aParameters->length() > 2) ? QString(aParameters[2].in()) : QString("");
|
||||
h_data.myNbSegPerEdgeVar = getVariableName("SetNbSegPerEdge");
|
||||
h_data.myNbSegPerRadius = h->GetNbSegPerRadius();
|
||||
h_data.myNbSegPerRadiusVar = (aParameters->length() > 3) ? QString(aParameters[3].in()) : QString("");
|
||||
h_data.myNbSegPerRadiusVar = getVariableName("SetNbSegPerRadius");
|
||||
h_data.myMinSize = h->GetMinSize();
|
||||
h_data.myMinSizeVar = getVariableName("SetMinSize");
|
||||
|
||||
if ( myIs2D )
|
||||
//if ( myIs2D )
|
||||
{
|
||||
NETGENPlugin::NETGENPlugin_Hypothesis_2D_var h_2d =
|
||||
NETGENPlugin::NETGENPlugin_Hypothesis_2D::_narrow( initParamsHypothesis() );
|
||||
NETGENPlugin::NETGENPlugin_Hypothesis_var h =
|
||||
NETGENPlugin::NETGENPlugin_Hypothesis::_narrow( initParamsHypothesis() );
|
||||
|
||||
if ( !h_2d->_is_nil() )
|
||||
h_data.myAllowQuadrangles = h_2d->GetQuadAllowed();
|
||||
if ( !h->_is_nil() )
|
||||
h_data.myAllowQuadrangles = h->GetQuadAllowed();
|
||||
}
|
||||
|
||||
NETGENPluginGUI_HypothesisCreator* that = (NETGENPluginGUI_HypothesisCreator*)this;
|
||||
NETGENPlugin::string_array_var myEntries = h->GetLocalSizeEntries();
|
||||
for ( int i=0 ; i<myEntries->length() ; i++ )
|
||||
{
|
||||
QString entry = myEntries[i].in();
|
||||
double val = h->GetLocalSizeOnEntry(entry.toStdString().c_str());
|
||||
std::ostringstream tmp;
|
||||
tmp << val;
|
||||
QString valstring = QString::fromStdString(tmp.str());
|
||||
if (myLocalSizeMap.contains(entry))
|
||||
{
|
||||
if (myLocalSizeMap[entry] == "__TO_DELETE__")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
that->myLocalSizeMap[entry] = valstring;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -279,9 +424,8 @@ bool NETGENPluginGUI_HypothesisCreator::storeParamsToHypo( const NetgenHypothesi
|
||||
{
|
||||
if( isCreation() )
|
||||
SMESH::SetName( SMESH::FindSObject( h ), h_data.myName.toLatin1().data() );
|
||||
QStringList aVariablesList;
|
||||
h->SetVarParameter( h_data.myMaxSizeVar.toLatin1().constData(), "SetMaxSize");
|
||||
h->SetMaxSize( h_data.myMaxSize );
|
||||
aVariablesList.append(h_data.myMaxSizeVar);
|
||||
h->SetSecondOrder( h_data.mySecondOrder );
|
||||
h->SetOptimize( h_data.myOptimize );
|
||||
int fineness = h_data.myFineness;
|
||||
@ -289,32 +433,42 @@ bool NETGENPluginGUI_HypothesisCreator::storeParamsToHypo( const NetgenHypothesi
|
||||
|
||||
if( fineness==UserDefined )
|
||||
{
|
||||
h->SetGrowthRate( h_data.myGrowthRate );
|
||||
h->SetNbSegPerEdge( h_data.myNbSegPerEdge );
|
||||
h->SetNbSegPerRadius( h_data.myNbSegPerRadius );
|
||||
|
||||
aVariablesList.append(h_data.myGrowthRateVar);
|
||||
aVariablesList.append(h_data.myNbSegPerEdgeVar);
|
||||
aVariablesList.append(h_data.myNbSegPerRadiusVar);
|
||||
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 );
|
||||
|
||||
if ( myIs2D )
|
||||
{
|
||||
NETGENPlugin::NETGENPlugin_Hypothesis_2D_var h_2d =
|
||||
NETGENPlugin::NETGENPlugin_Hypothesis_2D::_narrow( h );
|
||||
|
||||
if ( !h_2d->_is_nil() )
|
||||
h_2d->SetQuadAllowed( h_data.myAllowQuadrangles );
|
||||
NETGENPlugin::NETGENPlugin_Hypothesis_2D_var h_2d =
|
||||
NETGENPlugin::NETGENPlugin_Hypothesis_2D::_narrow( h );
|
||||
|
||||
if ( !h_2d->_is_nil() )
|
||||
h_2d->SetQuadAllowed( h_data.myAllowQuadrangles );
|
||||
}
|
||||
|
||||
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList));
|
||||
if( fineness==UserDefined )
|
||||
{
|
||||
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList));
|
||||
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList));
|
||||
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList));
|
||||
}
|
||||
|
||||
QMapIterator<QString,QString> i(myLocalSizeMap);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
const QString entry = i.key();
|
||||
const QString localSize = i.value();
|
||||
if (localSize == "__TO_DELETE__")
|
||||
{
|
||||
h->UnsetLocalSizeOnEntry(entry.toLatin1().constData());
|
||||
}
|
||||
else
|
||||
{
|
||||
std::istringstream tmp(localSize.toLatin1().constData());
|
||||
double val;
|
||||
tmp >> val;
|
||||
h->SetLocalSizeOnEntry(entry.toLatin1().constData(), val);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(const SALOME::SALOME_Exception& ex)
|
||||
{
|
||||
@ -329,21 +483,40 @@ bool NETGENPluginGUI_HypothesisCreator::readParamsFromWidgets( NetgenHypothesisD
|
||||
h_data.myName = myName ? myName->text() : "";
|
||||
h_data.myMaxSize = myMaxSize->value();
|
||||
h_data.myMaxSizeVar = myMaxSize->text();
|
||||
h_data.mySecondOrder = mySecondOrder->isChecked();
|
||||
h_data.myOptimize = myOptimize->isChecked();
|
||||
h_data.myMinSize = myMinSize->value();
|
||||
h_data.myMinSizeVar = myMinSize->text();
|
||||
if ( mySecondOrder )
|
||||
h_data.mySecondOrder = mySecondOrder->isChecked();
|
||||
if ( myOptimize )
|
||||
h_data.myOptimize = myOptimize->isChecked();
|
||||
h_data.myFineness = myFineness->currentIndex();
|
||||
h_data.myGrowthRate = myGrowthRate->value();
|
||||
h_data.myNbSegPerEdge = myNbSegPerEdge->value();
|
||||
h_data.myNbSegPerRadius = myNbSegPerRadius->value();
|
||||
if ( myNbSegPerEdge )
|
||||
h_data.myNbSegPerEdge = myNbSegPerEdge->value();
|
||||
if ( myNbSegPerRadius )
|
||||
h_data.myNbSegPerRadius = myNbSegPerRadius->value();
|
||||
|
||||
h_data.myGrowthRateVar = myGrowthRate->text();
|
||||
h_data.myNbSegPerEdgeVar = myNbSegPerEdge->text();
|
||||
h_data.myNbSegPerRadiusVar = myNbSegPerRadius->text();
|
||||
h_data.myGrowthRateVar = myGrowthRate->text();
|
||||
if ( myNbSegPerEdge )
|
||||
h_data.myNbSegPerEdgeVar = myNbSegPerEdge->text();
|
||||
if ( myNbSegPerRadius )
|
||||
h_data.myNbSegPerRadiusVar = myNbSegPerRadius->text();
|
||||
|
||||
|
||||
if ( myIs2D )
|
||||
if ( myAllowQuadrangles )
|
||||
h_data.myAllowQuadrangles = myAllowQuadrangles->isChecked();
|
||||
|
||||
|
||||
if ( myLocalSizeTable )
|
||||
{
|
||||
NETGENPluginGUI_HypothesisCreator* that = (NETGENPluginGUI_HypothesisCreator*)this;
|
||||
int nbRows = myLocalSizeTable->rowCount();
|
||||
for(int row=0 ; row < nbRows ; row++)
|
||||
{
|
||||
QString entry = myLocalSizeTable->item(row, LSZ_ENTRY_COLUMN)->text();
|
||||
QString localSize = myLocalSizeTable->item(row, LSZ_LOCALSIZE_COLUMN)->text().trimmed();
|
||||
that->myLocalSizeMap[entry] = localSize;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -352,49 +525,175 @@ void NETGENPluginGUI_HypothesisCreator::onFinenessChanged()
|
||||
bool isCustom = (myFineness->currentIndex() == UserDefined);
|
||||
|
||||
myGrowthRate->setEnabled(isCustom);
|
||||
myNbSegPerEdge->setEnabled(isCustom);
|
||||
myNbSegPerRadius->setEnabled(isCustom);
|
||||
if ( myNbSegPerEdge )
|
||||
myNbSegPerEdge->setEnabled(isCustom);
|
||||
if ( myNbSegPerRadius )
|
||||
myNbSegPerRadius->setEnabled(isCustom);
|
||||
|
||||
if (!isCustom)
|
||||
{
|
||||
double aGrowthRate, aNbSegPerEdge, aNbSegPerRadius;
|
||||
|
||||
switch ( myFineness->currentIndex() )
|
||||
{
|
||||
case VeryCoarse:
|
||||
aGrowthRate = 0.7;
|
||||
aNbSegPerEdge = 0.3;
|
||||
aNbSegPerRadius = 1;
|
||||
break;
|
||||
case Coarse:
|
||||
aGrowthRate = 0.5;
|
||||
aNbSegPerEdge = 0.5;
|
||||
aNbSegPerRadius = 1.5;
|
||||
break;
|
||||
case Fine:
|
||||
aGrowthRate = 0.2;
|
||||
aNbSegPerEdge = 2;
|
||||
aNbSegPerRadius = 3;
|
||||
break;
|
||||
case VeryFine:
|
||||
aGrowthRate = 0.1;
|
||||
aNbSegPerEdge = 3;
|
||||
aNbSegPerRadius = 5;
|
||||
break;
|
||||
case Moderate:
|
||||
default:
|
||||
aGrowthRate = 0.3;
|
||||
aNbSegPerEdge = 1;
|
||||
aNbSegPerRadius = 2;
|
||||
break;
|
||||
}
|
||||
{
|
||||
case VeryCoarse:
|
||||
aGrowthRate = 0.7;
|
||||
aNbSegPerEdge = 0.3;
|
||||
aNbSegPerRadius = 1;
|
||||
break;
|
||||
case Coarse:
|
||||
aGrowthRate = 0.5;
|
||||
aNbSegPerEdge = 0.5;
|
||||
aNbSegPerRadius = 1.5;
|
||||
break;
|
||||
case Fine:
|
||||
aGrowthRate = 0.2;
|
||||
aNbSegPerEdge = 2;
|
||||
aNbSegPerRadius = 3;
|
||||
break;
|
||||
case VeryFine:
|
||||
aGrowthRate = 0.1;
|
||||
aNbSegPerEdge = 3;
|
||||
aNbSegPerRadius = 5;
|
||||
break;
|
||||
case Moderate:
|
||||
default:
|
||||
aGrowthRate = 0.3;
|
||||
aNbSegPerEdge = 1;
|
||||
aNbSegPerRadius = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
myGrowthRate->setValue( aGrowthRate );
|
||||
myNbSegPerEdge->setValue( aNbSegPerEdge );
|
||||
myNbSegPerRadius->setValue( aNbSegPerRadius );
|
||||
if ( myNbSegPerEdge )
|
||||
myNbSegPerEdge->setValue( aNbSegPerEdge );
|
||||
if ( myNbSegPerRadius )
|
||||
myNbSegPerRadius->setValue( aNbSegPerRadius );
|
||||
}
|
||||
}
|
||||
|
||||
void NETGENPluginGUI_HypothesisCreator::onAddLocalSizeOnVertex()
|
||||
{
|
||||
addLocalSizeOnShape(TopAbs_VERTEX);
|
||||
}
|
||||
|
||||
void NETGENPluginGUI_HypothesisCreator::onAddLocalSizeOnEdge()
|
||||
{
|
||||
addLocalSizeOnShape(TopAbs_EDGE);
|
||||
}
|
||||
|
||||
void NETGENPluginGUI_HypothesisCreator::onAddLocalSizeOnFace()
|
||||
{
|
||||
addLocalSizeOnShape(TopAbs_FACE);
|
||||
}
|
||||
|
||||
void NETGENPluginGUI_HypothesisCreator::addLocalSizeOnShape(TopAbs_ShapeEnum typeShapeAsked)
|
||||
{
|
||||
NETGENPlugin::NETGENPlugin_Hypothesis_var h = NETGENPlugin::NETGENPlugin_Hypothesis::_narrow(initParamsHypothesis());
|
||||
GeomSelectionTools* geomSelectionTools = getGeomSelectionTools();
|
||||
LightApp_SelectionMgr* mySel = geomSelectionTools->selectionMgr();
|
||||
SALOME_ListIO ListSelectedObjects;
|
||||
mySel->selectedObjects(ListSelectedObjects, NULL, false );
|
||||
SALOME_ListIteratorOfListIO Object_It(ListSelectedObjects);
|
||||
for (Object_It ; Object_It.More() ; Object_It.Next())
|
||||
{
|
||||
Handle(SALOME_InteractiveObject) anObject = Object_It.Value();
|
||||
std::string entry, shapeName;
|
||||
entry = geomSelectionTools->getEntryOfObject(anObject);
|
||||
shapeName = anObject->getName();
|
||||
TopAbs_ShapeEnum shapeType;
|
||||
shapeType = geomSelectionTools->entryToShapeType(entry);
|
||||
if (shapeType == TopAbs_SHAPE)
|
||||
{
|
||||
// E.A. if shapeType == TopAbs_SHAPE, it is NOT a TopoDS_Shape !!!
|
||||
continue;
|
||||
}
|
||||
// --
|
||||
if(shapeType != typeShapeAsked)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// --
|
||||
myLocalSizeTable->setFocus();
|
||||
QString shapeEntry;
|
||||
shapeEntry = QString::fromStdString(entry);
|
||||
if (myLocalSizeMap.contains(shapeEntry))
|
||||
{
|
||||
if (myLocalSizeMap[shapeEntry] != "__TO_DELETE__")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
double phySize = h->GetMaxSize();
|
||||
std::ostringstream oss;
|
||||
oss << phySize;
|
||||
QString localSize;
|
||||
localSize = QString::fromStdString(oss.str());
|
||||
// --
|
||||
int row = myLocalSizeTable->rowCount() ;
|
||||
myLocalSizeTable->setRowCount(row+1);
|
||||
myLocalSizeTable->setItem(row, LSZ_ENTRY_COLUMN, new QTableWidgetItem(shapeEntry));
|
||||
myLocalSizeTable->item(row, LSZ_ENTRY_COLUMN )->setFlags(0);
|
||||
myLocalSizeTable->setItem(row, LSZ_NAME_COLUMN, new QTableWidgetItem(QString::fromStdString(shapeName)));
|
||||
myLocalSizeTable->item(row, LSZ_NAME_COLUMN )->setFlags(0);
|
||||
myLocalSizeTable->setItem(row, LSZ_LOCALSIZE_COLUMN, new QTableWidgetItem(localSize));
|
||||
myLocalSizeTable->item(row, LSZ_LOCALSIZE_COLUMN )->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEditable|Qt::ItemIsEnabled);
|
||||
myLocalSizeTable->resizeColumnToContents(LSZ_NAME_COLUMN);
|
||||
myLocalSizeTable->resizeColumnToContents(LSZ_LOCALSIZE_COLUMN);
|
||||
myLocalSizeTable->clearSelection();
|
||||
myLocalSizeTable->scrollToItem( myLocalSizeTable->item( row, LSZ_LOCALSIZE_COLUMN ) );
|
||||
// --
|
||||
}
|
||||
}
|
||||
|
||||
void NETGENPluginGUI_HypothesisCreator::onRemoveLocalSizeOnShape()
|
||||
{
|
||||
QList<int> selectedRows;
|
||||
QList<QTableWidgetItem*> selected = myLocalSizeTable->selectedItems();
|
||||
QTableWidgetItem* item;
|
||||
int row;
|
||||
foreach(item, selected) {
|
||||
row = item->row();
|
||||
if (!selectedRows.contains(row))
|
||||
selectedRows.append( row );
|
||||
}
|
||||
qSort( selectedRows );
|
||||
QListIterator<int> it( selectedRows );
|
||||
it.toBack();
|
||||
while (it.hasPrevious())
|
||||
{
|
||||
row = it.previous();
|
||||
QString entry = myLocalSizeTable->item(row,LSZ_ENTRY_COLUMN)->text();
|
||||
if (myLocalSizeMap.contains(entry))
|
||||
{
|
||||
myLocalSizeMap[entry] = "__TO_DELETE__";
|
||||
}
|
||||
myLocalSizeTable->removeRow(row );
|
||||
}
|
||||
myLocalSizeTable->resizeColumnToContents(LSZ_NAME_COLUMN);
|
||||
myLocalSizeTable->resizeColumnToContents(LSZ_LOCALSIZE_COLUMN);
|
||||
}
|
||||
|
||||
void NETGENPluginGUI_HypothesisCreator::onSetLocalSize(int row,int col)
|
||||
{
|
||||
if (col == LSZ_LOCALSIZE_COLUMN) {
|
||||
QString entry = myLocalSizeTable->item(row, LSZ_ENTRY_COLUMN)->text();
|
||||
QString localSize = myLocalSizeTable->item(row, LSZ_LOCALSIZE_COLUMN)->text().trimmed();
|
||||
myLocalSizeMap[entry] = localSize;
|
||||
myLocalSizeTable->resizeColumnToContents(LSZ_LOCALSIZE_COLUMN);
|
||||
}
|
||||
}
|
||||
|
||||
GeomSelectionTools* NETGENPluginGUI_HypothesisCreator::getGeomSelectionTools()
|
||||
{
|
||||
_PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
|
||||
if (myGeomSelectionTools == NULL || myGeomSelectionTools->getMyStudy() != aStudy) {
|
||||
delete myGeomSelectionTools;
|
||||
myGeomSelectionTools = new GeomSelectionTools(aStudy);
|
||||
}
|
||||
return myGeomSelectionTools;
|
||||
}
|
||||
|
||||
QString NETGENPluginGUI_HypothesisCreator::caption() const
|
||||
{
|
||||
return tr( QString( "NETGEN_%1_TITLE" ).arg(myIs2D?QString("2D"):QString("3D")).toLatin1().data() );
|
||||
|
@ -1,24 +1,25 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin GUI: GUI for plugged-in mesher NETGENPlugin
|
||||
// File : NETGENPluginGUI_HypothesisCreator.h
|
||||
// Author : Michael Zorin
|
||||
@ -32,18 +33,22 @@
|
||||
|
||||
#include <SMESHGUI_Hypotheses.h>
|
||||
|
||||
class SalomeApp_DoubleSpinBox;
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
|
||||
class SMESHGUI_SpinBox;
|
||||
class GeomSelectionTools;
|
||||
class QComboBox;
|
||||
class QCheckBox;
|
||||
class QLineEdit;
|
||||
class QTableWidget;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
double myMaxSize, myGrowthRate, myNbSegPerEdge, myNbSegPerRadius;
|
||||
double myMaxSize, myMinSize, myGrowthRate, myNbSegPerEdge, myNbSegPerRadius;
|
||||
int myFineness;
|
||||
bool mySecondOrder, myAllowQuadrangles, myOptimize;
|
||||
QString myName;
|
||||
QString myMaxSizeVar, myGrowthRateVar, myNbSegPerEdgeVar, myNbSegPerRadiusVar;
|
||||
QString myMaxSizeVar, myMinSizeVar, myGrowthRateVar, myNbSegPerEdgeVar, myNbSegPerRadiusVar;
|
||||
} NetgenHypothesisData;
|
||||
|
||||
/*!
|
||||
@ -71,24 +76,37 @@ protected:
|
||||
|
||||
protected slots:
|
||||
virtual void onFinenessChanged();
|
||||
virtual void onAddLocalSizeOnVertex();
|
||||
virtual void onAddLocalSizeOnEdge();
|
||||
virtual void onAddLocalSizeOnFace();
|
||||
virtual void onRemoveLocalSizeOnShape();
|
||||
virtual void onSetLocalSize(int,int);
|
||||
|
||||
private:
|
||||
bool readParamsFromHypo( NetgenHypothesisData& ) const;
|
||||
bool readParamsFromWidgets( NetgenHypothesisData& ) const;
|
||||
bool storeParamsToHypo( const NetgenHypothesisData& ) const;
|
||||
GeomSelectionTools* getGeomSelectionTools();
|
||||
void addLocalSizeOnShape(TopAbs_ShapeEnum);
|
||||
|
||||
private:
|
||||
QLineEdit* myName;
|
||||
SalomeApp_DoubleSpinBox* myMaxSize;
|
||||
SMESHGUI_SpinBox* myMaxSize;
|
||||
SMESHGUI_SpinBox* myMinSize;
|
||||
QCheckBox* mySecondOrder;
|
||||
QCheckBox* myOptimize;
|
||||
QComboBox* myFineness;
|
||||
SalomeApp_DoubleSpinBox* myGrowthRate;
|
||||
SalomeApp_DoubleSpinBox* myNbSegPerEdge;
|
||||
SalomeApp_DoubleSpinBox* myNbSegPerRadius;
|
||||
SMESHGUI_SpinBox* myGrowthRate;
|
||||
SMESHGUI_SpinBox* myNbSegPerEdge;
|
||||
SMESHGUI_SpinBox* myNbSegPerRadius;
|
||||
QCheckBox* myAllowQuadrangles;
|
||||
|
||||
bool myIs2D;
|
||||
bool myIsONLY;
|
||||
|
||||
QTableWidget* myLocalSizeTable;
|
||||
GeomSelectionTools* myGeomSelectionTools;
|
||||
QMap<QString, QString> myLocalSizeMap;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,24 +1,22 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is 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 : NETGENPluginGUI_SimpleCreator.cxx
|
||||
// Author : Open CASCADE S.A.S.
|
||||
// SMESH includes
|
||||
@ -28,7 +26,6 @@
|
||||
#include <SMESHGUI_Utils.h>
|
||||
#include <SMESHGUI_HypothesesUtils.h>
|
||||
#include <SMESHGUI_SpinBox.h>
|
||||
#include <SMESHGUI.h>
|
||||
|
||||
// IDL includes
|
||||
#include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm)
|
||||
@ -74,6 +71,7 @@ NETGENPluginGUI_SimpleCreator::NETGENPluginGUI_SimpleCreator(const QString& theH
|
||||
myLengthRadioBut(0),
|
||||
myLenFromEdgesCheckBox(0),
|
||||
myArea(0),
|
||||
myAllowQuadCheckBox(0),
|
||||
myLenFromFacesCheckBox(0),
|
||||
myVolume(0)
|
||||
{
|
||||
@ -86,12 +84,15 @@ NETGENPluginGUI_SimpleCreator::~NETGENPluginGUI_SimpleCreator()
|
||||
bool NETGENPluginGUI_SimpleCreator::checkParams(QString& msg) const
|
||||
{
|
||||
bool result = true;
|
||||
result = myNbSeg->isValid(msg,true) && result;
|
||||
result = myLength->isValid(msg,true) && result;
|
||||
result = myArea->isValid(msg,true) && result;
|
||||
if (myVolume)
|
||||
if ( myNbSeg->isEnabled() )
|
||||
result = myNbSeg->isValid(msg,true) && result;
|
||||
if ( myLength->isEnabled() )
|
||||
result = myLength->isValid(msg,true) && result;
|
||||
if ( myArea->isEnabled() )
|
||||
result = myArea->isValid(msg,true) && result;
|
||||
if (myVolume && myVolume->isEnabled() )
|
||||
result = myVolume->isValid(msg,true) && result;
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -151,7 +152,7 @@ QFrame* NETGENPluginGUI_SimpleCreator::buildFrame()
|
||||
// * local length
|
||||
myLengthRadioBut = new QRadioButton( tr( "SMESH_LOCAL_LENGTH_HYPOTHESIS" ), dimGroup );
|
||||
myLength = new SMESHGUI_SpinBox( dimGroup );
|
||||
myLength->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 0.1, 6 );
|
||||
myLength->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 0.1, "length_precision" );
|
||||
myLength->setValue( 1. );
|
||||
dimLay->addWidget( myLengthRadioBut, dimRow, 0 );
|
||||
dimLay->addWidget( myLength, dimRow, 1 );
|
||||
@ -178,13 +179,22 @@ QFrame* NETGENPluginGUI_SimpleCreator::buildFrame()
|
||||
// * max area
|
||||
dimLay->addWidget( new QLabel( tr( "SMESH_MAX_ELEMENT_AREA_HYPOTHESIS" ), dimGroup), dimRow, 0);
|
||||
myArea = new SMESHGUI_SpinBox( dimGroup );
|
||||
myArea->RangeStepAndValidator( VALUE_SMALL_2, VALUE_MAX_2, 0.1, 6 );
|
||||
myArea->RangeStepAndValidator( VALUE_SMALL_2, VALUE_MAX_2, 0.1, "area_precision" );
|
||||
myArea->setValue( 1. );
|
||||
dimLay->addWidget( myArea, dimRow, 1 );
|
||||
dimRow++;
|
||||
|
||||
// * allow quadrangles
|
||||
const bool is3D = ( hypType()=="NETGEN_SimpleParameters_3D" );
|
||||
if ( !is3D )
|
||||
{
|
||||
myAllowQuadCheckBox = new QCheckBox( tr( "NETGEN_ALLOW_QUADRANGLES" ), dimGroup );
|
||||
dimLay->addWidget( myAllowQuadCheckBox, dimRow, 0, 1, 2 );
|
||||
dimRow++;
|
||||
}
|
||||
|
||||
// 3D params group
|
||||
if ( hypType()=="NETGEN_SimpleParameters_3D" )
|
||||
if ( is3D )
|
||||
{
|
||||
dimGroup = new QGroupBox( tr( "NG_3D" ), argGroup );
|
||||
argLay->addWidget( dimGroup, argRow, 0, 1, 2 );
|
||||
@ -205,7 +215,7 @@ QFrame* NETGENPluginGUI_SimpleCreator::buildFrame()
|
||||
// * max volume
|
||||
dimLay->addWidget(new QLabel( tr("SMESH_MAX_ELEMENT_VOLUME_HYPOTHESIS"), dimGroup), dimRow, 0);
|
||||
myVolume = new SMESHGUI_SpinBox( dimGroup );
|
||||
myVolume->RangeStepAndValidator( VALUE_SMALL_3, VALUE_MAX_3, 0.1, 6 );
|
||||
myVolume->RangeStepAndValidator( VALUE_SMALL_3, VALUE_MAX_3, 0.1, "volume_precision" );
|
||||
myVolume->setValue( 1. );
|
||||
dimLay->addWidget( myVolume, dimRow, 1 );
|
||||
dimRow++;
|
||||
@ -225,37 +235,35 @@ void NETGENPluginGUI_SimpleCreator::retrieveParams() const
|
||||
if ( isCreation() )
|
||||
myName->setText( hypName() );
|
||||
|
||||
// set default real values
|
||||
// Set default values
|
||||
|
||||
NETGENPlugin_SimpleHypothesis_2D_var h =
|
||||
NETGENPlugin_SimpleHypothesis_2D::_narrow( initParamsHypothesis( hasInitParamsHypothesis() ));
|
||||
|
||||
if ( double len = h->GetLocalLength() )
|
||||
int dfltNbSeg = (int) h->GetNumberOfSegments();
|
||||
myNbSeg->setValue( dfltNbSeg );
|
||||
if ( double len = h->GetLocalLength() ) {
|
||||
myLength->setValue( len );
|
||||
if ( double area = h->GetMaxElementArea() )
|
||||
myArea->setValue( area );
|
||||
if ( myVolume ) {
|
||||
NETGENPlugin_SimpleHypothesis_3D_var h3d =
|
||||
NETGENPlugin_SimpleHypothesis_3D::_narrow( initParamsHypothesis( hasInitParamsHypothesis()) );
|
||||
if ( double volume = (double) h3d->GetMaxElementVolume() )
|
||||
myVolume->setValue( volume );
|
||||
myArea->setValue( len * len );
|
||||
if ( myVolume )
|
||||
myVolume->setValue( len * len * len );
|
||||
}
|
||||
|
||||
h = NETGENPlugin_SimpleHypothesis_2D::_narrow( hypothesis() );
|
||||
|
||||
// set values of hypothesis
|
||||
|
||||
SMESH::ListOfParameters_var aParameters = h->GetLastParameters();
|
||||
//SMESH::ListOfParameters_var aParameters = h->GetLastParameters();
|
||||
|
||||
// 1D
|
||||
int nbSeg = (int) h->GetNumberOfSegments();
|
||||
int nbSeg = isCreation() ? dfltNbSeg : (int) h->GetNumberOfSegments();
|
||||
myNbSegRadioBut->setChecked( nbSeg );
|
||||
myLengthRadioBut->setChecked( !nbSeg );
|
||||
QString aPrm;
|
||||
if ( nbSeg ) {
|
||||
myLength->setEnabled( false );
|
||||
myNbSeg->setEnabled( true );
|
||||
aPrm = (aParameters->length() > 0) ? QString(aParameters[0].in()) : QString("");
|
||||
aPrm = getVariableName("SetNumberOfSegments");
|
||||
if(aPrm.isEmpty())
|
||||
myNbSeg->setValue( nbSeg );
|
||||
else
|
||||
@ -264,7 +272,7 @@ void NETGENPluginGUI_SimpleCreator::retrieveParams() const
|
||||
else {
|
||||
myNbSeg->setEnabled( false );
|
||||
myLength->setEnabled( true );
|
||||
aPrm = (aParameters->length() > 0) ? QString(aParameters[0].in()) : QString("");
|
||||
aPrm = getVariableName("SetLocalLength");
|
||||
if(aPrm.isEmpty())
|
||||
myLength->setValue( h->GetLocalLength() );
|
||||
else
|
||||
@ -275,7 +283,7 @@ void NETGENPluginGUI_SimpleCreator::retrieveParams() const
|
||||
if ( double area = h->GetMaxElementArea() ) {
|
||||
myLenFromEdgesCheckBox->setChecked( false );
|
||||
myArea->setEnabled( true );
|
||||
aPrm = (aParameters->length() > 1) ? QString(aParameters[1].in()) : QString("");
|
||||
aPrm = getVariableName("SetMaxElementArea");
|
||||
if(aPrm.isEmpty())
|
||||
myArea->setValue( area );
|
||||
else
|
||||
@ -285,6 +293,8 @@ void NETGENPluginGUI_SimpleCreator::retrieveParams() const
|
||||
myLenFromEdgesCheckBox->setChecked( true );
|
||||
myArea->setEnabled( false );
|
||||
}
|
||||
if ( myAllowQuadCheckBox )
|
||||
myAllowQuadCheckBox->setChecked( h->GetAllowQuadrangles() );
|
||||
|
||||
// 3D
|
||||
if ( myVolume ) {
|
||||
@ -292,7 +302,7 @@ void NETGENPluginGUI_SimpleCreator::retrieveParams() const
|
||||
if ( double volume = (double) h->GetMaxElementVolume() ) {
|
||||
myLenFromFacesCheckBox->setChecked( false );
|
||||
myVolume->setEnabled( true );
|
||||
aPrm = (aParameters->length() > 2) ? QString(aParameters[2].in()) : QString("");
|
||||
aPrm = getVariableName("SetMaxElementVolume");
|
||||
if(aPrm.isEmpty())
|
||||
myVolume->setValue( volume );
|
||||
else
|
||||
@ -319,49 +329,43 @@ QString NETGENPluginGUI_SimpleCreator::storeParams() const
|
||||
|
||||
|
||||
// 1D
|
||||
QStringList aVariablesList;
|
||||
if ( myNbSeg->isEnabled() ) {
|
||||
h->SetVarParameter( myNbSeg->text().toLatin1().constData(), "SetNumberOfSegments");
|
||||
h->SetNumberOfSegments( myNbSeg->value() );
|
||||
valStr += "nbSeg=" + myNbSeg->text();
|
||||
aVariablesList.append(myNbSeg->text());
|
||||
}
|
||||
else {
|
||||
h->SetVarParameter( myLength->text().toLatin1().constData(), "SetLocalLength");
|
||||
h->SetLocalLength( myLength->value() );
|
||||
valStr += "len=" + myLength->text();
|
||||
aVariablesList.append(myLength->text());
|
||||
}
|
||||
|
||||
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList));
|
||||
|
||||
// 2D
|
||||
if ( myArea->isEnabled() ) {
|
||||
h->SetVarParameter( myArea->text().toLatin1().constData(), "SetMaxElementArea");
|
||||
h->SetMaxElementArea( myArea->value() );
|
||||
valStr += "; area=" + myArea->text();
|
||||
aVariablesList.append(myArea->text());
|
||||
}
|
||||
else {
|
||||
h->LengthFromEdges();
|
||||
valStr += "; lenFromEdges";
|
||||
aVariablesList.append(QString());
|
||||
}
|
||||
|
||||
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList));
|
||||
if ( myAllowQuadCheckBox )
|
||||
h->SetAllowQuadrangles( myAllowQuadCheckBox->isChecked() );
|
||||
|
||||
// 3D
|
||||
if ( myVolume ) {
|
||||
NETGENPlugin_SimpleHypothesis_3D_var h =
|
||||
NETGENPlugin_SimpleHypothesis_3D::_narrow( hypothesis() );
|
||||
if ( myVolume->isEnabled() ) {
|
||||
h->SetVarParameter( myVolume->text().toLatin1().constData(), "SetMaxElementVolume");
|
||||
h->SetMaxElementVolume( myVolume->value() );
|
||||
valStr += "; vol=" + myVolume->text();
|
||||
aVariablesList.append( myVolume->text());
|
||||
}
|
||||
else {
|
||||
h->LengthFromFaces();
|
||||
valStr += "; lenFromFaces";
|
||||
aVariablesList.append(QString());
|
||||
}
|
||||
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList));
|
||||
}
|
||||
}
|
||||
catch(const SALOME::SALOME_Exception& ex)
|
||||
|
@ -1,24 +1,22 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is 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 : NETGENPluginGUI_SimpleCreator.h
|
||||
// Author : Open CASCADE S.A.S.
|
||||
//
|
||||
@ -69,6 +67,7 @@ private:
|
||||
|
||||
QCheckBox* myLenFromEdgesCheckBox;
|
||||
SMESHGUI_SpinBox* myArea;
|
||||
QCheckBox* myAllowQuadCheckBox;
|
||||
|
||||
QCheckBox* myLenFromFacesCheckBox;
|
||||
SMESHGUI_SpinBox* myVolume;
|
||||
|
@ -1,28 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE 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
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<TS version="1.1" >
|
||||
<TS version="2.0" language="en_US">
|
||||
<context>
|
||||
<name>@default</name>
|
||||
<message>
|
||||
@ -45,13 +23,17 @@
|
||||
<source>ICON_SMESH_TREE_ALGO_NETGEN_2D</source>
|
||||
<translation>mesh_tree_algo_netgen_2d.png</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ICON_SMESH_TREE_ALGO_NETGEN_2D_ONLY</source>
|
||||
<translation>mesh_tree_algo_netgen_2d.png</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ICON_SMESH_TREE_ALGO_NETGEN_2D3D</source>
|
||||
<translation>mesh_tree_algo_netgen_2d3d.png</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ICON_SMESH_TREE_ALGO_NETGEN_3D</source>
|
||||
<translation>mesh_tree_algo_tetra.png</translation>
|
||||
<translation>mesh_tree_algo_netgen_2d3d.png</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ICON_SMESH_TREE_HYPO_NETGEN_Parameters</source>
|
||||
|
@ -1,137 +1,151 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE 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
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<TS version="1.1" >
|
||||
<context>
|
||||
<name>@default</name>
|
||||
<message>
|
||||
<source>NETGEN_2D_HYPOTHESIS</source>
|
||||
<translation>Netgen 2D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_2D_TITLE</source>
|
||||
<translation>Hypothesis Construction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_3D_HYPOTHESIS</source>
|
||||
<translation>Netgen 3D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_3D_TITLE</source>
|
||||
<translation>Hypothesis Construction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SimpleParameters_3D_HYPOTHESIS</source>
|
||||
<translation>Netgen 3D simple parameters</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SimpleParameters_3D_TITLE</source>
|
||||
<translation>Hypothesis Construction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SimpleParameters_2D_HYPOTHESIS</source>
|
||||
<translation>Netgen 2D simple parameters</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SimpleParameters_2D_TITLE</source>
|
||||
<translation>Hypothesis Construction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_ALLOW_QUADRANGLES</source>
|
||||
<translation>Allow Quadrangles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_COARSE</source>
|
||||
<translation>Coarse</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_CUSTOM</source>
|
||||
<translation>Custom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_FINE</source>
|
||||
<translation>Fine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_FINENESS</source>
|
||||
<translation>Fineness</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_GROWTH_RATE</source>
|
||||
<translation>Growth Rate</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_MAX_SIZE</source>
|
||||
<translation>Max. Size</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_MODERATE</source>
|
||||
<translation>Moderate</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_OPTIMIZE</source>
|
||||
<translation>Optimize</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SECOND_ORDER</source>
|
||||
<translation>Second Order</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SEG_PER_EDGE</source>
|
||||
<translation>Nb. Segs per Edge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SEG_PER_RADIUS</source>
|
||||
<translation>Nb. Segs per Radius</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_VERYCOARSE</source>
|
||||
<translation>Very Coarse</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_VERYFINE</source>
|
||||
<translation>Very Fine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NG_1D</source>
|
||||
<translation>1D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NG_2D</source>
|
||||
<translation>2D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NG_3D</source>
|
||||
<translation>3D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NG_LENGTH_FROM_EDGES</source>
|
||||
<translation>Length from edges</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NG_LENGTH_FROM_FACES</source>
|
||||
<translation>Length from faces</translation>
|
||||
</message>
|
||||
</context>
|
||||
<TS version="2.0" language="en_US">
|
||||
<context>
|
||||
<name>@default</name>
|
||||
<message>
|
||||
<source>NETGEN_2D_HYPOTHESIS</source>
|
||||
<translation>Netgen 2D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_2D_TITLE</source>
|
||||
<translation>Hypothesis Construction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_3D_HYPOTHESIS</source>
|
||||
<translation>Netgen 3D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_3D_TITLE</source>
|
||||
<translation>Hypothesis Construction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SimpleParameters_3D_HYPOTHESIS</source>
|
||||
<translation>Netgen 3D simple parameters</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SimpleParameters_3D_TITLE</source>
|
||||
<translation>Hypothesis Construction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SimpleParameters_2D_HYPOTHESIS</source>
|
||||
<translation>Netgen 2D simple parameters</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SimpleParameters_2D_TITLE</source>
|
||||
<translation>Hypothesis Construction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_ALLOW_QUADRANGLES</source>
|
||||
<translation>Allow Quadrangles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_COARSE</source>
|
||||
<translation>Coarse</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_CUSTOM</source>
|
||||
<translation>Custom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_FINE</source>
|
||||
<translation>Fine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_FINENESS</source>
|
||||
<translation>Fineness</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_GROWTH_RATE</source>
|
||||
<translation>Growth Rate</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_MAX_SIZE</source>
|
||||
<translation>Max. Size</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_MIN_SIZE</source>
|
||||
<translation>Min. Size</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_MODERATE</source>
|
||||
<translation>Moderate</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_OPTIMIZE</source>
|
||||
<translation>Optimize</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SECOND_ORDER</source>
|
||||
<translation>Second Order</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SEG_PER_EDGE</source>
|
||||
<translation>Nb. Segs per Edge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SEG_PER_RADIUS</source>
|
||||
<translation>Nb. Segs per Radius</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_VERYCOARSE</source>
|
||||
<translation>Very Coarse</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_VERYFINE</source>
|
||||
<translation>Very Fine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NG_1D</source>
|
||||
<translation>1D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NG_2D</source>
|
||||
<translation>2D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NG_3D</source>
|
||||
<translation>3D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NG_LENGTH_FROM_EDGES</source>
|
||||
<translation>Length from edges</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NG_LENGTH_FROM_FACES</source>
|
||||
<translation>Length from faces</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_LOCAL_SIZE</source>
|
||||
<translation>Local sizes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_LSZ_VERTEX</source>
|
||||
<translation>On Vertex</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_LSZ_EDGE</source>
|
||||
<translation>On Edge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_LSZ_FACE</source>
|
||||
<translation>On Sub-Face</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_LSZ_REMOVE</source>
|
||||
<translation>Remove</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>LSZ_ENTRY_COLUMN</source>
|
||||
<translation>Entry</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>LSZ_NAME_COLUMN</source>
|
||||
<translation>Name</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>LSZ_LOCALSIZE_COLUMN</source>
|
||||
<translation>Value</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
151
src/GUI/NETGENPlugin_msg_fr.ts
Executable file
@ -0,0 +1,151 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="fr_FR">
|
||||
<context>
|
||||
<name>@default</name>
|
||||
<message>
|
||||
<source>NETGEN_2D_HYPOTHESIS</source>
|
||||
<translation>Netgen 2D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_2D_TITLE</source>
|
||||
<translation>Construction d'une hypothèse</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_3D_HYPOTHESIS</source>
|
||||
<translation>Netgen 3D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_3D_TITLE</source>
|
||||
<translation>Construction d'une hypothèse</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SimpleParameters_3D_HYPOTHESIS</source>
|
||||
<translation>Netgen 3D paramètres simplifiés</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SimpleParameters_3D_TITLE</source>
|
||||
<translation>Construction d'une hypothèse</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SimpleParameters_2D_HYPOTHESIS</source>
|
||||
<translation>Netgen 2D paramètres simplifiés</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SimpleParameters_2D_TITLE</source>
|
||||
<translation>Construction d'une hypothèse</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_ALLOW_QUADRANGLES</source>
|
||||
<translation>Autoriser les quadrangles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_COARSE</source>
|
||||
<translation>Grossier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_CUSTOM</source>
|
||||
<translation>Personnalisé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_FINE</source>
|
||||
<translation>Fin</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_FINENESS</source>
|
||||
<translation>Finesse</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_GROWTH_RATE</source>
|
||||
<translation>Taux d'accroissement</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_MAX_SIZE</source>
|
||||
<translation>Taille maximale</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_MIN_SIZE</source>
|
||||
<translation>Taille minimale</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_MODERATE</source>
|
||||
<translation>Moyen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_OPTIMIZE</source>
|
||||
<translation>Optimiser</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SECOND_ORDER</source>
|
||||
<translation>Second ordre</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SEG_PER_EDGE</source>
|
||||
<translation>Nb. segments par arête</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_SEG_PER_RADIUS</source>
|
||||
<translation>Nb. segments par rayon</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_VERYCOARSE</source>
|
||||
<translation>Très grossier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_VERYFINE</source>
|
||||
<translation>Très fin</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NG_1D</source>
|
||||
<translation>1D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NG_2D</source>
|
||||
<translation>2D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NG_3D</source>
|
||||
<translation>3D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NG_LENGTH_FROM_EDGES</source>
|
||||
<translation>Longueur à partir des arêtes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NG_LENGTH_FROM_FACES</source>
|
||||
<translation>Longueur à partir des faces</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_LOCAL_SIZE</source>
|
||||
<translation>Tailles locales</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_LSZ_VERTEX</source>
|
||||
<translation>Sur un point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_LSZ_EDGE</source>
|
||||
<translation>Sur une arête</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_LSZ_FACE</source>
|
||||
<translation>Sur une sous-face</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>NETGEN_LSZ_REMOVE</source>
|
||||
<translation>Supprimer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>LSZ_ENTRY_COLUMN</source>
|
||||
<translation>Entrée</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>LSZ_NAME_COLUMN</source>
|
||||
<translation>Nom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>LSZ_LOCALSIZE_COLUMN</source>
|
||||
<translation>Valeur</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,24 +1,22 @@
|
||||
# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is 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 : Makefile.in
|
||||
# Author : Patrick GOLDBRONN (CEA)
|
||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
||||
@ -27,10 +25,10 @@
|
||||
#
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
SUBDIRS = NETGEN NETGENPlugin
|
||||
SUBDIRS = NETGENPlugin
|
||||
|
||||
if NETGENPLUGIN_ENABLE_GUI
|
||||
SUBDIRS += GUI
|
||||
endif
|
||||
|
||||
DIST_SUBDIRS = NETGEN NETGENPlugin GUI
|
||||
DIST_SUBDIRS = NETGENPlugin GUI
|
||||
|
@ -1,80 +0,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
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# -* Makefile *-
|
||||
# Author : Edward AGAPOV (OCC)
|
||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
||||
# Module : NETGENPLUGIN
|
||||
# Date : 10/01/2004
|
||||
#
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
# build .so of NETGEN itself
|
||||
|
||||
lib_LTLIBRARIES = libNETGEN.la
|
||||
|
||||
LIB_OBJ_O = \
|
||||
linopt.o bfgs.o linsearch.o global.o bisect.o meshtool.o refine.o ruler3.o \
|
||||
improve3.o adfront3.o tetrarls.o prism2rls.o profiler.o pyramidrls.o pyramid2rls.o \
|
||||
netrule3.o ruler2.o meshclass.o improve2.o adfront2.o netrule2.o triarls.o geomsearch.o \
|
||||
secondorder.o meshtype.o parser3.o quadrls.o specials.o parser2.o meshing2.o meshing3.o \
|
||||
meshfunc.o localh.o improve2gen.o delaunay.o boundarylayer.o msghandler.o \
|
||||
meshfunc2d.o smoothing2.o smoothing3.o topology.o curvedelems_new.o clusters.o zrefine.o \
|
||||
ngexception.o geomtest3d.o geom2d.o geom2dmesh.o geom3d.o adtree.o transform3d.o geomfuncs.o \
|
||||
polynomial.o densemat.o vector.o basemat.o sparsmat.o algprim.o brick.o manifold.o bspline2d.o \
|
||||
meshsurf.o csgeom.o polyhedra.o curve2d.o singularref.o edgeflw.o solid.o explicitcurve2d.o \
|
||||
specpoin.o gencyl.o revolution.o genmesh.o genmesh2d.o spline3d.o surface.o identify.o \
|
||||
triapprox.o meshstlsurface.o stlline.o stltopology.o stltool.o stlgeom.o stlgeomchart.o \
|
||||
stlgeommesh.o table.o optmem.o spbita2d.o hashtabl.o sort.o flags.o seti.o bitarray.o \
|
||||
array.o symbolta.o mystring.o moveablemem.o spline.o splinegeometry.o ngnewdelete.o nglib.o \
|
||||
hprefinement.o Partition_Inter2d.o Partition_Loop.o Partition_Loop3d.o Partition_Inter3d.o \
|
||||
Partition_Loop2d.o Partition_Spliter.o occgeom.o occgenmesh.o occmeshsurf.o
|
||||
|
||||
NETGEN_LIBS_DIR=@NETGEN_LIBS_DIR@
|
||||
|
||||
$(LIB_OBJ_O):
|
||||
ar x $(NETGEN_LIBS_DIR)/libnginterface.a
|
||||
ar x $(NETGEN_LIBS_DIR)/libocc.a
|
||||
ar x $(NETGEN_LIBS_DIR)/libcsg.a
|
||||
ar x $(NETGEN_LIBS_DIR)/libgprim.a
|
||||
ar x $(NETGEN_LIBS_DIR)/libmesh.a
|
||||
ar x $(NETGEN_LIBS_DIR)/libopti.a
|
||||
ar x $(NETGEN_LIBS_DIR)/libgen.a
|
||||
ar x $(NETGEN_LIBS_DIR)/libla.a
|
||||
ar x $(NETGEN_LIBS_DIR)/libstlgeom.a
|
||||
ar x $(NETGEN_LIBS_DIR)/libgeom2d.a
|
||||
rm -rf csgparser.o dynamicmem.o extrusion.o occconstruction.o parthreads.o readuser.o writeabaqus.o writediffpack.o writeelmer.o writefeap.o writefluent.o writegmsh.o writejcm.o writepermas.o writetecplot.o writetochnog.o writeuser.o wuchemnitz.o
|
||||
|
||||
#LIB_OBJ_LO = $(LIB_OBJ_O:%.o=%.lo)
|
||||
#%.lo: %.o; @ln -s $< $@
|
||||
|
||||
nodist_libNETGEN_la_SOURCES =
|
||||
|
||||
libNETGEN_la_LDFLAGS = $(LIB_OBJ_O) \
|
||||
$(CAS_LDPATH) -lTKernel -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES -lTKMesh -lTKSTL $(FCLIBS) $(STDLIB)
|
||||
|
||||
libNETGEN_la_DEPENDENCIES = $(LIB_OBJ_O)
|
||||
|
||||
EXTRA_DIST += \
|
||||
ReadMeForNgUsers \
|
||||
netgen43ForSalome.patch \
|
||||
netgen45ForSalome.patch \
|
||||
netgen45lib64.patch
|
@ -1,94 +1,48 @@
|
||||
The Netgen 4.5 from the web location : http://www.hpfem.jku.at/netgen/
|
||||
(CVS access) is used in the SMESH Module of Salome3 distribution.
|
||||
# ------------------------------------------------------------------
|
||||
# ------------------------------------------------------------------
|
||||
# Notes for Netgen >= 4.9.13
|
||||
# ------------------------------------------------------------------
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
1. How to build Netgen for Salome
|
||||
------------------------------
|
||||
Netgen home page: http://sourceforge.net/apps/mediawiki/netgen-mesher.
|
||||
|
||||
1.1. Download Netgen 4.5 from the NETGEN home site (see above).
|
||||
1. Minimal requirements
|
||||
|
||||
1.2. Unpack the downloaded Netgen 4.5 archive
|
||||
(hereafter we assume that this is netgen45 directory)
|
||||
Minimal version of Netgen required for SALOME is 4.9.13.
|
||||
|
||||
1.3. Patch the netgen 4.5 distribution for SALOME:
|
||||
2. How to build Netgen for SALOME NETGEN Plugin
|
||||
-----------------------------------------
|
||||
|
||||
$ cd netgen45
|
||||
$ patch -p1 < patch_directory/netgen45ForSalome.patch
|
||||
2.1. Download Netgen archive (here netgen-4.9.13.tar.gz) and unpack it
|
||||
|
||||
1.4. For 64-bit platform you also need to apply another patch:
|
||||
2.2. Patch the Netgen distribution for SALOME
|
||||
|
||||
$ cd netgen45
|
||||
$ patch -p1 < patch_directory/netgen45lib64.patch
|
||||
$ cd netgen45
|
||||
$ patch -p1 < patch_directory/netgen49ForSalome.patch
|
||||
|
||||
1.5. Set CASROOT environment variable to OCCT installation path,
|
||||
since Netgen 4.5 requires Open CASCADE Technology:
|
||||
Note that patch corresponds to the version of Netgen you use.
|
||||
For example, netgen49ForSalome.patch mentioned above is a patch
|
||||
file for Netgen 4.9.13. The patch for Netgen can be found in
|
||||
NETGENPLUGIN_SRC/src/NETGEN directory.
|
||||
|
||||
$ setenv CASROOT <occt_installation_path>
|
||||
2.3. Configure the netgen compilation. For example
|
||||
|
||||
1.6. Compile and install netgen 4.5. To do this, simply run
|
||||
makeForSalome.sh script (it is created from the patch):
|
||||
$ cd netgen-4.9.13
|
||||
$ ./configure --prefix=THE_INSTALLATION_PATH \
|
||||
--with-occ=${CASROOT} \
|
||||
--with-tcl=${TCLHOME}/lib --with-tk=${TCLHOME}/lib \
|
||||
--with-tclinclude=${TCLHOME}/include
|
||||
|
||||
$ sh makeForSalome.sh
|
||||
Note that Netgen depends on some products like Open CASCADE
|
||||
Technology and Tcl/Tk. These products should be specified
|
||||
to the configure script via options.
|
||||
|
||||
2.4. Compile the netgen product
|
||||
$ make
|
||||
$ make install
|
||||
|
||||
2. Additional information for maintainers
|
||||
--------------------------------------
|
||||
|
||||
The file check_NETGEN.m4 assumes that Netgen is installed in
|
||||
the directory <netgen_installation_path> as follow:
|
||||
|
||||
prompt> ls <netgen_installation_path>
|
||||
|
||||
include/ lib/
|
||||
|
||||
prompt> ls <netgen_installation_path>/include
|
||||
|
||||
adfront2.hpp explicitcurve2d.hpp hpref_quad.hpp myadt.hpp spbita2d.hpp
|
||||
adfront3.hpp extrusion.hpp hpref_segm.hpp mydefs.hpp specials.hpp
|
||||
adtree.hpp findip.hpp hpref_tet.hpp mystdlib.h specpoin.hpp
|
||||
algprim.hpp findip2.hpp hpref_trig.hpp mystring.hpp spline.hpp
|
||||
array.hpp flags.hpp hprefinement.hpp ngexception.hpp spline2d.hpp
|
||||
autoptr.hpp gencyl.hpp identify.hpp nglib.h spline3d.hpp
|
||||
basemat.hpp geom2d.hpp improve2.hpp occgeom.hpp splinegeometry.hpp
|
||||
bisect.hpp geom2dmesh.hpp improve3.hpp occmeshsurf.hpp splinegeometry2.hpp
|
||||
bitarray.hpp geom3d.hpp linalg.hpp opti.hpp stack.hpp
|
||||
boundarylayer.hpp geometry2d.hpp localh.hpp optmem.hpp stlgeom.hpp
|
||||
brick.hpp geomfuncs.hpp manifold.hpp parthreads.hpp stlline.hpp
|
||||
classifyhpel.hpp geoml.hpp meshclass.hpp polyhedra.hpp stltool.hpp
|
||||
clusters.hpp geomobjects.hpp meshfunc.hpp polynomial.hpp stltopology.hpp
|
||||
csg.hpp geomops.hpp meshing.hpp profiler.hpp surface.hpp
|
||||
csgeom.hpp geomsearch.hpp meshing2.hpp revolution.hpp symbolta.hpp
|
||||
csgparser.hpp geomtest3d.hpp meshing3.hpp ruler2.hpp table.hpp
|
||||
curve2d.hpp global.hpp meshstlsurface.hpp ruler3.hpp template.hpp
|
||||
curvedelems.hpp gprim.hpp meshsurf.hpp seti.hpp topology.hpp
|
||||
curvedelems_new.hpp hashtabl.hpp meshtool.hpp singularref.hpp transform3d.hpp
|
||||
densemat.hpp hpref_hex.hpp meshtype.hpp solid.hpp triapprox.hpp
|
||||
dynamicmem.hpp hpref_prism.hpp moveablemem.hpp sort.hpp vector.hpp
|
||||
edgeflw.hpp hpref_pyramid.hpp msghandler.hpp sparsmat.hpp
|
||||
|
||||
prompt> ls <netgen_installation_path>/lib
|
||||
|
||||
libcsg.a libgeom2d.a libla.a libnginterface.a libopti.a
|
||||
libgen.a libgprim.a libmesh.a libocc.a libstlgeom.a
|
||||
|
||||
The library files can be also installed in the LINUX or LINUX64
|
||||
subfolder of the lib directory.
|
||||
|
||||
All the libraries *.a should be compiled without the option -DOPENGL.
|
||||
netgen45 is assumed to be the directory downloaded from the above web
|
||||
location archive of Netgen. The library
|
||||
<netgen_installation_path>/lib/libnginterface.a should contain the objects
|
||||
nglib.o (from netgen45/libsrc/interface/nglib.cpp) and ngnewdelete.o
|
||||
(from netgen45/ngtcltk/ngnewdelete.cpp).
|
||||
|
||||
To have that kind of distribution from the version in the above web location you
|
||||
need not to compile Netgen as suggested in the netgen45/README.INSTALL file.
|
||||
Simply modify the Makefiles to remove -DOPENGL from compiler flags
|
||||
list and to add OCC include dir and flags to compiler flags, add the objects
|
||||
nglib.o and ngnewdelete.o to the library libnginterface.a and
|
||||
recompile the libraries only.
|
||||
All this job is done by applying the patch and running the script makeForSalome.sh.
|
||||
|
||||
The suggested patch alters some Netgen sources to compile them.
|
||||
|
||||
Michael SAZONOV
|
||||
m-sazonov@opencascade.com
|
||||
2.5. Patch the installation directory by copying include files
|
||||
needed by NETGEN Plugin. Use the script
|
||||
NETGENPLUGIN_SRC/src/NETGEN/netgen_copy_include_for_salome
|
||||
to achieve that. The first argument is the directory containing
|
||||
the Netgen sources. The second argument is THE_INSTALLATION_PATH
|
||||
|
@ -1,221 +0,0 @@
|
||||
diff -N -r -u netgen43/libsrc/include/spline2d.hpp /tmp/netgen43/libsrc/include/spline2d.hpp
|
||||
--- netgen43/libsrc/include/spline2d.hpp 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ /tmp/netgen43/libsrc/include/spline2d.hpp 2003-12-10 16:28:12.000000000 +0100
|
||||
@@ -0,0 +1 @@
|
||||
+#include "../geom2d/spline2d.hpp"
|
||||
diff -N -r -u netgen43/libsrc/include/splinegeometry2.hpp /tmp/netgen43/libsrc/include/splinegeometry2.hpp
|
||||
--- netgen43/libsrc/include/splinegeometry2.hpp 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ /tmp/netgen43/libsrc/include/splinegeometry2.hpp 2003-12-10 16:28:23.000000000 +0100
|
||||
@@ -0,0 +1 @@
|
||||
+#include "../geom2d/splinegeometry2.hpp"
|
||||
diff -N -r -u netgen43/libsrc/interface/Makefile /tmp/netgen43/libsrc/interface/Makefile
|
||||
--- netgen43/libsrc/interface/Makefile 2003-05-07 16:01:43.000000000 +0200
|
||||
+++ /tmp/netgen43/libsrc/interface/Makefile 2003-12-10 15:59:47.000000000 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-src = nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp readuser.cpp importsolution.cpp
|
||||
+src = writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp readuser.cpp importsolution.cpp nglib.cpp ngnewdelete.cpp
|
||||
#
|
||||
lib = nginterface
|
||||
libpath = libsrc/interface
|
||||
diff -N -r -u netgen43/libsrc/interface/nglib.cpp /tmp/netgen43/libsrc/interface/nglib.cpp
|
||||
--- netgen43/libsrc/interface/nglib.cpp 2003-05-07 16:01:43.000000000 +0200
|
||||
+++ /tmp/netgen43/libsrc/interface/nglib.cpp 2003-12-10 16:32:54.000000000 +0100
|
||||
@@ -23,6 +23,20 @@
|
||||
|
||||
#include "nglib.h"
|
||||
|
||||
+namespace netgen
|
||||
+{
|
||||
+ char geomfilename [100];
|
||||
+
|
||||
+ //Destination for messages, errors, ...
|
||||
+ void Ng_PrintDest(const char * s)
|
||||
+ {
|
||||
+ (*mycout) << s << flush;
|
||||
+ }
|
||||
+
|
||||
+#include <spline2d.hpp>
|
||||
+#include <splinegeometry2.hpp>
|
||||
+}
|
||||
+
|
||||
using namespace netgen;
|
||||
|
||||
// constants and types:
|
||||
@@ -171,8 +185,6 @@
|
||||
// CSG Geometry
|
||||
|
||||
// FlexLexer * lexer;
|
||||
-char geomfilename [100];
|
||||
-
|
||||
|
||||
// 2D Meshing Functions:
|
||||
|
||||
@@ -362,7 +374,18 @@
|
||||
cout << "e(" << readedges.Get(i) << "," << readedges.Get(i+1) << ")" << endl;
|
||||
}
|
||||
*/
|
||||
- geo->AddEdges(readedges);
|
||||
+
|
||||
+ ARRAY< Point<3> > readedges1;
|
||||
+
|
||||
+ for (i = 1; i <= readedges.Size(); i++)
|
||||
+ {
|
||||
+ Point3d readedgesData = readedges.Get(i);
|
||||
+ Point <3> readedges1Data = Point<3>(readedgesData.X(),readedgesData.Y(),readedgesData.Z());
|
||||
+
|
||||
+ readedges1.Append(readedges1Data);
|
||||
+ }
|
||||
+
|
||||
+ geo->AddEdges(readedges1);
|
||||
}
|
||||
|
||||
if (geo->GetStatus() == STLTopology::STL_GOOD || geo->GetStatus() == STLTopology::STL_WARNING) return NG_OK;
|
||||
@@ -472,7 +495,14 @@
|
||||
n = Vec3d(nv[0],nv[1],nv[2]);
|
||||
}
|
||||
|
||||
- readtrias.Append(STLReadTriangle(apts,n));
|
||||
+ Point<3> apts1[3];
|
||||
+ apts1[0] = Point<3>(p1[0],p1[1],p1[2]);
|
||||
+ apts1[1] = Point<3>(p2[0],p2[1],p2[2]);
|
||||
+ apts1[2] = Point<3>(p3[0],p3[1],p3[2]);
|
||||
+
|
||||
+ Vec<3> n1 = Vec<3>(n.X(),n.Y(),n.Z());
|
||||
+
|
||||
+ readtrias.Append(STLReadTriangle(apts1,n1));
|
||||
}
|
||||
|
||||
// add (optional) edges:
|
||||
@@ -487,30 +517,29 @@
|
||||
|
||||
// compatibility functions:
|
||||
|
||||
-void MyError (const char * ch)
|
||||
+void netgen::MyError (const char * ch)
|
||||
{
|
||||
cerr << ch;
|
||||
}
|
||||
|
||||
-//Destination for messages, errors, ...
|
||||
-void Ng_PrintDest(const char * s)
|
||||
-{
|
||||
- (*mycout) << s << flush;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-double GetTime ()
|
||||
+double netgen::GetTime ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
-void ResetTime ()
|
||||
+void netgen::ResetTime ()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
-void MyBeep (int i)
|
||||
+void netgen::MyBeep (int i)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
+void MeshFromSpline2D (SplineGeometry2d & geometry,
|
||||
+ Mesh *& mesh,
|
||||
+ MeshingParameters & mp)
|
||||
+{
|
||||
+ MeshFromSpline2D (geometry, mesh, mp);
|
||||
+}
|
||||
diff -N -r -u netgen43/libsrc/makefile.mach.LINUX /tmp/netgen43/libsrc/makefile.mach.LINUX
|
||||
--- netgen43/libsrc/makefile.mach.LINUX 2003-05-07 16:01:43.000000000 +0200
|
||||
+++ /tmp/netgen43/libsrc/makefile.mach.LINUX 2003-12-10 15:12:18.000000000 +0100
|
||||
@@ -14,7 +14,8 @@
|
||||
#
|
||||
CFLAGS2 =
|
||||
# pg stands for profiling - also in linkflags2
|
||||
-CPLUSPLUSFLAGS2 = -O2 -I/usr/X11R6/include -DLINUX -DOPENGL
|
||||
+#CPLUSPLUSFLAGS2 = -O2 -I/usr/X11R6/include -DLINUX -DOPENGL
|
||||
+CPLUSPLUSFLAGS2 = -O2 -I/usr/X11R6/include -DLINUX
|
||||
# -fomit-frame-pointer
|
||||
# -ffast-math
|
||||
#
|
||||
diff -N -r -u netgen43/libsrc/meshing/improve2.cpp /tmp/netgen43/libsrc/meshing/improve2.cpp
|
||||
--- netgen43/libsrc/meshing/improve2.cpp 2003-05-07 16:01:43.000000000 +0200
|
||||
+++ /tmp/netgen43/libsrc/meshing/improve2.cpp 2003-12-10 15:42:00.000000000 +0100
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "meshing.hpp"
|
||||
#include <opti.hpp>
|
||||
|
||||
-#include <visual.hpp>
|
||||
+/*#include <visual.hpp>*/
|
||||
|
||||
|
||||
namespace netgen
|
||||
diff -N -r -u netgen43/libsrc/meshing/meshing2.cpp /tmp/netgen43/libsrc/meshing/meshing2.cpp
|
||||
--- netgen43/libsrc/meshing/meshing2.cpp 2003-05-07 16:01:43.000000000 +0200
|
||||
+++ /tmp/netgen43/libsrc/meshing/meshing2.cpp 2003-12-10 15:34:35.000000000 +0100
|
||||
@@ -1785,7 +1785,7 @@
|
||||
|
||||
|
||||
#else
|
||||
-void glrender (int wait)
|
||||
+void netgen::glrender (int wait)
|
||||
{
|
||||
;
|
||||
}
|
||||
diff -N -r -u netgen43/libsrc/visualization/stlmeshing.cpp /tmp/netgen43/libsrc/visualization/stlmeshing.cpp
|
||||
--- netgen43/libsrc/visualization/stlmeshing.cpp 2003-05-07 16:01:43.000000000 +0200
|
||||
+++ /tmp/netgen43/libsrc/visualization/stlmeshing.cpp 2003-12-10 15:52:53.000000000 +0100
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <stlgeom.hpp>
|
||||
|
||||
#include <meshing.hpp>
|
||||
-#include <visual.hpp>
|
||||
+/*#include <visual.hpp>*/
|
||||
|
||||
namespace netgen
|
||||
{
|
||||
diff -N -r -u netgen43/Makefile /tmp/netgen43/Makefile
|
||||
--- netgen43/Makefile 2003-05-07 16:01:43.000000000 +0200
|
||||
+++ /tmp/netgen43/Makefile 2003-12-10 15:11:41.000000000 +0100
|
||||
@@ -35,7 +35,8 @@
|
||||
.SUFFIXES: .cpp .o
|
||||
#
|
||||
#
|
||||
-CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -DOPENGL
|
||||
+#CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -DOPENGL
|
||||
+CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include
|
||||
LINKFLAGS1 = -lGL -lGLU -lX11 -lXext -lXmu
|
||||
#
|
||||
CPLUSPLUSFLAGS = $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGS3)
|
||||
diff -N -r -u netgen43/makeForSalome.sh /tmp/netgen43/makeForSalome.sh
|
||||
--- netgen43/makeForSalome.sh 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ /tmp/netgen43/makeForSalome.sh 2004-01-05 12:33:59.000000000 +0100
|
||||
@@ -0,0 +1,26 @@
|
||||
+#! /bin/sh
|
||||
+cp ngtcltk/ngnewdelete.* libsrc/interface/
|
||||
+
|
||||
+MACHINE=LINUX
|
||||
+export MACHINE
|
||||
+make -C libsrc/csg
|
||||
+make -C libsrc/general
|
||||
+make -C libsrc/geom2d
|
||||
+make -C libsrc/gprim
|
||||
+make -C libsrc/interface
|
||||
+make -C libsrc/linalg
|
||||
+make -C libsrc/meshing
|
||||
+make -C libsrc/opti
|
||||
+make -C libsrc/stlgeom
|
||||
+
|
||||
+if [ ! -d install ] ; then
|
||||
+ mkdir install
|
||||
+fi
|
||||
+
|
||||
+cp -r lib install/
|
||||
+
|
||||
+if [ ! -d install/include ] ; then
|
||||
+ mkdir install/include
|
||||
+fi
|
||||
+
|
||||
+cp libsrc/interface/nglib.h install/include
|
@ -1,45 +0,0 @@
|
||||
diff -ur netgen-4.5.old/libsrc/makefile.inc netgen-4.5.new/libsrc/makefile.inc
|
||||
--- netgen-4.5/libsrc/makefile.inc 2006-04-27 13:12:54.000000000 +0400
|
||||
+++ netgen-4.5/libsrc/makefile.inc 2006-09-05 14:16:32.000000000 +0400
|
||||
@@ -14,7 +14,7 @@
|
||||
#
|
||||
include $(LIBSRC_DIR)/makefile.mach.$(MACHINE)
|
||||
#
|
||||
-CPLUSPLUSFLAGS1 = -c -fPIC -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) \
|
||||
+CPLUSPLUSFLAGS1 = -c -m64 -D_OCC64 -fPIC -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) \
|
||||
-DOCCGEOMETRY -DOCC52 -DHAVE_IOSTREAM -DHAVE_LIMITS_H
|
||||
#
|
||||
ARFLAGS = r
|
||||
diff -ur netgen-4.5.old/libsrc/makefile.mach.LINUX64 netgen-4.5.new/libsrc/makefile.mach.LINUX64
|
||||
--- netgen-4.5/libsrc/makefile.mach.LINUX64 2006-03-29 15:09:32.000000000 +0400
|
||||
+++ netgen-4.5/libsrc/makefile.mach.LINUX64 2006-09-07 15:48:39.000000000 +0400
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
#
|
||||
CFLAGS2 =
|
||||
-CPLUSPLUSFLAGS2 = -pg -march=nocona -O2 -DLINUX -DOPENGL \
|
||||
+CPLUSPLUSFLAGS2 = -pg -march=nocona -O2 -DLINUX \
|
||||
-ftemplate-depth-99 -finline-limit=100000 \
|
||||
-fforce-addr -funroll-loops \
|
||||
-DTRAFO -DNGSOLVE -DnoADDON -DnoLAPACK -DnoFAST \
|
||||
@@ -23,7 +23,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
-LINKFLAGS2 = -pg -L/usr/openwin/lib64 -L/usr/X11R6/lib64 -L/usr/lib/GL3.5 -L/usr/lib64
|
||||
+LINKFLAGS2 = -fPIC -pg -L/usr/openwin/lib64 -L/usr/X11R6/lib64 -L/usr/lib/GL3.5 -L/usr/lib64
|
||||
|
||||
|
||||
SYSLIB2 = -lstdc++
|
||||
diff -ur netgen-4.5.old/Makefile netgen-4.5.new/Makefile
|
||||
--- netgen-4.5/Makefile 2006-03-29 15:09:12.000000000 +0400
|
||||
+++ netgen-4.5/Makefile 2006-09-07 15:46:07.000000000 +0400
|
||||
@@ -72,7 +72,7 @@
|
||||
#
|
||||
#CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -DOPENGL
|
||||
|
||||
-CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) -I./ngsolve/include -Ilibsrc/interface -DOPENGL -I$(METISINC)
|
||||
+CPLUSPLUSFLAGS1 = -c -m64 -D_OCC64 -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) -I./ngsolve/include -Ilibsrc/interface -I$(METISINC)
|
||||
|
||||
LINKFLAGS1 = -lGL -lGLU -lX11 -lXext -lXmu
|
||||
#
|
1014
src/NETGEN/netgen49ForSalome.patch
Normal file
897
src/NETGEN/netgen50ForSalome.patch
Normal file
@ -0,0 +1,897 @@
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/meshing/meshtype.cpp netgen-5.0.0.patched/libsrc/meshing/meshtype.cpp
|
||||
--- netgen-5.0.0.orig/libsrc/meshing/meshtype.cpp 2012-11-09 19:15:04.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/meshing/meshtype.cpp 2013-02-21 17:46:13.000000000 +0400
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <mystdlib.h>
|
||||
+#include <float.h> // to get DBL_MIN defined
|
||||
|
||||
#include "meshing.hpp"
|
||||
|
||||
@@ -666,7 +667,8 @@
|
||||
|
||||
double det = trans.Det();
|
||||
|
||||
- if (det <= 0)
|
||||
+ // if (det <= 0)
|
||||
+ if (det <= DBL_MIN) // avoid FPE
|
||||
err += 1e12;
|
||||
else
|
||||
err += frob * frob / det;
|
||||
@@ -722,7 +724,8 @@
|
||||
|
||||
double det = trans(0,0)*trans(1,1)-trans(1,0)*trans(0,1);
|
||||
|
||||
- if (det <= 0)
|
||||
+ // if (det <= 0)
|
||||
+ if (det <= DBL_MIN) // avoid FPE
|
||||
{
|
||||
dd = 0;
|
||||
return 1e12;
|
||||
@@ -806,7 +809,8 @@
|
||||
= dtrans(0,0) * trans(1,1) - trans(0,1) * dtrans(1,0)
|
||||
+ trans(0,0) * dtrans(1,1) - dtrans(0,1) * trans(1,0);
|
||||
|
||||
- if (det <= 0)
|
||||
+ // if (det <= 0)
|
||||
+ if (det <= DBL_MIN) // avoid FPE
|
||||
err += 1e12;
|
||||
else
|
||||
{
|
||||
@@ -856,7 +860,8 @@
|
||||
frob /= 2;
|
||||
|
||||
double det = trans.Det();
|
||||
- if (det <= 0)
|
||||
+ //if (det <= 0)
|
||||
+ if (det <= DBL_MIN) // avoid FPE
|
||||
err += 1e12;
|
||||
else
|
||||
err += frob * frob / det;
|
||||
@@ -1864,7 +1869,8 @@
|
||||
case PYRAMID:
|
||||
{
|
||||
double noz = 1-p(2);
|
||||
- if (noz == 0.0) noz = 1e-10;
|
||||
+ //if (noz == 0.0) noz = 1e-10;
|
||||
+ if (noz <= DBL_MIN) noz = 1e-10; // avoid FPE
|
||||
|
||||
double xi = p(0) / noz;
|
||||
double eta = p(1) / noz;
|
||||
@@ -2030,7 +2036,8 @@
|
||||
|
||||
double det = -trans.Det();
|
||||
|
||||
- if (det <= 0)
|
||||
+ //if (det <= 0)
|
||||
+ if (det <= DBL_MIN) // avoid FPE
|
||||
err += 1e12;
|
||||
else
|
||||
err += frob * frob * frob / det;
|
||||
@@ -2102,7 +2109,8 @@
|
||||
ddet *= -1;
|
||||
|
||||
|
||||
- if (det <= 0)
|
||||
+ //if (det <= 0)
|
||||
+ if (det <= DBL_MIN) // avoid FPE
|
||||
err += 1e12;
|
||||
else
|
||||
{
|
||||
@@ -2184,7 +2192,7 @@
|
||||
|
||||
det *= -1;
|
||||
|
||||
- if (det <= 0)
|
||||
+ if (det <= DBL_MIN)
|
||||
err += 1e12;
|
||||
else
|
||||
{
|
||||
@@ -2513,10 +2521,10 @@
|
||||
|
||||
MeshingParameters :: MeshingParameters ()
|
||||
{
|
||||
- optimize3d = "cmdmustm";
|
||||
+ optimize3d = (char*)"cmdmustm"; // optimize3d = "cmdmustm";
|
||||
//optimize3d = "cmdmstm";
|
||||
optsteps3d = 3;
|
||||
- optimize2d = "smsmsmSmSmSm";
|
||||
+ optimize2d = (char*)"smsmsmSmSmSm"; // optimize2d = "smsmsmSmSmSm";
|
||||
optsteps2d = 3;
|
||||
opterrpow = 2;
|
||||
blockfill = 1;
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/meshing/meshtype.hpp netgen-5.0.0.patched/libsrc/meshing/meshtype.hpp
|
||||
--- netgen-5.0.0.orig/libsrc/meshing/meshtype.hpp 2012-11-09 19:15:04.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/meshing/meshtype.hpp 2013-02-21 17:46:13.000000000 +0400
|
||||
@@ -15,6 +15,7 @@
|
||||
Classes for NETGEN
|
||||
*/
|
||||
|
||||
+class Mesh; // added due to compilation errors on some platforms
|
||||
|
||||
|
||||
enum ELEMENT_TYPE {
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/meshing/smoothing2.cpp netgen-5.0.0.patched/libsrc/meshing/smoothing2.cpp
|
||||
--- netgen-5.0.0.orig/libsrc/meshing/smoothing2.cpp 2012-11-09 19:15:04.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/meshing/smoothing2.cpp 2013-02-25 11:20:05.000000000 +0400
|
||||
@@ -200,7 +200,8 @@
|
||||
vgrad = 0;
|
||||
badness = 0;
|
||||
|
||||
- ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
|
||||
+ //normal already computed: ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
|
||||
+ n = ld.normal;
|
||||
pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2;
|
||||
|
||||
// meshthis -> ProjectPoint (surfi, pp1);
|
||||
@@ -258,7 +259,8 @@
|
||||
vgrad = 0;
|
||||
badness = 0;
|
||||
|
||||
- ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
|
||||
+ //normal already computed: ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
|
||||
+ n = ld.normal;
|
||||
|
||||
pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2;
|
||||
|
||||
@@ -417,7 +419,8 @@
|
||||
vgrad = 0;
|
||||
badness = 0;
|
||||
|
||||
- ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
|
||||
+ //normal already computed: ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
|
||||
+ n = ld.normal;
|
||||
|
||||
pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2;
|
||||
|
||||
@@ -489,7 +492,8 @@
|
||||
vgrad = 0;
|
||||
badness = 0;
|
||||
|
||||
- ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
|
||||
+ //normal already computed: ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
|
||||
+ n = ld.normal;
|
||||
|
||||
// pp1 = sp1;
|
||||
// pp1.Add2 (x.Get(1), t1, x.Get(2), t2);
|
||||
@@ -916,7 +920,7 @@
|
||||
{
|
||||
mesh[pi] = Point<3> (origp);
|
||||
}
|
||||
-
|
||||
+ break; // exit as <fact> is not used anymore
|
||||
}
|
||||
}
|
||||
}
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/Partition_Inter3d.cxx netgen-5.0.0.patched/libsrc/occ/Partition_Inter3d.cxx
|
||||
--- netgen-5.0.0.orig/libsrc/occ/Partition_Inter3d.cxx 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/Partition_Inter3d.cxx 2013-02-25 13:51:48.000000000 +0400
|
||||
@@ -243,9 +243,11 @@
|
||||
Standard_Integer i, nbExt = anExtPS.NbExt();
|
||||
Extrema_POnSurf aPOnSurf;
|
||||
for (i = 1; i <= nbExt; ++i )
|
||||
- if (anExtPS.Value( i ) <= TolE) // V6.3
|
||||
- // if (anExtPS.SquareDistance( i ) <= TolE) // V6.5
|
||||
- {
|
||||
+ // porting to OCCT6.5.1
|
||||
+ //if (anExtPS.Value( i ) <= TolE) // V6.3
|
||||
+ // if (anExtPS.SquareDistance( i ) <= TolE) // V6.5
|
||||
+ if (anExtPS.SquareDistance( i ) <= TolE * TolE)
|
||||
+ {
|
||||
aPOnSurf = anExtPS.Point( i );
|
||||
break;
|
||||
}
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/Partition_Loop2d.cxx netgen-5.0.0.patched/libsrc/occ/Partition_Loop2d.cxx
|
||||
--- netgen-5.0.0.orig/libsrc/occ/Partition_Loop2d.cxx 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/Partition_Loop2d.cxx 2013-02-25 13:48:15.000000000 +0400
|
||||
@@ -210,7 +210,7 @@
|
||||
Cc->D1(uc, PC, CTg1);
|
||||
if (!isForward) CTg1.Reverse();
|
||||
|
||||
- Standard_Real anglemin = 3 * PI, tolAng = 1.e-8;
|
||||
+ Standard_Real anglemin = 3 * M_PI, tolAng = 1.e-8;
|
||||
|
||||
// select an edge whose first derivative is most left of CTg1
|
||||
// ie an angle between Tg1 and CTg1 is least
|
||||
@@ -234,7 +234,7 @@
|
||||
// -PI < angle < PI
|
||||
Standard_Real angle = Tg1.Angle(CTg1);
|
||||
|
||||
- if (PI - Abs(angle) <= tolAng)
|
||||
+ if (M_PI - Abs(angle) <= tolAng)
|
||||
{
|
||||
// an angle is too close to PI; assure that an angle sign really
|
||||
// reflects an edge position: +PI - an edge is worst,
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/Partition_Spliter.cxx netgen-5.0.0.patched/libsrc/occ/Partition_Spliter.cxx
|
||||
--- netgen-5.0.0.orig/libsrc/occ/Partition_Spliter.cxx 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/Partition_Spliter.cxx 2013-02-25 13:55:10.000000000 +0400
|
||||
@@ -1169,8 +1169,10 @@
|
||||
for (; j<=nbj && ok; ++j) {
|
||||
if (Extrema.IsMin(j)) {
|
||||
hasMin = Standard_True;
|
||||
- ok = Extrema.Value(j) <= tol; // V6.3
|
||||
+ // porting to OCCT6.5.1
|
||||
+ //ok = Extrema.Value(j) <= tol; // V6.3
|
||||
// ok = Extrema.SquareDistance(j) <= tol; // V6.5
|
||||
+ ok = Extrema.SquareDistance(j) <= tol * tol;
|
||||
}
|
||||
}
|
||||
}
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/occconstruction.cpp netgen-5.0.0.patched/libsrc/occ/occconstruction.cpp
|
||||
--- netgen-5.0.0.orig/libsrc/occ/occconstruction.cpp 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/occconstruction.cpp 2013-02-21 17:46:13.000000000 +0400
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <BRepAlgoAPI_Common.hxx>
|
||||
#include <BRepAlgoAPI_Fuse.hxx>
|
||||
#include <BRepAlgoAPI_Section.hxx>
|
||||
-#include <BRepOffsetAPI_Sewing.hxx>
|
||||
+//#include <BRepOffsetAPI_Sewing.hxx>
|
||||
//#include <BRepAlgo_Sewing.hxx>
|
||||
#include <BRepOffsetAPI_MakeOffsetShape.hxx>
|
||||
#include <ShapeFix_Shape.hxx>
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/occgenmesh.cpp netgen-5.0.0.patched/libsrc/occ/occgenmesh.cpp
|
||||
--- netgen-5.0.0.orig/libsrc/occ/occgenmesh.cpp 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/occgenmesh.cpp 2013-02-21 17:46:13.000000000 +0400
|
||||
@@ -57,6 +57,8 @@
|
||||
|
||||
|
||||
|
||||
+
|
||||
+ static // useless out of this file
|
||||
double ComputeH (double kappa)
|
||||
{
|
||||
double hret;
|
||||
@@ -74,8 +76,7 @@
|
||||
}
|
||||
|
||||
|
||||
-
|
||||
-
|
||||
+ static // useless out of this file
|
||||
void RestrictHTriangle (gp_Pnt2d & par0, gp_Pnt2d & par1, gp_Pnt2d & par2,
|
||||
BRepLProp_SLProps * prop, Mesh & mesh, int depth, double h = 0)
|
||||
{
|
||||
@@ -171,8 +172,8 @@
|
||||
if(h < 1e-4*maxside)
|
||||
return;
|
||||
|
||||
-
|
||||
- if (h > 30) return;
|
||||
+ // commented to restrict H on a large sphere for example
|
||||
+ //if (h > 30) return;
|
||||
}
|
||||
|
||||
if (h < maxside && depth < 10)
|
||||
@@ -231,6 +232,7 @@
|
||||
|
||||
|
||||
|
||||
+ static // useless out of this file
|
||||
void DivideEdge (TopoDS_Edge & edge, Array<MeshPoint> & ps,
|
||||
Array<double> & params, Mesh & mesh)
|
||||
{
|
||||
@@ -250,8 +252,8 @@
|
||||
hvalue[0] = 0;
|
||||
pnt = c->Value(s0);
|
||||
|
||||
- double olddist = 0;
|
||||
- double dist = 0;
|
||||
+ //double olddist = 0; -- useless variables
|
||||
+ //double dist = 0;
|
||||
|
||||
int tmpVal = (int)(DIVIDEEDGESECTIONS);
|
||||
|
||||
@@ -259,15 +261,19 @@
|
||||
{
|
||||
oldpnt = pnt;
|
||||
pnt = c->Value(s0+(i/double(DIVIDEEDGESECTIONS))*(s1-s0));
|
||||
+ // -- no more than 1 segment per <edge length>/DIVIDEEDGESECTIONS
|
||||
hvalue[i] = hvalue[i-1] +
|
||||
- 1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))*
|
||||
- pnt.Distance(oldpnt);
|
||||
+ // 1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))*
|
||||
+ // pnt.Distance(oldpnt);
|
||||
+ min( 1.0,
|
||||
+ 1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))*
|
||||
+ pnt.Distance(oldpnt));
|
||||
|
||||
//(*testout) << "mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z())) " << mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))
|
||||
// << " pnt.Distance(oldpnt) " << pnt.Distance(oldpnt) << endl;
|
||||
|
||||
- olddist = dist;
|
||||
- dist = pnt.Distance(oldpnt);
|
||||
+ //olddist = dist; -- useless variables
|
||||
+ //dist = pnt.Distance(oldpnt);
|
||||
}
|
||||
|
||||
// nsubedges = int(ceil(hvalue[DIVIDEEDGESECTIONS]));
|
||||
@@ -282,7 +288,10 @@
|
||||
{
|
||||
if (hvalue[i1]/hvalue[DIVIDEEDGESECTIONS]*nsubedges >= i)
|
||||
{
|
||||
- params[i] = s0+(i1/double(DIVIDEEDGESECTIONS))*(s1-s0);
|
||||
+ // -- for nsubedges comparable to DIVIDEEDGESECTIONS
|
||||
+ //params[i] = s0+(i1/double(DIVIDEEDGESECTIONS))*(s1-s0);
|
||||
+ double d1 = i1 - (hvalue[i1] - i*hvalue[DIVIDEEDGESECTIONS]/nsubedges)/(hvalue[i1]-hvalue[i1-1]);
|
||||
+ params[i] = s0+(d1/double(DIVIDEEDGESECTIONS))*(s1-s0);
|
||||
pnt = c->Value(params[i]);
|
||||
ps[i-1] = MeshPoint (Point3d(pnt.X(), pnt.Y(), pnt.Z()));
|
||||
i++;
|
||||
@@ -326,6 +335,7 @@
|
||||
(*testout) << "nedges = " << nedges << endl;
|
||||
|
||||
double eps = 1e-6 * geom.GetBoundingBox().Diam();
|
||||
+ const double eps2 = eps * eps; // -- small optimization
|
||||
|
||||
for (int i = 1; i <= nvertices; i++)
|
||||
{
|
||||
@@ -335,7 +345,8 @@
|
||||
bool exists = 0;
|
||||
if (merge_solids)
|
||||
for (PointIndex pi = 1; pi <= mesh.GetNP(); pi++)
|
||||
- if ( Dist2 (mesh[pi], Point<3>(mp)) < eps*eps)
|
||||
+ //if ( Dist2 (mesh[pi], Point<3>(mp)) < eps*eps)
|
||||
+ if ( Dist2 (mesh[pi], Point<3>(mp)) < eps2 ) // -- small optimization
|
||||
{
|
||||
exists = 1;
|
||||
break;
|
||||
@@ -365,6 +376,7 @@
|
||||
{
|
||||
TopoDS_Face face = TopoDS::Face(exp1.Current());
|
||||
int facenr = geom.fmap.FindIndex(face);
|
||||
+ if ( facenr < 1 ) continue; // -- to support SALOME sub-meshes
|
||||
|
||||
if (face2solid[0][facenr-1] == 0)
|
||||
face2solid[0][facenr-1] = solidnr;
|
||||
@@ -384,6 +396,7 @@
|
||||
int facenr = 0;
|
||||
int edgenr = 0;
|
||||
|
||||
+ edgenr = mesh.GetNSeg(); // to support SALOME sub-meshes
|
||||
|
||||
(*testout) << "faces = " << geom.fmap.Extent() << endl;
|
||||
int curr = 0;
|
||||
@@ -445,6 +458,7 @@
|
||||
//(*testout) << "ignoring degenerated edge" << endl;
|
||||
continue;
|
||||
}
|
||||
+ if ( geom.emap.FindIndex(edge) < 1 ) continue; // to support SALOME sub-meshes
|
||||
|
||||
if (geom.vmap.FindIndex(TopExp::FirstVertex (edge)) ==
|
||||
geom.vmap.FindIndex(TopExp::LastVertex (edge)))
|
||||
@@ -482,15 +496,64 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- Point<3> fp = occ2ng (BRep_Tool::Pnt (TopExp::FirstVertex (edge)));
|
||||
- Point<3> lp = occ2ng (BRep_Tool::Pnt (TopExp::LastVertex (edge)));
|
||||
+ TopoDS_Iterator vIt( edge, false );
|
||||
+ TopoDS_Vertex v1 = TopoDS::Vertex( vIt.Value() ); vIt.Next();
|
||||
+ TopoDS_Vertex v2 = TopoDS::Vertex( vIt.Value() );
|
||||
+ if ( v1.Orientation() == TopAbs_REVERSED )
|
||||
+ std::swap( v1, v2 );
|
||||
+ const bool isClosedEdge = v1.IsSame( v2 );
|
||||
+
|
||||
+ Point<3> fp = occ2ng (BRep_Tool::Pnt (v1));
|
||||
+ Point<3> lp = occ2ng (BRep_Tool::Pnt (v2));
|
||||
+ double tol2 = std::min( eps*eps, 1e-6 * Dist2( fp, lp ));
|
||||
+ if ( isClosedEdge )
|
||||
+ tol2 = BRep_Tool::Tolerance( v1 ) * BRep_Tool::Tolerance( v1 );
|
||||
|
||||
pnums[0] = -1;
|
||||
pnums.Last() = -1;
|
||||
for (PointIndex pi = 1; pi < first_ep; pi++)
|
||||
{
|
||||
- if (Dist2 (mesh[pi], fp) < eps*eps) pnums[0] = pi;
|
||||
- if (Dist2 (mesh[pi], lp) < eps*eps) pnums.Last() = pi;
|
||||
+ if (Dist2 (mesh[pi], fp) < tol2) pnums[0] = pi;
|
||||
+ if (Dist2 (mesh[pi], lp) < tol2) pnums.Last() = pi;
|
||||
+ }
|
||||
+ if (( isClosedEdge && pnums[0] != pnums.Last() ) ||
|
||||
+ ( !isClosedEdge && pnums[0] == pnums.Last() ))
|
||||
+ pnums[0] = pnums.Last() = -1;
|
||||
+ if ( pnums[0] == -1 || pnums.Last() == -1 )
|
||||
+ {
|
||||
+ // take into account a possible large gap between a vertex and an edge curve
|
||||
+ // end and a large vertex tolerance covering the whole edge
|
||||
+ if ( pnums[0] == -1 )
|
||||
+ {
|
||||
+ double tol = BRep_Tool::Tolerance( v1 );
|
||||
+ for (PointIndex pi = 1; pi < first_ep; pi++)
|
||||
+ if (pi != pnums.Last() && Dist2 (mesh[pi], fp) < 2*tol*tol)
|
||||
+ pnums[0] = pi;
|
||||
+
|
||||
+ if ( pnums[0] == -1 )
|
||||
+ pnums[0] = first_ep-1- nvertices + geom.vmap.FindIndex ( v1 );
|
||||
+ }
|
||||
+ if ( isClosedEdge )
|
||||
+ {
|
||||
+ pnums.Last() = pnums[0];
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if ( pnums.Last() == -1 )
|
||||
+ {
|
||||
+ double tol = BRep_Tool::Tolerance( v2 );
|
||||
+ for (PointIndex pi = 1; pi < first_ep; pi++)
|
||||
+ if (pi != pnums[0] && Dist2 (mesh[pi], lp) < 2*tol*tol)
|
||||
+ pnums.Last() = pi;
|
||||
+
|
||||
+ if ( pnums.Last() == -1 )
|
||||
+ pnums.Last() = first_ep-1-nvertices + geom.vmap.FindIndex ( v2 );
|
||||
+ }
|
||||
+
|
||||
+ if ( Dist2( fp, mesh[PointIndex(pnums[0])]) >
|
||||
+ Dist2( lp, mesh[PointIndex(pnums.Last())]))
|
||||
+ std::swap( pnums[0], pnums.Last() );
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1458,3 +1521,4 @@
|
||||
}
|
||||
|
||||
#endif
|
||||
+
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/occgeom.cpp netgen-5.0.0.patched/libsrc/occ/occgeom.cpp
|
||||
--- netgen-5.0.0.orig/libsrc/occ/occgeom.cpp 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/occgeom.cpp 2013-02-21 17:46:13.000000000 +0400
|
||||
@@ -8,6 +8,8 @@
|
||||
#include "ShapeAnalysis_CheckSmallFace.hxx"
|
||||
#include "ShapeAnalysis_DataMapOfShapeListOfReal.hxx"
|
||||
#include "ShapeAnalysis_Surface.hxx"
|
||||
+#include <BRepTopAdaptor_FClass2d.hxx> // -- to optimize Project() and FastProject()
|
||||
+#include <TopAbs_State.hxx>
|
||||
#include "BRepAlgoAPI_Fuse.hxx"
|
||||
#include "BRepCheck_Analyzer.hxx"
|
||||
#include "BRepLib.hxx"
|
||||
@@ -16,10 +18,17 @@
|
||||
#include "ShapeFix_FixSmallFace.hxx"
|
||||
#include "Partition_Spliter.hxx"
|
||||
|
||||
-
|
||||
namespace netgen
|
||||
{
|
||||
- void OCCGeometry :: PrintNrShapes ()
|
||||
+ // free data used to optimize Project() and FastProject()
|
||||
+ OCCGeometry::~OCCGeometry()
|
||||
+ {
|
||||
+ NCollection_DataMap<int,BRepTopAdaptor_FClass2d*>::Iterator it(fclsmap);
|
||||
+ for (; it.More(); it.Next())
|
||||
+ delete it.Value();
|
||||
+ }
|
||||
+
|
||||
+ void OCCGeometry :: PrintNrShapes ()
|
||||
{
|
||||
TopExp_Explorer e;
|
||||
int count = 0;
|
||||
@@ -951,25 +960,58 @@
|
||||
}
|
||||
|
||||
|
||||
+ // returns a projector and a classifier for the given surface
|
||||
+ void OCCGeometry::GetFaceTools(int surfi, Handle(ShapeAnalysis_Surface)& proj,
|
||||
+ BRepTopAdaptor_FClass2d*& cls) const
|
||||
+ {
|
||||
+ //MSV: organize caching projector in the map
|
||||
+ if (fprjmap.IsBound(surfi))
|
||||
+ {
|
||||
+ proj = fprjmap.Find(surfi);
|
||||
+ cls = fclsmap.Find(surfi);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ const TopoDS_Face& aFace = TopoDS::Face(fmap(surfi));
|
||||
+ Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
|
||||
+ proj = new ShapeAnalysis_Surface(aSurf);
|
||||
+ fprjmap.Bind(surfi, proj);
|
||||
+ cls = new BRepTopAdaptor_FClass2d(aFace,Precision::Confusion());
|
||||
+ fclsmap.Bind(surfi, cls);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
-
|
||||
- void OCCGeometry :: Project (int surfi, Point<3> & p) const
|
||||
+ // void OCCGeometry :: Project (int surfi, Point<3> & p) const
|
||||
+ bool OCCGeometry :: Project (int surfi, Point<3> & p, double& u, double& v) const
|
||||
{
|
||||
static int cnt = 0;
|
||||
if (++cnt % 1000 == 0) cout << "Project cnt = " << cnt << endl;
|
||||
|
||||
gp_Pnt pnt(p(0), p(1), p(2));
|
||||
|
||||
- double u,v;
|
||||
- Handle( Geom_Surface ) thesurf = BRep_Tool::Surface(TopoDS::Face(fmap(surfi)));
|
||||
- Handle( ShapeAnalysis_Surface ) su = new ShapeAnalysis_Surface( thesurf );
|
||||
- gp_Pnt2d suval = su->ValueOfUV ( pnt, BRep_Tool::Tolerance( TopoDS::Face(fmap(surfi)) ) );
|
||||
- suval.Coord( u, v);
|
||||
- pnt = thesurf->Value( u, v );
|
||||
-
|
||||
-
|
||||
+ // -- Optimization: use cached projector and classifier
|
||||
+ // double u,v;
|
||||
+ // Handle( Geom_Surface ) thesurf = BRep_Tool::Surface(TopoDS::Face(fmap(surfi)));
|
||||
+ // Handle( ShapeAnalysis_Surface ) su = new ShapeAnalysis_Surface( thesurf );
|
||||
+ // gp_Pnt2d suval = su->ValueOfUV ( pnt, BRep_Tool::Tolerance( TopoDS::Face(fmap(surfi)) ) );
|
||||
+ // suval.Coord( u, v);
|
||||
+ // pnt = thesurf->Value( u, v );
|
||||
+
|
||||
+ Handle(ShapeAnalysis_Surface) proj;
|
||||
+ BRepTopAdaptor_FClass2d *cls;
|
||||
+ GetFaceTools(surfi, proj, cls);
|
||||
+
|
||||
+ gp_Pnt2d p2d = proj->ValueOfUV(pnt, Precision::Confusion());
|
||||
+ if (cls->Perform(p2d) == TopAbs_OUT)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+ pnt = proj->Value(p2d);
|
||||
+ p2d.Coord(u, v);
|
||||
+
|
||||
p = Point<3> (pnt.X(), pnt.Y(), pnt.Z());
|
||||
|
||||
+ return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -979,54 +1021,69 @@
|
||||
{
|
||||
gp_Pnt p(ap(0), ap(1), ap(2));
|
||||
|
||||
- Handle(Geom_Surface) surface = BRep_Tool::Surface(TopoDS::Face(fmap(surfi)));
|
||||
-
|
||||
- gp_Pnt x = surface->Value (u,v);
|
||||
-
|
||||
- if (p.SquareDistance(x) <= sqr(PROJECTION_TOLERANCE)) return true;
|
||||
-
|
||||
- gp_Vec du, dv;
|
||||
-
|
||||
- surface->D1(u,v,x,du,dv);
|
||||
-
|
||||
- int count = 0;
|
||||
-
|
||||
- gp_Pnt xold;
|
||||
- gp_Vec n;
|
||||
- double det, lambda, mu;
|
||||
-
|
||||
- do {
|
||||
- count++;
|
||||
-
|
||||
- n = du^dv;
|
||||
-
|
||||
- det = Det3 (n.X(), du.X(), dv.X(),
|
||||
- n.Y(), du.Y(), dv.Y(),
|
||||
- n.Z(), du.Z(), dv.Z());
|
||||
-
|
||||
- if (det < 1e-15) return false;
|
||||
-
|
||||
- lambda = Det3 (n.X(), p.X()-x.X(), dv.X(),
|
||||
- n.Y(), p.Y()-x.Y(), dv.Y(),
|
||||
- n.Z(), p.Z()-x.Z(), dv.Z())/det;
|
||||
-
|
||||
- mu = Det3 (n.X(), du.X(), p.X()-x.X(),
|
||||
- n.Y(), du.Y(), p.Y()-x.Y(),
|
||||
- n.Z(), du.Z(), p.Z()-x.Z())/det;
|
||||
-
|
||||
- u += lambda;
|
||||
- v += mu;
|
||||
-
|
||||
- xold = x;
|
||||
- surface->D1(u,v,x,du,dv);
|
||||
-
|
||||
- } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50);
|
||||
-
|
||||
- // (*testout) << "FastProject count: " << count << endl;
|
||||
-
|
||||
- if (count == 50) return false;
|
||||
-
|
||||
- ap = Point<3> (x.X(), x.Y(), x.Z());
|
||||
+ // -- Optimization: use cached projector and classifier
|
||||
+ // Handle(Geom_Surface) surface = BRep_Tool::Surface(TopoDS::Face(fmap(surfi)));
|
||||
+ //
|
||||
+ // gp_Pnt x = surface->Value (u,v);
|
||||
+ //
|
||||
+ // if (p.SquareDistance(x) <= sqr(PROJECTION_TOLERANCE)) return true;
|
||||
+ //
|
||||
+ // gp_Vec du, dv;
|
||||
+ //
|
||||
+ // surface->D1(u,v,x,du,dv);
|
||||
+ //
|
||||
+ // int count = 0;
|
||||
+ //
|
||||
+ // gp_Pnt xold;
|
||||
+ // gp_Vec n;
|
||||
+ // double det, lambda, mu;
|
||||
+ //
|
||||
+ // do {
|
||||
+ // count++;
|
||||
+ //
|
||||
+ // n = du^dv;
|
||||
+ //
|
||||
+ // det = Det3 (n.X(), du.X(), dv.X(),
|
||||
+ // n.Y(), du.Y(), dv.Y(),
|
||||
+ // n.Z(), du.Z(), dv.Z());
|
||||
+ //
|
||||
+ // if (det < 1e-15) return false;
|
||||
+ //
|
||||
+ // lambda = Det3 (n.X(), p.X()-x.X(), dv.X(),
|
||||
+ // n.Y(), p.Y()-x.Y(), dv.Y(),
|
||||
+ // n.Z(), p.Z()-x.Z(), dv.Z())/det;
|
||||
+ //
|
||||
+ // mu = Det3 (n.X(), du.X(), p.X()-x.X(),
|
||||
+ // n.Y(), du.Y(), p.Y()-x.Y(),
|
||||
+ // n.Z(), du.Z(), p.Z()-x.Z())/det;
|
||||
+ //
|
||||
+ // u += lambda;
|
||||
+ // v += mu;
|
||||
+ //
|
||||
+ // xold = x;
|
||||
+ // surface->D1(u,v,x,du,dv);
|
||||
+ //
|
||||
+ // } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50);
|
||||
+ //
|
||||
+ // // (*testout) << "FastProject count: " << count << endl;
|
||||
+ //
|
||||
+ // if (count == 50) return false;
|
||||
+ //
|
||||
+ // ap = Point<3> (x.X(), x.Y(), x.Z());
|
||||
+ Handle(ShapeAnalysis_Surface) proj;
|
||||
+ BRepTopAdaptor_FClass2d *cls;
|
||||
+ GetFaceTools(surfi, proj, cls);
|
||||
+
|
||||
+ gp_Pnt2d p2d = proj->NextValueOfUV(gp_Pnt2d(u,v), p, Precision::Confusion());
|
||||
+ if (cls->Perform(p2d) == TopAbs_OUT)
|
||||
+ {
|
||||
+ //cout << "Projection fails" << endl;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ p = proj->Value(p2d);
|
||||
+ p2d.Coord(u, v);
|
||||
+ ap = Point<3> (p.X(), p.Y(), p.Z());
|
||||
|
||||
return true;
|
||||
}
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/occgeom.hpp netgen-5.0.0.patched/libsrc/occ/occgeom.hpp
|
||||
--- netgen-5.0.0.orig/libsrc/occ/occgeom.hpp 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/occgeom.hpp 2013-02-21 17:46:13.000000000 +0400
|
||||
@@ -15,8 +15,8 @@
|
||||
#include "Geom_Curve.hxx"
|
||||
#include "Geom2d_Curve.hxx"
|
||||
#include "Geom_Surface.hxx"
|
||||
-#include "GeomAPI_ProjectPointOnSurf.hxx"
|
||||
-#include "GeomAPI_ProjectPointOnCurve.hxx"
|
||||
+// #include "GeomAPI_ProjectPointOnSurf.hxx"
|
||||
+// #include "GeomAPI_ProjectPointOnCurve.hxx"
|
||||
#include "BRepTools.hxx"
|
||||
#include "TopExp.hxx"
|
||||
#include "BRepBuilderAPI_MakeVertex.hxx"
|
||||
@@ -42,8 +42,8 @@
|
||||
#include "Geom_Curve.hxx"
|
||||
#include "Geom2d_Curve.hxx"
|
||||
#include "Geom_Surface.hxx"
|
||||
-#include "GeomAPI_ProjectPointOnSurf.hxx"
|
||||
-#include "GeomAPI_ProjectPointOnCurve.hxx"
|
||||
+// #include "GeomAPI_ProjectPointOnSurf.hxx"
|
||||
+// #include "GeomAPI_ProjectPointOnCurve.hxx"
|
||||
#include "TopoDS_Wire.hxx"
|
||||
#include "BRepTools_WireExplorer.hxx"
|
||||
#include "BRepTools.hxx"
|
||||
@@ -68,7 +68,7 @@
|
||||
#include "IGESToBRep_Reader.hxx"
|
||||
#include "Interface_Static.hxx"
|
||||
#include "GeomAPI_ExtremaCurveCurve.hxx"
|
||||
-#include "Standard_ErrorHandler.hxx"
|
||||
+//#include "Standard_ErrorHandler.hxx"
|
||||
#include "Standard_Failure.hxx"
|
||||
#include "ShapeUpgrade_ShellSewing.hxx"
|
||||
#include "ShapeFix_Shape.hxx"
|
||||
@@ -80,6 +80,10 @@
|
||||
#include "ShapeAnalysis.hxx"
|
||||
#include "ShapeBuild_ReShape.hxx"
|
||||
|
||||
+// -- Optimization: to use cached projector and classifier
|
||||
+#include <NCollection_DataMap.hxx>
|
||||
+class Handle_ShapeAnalysis_Surface;
|
||||
+class BRepTopAdaptor_FClass2d;
|
||||
|
||||
// Philippose - 29/01/2009
|
||||
// OpenCascade XDE Support
|
||||
@@ -192,6 +196,9 @@
|
||||
class OCCGeometry : public NetgenGeometry
|
||||
{
|
||||
Point<3> center;
|
||||
+ // -- Optimization: to use cached projector and classifier
|
||||
+ mutable NCollection_DataMap<int,Handle_ShapeAnalysis_Surface> fprjmap;
|
||||
+ mutable NCollection_DataMap<int,BRepTopAdaptor_FClass2d*> fclsmap;
|
||||
|
||||
public:
|
||||
TopoDS_Shape shape;
|
||||
@@ -247,6 +254,8 @@
|
||||
virtual void Save (string filename) const;
|
||||
|
||||
|
||||
+ ~OCCGeometry(); // -- to free cached projector and classifier
|
||||
+
|
||||
void BuildFMap();
|
||||
|
||||
Box<3> GetBoundingBox()
|
||||
@@ -266,9 +275,14 @@
|
||||
Point<3> Center()
|
||||
{ return center;}
|
||||
|
||||
- void Project (int surfi, Point<3> & p) const;
|
||||
+ // void Project (int surfi, Point<3> & p) const; -- optimization
|
||||
+ bool Project (int surfi, Point<3> & p, double& u, double& v) const;
|
||||
bool FastProject (int surfi, Point<3> & ap, double& u, double& v) const;
|
||||
|
||||
+ // -- Optimization: to use cached projector and classifier
|
||||
+ void GetFaceTools(int surfi, Handle(ShapeAnalysis_Surface)& proj,
|
||||
+ BRepTopAdaptor_FClass2d*& cls) const;
|
||||
+
|
||||
OCCSurface GetSurface (int surfi)
|
||||
{
|
||||
cout << "OCCGeometry::GetSurface using PLANESPACE" << endl;
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/occmeshsurf.cpp netgen-5.0.0.patched/libsrc/occ/occmeshsurf.cpp
|
||||
--- netgen-5.0.0.orig/libsrc/occ/occmeshsurf.cpp 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/occmeshsurf.cpp 2013-02-25 13:27:49.000000000 +0400
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <meshing.hpp>
|
||||
#include <GeomLProp_SLProps.hxx>
|
||||
#include <ShapeAnalysis_Surface.hxx>
|
||||
+#include <GeomAPI_ProjectPointOnCurve.hxx> // -- moved here from occgeom.hpp
|
||||
|
||||
|
||||
namespace netgen
|
||||
@@ -434,23 +435,33 @@
|
||||
|
||||
void MeshOptimize2dOCCSurfaces :: ProjectPoint (INDEX surfind, Point<3> & p) const
|
||||
{
|
||||
- geometry.Project (surfind, p);
|
||||
+ // geometry.Project (surfind, p); -- signature of Project() changed for optimization
|
||||
+ double u, v;
|
||||
+ geometry.Project (surfind, p, u, v);
|
||||
}
|
||||
|
||||
|
||||
int MeshOptimize2dOCCSurfaces :: ProjectPointGI (INDEX surfind, Point<3> & p, PointGeomInfo & gi) const
|
||||
{
|
||||
- double u = gi.u;
|
||||
- double v = gi.v;
|
||||
+ //double u = gi.u;
|
||||
+ //double v = gi.v;
|
||||
|
||||
Point<3> hp = p;
|
||||
- if (geometry.FastProject (surfind, hp, u, v))
|
||||
- {
|
||||
- p = hp;
|
||||
- return 1;
|
||||
- }
|
||||
- ProjectPoint (surfind, p);
|
||||
- return CalcPointGeomInfo (surfind, gi, p);
|
||||
+ // -- u and v are computed by FastProject() and Project(), no need to call CalcPointGeomInfo()
|
||||
+ // if (geometry.FastProject (surfind, hp, u, v))
|
||||
+ // {
|
||||
+ // p = hp;
|
||||
+ // return 1;
|
||||
+ // }
|
||||
+ // ProjectPoint (surfind, p);
|
||||
+ // return CalcPointGeomInfo (surfind, gi, p);
|
||||
+ bool ok;
|
||||
+ if (gi.trignum > 0)
|
||||
+ ok = geometry.FastProject (surfind, hp, gi.u, gi.v);
|
||||
+ else
|
||||
+ ok = geometry.Project (surfind, hp, gi.u, gi.v);
|
||||
+ p = hp;
|
||||
+ return ok;
|
||||
}
|
||||
|
||||
|
||||
@@ -680,7 +691,8 @@
|
||||
if (!geometry.FastProject (surfi, hnewp, u, v))
|
||||
{
|
||||
// cout << "Fast projection to surface fails! Using OCC projection" << endl;
|
||||
- geometry.Project (surfi, hnewp);
|
||||
+ // geometry.Project (surfi, hnewp); -- Project() changed for optimization
|
||||
+ geometry.Project (surfi, hnewp, u, v);
|
||||
}
|
||||
|
||||
newgi.trignum = 1;
|
||||
@@ -689,7 +701,7 @@
|
||||
}
|
||||
|
||||
newp = hnewp;
|
||||
- }
|
||||
+ }//; -- to compile with -Wall -pedantic
|
||||
|
||||
|
||||
void OCCRefinementSurfaces ::
|
||||
@@ -708,14 +720,18 @@
|
||||
hnewp = Point<3> (pnt.X(), pnt.Y(), pnt.Z());
|
||||
newp = hnewp;
|
||||
newgi = ap1;
|
||||
- };
|
||||
+ }
|
||||
|
||||
|
||||
void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi) const
|
||||
{
|
||||
if (surfi > 0)
|
||||
- geometry.Project (surfi, p);
|
||||
- };
|
||||
+ // geometry.Project (surfi, p); -- Project() changed for optimization
|
||||
+ {
|
||||
+ double u, v;
|
||||
+ geometry.Project (surfi, p, u, v);
|
||||
+ }
|
||||
+ }//; -- to compile with -Wall -pedantic
|
||||
|
||||
void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi) const
|
||||
{
|
||||
@@ -723,9 +739,10 @@
|
||||
if (!geometry.FastProject (surfi, p, gi.u, gi.v))
|
||||
{
|
||||
cout << "Fast projection to surface fails! Using OCC projection" << endl;
|
||||
- geometry.Project (surfi, p);
|
||||
+ double u, v;
|
||||
+ geometry.Project (surfi, p, u, v);
|
||||
}
|
||||
- };
|
||||
+ }
|
||||
|
||||
|
||||
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/utilities.h netgen-5.0.0.patched/libsrc/occ/utilities.h
|
||||
--- netgen-5.0.0.orig/libsrc/occ/utilities.h 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/utilities.h 2013-02-21 17:47:08.000000000 +0400
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
+#include <iomanip>
|
||||
#include <cstdlib>
|
||||
// #include "SALOME_Log.hxx"
|
||||
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/stlgeom/stlgeommesh.cpp netgen-5.0.0.patched/libsrc/stlgeom/stlgeommesh.cpp
|
||||
--- netgen-5.0.0.orig/libsrc/stlgeom/stlgeommesh.cpp 2012-11-09 19:15:04.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/stlgeom/stlgeommesh.cpp 2013-02-21 17:52:07.000000000 +0400
|
||||
@@ -1435,7 +1435,8 @@
|
||||
/*
|
||||
if (!optstring || strlen(optstring) == 0)
|
||||
{
|
||||
- mparam.optimize2d = "smcm";
|
||||
+ //mparam.optimize2d = (char*)"smcm";
|
||||
+ mparam.optimize2d = (char*)"smcm";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1453,7 +1454,7 @@
|
||||
mesh -> LoadLocalMeshSize (mparam.meshsizefilename);
|
||||
mesh -> CalcLocalHFromSurfaceCurvature (mparam.grading,
|
||||
stlparam.resthsurfmeshcurvfac);
|
||||
- mparam.optimize2d = "cmsmSm";
|
||||
+ mparam.optimize2d = "(char*)cmsmSm";
|
||||
STLSurfaceOptimization (*stlgeometry, *mesh, mparam);
|
||||
#ifdef STAT_STREAM
|
||||
(*statout) << GetTime() << " & ";
|
||||
@@ -1560,7 +1561,8 @@
|
||||
/*
|
||||
if (!optstring || strlen(optstring) == 0)
|
||||
{
|
||||
- mparam.optimize3d = "cmdmstm";
|
||||
+ //mparam.optimize3d = "cmdmstm";
|
||||
+ mparam.optimize3d = (char*)"cmdmstm";
|
||||
}
|
||||
else
|
||||
{
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/nglib/nglib.h netgen-5.0.0.patched/nglib/nglib.h
|
||||
--- netgen-5.0.0.orig/nglib/nglib.h 2012-11-09 19:15:00.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/nglib/nglib.h 2013-02-21 17:47:08.000000000 +0400
|
||||
@@ -24,7 +24,7 @@
|
||||
// Philippose - 14.02.2009
|
||||
// Modifications for creating a DLL in Windows
|
||||
#ifdef WIN32
|
||||
- #ifdef NGLIB_EXPORTS || nglib_EXPORTS
|
||||
+ #if defined NGLIB_EXPORTS || defined nglib_EXPORTS
|
||||
#define DLL_HEADER __declspec(dllexport)
|
||||
#else
|
||||
#define DLL_HEADER __declspec(dllimport)
|
39
src/NETGEN/netgen_copy_include_for_salome
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
src_dir=$1
|
||||
install_dir=$2
|
||||
|
||||
if ! test -d $src_dir/libsrc ; then
|
||||
echo "No dir $src_dir/libsrc ... Bye"
|
||||
exit 1
|
||||
fi
|
||||
if ! test -d $install_dir/share/netgen ; then
|
||||
echo "No dir $install_dir/share/netgen ... Bye"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dest_dir=$install_dir/share/netgen/include
|
||||
mkdir -p $dest_dir > /dev/null 2>&1
|
||||
cp -af $src_dir/libsrc/csg/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/general/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/geom2d/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/gprim/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/interface/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/linalg/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/meshing/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/stlgeom/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/visualization/*.hpp $dest_dir
|
||||
|
||||
cp -af $src_dir/libsrc/occ/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/occ/*.hxx $dest_dir
|
||||
cp -af $src_dir/libsrc/occ/*.ixx $dest_dir
|
||||
cp -af $src_dir/libsrc/occ/*.jxx $dest_dir
|
||||
cp -af $src_dir/libsrc/occ/*.h $dest_dir
|
||||
|
||||
cp -af $src_dir/libsrc/include/mystdlib.h $dest_dir
|
||||
cp -af $src_dir/libsrc/include/mydefs.hpp $dest_dir
|
||||
# cp -af $src_dir/libsrc/include/parallel.hpp $dest_dir
|
||||
|
||||
rm -f $dest_dir/ngexception.hpp
|
||||
rm -f $dest_dir/paralleltop.hpp
|
||||
rm -f $dest_dir/soldata.hpp
|
@ -1,24 +1,22 @@
|
||||
# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is 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
|
||||
#
|
||||
|
||||
# -* Makefile *-
|
||||
# Author : Edward AGAPOV (OCC)
|
||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
||||
@ -41,6 +39,8 @@ salomeinclude_HEADERS = \
|
||||
NETGENPlugin_Hypothesis_i.hxx \
|
||||
NETGENPlugin_Hypothesis_2D.hxx \
|
||||
NETGENPlugin_Hypothesis_2D_i.hxx \
|
||||
NETGENPlugin_Hypothesis_3D_i.hxx \
|
||||
NETGENPlugin_Hypothesis_2D_ONLY_i.hxx \
|
||||
NETGENPlugin_SimpleHypothesis_2D.hxx \
|
||||
NETGENPlugin_SimpleHypothesis_3D.hxx \
|
||||
NETGENPlugin_SimpleHypothesis_2D_i.hxx \
|
||||
@ -64,6 +64,8 @@ dist_libNETGENEngine_la_SOURCES = \
|
||||
NETGENPlugin_Hypothesis_i.cxx \
|
||||
NETGENPlugin_Hypothesis_2D.cxx \
|
||||
NETGENPlugin_Hypothesis_2D_i.cxx \
|
||||
NETGENPlugin_Hypothesis_3D_i.cxx \
|
||||
NETGENPlugin_Hypothesis_2D_ONLY_i.cxx \
|
||||
NETGENPlugin_Mesher.cxx \
|
||||
NETGENPlugin_SimpleHypothesis_2D.cxx \
|
||||
NETGENPlugin_SimpleHypothesis_3D.cxx \
|
||||
@ -77,16 +79,28 @@ libNETGENEngine_la_CPPFLAGS = \
|
||||
$(MED_CXXFLAGS) \
|
||||
$(GEOM_CXXFLAGS) \
|
||||
$(CAS_CPPFLAGS) \
|
||||
$(VTK_INCLUDES) \
|
||||
$(NETGEN_INCLUDES) \
|
||||
$(SMESH_CXXFLAGS) \
|
||||
$(CORBA_CXXFLAGS) \
|
||||
$(CORBA_INCLUDES) \
|
||||
$(BOOST_CPPFLAGS) \
|
||||
-I$(top_builddir)/idl \
|
||||
-I$(top_builddir)/salome_adm/unix
|
||||
-I$(top_builddir)/idl
|
||||
|
||||
libNETGENEngine_la_LDFLAGS = \
|
||||
../NETGEN/libNETGEN.la \
|
||||
libNETGENEngine_la_LDFLAGS = $(NETGEN_LIBS)
|
||||
|
||||
libNETGENEngine_la_LDFLAGS += \
|
||||
../../idl/libSalomeIDLNETGENPLUGIN.la \
|
||||
$(SMESH_LDFLAGS) -lSMESHimpl -lSMESHEngine -lStdMeshersEngine \
|
||||
$(KERNEL_LDFLAGS) -lSalomeGenericObj
|
||||
$(CAS_LDPATH) -lTKernel -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES -lTKMesh -lTKSTL -lTKG3d -lTKTopAlgo -lTKG2d -lTKBool -lTKGeomAlgo -lTKOffset -lTKGeomBase -lTKBO \
|
||||
-lTKMath -lTKFillet -lTKMeshVS -lTKPrim -lTKSTEPBase -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF -lFWOSPlugin \
|
||||
$(GEOM_LDFLAGS) -lGEOMbasic \
|
||||
$(MED_LDFLAGS) -lSalomeIDLMED \
|
||||
$(SMESH_LDFLAGS) -lSMESHimpl -lSMESHEngine -lSMESHUtils -lStdMeshersEngine -lStdMeshers -lSMESHDS -lSMDS -lSMESHControls \
|
||||
$(KERNEL_LDFLAGS) -lSalomeGenericObj -lSalomeNS -lSALOMELocalTrace -lOpUtil
|
||||
|
||||
# Scripts to be installed.
|
||||
#dist_salomescript_DATA= NETGENPluginDC.py
|
||||
mypkgpythondir = $(salomepythondir)/salome/NETGENPlugin
|
||||
mypkgpython_PYTHON = \
|
||||
__init__.py \
|
||||
NETGENPluginBuilder.py
|
||||
|
465
src/NETGENPlugin/NETGENPluginBuilder.py
Normal file
@ -0,0 +1,465 @@
|
||||
# Copyright (C) 2007-2012 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
|
||||
#
|
||||
|
||||
##
|
||||
# @package NETGENPluginBuilder
|
||||
# Python API for the NETGEN meshing plug-in module.
|
||||
|
||||
from salome.smesh.smesh_algorithm import Mesh_Algorithm
|
||||
from salome.smesh.smeshBuilder import AssureGeomPublished, ParseParameters, IsEqual
|
||||
|
||||
# import NETGENPlugin module if possible
|
||||
noNETGENPlugin = 0
|
||||
try:
|
||||
import NETGENPlugin
|
||||
except ImportError:
|
||||
noNETGENPlugin = 1
|
||||
pass
|
||||
|
||||
#----------------------------
|
||||
# Mesh algo type identifiers
|
||||
#----------------------------
|
||||
|
||||
## Algorithm type: Netgen tetrahedron 3D algorithm, see NETGEN_3D_Algorithm
|
||||
NETGEN_3D = "NETGEN_3D"
|
||||
## Algorithm type: Netgen tetrahedron 1D-2D-3D algorithm, see NETGEN_1D2D3D_Algorithm
|
||||
NETGEN_1D2D3D = "NETGEN_2D3D"
|
||||
## Algorithm type: Netgen triangle 1D-2D algorithm, see NETGEN_1D2D_Algorithm
|
||||
NETGEN_1D2D = "NETGEN_2D"
|
||||
## Algorithm type: Netgen triangle 2D algorithm, see NETGEN_2D_Only_Algorithm
|
||||
NETGEN_2D = "NETGEN_2D_ONLY"
|
||||
## Algorithm type: Synonim of NETGEN_1D2D3D, see NETGEN_1D2D3D_Algorithm
|
||||
NETGEN_FULL = NETGEN_1D2D3D
|
||||
## Algorithm type: Synonim of NETGEN_3D, see NETGEN_3D_Algorithm
|
||||
NETGEN = NETGEN_3D
|
||||
## Algorithm type: Synonim of NETGEN_1D2D3D, see NETGEN_1D2D3D_Algorithm
|
||||
FULL_NETGEN = NETGEN_FULL
|
||||
|
||||
#----------------------------
|
||||
# Hypothesis type enumeration
|
||||
#----------------------------
|
||||
|
||||
## Hypothesis type enumeration: complex hypothesis
|
||||
# (full set of parameters can be specified),
|
||||
# see NETGEN_Algorithm.Parameters()
|
||||
SOLE = 0
|
||||
## Hypothesis type enumeration: simple hypothesis
|
||||
# (only major parameters are specified),
|
||||
# see NETGEN_Algorithm.Parameters()
|
||||
SIMPLE = 1
|
||||
|
||||
#----------------------
|
||||
# Fineness enumeration
|
||||
#----------------------
|
||||
|
||||
## Fineness enumeration: very coarse quality of mesh,
|
||||
# see NETGEN_Algorithm.SetFineness()
|
||||
VeryCoarse = 0
|
||||
## Fineness enumeration: coarse quality of mesh,
|
||||
# see NETGEN_Algorithm.SetFineness()
|
||||
Coarse = 1
|
||||
## Fineness enumeration: moderate quality of mesh,
|
||||
# see NETGEN_Algorithm.SetFineness()
|
||||
Moderate = 2
|
||||
## Fineness enumeration: fine quality of mesh,
|
||||
# see NETGEN_Algorithm.SetFineness()
|
||||
Fine = 3
|
||||
## Fineness enumeration: very fine quality of mesh,
|
||||
# see NETGEN_Algorithm.SetFineness()
|
||||
VeryFine = 4
|
||||
## Fineness enumeration: custom quality of mesh specified by other parameters),
|
||||
# see NETGEN_Algorithm.SetFineness()
|
||||
Custom = 5
|
||||
|
||||
#----------------------
|
||||
# Algorithms
|
||||
#----------------------
|
||||
|
||||
## Base of all NETGEN algorithms.
|
||||
#
|
||||
# This class provides common methods for all algorithms implemented by NETGEN plugin.
|
||||
# @note This class must not be instantiated directly.
|
||||
class NETGEN_Algorithm(Mesh_Algorithm):
|
||||
|
||||
## Private constructor
|
||||
# @param mesh parent mesh object algorithm is assigned to
|
||||
# @param geom geometry (shape/sub-shape) algorithm is assigned to;
|
||||
# if it is @c 0 (default), the algorithm is assigned to the main shape
|
||||
def __init__(self, mesh, geom=0):
|
||||
Mesh_Algorithm.__init__(self)
|
||||
if noNETGENPlugin: print "Warning: NETGENPlugin module unavailable"
|
||||
self.Create(mesh, geom, self.algoType, "libNETGENEngine.so")
|
||||
self.params = None
|
||||
pass
|
||||
|
||||
## Sets @c MaxSize parameter
|
||||
# @param theSize new value of the @c MaxSize parameter
|
||||
def SetMaxSize(self, theSize):
|
||||
if self.Parameters(): self.params.SetMaxSize(theSize)
|
||||
pass
|
||||
|
||||
## Sets @c MinSize parameter
|
||||
# @param theSize new value of the @c MinSize parameter
|
||||
def SetMinSize(self, theSize):
|
||||
if self.Parameters(): self.params.SetMinSize(theSize)
|
||||
pass
|
||||
|
||||
## Sets @c Optimize flag
|
||||
# @param theVal new value of the @c Optimize parameter
|
||||
def SetOptimize(self, theVal):
|
||||
if self.Parameters(): self.params.SetOptimize(theVal)
|
||||
pass
|
||||
|
||||
## Sets @c Fineness parameter
|
||||
# @param theFineness new value of the @c Fineness parameter; it can be:
|
||||
# @ref VeryCoarse, @ref Coarse, @ref Moderate, @ref Fine, @ref VeryFine or @ref Custom
|
||||
def SetFineness(self, theFineness):
|
||||
if self.Parameters(): self.params.SetFineness(theFineness)
|
||||
pass
|
||||
|
||||
## Sets @c GrowthRate parameter
|
||||
# @param theRate new value of the @c GrowthRate parameter
|
||||
def SetGrowthRate(self, theRate):
|
||||
if self.Parameters(): self.params.SetGrowthRate(theRate)
|
||||
pass
|
||||
|
||||
## Creates meshing hypothesis according to the chosen algorithm type
|
||||
# and initializes it with default parameters
|
||||
# @param which hypothesis type; can be either @ref SOLE (default) or @ref SIMPLE
|
||||
# @return hypothesis object
|
||||
def Parameters(self, which=SOLE):
|
||||
if self.algoType == NETGEN_1D2D:
|
||||
if which == SIMPLE:
|
||||
hypType = "NETGEN_SimpleParameters_2D"
|
||||
else:
|
||||
hypType = "NETGEN_Parameters_2D"
|
||||
elif self.algoType == NETGEN_1D2D3D:
|
||||
if which == SIMPLE:
|
||||
hypType = "NETGEN_SimpleParameters_3D"
|
||||
else:
|
||||
hypType = "NETGEN_Parameters"
|
||||
elif self.algoType == NETGEN_2D:
|
||||
hypType = "NETGEN_Parameters_2D_ONLY"
|
||||
else:
|
||||
hypType = "NETGEN_Parameters_3D"
|
||||
|
||||
if self.params and self.params.GetName() != hypType:
|
||||
self.mesh.RemoveHypothesis( self.params, self.geom )
|
||||
self.params = None
|
||||
if not self.params:
|
||||
self.params = self.Hypothesis(hypType, [],"libNETGENEngine.so",UseExisting=0)
|
||||
|
||||
return self.params
|
||||
|
||||
pass # end of NETGEN_Algorithm class
|
||||
|
||||
|
||||
## Tetrahedron 1D-2D-3D algorithm.
|
||||
#
|
||||
# It can be created by calling smesh.Mesh.Tetrahedron( smesh.NETGEN_1D2D3D, geom=0 ).
|
||||
# This algorithm generates all 1D (edges), 2D (faces) and 3D (volumes) elements
|
||||
# for given geometrical shape.
|
||||
class NETGEN_1D2D3D_Algorithm(NETGEN_Algorithm):
|
||||
|
||||
## name of the dynamic method in smesh.Mesh class
|
||||
# @internal
|
||||
meshMethod = "Tetrahedron"
|
||||
## type of algorithm used with helper function in smesh.Mesh class
|
||||
# @internal
|
||||
algoType = NETGEN_1D2D3D
|
||||
## doc string of the method
|
||||
# @internal
|
||||
docHelper = "Creates tetrahedron 3D algorithm for solids"
|
||||
|
||||
## Private constructor.
|
||||
# @param mesh parent mesh object algorithm is assigned to
|
||||
# @param geom geometry (shape/sub-shape) algorithm is assigned to;
|
||||
# if it is @c 0 (default), the algorithm is assigned to the main shape
|
||||
def __init__(self, mesh, geom=0):
|
||||
NETGEN_Algorithm.__init__(self, mesh, geom)
|
||||
pass
|
||||
|
||||
## Sets @c SecondOrder flag
|
||||
# @param theVal new value of the @c SecondOrder parameter
|
||||
def SetSecondOrder(self, theVal):
|
||||
if self.Parameters(): self.params.SetSecondOrder(theVal)
|
||||
pass
|
||||
|
||||
## Sets @c NbSegPerEdge parameter
|
||||
# @param theVal new value of the @c NbSegPerEdge parameter
|
||||
def SetNbSegPerEdge(self, theVal):
|
||||
if self.Parameters(): self.params.SetNbSegPerEdge(theVal)
|
||||
pass
|
||||
|
||||
## Sets @c NbSegPerRadius parameter
|
||||
# @param theVal new value of the @c NbSegPerRadius parameter
|
||||
def SetNbSegPerRadius(self, theVal):
|
||||
if self.Parameters(): self.params.SetNbSegPerRadius(theVal)
|
||||
pass
|
||||
|
||||
## Sets @c QuadAllowed flag
|
||||
# @param toAllow new value of the @c QuadAllowed parameter (@c True by default)
|
||||
def SetQuadAllowed(self, toAllow=True):
|
||||
if self.Parameters(): self.params.SetQuadAllowed(toAllow)
|
||||
pass
|
||||
|
||||
## Sets number of segments overriding the value set by SetLocalLength()
|
||||
# @param theVal new value of number of segments parameter
|
||||
def SetNumberOfSegments(self, theVal):
|
||||
self.Parameters(SIMPLE).SetNumberOfSegments(theVal)
|
||||
pass
|
||||
|
||||
## Sets number of segments overriding the value set by SetNumberOfSegments()
|
||||
# @param theVal new value of local length parameter
|
||||
def SetLocalLength(self, theVal):
|
||||
self.Parameters(SIMPLE).SetLocalLength(theVal)
|
||||
pass
|
||||
|
||||
## Defines @c MaxElementArea parameter of @c NETGEN_SimpleParameters_3D hypothesis.
|
||||
# Overrides value set by LengthFromEdges()
|
||||
# @param area new value of @c MaxElementArea parameter
|
||||
def MaxElementArea(self, area):
|
||||
self.Parameters(SIMPLE).SetMaxElementArea(area)
|
||||
pass
|
||||
|
||||
## Defines @c LengthFromEdges parameter of @c NETGEN_SimpleParameters_3D hypothesis.
|
||||
# Overrides value set by MaxElementArea()
|
||||
def LengthFromEdges(self):
|
||||
self.Parameters(SIMPLE).LengthFromEdges()
|
||||
pass
|
||||
|
||||
## Defines @c LengthFromFaces parameter of @c NETGEN_SimpleParameters_3D hypothesis.
|
||||
# Overrides value set by MaxElementVolume()
|
||||
def LengthFromFaces(self):
|
||||
self.Parameters(SIMPLE).LengthFromFaces()
|
||||
pass
|
||||
|
||||
## Defines @c MaxElementVolume parameter of @c NETGEN_SimpleParameters_3D hypothesis.
|
||||
# Overrides value set by LengthFromFaces()
|
||||
# @param vol new value of @c MaxElementVolume parameter
|
||||
def MaxElementVolume(self, vol):
|
||||
self.Parameters(SIMPLE).SetMaxElementVolume(vol)
|
||||
pass
|
||||
|
||||
pass # end of NETGEN_1D2D3D_Algorithm class
|
||||
|
||||
|
||||
## Triangle NETGEN 1D-2D algorithm.
|
||||
#
|
||||
# It can be created by calling smesh.Mesh.Triangle( smesh.NETGEN_1D2D, geom=0 )
|
||||
#
|
||||
# This algorithm generates 1D (edges) and 2D (faces) elements
|
||||
# for given geometrical shape.
|
||||
class NETGEN_1D2D_Algorithm(NETGEN_1D2D3D_Algorithm):
|
||||
|
||||
## name of the dynamic method in smesh.Mesh class
|
||||
# @internal
|
||||
meshMethod = "Triangle"
|
||||
## type of algorithm used with helper function in smesh.Mesh class
|
||||
# @internal
|
||||
algoType = NETGEN_1D2D
|
||||
## doc string of the method
|
||||
# @internal
|
||||
docHelper = "Creates triangle 2D algorithm for faces"
|
||||
|
||||
## Private constructor.
|
||||
# @param mesh parent mesh object algorithm is assigned to
|
||||
# @param geom geometry (shape/sub-shape) algorithm is assigned to;
|
||||
# if it is @c 0 (default), the algorithm is assigned to the main shape
|
||||
def __init__(self, mesh, geom=0):
|
||||
NETGEN_1D2D3D_Algorithm.__init__(self, mesh, geom)
|
||||
pass
|
||||
|
||||
pass # end of NETGEN_1D2D_Algorithm class
|
||||
|
||||
|
||||
## Triangle NETGEN 2D algorithm
|
||||
#
|
||||
# It can be created by calling smesh.Mesh.Triangle( smesh.NETGEN_2D, geom=0 )
|
||||
#
|
||||
# This algorithm generates only 2D (faces) elements for given geometrical shape
|
||||
# and, in contrast to NETGEN_1D2D_Algorithm class, should be used in conjunction
|
||||
# with other 1D meshing algorithm.
|
||||
class NETGEN_2D_Only_Algorithm(NETGEN_Algorithm):
|
||||
|
||||
## name of the dynamic method in smesh.Mesh class
|
||||
# @internal
|
||||
meshMethod = "Triangle"
|
||||
## type of algorithm used with helper function in smesh.Mesh class
|
||||
# @internal
|
||||
algoType = NETGEN_2D
|
||||
## doc string of the method
|
||||
# @internal
|
||||
docHelper = "Creates triangle 2D algorithm for faces"
|
||||
|
||||
## Private constructor.
|
||||
# @param mesh parent mesh object algorithm is assigned to
|
||||
# @param geom geometry (shape/sub-shape) algorithm is assigned to;
|
||||
# if it is @c 0 (default), the algorithm is assigned to the main shape
|
||||
def __init__(self, mesh, geom=0):
|
||||
NETGEN_Algorithm.__init__(self, mesh, geom)
|
||||
pass
|
||||
|
||||
## Defines @c MaxElementArea parameter of hypothesis basing on the definition of the
|
||||
# maximum area of each triangle
|
||||
# @param area maximum area value of each triangle
|
||||
# @param UseExisting if \c True - searches for an existing hypothesis created with the
|
||||
# same parameters, else (default) - creates a new one
|
||||
# @return hypothesis object
|
||||
def MaxElementArea(self, area, UseExisting=0):
|
||||
compFun = lambda hyp, args: IsEqual(hyp.GetMaxElementArea(), args[0])
|
||||
hyp = self.Hypothesis("MaxElementArea", [area], UseExisting=UseExisting,
|
||||
CompareMethod=compFun)
|
||||
hyp.SetMaxElementArea(area)
|
||||
return hyp
|
||||
|
||||
## Defines @c LengthFromEdges hypothesis to build triangles
|
||||
# based on the length of the edges taken from the wire
|
||||
# @return hypothesis object
|
||||
def LengthFromEdges(self):
|
||||
hyp = self.Hypothesis("LengthFromEdges", UseExisting=1, CompareMethod=self.CompareEqualHyp)
|
||||
return hyp
|
||||
|
||||
## Sets @c QuadAllowed flag.
|
||||
# @param toAllow new value of the @c QuadAllowed parameter (@c True by default)
|
||||
# @return hypothesis object
|
||||
def SetQuadAllowed(self, toAllow=True):
|
||||
if not self.params:
|
||||
# use simple hyps
|
||||
hasSimpleHyps = False
|
||||
simpleHyps = ["QuadranglePreference","LengthFromEdges","MaxElementArea"]
|
||||
for hyp in self.mesh.GetHypothesisList( self.geom ):
|
||||
if hyp.GetName() in simpleHyps:
|
||||
hasSimpleHyps = True
|
||||
if hyp.GetName() == "QuadranglePreference":
|
||||
if not toAllow: # remove QuadranglePreference
|
||||
self.mesh.RemoveHypothesis( self.geom, hyp )
|
||||
else:
|
||||
return hyp
|
||||
return None
|
||||
pass
|
||||
pass
|
||||
if hasSimpleHyps:
|
||||
if toAllow: # add QuadranglePreference
|
||||
return self.Hypothesis("QuadranglePreference", UseExisting=1, CompareMethod=self.CompareEqualHyp)
|
||||
return None
|
||||
pass
|
||||
self.Parameters().SetQuadAllowed( toAllow )
|
||||
return self.params
|
||||
|
||||
pass # end of NETGEN_2D_Only_Algorithm class
|
||||
|
||||
|
||||
## Tetrahedron 3D algorithm
|
||||
#
|
||||
# It can be created by calling smesh.Mesh.Tetrahedron() or smesh.Mesh.Tetrahedron( smesh.NETGEN, geom=0 )
|
||||
#
|
||||
# This algorithm generates only 3D (volumes) elements for given geometrical shape
|
||||
# and, in contrast to NETGEN_1D2D3D_Algorithm class, should be used in conjunction
|
||||
# with other 1D and 2D meshing algorithms.
|
||||
class NETGEN_3D_Algorithm(NETGEN_Algorithm):
|
||||
|
||||
## name of the dynamic method in smesh.Mesh class
|
||||
# @internal
|
||||
meshMethod = "Tetrahedron"
|
||||
## type of algorithm used with helper function in smesh.Mesh class
|
||||
# @internal
|
||||
algoType = NETGEN
|
||||
## flag pointing either this algorithm should be used by default in dynamic method
|
||||
# of smesh.Mesh class
|
||||
# @internal
|
||||
isDefault = True
|
||||
## doc string of the method
|
||||
# @internal
|
||||
docHelper = "Creates tetrahedron 3D algorithm for solids"
|
||||
|
||||
## Private constructor.
|
||||
# @param mesh parent mesh object algorithm is assigned to
|
||||
# @param geom geometry (shape/sub-shape) algorithm is assigned to;
|
||||
# if it is @c 0 (default), the algorithm is assigned to the main shape
|
||||
def __init__(self, mesh, geom=0):
|
||||
NETGEN_Algorithm.__init__(self, mesh, geom)
|
||||
pass
|
||||
|
||||
## Defines @c MaxElementVolume hypothesis to specify the maximum volume value of each tetrahedron
|
||||
# @param vol maximum volume value of each tetrahedron
|
||||
# @param UseExisting if \c True - searches for the existing hypothesis created with
|
||||
# the same parameters, else (default) - creates a new one
|
||||
# @return hypothesis object
|
||||
def MaxElementVolume(self, vol, UseExisting=0):
|
||||
compFun = lambda hyp, args: IsEqual(hyp.GetMaxElementVolume(), args[0])
|
||||
hyp = self.Hypothesis("MaxElementVolume", [vol], UseExisting=UseExisting,
|
||||
CompareMethod=compFun)
|
||||
hyp.SetMaxElementVolume(vol)
|
||||
return hyp
|
||||
|
||||
pass # end of NETGEN_3D_Algorithm class
|
||||
|
||||
|
||||
## Triangle (helper) 1D-2D algorithm
|
||||
#
|
||||
# This is the helper class that is used just to allow creating of create NETGEN_1D2D algorithm
|
||||
# by calling smesh.Mesh.Triangle( smesh.NETGEN, geom=0 ); this is required for backward compatibility
|
||||
# with old Python scripts.
|
||||
#
|
||||
# @note This class (and corresponding smesh.Mesh function) is obsolete;
|
||||
# use smesh.Mesh.Triangle( smesh.NETGEN_1D2D, geom=0 ) instead.
|
||||
class NETGEN_1D2D_Algorithm_2(NETGEN_1D2D_Algorithm):
|
||||
|
||||
## name of the dynamic method in smesh.Mesh class
|
||||
# @internal
|
||||
algoType = NETGEN
|
||||
|
||||
## Private constructor.
|
||||
# @param mesh parent mesh object algorithm is assigned to
|
||||
# @param geom geometry (shape/sub-shape) algorithm is assigned to;
|
||||
# if it is @c 0 (default), the algorithm is assigned to the main shape
|
||||
def __init__(self, mesh, geom=0):
|
||||
self.algoType = NETGEN_1D2D
|
||||
NETGEN_1D2D_Algorithm.__init__(self,mesh, geom)
|
||||
pass
|
||||
|
||||
pass # end of NETGEN_1D2D_Algorithm_2 class
|
||||
|
||||
|
||||
## Tetrahedron (helper) 1D-2D-3D algorithm.
|
||||
#
|
||||
# This is the helper class that is used just to allow creating of create NETGEN_1D2D3D
|
||||
# by calling smesh.Mesh.Netgen(); this is required for backward compatibility with old Python scripts.
|
||||
#
|
||||
# @note This class (and corresponding smesh.Mesh function) is obsolete;
|
||||
# use smesh.Mesh.Tetrahedron( smesh.NETGEN_1D2D3D, geom=0 ) instead.
|
||||
class NETGEN_1D2D3D_Algorithm_2(NETGEN_1D2D3D_Algorithm):
|
||||
|
||||
## name of the dynamic method in smesh.Mesh class
|
||||
# @internal
|
||||
meshMethod = "Netgen"
|
||||
## doc string of the method
|
||||
# @internal
|
||||
docHelper = "Deprecated, used only for compatibility! See Tetrahedron() method."
|
||||
|
||||
## Private constructor.
|
||||
# @param mesh parent mesh object algorithm is assigned to
|
||||
# @param geom geometry (shape/sub-shape) algorithm is assigned to;
|
||||
# if it is @c 0 (default), the algorithm is assigned to the main shape
|
||||
def __init__(self, mesh, geom=0):
|
||||
NETGEN_1D2D3D_Algorithm.__init__(self,mesh, geom)
|
||||
pass
|
||||
|
||||
pass # end of NETGEN_1D2D3D_Algorithm_2 class
|
@ -1,24 +1,25 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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 : NETGENPlugin_Defs.hxx
|
||||
// Author : Alexander A. BORODIN
|
||||
@ -27,7 +28,7 @@
|
||||
#define _NETGENPlugin_DEFS_HXX_
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef NETGENPLUGIN_EXPORTS
|
||||
#if defined NETGENPLUGIN_EXPORTS || defined NETGENEngine_EXPORTS
|
||||
#define NETGENPLUGIN_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
#define NETGENPLUGIN_EXPORT __declspec( dllimport )
|
||||
|
@ -1,31 +1,36 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_Hypothesis.cxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
// Date : 28/03/2006
|
||||
// Project : SALOME
|
||||
//
|
||||
#include <NETGENPlugin_Hypothesis.hxx>
|
||||
#include "NETGENPlugin_Hypothesis.hxx"
|
||||
|
||||
#include "NETGENPlugin_Mesher.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
|
||||
#include <utilities.h>
|
||||
|
||||
using namespace std;
|
||||
@ -39,15 +44,19 @@ 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())
|
||||
_optimize (GetDefaultOptimize()),
|
||||
_localSize (GetDefaultLocalSize()),
|
||||
_quadAllowed (GetDefaultQuadAllowed())
|
||||
{
|
||||
_name = "NETGEN_Parameters";
|
||||
_param_algo_dim = 3;
|
||||
_localSize.clear();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -64,6 +73,20 @@ void NETGENPlugin_Hypothesis::SetMaxSize(double theSize)
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
void NETGENPlugin_Hypothesis::SetMinSize(double theSize)
|
||||
{
|
||||
if (theSize != _minSize)
|
||||
{
|
||||
_minSize = theSize;
|
||||
NotifySubMeshesHypothesisModification();
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
@ -183,6 +206,69 @@ void NETGENPlugin_Hypothesis::SetNbSegPerRadius(double theVal)
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
void NETGENPlugin_Hypothesis::SetLocalSizeOnEntry(const std::string& entry, double localSize)
|
||||
{
|
||||
if(_localSize[entry] != localSize)
|
||||
{
|
||||
_localSize[entry] = localSize;
|
||||
NotifySubMeshesHypothesisModification();
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
double NETGENPlugin_Hypothesis::GetLocalSizeOnEntry(const std::string& entry)
|
||||
{
|
||||
TLocalSize::iterator it = _localSize.find( entry );
|
||||
if ( it != _localSize.end() )
|
||||
return it->second;
|
||||
else
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
void NETGENPlugin_Hypothesis::UnsetLocalSizeOnEntry(const std::string& entry)
|
||||
{
|
||||
_localSize.erase(entry);
|
||||
NotifySubMeshesHypothesisModification();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
void NETGENPlugin_Hypothesis::SetQuadAllowed(bool theVal)
|
||||
{
|
||||
if (theVal != _quadAllowed)
|
||||
{
|
||||
_quadAllowed = theVal;
|
||||
NotifySubMeshesHypothesisModification();
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
bool NETGENPlugin_Hypothesis::GetDefaultQuadAllowed()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
@ -197,6 +283,18 @@ ostream & NETGENPlugin_Hypothesis::SaveTo(ostream & save)
|
||||
|
||||
save << " " << (int)_secondOrder << " " << (int)_optimize;
|
||||
|
||||
TLocalSize::iterator it_sm = _localSize.begin();
|
||||
if (it_sm != _localSize.end()) {
|
||||
save << " " << "__LOCALSIZE_BEGIN__";
|
||||
for ( ; it_sm != _localSize.end(); ++it_sm ) {
|
||||
save << " " << it_sm->first
|
||||
<< " " << it_sm->second << "%#"; // "%#" is a mark of value end
|
||||
}
|
||||
save << " " << "__LOCALSIZE_END__";
|
||||
}
|
||||
save << " " << _minSize;
|
||||
save << " " << _quadAllowed;
|
||||
|
||||
return save;
|
||||
}
|
||||
|
||||
@ -255,6 +353,38 @@ istream & NETGENPlugin_Hypothesis::LoadFrom(istream & load)
|
||||
_optimize = (bool) is;
|
||||
else
|
||||
load.clear(ios::badbit | load.rdstate());
|
||||
|
||||
std::string option_or_sm;
|
||||
bool hasLocalSize = false;
|
||||
|
||||
isOK = (load >> option_or_sm);
|
||||
if (isOK)
|
||||
if (option_or_sm == "__LOCALSIZE_BEGIN__")
|
||||
hasLocalSize = true;
|
||||
|
||||
std::string smEntry, smValue;
|
||||
while (isOK && hasLocalSize) {
|
||||
isOK = (load >> smEntry);
|
||||
if (isOK) {
|
||||
if (smEntry == "__LOCALSIZE_END__")
|
||||
break;
|
||||
isOK = (load >> smValue);
|
||||
}
|
||||
if (isOK) {
|
||||
std::istringstream tmp(smValue);
|
||||
double val;
|
||||
tmp >> val;
|
||||
_localSize[ smEntry ] = val;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !hasLocalSize && !option_or_sm.empty() )
|
||||
_minSize = atof( option_or_sm.c_str() );
|
||||
|
||||
isOK = ( load >> _quadAllowed );
|
||||
if ( !isOK )
|
||||
_quadAllowed = GetDefaultQuadAllowed();
|
||||
|
||||
return load;
|
||||
}
|
||||
|
||||
@ -301,10 +431,16 @@ bool NETGENPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* theMesh,
|
||||
//================================================================================
|
||||
|
||||
bool NETGENPlugin_Hypothesis::SetParametersByDefaults(const TDefaults& dflts,
|
||||
const SMESH_Mesh* /*theMesh*/)
|
||||
const SMESH_Mesh* theMesh)
|
||||
{
|
||||
_nbSegPerEdge = dflts._nbSegments;
|
||||
_maxSize = dflts._elemLength;
|
||||
|
||||
if ( dflts._shape && !dflts._shape->IsNull() )
|
||||
_minSize = NETGENPlugin_Mesher::GetDefaultMinSize( *dflts._shape, _maxSize );
|
||||
else if ( theMesh && theMesh->HasShapeToMesh() )
|
||||
_minSize = NETGENPlugin_Mesher::GetDefaultMinSize( theMesh->GetShapeToMesh(), _maxSize );
|
||||
|
||||
return _nbSegPerEdge && _maxSize > 0;
|
||||
}
|
||||
|
||||
|
@ -1,24 +1,25 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_Hypothesis.hxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
@ -33,6 +34,8 @@
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
#include <map>
|
||||
|
||||
// Parameters for work of NETGEN
|
||||
//
|
||||
|
||||
@ -47,6 +50,9 @@ public:
|
||||
void SetMaxSize(double theSize);
|
||||
double GetMaxSize() const { return _maxSize; }
|
||||
|
||||
void SetMinSize(double theSize);
|
||||
double GetMinSize() const { return _minSize; }
|
||||
|
||||
void SetSecondOrder(bool theVal);
|
||||
bool GetSecondOrder() const { return _secondOrder; }
|
||||
|
||||
@ -77,6 +83,16 @@ public:
|
||||
void SetNbSegPerRadius(double theVal);
|
||||
double GetNbSegPerRadius() const { return _nbSegPerRadius; }
|
||||
|
||||
typedef std::map<std::string, double> TLocalSize;
|
||||
static TLocalSize GetDefaultLocalSize() { return TLocalSize(); }
|
||||
void SetLocalSizeOnEntry(const std::string& entry, double localSize);
|
||||
double GetLocalSizeOnEntry(const std::string& entry);
|
||||
const TLocalSize& GetLocalSizesAndEntries() const { return _localSize; }
|
||||
void UnsetLocalSizeOnEntry(const std::string& entry);
|
||||
|
||||
void SetQuadAllowed(bool theVal);
|
||||
bool GetQuadAllowed() const { return _quadAllowed; }
|
||||
|
||||
// the default values (taken from NETGEN 4.5 sources)
|
||||
|
||||
static double GetDefaultMaxSize();
|
||||
@ -86,6 +102,7 @@ public:
|
||||
static double GetDefaultNbSegPerRadius();
|
||||
static bool GetDefaultSecondOrder();
|
||||
static bool GetDefaultOptimize();
|
||||
static bool GetDefaultQuadAllowed();
|
||||
|
||||
// Persistence
|
||||
virtual ostream & SaveTo(ostream & save);
|
||||
@ -108,13 +125,15 @@ public:
|
||||
virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
|
||||
|
||||
private:
|
||||
double _maxSize;
|
||||
double _maxSize, _minSize;
|
||||
double _growthRate;
|
||||
double _nbSegPerEdge;
|
||||
double _nbSegPerRadius;
|
||||
Fineness _fineness;
|
||||
bool _secondOrder;
|
||||
bool _optimize;
|
||||
TLocalSize _localSize;
|
||||
bool _quadAllowed;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,33 +1,33 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_Hypothesis_2D.cxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
// Date : 28/03/2006
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
//
|
||||
#include <NETGENPlugin_Hypothesis_2D.hxx>
|
||||
#include "NETGENPlugin_Hypothesis_2D.hxx"
|
||||
#include <utilities.h>
|
||||
|
||||
using namespace std;
|
||||
@ -39,8 +39,8 @@ using namespace std;
|
||||
//=============================================================================
|
||||
NETGENPlugin_Hypothesis_2D::NETGENPlugin_Hypothesis_2D (int hypId, int studyId,
|
||||
SMESH_Gen * gen)
|
||||
: NETGENPlugin_Hypothesis(hypId, studyId, gen),
|
||||
_quadAllowed (GetDefaultQuadAllowed())
|
||||
: NETGENPlugin_Hypothesis(hypId, studyId, gen)/*,
|
||||
_quadAllowed (GetDefaultQuadAllowed())*/
|
||||
{
|
||||
_name = "NETGEN_Parameters_2D";
|
||||
_param_algo_dim = 2;
|
||||
@ -51,56 +51,56 @@ NETGENPlugin_Hypothesis_2D::NETGENPlugin_Hypothesis_2D (int hypId, int studyId,
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
void NETGENPlugin_Hypothesis_2D::SetQuadAllowed(bool theVal)
|
||||
{
|
||||
if (theVal != _quadAllowed)
|
||||
{
|
||||
_quadAllowed = theVal;
|
||||
NotifySubMeshesHypothesisModification();
|
||||
}
|
||||
}
|
||||
// void NETGENPlugin_Hypothesis_2D::SetQuadAllowed(bool theVal)
|
||||
// {
|
||||
// if (theVal != _quadAllowed)
|
||||
// {
|
||||
// _quadAllowed = theVal;
|
||||
// NotifySubMeshesHypothesisModification();
|
||||
// }
|
||||
// }
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
bool NETGENPlugin_Hypothesis_2D::GetDefaultQuadAllowed()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// //=============================================================================
|
||||
// /*!
|
||||
// *
|
||||
// */
|
||||
// //=============================================================================
|
||||
// bool NETGENPlugin_Hypothesis_2D::GetDefaultQuadAllowed()
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
ostream & NETGENPlugin_Hypothesis_2D::SaveTo(ostream & save)
|
||||
{
|
||||
NETGENPlugin_Hypothesis::SaveTo(save);
|
||||
// //=============================================================================
|
||||
// /*!
|
||||
// *
|
||||
// */
|
||||
// //=============================================================================
|
||||
// ostream & NETGENPlugin_Hypothesis_2D::SaveTo(ostream & save)
|
||||
// {
|
||||
// NETGENPlugin_Hypothesis::SaveTo(save);
|
||||
|
||||
save << " " << (int)_quadAllowed;
|
||||
// save << " " << (int)_quadAllowed;
|
||||
|
||||
return save;
|
||||
}
|
||||
// return save;
|
||||
// }
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
istream & NETGENPlugin_Hypothesis_2D::LoadFrom(istream & load)
|
||||
{
|
||||
NETGENPlugin_Hypothesis::LoadFrom(load);
|
||||
// //=============================================================================
|
||||
// /*!
|
||||
// *
|
||||
// */
|
||||
// //=============================================================================
|
||||
// istream & NETGENPlugin_Hypothesis_2D::LoadFrom(istream & load)
|
||||
// {
|
||||
// NETGENPlugin_Hypothesis::LoadFrom(load);
|
||||
|
||||
bool isOK = true;
|
||||
int is;
|
||||
// bool isOK = true;
|
||||
// int is;
|
||||
|
||||
isOK = (load >> is);
|
||||
if (isOK)
|
||||
_quadAllowed = (bool) is;
|
||||
else
|
||||
load.clear(ios::badbit | load.rdstate());
|
||||
// isOK = (load >> is);
|
||||
// if (isOK)
|
||||
// _quadAllowed = (bool) is;
|
||||
// else
|
||||
// load.clear(ios::badbit | load.rdstate());
|
||||
|
||||
return load;
|
||||
}
|
||||
// return load;
|
||||
// }
|
||||
|
@ -1,30 +1,30 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_Hypothesis_2D.hxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
// Date : 27/03/2006
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
//
|
||||
#ifndef _NETGENPlugin_Hypothesis_2D_HXX_
|
||||
@ -45,16 +45,16 @@ public:
|
||||
|
||||
NETGENPlugin_Hypothesis_2D(int hypId, int studyId, SMESH_Gen * gen);
|
||||
|
||||
void SetQuadAllowed(bool theVal);
|
||||
bool GetQuadAllowed() const { return _quadAllowed; }
|
||||
static bool GetDefaultQuadAllowed();
|
||||
// void SetQuadAllowed(bool theVal);
|
||||
// bool GetQuadAllowed() const { return _quadAllowed; }
|
||||
// static bool GetDefaultQuadAllowed();
|
||||
|
||||
// Persistence
|
||||
virtual ostream & SaveTo(ostream & save);
|
||||
virtual istream & LoadFrom(istream & load);
|
||||
// virtual ostream & SaveTo(ostream & save);
|
||||
// virtual istream & LoadFrom(istream & load);
|
||||
|
||||
private:
|
||||
bool _quadAllowed;
|
||||
// private:
|
||||
// bool _quadAllowed;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
72
src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_ONLY_i.cxx
Normal file
@ -0,0 +1,72 @@
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_Hypothesis_2D_ONLY_i.cxx
|
||||
// Project : SALOME
|
||||
//=============================================================================
|
||||
//
|
||||
#include "NETGENPlugin_Hypothesis_2D_ONLY_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Constructor
|
||||
*/
|
||||
//=============================================================================
|
||||
NETGENPlugin_Hypothesis_2D_ONLY_i::
|
||||
NETGENPlugin_Hypothesis_2D_ONLY_i (PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl)
|
||||
: SALOME::GenericObj_i( thePOA ),
|
||||
SMESH_Hypothesis_i( thePOA ),
|
||||
NETGENPlugin_Hypothesis_2D_i( thePOA, theStudyId, theGenImpl )
|
||||
{
|
||||
MESSAGE( "NETGENPlugin_Hypothesis_2D_ONLY_i::NETGENPlugin_Hypothesis_2D_ONLY_i" );
|
||||
myBaseImpl = new ::NETGENPlugin_Hypothesis_2D (theGenImpl->GetANewId(),
|
||||
theStudyId,
|
||||
theGenImpl);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Destructor
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
NETGENPlugin_Hypothesis_2D_ONLY_i::~NETGENPlugin_Hypothesis_2D_ONLY_i()
|
||||
{
|
||||
MESSAGE( "NETGENPlugin_Hypothesis_2D_ONLY_i::~NETGENPlugin_Hypothesis_2D_ONLY_i" );
|
||||
}
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Redefine hypothesis type
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
char* NETGENPlugin_Hypothesis_2D_ONLY_i::GetName()
|
||||
{
|
||||
return CORBA::string_dup("NETGEN_Parameters_2D_ONLY");
|
||||
}
|
57
src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_ONLY_i.hxx
Normal file
@ -0,0 +1,57 @@
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_Hypothesis_2D_ONLY_i.hxx
|
||||
// Project : SALOME
|
||||
//=============================================================================
|
||||
//
|
||||
#ifndef _NETGENPlugin_Hypothesis_2D_ONLY_i_HXX_
|
||||
#define _NETGENPlugin_Hypothesis_2D_ONLY_i_HXX_
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm)
|
||||
|
||||
#include "NETGENPlugin_Hypothesis_2D_i.hxx"
|
||||
|
||||
class SMESH_Gen;
|
||||
|
||||
// NETGENPlugin parameters hypothesis ("2D only" case)
|
||||
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_2D_ONLY_i:
|
||||
public virtual POA_NETGENPlugin::NETGENPlugin_Hypothesis_2D_ONLY,
|
||||
public NETGENPlugin_Hypothesis_2D_i
|
||||
{
|
||||
public:
|
||||
// Constructor
|
||||
NETGENPlugin_Hypothesis_2D_ONLY_i (PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl);
|
||||
// Destructor
|
||||
virtual ~NETGENPlugin_Hypothesis_2D_ONLY_i();
|
||||
|
||||
char* GetName();
|
||||
};
|
||||
|
||||
#endif
|
@ -1,30 +1,30 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_Hypothesis_2D_i.cxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
// Date : 03/04/2006
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
//
|
||||
#include "NETGENPlugin_Hypothesis_2D_i.hxx"
|
||||
@ -78,13 +78,16 @@ NETGENPlugin_Hypothesis_2D_i::~NETGENPlugin_Hypothesis_2D_i()
|
||||
* Set QuadAllowed flag
|
||||
*/
|
||||
//=============================================================================
|
||||
void NETGENPlugin_Hypothesis_2D_i::SetQuadAllowed (CORBA::Boolean theValue)
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_2D_i::SetQuadAllowed");
|
||||
ASSERT(myBaseImpl);
|
||||
this->GetImpl()->SetQuadAllowed(theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetQuadAllowed( " << theValue << " )";
|
||||
}
|
||||
// void NETGENPlugin_Hypothesis_2D_i::SetQuadAllowed (CORBA::Boolean theValue)
|
||||
// {
|
||||
// if ( NETGENPlugin_Hypothesis_i::isToSetParameter( GetQuadAllowed(),
|
||||
// theValue,
|
||||
// METH_SetQuadAllowed ))
|
||||
// {
|
||||
// this->GetImpl()->SetQuadAllowed(theValue);
|
||||
// SMESH::TPythonDump() << _this() << ".SetQuadAllowed( " << theValue << " )";
|
||||
// }
|
||||
// }
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
@ -93,12 +96,10 @@ void NETGENPlugin_Hypothesis_2D_i::SetQuadAllowed (CORBA::Boolean theValue)
|
||||
* Get QuadAllowed flag
|
||||
*/
|
||||
//=============================================================================
|
||||
CORBA::Boolean NETGENPlugin_Hypothesis_2D_i::GetQuadAllowed()
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_2D_i::GetQuadAllowed");
|
||||
ASSERT(myBaseImpl);
|
||||
return this->GetImpl()->GetQuadAllowed();
|
||||
}
|
||||
// CORBA::Boolean NETGENPlugin_Hypothesis_2D_i::GetQuadAllowed()
|
||||
// {
|
||||
// return this->GetImpl()->GetQuadAllowed();
|
||||
// }
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
@ -109,7 +110,6 @@ CORBA::Boolean NETGENPlugin_Hypothesis_2D_i::GetQuadAllowed()
|
||||
//=============================================================================
|
||||
::NETGENPlugin_Hypothesis_2D* NETGENPlugin_Hypothesis_2D_i::GetImpl()
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_2D_i::GetImpl");
|
||||
return (::NETGENPlugin_Hypothesis_2D*)myBaseImpl;
|
||||
}
|
||||
|
||||
|
@ -1,30 +1,30 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_Hypothesis_2D_i.hxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
// Date : 03/04/2006
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
//
|
||||
#ifndef _NETGENPlugin_Hypothesis_2D_i_HXX_
|
||||
@ -54,14 +54,20 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_2D_i:
|
||||
// Destructor
|
||||
virtual ~NETGENPlugin_Hypothesis_2D_i();
|
||||
|
||||
void SetQuadAllowed(CORBA::Boolean theVal);
|
||||
CORBA::Boolean GetQuadAllowed();
|
||||
|
||||
// Get implementation
|
||||
::NETGENPlugin_Hypothesis_2D* GetImpl();
|
||||
|
||||
// Verify whether hypothesis supports given entity type
|
||||
CORBA::Boolean IsDimSupported( SMESH::Dimension type );
|
||||
|
||||
protected:
|
||||
|
||||
// to remember whether a parameter is already set (issue 0021364)
|
||||
// enum SettingMethod
|
||||
// {
|
||||
// METH_SetQuadAllowed = NETGENPlugin_Hypothesis_i::METH_LAST * 2,
|
||||
// METH_LAST = METH_SetQuadAllowed
|
||||
// };
|
||||
};
|
||||
|
||||
#endif
|
||||
|
71
src/NETGENPlugin/NETGENPlugin_Hypothesis_3D_i.cxx
Normal file
@ -0,0 +1,71 @@
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_Hypothesis_3D_i.cxx
|
||||
// Project : SALOME
|
||||
//=============================================================================
|
||||
//
|
||||
#include "NETGENPlugin_Hypothesis_3D_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Constructor
|
||||
*/
|
||||
//=============================================================================
|
||||
NETGENPlugin_Hypothesis_3D_i::
|
||||
NETGENPlugin_Hypothesis_3D_i (PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl)
|
||||
: SALOME::GenericObj_i( thePOA ),
|
||||
SMESH_Hypothesis_i( thePOA ),
|
||||
NETGENPlugin_Hypothesis_i( thePOA, theStudyId, theGenImpl )
|
||||
{
|
||||
MESSAGE( "NETGENPlugin_Hypothesis_3D_i::NETGENPlugin_Hypothesis_3D_i" );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Destructor
|
||||
*/
|
||||
//=============================================================================
|
||||
NETGENPlugin_Hypothesis_3D_i::~NETGENPlugin_Hypothesis_3D_i()
|
||||
{
|
||||
MESSAGE( "NETGENPlugin_Hypothesis_3D_i::~NETGENPlugin_Hypothesis_3D_i" );
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Redefine hypothesis type
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
char* NETGENPlugin_Hypothesis_3D_i::GetName()
|
||||
{
|
||||
return CORBA::string_dup("NETGEN_Parameters_3D");
|
||||
}
|
59
src/NETGENPlugin/NETGENPlugin_Hypothesis_3D_i.hxx
Normal file
@ -0,0 +1,59 @@
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_Hypothesis_2D_i.hxx
|
||||
// Project : SALOME
|
||||
//=============================================================================
|
||||
//
|
||||
#ifndef _NETGENPlugin_Hypothesis_3D_i_HXX_
|
||||
#define _NETGENPlugin_Hypothesis_3D_i_HXX_
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm)
|
||||
|
||||
#include "NETGENPlugin_Hypothesis_i.hxx"
|
||||
|
||||
class SMESH_Gen;
|
||||
|
||||
// NETGENPlugin parameters hypothesis (3D "only" case)
|
||||
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_3D_i:
|
||||
public virtual POA_NETGENPlugin::NETGENPlugin_Hypothesis_3D,
|
||||
public NETGENPlugin_Hypothesis_i
|
||||
{
|
||||
public:
|
||||
// Constructor
|
||||
NETGENPlugin_Hypothesis_3D_i (PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl);
|
||||
|
||||
// Get type name of hypothesis
|
||||
char* GetName();
|
||||
|
||||
// Destructor
|
||||
virtual ~NETGENPlugin_Hypothesis_3D_i();
|
||||
};
|
||||
|
||||
#endif
|
@ -1,41 +1,56 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_Hypothesis_i.cxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
// Date : 03/04/2006
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
//
|
||||
#include "NETGENPlugin_Hypothesis_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_PythonDump.hxx"
|
||||
#include "GEOM_Object.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Specialization of isToSetParameter<T> for double
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
template<>
|
||||
bool NETGENPlugin_Hypothesis_i::isToSetParameter<double>(double curValue,
|
||||
double newValue,
|
||||
/*SettingMethod*/int meth)
|
||||
{
|
||||
return isToSetParameter(true, (fabs(curValue - newValue) < 1e-20), meth);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* NETGENPlugin_Hypothesis_i::NETGENPlugin_Hypothesis_i
|
||||
@ -48,7 +63,8 @@ NETGENPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl)
|
||||
: SALOME::GenericObj_i( thePOA ),
|
||||
SMESH_Hypothesis_i( thePOA )
|
||||
SMESH_Hypothesis_i( thePOA ),
|
||||
mySetMethodFlags(0)
|
||||
{
|
||||
MESSAGE( "NETGENPlugin_Hypothesis_i::NETGENPlugin_Hypothesis_i" );
|
||||
myBaseImpl = new ::NETGENPlugin_Hypothesis (theGenImpl->GetANewId(),
|
||||
@ -77,10 +93,11 @@ NETGENPlugin_Hypothesis_i::~NETGENPlugin_Hypothesis_i()
|
||||
//=============================================================================
|
||||
void NETGENPlugin_Hypothesis_i::SetMaxSize (CORBA::Double theValue)
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_i::SetMaxSize");
|
||||
ASSERT(myBaseImpl);
|
||||
this->GetImpl()->SetMaxSize(theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetMaxSize( " << theValue << " )";
|
||||
if ( isToSetParameter( GetMaxSize(), theValue, METH_SetMaxSize ))
|
||||
{
|
||||
this->GetImpl()->SetMaxSize(theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetMaxSize( " << SMESH::TVar(theValue) << " )";
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -92,11 +109,37 @@ void NETGENPlugin_Hypothesis_i::SetMaxSize (CORBA::Double theValue)
|
||||
//=============================================================================
|
||||
CORBA::Double NETGENPlugin_Hypothesis_i::GetMaxSize()
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_i::GetMaxSize");
|
||||
ASSERT(myBaseImpl);
|
||||
return this->GetImpl()->GetMaxSize();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* NETGENPlugin_Hypothesis_i::SetMinSize
|
||||
*
|
||||
* Set MinSize
|
||||
*/
|
||||
//=============================================================================
|
||||
void NETGENPlugin_Hypothesis_i::SetMinSize (CORBA::Double theValue)
|
||||
{
|
||||
if ( isToSetParameter( GetMinSize(), theValue, METH_SetMinSize ))
|
||||
{
|
||||
this->GetImpl()->SetMinSize(theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetMinSize( " << SMESH::TVar(theValue) << " )";
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* NETGENPlugin_Hypothesis_i::GetMinSize
|
||||
*
|
||||
* Get MinSize
|
||||
*/
|
||||
//=============================================================================
|
||||
CORBA::Double NETGENPlugin_Hypothesis_i::GetMinSize()
|
||||
{
|
||||
return this->GetImpl()->GetMinSize();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* NETGENPlugin_Hypothesis_i::SetSecondOrder
|
||||
@ -106,10 +149,11 @@ CORBA::Double NETGENPlugin_Hypothesis_i::GetMaxSize()
|
||||
//=============================================================================
|
||||
void NETGENPlugin_Hypothesis_i::SetSecondOrder (CORBA::Boolean theValue)
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_i::SetSecondOrder");
|
||||
ASSERT(myBaseImpl);
|
||||
this->GetImpl()->SetSecondOrder(theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetSecondOrder( " << theValue << " )";
|
||||
if ( isToSetParameter( GetSecondOrder(), theValue, METH_SetSecondOrder ))
|
||||
{
|
||||
this->GetImpl()->SetSecondOrder(theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetSecondOrder( " << theValue << " )";
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -121,8 +165,6 @@ void NETGENPlugin_Hypothesis_i::SetSecondOrder (CORBA::Boolean theValue)
|
||||
//=============================================================================
|
||||
CORBA::Boolean NETGENPlugin_Hypothesis_i::GetSecondOrder()
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_i::GetSecondOrder");
|
||||
ASSERT(myBaseImpl);
|
||||
return this->GetImpl()->GetSecondOrder();
|
||||
}
|
||||
|
||||
@ -135,10 +177,11 @@ CORBA::Boolean NETGENPlugin_Hypothesis_i::GetSecondOrder()
|
||||
//=============================================================================
|
||||
void NETGENPlugin_Hypothesis_i::SetOptimize (CORBA::Boolean theValue)
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_i::SetOptimize");
|
||||
ASSERT(myBaseImpl);
|
||||
this->GetImpl()->SetOptimize(theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetOptimize( " << theValue << " )";
|
||||
if ( isToSetParameter( GetOptimize(), theValue, METH_SetOptimize ))
|
||||
{
|
||||
this->GetImpl()->SetOptimize(theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetOptimize( " << theValue << " )";
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -150,8 +193,6 @@ void NETGENPlugin_Hypothesis_i::SetOptimize (CORBA::Boolean theValue)
|
||||
//=============================================================================
|
||||
CORBA::Boolean NETGENPlugin_Hypothesis_i::GetOptimize()
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_i::GetOptimize");
|
||||
ASSERT(myBaseImpl);
|
||||
return this->GetImpl()->GetOptimize();
|
||||
}
|
||||
|
||||
@ -164,10 +205,11 @@ CORBA::Boolean NETGENPlugin_Hypothesis_i::GetOptimize()
|
||||
//=============================================================================
|
||||
void NETGENPlugin_Hypothesis_i::SetFineness (CORBA::Long theValue)
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_i::SetFineness");
|
||||
ASSERT(myBaseImpl);
|
||||
this->GetImpl()->SetFineness((::NETGENPlugin_Hypothesis::Fineness)theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetFineness( " << theValue << " )";
|
||||
if ( isToSetParameter( GetFineness(), theValue, METH_SetFineness ))
|
||||
{
|
||||
this->GetImpl()->SetFineness((::NETGENPlugin_Hypothesis::Fineness)theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetFineness( " << theValue << " )";
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -179,8 +221,6 @@ void NETGENPlugin_Hypothesis_i::SetFineness (CORBA::Long theValue)
|
||||
//=============================================================================
|
||||
CORBA::Long NETGENPlugin_Hypothesis_i::GetFineness()
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_i::GetFineness");
|
||||
ASSERT(myBaseImpl);
|
||||
return this->GetImpl()->GetFineness();
|
||||
}
|
||||
|
||||
@ -193,10 +233,11 @@ CORBA::Long NETGENPlugin_Hypothesis_i::GetFineness()
|
||||
//=============================================================================
|
||||
void NETGENPlugin_Hypothesis_i::SetGrowthRate (CORBA::Double theValue)
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_i::SetGrowthRate");
|
||||
ASSERT(myBaseImpl);
|
||||
this->GetImpl()->SetGrowthRate(theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetGrowthRate( " << theValue << " )";
|
||||
if ( isToSetParameter( GetGrowthRate(), theValue, METH_SetGrowthRate ))
|
||||
{
|
||||
this->GetImpl()->SetGrowthRate(theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetGrowthRate( " << SMESH::TVar(theValue) << " )";
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -208,8 +249,6 @@ void NETGENPlugin_Hypothesis_i::SetGrowthRate (CORBA::Double theValue)
|
||||
//=============================================================================
|
||||
CORBA::Double NETGENPlugin_Hypothesis_i::GetGrowthRate()
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_i::GetGrowthRate");
|
||||
ASSERT(myBaseImpl);
|
||||
return this->GetImpl()->GetGrowthRate();
|
||||
}
|
||||
|
||||
@ -222,10 +261,11 @@ CORBA::Double NETGENPlugin_Hypothesis_i::GetGrowthRate()
|
||||
//=============================================================================
|
||||
void NETGENPlugin_Hypothesis_i::SetNbSegPerEdge (CORBA::Double theValue)
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_i::SetNbSegPerEdge");
|
||||
ASSERT(myBaseImpl);
|
||||
this->GetImpl()->SetNbSegPerEdge(theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetNbSegPerEdge( " << theValue << " )";
|
||||
if ( isToSetParameter( GetNbSegPerEdge(), theValue, METH_SetNbSegPerEdge ))
|
||||
{
|
||||
this->GetImpl()->SetNbSegPerEdge(theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetNbSegPerEdge( " << SMESH::TVar(theValue) << " )";
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -237,8 +277,6 @@ void NETGENPlugin_Hypothesis_i::SetNbSegPerEdge (CORBA::Double theValue)
|
||||
//=============================================================================
|
||||
CORBA::Double NETGENPlugin_Hypothesis_i::GetNbSegPerEdge()
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_i::GetNbSegPerEdge");
|
||||
ASSERT(myBaseImpl);
|
||||
return this->GetImpl()->GetNbSegPerEdge();
|
||||
}
|
||||
|
||||
@ -251,10 +289,11 @@ CORBA::Double NETGENPlugin_Hypothesis_i::GetNbSegPerEdge()
|
||||
//=============================================================================
|
||||
void NETGENPlugin_Hypothesis_i::SetNbSegPerRadius (CORBA::Double theValue)
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_i::SetNbSegPerRadius");
|
||||
ASSERT(myBaseImpl);
|
||||
this->GetImpl()->SetNbSegPerRadius(theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetNbSegPerRadius( " << theValue << " )";
|
||||
if ( isToSetParameter( GetNbSegPerRadius(), theValue, METH_SetNbSegPerRadius ))
|
||||
{
|
||||
this->GetImpl()->SetNbSegPerRadius(theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetNbSegPerRadius( " << SMESH::TVar(theValue) << " )";
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -266,11 +305,84 @@ void NETGENPlugin_Hypothesis_i::SetNbSegPerRadius (CORBA::Double theValue)
|
||||
//=============================================================================
|
||||
CORBA::Double NETGENPlugin_Hypothesis_i::GetNbSegPerRadius()
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_i::GetNbSegPerRadius");
|
||||
ASSERT(myBaseImpl);
|
||||
return this->GetImpl()->GetNbSegPerRadius();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
||||
void NETGENPlugin_Hypothesis_i::SetLocalSizeOnShape(GEOM::GEOM_Object_ptr GeomObj,
|
||||
CORBA::Double localSize)
|
||||
{
|
||||
string entry;
|
||||
entry = GeomObj->GetStudyEntry();
|
||||
SetLocalSizeOnEntry(entry.c_str(), localSize);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
||||
void NETGENPlugin_Hypothesis_i::SetLocalSizeOnEntry(const char* entry,
|
||||
CORBA::Double localSize)
|
||||
{
|
||||
if ( isToSetParameter( GetLocalSizeOnEntry(entry), localSize, METH_SetLocalSizeOnEntry ))
|
||||
{
|
||||
this->GetImpl()->SetLocalSizeOnEntry(entry, localSize);
|
||||
SMESH::TPythonDump()
|
||||
<< _this() << ".SetLocalSizeOnShape(" << entry << ", " << localSize << ")";
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
||||
CORBA::Double NETGENPlugin_Hypothesis_i::GetLocalSizeOnEntry(const char* entry)
|
||||
{
|
||||
return this->GetImpl()->GetLocalSizeOnEntry(entry);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
||||
NETGENPlugin::string_array* NETGENPlugin_Hypothesis_i::GetLocalSizeEntries()
|
||||
{
|
||||
NETGENPlugin::string_array_var result = new NETGENPlugin::string_array();
|
||||
const ::NETGENPlugin_Hypothesis::TLocalSize localSizes =
|
||||
this->GetImpl()->GetLocalSizesAndEntries();
|
||||
result->length(localSizes.size());
|
||||
::NETGENPlugin_Hypothesis::TLocalSize::const_iterator it = localSizes.begin();
|
||||
for (int i=0 ; it != localSizes.end() ; i++, it++)
|
||||
{
|
||||
string entry = (*it).first;
|
||||
result[i] = CORBA::string_dup(entry.c_str());
|
||||
}
|
||||
return result._retn();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
||||
void NETGENPlugin_Hypothesis_i::UnsetLocalSizeOnEntry(const char* entry)
|
||||
{
|
||||
this->GetImpl()->UnsetLocalSizeOnEntry(entry);
|
||||
SMESH::TPythonDump() << _this() << ".UnsetLocalSizeOnEntry(" << entry << ")";
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
||||
void NETGENPlugin_Hypothesis_i::SetQuadAllowed (CORBA::Boolean theValue)
|
||||
{
|
||||
if ( NETGENPlugin_Hypothesis_i::isToSetParameter( GetQuadAllowed(),
|
||||
theValue,
|
||||
METH_SetQuadAllowed ))
|
||||
{
|
||||
this->GetImpl()->SetQuadAllowed(theValue);
|
||||
SMESH::TPythonDump() << _this() << ".SetQuadAllowed( " << theValue << " )";
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
||||
CORBA::Boolean NETGENPlugin_Hypothesis_i::GetQuadAllowed()
|
||||
{
|
||||
return this->GetImpl()->GetQuadAllowed();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* NETGENPlugin_Hypothesis_i::GetImpl
|
||||
@ -280,7 +392,6 @@ CORBA::Double NETGENPlugin_Hypothesis_i::GetNbSegPerRadius()
|
||||
//=============================================================================
|
||||
::NETGENPlugin_Hypothesis* NETGENPlugin_Hypothesis_i::GetImpl()
|
||||
{
|
||||
MESSAGE("NETGENPlugin_Hypothesis_i::GetImpl");
|
||||
return (::NETGENPlugin_Hypothesis*)myBaseImpl;
|
||||
}
|
||||
|
||||
@ -297,3 +408,42 @@ CORBA::Boolean NETGENPlugin_Hypothesis_i::IsDimSupported( SMESH::Dimension type
|
||||
{
|
||||
return type == SMESH::DIM_3D;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief method intended to remove explicit treatment of Netgen hypotheses from SMESH_NoteBook
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
int NETGENPlugin_Hypothesis_i::getParamIndex(const TCollection_AsciiString& method,
|
||||
int nbVars) const
|
||||
{
|
||||
if ( method == "SetMaxSize" ) return 0;
|
||||
if ( method == "SetGrowthRate" ) return 1;
|
||||
if ( method == "SetNbSegPerEdge" ) return 2;
|
||||
if ( method == "SetNbSegPerRadius" ) return 3;
|
||||
if ( method == "SetMinSize" ) return nbVars-1;
|
||||
|
||||
return SMESH_Hypothesis_i::getParamIndex( method, nbVars ); // return default value
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Method used to convert variable parameters stored in an old study
|
||||
* into myMethod2VarParams. It should return a method name for an index of
|
||||
* variable parameters. Index is countered from zero
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
std::string NETGENPlugin_Hypothesis_i::getMethodOfParameter(const int paramIndex,
|
||||
int nbVars) const
|
||||
{
|
||||
switch ( paramIndex ) {
|
||||
case 0: return "SetMaxSize";
|
||||
case 1: return nbVars == 2 ? "SetMinSize" : "SetGrowthRate";
|
||||
case 2: return "SetNbSegPerEdge";
|
||||
case 3: return "SetNbSegPerRadius";
|
||||
case 4: return "SetMinSize";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
@ -1,30 +1,30 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_Hypothesis_i.hxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
// Date : 03/04/2006
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
//
|
||||
#ifndef _NETGENPlugin_Hypothesis_i_HXX_
|
||||
@ -39,6 +39,7 @@
|
||||
#include "NETGENPlugin_Hypothesis.hxx"
|
||||
|
||||
class SMESH_Gen;
|
||||
//class GEOM_Object;
|
||||
|
||||
// NETGENPlugin parameters hypothesis
|
||||
|
||||
@ -57,6 +58,9 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_i:
|
||||
void SetMaxSize(CORBA::Double theSize);
|
||||
CORBA::Double GetMaxSize();
|
||||
|
||||
void SetMinSize(CORBA::Double theSize);
|
||||
CORBA::Double GetMinSize();
|
||||
|
||||
void SetSecondOrder(CORBA::Boolean theVal);
|
||||
CORBA::Boolean GetSecondOrder();
|
||||
|
||||
@ -75,11 +79,64 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_i:
|
||||
void SetNbSegPerRadius(CORBA::Double theVal);
|
||||
CORBA::Double GetNbSegPerRadius();
|
||||
|
||||
void SetLocalSizeOnShape(GEOM::GEOM_Object_ptr GeomObj, CORBA::Double localSize);
|
||||
void SetLocalSizeOnEntry(const char* entry, CORBA::Double localSize);
|
||||
CORBA::Double GetLocalSizeOnEntry(const char* entry);
|
||||
NETGENPlugin::string_array* GetLocalSizeEntries();
|
||||
void UnsetLocalSizeOnEntry(const char* entry);
|
||||
|
||||
void SetQuadAllowed(CORBA::Boolean theVal);
|
||||
CORBA::Boolean GetQuadAllowed();
|
||||
|
||||
// Get implementation
|
||||
::NETGENPlugin_Hypothesis* GetImpl();
|
||||
|
||||
// Verify whether hypothesis supports given entity type
|
||||
CORBA::Boolean IsDimSupported( SMESH::Dimension type );
|
||||
|
||||
protected:
|
||||
|
||||
// to remember whether a parameter is already set (issue 0021364)
|
||||
enum SettingMethod
|
||||
{
|
||||
METH_SetMaxSize = 1,
|
||||
METH_SetMinSize = 2,
|
||||
METH_SetSecondOrder = 4,
|
||||
METH_SetOptimize = 8,
|
||||
METH_SetFineness = 16,
|
||||
METH_SetGrowthRate = 32,
|
||||
METH_SetNbSegPerEdge = 64,
|
||||
METH_SetNbSegPerRadius = 128,
|
||||
METH_SetLocalSizeOnEntry = 256,
|
||||
METH_SetQuadAllowed = METH_SetLocalSizeOnEntry * 2,
|
||||
METH_LAST = METH_SetQuadAllowed
|
||||
};
|
||||
int mySetMethodFlags;
|
||||
|
||||
// Return true if a parameter is not yet set, else return true if a parameter changes.
|
||||
// PythonDumping depends on the result of this function.
|
||||
// Checking only change of a parameter is not enough because then the default values are
|
||||
// not dumped and if the defaults will change then the behaviour of scripts
|
||||
// created without dump of the default parameters will also change what is not good.
|
||||
template<typename T>
|
||||
bool isToSetParameter(T curValue, T newValue, /*SettingMethod*/int meth)
|
||||
{
|
||||
if ( mySetMethodFlags & meth ) // already set, check if a value is changing
|
||||
return ( curValue != newValue );
|
||||
else
|
||||
return ( mySetMethodFlags |= meth ); // == return true
|
||||
}
|
||||
|
||||
public:
|
||||
// method intended to remove explicit treatment of Netgen hypotheses from
|
||||
// SMESH_NoteBook to assure backward compatibility after implemeneting
|
||||
// issue 0021308: Remove hard-coded dependency of the external mesh plugins
|
||||
virtual int getParamIndex(const TCollection_AsciiString& method, int nbVars) const;
|
||||
|
||||
// method used to convert variable parameters stored in an old study
|
||||
// into myMethod2VarParams. It should return a method name for an index of
|
||||
// variable parameters. Index is countered from zero
|
||||
virtual std::string getMethodOfParameter(const int paramIndex, int nbVars) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,52 +1,82 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_Mesher.hxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
// Date : 31/03/2006
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
//
|
||||
#ifndef _NETGENPlugin_Mesher_HXX_
|
||||
#define _NETGENPlugin_Mesher_HXX_
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
#include "StdMeshers_FaceSide.hxx"
|
||||
|
||||
#include <StdMeshers_FaceSide.hxx>
|
||||
#include <SMDS_MeshElement.hxx>
|
||||
#include <SMESH_Algo.hxx>
|
||||
#include <SMESH_ProxyMesh.hxx>
|
||||
|
||||
namespace nglib {
|
||||
#include <nglib.h>
|
||||
}
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
||||
class SMESH_Mesh;
|
||||
class SMESH_Comment;
|
||||
class SMESHDS_Mesh;
|
||||
class TopoDS_Shape;
|
||||
class TopTools_DataMapOfShapeShape;
|
||||
class TopTools_IndexedMapOfShape;
|
||||
class NETGENPlugin_Hypothesis;
|
||||
class NETGENPlugin_SimpleHypothesis_2D;
|
||||
class NETGENPlugin_Internals;
|
||||
namespace netgen {
|
||||
class OCCGeometry;
|
||||
class Mesh;
|
||||
}
|
||||
//=============================================================================
|
||||
/*!
|
||||
* \brief Struct storing nb of entities in netgen mesh
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
struct NETGENPlugin_ngMeshInfo
|
||||
{
|
||||
int _nbNodes, _nbSegments, _nbFaces, _nbVolumes;
|
||||
char* _copyOfLocalH;
|
||||
NETGENPlugin_ngMeshInfo( netgen::Mesh* ngMesh=0);
|
||||
void transferLocalH( netgen::Mesh* fromMesh, netgen::Mesh* toMesh );
|
||||
void restoreLocalH ( netgen::Mesh* ngMesh);
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* \brief This class calls the NETGEN mesher of OCC geometry
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_Mesher
|
||||
{
|
||||
@ -56,36 +86,163 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_Mesher
|
||||
NETGENPlugin_Mesher (SMESH_Mesh* mesh, const TopoDS_Shape& aShape,
|
||||
const bool isVolume);
|
||||
|
||||
void SetParameters(const NETGENPlugin_Hypothesis* hyp);
|
||||
void SetParameters(const NETGENPlugin_Hypothesis* hyp);
|
||||
void SetParameters(const NETGENPlugin_SimpleHypothesis_2D* hyp);
|
||||
void SetViscousLayers2DAssigned(bool isAssigned) { _isViscousLayers2D = isAssigned; }
|
||||
|
||||
bool Compute();
|
||||
|
||||
bool Evaluate(MapShapeNbElems& aResMap);
|
||||
|
||||
static void PrepareOCCgeometry(netgen::OCCGeometry& occgeom,
|
||||
const TopoDS_Shape& shape,
|
||||
SMESH_Mesh& mesh,
|
||||
std::list< SMESH_subMesh* > * meshedSM=0);
|
||||
std::list< SMESH_subMesh* > * meshedSM=0,
|
||||
NETGENPlugin_Internals* internalShapes=0);
|
||||
|
||||
static double GetDefaultMinSize(const TopoDS_Shape& shape,
|
||||
const double maxSize);
|
||||
|
||||
static void RestrictLocalSize(netgen::Mesh& ngMesh, const gp_XYZ& p, const double size);
|
||||
|
||||
static int FillSMesh(const netgen::OCCGeometry& occgeom,
|
||||
netgen::Mesh& ngMesh,
|
||||
const NETGENPlugin_ngMeshInfo& initState,
|
||||
SMESH_Mesh& sMesh,
|
||||
std::vector<const SMDS_MeshNode*>& nodeVec,
|
||||
SMESH_Comment& comment);
|
||||
|
||||
bool FillNgMesh(netgen::OCCGeometry& occgeom,
|
||||
netgen::Mesh& ngMesh,
|
||||
std::vector<const SMDS_MeshNode*>& nodeVec,
|
||||
const std::list< SMESH_subMesh* > & meshedSM,
|
||||
SMESH_ProxyMesh::Ptr proxyMesh=SMESH_ProxyMesh::Ptr());
|
||||
|
||||
static void FixIntFaces(const netgen::OCCGeometry& occgeom,
|
||||
netgen::Mesh& ngMesh,
|
||||
NETGENPlugin_Internals& internalShapes);
|
||||
|
||||
static void AddIntVerticesInFaces(const netgen::OCCGeometry& occgeom,
|
||||
netgen::Mesh& ngMesh,
|
||||
std::vector<const SMDS_MeshNode*>& nodeVec,
|
||||
NETGENPlugin_Internals& internalShapes);
|
||||
|
||||
static void AddIntVerticesInSolids(const netgen::OCCGeometry& occgeom,
|
||||
netgen::Mesh& ngMesh,
|
||||
std::vector<const SMDS_MeshNode*>& nodeVec,
|
||||
NETGENPlugin_Internals& internalShapes);
|
||||
|
||||
static SMESH_ComputeErrorPtr
|
||||
AddSegmentsToMesh(netgen::Mesh& ngMesh,
|
||||
netgen::OCCGeometry& geom,
|
||||
const TSideVector& wires,
|
||||
SMESH_MesherHelper& helper,
|
||||
std::vector< const SMDS_MeshNode* > & nodeVec);
|
||||
|
||||
void SetDefaultParameters();
|
||||
|
||||
static void RemoveTmpFiles();
|
||||
|
||||
protected:
|
||||
static SMESH_ComputeErrorPtr ReadErrors(const std::vector< const SMDS_MeshNode* >& nodeVec);
|
||||
|
||||
bool fillNgMesh(netgen::OCCGeometry& occgeom,
|
||||
netgen::Mesh& ngMesh,
|
||||
std::vector<SMDS_MeshNode*>& nodeVec,
|
||||
const std::list< SMESH_subMesh* > & meshedSM);
|
||||
|
||||
void defaultParameters();
|
||||
|
||||
static void toPython( const netgen::Mesh* ngMesh,
|
||||
const std::string& pyFile); // debug
|
||||
|
||||
private:
|
||||
SMESH_Mesh* _mesh;
|
||||
const TopoDS_Shape& _shape;
|
||||
bool _isVolume;
|
||||
bool _optimize;
|
||||
int _fineness;
|
||||
bool _isViscousLayers2D;
|
||||
|
||||
const NETGENPlugin_SimpleHypothesis_2D * _simpleHyp;
|
||||
std::map< int, std::pair<int,int> > _faceDescriptors;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* \brief Container of info needed to solve problems with internal shapes.
|
||||
*
|
||||
* Issue 0020676. It is made up as a class to be ready to extract from NETGEN
|
||||
* and put in SMESH as soon as the same solution is needed somewhere else.
|
||||
* The approach is to precompute internal edges in 2D and internal faces in 3D
|
||||
* and put their mesh correctly (twice) into netgen mesh.
|
||||
* In 2D, this class finds internal edges in faces and their vertices.
|
||||
* In 3D, it additionally finds internal faces, their edges shared with other faces,
|
||||
* and their vertices shared by several internal edges. Nodes built on the found
|
||||
* shapes and mesh faces built on the found internal faces are to be doubled in
|
||||
* netgen mesh to emulate a "crack"
|
||||
*
|
||||
* For internal faces a more simple solution is found, which is just to duplicate
|
||||
* mesh faces on internal geom faces without modeling a "real crack". For this
|
||||
* reason findBorderElements() is no more used anywhere.
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_Internals
|
||||
{
|
||||
SMESH_Mesh& _mesh;
|
||||
bool _is3D;
|
||||
//2D
|
||||
std::map<int,int> _e2face;//!<edges and their vertices in faces where they are TopAbs_INTERNAL
|
||||
std::map<int,std::list<int> > _f2v;//!<faces with internal vertices
|
||||
// 3D
|
||||
std::set<int> _intShapes;
|
||||
std::set<int> _borderFaces; //!< non-internal faces sharing the internal edge
|
||||
std::map<int,std::list<int> > _s2v;//!<solids with internal vertices
|
||||
|
||||
public:
|
||||
NETGENPlugin_Internals( SMESH_Mesh& mesh, const TopoDS_Shape& shape, bool is3D );
|
||||
|
||||
SMESH_Mesh& getMesh() const;
|
||||
|
||||
bool isShapeToPrecompute(const TopoDS_Shape& s);
|
||||
|
||||
// 2D meshing
|
||||
// edges
|
||||
bool hasInternalEdges() const { return !_e2face.empty(); }
|
||||
bool isInternalEdge( int id ) const { return _e2face.count( id ); }
|
||||
const std::map<int,int>& getEdgesAndVerticesWithFaces() const { return _e2face; }
|
||||
void getInternalEdges( TopTools_IndexedMapOfShape& fmap,
|
||||
TopTools_IndexedMapOfShape& emap,
|
||||
TopTools_IndexedMapOfShape& vmap,
|
||||
std::list< SMESH_subMesh* > smToPrecompute[]);
|
||||
// vertices
|
||||
bool hasInternalVertexInFace() const { return !_f2v.empty(); }
|
||||
const std::map<int,std::list<int> >& getFacesWithVertices() const { return _f2v; }
|
||||
|
||||
// 3D meshing
|
||||
// faces
|
||||
bool hasInternalFaces() const { return !_intShapes.empty(); }
|
||||
bool isInternalShape( int id ) const { return _intShapes.count( id ); }
|
||||
void findBorderElements( std::set< const SMDS_MeshElement*, TIDCompare > & borderElems );
|
||||
bool isBorderFace( int faceID ) const { return _borderFaces.count( faceID ); }
|
||||
void getInternalFaces( TopTools_IndexedMapOfShape& fmap,
|
||||
TopTools_IndexedMapOfShape& emap,
|
||||
std::list< SMESH_subMesh* >& facesSM,
|
||||
std::list< SMESH_subMesh* >& boundarySM);
|
||||
// vertices
|
||||
bool hasInternalVertexInSolid() const { return !_s2v.empty(); }
|
||||
bool hasInternalVertexInSolid(int soID ) const { return _s2v.count(soID); }
|
||||
const std::map<int,std::list<int> >& getSolidsWithVertices() const { return _s2v; }
|
||||
|
||||
|
||||
};
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief It correctly initializes netgen library at constructor and
|
||||
* correctly finishes using netgen library at destructor
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
struct NETGENPLUGIN_EXPORT NETGENPlugin_NetgenLibWrapper
|
||||
{
|
||||
nglib::Ng_Mesh * _ngMesh;
|
||||
NETGENPlugin_NetgenLibWrapper();
|
||||
~NETGENPlugin_NetgenLibWrapper();
|
||||
void setMesh( nglib::Ng_Mesh* mesh );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,30 +1,30 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_NETGEN_2D.cxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
// Date : 20/03/2006
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
//
|
||||
#include "NETGENPlugin_NETGEN_2D.hxx"
|
||||
@ -32,14 +32,22 @@
|
||||
#include "NETGENPlugin_SimpleHypothesis_2D.hxx"
|
||||
#include "NETGENPlugin_Mesher.hxx"
|
||||
|
||||
#include <SMESHDS_Mesh.hxx>
|
||||
#include <SMESH_ControlsDef.hxx>
|
||||
#include <SMESH_Gen.hxx>
|
||||
#include <SMESH_Mesh.hxx>
|
||||
#include <SMESH_ControlsDef.hxx>
|
||||
#include <SMESHDS_Mesh.hxx>
|
||||
#include <StdMeshers_ViscousLayers2D.hxx>
|
||||
#include <utilities.h>
|
||||
|
||||
#include <list>
|
||||
|
||||
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
||||
namespace nglib {
|
||||
#include <nglib.h>
|
||||
}
|
||||
#include <meshing.hpp>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
@ -57,10 +65,11 @@ NETGENPlugin_NETGEN_2D::NETGENPlugin_NETGEN_2D(int hypId, int studyId,
|
||||
_shapeType = (1 << TopAbs_FACE); // 1 bit /shape type
|
||||
_compatibleHypothesis.push_back("NETGEN_Parameters_2D");
|
||||
_compatibleHypothesis.push_back("NETGEN_SimpleParameters_2D");
|
||||
_requireDescretBoundary = false;
|
||||
_onlyUnaryInput = false;
|
||||
_hypothesis = NULL;
|
||||
_supportSubmeshes = true;
|
||||
_compatibleHypothesis.push_back( StdMeshers_ViscousLayers2D::GetHypType() );
|
||||
_requireDiscreteBoundary = false;
|
||||
_onlyUnaryInput = false;
|
||||
_hypothesis = NULL;
|
||||
_supportSubmeshes = true;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -80,33 +89,28 @@ NETGENPlugin_NETGEN_2D::~NETGENPlugin_NETGEN_2D()
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool NETGENPlugin_NETGEN_2D::CheckHypothesis
|
||||
(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
SMESH_Hypothesis::Hypothesis_Status& aStatus)
|
||||
bool NETGENPlugin_NETGEN_2D::CheckHypothesis (SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
Hypothesis_Status& aStatus)
|
||||
{
|
||||
_hypothesis = NULL;
|
||||
_hypothesis = NULL;
|
||||
_isViscousLayers2D = false;
|
||||
|
||||
const list<const SMESHDS_Hypothesis*>& hyps = GetUsedHypothesis(aMesh, aShape);
|
||||
int nbHyp = hyps.size();
|
||||
if (!nbHyp)
|
||||
{
|
||||
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||
return true; // can work with no hypothesis
|
||||
}
|
||||
// use only the first hypothesis
|
||||
const SMESHDS_Hypothesis* theHyp = hyps.front();
|
||||
// can work with no hypothesis
|
||||
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||
|
||||
string hypName = theHyp->GetName();
|
||||
if ( find( _compatibleHypothesis.begin(), _compatibleHypothesis.end(),
|
||||
hypName ) != _compatibleHypothesis.end() )
|
||||
const list<const SMESHDS_Hypothesis*>& hyps = GetUsedHypothesis(aMesh, aShape, /*skipAux=*/false);
|
||||
list<const SMESHDS_Hypothesis*>::const_iterator h = hyps.begin();
|
||||
for ( ; h != hyps.end(); ++h )
|
||||
{
|
||||
_hypothesis = theHyp;
|
||||
aStatus = SMESH_Hypothesis::HYP_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
aStatus = SMESH_Hypothesis::HYP_INCOMPATIBLE;
|
||||
const SMESHDS_Hypothesis* theHyp = *h;
|
||||
string hypName = theHyp->GetName();
|
||||
if ( hypName == StdMeshers_ViscousLayers2D::GetHypType() )
|
||||
_isViscousLayers2D = true;
|
||||
else if ( _hypothesis )
|
||||
aStatus = SMESH_Hypothesis::HYP_INCOMPATIBLE;
|
||||
else
|
||||
_hypothesis = theHyp;
|
||||
}
|
||||
|
||||
return aStatus == SMESH_Hypothesis::HYP_OK;
|
||||
@ -121,11 +125,38 @@ bool NETGENPlugin_NETGEN_2D::CheckHypothesis
|
||||
bool NETGENPlugin_NETGEN_2D::Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape)
|
||||
{
|
||||
//SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
|
||||
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
||||
netgen::multithread.terminate = 0;
|
||||
#endif
|
||||
|
||||
NETGENPlugin_Mesher mesher(&aMesh, aShape, false);
|
||||
// NETGENPlugin_Mesher mesher(meshDS, aShape, false);
|
||||
NETGENPlugin_Mesher mesher(&aMesh, aShape, /*is3D = */false);
|
||||
mesher.SetParameters(dynamic_cast<const NETGENPlugin_Hypothesis*>(_hypothesis));
|
||||
mesher.SetParameters(dynamic_cast<const NETGENPlugin_SimpleHypothesis_2D*>(_hypothesis));
|
||||
mesher.SetViscousLayers2DAssigned( _isViscousLayers2D );
|
||||
return mesher.Compute();
|
||||
}
|
||||
|
||||
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
||||
void NETGENPlugin_NETGEN_2D::CancelCompute()
|
||||
{
|
||||
SMESH_Algo::CancelCompute();
|
||||
netgen::multithread.terminate = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool NETGENPlugin_NETGEN_2D::Evaluate(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
MapShapeNbElems& aResMap)
|
||||
{
|
||||
|
||||
NETGENPlugin_Mesher mesher(&aMesh, aShape, false);
|
||||
mesher.SetParameters(dynamic_cast<const NETGENPlugin_Hypothesis*>(_hypothesis));
|
||||
mesher.SetParameters(dynamic_cast<const NETGENPlugin_SimpleHypothesis_2D*>(_hypothesis));
|
||||
return mesher.Evaluate(aResMap);
|
||||
}
|
||||
|
@ -1,30 +1,30 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_NETGEN_2D.hxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
// Date : 20/03/2006
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
//
|
||||
#ifndef _NETGENPlugin_NETGEN_2D_HXX_
|
||||
@ -32,13 +32,11 @@
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
|
||||
#include "SMESH_2D_Algo.hxx"
|
||||
#include "SMESH_Algo.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
#include "StdMeshers_MaxElementVolume.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
//class NETGENPlugin_Hypothesis_2D;
|
||||
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_2D: public SMESH_2D_Algo
|
||||
{
|
||||
public:
|
||||
@ -50,10 +48,18 @@ public:
|
||||
SMESH_Hypothesis::Hypothesis_Status& aStatus);
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
||||
virtual void CancelCompute();
|
||||
#endif
|
||||
|
||||
virtual bool Evaluate(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape,
|
||||
MapShapeNbElems& aResMap);
|
||||
|
||||
protected:
|
||||
const SMESHDS_Hypothesis* _hypothesis;
|
||||
bool _isViscousLayers2D;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,30 +1,30 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_NETGEN_2D3D.cxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
// Date : 20/03/2006
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
//
|
||||
#include "NETGENPlugin_NETGEN_2D3D.hxx"
|
||||
@ -40,6 +40,13 @@
|
||||
|
||||
#include <list>
|
||||
|
||||
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
||||
namespace nglib {
|
||||
#include <nglib.h>
|
||||
}
|
||||
#include <meshing.hpp>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
@ -57,7 +64,7 @@ NETGENPlugin_NETGEN_2D3D::NETGENPlugin_NETGEN_2D3D(int hypId, int studyId,
|
||||
_shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);// 1 bit /shape type
|
||||
_compatibleHypothesis.push_back("NETGEN_Parameters");
|
||||
_compatibleHypothesis.push_back("NETGEN_SimpleParameters_3D");
|
||||
_requireDescretBoundary = false;
|
||||
_requireDiscreteBoundary = false;
|
||||
_onlyUnaryInput = false;
|
||||
_hypothesis = NULL;
|
||||
_supportSubmeshes = true;
|
||||
@ -117,18 +124,49 @@ bool NETGENPlugin_NETGEN_2D3D::CheckHypothesis
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*Here we are going to use the NETGEN mesher
|
||||
* Here we are going to use the NETGEN mesher
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool NETGENPlugin_NETGEN_2D3D::Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape)
|
||||
{
|
||||
// SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
|
||||
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
||||
netgen::multithread.terminate = 0;
|
||||
#endif
|
||||
|
||||
NETGENPlugin_Mesher mesher(&aMesh, aShape, true);
|
||||
// NETGENPlugin_Mesher mesher(meshDS, aShape, true);
|
||||
mesher.SetParameters(dynamic_cast<const NETGENPlugin_Hypothesis*>(_hypothesis));
|
||||
mesher.SetParameters(dynamic_cast<const NETGENPlugin_SimpleHypothesis_2D*>(_hypothesis));
|
||||
return mesher.Compute();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
||||
void NETGENPlugin_NETGEN_2D3D::CancelCompute()
|
||||
{
|
||||
SMESH_Algo::CancelCompute();
|
||||
netgen::multithread.terminate = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool NETGENPlugin_NETGEN_2D3D::Evaluate(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
MapShapeNbElems& aResMap)
|
||||
{
|
||||
NETGENPlugin_Mesher mesher(&aMesh, aShape, true);
|
||||
mesher.SetParameters(dynamic_cast<const NETGENPlugin_Hypothesis*>(_hypothesis));
|
||||
mesher.SetParameters(dynamic_cast<const NETGENPlugin_SimpleHypothesis_2D*>(_hypothesis));
|
||||
return mesher.Evaluate(aResMap);
|
||||
}
|
||||
|
@ -1,30 +1,30 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_NETGEN_2D3D.hxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
// Date : 20/03/2006
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
//
|
||||
#ifndef _NETGENPlugin_NETGEN_2D3D_HXX_
|
||||
@ -32,12 +32,10 @@
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
|
||||
#include "SMESH_3D_Algo.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
#include "StdMeshers_MaxElementVolume.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
//class NETGENPlugin_Hypothesis;
|
||||
#include <SMESH_Algo.hxx>
|
||||
#include <SMESH_Mesh.hxx>
|
||||
#include <StdMeshers_MaxElementVolume.hxx>
|
||||
#include <Utils_SALOME_Exception.hxx>
|
||||
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_2D3D: public SMESH_3D_Algo
|
||||
{
|
||||
@ -50,7 +48,15 @@ public:
|
||||
SMESH_Hypothesis::Hypothesis_Status& aStatus);
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
||||
virtual void CancelCompute();
|
||||
#endif
|
||||
|
||||
virtual bool Evaluate(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
MapShapeNbElems& aResMap);
|
||||
|
||||
protected:
|
||||
const SMESHDS_Hypothesis* _hypothesis;
|
||||
|
@ -1,24 +1,25 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : idl implementation
|
||||
// File : NETGENPlugin_NETGEN_2D3D_i.cxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
|
@ -1,24 +1,25 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : idl implementation
|
||||
// File : NETGENPlugin_NETGEN_2D3D_i.hxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
|
@ -1,24 +1,22 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is 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 : NETGENPlugin_NETGEN_2D_ONLY.cxx
|
||||
// Author : Edward AGAPOV (OCC)
|
||||
// Project : SALOME
|
||||
@ -26,26 +24,31 @@
|
||||
#include "NETGENPlugin_NETGEN_2D_ONLY.hxx"
|
||||
|
||||
#include "NETGENPlugin_Mesher.hxx"
|
||||
#include "NETGENPlugin_Hypothesis_2D.hxx"
|
||||
|
||||
#include "SMDS_MeshElement.hxx"
|
||||
#include "SMDS_MeshNode.hxx"
|
||||
#include "SMESHDS_Mesh.hxx"
|
||||
#include "SMESH_Comment.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
#include "SMESH_MesherHelper.hxx"
|
||||
#include "StdMeshers_FaceSide.hxx"
|
||||
#include "StdMeshers_MaxElementArea.hxx"
|
||||
#include "StdMeshers_LengthFromEdges.hxx"
|
||||
#include "StdMeshers_QuadranglePreference.hxx"
|
||||
#include <SMDS_MeshElement.hxx>
|
||||
#include <SMDS_MeshNode.hxx>
|
||||
#include <SMESHDS_Mesh.hxx>
|
||||
#include <SMESH_Comment.hxx>
|
||||
#include <SMESH_Gen.hxx>
|
||||
#include <SMESH_Mesh.hxx>
|
||||
#include <SMESH_MesherHelper.hxx>
|
||||
#include <SMESH_subMesh.hxx>
|
||||
#include <StdMeshers_FaceSide.hxx>
|
||||
#include <StdMeshers_LengthFromEdges.hxx>
|
||||
#include <StdMeshers_MaxElementArea.hxx>
|
||||
#include <StdMeshers_QuadranglePreference.hxx>
|
||||
#include <StdMeshers_ViscousLayers2D.hxx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <Standard_Failure.hxx>
|
||||
|
||||
#include "utilities.h"
|
||||
#include <utilities.h>
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <limits>
|
||||
|
||||
/*
|
||||
Netgen include files
|
||||
@ -53,19 +56,27 @@
|
||||
namespace nglib {
|
||||
#include <nglib.h>
|
||||
}
|
||||
#ifndef OCCGEOMETRY
|
||||
#define OCCGEOMETRY
|
||||
#endif
|
||||
#include <occgeom.hpp>
|
||||
#include <meshing.hpp>
|
||||
//#include <meshtype.hpp>
|
||||
namespace netgen {
|
||||
#ifdef NETGEN_V5
|
||||
extern int OCCGenerateMesh (OCCGeometry&, Mesh*&, MeshingParameters&, int, int);
|
||||
#else
|
||||
extern int OCCGenerateMesh (OCCGeometry&, Mesh*&, int, int, char*);
|
||||
/*extern*/ MeshingParameters mparam;
|
||||
#endif
|
||||
extern MeshingParameters mparam;
|
||||
}
|
||||
|
||||
using namespace std;
|
||||
using namespace netgen;
|
||||
using namespace nglib;
|
||||
|
||||
//#define DUMP_SEGMENTS
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
@ -78,16 +89,19 @@ NETGENPlugin_NETGEN_2D_ONLY::NETGENPlugin_NETGEN_2D_ONLY(int hypId, int studyId,
|
||||
{
|
||||
MESSAGE("NETGENPlugin_NETGEN_2D_ONLY::NETGENPlugin_NETGEN_2D_ONLY");
|
||||
_name = "NETGEN_2D_ONLY";
|
||||
|
||||
|
||||
_shapeType = (1 << TopAbs_FACE);// 1 bit /shape type
|
||||
|
||||
_compatibleHypothesis.push_back("MaxElementArea");
|
||||
_compatibleHypothesis.push_back("LengthFromEdges");
|
||||
_compatibleHypothesis.push_back("QuadranglePreference");
|
||||
_compatibleHypothesis.push_back("NETGEN_Parameters_2D");
|
||||
_compatibleHypothesis.push_back("ViscousLayers2D");
|
||||
|
||||
_hypMaxElementArea = 0;
|
||||
_hypLengthFromEdges = 0;
|
||||
_hypQuadranglePreference = 0;
|
||||
_hypParameters = 0;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -138,143 +152,23 @@ bool NETGENPlugin_NETGEN_2D_ONLY::CheckHypothesis (SMESH_Mesh& aMesh,
|
||||
_hypLengthFromEdges = static_cast<const StdMeshers_LengthFromEdges*> (hyp);
|
||||
else if ( hypName == "QuadranglePreference" )
|
||||
_hypQuadranglePreference = static_cast<const StdMeshers_QuadranglePreference*>(hyp);
|
||||
else if ( hypName == "NETGEN_Parameters_2D" )
|
||||
_hypParameters = static_cast<const NETGENPlugin_Hypothesis_2D*>(hyp);
|
||||
else if ( hypName == StdMeshers_ViscousLayers2D::GetHypType() )
|
||||
continue;
|
||||
else {
|
||||
aStatus = HYP_INCOMPATIBLE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( _hypMaxElementArea && _hypLengthFromEdges ) {
|
||||
int nbHyps = bool(_hypMaxElementArea) + bool(_hypLengthFromEdges) + bool(_hypParameters );
|
||||
if ( nbHyps > 1 )
|
||||
aStatus = HYP_CONCURENT;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( _hypMaxElementArea || _hypLengthFromEdges )
|
||||
else
|
||||
aStatus = HYP_OK;
|
||||
|
||||
return aStatus == HYP_OK;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Fill netgen mesh with segments
|
||||
* \retval SMESH_ComputeErrorPtr - error description
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
static TError AddSegmentsToMesh(netgen::Mesh& ngMesh,
|
||||
OCCGeometry& geom,
|
||||
const TSideVector& wires,
|
||||
SMESH_MesherHelper& helper,
|
||||
vector< const SMDS_MeshNode* > & nodeVec)
|
||||
{
|
||||
// ----------------------------
|
||||
// Check wires and count nodes
|
||||
// ----------------------------
|
||||
int nbNodes = 0;
|
||||
for ( int iW = 0; iW < wires.size(); ++iW )
|
||||
{
|
||||
StdMeshers_FaceSidePtr wire = wires[ iW ];
|
||||
if ( wire->MissVertexNode() )
|
||||
return TError
|
||||
(new SMESH_ComputeError(COMPERR_BAD_INPUT_MESH, "Missing nodes on vertices"));
|
||||
|
||||
const vector<UVPtStruct>& uvPtVec = wire->GetUVPtStruct();
|
||||
if ( uvPtVec.size() != wire->NbPoints() )
|
||||
return TError
|
||||
(new SMESH_ComputeError(COMPERR_BAD_INPUT_MESH,
|
||||
SMESH_Comment("Unexpected nb of points on wire ") << iW
|
||||
<< ": " << uvPtVec.size()<<" != "<<wire->NbPoints()));
|
||||
nbNodes += wire->NbSegments();
|
||||
}
|
||||
nodeVec.reserve( nbNodes );
|
||||
|
||||
// -----------------
|
||||
// Fill netgen mesh
|
||||
// -----------------
|
||||
|
||||
// netgen::Box<3> bb = geom.GetBoundingBox();
|
||||
// bb.Increase (bb.Diam()/10);
|
||||
// ngMesh.SetLocalH (bb.PMin(), bb.PMax(), 0.5); // set grading
|
||||
|
||||
const int faceID = 1, solidID = 0;
|
||||
ngMesh.AddFaceDescriptor (FaceDescriptor(faceID, solidID, solidID, 0));
|
||||
|
||||
for ( int iW = 0; iW < wires.size(); ++iW )
|
||||
{
|
||||
StdMeshers_FaceSidePtr wire = wires[ iW ];
|
||||
const vector<UVPtStruct>& uvPtVec = wire->GetUVPtStruct();
|
||||
|
||||
int firstPointID = ngMesh.GetNP() + 1;
|
||||
int edgeID = 1, posID = -2;
|
||||
for ( int i = 0; i < wire->NbSegments(); ++i ) // loop on segments
|
||||
{
|
||||
// Add the first point of a segment
|
||||
const SMDS_MeshNode * n = uvPtVec[ i ].node;
|
||||
const int posShapeID = n->GetPosition()->GetShapeId();
|
||||
|
||||
// skip nodes on degenerated edges
|
||||
if ( helper.IsDegenShape( posShapeID ) &&
|
||||
helper.IsDegenShape( uvPtVec[ i+1 ].node->GetPosition()->GetShapeId() ))
|
||||
continue;
|
||||
|
||||
nodeVec.push_back( n );
|
||||
|
||||
MeshPoint mp( Point<3> (n->X(), n->Y(), n->Z()) );
|
||||
ngMesh.AddPoint ( mp, 1, EDGEPOINT );
|
||||
|
||||
// Add the segment
|
||||
Segment seg;
|
||||
|
||||
seg.p1 = ngMesh.GetNP(); // ng node id
|
||||
seg.p2 = seg.p1 + 1; // ng node id
|
||||
seg.edgenr = ngMesh.GetNSeg() + 1;// segment id
|
||||
seg.si = faceID; // = geom.fmap.FindIndex (face);
|
||||
|
||||
for ( int iEnd = 0; iEnd < 2; ++iEnd)
|
||||
{
|
||||
const UVPtStruct& pnt = uvPtVec[ i + iEnd ];
|
||||
|
||||
seg.epgeominfo[ iEnd ].dist = pnt.param; // param on curve
|
||||
seg.epgeominfo[ iEnd ].u = pnt.u;
|
||||
seg.epgeominfo[ iEnd ].v = pnt.v;
|
||||
|
||||
// find out edge id and node parameter on edge
|
||||
bool onVertex = ( pnt.node->GetPosition()->GetTypeOfPosition() == SMDS_TOP_VERTEX );
|
||||
if ( onVertex || posShapeID != posID )
|
||||
{
|
||||
// get edge id
|
||||
double normParam = pnt.normParam;
|
||||
if ( onVertex )
|
||||
normParam = 0.5 * ( uvPtVec[ i ].normParam + uvPtVec[ i+1 ].normParam );
|
||||
const TopoDS_Edge& edge = wire->Edge( wire->EdgeIndex( normParam ));
|
||||
edgeID = geom.emap.FindIndex( edge );
|
||||
posID = posShapeID;
|
||||
if ( onVertex ) // param on curve is different on each of two edges
|
||||
seg.epgeominfo[ iEnd ].dist = helper.GetNodeU( edge, pnt.node );
|
||||
}
|
||||
seg.epgeominfo[ iEnd ].edgenr = edgeID; // = geom.emap.FindIndex(edge);
|
||||
}
|
||||
|
||||
ngMesh.AddSegment (seg);
|
||||
|
||||
// cout << "Segment: " << seg.edgenr << endl
|
||||
// << "\tp1: " << seg.p1 << endl
|
||||
// << "\tp2: " << seg.p2 << endl
|
||||
// << "\tp0 param: " << seg.epgeominfo[ 0 ].dist << endl
|
||||
// << "\tp0 uv: " << seg.epgeominfo[ 0 ].u <<", "<< seg.epgeominfo[ 0 ].v << endl
|
||||
// << "\tp0 edge: " << seg.epgeominfo[ 0 ].edgenr << endl
|
||||
// << "\tp1 param: " << seg.epgeominfo[ 1 ].dist << endl
|
||||
// << "\tp1 uv: " << seg.epgeominfo[ 1 ].u <<", "<< seg.epgeominfo[ 1 ].v << endl
|
||||
// << "\tp1 edge: " << seg.epgeominfo[ 1 ].edgenr << endl;
|
||||
}
|
||||
Segment& seg = ngMesh.LineSegment( ngMesh.GetNSeg() );
|
||||
seg.p2 = firstPointID;
|
||||
}
|
||||
|
||||
ngMesh.CalcSurfacesOfNode();
|
||||
|
||||
return TError();
|
||||
return ( aStatus == HYP_OK );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -286,6 +180,9 @@ static TError AddSegmentsToMesh(netgen::Mesh& ngMesh,
|
||||
bool NETGENPlugin_NETGEN_2D_ONLY::Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape)
|
||||
{
|
||||
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
||||
netgen::multithread.terminate = 0;
|
||||
#endif
|
||||
MESSAGE("NETGENPlugin_NETGEN_2D_ONLY::Compute()");
|
||||
|
||||
SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
|
||||
@ -296,12 +193,18 @@ bool NETGENPlugin_NETGEN_2D_ONLY::Compute(SMESH_Mesh& aMesh,
|
||||
helper.SetElementsOnShape( true );
|
||||
const bool ignoreMediumNodes = _quadraticMesh;
|
||||
|
||||
// build viscous layers if required
|
||||
const TopoDS_Face F = TopoDS::Face( aShape.Oriented( TopAbs_FORWARD ));
|
||||
SMESH_ProxyMesh::Ptr proxyMesh = StdMeshers_ViscousLayers2D::Compute( aMesh, F );
|
||||
if ( !proxyMesh )
|
||||
return false;
|
||||
|
||||
// ------------------------
|
||||
// get all edges of a face
|
||||
// ------------------------
|
||||
const TopoDS_Face F = TopoDS::Face( aShape.Oriented( TopAbs_FORWARD ));
|
||||
TError problem;
|
||||
TSideVector wires = StdMeshers_FaceSide::GetFaceWires( F, aMesh, ignoreMediumNodes, problem );
|
||||
TSideVector wires =
|
||||
StdMeshers_FaceSide::GetFaceWires( F, aMesh, ignoreMediumNodes, problem, proxyMesh );
|
||||
if ( problem && !problem->IsOK() )
|
||||
return error( problem );
|
||||
int nbWires = wires.size();
|
||||
@ -311,60 +214,73 @@ bool NETGENPlugin_NETGEN_2D_ONLY::Compute(SMESH_Mesh& aMesh,
|
||||
return error(COMPERR_BAD_INPUT_MESH,
|
||||
SMESH_Comment("Too few segments: ")<<wires[0]->NbSegments());
|
||||
|
||||
// -------------------------
|
||||
// Make input netgen mesh
|
||||
// -------------------------
|
||||
|
||||
Ng_Init();
|
||||
netgen::Mesh * ngMesh = new netgen::Mesh ();
|
||||
|
||||
netgen::OCCGeometry occgeo;
|
||||
NETGENPlugin_Mesher::PrepareOCCgeometry( occgeo, F, aMesh );
|
||||
occgeo.fmap.Clear(); // face can be reversed, which is wrong in this case (issue 19978)
|
||||
occgeo.fmap.Add( F );
|
||||
|
||||
vector< const SMDS_MeshNode* > nodeVec;
|
||||
problem = AddSegmentsToMesh( *ngMesh, occgeo, wires, helper, nodeVec );
|
||||
if ( problem && !problem->IsOK() ) {
|
||||
delete ngMesh; Ng_Exit();
|
||||
return error( problem );
|
||||
}
|
||||
|
||||
// --------------------
|
||||
// compute edge length
|
||||
// --------------------
|
||||
|
||||
double edgeLength = 0;
|
||||
if (_hypLengthFromEdges || !_hypLengthFromEdges && !_hypMaxElementArea)
|
||||
NETGENPlugin_Mesher aMesher( &aMesh, aShape, /*isVolume=*/false);
|
||||
netgen::OCCGeometry occgeo;
|
||||
aMesher.PrepareOCCgeometry( occgeo, F, aMesh );
|
||||
occgeo.fmap.Clear(); // face can be reversed, which is wrong in this case (issue 19978)
|
||||
occgeo.fmap.Add( F );
|
||||
|
||||
if ( _hypParameters )
|
||||
{
|
||||
int nbSegments = 0;
|
||||
for ( int iW = 0; iW < nbWires; ++iW )
|
||||
aMesher.SetParameters(_hypParameters);
|
||||
}
|
||||
else
|
||||
{
|
||||
double edgeLength = 0;
|
||||
if (_hypLengthFromEdges || (!_hypLengthFromEdges && !_hypMaxElementArea))
|
||||
{
|
||||
edgeLength += wires[ iW ]->Length();
|
||||
nbSegments += wires[ iW ]->NbSegments();
|
||||
int nbSegments = 0;
|
||||
for ( int iW = 0; iW < nbWires; ++iW )
|
||||
{
|
||||
edgeLength += wires[ iW ]->Length();
|
||||
nbSegments += wires[ iW ]->NbSegments();
|
||||
}
|
||||
if ( nbSegments )
|
||||
edgeLength /= nbSegments;
|
||||
}
|
||||
if ( nbSegments )
|
||||
edgeLength /= nbSegments;
|
||||
}
|
||||
if ( _hypMaxElementArea )
|
||||
{
|
||||
double maxArea = _hypMaxElementArea->GetMaxArea();
|
||||
edgeLength = sqrt(2. * maxArea/sqrt(3.0));
|
||||
}
|
||||
if ( edgeLength < DBL_MIN )
|
||||
edgeLength = occgeo.GetBoundingBox().Diam();
|
||||
if ( _hypMaxElementArea )
|
||||
{
|
||||
double maxArea = _hypMaxElementArea->GetMaxArea();
|
||||
edgeLength = sqrt(2. * maxArea/sqrt(3.0));
|
||||
}
|
||||
if ( edgeLength < DBL_MIN )
|
||||
edgeLength = occgeo.GetBoundingBox().Diam();
|
||||
|
||||
//cout << " edgeLength = " << edgeLength << endl;
|
||||
netgen::mparam.maxh = edgeLength;
|
||||
netgen::mparam.minh = aMesher.GetDefaultMinSize( aShape, netgen::mparam.maxh );
|
||||
netgen::mparam.quad = _hypQuadranglePreference ? 1 : 0;
|
||||
netgen::mparam.grading = 0.7; // very coarse mesh by default
|
||||
}
|
||||
occgeo.face_maxh = netgen::mparam.maxh;
|
||||
|
||||
netgen::mparam.maxh = edgeLength;
|
||||
netgen::mparam.quad = _hypQuadranglePreference ? 1 : 0;
|
||||
//ngMesh->SetGlobalH ( edgeLength );
|
||||
// -------------------------
|
||||
// Make input netgen mesh
|
||||
// -------------------------
|
||||
|
||||
NETGENPlugin_NetgenLibWrapper ngLib;
|
||||
netgen::Mesh * ngMesh = (netgen::Mesh*) ngLib._ngMesh;
|
||||
|
||||
Box<3> bb = occgeo.GetBoundingBox();
|
||||
bb.Increase (bb.Diam()/10);
|
||||
ngMesh->SetLocalH (bb.PMin(), bb.PMax(), netgen::mparam.grading);
|
||||
ngMesh->SetGlobalH (netgen::mparam.maxh);
|
||||
|
||||
vector< const SMDS_MeshNode* > nodeVec;
|
||||
problem = aMesher.AddSegmentsToMesh( *ngMesh, occgeo, wires, helper, nodeVec );
|
||||
if ( problem && !problem->IsOK() )
|
||||
return error( problem );
|
||||
|
||||
// -------------------------
|
||||
// Generate surface mesh
|
||||
// -------------------------
|
||||
|
||||
char *optstr;
|
||||
#ifndef NETGEN_V5
|
||||
char *optstr = 0;
|
||||
#endif
|
||||
int startWith = MESHCONST_MESHSURFACE;
|
||||
int endWith = MESHCONST_OPTSURFACE;
|
||||
int err = 1;
|
||||
@ -373,21 +289,31 @@ bool NETGENPlugin_NETGEN_2D_ONLY::Compute(SMESH_Mesh& aMesh,
|
||||
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||
OCC_CATCH_SIGNALS;
|
||||
#endif
|
||||
#ifdef NETGEN_V5
|
||||
err = netgen::OCCGenerateMesh(occgeo, ngMesh, netgen::mparam, startWith, endWith);
|
||||
#else
|
||||
err = netgen::OCCGenerateMesh(occgeo, ngMesh, startWith, endWith, optstr);
|
||||
#endif
|
||||
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
||||
if(netgen::multithread.terminate)
|
||||
return false;
|
||||
#endif
|
||||
if ( err )
|
||||
error(SMESH_Comment("Error in netgen::OCCGenerateMesh() at ") << netgen::multithread.task);
|
||||
}
|
||||
catch (Standard_Failure& ex) {
|
||||
string comment = ex.DynamicType()->Name();
|
||||
if ( ex.GetMessageString() && strlen( ex.GetMessageString() )) {
|
||||
comment += ": ";
|
||||
comment += ex.GetMessageString();
|
||||
}
|
||||
error(COMPERR_OCC_EXCEPTION, comment);
|
||||
}
|
||||
catch (NgException exc) {
|
||||
error( SMESH_Comment("NgException: ") << exc.What() );
|
||||
catch (Standard_Failure& ex)
|
||||
{
|
||||
SMESH_Comment str("Exception in netgen::OCCGenerateMesh()");
|
||||
str << " at " << netgen::multithread.task
|
||||
<< ": " << ex.DynamicType()->Name();
|
||||
if ( ex.GetMessageString() && strlen( ex.GetMessageString() ))
|
||||
str << ": " << ex.GetMessageString();
|
||||
error(str);
|
||||
}
|
||||
catch (...) {
|
||||
error(COMPERR_EXCEPTION,"Exception in netgen::OCCGenerateMesh()");
|
||||
SMESH_Comment str("Exception in netgen::OCCGenerateMesh()");
|
||||
str << " at " << netgen::multithread.task;
|
||||
error(str);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------
|
||||
@ -397,27 +323,30 @@ bool NETGENPlugin_NETGEN_2D_ONLY::Compute(SMESH_Mesh& aMesh,
|
||||
int nbNodes = ngMesh->GetNP();
|
||||
int nbFaces = ngMesh->GetNSE();
|
||||
|
||||
int nbInputNodes = nodeVec.size();
|
||||
nodeVec.resize( nbNodes, 0 );
|
||||
int nbInputNodes = nodeVec.size()-1;
|
||||
nodeVec.resize( nbNodes+1, 0 );
|
||||
|
||||
// add nodes
|
||||
for ( int i = nbInputNodes + 1; i <= nbNodes; ++i )
|
||||
for ( int ngID = nbInputNodes + 1; ngID <= nbNodes; ++ngID )
|
||||
{
|
||||
const MeshPoint& ngPoint = ngMesh->Point(i);
|
||||
SMDS_MeshNode * node = meshDS->AddNode(ngPoint.X(), ngPoint.Y(), ngPoint.Z());
|
||||
nodeVec[ i-1 ] = node;
|
||||
const MeshPoint& ngPoint = ngMesh->Point( ngID );
|
||||
SMDS_MeshNode * node = meshDS->AddNode(ngPoint(0), ngPoint(1), ngPoint(2));
|
||||
nodeVec[ ngID ] = node;
|
||||
}
|
||||
|
||||
// create faces
|
||||
bool reverse = ( aShape.Orientation() == TopAbs_REVERSED );
|
||||
for ( int i = 1; i <= nbFaces ; ++i )
|
||||
int i,j;
|
||||
for ( i = 1; i <= nbFaces ; ++i )
|
||||
{
|
||||
const Element2d& elem = ngMesh->SurfaceElement(i);
|
||||
vector<const SMDS_MeshNode*> nodes( elem.GetNP() );
|
||||
for (int j=1; j <= elem.GetNP(); ++j)
|
||||
for (j=1; j <= elem.GetNP(); ++j)
|
||||
{
|
||||
int pind = elem.PNum(j);
|
||||
const SMDS_MeshNode* node = nodeVec.at(pind-1);
|
||||
if ( pind < 1 )
|
||||
break;
|
||||
const SMDS_MeshNode* node = nodeVec[ pind ];
|
||||
if ( reverse )
|
||||
nodes[ nodes.size()-j ] = node;
|
||||
else
|
||||
@ -428,17 +357,108 @@ bool NETGENPlugin_NETGEN_2D_ONLY::Compute(SMESH_Mesh& aMesh,
|
||||
meshDS->SetNodeOnFace((SMDS_MeshNode*)node, faceID, pgi.u, pgi.v);
|
||||
}
|
||||
}
|
||||
SMDS_MeshFace* face = 0;
|
||||
if ( elem.GetType() == TRIG )
|
||||
face = helper.AddFace(nodes[0],nodes[1],nodes[2]);
|
||||
else
|
||||
face = helper.AddFace(nodes[0],nodes[1],nodes[2],nodes[3]);
|
||||
if ( j > elem.GetNP() )
|
||||
{
|
||||
SMDS_MeshFace* face = 0;
|
||||
if ( elem.GetType() == TRIG )
|
||||
face = helper.AddFace(nodes[0],nodes[1],nodes[2]);
|
||||
else
|
||||
face = helper.AddFace(nodes[0],nodes[1],nodes[2],nodes[3]);
|
||||
}
|
||||
}
|
||||
|
||||
Ng_DeleteMesh((nglib::Ng_Mesh*)ngMesh);
|
||||
Ng_Exit();
|
||||
|
||||
NETGENPlugin_Mesher::RemoveTmpFiles();
|
||||
|
||||
return !err;
|
||||
}
|
||||
|
||||
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
||||
void NETGENPlugin_NETGEN_2D_ONLY::CancelCompute()
|
||||
{
|
||||
SMESH_Algo::CancelCompute();
|
||||
netgen::multithread.terminate = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool NETGENPlugin_NETGEN_2D_ONLY::Evaluate(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
MapShapeNbElems& aResMap)
|
||||
{
|
||||
TopoDS_Face F = TopoDS::Face(aShape);
|
||||
if(F.IsNull())
|
||||
return false;
|
||||
|
||||
// collect info from edges
|
||||
int nb0d = 0, nb1d = 0;
|
||||
bool IsQuadratic = false;
|
||||
bool IsFirst = true;
|
||||
double fullLen = 0.0;
|
||||
TopTools_MapOfShape tmpMap;
|
||||
for (TopExp_Explorer exp(F, TopAbs_EDGE); exp.More(); exp.Next()) {
|
||||
TopoDS_Edge E = TopoDS::Edge(exp.Current());
|
||||
if( tmpMap.Contains(E) )
|
||||
continue;
|
||||
tmpMap.Add(E);
|
||||
SMESH_subMesh *aSubMesh = aMesh.GetSubMesh(exp.Current());
|
||||
MapShapeNbElemsItr anIt = aResMap.find(aSubMesh);
|
||||
if( anIt==aResMap.end() ) {
|
||||
SMESH_subMesh *sm = aMesh.GetSubMesh(F);
|
||||
SMESH_ComputeErrorPtr& smError = sm->GetComputeError();
|
||||
smError.reset( new SMESH_ComputeError(COMPERR_ALGO_FAILED,"Submesh can not be evaluated",this));
|
||||
return false;
|
||||
}
|
||||
std::vector<int> aVec = (*anIt).second;
|
||||
nb0d += aVec[SMDSEntity_Node];
|
||||
nb1d += Max(aVec[SMDSEntity_Edge],aVec[SMDSEntity_Quad_Edge]);
|
||||
double aLen = SMESH_Algo::EdgeLength(E);
|
||||
fullLen += aLen;
|
||||
if(IsFirst) {
|
||||
IsQuadratic = (aVec[SMDSEntity_Quad_Edge] > aVec[SMDSEntity_Edge]);
|
||||
IsFirst = false;
|
||||
}
|
||||
}
|
||||
tmpMap.Clear();
|
||||
|
||||
// compute edge length
|
||||
double ELen = 0;
|
||||
if (_hypLengthFromEdges || !_hypLengthFromEdges && !_hypMaxElementArea) {
|
||||
if ( nb1d > 0 )
|
||||
ELen = fullLen / nb1d;
|
||||
}
|
||||
if ( _hypMaxElementArea ) {
|
||||
double maxArea = _hypMaxElementArea->GetMaxArea();
|
||||
ELen = sqrt(2. * maxArea/sqrt(3.0));
|
||||
}
|
||||
GProp_GProps G;
|
||||
BRepGProp::SurfaceProperties(F,G);
|
||||
double anArea = G.Mass();
|
||||
|
||||
const int hugeNb = numeric_limits<int>::max()/10;
|
||||
if ( anArea / hugeNb > ELen*ELen )
|
||||
{
|
||||
SMESH_subMesh *sm = aMesh.GetSubMesh(F);
|
||||
SMESH_ComputeErrorPtr& smError = sm->GetComputeError();
|
||||
smError.reset( new SMESH_ComputeError(COMPERR_ALGO_FAILED,"Submesh can not be evaluated.\nToo small element length",this));
|
||||
return false;
|
||||
}
|
||||
int nbFaces = (int) ( anArea / ( ELen*ELen*sqrt(3.) / 4 ) );
|
||||
int nbNodes = (int) ( ( nbFaces*3 - (nb1d-1)*2 ) / 6 + 1 );
|
||||
std::vector<int> aVec(SMDSEntity_Last);
|
||||
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aVec[i]=0;
|
||||
if( IsQuadratic ) {
|
||||
aVec[SMDSEntity_Node] = nbNodes;
|
||||
aVec[SMDSEntity_Quad_Triangle] = nbFaces;
|
||||
}
|
||||
else {
|
||||
aVec[SMDSEntity_Node] = nbNodes;
|
||||
aVec[SMDSEntity_Triangle] = nbFaces;
|
||||
}
|
||||
SMESH_subMesh *sm = aMesh.GetSubMesh(F);
|
||||
aResMap.insert(std::make_pair(sm,aVec));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1,24 +1,22 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is 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 : NETGENPlugin_NETGEN_2D_ONLY.hxx
|
||||
// Project : SALOME
|
||||
// Author : Edward AGAPOV (OCC)
|
||||
@ -26,28 +24,12 @@
|
||||
#ifndef _NETGENPlugin_NETGEN_2D_ONLY_HXX_
|
||||
#define _NETGENPlugin_NETGEN_2D_ONLY_HXX_
|
||||
|
||||
#include "SMESH_2D_Algo.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
|
||||
/*#define OCCGEOMETRY
|
||||
#include <occgeom.hpp>
|
||||
#include <meshing.hpp>//amv*/
|
||||
#include <SMESH_Algo.hxx>
|
||||
#include <SMESH_Mesh.hxx>
|
||||
|
||||
class StdMeshers_MaxElementArea;
|
||||
class StdMeshers_LengthFromEdges;
|
||||
class StdMeshers_QuadranglePreference;
|
||||
//class NETGENPlugin_Hypothesis;
|
||||
|
||||
/*namespace netgen {
|
||||
class OCCGeometry;
|
||||
}*/
|
||||
/*namespace netgen {
|
||||
class OCCGeometry;
|
||||
extern int OCCGenerateMesh (OCCGeometry&, Mesh*&, int, int, char*);
|
||||
extern MeshingParameters mparam;
|
||||
}*/
|
||||
|
||||
//using namespace netgen;
|
||||
class NETGENPlugin_Hypothesis_2D;
|
||||
|
||||
/*!
|
||||
* \brief Mesher generating 2D elements on a geometrical face taking
|
||||
@ -70,17 +52,18 @@ public:
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
/*static TError AddSegmentsToMesh(netgen::Mesh& ngMesh,
|
||||
OCCGeometry& geom,
|
||||
const TSideVector& wires,
|
||||
SMESH_MesherHelper& helper,
|
||||
vector< const SMDS_MeshNode* > & nodeVec); //amv*/
|
||||
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
||||
virtual void CancelCompute();
|
||||
#endif
|
||||
|
||||
virtual bool Evaluate(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape,
|
||||
MapShapeNbElems& aResMap);
|
||||
|
||||
protected:
|
||||
const StdMeshers_MaxElementArea* _hypMaxElementArea;
|
||||
const StdMeshers_LengthFromEdges* _hypLengthFromEdges;
|
||||
const StdMeshers_QuadranglePreference* _hypQuadranglePreference;
|
||||
// const NETGENPlugin_Hypothesis* _hypothesis;
|
||||
const SMESHDS_Hypothesis* _hypQuadranglePreference;
|
||||
const NETGENPlugin_Hypothesis_2D* _hypParameters;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,24 +1,22 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is 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
|
||||
//
|
||||
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
// File : NETGENPlugin_NETGEN_2D_ONLY_i.cxx
|
||||
// Author : Edward AGAPOV (OCC)
|
||||
@ -38,8 +36,8 @@
|
||||
//=============================================================================
|
||||
|
||||
NETGENPlugin_NETGEN_2D_ONLY_i::NETGENPlugin_NETGEN_2D_ONLY_i( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
: SALOME::GenericObj_i( thePOA ),
|
||||
SMESH_Hypothesis_i( thePOA ),
|
||||
SMESH_Algo_i( thePOA ),
|
||||
|
@ -1,24 +1,22 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is 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
|
||||
//
|
||||
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
// File : NETGENPlugin_NETGEN_2D_ONLY_i.cxx
|
||||
// Author : Edward AGAPOV (OCC)
|
||||
|
@ -1,24 +1,25 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : idl implementation
|
||||
// File : NETGENPlugin_NETGEN_2D_i.cxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
|
@ -1,24 +1,25 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : idl implementation
|
||||
// File : NETGENPlugin_NETGEN_2D_i.hxx
|
||||
// Author : Michael Sazonov (OCN)
|
||||
|
@ -1,46 +1,49 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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 : NETGENPlugin_NETGEN_3D.hxx
|
||||
// Moved here from SMESH_NETGEN_3D.hxx
|
||||
// Created : lundi 27 Janvier 2003
|
||||
// Author : Nadir BOUHAMOU (CEA)
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
//
|
||||
#ifndef _NETGENPlugin_NETGEN_3D_HXX_
|
||||
#define _NETGENPlugin_NETGEN_3D_HXX_
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
#include "NETGENPlugin_Mesher.hxx"
|
||||
|
||||
#include "SMESH_3D_Algo.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
#include "StdMeshers_MaxElementVolume.hxx"
|
||||
#include "SMESH_Algo.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
class StdMeshers_ViscousLayers;
|
||||
class StdMeshers_MaxElementVolume;
|
||||
class NETGENPlugin_Hypothesis;
|
||||
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_3D: public SMESH_3D_Algo
|
||||
{
|
||||
public:
|
||||
public:
|
||||
NETGENPlugin_NETGEN_3D(int hypId, int studyId, SMESH_Gen* gen);
|
||||
virtual ~NETGENPlugin_NETGEN_3D();
|
||||
|
||||
@ -49,15 +52,31 @@ public:
|
||||
SMESH_Hypothesis::Hypothesis_Status& aStatus);
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
SMESH_MesherHelper* aHelper);
|
||||
|
||||
protected:
|
||||
|
||||
#ifdef WITH_SMESH_CANCEL_COMPUTE
|
||||
virtual void CancelCompute();
|
||||
#endif
|
||||
|
||||
virtual bool Evaluate(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
MapShapeNbElems& aResMap);
|
||||
|
||||
protected:
|
||||
|
||||
bool compute(SMESH_Mesh& mesh,
|
||||
SMESH_MesherHelper& helper,
|
||||
vector< const SMDS_MeshNode* >& nodeVec,
|
||||
nglib::Ng_Mesh* ngMesh);
|
||||
|
||||
double _maxElementVolume;
|
||||
|
||||
const NETGENPlugin_Hypothesis * _hypParameters;
|
||||
const StdMeshers_MaxElementVolume* _hypMaxElementVolume;
|
||||
const StdMeshers_ViscousLayers* _viscousLayersHyp;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,24 +1,25 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
// File : NETGENPlugin_NETGEN_3D_i.cxx
|
||||
// Moved here from SMESH_NETGEN_3D_i.cxx
|
||||
@ -43,8 +44,8 @@ using namespace std;
|
||||
//=============================================================================
|
||||
|
||||
NETGENPlugin_NETGEN_3D_i::NETGENPlugin_NETGEN_3D_i( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
: SALOME::GenericObj_i( thePOA ),
|
||||
SMESH_Hypothesis_i( thePOA ),
|
||||
SMESH_Algo_i( thePOA ),
|
||||
@ -52,8 +53,8 @@ NETGENPlugin_NETGEN_3D_i::NETGENPlugin_NETGEN_3D_i( PortableServer::POA_ptr theP
|
||||
{
|
||||
MESSAGE( "NETGENPlugin_NETGEN_3D_i::NETGENPlugin_NETGEN_3D_i" );
|
||||
myBaseImpl = new ::NETGENPlugin_NETGEN_3D( theGenImpl->GetANewId(),
|
||||
theStudyId,
|
||||
theGenImpl );
|
||||
theStudyId,
|
||||
theGenImpl );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
@ -1,24 +1,25 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
// File : NETGENPlugin_NETGEN_3D_i.hxx
|
||||
// Moved here from SMESH_NETGEN_3D_i.hxx
|
||||
|
@ -1,24 +1,22 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_SimpleHypothesis_2D.cxx
|
||||
// Author : Edward AGAPOV
|
||||
@ -49,7 +47,8 @@ NETGENPlugin_SimpleHypothesis_2D::NETGENPlugin_SimpleHypothesis_2D (int
|
||||
: SMESH_Hypothesis(hypId, studyId, gen),
|
||||
_nbSegments ((int)NETGENPlugin_Hypothesis::GetDefaultNbSegPerEdge()),
|
||||
_segmentLength(0),
|
||||
_area (0.)
|
||||
_area (0.),
|
||||
_allowQuad (false)
|
||||
{
|
||||
_name = "NETGEN_SimpleParameters_2D";
|
||||
_param_algo_dim = 2;
|
||||
@ -120,6 +119,30 @@ void NETGENPlugin_SimpleHypothesis_2D::SetMaxElementArea(double area)
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetAllowQuadrangles
|
||||
//purpose : Enables/disables generation of quadrangular faces
|
||||
//=======================================================================
|
||||
|
||||
void NETGENPlugin_SimpleHypothesis_2D::SetAllowQuadrangles(bool toAllow)
|
||||
{
|
||||
if ( _allowQuad != toAllow )
|
||||
{
|
||||
_allowQuad = toAllow;
|
||||
NotifySubMeshesHypothesisModification();
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetAllowQuadrangles
|
||||
//purpose : Returns true if generation of quadrangular faces is enabled
|
||||
//=======================================================================
|
||||
|
||||
bool NETGENPlugin_SimpleHypothesis_2D::GetAllowQuadrangles() const
|
||||
{
|
||||
return _allowQuad;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
@ -127,7 +150,7 @@ void NETGENPlugin_SimpleHypothesis_2D::SetMaxElementArea(double area)
|
||||
//=============================================================================
|
||||
ostream & NETGENPlugin_SimpleHypothesis_2D::SaveTo(ostream & save)
|
||||
{
|
||||
save << _nbSegments << " " << _segmentLength << " " << _area;
|
||||
save << _nbSegments << " " << _segmentLength << " " << _area << " " << _allowQuad;
|
||||
|
||||
return save;
|
||||
}
|
||||
@ -160,6 +183,8 @@ istream & NETGENPlugin_SimpleHypothesis_2D::LoadFrom(istream & load)
|
||||
else
|
||||
load.clear(ios::badbit | load.rdstate());
|
||||
|
||||
load >> _allowQuad;
|
||||
|
||||
return load;
|
||||
}
|
||||
|
||||
|
@ -1,24 +1,22 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_SimpleHypothesis_2D.hxx
|
||||
// Author : Edward AGAPOV
|
||||
@ -80,6 +78,15 @@ public:
|
||||
*/
|
||||
double GetMaxElementArea() const { return _area; }
|
||||
|
||||
/*!
|
||||
* Enables/disables generation of quadrangular faces
|
||||
*/
|
||||
void SetAllowQuadrangles(bool toAllow);
|
||||
/*!
|
||||
* Returns true if generation of quadrangular faces is enabled
|
||||
*/
|
||||
bool GetAllowQuadrangles() const;
|
||||
|
||||
// Persistence
|
||||
virtual ostream & SaveTo(ostream & save);
|
||||
virtual istream & LoadFrom(istream & load);
|
||||
@ -101,6 +108,7 @@ public:
|
||||
private:
|
||||
int _nbSegments;
|
||||
double _segmentLength, _area;
|
||||
bool _allowQuad;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,24 +1,22 @@
|
||||
// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is 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
|
||||
//
|
||||
|
||||
// NETGENPlugin : C++ implementation
|
||||
// File : NETGENPlugin_SimpleHypothesis_2D_i.cxx
|
||||
// Author : Edward AGAPOV
|
||||
@ -34,6 +32,8 @@
|
||||
#include <Utils_CorbaException.hxx>
|
||||
#include <utilities.h>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
@ -84,7 +84,7 @@ void NETGENPlugin_SimpleHypothesis_2D_i::SetNumberOfSegments(CORBA::Short nb)
|
||||
catch (SALOME_Exception& S_ex) {
|
||||
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
|
||||
}
|
||||
SMESH::TPythonDump() << _this() << ".SetNumberOfSegments( " << nb << " )";
|
||||
SMESH::TPythonDump() << _this() << ".SetNumberOfSegments( " << SMESH::TVar(nb) << " )";
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -115,7 +115,7 @@ void NETGENPlugin_SimpleHypothesis_2D_i::SetLocalLength(CORBA::Double segmentLen
|
||||
catch (SALOME_Exception& S_ex) {
|
||||
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
|
||||
}
|
||||
SMESH::TPythonDump() << _this() << ".SetLocalLength( " << segmentLength << " )";
|
||||
SMESH::TPythonDump() << _this() << ".SetLocalLength( " << SMESH::TVar(segmentLength) << " )";
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
@ -154,7 +154,7 @@ void NETGENPlugin_SimpleHypothesis_2D_i::SetMaxElementArea(CORBA::Double area)
|
||||
MESSAGE("NETGENPlugin_SimpleHypothesis_2D_i::SetMaxElementArea");
|
||||
ASSERT(myBaseImpl);
|
||||
this->GetImpl()->SetMaxElementArea(area);
|
||||
SMESH::TPythonDump() << _this() << ".SetMaxElementArea( " << area << " )";
|
||||
SMESH::TPythonDump() << _this() << ".SetMaxElementArea( " << SMESH::TVar(area) << " )";
|
||||
}
|
||||
|
||||
|
||||
@ -163,18 +163,43 @@ void NETGENPlugin_SimpleHypothesis_2D_i::SetMaxElementArea(CORBA::Double area)
|
||||
* NETGENPlugin_SimpleHypothesis_2D_i::GetMaxElementArea()
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
CORBA::Double NETGENPlugin_SimpleHypothesis_2D_i::GetMaxElementArea()
|
||||
{
|
||||
MESSAGE("NETGENPlugin_SimpleHypothesis_2D_i::GetMaxElementArea");
|
||||
ASSERT(myBaseImpl);
|
||||
return this->GetImpl()->GetMaxElementArea();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Enables/disables generation of quadrangular faces
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void NETGENPlugin_SimpleHypothesis_2D_i::SetAllowQuadrangles(CORBA::Boolean toAllow)
|
||||
{
|
||||
ASSERT(myBaseImpl);
|
||||
SMESH::TPythonDump() << _this() << ".SetAllowQuadrangles( " << toAllow << " )";
|
||||
this->GetImpl()->SetAllowQuadrangles(toAllow);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Returns true if generation of quadrangular faces is enabled
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
CORBA::Boolean NETGENPlugin_SimpleHypothesis_2D_i::GetAllowQuadrangles()
|
||||
{
|
||||
return this->GetImpl()->GetAllowQuadrangles();
|
||||
}
|
||||
//=============================================================================
|
||||
/*!
|
||||
* NETGENPlugin_SimpleHypothesis_2D_i::GetImpl
|
||||
*/
|
||||
//=============================================================================
|
||||
::NETGENPlugin_SimpleHypothesis_2D* NETGENPlugin_SimpleHypothesis_2D_i::GetImpl()
|
||||
::NETGENPlugin_SimpleHypothesis_2D* NETGENPlugin_SimpleHypothesis_2D_i::GetImpl() const
|
||||
{
|
||||
MESSAGE("NETGENPlugin_SimpleHypothesis_2D_i::GetImpl");
|
||||
return (::NETGENPlugin_SimpleHypothesis_2D*)myBaseImpl;
|
||||
@ -183,9 +208,9 @@ CORBA::Double NETGENPlugin_SimpleHypothesis_2D_i::GetMaxElementArea()
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Verify whether hypothesis supports given entity type
|
||||
* \param type - dimension (see SMESH::Dimension enumeration)
|
||||
* \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
|
||||
*
|
||||
* \param type - dimension (see SMESH::Dimension enumeration)
|
||||
* \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
|
||||
*
|
||||
* Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
|
||||
*/
|
||||
//================================================================================
|
||||
@ -193,3 +218,41 @@ CORBA::Boolean NETGENPlugin_SimpleHypothesis_2D_i::IsDimSupported( SMESH::Dimens
|
||||
{
|
||||
return type == SMESH::DIM_2D;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief method intended to remove explicit treatment of Netgen hypotheses from SMESH_NoteBook
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
int NETGENPlugin_SimpleHypothesis_2D_i::getParamIndex(const TCollection_AsciiString& method,
|
||||
int nbVars) const
|
||||
{
|
||||
if ( method == "SetLocalLength" ) return 0;
|
||||
if ( method == "SetNumberOfSegments" ) return 0;
|
||||
if ( method == "SetMaxElementArea" ) return 1;
|
||||
if ( method == "LengthFromEdges" ) return 10; // just to go to the next state
|
||||
if ( method == "SetMaxElementVolume" ) return 2;
|
||||
if ( method == "LengthFromFaces" ) return 10; // just to go to the next state
|
||||
|
||||
return SMESH_Hypothesis_i::getParamIndex( method, nbVars ); // return default value
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Method used to convert variable parameters stored in an old study
|
||||
* into myMethod2VarParams. It should return a method name for an index of
|
||||
* variable parameters. Index is countered from zero
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
std::string NETGENPlugin_SimpleHypothesis_2D_i::getMethodOfParameter(const int paramIndex,
|
||||
int nbVars) const
|
||||
{
|
||||
switch ( paramIndex ) {
|
||||
case 0: return GetImpl()->GetNumberOfSegments() ? "SetNumberOfSegments" : "SetLocalLength";
|
||||
case 1: return "SetMaxElementArea";
|
||||
case 2: return "SetMaxElementVolume";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|