From e8e567901e8f7dab7ca17ebc11372a604f204ef6 Mon Sep 17 00:00:00 2001 From: nge Date: Wed, 18 Feb 2009 13:32:33 +0000 Subject: [PATCH] First version of SizeMap for BLSurf : Size maps can be defined on vertices, edges or faces. Implemented : - SizeMaps arguments passed to BLSurf - Persistence (hdf+dump) - can use python fonction (f(u,v) for a face, f(t) for an edge, f() for a vertex) - verification of this expression in gui (python syntax) and engine (python evaluation). - make dev_docs Limitation : - Objects have to be published to have size map defined on them. - does not compile with gcc 3.3 (Debian Sarge) - u,v / t used (Cascade ones) not very clear for user ...Still in development (SID)... --- Makefile.am | 13 +- clean_configure | 3 +- configure.ac | 7 + doc/Makefile.am | 34 + doc/salome/Makefile.am | 40 ++ doc/salome/gui/Makefile.am | 44 ++ doc/salome/gui/doxyfile.in | 65 ++ doc/salome/gui/static/footer.html | 10 + doc/salome/gui/static/header.html | 12 + doc/salome/tui/Makefile.am | 44 ++ doc/salome/tui/doxyfile.in | 263 ++++++++ doc/salome/tui/images/Application-About.png | Bin 0 -> 19226 bytes doc/salome/tui/images/application.gif | Bin 0 -> 2602 bytes doc/salome/tui/images/html_comments.gif | Bin 0 -> 156 bytes doc/salome/tui/images/logocorp.gif | Bin 0 -> 1792 bytes doc/salome/tui/static/doxygen.css | 152 +++++ doc/salome/tui/static/footer.html | 5 + doc/salome/tui/static/myheader.html | 13 + idl/BLSURFPlugin_Algorithm.idl | 14 +- src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx | 432 ++++++++++++- src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx | 8 +- src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx | 114 +++- src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx | 10 + .../BLSURFPlugin_Hypothesis_i.cxx | 141 ++++ .../BLSURFPlugin_Hypothesis_i.hxx | 17 + src/BLSURFPlugin/Makefile.am | 8 +- src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx | 602 +++++++++++++++++- src/GUI/BLSURFPluginGUI_HypothesisCreator.h | 41 +- src/GUI/BLSURFPlugin_msg_en.ts | 45 ++ src/GUI/Makefile.am | 7 +- src/Makefile.am | 4 +- src/PluginUtils/GeomSelectionTools.cxx | 218 +++++++ src/PluginUtils/GeomSelectionTools.h | 56 ++ src/PluginUtils/Makefile.am | 66 ++ src/PluginUtils/PluginUtils.h | 28 + src/PluginUtils/SizeMapPython.cxx | 0 src/PluginUtils/SizeMapPython.h | 1 + 37 files changed, 2481 insertions(+), 36 deletions(-) create mode 100644 doc/Makefile.am create mode 100644 doc/salome/Makefile.am create mode 100644 doc/salome/gui/Makefile.am create mode 100755 doc/salome/gui/doxyfile.in create mode 100755 doc/salome/gui/static/footer.html create mode 100755 doc/salome/gui/static/header.html create mode 100644 doc/salome/tui/Makefile.am create mode 100755 doc/salome/tui/doxyfile.in create mode 100755 doc/salome/tui/images/Application-About.png create mode 100755 doc/salome/tui/images/application.gif create mode 100755 doc/salome/tui/images/html_comments.gif create mode 100755 doc/salome/tui/images/logocorp.gif create mode 100755 doc/salome/tui/static/doxygen.css create mode 100755 doc/salome/tui/static/footer.html create mode 100755 doc/salome/tui/static/myheader.html create mode 100644 src/PluginUtils/GeomSelectionTools.cxx create mode 100644 src/PluginUtils/GeomSelectionTools.h create mode 100644 src/PluginUtils/Makefile.am create mode 100644 src/PluginUtils/PluginUtils.h create mode 100644 src/PluginUtils/SizeMapPython.cxx create mode 100644 src/PluginUtils/SizeMapPython.h diff --git a/Makefile.am b/Makefile.am index d5c2257..d3ca9b6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -38,9 +38,9 @@ else !BLSURFPLUGIN_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 @@ -52,3 +52,12 @@ EXTRA_DIST += \ dist-hook: rm -rf `find $(distdir) -name CVS` + +usr_docs: + (cd doc && $(MAKE) $(AM_MAKEFLAGS) usr_docs) + +docs: usr_docs + +dev_docs: + (cd doc && $(MAKE) $(AM_MAKEFLAGS) dev_docs) + diff --git a/clean_configure b/clean_configure index 8f00366..0d23d94 100755 --- a/clean_configure +++ b/clean_configure @@ -32,6 +32,7 @@ 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 adm_local -name Makefile.in | xargs rm -f find src -name Makefile.in | xargs rm -f rm -f Makefile.in +rm -Rf salome_adm diff --git a/configure.ac b/configure.ac index 57c3fd7..612968f 100644 --- a/configure.ac +++ b/configure.ac @@ -400,11 +400,18 @@ AC_OUTPUT([ \ ./adm_local/Makefile \ ./adm_local/unix/Makefile \ ./adm_local/unix/config_files/Makefile \ + ./doc/Makefile \ + ./doc/salome/Makefile \ + ./doc/salome/gui/Makefile \ + ./doc/salome/gui/doxyfile \ + ./doc/salome/tui/Makefile \ + ./doc/salome/tui/doxyfile \ ./bin/VERSION \ ./bin/Makefile \ ./idl/Makefile \ ./resources/Makefile \ ./src/Makefile \ + ./src/PluginUtils/Makefile \ ./src/BLSURFPlugin/Makefile \ ./src/GUI/Makefile \ ./BLSURFPLUGIN_version.h \ diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..bf2a8e0 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,34 @@ +# 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 : Patrick GOLDBRONN (CEA) +# Date : 30/11/2001 +# +SUBDIRS = salome + +usr_docs: + (cd salome && $(MAKE) $(AM_MAKEFLAGS) usr_docs) + +docs: usr_docs + +dev_docs: + (cd salome && $(MAKE) $(AM_MAKEFLAGS) dev_docs) diff --git a/doc/salome/Makefile.am b/doc/salome/Makefile.am new file mode 100644 index 0000000..b17b95b --- /dev/null +++ b/doc/salome/Makefile.am @@ -0,0 +1,40 @@ +# 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 : Patrick GOLDBRONN (CEA) +# Date : 30/11/2001 +# +SUBDIRS = tui gui +SUBDIRSTUI = tui +SUBDIRSGUI = gui + +usr_docs: + @@SETX@; for d in $(SUBDIRSGUI); do \ + (cd $$d && $(MAKE) $@) || exit 1; \ + done; + +docs: usr_docs + +dev_docs: + @@SETX@; for d in $(SUBDIRSTUI); do \ + (cd $$d && $(MAKE) $@) || exit 1; \ + done; diff --git a/doc/salome/gui/Makefile.am b/doc/salome/gui/Makefile.am new file mode 100644 index 0000000..61de9ca --- /dev/null +++ b/doc/salome/gui/Makefile.am @@ -0,0 +1,44 @@ +# 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 +# +# File : Makefile.in +# Author : Vasily Rusyaev (Open Cascade NN) +# Module : doc +# +include $(top_srcdir)/adm_local/unix/make_common_starter.am + +EXTRA_DIST += images input static + +usr_docs: doxyfile + echo "Running doxygen in directory: "`pwd`; \ + $(DOXYGEN) $< + +docs: usr_docs + +clean-local: + -rm -fr GUI doxygen.bak + +install-data-local: usr_docs + $(INSTALL) -d $(DESTDIR)$(docdir)/gui + cp -rp GUI $(DESTDIR)$(docdir)/gui + +uninstall-local: + rm -rf $(DESTDIR)$(docdir)/gui/GUI diff --git a/doc/salome/gui/doxyfile.in b/doc/salome/gui/doxyfile.in new file mode 100755 index 0000000..dd9ea65 --- /dev/null +++ b/doc/salome/gui/doxyfile.in @@ -0,0 +1,65 @@ +# 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 +# +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = "GUI Module Reference Manual v.@VERSION@" +OUTPUT_DIRECTORY = GUI +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 +IMAGE_PATH = @srcdir@/images + +#--------------------------------------------------------------------------- +#HTML related options +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = . +HTML_HEADER = @srcdir@/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 + +#--------------------------------------------------------------------------- +#LaTeX related option +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO + +#--------------------------------------------------------------------------- +#RTF related options +#--------------------------------------------------------------------------- +GENERATE_RTF = NO \ No newline at end of file diff --git a/doc/salome/gui/static/footer.html b/doc/salome/gui/static/footer.html new file mode 100755 index 0000000..56d52a6 --- /dev/null +++ b/doc/salome/gui/static/footer.html @@ -0,0 +1,10 @@ + + + + + +
+
Copyright © 2003-2007 CEA, EDF
+
+ + diff --git a/doc/salome/gui/static/header.html b/doc/salome/gui/static/header.html new file mode 100755 index 0000000..a70a95e --- /dev/null +++ b/doc/salome/gui/static/header.html @@ -0,0 +1,12 @@ + + + + + $title + + +
+
+SALOME documentation central +
+
diff --git a/doc/salome/tui/Makefile.am b/doc/salome/tui/Makefile.am new file mode 100644 index 0000000..4b05cbf --- /dev/null +++ b/doc/salome/tui/Makefile.am @@ -0,0 +1,44 @@ +# 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 +# +# File : Makefile.in +# Author : Vasily Rusyaev (Open Cascade NN) +# Module : doc +# +include $(top_srcdir)/adm_local/unix/make_common_starter.am + +EXTRA_DIST += images static + +dev_docs: doxyfile + echo "Running doxygen in directory: "`pwd`; \ + $(DOXYGEN) $<; + +clean-local: + -rm -fr BLSURFPLUGIN doxygen.bak + +install-data-local: + if test -d BLSURFPLUGIN; then \ + $(INSTALL) -d $(DESTDIR)$(docdir)/tui ; \ + cp -rp BLSURFPLUGIN $(DESTDIR)$(docdir)/tui ; \ + fi; + +uninstall-local: + rm -rf $(DESTDIR)$(docdir)/tui/BLSURFPLUGIN diff --git a/doc/salome/tui/doxyfile.in b/doc/salome/tui/doxyfile.in new file mode 100755 index 0000000..3baf75b --- /dev/null +++ b/doc/salome/tui/doxyfile.in @@ -0,0 +1,263 @@ +# 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 +# +# Doxyfile 1.4.6 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = "BLSURFPLUGIN Module Programming Guide v.@VERSION@" +PROJECT_NUMBER = +OUTPUT_DIRECTORY = BLSURFPLUGIN +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = NO +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = YES +INLINE_INHERITED_MEMB = YES +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = @top_srcdir@ @top_builddir@ +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = NO +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 5 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = YES +BUILTIN_STL_SUPPORT = @DOXYGEN_SUPPORT_STL@ +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = YES +HIDE_UNDOC_CLASSES = YES +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = YES +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +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 +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 25 +SHOW_USED_FILES = NO +SHOW_DIRECTORIES = NO +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# 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 +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = @top_srcdir@/src \ + @top_srcdir@/bin \ + @top_srcdir@/idl \ + @top_builddir@/bin +FILE_PATTERNS = *.idl *.hxx *.cxx *.h *.c *.hh *.cc @DOXYGEN_PYTHON_EXTENSION@ +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = YES +IMAGE_PATH = @srcdir@/images +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = YES + +#--------------------------------------------------------------------------- +# 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 the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 3 +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = . +HTML_FILE_EXTENSION = .html +HTML_HEADER = @srcdir@/static/myheader.html +HTML_FOOTER = @srcdir@/static/footer.html +HTML_STYLESHEET = @srcdir@/static/doxygen.css +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = YES +TOC_EXPAND = YES +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = NO + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +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 = NO +CALL_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = jpg +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 + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/doc/salome/tui/images/Application-About.png b/doc/salome/tui/images/Application-About.png new file mode 100755 index 0000000000000000000000000000000000000000..7b58330d50856e28562e8f9ed80dae72d6e6dda3 GIT binary patch literal 19226 zcmd3NW1D8nvTb*Dq06>y+g-M8+qP}nwr$(CZMk`Se*^t}dY$LT{`eujCnm_J=(>KDWfO|El5}c= zL){8uRT>QM7yv~P`-j@l78b=YcnNGu0GDeR5@#>SRJ50KEZ~yOPf%R<03Uaf4N{F9 zwlf`?=nQ%=63T*TfDy+F&gOxS4!c$klc*R3r3M7WF#xRn542V;Xb;EpcKc&bd-G1{Bck4UzwWpx-U|N7l#O<50w~*lYc`;1bSfyq{Gbf@YyniNxQfxEk|B2_ z-q$K-7OYQzIOyF;%6TVQt=4q8{Ya^rl8eu9_JE zxeQP*pLD=(=wT)*y1!bv#+veou|ADWb33!*rkOirf;mT~uD>4PDu)j61VYVNs=~Y% zzNrm-*gR@CJT)?JJJjjiA2qBW%b<>4a!aaw6?k85f2Lx7@91>vdDD3Hu+<$Sdpioq zFr>CRLJUJ}+|Wu@29eVV**lr+Xtv&!vL_=RCN`<;;%K$ox}P=GZC2ubdsMv*d4D`< zdSP!DrufK4w|uI)2LbwYE-+ibcyBXmW-@Yax)j13Bnu$x&-dRuIAw-E7{vO&-v=nh zrbTHGbC2Nu=Z-2gW7#{59LbztS(}^&30uc>zn3ik)NtwFEqYuxSLhV zHQ-!nEQ|=`SkaSF#p`HBeB?ygOxXqhdT{*+QekH`rbN#cJ?iQ%B&H$dqGr}qq zh~=jGXJy@Mf@;GWEgP4v#iL6>+9d5Uq$hsVT*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doc/salome/tui/images/logocorp.gif new file mode 100755 index 0000000000000000000000000000000000000000..7697e0837777ed6aa775741b68962a9533f62caa GIT binary patch literal 1792 zcmV+b2mkm-Nk%w1VT%AS0M!5hoSdBI=H|`K&1h+9yr%&i92}?s9Q4@(`}_LWPNmY) z(&*@(Mny)&y^n7I4{B!vuhPw}5?2IXir|z73~g1|qP6eq%$#@+9iPydLQ8d@5mkyJ+Hc*mQgIAO1%kNT04UJv^Xbjgu+dWmns}MAyYSKDkey3~zS-CTdiC?|VXDsV z?d^iw_xI-Rw^eTF^5`PJ@#MM6alNa@g__&l+iiR_0!%suKW6s!_KJ#%u&}WA_xAt* z0RH~|A^8LV00000EC2ui0E+-G000L6z*cWaEEFMdcUl8%k6r< z;IMd1E}O}{fWnGByWjA*T%KNE=i^n!GwFL42zY{nZ*^>hTQ53UFBcbmep(_Th?SOE zhIfM}6$ufa2{khhq>dLJA}%tkt1fMquyC2LZ!MHr03W&$x*ru47a5Ko78?>EAQ;LR zlsynM5HYdSVzXyGA}K7$$tgND9|gU-Gg%fED_O=l6359lG$r!$(A4%@)?Wxcfm$Z) z+}cSnp@6}-4=_%6F(H9MJ7g>%P{2W9o;(`&GUn6L2mz)+Fwufcx-*5n z@S9e57v2cMNN|`;0+1OSJ2C?x832H11!4j05dFhO7aal;cOEccbmAW^GY8IM0|4vM zhksbPEnti2(ORrz9?he0i{HaDW6G*2O9saoP)wdqokZ?102s91F@Ql~9t>;`7(2i- zfFG>61YiJqy^r_r8JI>7e@7Mp4B*GdRX~4%9gFk;Ujg$Cpq~!~Fd%>q{T=ATa(2-2 z0yq)CaDxWaO{c+z(ue{79uHb{#sC7~{jdUS1AwT-4h0Ob#d@IS7ax2B=+HugJ}~e@ z4?DbzJjJh0`Z8sx@TKUyeIKw9A87XWzTiFV$eUnaR;06o6Prl|-ND&qjL4msWr z4JIiZ4=XT8=m-F=1ptGaX!3yE z9WH>MhsQqu;KHmES)|GT*?<|$ydU1;59BgPK3Vaqg06dts+nHOeQ0fXKj!BaGW5yrqS)CJ^53@nK7h&4>24SnH6jU+IN4Il=mK7d6eYO#a{$YB?sI3=~j1U z#t5qaagB`mA|f(i!x7H$j}mkM4ey9YSnv=IaO~qB7a0N?MxcO&q>CO2kw`@{@`w>A zMyi3R{9CN;T9OC0hId_1Ed%V>ZMK(dsTIHem}kjgq@F#;8UjC{3wKSIW|sy7Z+T iFpX*a^t7Gi*z~42&8bdz%F~|u^rt`#YI0B%1OPi{2poO@ literal 0 HcmV?d00001 diff --git a/doc/salome/tui/static/doxygen.css b/doc/salome/tui/static/doxygen.css new file mode 100755 index 0000000..4893b5e --- /dev/null +++ b/doc/salome/tui/static/doxygen.css @@ -0,0 +1,152 @@ +H1 { + text-align: center; +} + +CAPTION { + font-weight: bold +} + +/* Link in the top navbar */ +A.qindex {} + +A.qindexRef {} + +/* Link to any cross-referenced Doxygen element */ +A.el { + text-decoration: none; + font-weight: bold +} + +A.elRef { + font-weight: bold +} + +/* Link to any cross-referenced Doxygen element inside a code section + (ex: header) +*/ +A.code { + text-decoration: none; + font-weight: normal; + color: #4444ee +} + +A.codeRef { + font-weight: normal; + color: #4444ee +} + +A:hover { + text-decoration: none; + background-color: lightblue +} + +DL.el { + margin-left: -1cm +} + +/* A code fragment (ex: header) */ +DIV.fragment { + width: 100%; + border: none; + background-color: #CCCCCC +} + +/* In the alpha list (coumpound index), style of an alphabetical index letter */ +DIV.ah { + background-color: #CCCCCC; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px +} + +/* Method name (+ type) */ +TD.md { + background-color: lightblue; + font-weight: bold; +} + +/* Method parameter (some of them) */ +TD.mdname1 { + background-color: lightblue; + font-weight: bold; color: #602020; +} + +/* Method parameter (some of them) */ +TD.mdname { + background-color: lightblue; + font-weight: bold; + color: #602020; + width: 600px; +} + +/* Separator between methods group (usually empty, seems not supported by IE) */ +DIV.groupHeader { + margin-left: 16px; + margin-top: 12px; + margin-bottom: 6px; + font-weight: bold +} + +DIV.groupText { + margin-left: 16px; + font-style: italic; + font-size: smaller +} + +BODY { background: #FFFFFF +} + +/* BODY { + background: url(sources/bg_salome.gif) +} */ + +div.tabs { + text-align: justify; + font-weight: bold; + color: #FFFFFF; +} + +DIV.div-footer { + margin-left: 1em; + margin-right: 1em; + margin-bottom: 0.2em; + text-align: right; + font-size: 9pt; +} + +/* In File List, Coumpound List, etc, 1st column of the index */ +TD.indexkey { + background-color: #CCCCCC; + font-weight: bold; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px +} + +/* In File List, Coumpound List, etc, 2nd column of the index */ +TD.indexvalue { + background-color: #CCCCCC; + font-style: italic; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px +} + +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 } diff --git a/doc/salome/tui/static/footer.html b/doc/salome/tui/static/footer.html new file mode 100755 index 0000000..cb55f39 --- /dev/null +++ b/doc/salome/tui/static/footer.html @@ -0,0 +1,5 @@ + + + + diff --git a/doc/salome/tui/static/myheader.html b/doc/salome/tui/static/myheader.html new file mode 100755 index 0000000..d2efb75 --- /dev/null +++ b/doc/salome/tui/static/myheader.html @@ -0,0 +1,13 @@ + + + + + + Main Page + + + + +  + + diff --git a/idl/BLSURFPlugin_Algorithm.idl b/idl/BLSURFPlugin_Algorithm.idl index 026602a..da90c24 100644 --- a/idl/BLSURFPlugin_Algorithm.idl +++ b/idl/BLSURFPlugin_Algorithm.idl @@ -25,6 +25,7 @@ #define _SMESH_BLSURFALGORITHM_IDL_ #include "SMESH_Hypothesis.idl" +#include "GEOM_Gen.idl" #include "SALOME_Exception.idl" /*! @@ -160,8 +161,19 @@ module BLSURFPlugin * Note: the method is mostly for interaction with GUI. */ void SetOptionValues(in string_array options); - }; + /*! + * SizeMap + */ + void SetSizeMapEntry(in string entry,in string sizeMap ); + string GetSizeMapEntry(in string entry); + void UnsetEntry(in string entry); + string_array GetSizeMapEntries(); + void SetSizeMapEntries(in string_array sizeMaps); + void ClearSizeMaps(); + void SetSizeMap(in GEOM::GEOM_Object GeomObj, in string sizeMap ); + void UnsetSizeMap(in GEOM::GEOM_Object GeomObj); + }; }; #endif diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index 39e7d49..7678717 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -25,9 +25,13 @@ #include "BLSURFPlugin_BLSURF.hxx" #include "BLSURFPlugin_Hypothesis.hxx" +#include + + #include #include #include +#include #include #include @@ -35,8 +39,11 @@ #include +#include #include #include +#include +#include #include #include @@ -68,6 +75,166 @@ extern "C"{ #include #endif +#include + + +/* =========== PYTHON ============== + * + * + * On est trop des brutes ! + * + * + * + * ==================================*/ + +typedef struct { + PyObject_HEAD + int softspace; + std::string *out; + } PyStdOut; + +static void +PyStdOut_dealloc(PyStdOut *self) +{ + PyObject_Del(self); +} + +static PyObject * +PyStdOut_write(PyStdOut *self, PyObject *args) +{ + char *c; + int l; + if (!PyArg_ParseTuple(args, "t#:write",&c, &l)) + return NULL; + + //std::cerr << c ; + *(self->out)=*(self->out)+c; + + Py_INCREF(Py_None); + return Py_None; +} + +static PyMethodDef PyStdOut_methods[] = { + {"write", (PyCFunction)PyStdOut_write, METH_VARARGS, + PyDoc_STR("write(string) -> None")}, + {NULL, NULL} /* sentinel */ +}; + +static PyMemberDef PyStdOut_memberlist[] = { + {"softspace", T_INT, offsetof(PyStdOut, softspace), 0, + "flag indicating that a space needs to be printed; used by print"}, + {NULL} /* Sentinel */ +}; + +static PyTypeObject PyStdOut_Type = { + /* The ob_type field must be initialized in the module init function + * to be portable to Windows without using C++. */ + PyObject_HEAD_INIT(NULL) + 0, /*ob_size*/ + "PyOut", /*tp_name*/ + sizeof(PyStdOut), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + /* methods */ + (destructor)PyStdOut_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + PyObject_GenericGetAttr, /*tp_getattro*/ + /* softspace is writable: we must supply tp_setattro */ + PyObject_GenericSetAttr, /* tp_setattro */ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + PyStdOut_methods, /*tp_methods*/ + PyStdOut_memberlist, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + 0, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ +}; + +PyObject * newPyStdOut( std::string& out ) +{ + PyStdOut *self; + self = PyObject_New(PyStdOut, &PyStdOut_Type); + if (self == NULL) + return NULL; + self->softspace = 0; + self->out=&out; + return (PyObject*)self; +} + + +////////////////////////END PYTHON/////////////////////////// + + +//////////////////TO WELL DEFINE UNORDERED TOPODS_MAP//////// + +namespace std { +namespace tr1 { +template<> + struct hash + : public std::unary_function + { + std::size_t operator() (const TopoDS_Face & Face) const + { return Face.HashCode(471662);} + // { return Face.HashCode(std::numeric_limits::max());} +}; + +template<> + struct hash + : public std::unary_function + { + std::size_t operator() (const TopoDS_Edge & Edge) const + { return Edge.HashCode(471662);} + // { return Face.HashCode(std::numeric_limits::max());} +}; + +template<> + struct hash + : public std::unary_function + { + std::size_t operator() (const TopoDS_Vertex & Vertex) const + { return Vertex.HashCode(471662);} + // { return Face.HashCode(std::numeric_limits::max());} +}; +} +} + +//////////////////MY MAPS//////////////////////////////////////// +std::tr1::unordered_map Face2SizeMap; +std::tr1::unordered_map Edge2SizeMap; +std::tr1::unordered_map Vertex2SizeMap; +std::map FaceId2PythonSmp; +std::map EdgeId2PythonSmp; +std::map VertexId2PythonSmp; + + +bool HasSizeMapOnFace=false; +bool HasSizeMapOnEdge=false; +bool HasSizeMapOnVertex=false; + //============================================================================= /*! * @@ -86,6 +253,22 @@ BLSURFPlugin_BLSURF::BLSURFPlugin_BLSURF(int hypId, int studyId, _requireDescretBoundary = false; _onlyUnaryInput = false; _hypothesis = NULL; + + + /* Initialize the Python interpreter */ + assert(Py_IsInitialized()); + PyGILState_STATE gstate; + gstate = PyGILState_Ensure(); + + main_mod = NULL; + main_mod = PyImport_AddModule("__main__"); + + main_dict = NULL; + main_dict = PyModule_GetDict(main_mod); + + PyRun_SimpleString("from math import *"); + PyGILState_Release(gstate); + } //============================================================================= @@ -99,6 +282,7 @@ BLSURFPlugin_BLSURF::~BLSURFPlugin_BLSURF() MESSAGE("BLSURFPlugin_BLSURF::~BLSURFPlugin_BLSURF"); } + //============================================================================= /*! * @@ -165,6 +349,13 @@ inline std::string to_string(int i) return o.str(); } +double _smp_phy_size; +status_t size_on_surface(integer face_id, real *uv, real *size, void *user_data); +status_t size_on_edge(integer edge_id, real t, real *size, void *user_data); +status_t size_on_vertex(integer vertex_id, real *size, void *user_data); + +double my_u_min=1e6,my_v_min=1e6,my_u_max=-1e6,my_v_max=-1e6; + void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, blsurf_session_t *bls) { int _topology = BLSURFPlugin_Hypothesis::GetDefaultTopology(); @@ -177,7 +368,7 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, blsu bool _quadAllowed = BLSURFPlugin_Hypothesis::GetDefaultQuadAllowed(); bool _decimesh = BLSURFPlugin_Hypothesis::GetDefaultDecimesh(); int _verb = BLSURFPlugin_Hypothesis::GetDefaultVerbosity(); - + if (hyp) { MESSAGE("BLSURFPlugin_BLSURF::SetParameters"); _topology = (int) hyp->GetTopology(); @@ -213,13 +404,64 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, blsu } else { MESSAGE("BLSURFPlugin_BLSURF::SetParameters using defaults"); } - + _smp_phy_size = _phySize; blsurf_set_param(bls, "topo_points", _topology > 0 ? "1" : "0"); blsurf_set_param(bls, "topo_curves", _topology > 0 ? "1" : "0"); blsurf_set_param(bls, "topo_project", _topology > 0 ? "1" : "0"); blsurf_set_param(bls, "clean_boundary", _topology > 1 ? "1" : "0"); blsurf_set_param(bls, "close_boundary", _topology > 1 ? "1" : "0"); blsurf_set_param(bls, "hphy_flag", to_string(_physicalMesh).c_str()); +// blsurf_set_param(bls, "hphy_flag", "2"); + if ((to_string(_physicalMesh))=="2"){ + MESSAGE("Setting a Size Map"); + const BLSURFPlugin_Hypothesis::TSizeMap & sizeMaps = hyp->GetSizeMapEntries(); + BLSURFPlugin_Hypothesis::TSizeMap::const_iterator smIt; + GeomSelectionTools* GeomST; + GeomST=new GeomSelectionTools::GeomSelectionTools( SMESH::GetActiveStudyDocument()); + + Face2SizeMap.clear(); + Edge2SizeMap.clear(); + Vertex2SizeMap.clear(); + + for ( smIt = sizeMaps.begin(); smIt != sizeMaps.end(); ++smIt ) { + if ( !smIt->second.empty() ) { +#ifdef _DEBUG_ + cout << "blsurf_set_sizeMap(): " << smIt->first << " = " << smIt->second << endl; +#endif + TopoDS_Shape GeomShape=GeomST->entryToShape(smIt->first); + TopAbs_ShapeEnum GeomType= GeomShape.ShapeType(); + if (GeomType==TopAbs_FACE){ + HasSizeMapOnFace=true; + Face2SizeMap[TopoDS::Face(GeomShape)]= smIt->second; + } + if (GeomType==TopAbs_EDGE){ + HasSizeMapOnEdge=true; + HasSizeMapOnFace=true; + Edge2SizeMap[TopoDS::Edge(GeomShape)]= smIt->second; + } + if (GeomType==TopAbs_VERTEX){ + HasSizeMapOnVertex=true; + HasSizeMapOnEdge=true; + HasSizeMapOnFace=true; + Vertex2SizeMap[TopoDS::Vertex(GeomShape)]= smIt->second; + } + } + } +// if (HasSizeMapOnFace){ + // In all size map cases (hphy_flag = 2), at least map on face must be defined + std::cout << "Setting Size Map on FACES " << std::endl; + blsurf_data_set_sizemap_iso_cad_face(bls, size_on_surface, &_smp_phy_size); +// } + + if (HasSizeMapOnEdge){ + std::cout << "Setting Size Map on EDGES " << std::endl; + blsurf_data_set_sizemap_iso_cad_edge(bls, size_on_edge, &_smp_phy_size); + } + if (HasSizeMapOnVertex){ + std::cout << "Setting Size Map on VERTICES " << std::endl; + blsurf_data_set_sizemap_iso_cad_point(bls, size_on_vertex, &_smp_phy_size); + } + } blsurf_set_param(bls, "hphydef", to_string(_phySize).c_str()); blsurf_set_param(bls, "hgeo_flag", to_string(_geometricMesh).c_str()); blsurf_set_param(bls, "angle_meshs", to_string(_angleMeshS).c_str()); @@ -257,18 +499,37 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape) cad_t *c = cad_new(ctx); + blsurf_session_t *bls = blsurf_session_new(ctx); + + + SetParameters(_hypothesis, bls); + TopTools_IndexedMapOfShape fmap; TopTools_IndexedMapOfShape emap; TopTools_IndexedMapOfShape pmap; vector curves; vector surfaces; + + fmap.Clear(); + FaceId2PythonSmp.clear(); emap.Clear(); + EdgeId2PythonSmp.clear(); pmap.Clear(); + VertexId2PythonSmp.clear(); surfaces.resize(0); curves.resize(0); + assert(Py_IsInitialized()); + PyGILState_STATE gstate; + gstate = PyGILState_Ensure(); +/* + Standard_Real u_min; + Standard_Real v_min; + Standard_Real u_max; + Standard_Real v_max; +*/ int iface = 0; for (TopExp_Explorer face_iter(aShape,TopAbs_FACE);face_iter.More();face_iter.Next()) { TopoDS_Face f=TopoDS::Face(face_iter.Current()); @@ -278,6 +539,19 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape) fmap.Add(f); iface++; surfaces.push_back(BRep_Tool::Surface(f)); + // Get bound values of uv surface + //BRep_Tool::Surface(f)->Bounds(u_min,u_max,v_min,v_max); + //std::cout << "BRep_Tool::Surface(f)->Bounds(u_min,u_max,v_min,v_max): " << u_min << ", " << u_max << ", " << v_min << ", " << v_max << std::endl; + if ((HasSizeMapOnFace) && Face2SizeMap.find(f)!=Face2SizeMap.end()){ + // Expr To Python function, verification is performed at validation in GUI + PyObject * obj = NULL; + obj= PyRun_String(Face2SizeMap[f].c_str(), Py_file_input, main_dict, NULL); + Py_DECREF(obj); + PyObject * func = NULL; + func = PyObject_GetAttrString(main_mod, "f"); + FaceId2PythonSmp[iface]=func; + Face2SizeMap.erase(f); + } cad_face_t *fce = cad_face_new(c, iface, surf_fun, surfaces.back()); cad_face_set_tag(fce, iface); if(f.Orientation() != TopAbs_FORWARD){ @@ -294,6 +568,16 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape) double tmin,tmax; curves.push_back(BRep_Tool::CurveOnSurface(e, f, tmin, tmax)); + if ((HasSizeMapOnEdge) && Edge2SizeMap.find(e)!=Edge2SizeMap.end()){ + // Expr To Python function, verification is performed at validation in GUI + PyObject * obj = NULL; + obj= PyRun_String(Edge2SizeMap[e].c_str(), Py_file_input, main_dict, NULL); + Py_DECREF(obj); + PyObject * func = NULL; + func = PyObject_GetAttrString(main_mod, "f"); + EdgeId2PythonSmp[ic]=func; + Edge2SizeMap.erase(e); + } cad_edge_t *edg = cad_edge_new(fce, ic, tmin, tmax, curv_fun, curves.back()); cad_edge_set_tag(edg, ic); cad_edge_set_property(edg, EDGE_PROPERTY_SOFT_REQUIRED); @@ -307,7 +591,6 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape) Standard_Real d1=0,d2=0; for (TopExp_Explorer ex_edge(e ,TopAbs_VERTEX); ex_edge.More(); ex_edge.Next()) { TopoDS_Vertex v = TopoDS::Vertex(ex_edge.Current()); - ++npts; if (npts == 1){ ip = &ip1; @@ -319,6 +602,16 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape) *ip = pmap.FindIndex(v); if(*ip <= 0) *ip = pmap.Add(v); + if ((HasSizeMapOnVertex) && Vertex2SizeMap.find(v)!=Vertex2SizeMap.end()){ + // Expr To Python function, verification is performed at validation in GUI + PyObject * obj = NULL; + obj= PyRun_String(Vertex2SizeMap[v].c_str(), Py_file_input, main_dict, NULL); + Py_DECREF(obj); + PyObject * func = NULL; + func = PyObject_GetAttrString(main_mod, "f"); + VertexId2PythonSmp[*ip]=func; + Vertex2SizeMap.erase(v); + } } if (npts != 2) { // should not happen @@ -333,13 +626,10 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape) } //for face + PyGILState_Release(gstate); - - blsurf_session_t *bls = blsurf_session_new(ctx); blsurf_data_set_cad(bls, c); - SetParameters(_hypothesis, bls); - cout << endl; cout << "Beginning of Surface Mesh generation" << endl; cout << endl; @@ -384,6 +674,11 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape) cout << "End of Surface Mesh generation" << endl; cout << endl; + cout << "****************** U MIN: " << my_u_min << endl; + cout << "****************** V MIN: " << my_v_min << endl; + cout << "****************** U MAX: " << my_u_max << endl; + cout << "****************** V MAX: " << my_v_max << endl; + mesh_t *msh; blsurf_data_get_mesh(bls, &msh); if(!msh){ @@ -604,6 +899,129 @@ status_t surf_fun(real *uv, real *xyz, real*du, real *dv, return 0; } + +status_t size_on_surface(integer face_id, real *uv, real *size, void *user_data) +{ + if (face_id == 1) { + if (my_u_min > uv[0]) { + my_u_min = uv[0]; +// cout << "****************** FACE ID / U MIN: " << face_id << " / " << my_u_min << endl; + } + if (my_v_min > uv[1]) { + my_v_min = uv[1]; +// cout << "****************** FACE ID / V MIN: " << face_id << " / " << my_v_min << endl; + } + if (my_u_max < uv[0]) { + my_u_max = uv[0]; +// cout << "****************** FACE ID / U MAX: " << face_id << " / " << my_u_max << endl; + } + if (my_v_max < uv[1]) { + my_v_max = uv[1]; +// cout << "****************** FACE ID / V MAX: " << face_id << " / " << my_v_max << endl; + } + } + + if (FaceId2PythonSmp.count(face_id) != 0){ + PyObject * pyresult = NULL; + PyObject* new_stderr = NULL; + assert(Py_IsInitialized()); + PyGILState_STATE gstate; + gstate = PyGILState_Ensure(); + pyresult = PyObject_CallFunction(FaceId2PythonSmp[face_id],"(f,f)",uv[0],uv[1]); + double result; + if ( pyresult == NULL){ + fflush(stderr); + string err_description=""; + new_stderr = newPyStdOut(err_description); + PySys_SetObject("stderr", new_stderr); + PyErr_Print(); + PySys_SetObject("stderr", PySys_GetObject("__stderr__")); + Py_DECREF(new_stderr); + std::cout << "Can't evaluate f(" << uv[0] << "," << uv[1] << ")" << " error is " << err_description << std::endl; + result = *((double*)user_data); + } + else { + result = PyFloat_AsDouble(pyresult); + Py_DECREF(pyresult); + } + *size = result; + //std::cout << "f(" << uv[0] << "," << uv[1] << ")" << " = " << result << std::endl; + PyGILState_Release(gstate); + } + else { + *size = *((double*)user_data); + } + return STATUS_OK; +} + +status_t size_on_edge(integer edge_id, real t, real *size, void *user_data) +{ + if (EdgeId2PythonSmp.count(edge_id) != 0){ + PyObject * pyresult = NULL; + PyObject* new_stderr = NULL; + assert(Py_IsInitialized()); + PyGILState_STATE gstate; + gstate = PyGILState_Ensure(); + pyresult = PyObject_CallFunction(EdgeId2PythonSmp[edge_id],"(f)",t); + double result; + if ( pyresult == NULL){ + fflush(stderr); + string err_description=""; + new_stderr = newPyStdOut(err_description); + PySys_SetObject("stderr", new_stderr); + PyErr_Print(); + PySys_SetObject("stderr", PySys_GetObject("__stderr__")); + Py_DECREF(new_stderr); + std::cout << "Can't evaluate f(" << t << ")" << " error is " << err_description << std::endl; + result = *((double*)user_data); + } + else { + result = PyFloat_AsDouble(pyresult); + Py_DECREF(pyresult); + } + *size = result; + PyGILState_Release(gstate); + } + else { + *size = *((double*)user_data); + } + return STATUS_OK; +} + +status_t size_on_vertex(integer point_id, real *size, void *user_data) +{ + if (VertexId2PythonSmp.count(point_id) != 0){ + PyObject * pyresult = NULL; + PyObject* new_stderr = NULL; + assert(Py_IsInitialized()); + PyGILState_STATE gstate; + gstate = PyGILState_Ensure(); + pyresult = PyObject_CallFunction(VertexId2PythonSmp[point_id],""); + double result; + if ( pyresult == NULL){ + fflush(stderr); + string err_description=""; + new_stderr = newPyStdOut(err_description); + PySys_SetObject("stderr", new_stderr); + PyErr_Print(); + PySys_SetObject("stderr", PySys_GetObject("__stderr__")); + Py_DECREF(new_stderr); + std::cout << "Can't evaluate f()" << " error is " << err_description << std::endl; + result = *((double*)user_data); + } + else { + result = PyFloat_AsDouble(pyresult); + Py_DECREF(pyresult); + } + *size = result; + PyGILState_Release(gstate); + } + else { + *size = *((double*)user_data); + } + return STATUS_OK; +} + status_t message_callback(message_t *msg, void *user_data) { integer errnumber = 0; diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx index 8dd022f..67eb80f 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx @@ -25,6 +25,7 @@ #ifndef _BLSURFPlugin_BLSURF_HXX_ #define _BLSURFPlugin_BLSURF_HXX_ +#include #include "SMESH_2D_Algo.hxx" #include "SMESH_Mesh.hxx" #include "Utils_SALOME_Exception.hxx" @@ -52,9 +53,14 @@ class BLSURFPlugin_BLSURF: public SMESH_2D_Algo { istream & LoadFrom(istream & load); friend ostream & operator << (ostream & save, BLSURFPlugin_BLSURF & hyp); friend istream & operator >> (istream & load, BLSURFPlugin_BLSURF & hyp); - + protected: const BLSURFPlugin_Hypothesis* _hypothesis; + + private: + PyObject * main_mod; + PyObject * main_dict; + }; #endif diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx index ad35365..d22a941 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx @@ -24,6 +24,7 @@ // #include #include +#include //============================================================================= BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis (int hypId, int studyId, @@ -120,6 +121,8 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis (int hypId, int studyId, _charOptions.insert( charOptionNames[i] ); _option2value[ charOptionNames[i++] ].clear(); } + + _sizeMap.clear(); } //============================================================================= @@ -333,6 +336,41 @@ void BLSURFPlugin_Hypothesis::ClearOption(const std::string& optionName) op_val->second.clear(); } + +void BLSURFPlugin_Hypothesis::SetSizeMapEntry(const std::string& entry,const std::string& sizeMap) +{ + if (_sizeMap[entry].compare(sizeMap) != 0) { + _sizeMap[entry]=sizeMap; + NotifySubMeshesHypothesisModification(); + } +} + +std::string BLSURFPlugin_Hypothesis::GetSizeMapEntry(const std::string& entry) +{ + TSizeMap::iterator it = _sizeMap.find( entry ); + if ( it != _sizeMap.end() ) + return it->second; + else + return "No_Such_Entry"; +} + +void BLSURFPlugin_Hypothesis::ClearEntry(const std::string& entry) +{ + TSizeMap::iterator it = _sizeMap.find( entry ); + if ( it != _sizeMap.end() ) + _sizeMap.erase(it); + else + std::cout<<"No_Such_Entry"<second.empty() ) - save << " " << op_val->first - << " " << op_val->second << "%#"; // "%#" is a mark of value end + if (op_val != _option2value.end()) { + save << " " << "__OPTIONS_BEGIN__"; + for ( ; op_val != _option2value.end(); ++op_val ) { + if ( !op_val->second.empty() ) + save << " " << op_val->first + << " " << op_val->second << "%#"; // "%#" is a mark of value end + } + save << " " << "__OPTIONS_END__"; } + TSizeMap::iterator it_sm = _sizeMap.begin(); + if (it_sm != _sizeMap.end()) { + save << " " << "__SIZEMAP_BEGIN__"; + for ( ; it_sm != _sizeMap.end(); ++it_sm ) { + save << " " << it_sm->first + << " " << it_sm->second << "%#"; // "%#" is a mark of value end + } + save << " " << "__SIZEMAP_END__"; + } + + return save; } @@ -452,11 +505,25 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) else load.clear(std::ios::badbit | load.rdstate()); + std::string option_or_sm; + bool hasOptions = false; + bool hasSizeMap = false; + + isOK = (load >> option_or_sm); + if (isOK) + if (option_or_sm == "__OPTIONS_BEGIN__") + hasOptions = true; + else if (option_or_sm == "__SIZEMAP_BEGIN__") + hasSizeMap = true; + std::string optName, optValue; - while (isOK) { + while (isOK && hasOptions) { isOK = (load >> optName); - if (isOK) + if (isOK) { + if (optName == "__OPTIONS_END__") + break; isOK = (load >> optValue); + } if (isOK) { std::string & value = _option2value[ optName ]; value = optValue; @@ -478,6 +545,41 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) } } + if (hasOptions) { + isOK = (load >> option_or_sm); + if (isOK && option_or_sm == "__SIZEMAP_BEGIN__") + hasSizeMap = true; + } + + std::string smEntry, smValue; + while (isOK && hasSizeMap) { + isOK = (load >> smEntry); + if (isOK) { + if (smEntry == "__SIZEMAP_END__") + break; + isOK = (load >> smValue); + } + if (isOK) { + std::string & value2 = _sizeMap[ smEntry ]; + value2 = smValue; + int len2= value2.size(); + // continue reading until "%#" encountered + while ( value2[len2-1] != '#' || value2[len2-2] != '%' ) + { + isOK = (load >> smValue); + if (isOK) { + value2 += " "; + value2 += smValue; + len2 = value2.size(); + } + else { + break; + } + } + value2[ len2-2 ] = '\0'; //cut off "%#" + } + } + return load; } diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx index a8fb7d2..fe30639 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx @@ -95,6 +95,15 @@ public: void SetVerbosity(int theVal); int GetVerbosity() const { return _verb; } + + + typedef std::map TSizeMap; + void SetSizeMapEntry(const std::string& entry,const std::string& sizeMap ); + std::string GetSizeMapEntry(const std::string& entry); + void ClearEntry(const std::string& entry); + void ClearSizeMaps(); + + const TSizeMap& GetSizeMapEntries() const { return _sizeMap; } static Topology GetDefaultTopology(); static PhysicalMesh GetDefaultPhysicalMesh(); @@ -152,6 +161,7 @@ private: int _verb; TOptionValues _option2value; TOptionNames _doubleOptions, _charOptions; + TSizeMap _sizeMap; }; #endif diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx index 55ca0d8..846ad2f 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx @@ -24,6 +24,7 @@ #include "BLSURFPlugin_Hypothesis_i.hxx" #include "SMESH_Gen.hxx" #include "SMESH_PythonDump.hxx" +#include "GEOM_Object.hxx" #include "Utils_CorbaException.hxx" #include "utilities.h" @@ -507,6 +508,146 @@ void BLSURFPlugin_Hypothesis_i::SetOptionValues(const BLSURFPlugin::string_array } } +//============================================================================= + +void BLSURFPlugin_Hypothesis_i::SetSizeMapEntry(const char* entry,const char* sizeMap) + throw (SALOME::SALOME_Exception) +{ + ASSERT(myBaseImpl); + std::cout << "ENGINE : SETSIZEMAP START ENTRY : " << entry << std::endl; + bool valueChanged = false; + try { + valueChanged = ( this->GetImpl()->GetSizeMapEntry(entry) != sizeMap ); + if ( valueChanged ) + this->GetImpl()->SetSizeMapEntry(entry, sizeMap); + } + catch (const std::invalid_argument& ex) { + SALOME::ExceptionStruct ExDescription; + ExDescription.text = ex.what(); + ExDescription.type = SALOME::BAD_PARAM; + ExDescription.sourceFile = "BLSURFPlugin_Hypothesis::SetSizeMapEntry(entry,sizemap)"; + ExDescription.lineNumber = 0; + throw SALOME::SALOME_Exception(ExDescription); + } + catch (SALOME_Exception& ex) { + THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM ); + } + std::cout << "ENGINE : SETSIZEMAP END ENTRY : " << entry << std::endl; + if ( valueChanged ) + SMESH::TPythonDump() << _this() << ".SetSizeMap(" + << entry << ", '" << sizeMap << "' )"; +} + +//============================================================================= + +char* BLSURFPlugin_Hypothesis_i::GetSizeMapEntry(const char* entry) + throw (SALOME::SALOME_Exception) +{ + ASSERT(myBaseImpl); + try { + return CORBA::string_dup( this->GetImpl()->GetSizeMapEntry(entry).c_str()); + } + catch (const std::invalid_argument& ex) { + SALOME::ExceptionStruct ExDescription; + ExDescription.text = ex.what(); + ExDescription.type = SALOME::BAD_PARAM; + ExDescription.sourceFile = "BLSURFPlugin_Hypothesis::GetSizeMapEntry(name)"; + ExDescription.lineNumber = 0; + throw SALOME::SALOME_Exception(ExDescription); + } + catch (SALOME_Exception& ex) { + THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM ); + } + return 0; +} + +//============================================================================= + +void BLSURFPlugin_Hypothesis_i::UnsetEntry(const char* entry) +{ + ASSERT(myBaseImpl); + this->GetImpl()->ClearEntry(entry); + SMESH::TPythonDump() << _this() << ".UnsetSizeMap( " << entry << " )"; +} + +//============================================================================= + +BLSURFPlugin::string_array* BLSURFPlugin_Hypothesis_i::GetSizeMapEntries() +{ + ASSERT(myBaseImpl); + BLSURFPlugin::string_array_var result = new BLSURFPlugin::string_array(); + + const ::BLSURFPlugin_Hypothesis::TSizeMap & sizeMaps= this->GetImpl()->GetSizeMapEntries(); + result->length( sizeMaps.size() ); + + ::BLSURFPlugin_Hypothesis::TSizeMap::const_iterator smIt = sizeMaps.begin(); + for ( int i = 0 ; smIt != sizeMaps.end(); ++smIt, ++i ) { + string entry_sizemap = smIt->first; + if ( !smIt->second.empty() ) { + entry_sizemap += "|"; + entry_sizemap += smIt->second; + } + result[i] = CORBA::string_dup(entry_sizemap.c_str()); + } + return result._retn(); +} + +//============================================================================= + +void BLSURFPlugin_Hypothesis_i::SetSizeMapEntries(const BLSURFPlugin::string_array& sizeMaps) + throw (SALOME::SALOME_Exception) +{ + ASSERT(myBaseImpl); + for (int i = 0; i < sizeMaps.length(); ++i) + { + string entry_sizemap = sizeMaps[i].in(); + int colonPos = entry_sizemap.find( '|' ); + string entry, sizemap; + if ( colonPos == string::npos ) // '|' separator not found + entry = entry_sizemap; + else { + entry = entry_sizemap.substr( 0, colonPos); + if ( colonPos < entry_sizemap.size()-1 && entry_sizemap[colonPos] != ' ') + sizemap = entry_sizemap.substr( colonPos+1 ); + } + this->GetImpl()->SetSizeMapEntry( entry.c_str(), sizemap.c_str() ); + } +} + +//============================================================================= + +void BLSURFPlugin_Hypothesis_i::ClearSizeMaps() +{ + ASSERT(myBaseImpl); + this->GetImpl()->ClearSizeMaps(); +} + + +//============================================================================= + +void BLSURFPlugin_Hypothesis_i::SetSizeMap(const GEOM::GEOM_Object_ptr GeomObj,const char* sizeMap) +{ + ASSERT(myBaseImpl); + string entry; + entry=GeomObj->GetStudyEntry(); + std::cout << "IDL : GetName : " << GeomObj->GetName() << std::endl; + std::cout << "IDL : SETSIZEMAP ( "<< entry << " , " << sizeMap << ")" << std::endl; + SetSizeMapEntry( entry.c_str(),sizeMap); +} + +//============================================================================= +void BLSURFPlugin_Hypothesis_i::UnsetSizeMap(const GEOM::GEOM_Object_ptr GeomObj) +{ + ASSERT(myBaseImpl); + string entry; + entry=GeomObj->GetStudyEntry(); + std::cout << "IDL : GetName : " << GeomObj->GetName() << std::endl; + std::cout << "IDL : UNSETSIZEMAP ( "<< entry << ")" << std::endl; + UnsetEntry( entry.c_str()); +} + + + //============================================================================= /*! * BLSURFPlugin_Hypothesis_i::GetImpl diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx index 76b826f..5c7329d 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx @@ -31,6 +31,7 @@ #include "BLSURFPlugin_Hypothesis.hxx" class SMESH_Gen; +class GEOM_Object; // BLSURFPlugin parameters hypothesis @@ -98,6 +99,22 @@ class BLSURFPlugin_Hypothesis_i: void SetOptionValues(const BLSURFPlugin::string_array& options) throw (SALOME::SALOME_Exception); + void SetSizeMapEntry(const char* entry,const char* sizeMap ) throw (SALOME::SALOME_Exception); + + char* GetSizeMapEntry(const char* entry) throw (SALOME::SALOME_Exception); + + void UnsetEntry(const char* entry); + + BLSURFPlugin::string_array* GetSizeMapEntries(); + + void SetSizeMapEntries(const BLSURFPlugin::string_array& options) throw (SALOME::SALOME_Exception); + + void SetSizeMap(GEOM::GEOM_Object_ptr GeomObj, const char* sizeMap); + + void UnsetSizeMap(GEOM::GEOM_Object_ptr GeomObj); + + void ClearSizeMaps(); + // Get implementation ::BLSURFPlugin_Hypothesis* GetImpl(); diff --git a/src/BLSURFPlugin/Makefile.am b/src/BLSURFPlugin/Makefile.am index e78b060..88c937c 100644 --- a/src/BLSURFPlugin/Makefile.am +++ b/src/BLSURFPlugin/Makefile.am @@ -41,6 +41,8 @@ dist_libBLSURFEngine_la_SOURCES = \ BLSURFPlugin_i.cxx libBLSURFEngine_la_CPPFLAGS = \ + $(QT_INCLUDES) \ + $(PYTHON_INCLUDES) \ $(KERNEL_CXXFLAGS) \ $(GUI_CXXFLAGS) \ $(MED_CXXFLAGS) \ @@ -51,11 +53,15 @@ libBLSURFEngine_la_CPPFLAGS = \ $(CORBA_CXXFLAGS) \ $(CORBA_INCLUDES) \ $(BOOST_CPPFLAGS) \ + -I$(srcdir)/../PluginUtils \ -I$(top_builddir)/idl \ - -I$(top_builddir)/salome_adm/unix + -I$(top_builddir)/salome_adm/unix + +#Qt uniquement necessaire pour le getActiveStudyDocument de SMeshGuiUtils.h libBLSURFEngine_la_LDFLAGS = \ ../../idl/libSalomeIDLBLSURFPLUGIN.la \ + ../PluginUtils/libGeomSelectionTools.la \ $(BLSURF_LIBS) \ $(SMESH_LDFLAGS) -lSMESHimpl -lSMESHEngine -lStdMeshersEngine \ $(KERNEL_LDFLAGS) -lSalomeGenericObj diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index ba14fc8..9f41e7d 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D + // Copyright (C) 2007-2008 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -20,12 +20,14 @@ // File : BLSURFPluginGUI_HypothesisCreator.cxx // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA) // & Aurelien ALLEAUME (DISTENE) +// Size maps developement: Nicolas GEIMER (OCC) & Gilles DAVID (EURIWARE) // --- // #include "BLSURFPluginGUI_HypothesisCreator.h" #include #include +#include #include #include @@ -48,19 +50,35 @@ #include #include #include - +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +// #include #define WITH_SIZE_BOUNDARIES enum Topology { FromCAD, Process, Process2 - }; + } ; enum PhysicalMesh { DefaultSize = 0, - PhysicalUserDefined + PhysicalUserDefined, + SizeMap }; enum GeometricMesh @@ -72,15 +90,140 @@ enum GeometricMesh enum { STD_TAB = 0, ADV_TAB, + SMP_TAB, OPTION_ID_COLUMN = 0, OPTION_NAME_COLUMN, OPTION_VALUE_COLUMN, - NB_COLUMNS + NB_COLUMNS, + SMP_ENTRY_COLUMN = 0, + SMP_NAME_COLUMN, + SMP_SIZEMAP_COLUMN, + SMP_NB_COLUMNS +}; + + + +typedef struct { + PyObject_HEAD + int softspace; + std::string *out; + } PyStdOut; + +static void +PyStdOut_dealloc(PyStdOut *self) +{ + PyObject_Del(self); +} + +static PyObject * +PyStdOut_write(PyStdOut *self, PyObject *args) +{ + char *c; + int l; + if (!PyArg_ParseTuple(args, "t#:write",&c, &l)) + return NULL; + + //std::cerr << c ; + *(self->out)=*(self->out)+c; + + Py_INCREF(Py_None); + return Py_None; +} + +static PyMethodDef PyStdOut_methods[] = { + {"write", (PyCFunction)PyStdOut_write, METH_VARARGS, + PyDoc_STR("write(string) -> None")}, + {NULL, NULL} /* sentinel */ +}; + +static PyMemberDef PyStdOut_memberlist[] = { + {"softspace", T_INT, offsetof(PyStdOut, softspace), 0, + "flag indicating that a space needs to be printed; used by print"}, + {NULL} /* Sentinel */ +}; + +static PyTypeObject PyStdOut_Type = { + /* The ob_type field must be initialized in the module init function + * to be portable to Windows without using C++. */ + PyObject_HEAD_INIT(NULL) + 0, /*ob_size*/ + "PyOut", /*tp_name*/ + sizeof(PyStdOut), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + /* methods */ + (destructor)PyStdOut_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + PyObject_GenericGetAttr, /*tp_getattro*/ + /* softspace is writable: we must supply tp_setattro */ + PyObject_GenericSetAttr, /* tp_setattro */ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + PyStdOut_methods, /*tp_methods*/ + PyStdOut_memberlist, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + 0, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ }; +PyObject * newPyStdOut( std::string& out ) +{ + PyStdOut *self; + self = PyObject_New(PyStdOut, &PyStdOut_Type); + if (self == NULL) + return NULL; + self->softspace = 0; + self->out=&out; + return (PyObject*)self; +} + + BLSURFPluginGUI_HypothesisCreator::BLSURFPluginGUI_HypothesisCreator( const QString& theHypType ) : SMESHGUI_GenericHypothesisCreator( theHypType ) { + cout << "BLSURFPluginGUI_HypothesisCreator::BLSURFPluginGUI_HypothesisCreator" << endl; + this->mySMPMap.clear(); + + _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + GeomToolSelected = new GeomSelectionTools(aStudy); + + /* Initialize the Python interpreter */ + assert(Py_IsInitialized()); + PyGILState_STATE gstate; + gstate = PyGILState_Ensure(); + + main_mod = NULL; + main_mod = PyImport_AddModule("__main__"); + + main_dict = NULL; + main_dict = PyModule_GetDict(main_mod); + + PyRun_SimpleString("from math import *"); + PyGILState_Release(gstate); } BLSURFPluginGUI_HypothesisCreator::~BLSURFPluginGUI_HypothesisCreator() @@ -101,6 +244,7 @@ namespace { bool BLSURFPluginGUI_HypothesisCreator::checkParams() const { + cout << "BLSURFPluginGUI_HypothesisCreator::checkParams" << endl; bool ok = true; if ( !isDouble( myPhySize->text(), false )) { if ( myPhySize->text().isEmpty() ) @@ -153,11 +297,49 @@ bool BLSURFPluginGUI_HypothesisCreator::checkParams() const h->SetOptionValues( myOptions ); // restore values } + // SizeMap + if ( ok ) + { + mySizeMapTable->setFocus(); + QApplication::instance()->processEvents(); + + BLSURFPlugin::BLSURFPlugin_Hypothesis_var h = BLSURFPlugin::BLSURFPlugin_Hypothesis::_narrow( initParamsHypothesis() ); + BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this; + + int row = 0, nbRows = mySizeMapTable->rowCount(); + for ( ; row < nbRows; ++row ) + { + QString entry = mySizeMapTable->item( row, SMP_ENTRY_COLUMN )->text(); + QString sizeMap = mySizeMapTable->item( row, SMP_SIZEMAP_COLUMN )->text().trimmed(); + if ( !sizeMap.isEmpty() ) { + if (that->sizeMapValidationFromRow(row)) + { + try { + const char* e = entry.toLatin1().constData(); + const char* s = that->mySMPMap[entry].toLatin1().constData(); + h->SetSizeMapEntry( e, s ); + } + catch ( const SALOME::SALOME_Exception& ex ) + { + SUIT_MessageBox::critical( dlg(), + tr("SMESH_ERROR"), + ex.details.text.in() ); + ok = false; + } + } + else { + ok = false; + } + } + } + } + return ok; } QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() { + cout << "BLSURFPluginGUI_HypothesisCreator::buildFrame" << endl; QFrame* fr = new QFrame( 0 ); QVBoxLayout* lay = new QVBoxLayout( fr ); lay->setMargin( 5 ); @@ -187,7 +369,7 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() myPhysicalMesh = new QComboBox( myStdGroup ); aStdLayout->addWidget( myPhysicalMesh, row++, 1, 1, 1 ); QStringList physicalTypes; - physicalTypes << tr( "BLSURF_DEFAULT_USER" ) << tr( "BLSURF_CUSTOM_USER" ); + physicalTypes << tr( "BLSURF_DEFAULT_USER" ) << tr( "BLSURF_CUSTOM_USER" ) << tr( "BLSURF_SIZE_MAP"); myPhysicalMesh->addItems( physicalTypes ); aStdLayout->addWidget( new QLabel( tr( "BLSURF_HPHYDEF" ), myStdGroup), row, 0, 1, 1 ); @@ -289,9 +471,45 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() anAdvLayout->setRowStretch( 4, 5 ); anAdvLayout->setColumnStretch( 1, 5 ); + // Size Maps parameters + + mySmpGroup = new QWidget(); + QGridLayout* anSmpLayout = new QGridLayout(mySmpGroup); + + mySizeMapTable = new QTableWidget( 0, SMP_NB_COLUMNS, mySmpGroup ); + anSmpLayout->addWidget(mySizeMapTable, 1, 0, 6, 1); + QStringList sizeMapHeaders; + sizeMapHeaders << tr( "SMP_ENTRY_COLUMN" )<< tr( "SMP_NAME_COLUMN" ) << tr( "SMP_SIZEMAP_COLUMN" ); + mySizeMapTable->setHorizontalHeaderLabels(sizeMapHeaders); + mySizeMapTable->horizontalHeader()->hideSection( SMP_ENTRY_COLUMN ); + mySizeMapTable->resizeColumnToContents(SMP_NAME_COLUMN); + mySizeMapTable->resizeColumnToContents(SMP_ENTRY_COLUMN); + mySizeMapTable->setAlternatingRowColors(true); + mySizeMapTable->verticalHeader()->hide(); + + addSurfaceButton = new QPushButton(tr("BLSURF_SM_SURFACE"),mySmpGroup); + anSmpLayout->addWidget(addSurfaceButton, 1, 1, 1, 1); + + addEdgeButton = new QPushButton(tr("BLSURF_SM_EDGE"),mySmpGroup); + anSmpLayout->addWidget(addEdgeButton, 2, 1, 1, 1); + + addPointButton = new QPushButton(tr("BLSURF_SM_POINT"),mySmpGroup); + anSmpLayout->addWidget(addPointButton, 3, 1, 1, 1); + + QFrame *line = new QFrame(mySmpGroup); + line->setFrameShape(QFrame::HLine); + line->setFrameShadow(QFrame::Sunken); + anSmpLayout->addWidget(line, 4, 1, 1, 1); + + removeButton = new QPushButton(tr("BLSURF_SM_REMOVE"),mySmpGroup); + anSmpLayout->addWidget(removeButton, 5, 1, 1, 1); + + // --- tab->insertTab( STD_TAB, myStdGroup, tr( "SMESH_ARGUMENTS" ) ); tab->insertTab( ADV_TAB, myAdvGroup, tr( "GHS3D_ADV_ARGS" ) ); + tab->insertTab( SMP_TAB, mySmpGroup, tr( "BLSURF_SIZE_MAP" ) ); + tab->setCurrentIndex( STD_TAB ); // --- @@ -300,12 +518,20 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() connect( addBtn->menu(), SIGNAL( aboutToShow() ), this, SLOT( onAddOption() ) ); connect( addBtn->menu(), SIGNAL( triggered( QAction* ) ), this, SLOT( onOptionChosenInPopup( QAction* ) ) ); connect( rmBtn, SIGNAL( clicked()), this, SLOT( onDeleteOption() ) ); + + connect(addSurfaceButton, SIGNAL(clicked()), this, SLOT(onAddMapOnSurface())); + connect(addEdgeButton, SIGNAL(clicked()), this, SLOT(onAddMapOnEdge())); + connect(addPointButton, SIGNAL(clicked()), this, SLOT(onAddMapOnPoint())); + connect(removeButton, SIGNAL(clicked()), this, SLOT(onRemoveMap())); + connect(mySizeMapTable, SIGNAL(cellChanged ( int, int )),this,SLOT (onSetSizeMap(int,int ))); return fr; } + void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const { + cout << "BLSURFPluginGUI_HypothesisCreator::retrieveParams" << endl; BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this; BlsurfHypothesisData data; @@ -332,7 +558,7 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const myAllowQuadrangles->setChecked( data.myAllowQuadrangles ); myDecimesh->setChecked( data.myDecimesh ); myVerbosity->setValue( data.myVerbosity ); - + if ( myOptions.operator->() ) { printf("retrieveParams():myOptions->length()=%d\n",myOptions->length()); for ( int i = 0, nb = myOptions->length(); i < nb; ++i ) { @@ -355,6 +581,28 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const } myOptionTable->resizeColumnToContents( OPTION_NAME_COLUMN ); + printf("retrieveParams():that->mySMPMap.size()=%d\n",that->mySMPMap.size()); + QMapIterator i(that->mySMPMap); + while (i.hasNext()) { + i.next(); + const QString entry = i.key(); + string shapeName = GeomToolSelected->getNameFromEntry(entry.toStdString()); + const QString sizeMap = i.value(); + int row = mySizeMapTable->rowCount(); + mySizeMapTable->setRowCount( row+1 ); + mySizeMapTable->setItem( row, SMP_ENTRY_COLUMN, new QTableWidgetItem( entry ) ); + mySizeMapTable->item( row, SMP_ENTRY_COLUMN )->setFlags( 0 ); + mySizeMapTable->setItem( row, SMP_NAME_COLUMN, new QTableWidgetItem( QString::fromStdString(shapeName) ) ); + mySizeMapTable->item( row, SMP_NAME_COLUMN )->setFlags( 0 ); + mySizeMapTable->setItem( row, SMP_SIZEMAP_COLUMN, new QTableWidgetItem( sizeMap ) ); + mySizeMapTable->item( row, SMP_SIZEMAP_COLUMN )->setFlags( Qt::ItemIsSelectable | + Qt::ItemIsEditable | + Qt::ItemIsEnabled ); + } + + mySizeMapTable->resizeColumnToContents( SMP_NAME_COLUMN ); + mySizeMapTable->resizeColumnToContents(SMP_ENTRY_COLUMN); + // update widgets that->onPhysicalMeshChanged(); that->onGeometricMeshChanged(); @@ -368,11 +616,13 @@ QString BLSURFPluginGUI_HypothesisCreator::storeParams() const QString guiHyp = that->readParamsFromWidgets( data ); that->storeParamsToHypo( data ); + //cout<<"BLSURFPluginGUI_HypothesisCreator::storeParams(), guiHyp: "<myOptions = h->GetOptionValues(); + + BLSURFPlugin::string_array_var mySMPString = h->GetSizeMapEntries(); + + cout << "mySMPString->length() = " << mySMPString->length() << endl; + that->mySMPMap.clear(); + + TopoDS_Shape S; + + for ( int i = 0;ilength(); ++i ) { + QString sizemaps_line = mySMPString[i].in(); + QStringList entry_sm = sizemaps_line.split( "|", QString::KeepEmptyParts ); + if ( entry_sm.count() > 1 ) { + string fullSizeMap = entry_sm[1].toStdString(); + int pos = fullSizeMap.find("return")+7; + QString sizeMap = QString::fromStdString(fullSizeMap.substr(pos, fullSizeMap.size()-pos)); + that->mySMPMap[entry_sm[0]] = sizeMap; + that->mySMPShapeTypeMap[entry_sm[0]] = GeomToolSelected->entryToShape(entry_sm[0].toStdString()).ShapeType(); + MESSAGE("mySMPMap[" << entry_sm[0].toStdString() << "] = " << sizeMap.toStdString()); + MESSAGE("mySMPShapeTypeMap[" << entry_sm[0].toStdString() << "] = " << that->mySMPShapeTypeMap[entry_sm[0]]); + } + } + return true; } bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesisData& h_data ) const { + cout << "BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo" << endl; BLSURFPlugin::BLSURFPlugin_Hypothesis_var h = BLSURFPlugin::BLSURFPlugin_Hypothesis::_narrow( hypothesis() ); @@ -434,7 +707,7 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi if ( h->GetVerbosity() != h_data.myVerbosity ) h->SetVerbosity( h_data.myVerbosity ); - if( (int) h_data.myPhysicalMesh == PhysicalUserDefined ) { + if( ((int) h_data.myPhysicalMesh == PhysicalUserDefined)||((int) h_data.myPhysicalMesh == SizeMap) ) { if ( h->GetPhySize() != h_data.myPhySize.toDouble() ) h->SetPhySize( h_data.myPhySize.toDouble() ); } @@ -463,8 +736,39 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi h->SetGeoMax( h_data.myGeoMax.toDouble() ); #endif - printf("storeParamsToHypo():myOptions->length()=%d\n",myOptions->length()); + //printf("storeParamsToHypo():myOptions->length()=%d\n",myOptions->length()); h->SetOptionValues( myOptions ); // is set in checkParams() + + BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this; + //printf("storeParamsToHypo():that->mySMPMap.size()=%d\n",that->mySMPMap.size()); + QMapIterator i(that->mySMPMap); + // Reset the size maps in engine + // h->ClearSizeMaps(); + // Iterate over each size map + while (i.hasNext()) { + i.next(); + const QString entry = i.key(); + const QString sizeMap = i.value(); + + if (sizeMap == "__TO_DELETE__") { + cout << "Delete entry " << entry.toStdString() << " from engine" << endl; + h->UnsetEntry(entry.toLatin1().constData()); + ok = false; + break; + } + + QString fullSizeMap; + fullSizeMap = QString(""); + if (that->mySMPShapeTypeMap[entry] == TopAbs_FACE) + fullSizeMap = QString("def f(u,v): return ") + sizeMap; + else if (that->mySMPShapeTypeMap[entry] == TopAbs_EDGE) + fullSizeMap = QString("def f(t): return ") + sizeMap; + else if (that->mySMPShapeTypeMap[entry] == TopAbs_VERTEX) + fullSizeMap = QString("def f(): return ") + sizeMap; + + cout << "SetSizeMapEntry("<SetSizeMapEntry( entry.toLatin1().constData(), fullSizeMap.toLatin1().constData() ); + } } catch(const SALOME::SALOME_Exception& ex) { @@ -476,6 +780,7 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi QString BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets( BlsurfHypothesisData& h_data ) const { + cout << "BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets" << endl; h_data.myName = myName ? myName->text() : ""; h_data.myTopology = myTopology->currentIndex(); h_data.myPhysicalMesh = myPhysicalMesh->currentIndex(); @@ -526,14 +831,24 @@ QString BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets( BlsurfHypothes guiHyp += name + " = " + value + "; "; } } - + + // SizeMap + row = 0, nbRows = mySizeMapTable->rowCount(); + for ( ; row < nbRows; ++row ) + { + QString entry = mySizeMapTable->item( row, SMP_ENTRY_COLUMN )->text(); + if ( that->mySMPMap.contains(entry) ) + guiHyp += entry + " = " + that->mySMPMap[entry] + "; "; + } + cout << "guiHyp : " << guiHyp.toLatin1().data() << endl; return guiHyp; } void BLSURFPluginGUI_HypothesisCreator::onPhysicalMeshChanged() { - bool isCustom = (myPhysicalMesh->currentIndex() == PhysicalUserDefined); + cout << "BLSURFPluginGUI_HypothesisCreator::onPhysicalMeshChanged" << endl; + bool isCustom = ((myPhysicalMesh->currentIndex() == PhysicalUserDefined) || (myPhysicalMesh->currentIndex() == SizeMap)) ; myPhySize->setEnabled(isCustom); myPhyMax->setEnabled(isCustom); myPhyMin->setEnabled(isCustom); @@ -559,6 +874,7 @@ void BLSURFPluginGUI_HypothesisCreator::onPhysicalMeshChanged() { } void BLSURFPluginGUI_HypothesisCreator::onGeometricMeshChanged() { + cout << "BLSURFPluginGUI_HypothesisCreator::onGeometricMeshChanged" << endl; bool isCustom = (myGeometricMesh->currentIndex() == UserDefined); myAngleMeshS->setEnabled(isCustom); myAngleMeshC->setEnabled(isCustom); @@ -661,6 +977,260 @@ void BLSURFPluginGUI_HypothesisCreator::onDeleteOption() myOptionTable->removeRow( it.previous() ); } +// ********************** +// *** BEGIN SIZE MAP *** +// ********************** + + +void BLSURFPluginGUI_HypothesisCreator::onRemoveMap() +{ + cout<<"BLSURFPluginGUI_HypothesisCreator::onRemoveMap()"< selectedRows; + QList selected = mySizeMapTable->selectedItems(); + QTableWidgetItem* item; + int row; + foreach( item, selected ) { + row = item->row(); + if ( !selectedRows.contains( row ) ) + selectedRows.append( row ); + } + + BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this; + + qSort( selectedRows ); + QListIterator it( selectedRows ); + it.toBack(); + while ( it.hasPrevious() ) { + row = it.previous(); + cout << "delete row #"<< row <item(row,SMP_ENTRY_COLUMN)->text(); + if (that->mySMPMap.contains(entry)) + that->mySMPMap[entry] = "__TO_DELETE__"; + if (that->mySMPShapeTypeMap.contains(entry)) + that->mySMPShapeTypeMap.remove(entry); + mySizeMapTable->removeRow(row ); + } + mySizeMapTable->resizeColumnToContents(SMP_NAME_COLUMN); + mySizeMapTable->resizeColumnToContents(SMP_ENTRY_COLUMN); +} + +void BLSURFPluginGUI_HypothesisCreator::onSetSizeMap(int row,int col) +{ + cout<<"BLSURFPluginGUI_HypothesisCreator::onSetSizeMap()"<mySizeMapTable->item(row, SMP_ENTRY_COLUMN)->text(); + QString sizeMap = that->mySizeMapTable->item(row, SMP_SIZEMAP_COLUMN)->text().trimmed(); + if (not that->mySMPShapeTypeMap.contains(entry)) + return; + QString prevSizeMap = that->mySMPMap[entry]; + that->mySMPMap[entry] = sizeMap; + if (not sizeMapValidationFromEntry(entry)) { + that->mySMPMap[entry] = prevSizeMap; + that->mySizeMapTable->item(row, SMP_SIZEMAP_COLUMN)->setText(prevSizeMap); + } + } +} + +void BLSURFPluginGUI_HypothesisCreator::onAddMapOnSurface() +{ + insertElementType(TopAbs_FACE); +} + +void BLSURFPluginGUI_HypothesisCreator::onAddMapOnEdge() +{ + insertElementType(TopAbs_EDGE); +} + +void BLSURFPluginGUI_HypothesisCreator::onAddMapOnPoint() +{ + insertElementType(TopAbs_VERTEX); +} + +void BLSURFPluginGUI_HypothesisCreator::insertElementType(TopAbs_ShapeEnum typeShapeAsked) +{ + cout<<"BLSURFPluginGUI_HypothesisCreator::insertElementType()"<selectionMgr(); + SALOME_ListIO ListSelectedObjects; + aSel->selectedObjects(ListSelectedObjects, NULL, false ); + if (!ListSelectedObjects.IsEmpty()) + { + SALOME_ListIteratorOfListIO Object_It(ListSelectedObjects); + for (; Object_It.More(); Object_It.Next()) + { + Handle(SALOME_InteractiveObject) anObject = Object_It.Value(); + entry = GeomToolSelected->getEntryOfObject(anObject); + shapeName = anObject->getName(); + S = GeomToolSelected->entryToShape(entry); + if ((! S.IsNull()) && (S.ShapeType() == typeShapeAsked)) + { + mySizeMapTable->setFocus(); + QString shapeEntry; + shapeEntry = QString::fromStdString(entry); + double phySize = h->GetPhySize(); + std::ostringstream oss; + oss << phySize; + QString sizeMap; + sizeMap = QString::fromStdString(oss.str()); + if (that->mySMPMap.contains(shapeEntry)) { + if (that->mySMPMap[shapeEntry] != "__TO_DELETE__") { + MESSAGE("Size map for shape with name(entry): "<< shapeName << "(" << entry << ")"); + break; + } + } + that->mySMPMap[shapeEntry] = sizeMap; + that->mySMPShapeTypeMap[shapeEntry] = typeShapeAsked; + int row = mySizeMapTable->rowCount() ; + mySizeMapTable->setRowCount( row+1 ); + mySizeMapTable->setItem( row, SMP_ENTRY_COLUMN, new QTableWidgetItem( shapeEntry ) ); + mySizeMapTable->item( row, SMP_ENTRY_COLUMN )->setFlags( 0 ); + mySizeMapTable->setItem( row, SMP_NAME_COLUMN, new QTableWidgetItem( QString::fromStdString(shapeName) ) ); + mySizeMapTable->item( row, SMP_NAME_COLUMN )->setFlags( 0 ); + mySizeMapTable->setItem( row, SMP_SIZEMAP_COLUMN, new QTableWidgetItem( sizeMap ) ); + mySizeMapTable->item( row, SMP_SIZEMAP_COLUMN )->setFlags( Qt::ItemIsSelectable |Qt::ItemIsEditable |Qt::ItemIsEnabled ); + mySizeMapTable->resizeColumnToContents( SMP_NAME_COLUMN ); + mySizeMapTable->resizeColumnToContents(SMP_ENTRY_COLUMN); + mySizeMapTable->clearSelection(); + mySizeMapTable->scrollToItem( mySizeMapTable->item( row, SMP_SIZEMAP_COLUMN ) ); + + if ( myPhysicalMesh->currentIndex() != SizeMap ) { + myPhysicalMesh->setCurrentIndex( SizeMap ); + onPhysicalMeshChanged(); + } + } + } + } +} + +bool BLSURFPluginGUI_HypothesisCreator::sizeMapsValidation() +{ + cout<<"BLSURFPluginGUI_HypothesisCreator::sizeMapsValidation()"<rowCount(); + for ( ; row < nbRows; ++row ) + if (not sizeMapValidationFromRow(row)) + return false; + return true; +} + +bool BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromRow(int myRow) +{ + cout<<"BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromRow()"<item( myRow, SMP_ENTRY_COLUMN )->text(); + return sizeMapValidationFromEntry(myEntry); +} + +bool BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromEntry(QString myEntry) +{ + cout<<"BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromEntry()"<mySMPMap.contains(myEntry)) { + cout<<"Geometry with entry "<mySMPShapeTypeMap.contains(myEntry)) { + cout<<"Shape type with entry "<mySMPShapeTypeMap[myEntry] == TopAbs_FACE) + expr = "def f(u,v) : return " + that->mySMPMap[myEntry].toStdString(); + else if ( that->mySMPShapeTypeMap[myEntry] == TopAbs_EDGE) + expr = "def f(t) : return " + that->mySMPMap[myEntry].toStdString(); + else if ( that->mySMPShapeTypeMap[myEntry] == TopAbs_VERTEX) + expr = "def f() : return " + that->mySMPMap[myEntry].toStdString(); + + assert(Py_IsInitialized()); + PyGILState_STATE gstate; + gstate = PyGILState_Ensure(); + + PyObject * obj = NULL; + PyObject* new_stderr = NULL; + string err_description=""; + obj= PyRun_String(expr.c_str(), Py_file_input, main_dict, NULL); + if (obj == NULL){ + fflush(stderr); + err_description=""; + new_stderr=newPyStdOut(err_description); + PySys_SetObject("stderr", new_stderr); + PyErr_Print(); + PySys_SetObject("stderr", PySys_GetObject("__stderr__")); + Py_DECREF(new_stderr); + SUIT_MessageBox::warning( dlg(),"Definition of Python Function : Error" ,err_description.c_str() ); + PyGILState_Release(gstate); + return false; + } + Py_DECREF(obj); + + PyObject * func = NULL; + func = PyObject_GetAttrString(main_mod, "f"); + if ( func == NULL){ + fflush(stderr); + err_description=""; + new_stderr=newPyStdOut(err_description); + PySys_SetObject("stderr", new_stderr); + PyErr_Print(); + PySys_SetObject("stderr", PySys_GetObject("__stderr__")); + Py_DECREF(new_stderr); + SUIT_MessageBox::warning( dlg(),"Python Error" ,err_description.c_str() ); + PyGILState_Release(gstate); + return false; + } + + PyGILState_Release(gstate); + + cout<<"SizeMap expression "<row(); + int myColumn = index->column(); + + if (myColumn == 2){ + if (!myEditor) { + myEditor = new BLSURFPluginGUI_MapFunctionEditor(sizeMapModel->item(myRow,0)->text()); + connect(myEditor, SIGNAL(FunctionEntered(QString)), this, SLOT(FunctionLightValidation(QString))); + } + myEditor->exec(); +// myEditor->show(); +// myEditor->raise(); +// myEditor->activateWindow(); + + +// BLSURFPluginGUI_MapFunctionEditor* myEditor = new BLSURFPluginGUI_MapFunctionEditor(sizeMapModel->item(myRow,0)->text()); +// myEditor->exec(); + QString myFunction = myEditor->GetFunctionText(); + // FIN RECUPERATION FONCTION + + if (! myFunction.isEmpty()) { + + // MAJ DE LA MAP + + BLSURFPlugin::BLSURFPlugin_Hypothesis_var h = + BLSURFPlugin::BLSURFPlugin_Hypothesis::_narrow( initParamsHypothesis()); + +// h->SetSizeMapEntry(sizeMapModel->item(myRow,1)->text().toLatin1().constData(), +// item->text().toLatin1().constData()); + h->SetSizeMapEntry(sizeMapModel->item(myRow,1)->text().toLatin1().constData(), + myFunction.toLatin1().constData()); + // FIN MAJ DE LA MAP + } + } +}*/ QString BLSURFPluginGUI_HypothesisCreator::caption() const { @@ -681,3 +1251,13 @@ QString BLSURFPluginGUI_HypothesisCreator::helpPage() const { return "blsurf_hypo_page.html"; } + +LightApp_SelectionMgr* BLSURFPluginGUI_HypothesisCreator::selectionMgr() +{ + + SalomeApp_Application* anApp = dynamic_cast( SUIT_Session::session()->activeApplication() ); + if( anApp ) + return dynamic_cast( anApp->selectionMgr() ); + else + return 0; +} diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.h b/src/GUI/BLSURFPluginGUI_HypothesisCreator.h index 15e701e..94f54ee 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.h +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.h @@ -35,8 +35,13 @@ #define BLSURFPLUGIN_GUI_EXPORT #endif +#include #include #include +#include +#include +#include +#include #include CORBA_SERVER_HEADER(BLSURFPlugin_Algorithm) class QGroupBox; @@ -45,21 +50,26 @@ class QComboBox; class QCheckBox; class QLineEdit; class QTableWidget; +class QTableView; +class QStandardItemModel; +class QStandardItem; +class QModelIndex; class QSpinBox; class QMenu; class QAction; +class LightApp_SelectionMgr; typedef struct { int myTopology, myVerbosity; int myPhysicalMesh, myGeometricMesh; double myAngleMeshS, myAngleMeshC, myGradation; - QString myPhySize, myGeoMin, myGeoMax, myPhyMin, myPhyMax; - bool myAllowQuadrangles, myDecimesh; + QString myPhySize, myGeoMin, myGeoMax, myPhyMin,myPhyMax; + bool myAllowQuadrangles, myDecimesh,mySmpsurface,mySmpedge,mySmppoint; QString myName; - } BlsurfHypothesisData; + /*! * \brief Class for creation of BLSURF hypotheses */ @@ -73,6 +83,8 @@ public: virtual bool checkParams() const; virtual QString helpPage() const; + void insertElementType( TopAbs_ShapeEnum ); + static LightApp_SelectionMgr* selectionMgr(); protected: virtual QFrame* buildFrame (); @@ -89,11 +101,19 @@ protected slots: void onAddOption(); void onDeleteOption(); void onOptionChosenInPopup( QAction* ); + void onAddMapOnSurface(); + void onAddMapOnEdge(); + void onAddMapOnPoint(); + void onRemoveMap(); + void onSetSizeMap(int,int); private: bool readParamsFromHypo( BlsurfHypothesisData& ) const; QString readParamsFromWidgets( BlsurfHypothesisData& ) const; bool storeParamsToHypo( const BlsurfHypothesisData& ) const; + bool sizeMapsValidation(); + bool sizeMapValidationFromRow(int); + bool sizeMapValidationFromEntry(QString); private: QWidget* myStdGroup; @@ -116,7 +136,22 @@ private: QSpinBox* myVerbosity; QTableWidget* myOptionTable; + QWidget *mySmpGroup; + QTableWidget *mySizeMapTable; + QPushButton *addEdgeButton; + QPushButton *addSurfaceButton; + QPushButton *addPointButton; + QPushButton *removeButton; + + // map = entry , size map + QMap mySMPMap; + QMap mySMPShapeTypeMap; + GeomSelectionTools* GeomToolSelected; + BLSURFPlugin::string_array_var myOptions; + + PyObject * main_mod; + PyObject * main_dict; }; #endif // BLSURFPLUGINGUI_HypothesisCreator_H diff --git a/src/GUI/BLSURFPlugin_msg_en.ts b/src/GUI/BLSURFPlugin_msg_en.ts index 0e4e862..5712ed2 100644 --- a/src/GUI/BLSURFPlugin_msg_en.ts +++ b/src/GUI/BLSURFPlugin_msg_en.ts @@ -94,6 +94,51 @@ BLSURF_PHY_MESH Physical Mesh + + BLSURF_SIZE_MAP + Size Map + + + SMP_ENTRY_COLUMN + Entry + + + + SMP_NAME_COLUMN + Name + + + SMP_SIZEMAP_COLUMN + Size Map + + + BLSURF_SM_SURFACE + Add Map on Surface + + + BLSURF_SM_EDGE + Add Map on Edge + + + BLSURF_SM_POINT + Add Map on Point + + + BLSURF_SM_REMOVE + Remove Map + + + BLSURF_SM_SURF_VALUE + Size on Surface(s) + + + BLSURF_SM_EDGE_VALUE + Size on Edge(s) + + + BLSURF_SM_POINT_VALUE + Size on Point(s) + BLSURF_TITLE Hypothesis Construction diff --git a/src/GUI/Makefile.am b/src/GUI/Makefile.am index 20136b4..28ff246 100644 --- a/src/GUI/Makefile.am +++ b/src/GUI/Makefile.am @@ -32,7 +32,10 @@ lib_LTLIBRARIES = libBLSURFPluginGUI.la dist_libBLSURFPluginGUI_la_SOURCES = \ BLSURFPluginGUI.cxx \ BLSURFPluginGUI_HypothesisCreator.h \ - BLSURFPluginGUI_HypothesisCreator.cxx + BLSURFPluginGUI_HypothesisCreator.cxx +# ui_BLSURFPluginGUI_MapFunctionEditor.h \ +# BLSURFPluginGUI_MapFunctionEditor.h \ +# BLSURFPluginGUI_MapFunctionEditor.cxx MOC_FILES = \ BLSURFPluginGUI_HypothesisCreator_moc.cxx @@ -56,11 +59,13 @@ libBLSURFPluginGUI_la_CPPFLAGS = \ $(CORBA_INCLUDES) \ $(BLSURF_INCLUDES) \ -I$(srcdir)/../BLSURFPlugin \ + -I$(srcdir)/../PluginUtils \ -I$(top_builddir)/idl \ -I$(top_builddir)/salome_adm/unix libBLSURFPluginGUI_la_LDFLAGS = \ ../BLSURFPlugin/libBLSURFEngine.la \ + ../PluginUtils/libGeomSelectionTools.la \ ${SMESH_LDFLAGS} -lSMESH \ $(CAS_KERNEL) $(BLSURF_LIBS) diff --git a/src/Makefile.am b/src/Makefile.am index 5768f50..2d86256 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -23,10 +23,10 @@ # include $(top_srcdir)/adm_local/unix/make_common_starter.am -SUBDIRS = BLSURFPlugin +SUBDIRS = PluginUtils BLSURFPlugin if BLSURFPLUGIN_ENABLE_GUI SUBDIRS += GUI endif -DIST_SUBDIRS = BLSURFPlugin GUI \ No newline at end of file +DIST_SUBDIRS = PluginUtils BLSURFPlugin GUI diff --git a/src/PluginUtils/GeomSelectionTools.cxx b/src/PluginUtils/GeomSelectionTools.cxx new file mode 100644 index 0000000..df8ab5a --- /dev/null +++ b/src/PluginUtils/GeomSelectionTools.cxx @@ -0,0 +1,218 @@ +// Copyright (C) 2007-2008 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// 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 : GeomSelectionTools.cxx +// Authors : Nicolas GEIMER (OCC) +// --- +// + + +#include "GeomSelectionTools.h" +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +GeomSelectionTools::GeomSelectionTools(_PTR(Study) aStudy) +{ + myStudy = aStudy; +} + + + +LightApp_SelectionMgr* GeomSelectionTools::selectionMgr() +{ + SalomeApp_Application* anApp = dynamic_cast( SUIT_Session::session()->activeApplication() ); + if (anApp) + return dynamic_cast( anApp->selectionMgr() ); + else + return 0; +} + +SALOME_ListIO* GeomSelectionTools::getSelectedSalomeObjects() +{ + SALOME_ListIO* selected; + LightApp_SelectionMgr* aSel = selectionMgr(); + aSel->selectedObjects( *selected, NULL, false ); + return selected; +} + + +Handle(SALOME_InteractiveObject) GeomSelectionTools::getFirstSelectedSalomeObject() +{ + SALOME_ListIO selected; + LightApp_SelectionMgr* aSel = selectionMgr(); + aSel->selectedObjects( selected, NULL, false ); + if (!selected.IsEmpty()){ + SALOME_ListIteratorOfListIO anIt(selected); + Handle(SALOME_InteractiveObject) anIO; + anIO = anIt.Value(); + return anIO; + } + return NULL; +} + +std::string GeomSelectionTools::getFirstSelectedEntry() +{ + Handle(SALOME_InteractiveObject) anIO; + std::string entry=""; + anIO=GeomSelectionTools::getFirstSelectedSalomeObject(); + return GeomSelectionTools::getEntryOfObject(anIO); +} + +std::string GeomSelectionTools::getEntryOfObject(Handle(SALOME_InteractiveObject) anIO){ + std::string entry=""; + _PTR(SObject) aSO = myStudy->FindObjectID(anIO->getEntry()); + if (aSO){ + _PTR(SObject) aRefSObj; + // If selected object is a reference + if ( aSO->ReferencedObject( aRefSObj )) + entry = aRefSObj->GetID(); + // If selected object is a reference is not a reference + else + entry= anIO->getEntry(); + } + return entry; +} + + +std::string GeomSelectionTools::getNameFromEntry(std::string entry){ + std::string name = ""; + _PTR(SObject) aSO = myStudy->FindObjectID(entry); + if (aSO){ + _PTR(SObject) aRefSObj; + // If selected object is a reference + if ( aSO->ReferencedObject( aRefSObj )) + name = aRefSObj->GetName(); + // If selected object is a reference is not a reference + else + name = aSO->GetName(); + } + return name; +} + +std::string GeomSelectionTools::getFirstSelectedComponentDataType() +{ + Handle(SALOME_InteractiveObject) anIO; + std::string DataType=""; + anIO=GeomSelectionTools::getFirstSelectedSalomeObject(); + _PTR(SObject) aSO = myStudy->FindObjectID(anIO->getEntry()); + if (aSO){ + _PTR(SObject) aRefSObj; + // If selected object is a reference + if ( aSO->ReferencedObject( aRefSObj )) + DataType= aRefSObj->GetFatherComponent()->ComponentDataType(); + // If selected object is a reference is not a reference + else + DataType=anIO->getComponentDataType(); + } + return DataType; +} + +TopoDS_Shape GeomSelectionTools::getFirstSelectedTopoDSShape() +{ + Handle(SALOME_InteractiveObject) anIO; + anIO=GeomSelectionTools::getFirstSelectedSalomeObject(); + return entryToShape(anIO->getEntry()); +} + +TopoDS_Shape GeomSelectionTools::entryToShape(std::string entry){ + TopoDS_Shape S = TopoDS_Shape(); + _PTR(SObject) aSO = myStudy->FindObjectID(entry); + if (aSO){ + _PTR(SObject) aRefSObj; + GEOM::GEOM_Object_var aShape; + // If selected object is a reference + if ( aSO->ReferencedObject( aRefSObj )){ + if (aRefSObj->GetFatherComponent()->ComponentDataType() == "GEOM") + aShape=SMESH::SObjectToInterface(aRefSObj); + } + // If selected object is a reference is not a reference + else { + if ( aSO->GetFatherComponent()->ComponentDataType() == "GEOM") + aShape = SMESH::SObjectToInterface(aSO); + } + if ( !aShape->_is_nil() ){ + if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) + S=gen->GeomObjectToShape( aShape.in() ); + } + } + return S; +} + +TopAbs_ShapeEnum GeomSelectionTools:: getFirstSelectedShapeType() +{ + TopoDS_Shape S=getFirstSelectedTopoDSShape(); + if (!S.IsNull()) + return S.ShapeType(); + else + // FIXME : Gérer l'exception de manière correct si la shape est nulle + return TopAbs_SHAPE; + +} + +void GeomSelectionTools::getFaceInformation() +{ + TopoDS_Shape S=getFirstSelectedTopoDSShape(); + if (!S.IsNull() && S.ShapeType()==TopAbs_FACE){ + TopoDS_Face f=TopoDS::Face(S); + Handle(Geom_Surface) surf = BRep_Tool::Surface(f); + BRepAdaptor_Surface surf_adap=BRepAdaptor_Surface::BRepAdaptor_Surface(f); + + /* Global Information */ + cout << "GLOBAL INFORMATION" << endl; + cout << "******************" << endl; + stringstream buffer; + buffer << "Degre U : " << surf_adap.UDegree(); + //conversion nécessaire pour affichage + cout << buffer.str() << endl; +/* cout << " Degre V : " << surf_adap.VDegree() << endl; + cout << " Nb Poles U : " << surf_adap.NbUPoles() << endl; + cout << " Nb Poles V : " << surf_adap.NbVPoles() << endl; + cout << " Nb Noeuds U : " << surf_adap.NbUKnots() << endl; + cout << " Nb Noeuds V : " << surf_adap.NbVKnots() << endl; + cout << " U Rationnel ? " << surf_adap.IsURational() << endl; + cout << " V Rationnel ? " << surf_adap.IsVRational() << endl; */ + + GeomAbs_SurfaceType surf_type=surf_adap.GetType(); + /* + Returns the type of the surface : Plane, Cylinder, + Cone, Sphere, Torus, BezierSurface, + BSplineSurface, SurfaceOfRevolution, + SurfaceOfExtrusion, OtherSurface + */ + + + + } + return; +} diff --git a/src/PluginUtils/GeomSelectionTools.h b/src/PluginUtils/GeomSelectionTools.h new file mode 100644 index 0000000..1196571 --- /dev/null +++ b/src/PluginUtils/GeomSelectionTools.h @@ -0,0 +1,56 @@ +// Copyright (C) 2007-2008 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// This library is distributed in the hope that it will be useful, +// 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 : GeomSelectionTools.h +// Authors : Nicolas GEIMER (OCC) +// --- + + + +#include "SALOMEDSClient.hxx" +#include "SALOME_InteractiveObject.hxx" +#include + +#include + +class LightApp_SelectionMgr; + +class GeomSelectionTools +{ + +private: + + _PTR(Study) myStudy; + +public: + + GeomSelectionTools(_PTR(Study)); + static LightApp_SelectionMgr* selectionMgr(); + SALOME_ListIO* getSelectedSalomeObjects(); + Handle(SALOME_InteractiveObject) getFirstSelectedSalomeObject(); + std::string getFirstSelectedEntry(); + std::string getEntryOfObject(Handle(SALOME_InteractiveObject)); + std::string getNameFromEntry(std::string); + std::string getFirstSelectedComponentDataType(); + TopoDS_Shape getFirstSelectedTopoDSShape(); + TopAbs_ShapeEnum getFirstSelectedShapeType(); + TopoDS_Shape entryToShape(std::string ); + void getFaceInformation(); +}; + + diff --git a/src/PluginUtils/Makefile.am b/src/PluginUtils/Makefile.am new file mode 100644 index 0000000..6ba3947 --- /dev/null +++ b/src/PluginUtils/Makefile.am @@ -0,0 +1,66 @@ +# Copyright (C) 2007-2008 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# 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.am +# Author : Nicolas GEIMER (OCC) +# --- +# +include $(top_srcdir)/adm_local/unix/make_common_starter.am + +# header files +salomeinclude_HEADERS = + +# Libraries targets +lib_LTLIBRARIES = libGeomSelectionTools.la + +dist_libGeomSelectionTools_la_SOURCES = \ + GeomSelectionTools.h \ + GeomSelectionTools.cxx + +MOC_FILES = \ + BLSURFPluginGUI_HypothesisCreator_moc.cxx + +nodist_GeomSelectionTools_la_SOURCES = \ + $(MOC_FILES) + +# additionnal information to compil and link file + +libGeomSelectionTools_la_CPPFLAGS = \ + $(QT_INCLUDES) \ + $(CAS_CPPFLAGS) \ + $(PYTHON_INCLUDES) \ + $(KERNEL_CXXFLAGS) \ + $(GUI_CXXFLAGS) \ + $(GEOM_CXXFLAGS) \ + $(SMESH_CXXFLAGS) \ + $(MED_CXXFLAGS) \ + $(BOOST_CPPFLAGS) \ + $(CORBA_CXXFLAGS) \ + $(CORBA_INCLUDES) \ + -I$(top_builddir)/idl \ + -I$(top_builddir)/salome_adm/unix + +libGeomSelectionTools_la_LDFLAGS = \ + ${SMESH_LDFLAGS} -lSMESH \ + $(CAS_KERNEL) + +# resources files +#nodist_salomeres_DATA = \ +# BLSURFPlugin_images.qm \ +# BLSURFPlugin_msg_en.qm diff --git a/src/PluginUtils/PluginUtils.h b/src/PluginUtils/PluginUtils.h new file mode 100644 index 0000000..69c2e86 --- /dev/null +++ b/src/PluginUtils/PluginUtils.h @@ -0,0 +1,28 @@ +// 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 +// +// File : PluginUtils.h +// Author : Nicolas GEIMER (OCC) +// Module : BLSURFPlugin +// + + + diff --git a/src/PluginUtils/SizeMapPython.cxx b/src/PluginUtils/SizeMapPython.cxx new file mode 100644 index 0000000..e69de29 diff --git a/src/PluginUtils/SizeMapPython.h b/src/PluginUtils/SizeMapPython.h new file mode 100644 index 0000000..576fc6d --- /dev/null +++ b/src/PluginUtils/SizeMapPython.h @@ -0,0 +1 @@ +#include -- 2.39.2