diff --git a/INSTALL b/INSTALL index e07cc9976..0ea0b81cb 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1 @@ -This is the version 3.2.0a1 of SMESH -Compatible with : - - KERNEL 3.2.0a1 - - SALOMEGUI 3.2.0a1 - - GEOM 3.2.0a1 - - MED 3.2.0a1 +SALOME2 : SMESH module diff --git a/Makefile.in b/Makefile.in index f3a90dfb5..5c579e676 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,3 +1,22 @@ +# Copyright (C) 2005 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) @@ -9,12 +28,12 @@ top_srcdir=@top_srcdir@ top_builddir=. srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/bin:@top_srcdir@/resources:./bin:@top_srcdir@/idl +VPATH=.:@srcdir@:@top_srcdir@/bin:./bin/salome:./resources:@top_srcdir@/resources:./bin:@top_srcdir@/idl @COMMENCE@ -SUBDIRS = idl src doc +SUBDIRS = idl src doc adm_local RESOURCES_FILES = \ delete.png \ @@ -76,11 +95,15 @@ mesh_tree_algo.png \ mesh_tree_algo_quad.png \ mesh_tree_algo_regular.png \ mesh_tree_algo_tetra.png \ +mesh_tree_algo_netgen_2d3d.png \ +mesh_tree_algo_netgen_2d.png \ mesh_tree_hypo_area.png \ mesh_tree_hypo_length.png \ mesh_tree_hypo.png \ mesh_tree_hypo_segment.png \ mesh_tree_hypo_volume.png \ +mesh_tree_hypo_netgen.png \ +mesh_tree_hypo_netgen_2d.png \ mesh_tree_mesh.png \ mesh_tree_importedmesh.png \ mesh_tree_mesh_warn.png \ @@ -127,24 +150,41 @@ SMESH_en.xml \ SMESH.config \ StdMeshers.xml \ SMESHCatalog.xml \ +SalomeApp.xml \ mesh_pattern.png \ pattern_sample_2d.png \ pattern_sample_3D.png \ mesh_add.png \ -mesh_remove.png +mesh_remove.png \ +mesh_quad_edge.png \ +mesh_quad_triangle.png \ +mesh_quad_quadrangle.png \ +mesh_quad_tetrahedron.png \ +mesh_quad_pyramid.png \ +mesh_quad_pentahedron.png \ +mesh_quad_hexahedron.png \ +mesh_conv_to_quad.png BIN_SCRIPT= \ VERSION # copy header files in common directory -ifeq ($(HAVE_SSTREAM),yes) - include_list=include/salome/SALOMEconfig.h -else - include_list=include/salome/SALOMEconfig.h include/salome/sstream + +include_list = include/salome/SALOMEconfig.h \ + include/salome/SMESH_version.h + +ifneq ($(HAVE_SSTREAM),yes) + include_list += include/salome/sstream endif inc: idl $(include_list) +bin: bin/salome/VERSION + +bin/salome/VERSION : bin/VERSION + -$(RM) $@ + $(LN_S) ../../$< $@ + include/salome/SALOMEconfig.h: salome_adm/unix/SALOMEconfig.ref -$(RM) $@ $(LN_S) ../../$< $@ @@ -162,6 +202,10 @@ include/salome/sstream: salome_adm/unix/sstream -$(RM) $@ $(LN_S) ../../$< $@ +include/salome/SMESH_version.h: SMESH_version.h + -$(RM) $@ + $(LN_S) ../../$< $@ + depend: depend_idl depend_idl: diff --git a/adm_local/unix/config_files/check_Geom.m4 b/adm_local/unix/config_files/check_Geom.m4 deleted file mode 100644 index 13f3be40c..000000000 --- a/adm_local/unix/config_files/check_Geom.m4 +++ /dev/null @@ -1,45 +0,0 @@ -# Check availability of Geom binary distribution -# -# Author : Nicolas REJNERI (OPEN CASCADE, 2003) -# - -AC_DEFUN([CHECK_GEOM],[ - -AC_CHECKING(for Geom) - -Geom_ok=no - -AC_ARG_WITH(geom, - [ --with-geom=DIR root directory path of GEOM installation ], - GEOM_DIR="$withval",GEOM_DIR="") - -if test "x$GEOM_DIR" == "x" ; then - -# no --with-geom-dir option used - - if test "x$GEOM_ROOT_DIR" != "x" ; then - - # GEOM_ROOT_DIR environment variable defined - GEOM_DIR=$GEOM_ROOT_DIR - - fi -# -fi - -if test -f ${GEOM_DIR}/lib/salome/libGEOMClient.so ; then - Geom_ok=yes - AC_MSG_RESULT(Using Geom module distribution in ${GEOM_DIR}) - - if test "x$GEOM_ROOT_DIR" == "x" ; then - GEOM_ROOT_DIR=${GEOM_DIR} - fi - AC_SUBST(GEOM_ROOT_DIR) - -else - AC_MSG_WARN("Cannot find compiled Geom module distribution") -fi - -AC_MSG_RESULT(for Geom: $Geom_ok) - -])dnl - diff --git a/adm_local/unix/config_files/check_Med.m4 b/adm_local/unix/config_files/check_Med.m4 deleted file mode 100644 index 727bf4381..000000000 --- a/adm_local/unix/config_files/check_Med.m4 +++ /dev/null @@ -1,45 +0,0 @@ -# Check availability of Med binary distribution -# -# Author : Nicolas REJNERI (OPEN CASCADE, 2003) -# - -AC_DEFUN([CHECK_MED],[ - -AC_CHECKING(for Med) - -Med_ok=no - -AC_ARG_WITH(med, - [ --with-med=DIR root directory path of MED installation ], - MED_DIR="$withval",MED_DIR="") - -if test "x$MED_DIR" == "x" ; then - -# no --with-med-dir option used - - if test "x$MED_ROOT_DIR" != "x" ; then - - # MED_ROOT_DIR environment variable defined - MED_DIR=$MED_ROOT_DIR - - fi -# -fi - -if test -f ${MED_DIR}/idl/salome/MED.idl ; then - Med_ok=yes - AC_MSG_RESULT(Using Med module distribution in ${MED_DIR}) - - if test "x$MED_ROOT_DIR" == "x" ; then - MED_ROOT_DIR=${MED_DIR} - fi - AC_SUBST(MED_ROOT_DIR) - -else - AC_MSG_WARN("Cannot find Med module sources") -fi - -AC_MSG_RESULT(for Med: $Med_ok) - -])dnl - diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in index 5e556548e..71df45053 100644 --- a/adm_local/unix/make_commence.in +++ b/adm_local/unix/make_commence.in @@ -11,8 +11,8 @@ HAVE_SSTREAM=@HAVE_SSTREAM@ LIBS=@LIBS@ LIBSFORBIN=@LIBS@ -LDFLAGS=@LDFLAGS@ -L$(top_builddir)/lib/salome -Xlinker -rpath-link -Xlinker $(top_builddir)/lib/salome -LDFLAGSFORBIN=@LDFLAGS@ -L$(top_builddir)/lib/salome -Xlinker -rpath-link -Xlinker $(top_builddir)/lib/salome +LDFLAGS=@LDFLAGS@ -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome -Xlinker -rpath-link -Xlinker +LDFLAGSFORBIN=@LDFLAGS@ -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome -Xlinker -rpath-link -Xlinker # add libstdc++ to link c++ library with libtool ! LDFLAGS+= -lstdc++ LDFLAGSFORBIN+= -lstdc++ @@ -54,8 +54,8 @@ PYTHONHOME = @PYTHONHOME@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_VERSION = @PYTHON_VERSION@ -PYTHON_SITE = @PYTHON_SITE@ -PYTHON_SITE_INSTALL = @PYTHON_SITE_INSTALL@ +PYTHON_SITE = $(prefix)/lib@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages +PYTHON_SITE_INSTALL = $(prefix)/lib@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages/salome # QT @@ -168,6 +168,10 @@ CXXFLAGS+= $(CORBA_CXXFLAGS) #LDFLAGS+= $(CORBA_LIBS) LIBS+=$(CORBA_LIBS) +DOXYGEN = @DOXYGEN@ +DOXYGEN_WITH_PYTHON = @DOXYGEN_WITH_PYTHON@ +DOXYGEN_WITH_STL = @DOXYGEN_WITH_STL@ + ## Shared libraries LT_STATIC_EXEC=@LT_STATIC_EXEC@ DYNAMIC_DIRS=@DYNAMIC_DIRS@ @@ -188,16 +192,33 @@ INSTALL_DATA=@INSTALL_DATA@ # create a symbolic link (or a copie ?) LN_S=@LN_S@ +KERNEL_ROOT_DIR=@KERNEL_ROOT_DIR@ +KERNEL_SITE_DIR=@KERNEL_SITE_DIR@ +KERNEL_LDFLAGS=@KERNEL_LDFLAGS@ +KERNEL_CXXFLAGS=@KERNEL_CXXFLAGS@ + +GUI_ROOT_DIR=@GUI_ROOT_DIR@ +GUI_LDFLAGS=@GUI_LDFLAGS@ +GUI_CXXFLAGS=@GUI_CXXFLAGS@ + +MED_ROOT_DIR=@MED_ROOT_DIR@ +MED_LDFLAGS=@MED_LDFLAGS@ +MED_CXXFLAGS=@MED_CXXFLAGS@ + +GEOM_ROOT_DIR=@GEOM_ROOT_DIR@ +GEOM_LDFLAGS=@GEOM_LDFLAGS@ +GEOM_CXXFLAGS=@GEOM_CXXFLAGS@ + ## Installation points prefix=@prefix@ exec_prefix=@exec_prefix@ -bindir=@bindir@/salome -libdir=@libdir@/salome +bindir=@exec_prefix@/bin/salome +libdir=@exec_prefix@/lib@LIB_LOCATION_SUFFIX@/salome # warning : if user give this path in configure we could have salome/salome :-( includedir=@includedir@/salome datadir=@datadir@/salome idldir=$(prefix)/idl/salome -sharedpydir=@libdir@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules +sharedpydir=@exec_prefix@/lib@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules docdir=${prefix}/doc/salome @@ -224,7 +245,13 @@ all: Makefile: $(top_builddir)/config.status $(srcdir)/Makefile.in cd $(top_builddir) ; ./config.status -$(top_builddir)/config.status: $(top_srcdir)/configure +LOCAL_MAKE = make_commence make_conclude make_omniorb + +KERNEL_MAKE = make_module depend SALOMEconfig.h F77config.h sstream envScript + +$(top_builddir)/config.status: $(top_srcdir)/configure \ + $(LOCAL_MAKE:%=$(top_srcdir)/adm_local/unix/%.in) \ + $(KERNEL_MAKE:%=$(KERNEL_ROOT_DIR)/salome_adm/unix/%.in) cd $(top_builddir) ; ./config.status --recheck # VPATH contain $(srcdir), so make configure is good in top_srcdir and we must add target configure otherwise :-) @@ -239,15 +266,42 @@ $(top_srcdir)/configure.in: $(top_srcdir)/configure.in.base cd $(top_srcdir) && ./build_configure -ACLOCAL_SRC = \ -ac_cxx_bool.m4 check_corba.m4 check_vtk.m4 \ -ac_cxx_depend_flag.m4 check_hdf5.m4 enable_pthreads.m4 \ -ac_cxx_mutable.m4 check_mico.m4 libtool.m4 \ -ac_cxx_namespaces.m4 check_omniorb.m4 pyembed.m4 \ -ac_cxx_partial_specialization.m4 check_opengl.m4 python.m4 \ -ac_cxx_typename.m4 check_pthreads.m4 check_cas.m4 \ -ac_cc_warnings.m4 check_qt.m4 check_boost.m4 \ -check_swig.m4 +ACLOCAL_KERNEL = \ + ac_cxx_bool.m4 \ + check_corba.m4 \ + ac_cxx_depend_flag.m4 \ + check_hdf5.m4 \ + enable_pthreads.m4 \ + ac_cxx_mutable.m4 \ + check_mico.m4 \ + ac_cxx_namespaces.m4 \ + check_omniorb.m4 \ + pyembed.m4 \ + ac_cxx_partial_specialization.m4 \ + python.m4 \ + ac_cxx_typename.m4 \ + check_pthreads.m4 \ + check_cas.m4 \ + ac_cc_warnings.m4 \ + check_boost.m4 \ + check_swig.m4 -$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) - cd $(top_srcdir) ; aclocal --acdir=adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files +ACLOCAL_GUI = \ + check_vtk.m4 \ + check_opengl.m4 \ + check_qt.m4 \ + check_GUI.m4 \ + check_corba_in_GUI.m4 + +ACLOCAL_MED = check_Med.m4 +ACLOCAL_GEOM = check_GEOM.m4 + +$(top_srcdir)/aclocal.m4: $(ACLOCAL_KERNEL:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \ + $(ACLOCAL_GUI:%=@GUI_ROOT_DIR@/adm_local/unix/config_files/%) \ + $(ACLOCAL_MED:%=@MED_ROOT_DIR@/adm_local/unix/config_files/%) \ + $(ACLOCAL_GEOM:%=@GEOM_ROOT_DIR@/adm_local/unix/config_files/%) + cd $(top_srcdir) ; aclocal -I adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files \ + -I @GUI_ROOT_DIR@/adm_local/unix/config_files \ + -I @MED_ROOT_DIR@/adm_local/unix/config_files \ + -I @GEOM_ROOT_DIR@/adm_local/unix/config_files + diff --git a/adm_local/unix/make_conclude.in b/adm_local/unix/make_conclude.in index f4827fd31..37c65077f 100644 --- a/adm_local/unix/make_conclude.in +++ b/adm_local/unix/make_conclude.in @@ -35,9 +35,9 @@ LIB_OBJ_F = $(patsubst %.f, %.lo, $(filter %.f, $(LIB_SRC))) # all libtool obj file in library LIB_OBJ = $(LIB_OBJ_CXX) $(LIB_OBJ_CC) $(LIB_OBJ_C) $(LIB_CLIENT_OBJ:%.o=%.lo) $(LIB_SERVER_OBJ:%.o=%.lo) $(LIB_SWIG_OBJ) $(LIB_OBJ_F) -# LIB_BUILD = $(LIB:%.la=$(top_builddir)/lib/salome/%.la) -LIB_BUILD = $(patsubst %.la, $(top_builddir)/lib/salome/%.la, $(filter %.la, $(LIB))) -LIB_BUILD_A = $(patsubst %.a, $(top_builddir)/lib/salome/%.a, $(filter %.a, $(LIB))) +# LIB_BUILD = $(LIB:%.la=$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.la) +LIB_BUILD = $(patsubst %.la, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.la, $(filter %.la, $(LIB))) +LIB_BUILD_A = $(patsubst %.a, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.a, $(filter %.a, $(LIB))) ifneq ($(findstring cmodule.la,$(filter %.la, $(LIB))),) LIB_SWIG = $(patsubst %cmodule.la,%.so, $(filter %.la, $(LIB))) @@ -48,7 +48,7 @@ endif lib: $(LIB_BUILD) $(LIB_CLIENT_PY) # we don't build static library ! -$(LIB_BUILD): $(top_builddir)/lib/salome/%.la: %.la +$(LIB_BUILD): $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.la: %.la -$(RM) $@ -$(RM) $(patsubst %.la, %.so, $@) -$(RM) $(patsubst %.la, %.a, $@) @@ -59,10 +59,10 @@ $(LIB_BUILD): $(top_builddir)/lib/salome/%.la: %.la $(patsubst %.la, %.so, $@).0 || true if ! test -z $(LIB_SWIG) ; then \ - ln -sf $(patsubst %.la,%.so, $(CURDIR)/.libs/$<) $(top_builddir)/lib/salome/_$(LIB_SWIG) || true;\ + ln -sf $(patsubst %.la,%.so, $(CURDIR)/.libs/$<) $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/_$(LIB_SWIG) || true;\ fi; -$(LIB_BUILD_A): $(top_builddir)/lib/salome/%.a: %.a +$(LIB_BUILD_A): $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.a: %.a -$(RM) $@ ln -sf $(CURDIR)/$< $@ || true @@ -106,7 +106,7 @@ $(DEST_PYSCRIPTS): $(top_builddir)/bin/salome/%: % # copy pyqt files in $(PYTHON_SHARED_SITE) # -PYTHON_SHARED_SITE=$(top_builddir)/lib/python$(PYTHON_VERSION)/site-packages/salome/shared_modules +PYTHON_SHARED_SITE=$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules $(PYTHON_SHARED_SITE): $(INSTALL) -d $@ @@ -260,10 +260,10 @@ clean: mostlyclean -$(RM) $(LIB) $(TEST_PROGS) $(BIN) $(CLEAN) -$(RM) TAGS *~ *# core *.core -$(RM) -r .libs - -$(RM) $(top_builddir)/lib/salome/$(LIB) + -$(RM) $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB) -$(RM) $(patsubst %,$(top_builddir)/bin/salome/%, $(BIN)) - -$(RM) $(patsubst %.la, %.so, $(top_builddir)/lib/salome/$(LIB)) - -$(RM) $(patsubst %.la, %.a, $(top_builddir)/lib/salome/$(LIB)) + -$(RM) $(patsubst %.la, %.so, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB)) + -$(RM) $(patsubst %.la, %.a, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB)) # remove idl generated files (sources) -$(RM) $(LIB_CLIENT_SRC) $(LIB_SERVER_SRC) $(BIN_CLIENT_SRC) $(BIN_SERVER_SRC) # remove idl generated files (headers) diff --git a/bin/VERSION b/bin/VERSION deleted file mode 100755 index 2479b4f28..000000000 --- a/bin/VERSION +++ /dev/null @@ -1 +0,0 @@ -THIS IS SALOME - SMESH VERSION: 3.2.0a1 diff --git a/build_configure b/build_configure index b884b1757..121fb5d2a 100755 --- a/build_configure +++ b/build_configure @@ -26,6 +26,31 @@ fi # echo "failed : KERNEL_SRC variable is not correct !" # exit #fi + +######################################################################## +# Test if the GUI_ROOT_DIR is set correctly + +if test ! -d "${GUI_ROOT_DIR}"; then + echo "failed : GUI_ROOT_DIR variable is not correct !" + exit +fi + +######################################################################## +# Test if the MED_ROOT_DIR is set correctly + +if test ! -d "${MED_ROOT_DIR}"; then + echo "failed : MED_ROOT_DIR variable is not correct !" + exit +fi + +######################################################################## +# Test if the GEOM_ROOT_DIR is set correctly + +if test ! -d "${GEOM_ROOT_DIR}"; then + echo "failed : GEOM_ROOT_DIR variable is not correct !" + exit +fi + ######################################################################## # find_in - utility function # @@ -125,10 +150,10 @@ echo " ./salome_adm/unix/SALOMEconfig.h \\" >> configure.in_tmp1 echo " ./salome_adm/unix/F77config.h \\" >> configure.in_tmp1 echo " ./salome_adm/unix/sstream \\" >> configure.in_tmp1 echo " ./salome_adm/unix/depend \\" >> configure.in_tmp1 -echo " ./adm_local/unix/make_omniorb \\" >> configure.in_tmp1 +echo " ./adm_local/unix/make_omniorb:${ABS_CONF_DIR}/adm_local/unix/make_omniorb.in \\" >> configure.in_tmp1 echo " ./salome_adm/unix/envScript \\" >> configure.in_tmp1 -echo " ./adm_local/unix/make_commence \\" >> configure.in_tmp1 -echo " ./adm_local/unix/make_conclude \\" >> configure.in_tmp1 +echo " ./adm_local/unix/make_commence:${ABS_CONF_DIR}/adm_local/unix/make_commence.in \\" >> configure.in_tmp1 +echo " ./adm_local/unix/make_conclude:${ABS_CONF_DIR}/adm_local/unix/make_conclude.in \\" >> configure.in_tmp1 echo " ./salome_adm/unix/make_module \\" >> configure.in_tmp1 \rm -f configure.in_tmp2 configure.in_tmp3 @@ -203,7 +228,10 @@ else echo -n "Creating 'configure' script ... " fi -aclocal --acdir=adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files +aclocal -I adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \ + -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \ + -I ${MED_ROOT_DIR}/adm_local/unix/config_files \ + -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files if autoconf then echo "done" diff --git a/configure.in.base b/configure.in.base index d81e49771..cc915a120 100644 --- a/configure.in.base +++ b/configure.in.base @@ -22,8 +22,10 @@ AC_CANONICAL_HOST PACKAGE=salome AC_SUBST(PACKAGE) -VERSION=0.0.1 +VERSION=3.2.0 +XVERSION=0x030200 AC_SUBST(VERSION) +AC_SUBST(XVERSION) dnl dnl Initialize source and build root directories @@ -113,13 +115,7 @@ dnl AC_CXX_HAVE_SSTREAM -echo -echo --------------------------------------------- -echo BOOST Library -echo --------------------------------------------- -echo -CHECK_BOOST dnl dnl --------------------------------------------- @@ -249,6 +245,14 @@ echo CHECK_HDF5 +echo +echo --------------------------------------------- +echo BOOST Library +echo --------------------------------------------- +echo + +CHECK_BOOST + echo echo --------------------------------------------- echo Testing OpenCascade @@ -265,6 +269,26 @@ echo CHECK_HTML_GENERATORS +echo +echo --------------------------------------------- +echo Testing GUI +echo --------------------------------------------- +echo + +CHECK_SALOME_GUI + +echo +echo --------------------------------------------- +echo Testing full GUI +echo --------------------------------------------- +echo + +CHECK_CORBA_IN_GUI +if test "x${CORBA_IN_GUI}" != "xyes"; then + echo "failed : For configure SMESH module necessary full GUI !" + exit +fi + echo echo --------------------------------------------- echo Testing Kernel @@ -326,7 +350,7 @@ else fi # make other build directories -for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources idl +for rep in salome_adm adm_local doc bin/salome include/salome lib${LIB_LOCATION_SUFFIX}/salome share/salome/resources idl do # if test ! -d $rep ; then # eval mkdir $rep diff --git a/doc/Makefile.in b/doc/Makefile.in index 7295ede75..af9e2aae5 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,3 +1,22 @@ +# Copyright (C) 2005 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 *- # @@ -19,6 +38,17 @@ docs: @@SETX@; for d in $(SUBDIRS); do \ (cd $$d && $(MAKE) $@) || exit 1; \ done + +usr_docs: + @@SETX@; for d in $(SUBDIRS); do \ + (cd $$d && $(MAKE) $@) || exit 1; \ + done + +dev_docs: + @@SETX@; for d in $(SUBDIRS); do \ + (cd $$d && $(MAKE) $@) || exit 1; \ + done + clean: @@SETX@; for d in $(SUBDIRS); do \ (cd $$d && $(MAKE) $@) || exit 1; \ diff --git a/doc/salome/AddNetgenInSalome2.pdf b/doc/salome/AddNetgenInSalome2.pdf index 34fd25204..d736a6ded 100644 Binary files a/doc/salome/AddNetgenInSalome2.pdf and b/doc/salome/AddNetgenInSalome2.pdf differ diff --git a/doc/salome/Makefile.in b/doc/salome/Makefile.in index bd9a4eab5..4106d1ad3 100644 --- a/doc/salome/Makefile.in +++ b/doc/salome/Makefile.in @@ -1,3 +1,22 @@ +# Copyright (C) 2005 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 *- # @@ -12,33 +31,48 @@ srcdir=@srcdir@ VPATH=.:@srcdir@ SUBDIRS= tui gui +SUBDIRSTUI= tui +SUBDIRSGUI= gui @COMMENCE@ -docs: - @@SETX@; for d in $(SUBDIRS); do \ +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; \ - cp -f $(srcdir)/SMESH_index_v3.1.0.html SMESH_index_v3.1.0.html clean: @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ + if test -d $$d/SMESH; then \ + (cd $$d && $(MAKE) $@) || exit 1; \ + fi; \ done distclean: clean @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ + if test -d $$d/SMESH; then \ + (cd $$d && $(MAKE) $@) || exit 1; \ + fi; \ done install: $(MAKE) docs - (cd tui && $(MAKE) install); - (cd gui && $(MAKE) install); - cp -f SMESH_index_v3.1.0.html $(docdir) + @@SETX@; for d in $(SUBDIRS); do \ + if test -d $$d/SMESH; then \ + (cd $$d && $(MAKE) $@); \ + fi; \ + done uninstall: @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ + if test -d $$d/SMESH; then \ + (cd $$d && $(MAKE) $@) || exit 1; \ + fi; \ done; \ - rm -fr $(docdir)/SMESH_index_v3.1.0.html diff --git a/doc/salome/SMESH_index_v3.1.0.html b/doc/salome/SMESH_index_v3.1.0.html deleted file mode 100644 index 8d4ef121a..000000000 --- a/doc/salome/SMESH_index_v3.1.0.html +++ /dev/null @@ -1,95 +0,0 @@ - - -
- - - - -![]() |
- - - - | -
-
You can get information about your mesh, change its presentation parameters - and access to other useful functionalities by right-clicking on it in - the Object Browser.
- -Then the - following pop-up menu appears:
- -- -
- -
The Update button refreshes the presentation of your mesh in the Object - Browser, applying all recent changes.
- -By clicking on Standard Mesh Infos - and Advanced Mesh - Infos you can learn the Mesh - Infos.
- -Via Numbering - you can - display the ID numbers of all meshing elements or nodes composing your - mesh in the viewer.
- -Via Display Mode, Display - Entity, Colors - / Size, and Transparency - you can change the way of presentation of your mesh.
- -In the Clipping menu you can create - cross-sections of the selected objects.
- -Quality Controls are described in - the next chapter.
- -By clicking on Display Only - you hide all other objects.
- -The Erase button deletes the - selected object from the session.
- -Using the Change background - button you can set the background color. By default it is black.
- -- -
See Also - a sample TUI Script of a Viewing Mesh Infos - operation.
- -- - - - + + + + + +
After definition of algorithms and hypotheses a new mesh is listed in
+ the Object Browser. Right-click on it and select Compute - the mesh will be automatically
+ displayed in the VTK
+ 3D Viewer. Alternatively click
+ Display only to hide all other objects at the same time.
+ +
After the mesh has appeared in the Viewer, you can select it with left + mouse click and get + information about it, change its presentation parameters and access to + other useful options by right-clicking on the selected mesh.
+ ++ +
+ +
Erase all + - allows + to hide all objects in the viewer
Update + - refreshes the presentation of your mesh in the Object Browser, applying + all recent changes.
Advanced Mesh Infos + - provides + more detailed information about the mesh.
Standard + Mesh Infos - provides basic information + about the mesh.
Numbering + - allows + to display the ID numbers of all meshing elements or nodes composing your + mesh in the viewer.
Display + Mode - allows to select between + Wireframe, Shading and Nodes presentation.
Display Entity + - allows to display Faces, Edges or both.
Colors / Size + - allows to select color and size of meshes.
Transparency + - allows to change the transparency of mesh elements.
Clipping - allows + to create cross-sections of the selected objects.
Quality Controls + - graphically presents various information about meshes.
Erase + - allows to hide the selected mesh from the viewer.
Display Only + -allows to display only the selected mesh, hiding all other from the viewer.
Dump view + - exports an object from the viewer in bmp, png, jpg or jpeg image format. +
Change background + - allows to redefine the background color. By default it is black.
+ + + + diff --git a/doc/salome/gui/SMESH/adding_quadratic_nodes_and_elements.htm b/doc/salome/gui/SMESH/adding_quadratic_nodes_and_elements.htm index 86db2586e..b4d5067d2 100755 --- a/doc/salome/gui/SMESH/adding_quadratic_nodes_and_elements.htm +++ b/doc/salome/gui/SMESH/adding_quadratic_nodes_and_elements.htm @@ -1,124 +1,124 @@ - - - - - -
MESH modules allows you to work with Quadratic - Elements.
- -Quadratic Edge in not a straight but a broken line and can be defined - by three points: first, middle and last. All more complex Quadratic - Elements differ from ordinary ones in that they consist of Quadratic - Edges.
- -To - add a quadratic element to your mesh:
- -1. Select your mesh in the Object Browser - or in the 3D viewer.
- -2. From the Modification - menu choose the Add item - and select one of the following:
- -To create any Quadratic - Element specify the nodes which will form your triangle by selecting - them in the 3D viewer with pressed Shift button. Their numbers will appear - in the dialog box as Corner Nodes - (alternatively you can just input numbers in this field without selection).The - edges formed by the corner nodes will appear in the table. To define the - middle nodes for each edge double-click on the respective field and input - the number of the node. All edges and the object formed by them will be - displayed in the Object browser. When all edges are defined you will be - able to click OK or Apply - button to add the element to the mesh.
- -
Reverse - button for Quadratic Edges switches the first and the last nodes. For all other elements it reverses the element. -
- -- - - - + + + + + +
MESH modules allows you to work with Quadratic + Elements.
+ +Quadratic Edge in not a straight but a broken line and can be defined + by three points: first, middle and last. All more complex Quadratic + Elements differ from ordinary ones in that they consist of Quadratic + Edges.
+ +To + add a quadratic element to your mesh:
+ +1. Select your mesh in the Object Browser + or in the 3D viewer.
+ +2. From the Modification + menu choose the Add item + and select one of the following:
+ +To create any Quadratic + Element specify the nodes which will form your triangle by selecting + them in the 3D viewer with pressed Shift button. Their numbers will appear + in the dialog box as Corner Nodes + (alternatively you can just input numbers in this field without selection).The + edges formed by the corner nodes will appear in the table. To define the + middle nodes for each edge double-click on the respective field and input + the number of the node. All edges and the object formed by them will be + displayed in the Object browser. When all edges are defined you will be + able to click OK or Apply + button to add the element to the mesh.
+ +
Reverse + button for Quadratic Edges switches the first and the last nodes. For all other elements it reverses the element. +
+ ++ + + + diff --git a/doc/salome/gui/SMESH/aspect_ratio_3d.htm b/doc/salome/gui/SMESH/aspect_ratio_3d.htm index 20573a1fd..bd1d7ddfc 100755 --- a/doc/salome/gui/SMESH/aspect_ratio_3d.htm +++ b/doc/salome/gui/SMESH/aspect_ratio_3d.htm @@ -1,163 +1,203 @@ - - - - - -
- -
This mesh quality criterion resembles to the Aspect ratio
- criterion, however, it is applied to 3D mesh elements: tetrahedrons,
- pentahedrons, hexahedrons, etc.
There are simple formulas to evaluate directly the value of quality - Qk for simplex in 3D. The formulas are :
- -• For tetrahedron :
- -
where :
- -
To calculate Sk , it is needed to sum the area of each of the 3 faces - with the formula given with the triangle.
- -- -
For the other types of element like pentahedron and hexahedron - the formula is the following :
- -
Where Qi are the quality of all the possible simplex (of same dimension - as the element) that compose the element.
- -For example, hexahedron is analysed via 6 tetrahedrons this way:
- -
- -
For 3D elements with quadrangular faces, aspect ratio of such faces -is also analysed and the maximal one over 3D and 2D qualities is taken.
- -- -
- -
See Also - a sample TUI Script of an Aspect - Ratio quality control operation.
- -- -
- -
- -
- - - - + + + + + +
+ +
The Aspect Ratio 3D mesh quality criterion calculates
+ the same parameter as the Aspect ratio
+ criterion, but it is applied to 3D mesh elements: tetrahedrons, pentahedrons,
+ hexahedrons, etc.
+ +
The Aspect
+ Ratio of a tetrahedron
+ 3D element is calculated by the formula:
+ +
+ +
,
+ +
where SK is the sum of surfaces of the faces + of К and VK is the volume of К :
+ ++ +
T
+ +
Other element types like quadrangle, pentahedron + and hexahedron use the following formula:
, where Qi represents the value of Qk for all possible simplexes (of the
+ same dimension as the element) that compose the element.
For example, a hexahedron is split in 6 tetrahedrons, the Aspect + ratio 3D is calculated for each of them, then the greatest Qk is considered to be the Aspect ratio 3D + criterion for the whole hexahedron.
+ ++ +
To apply the Aspect Ratio 3D quality criterion to your mesh:
+ ++ +
1. Display your mesh in the viewer.
+ ++ +
2. Choose Controls
+ > Aspect Ratio 3D or click button of the toolbar.
+ Your mesh will be displayed in the viewer with its elements colored according
+ to the applied mesh quality control criterion:
+ +
See Also + a sample TUI Script of an Aspect + Ratio 3D quality control operation.
+ ++ +
+ +
+ +
+ + + + diff --git a/doc/salome/gui/SMESH/borders_at_multi-connection.htm b/doc/salome/gui/SMESH/borders_at_multi-connection.htm index cba301b96..8ad86b523 100755 --- a/doc/salome/gui/SMESH/borders_at_multi-connection.htm +++ b/doc/salome/gui/SMESH/borders_at_multi-connection.htm @@ -1,115 +1,121 @@ - - - - - -
This mesh quality control highlights borders of faces
- consisting of edges belonging to several faces. The amount of faces is
- specified by user.
- -
- -
In this picture the borders at multi-connection are displayed in white.
- -- -
See Also - a sample TUI Script of a Borders - at Multi-Connection quality control operation.
- -- - - - + + + + + +
This mesh quality control highlights borders of faces
+ consisting of edges belonging to several faces. The amount of faces is
+ specified by user.
+ +
+ +
In this picture the borders at multi-connection are displayed in blue.
+ ++ +
See Also + a sample TUI Script of a Borders + at Multi-Connection quality control operation.
+ ++ + + + diff --git a/doc/salome/gui/SMESH/borders_at_multiconnection_2d.htm b/doc/salome/gui/SMESH/borders_at_multiconnection_2d.htm index 9587602aa..2e9e180c0 100755 --- a/doc/salome/gui/SMESH/borders_at_multiconnection_2d.htm +++ b/doc/salome/gui/SMESH/borders_at_multiconnection_2d.htm @@ -1,110 +1,115 @@ - - - - - -
This mesh quality control highlights borders of elements
- of mesh, consisting of edges belonging to several elements of mesh.
- -
- -
See Also - a sample TUI Script of a Borders - at Multi-Connection quality control operation.
- -- - - - + + + + + +
This mesh quality control highlights borders of elements
+ of mesh, consisting of edges belonging to several elements of mesh.
+ +
+ +
See Also + a sample TUI Script of a Borders + at Multi-Connection quality control operation.
+ ++ + + + diff --git a/doc/salome/gui/SMESH/clipping.htm b/doc/salome/gui/SMESH/clipping.htm index 8652fd75f..dec479c99 100755 --- a/doc/salome/gui/SMESH/clipping.htm +++ b/doc/salome/gui/SMESH/clipping.htm @@ -1,133 +1,140 @@ - - - - - -
Using this menu you can create cross-section views (clipping planes) - of your mesh.
- -- -
To start, click on the New button.
- -- -
- -
Now you can define the parameters of your cross-section: Orientation - (X-Y, X-Z - or Y-Z); Distance between the - opposite extremities of the object, if - it is set to 0.5 the object is split in two halves; and Rotation - (in angle degrees) around X (Y to Z) - and around Y (X to Z). - If the Show preview button is - on, you can see the clipping plane in the Object - window.
- -- -
- -
If the - Auto Apply button is on, you can preview - the cross-section in the Object window
- -- -
- -
To get - a new object from Clipping, click - Ok.
- -- -
- - - - + + + + + +
Using this menu you can create cross-section views (clipping planes) + of your mesh.
+ ++ +
To start, click on the New button.
+ ++ +
+ +
Now you can define the parameters of your cross-section: Orientation + (X-Y, X-Z + or Y-Z); Distance between the + opposite extremities of the object, if + it is set to 0.5 the object is split in two halves; and Rotation + (in angle degrees) around X (Y to Z) + and around Y (X to Z). + If the Show preview button is + on, you can see the clipping plane in the Object + window.
+ ++ +
+ +
If the + Auto Apply button is on, you can preview + the cross-section in the Object window
+ ++ +
+ +
To get + a new object from Clipping, click + Ok.
+ ++ +
+ + + + diff --git a/doc/salome/gui/SMESH/constructing_meshes.htm b/doc/salome/gui/SMESH/constructing_meshes.htm index 78d8030db..90d82bffc 100755 --- a/doc/salome/gui/SMESH/constructing_meshes.htm +++ b/doc/salome/gui/SMESH/constructing_meshes.htm @@ -1,727 +1,732 @@ - - - - - -
import salome
- -import geompy
- -import StdMeshers
- -smesh = salome.lcc.FindOrLoadComponent("FactoryServer", - "SMESH")
- -smeshgui = salome.ImportComponentGUI("SMESH")
- -smeshgui.Init(salome.myStudyId);
- -- -
# create a box
- -box = geompy.MakeBox(0., - 0., 0., 100., 200., 300.)
- -- -
# add box to the study
- -idbox = geompy.addToStudy(box, - "box")
- -- -
# create a hypothesis
- -print "-------------------------- - create Hypothesis"
- -print "-------------------------- - NumberOfSegments"
- -numberOfSegments - = 7
- -hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", - "libStdMeshersEngine.so")
- -hypNbSeg.SetNumberOfSegments(numberOfSegments)
- -print hypNbSeg.GetName()
- -print hypNbSeg.GetId()
- -print hypNbSeg.GetNumberOfSegments()
- -smeshgui.SetName(salome.ObjectToID(hypNbSeg), - "NumberOfSegments_10")
- -print "-------------------------- - MaxElementArea"
- -maxElementArea = - 800
- -hypArea = smesh.CreateHypothesis("MaxElementArea", - "libStdMeshersEngine.so")
- -hypArea.SetMaxElementArea(maxElementArea)
- -print hypArea.GetName()
- -print hypArea.GetId()
- -print hypArea.GetMaxElementArea()
- -smeshgui.SetName(salome.ObjectToID(hypArea), - "MaxElementArea_500")
- -print "-------------------------- - MaxElementVolume"
- -maxElementVolume - = 900
- -hypVolume = smesh.CreateHypothesis("MaxElementVolume", - "libStdMeshersEngine.so")
- -hypVolume.SetMaxElementVolume(maxElementVolume)
- -print hypVolume.GetName()
- -print hypVolume.GetId()
- -print hypVolume.GetMaxElementVolume()
- -smeshgui.SetName(salome.ObjectToID(hypVolume), - "MaxElementVolume_500")
- -- -
# create algorithms
- -print "-------------------------- - create Algorithms"
- -print "-------------------------- - Regular_1D"
- -regular1D = smesh.CreateHypothesis("Regular_1D", - "libStdMeshersEngine.so")
- -smeshgui.SetName(salome.ObjectToID(regular1D), - "Wire Discretisation")
- -print "-------------------------- - MEFISTO_2D"
- -mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", - "libStdMeshersEngine.so")
- -smeshgui.SetName(salome.ObjectToID(mefisto2D), - "MEFISTO_2D")
- -- -
# initialize a mesh with - the box
- -mesh = smesh.CreateMesh(box)
- -smeshgui.SetName(salome.ObjectToID(mesh), - "MeshBox")
- -- -
# add the hypothesis to - the box
- -print "-------------------------- - add hypothesis to the box"
- -mesh.AddHypothesis(box,hypNbSeg)
- -mesh.AddHypothesis(box,hypArea)
- -mesh.AddHypothesis(box,hypVolume)
- -mesh.AddHypothesis(box,regular1D)
- -mesh.AddHypothesis(box,mefisto2D)
- -- -
# compute the mesh
- -print "-------------------------- - compute the mesh of the box"
- -ret = smesh.Compute(mesh,box)
- -print ret
- -if ret == 0:
- -print - "probleme when computing the mesh"
- -salome.sg.updateObjBrowser(1)
- -- -
- -
from - geompy import *
- -import smesh
- -- -
# create vertices
- -Point111 = MakeVertex( 0, 0, - 0)
- -Point211 = MakeVertex(10, 0, - 0)
- -Point121 = MakeVertex( 0, 10, 0)
- -Point221 = MakeVertex(10, 10, 0)
- -Point112 = MakeVertex( 0, 0, - 10)
- -Point212 = MakeVertex(10, 0, - 10)
- -Point122 = MakeVertex( 0, 10, 10)
- -Point222 = MakeVertex(10, 10, 10)
- -- -
# create edges
- -EdgeX111 = MakeEdge(Point111, Point211)
- -EdgeX121 = MakeEdge(Point121, Point221)
- -EdgeX112 = MakeEdge(Point112, Point212)
- -EdgeX122 = MakeEdge(Point122, Point222)
- -EdgeY11 = MakeEdge(Point111, Point121)
- -EdgeY21 = MakeEdge(Point211, Point221)
- -EdgeY12 = MakeEdge(Point112, Point122)
- -EdgeY22 = MakeEdge(Point212, Point222)
- -EdgeZ111 = MakeEdge(Point111, Point112)
- -EdgeZ211 = MakeEdge(Point211, Point212)
- -EdgeZ121 = MakeEdge(Point121, Point122)
- -EdgeZ221 = MakeEdge(Point221, Point222)
- -- -
# create faces
- -FaceX11 = MakeQuad(EdgeY11, EdgeZ111, - EdgeY12, EdgeZ121)
- -FaceX21 = MakeQuad(EdgeY21, EdgeZ211, - EdgeY22, EdgeZ221)
- -FaceY111 = MakeQuad(EdgeX111, EdgeZ111, - EdgeX112, EdgeZ211)
- -FaceY121 = MakeQuad(EdgeX121, EdgeZ121, - EdgeX122, EdgeZ221)
- -FaceZ11 = MakeQuad(EdgeX111, EdgeY11, - EdgeX121, EdgeY21)
- -FaceZ12 = MakeQuad(EdgeX112, EdgeY12, - EdgeX122, EdgeY22)
- -- -
# create a solid
- -Block = MakeHexa(FaceX11, FaceX21, FaceY111, - FaceY121, FaceZ11, FaceZ12)
- -- -
# create a compound
- -box = MakeCompound([Block])
- -- -
# add in the study
- -box_id = addToStudy(box, "Box compound")
- -- -
# create hexahedral mesh - on the box
- -hexa = smesh.Mesh(box, "Box compound - : hexahedrical mesh")
- -algo = hexa.Segment()
- -- -
# define "NumberOfSegments" - hypothesis to cut the edge in a fixed number of segments
- -algo.NumberOfSegments(4)
- -- -
# creates a quadrangle - 2D algorithm for the faces
- -hexa.Quadrangle()
- -- -
# construct a submesh with - a local hypothesis
- -algo = hexa.Segment(EdgeX111)
- -- -
# define "Arithmetic1D" - hypothesis to cut an edge in several segments with increasing arithmetic - length
- -algo.Arithmetic1D(1, 4)
- -- -
# define "Propagation" - hypothesis that propagates all other hypothesis on all edges on the opposite - side in case of quadrangular faces
- -algo.Propagation()
- -- -
# compute the mesh
- -hexa.Compute() )
- -- -
- -
import - salome
- -import geompy
- -import SMESH
- -import StdMeshers
- -- -
smesh = salome.lcc.FindOrLoadComponent("FactoryServer", - "SMESH")
- -smesh.SetCurrentStudy(salome.myStudy)
- -- -
box = - geompy.MakeBox(0., 0., 0., 20., 20., 20.)
- -idbox = geompy.addToStudy(box, "box")
- -- -
subShapeList = geompy.SubShapeAll(box, - geompy.ShapeType["EDGE"])
- -edge = - subShapeList[0]
- -name = - geompy.SubShapeName(edge, box)
- -idedge = geompy.addToStudyInFather(box, - edge, name)
- -- -
box = - salome.IDToObject(idbox)
- -edge = salome.IDToObject(idedge)
- -- -
hyp1 = smesh.CreateHypothesis("NumberOfSegments", - "libStdMeshersEngine.so")
- -hyp1.SetNumberOfSegments(3)
- -hyp2 = smesh.CreateHypothesis("MaxElementArea", - "libStdMeshersEngine.so")
- -hyp2.SetMaxElementArea(10)
- -hyp3 = smesh.CreateHypothesis("Arithmetic1D", - "libStdMeshersEngine.so")
- -hyp3.SetLength(1,1)
- -hyp3.SetLength(6,0)
- -hyp4 = smesh.CreateHypothesis("Propagation", - "libStdMeshersEngine.so")
- -- -
algo1 = smesh.CreateHypothesis("Regular_1D", - "libStdMeshersEngine.so")
- -algo2 = smesh.CreateHypothesis("MEFISTO_2D", - "libStdMeshersEngine.so")
- -- -
mesh = smesh.CreateMesh(box)
- -mesh.AddHypothesis(box,hyp1)
- -mesh.AddHypothesis(box,hyp2)
- -mesh.AddHypothesis(box,algo1)
- -mesh.AddHypothesis(box,algo2)
- -mesh.AddHypothesis(edge,hyp3)
- -mesh.AddHypothesis(edge,hyp4)
- -mesh.AddHypothesis(edge,algo1)
- -- -
smesh.Compute(mesh,box)
- -salome.sg.updateObjBrowser(1)
- -- -
# remove a hypothesis
- -mesh.RemoveHypothesis(edge,hyp4)
- -- -
smesh.Compute(mesh,box)
- -salome.sg.updateObjBrowser(1)
- -- -
# change the value - of the hypothesis
- -hyp2.SetMaxElementArea(2)
- -mesh.AddHypothesis(box,hyp2)
- -- -
smesh.Compute(mesh,box)
- -salome.sg.updateObjBrowser(1)
- -- -
- -
import - salome
- -import geompy
- -import StdMeshers
- -smesh = salome.lcc.FindOrLoadComponent("FactoryServer", - "SMESH")
- -smeshgui = salome.ImportComponentGUI("SMESH")
- -smeshgui.Init(salome.myStudyId);
- -- -
# create a box
- -box = geompy.MakeBox(0., - 0., 0., 100., 200., 300.)
- -- -
# add the box to the study
- -idbox = geompy.addToStudy(box, - "box")
- -- -
# create a hypothesis
- -print "-------------------------- - create Hypothesis"
- -print "-------------------------- - NumberOfSegments"
- -numberOfSegments - = 7
- -hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", - "libStdMeshersEngine.so")
- -hypNbSeg.SetNumberOfSegments(numberOfSegments)
- -print hypNbSeg.GetName()
- -print hypNbSeg.GetId()
- -print hypNbSeg.GetNumberOfSegments()
- -smeshgui.SetName(salome.ObjectToID(hypNbSeg), - "NumberOfSegments_10")
- -print "-------------------------- - MaxElementArea"
- -maxElementArea = - 800
- -hypArea = smesh.CreateHypothesis("MaxElementArea", - "libStdMeshersEngine.so")
- -hypArea.SetMaxElementArea(maxElementArea)
- -print hypArea.GetName()
- -print hypArea.GetId()
- -print hypArea.GetMaxElementArea()
- -smeshgui.SetName(salome.ObjectToID(hypArea), - "MaxElementArea_500")
- -print "-------------------------- - MaxElementVolume"
- -maxElementVolume - = 900
- -hypVolume = smesh.CreateHypothesis("MaxElementVolume", - "libStdMeshersEngine.so")
- -hypVolume.SetMaxElementVolume(maxElementVolume)
- -print hypVolume.GetName()
- -print hypVolume.GetId()
- -print hypVolume.GetMaxElementVolume()
- -smeshgui.SetName(salome.ObjectToID(hypVolume), - "MaxElementVolume_500")
- -- -
# create algorithms
- -print "-------------------------- - create Algorithms"
- -print "-------------------------- - Regular_1D"
- -regular1D = smesh.CreateHypothesis("Regular_1D", - "libStdMeshersEngine.so")
- -smeshgui.SetName(salome.ObjectToID(regular1D), - "Wire Discretisation")
- -print "-------------------------- - MEFISTO_2D"
- -mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", - "libStdMeshersEngine.so")
- -smeshgui.SetName(salome.ObjectToID(mefisto2D), - "MEFISTO_2D")
- -- -
# initialize a mesh with - the box
- -mesh = smesh.CreateMesh(box)
- -smeshgui.SetName(salome.ObjectToID(mesh), - "MeshBox")
- -- -
# add the hypothesis to - the box
- -print "-------------------------- - add hypothesis to the box"
- -mesh.AddHypothesis(box,hypNbSeg)
- -mesh.AddHypothesis(box,hypArea)
- -mesh.AddHypothesis(box,hypVolume)
- -mesh.AddHypothesis(box,regular1D)
- -mesh.AddHypothesis(box,mefisto2D)
- -- -
# compute the mesh
- -print "-------------------------- - compute the mesh of the box"
- -ret = smesh.Compute(mesh,box)
- -print ret
- -if ret == 0:
- -print - "probleme when computing the mesh"
- -salome.sg.updateObjBrowser(1)
- -mesh.ExportMED("/tmp/meshMED.med",0)
- -- -
- - - - + + + + + +
import salome
+ +import geompy
+ +import StdMeshers
+ +smesh = salome.lcc.FindOrLoadComponent("FactoryServer", + "SMESH")
+ +smeshgui = salome.ImportComponentGUI("SMESH")
+ +smeshgui.Init(salome.myStudyId);
+ ++ +
# create a box
+ +box = geompy.MakeBox(0., + 0., 0., 100., 200., 300.)
+ ++ +
# add box to the study
+ +idbox = geompy.addToStudy(box, + "box")
+ ++ +
# create a hypothesis
+ +print "-------------------------- + create Hypothesis"
+ +print "-------------------------- + NumberOfSegments"
+ +numberOfSegments + = 7
+ +hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", + "libStdMeshersEngine.so")
+ +hypNbSeg.SetNumberOfSegments(numberOfSegments)
+ +print hypNbSeg.GetName()
+ +print hypNbSeg.GetId()
+ +print hypNbSeg.GetNumberOfSegments()
+ +smeshgui.SetName(salome.ObjectToID(hypNbSeg), + "NumberOfSegments_10")
+ +print "-------------------------- + MaxElementArea"
+ +maxElementArea = + 800
+ +hypArea = smesh.CreateHypothesis("MaxElementArea", + "libStdMeshersEngine.so")
+ +hypArea.SetMaxElementArea(maxElementArea)
+ +print hypArea.GetName()
+ +print hypArea.GetId()
+ +print hypArea.GetMaxElementArea()
+ +smeshgui.SetName(salome.ObjectToID(hypArea), + "MaxElementArea_500")
+ +print "-------------------------- + MaxElementVolume"
+ +maxElementVolume + = 900
+ +hypVolume = smesh.CreateHypothesis("MaxElementVolume", + "libStdMeshersEngine.so")
+ +hypVolume.SetMaxElementVolume(maxElementVolume)
+ +print hypVolume.GetName()
+ +print hypVolume.GetId()
+ +print hypVolume.GetMaxElementVolume()
+ +smeshgui.SetName(salome.ObjectToID(hypVolume), + "MaxElementVolume_500")
+ ++ +
# create algorithms
+ +print "-------------------------- + create Algorithms"
+ +print "-------------------------- + Regular_1D"
+ +regular1D = smesh.CreateHypothesis("Regular_1D", + "libStdMeshersEngine.so")
+ +smeshgui.SetName(salome.ObjectToID(regular1D), + "Wire Discretisation")
+ +print "-------------------------- + MEFISTO_2D"
+ +mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", + "libStdMeshersEngine.so")
+ +smeshgui.SetName(salome.ObjectToID(mefisto2D), + "MEFISTO_2D")
+ ++ +
# initialize a mesh with + the box
+ +mesh = smesh.CreateMesh(box)
+ +smeshgui.SetName(salome.ObjectToID(mesh), + "MeshBox")
+ ++ +
# add the hypothesis to + the box
+ +print "-------------------------- + add hypothesis to the box"
+ +mesh.AddHypothesis(box,hypNbSeg)
+ +mesh.AddHypothesis(box,hypArea)
+ +mesh.AddHypothesis(box,hypVolume)
+ +mesh.AddHypothesis(box,regular1D)
+ +mesh.AddHypothesis(box,mefisto2D)
+ ++ +
# compute the mesh
+ +print "-------------------------- + compute the mesh of the box"
+ +ret = smesh.Compute(mesh,box)
+ +print ret
+ +if ret == 0:
+ +print + "probleme when computing the mesh"
+ +salome.sg.updateObjBrowser(1)
+ ++ +
+ +
from + geompy import *
+ +import smesh
+ ++ +
# create vertices
+ +Point111 = MakeVertex( 0, 0, + 0)
+ +Point211 = MakeVertex(10, 0, + 0)
+ +Point121 = MakeVertex( 0, 10, 0)
+ +Point221 = MakeVertex(10, 10, 0)
+ +Point112 = MakeVertex( 0, 0, + 10)
+ +Point212 = MakeVertex(10, 0, + 10)
+ +Point122 = MakeVertex( 0, 10, 10)
+ +Point222 = MakeVertex(10, 10, 10)
+ ++ +
# create edges
+ +EdgeX111 = MakeEdge(Point111, Point211)
+ +EdgeX121 = MakeEdge(Point121, Point221)
+ +EdgeX112 = MakeEdge(Point112, Point212)
+ +EdgeX122 = MakeEdge(Point122, Point222)
+ +EdgeY11 = MakeEdge(Point111, Point121)
+ +EdgeY21 = MakeEdge(Point211, Point221)
+ +EdgeY12 = MakeEdge(Point112, Point122)
+ +EdgeY22 = MakeEdge(Point212, Point222)
+ +EdgeZ111 = MakeEdge(Point111, Point112)
+ +EdgeZ211 = MakeEdge(Point211, Point212)
+ +EdgeZ121 = MakeEdge(Point121, Point122)
+ +EdgeZ221 = MakeEdge(Point221, Point222)
+ ++ +
# create faces
+ +FaceX11 = MakeQuad(EdgeY11, EdgeZ111, + EdgeY12, EdgeZ121)
+ +FaceX21 = MakeQuad(EdgeY21, EdgeZ211, + EdgeY22, EdgeZ221)
+ +FaceY111 = MakeQuad(EdgeX111, EdgeZ111, + EdgeX112, EdgeZ211)
+ +FaceY121 = MakeQuad(EdgeX121, EdgeZ121, + EdgeX122, EdgeZ221)
+ +FaceZ11 = MakeQuad(EdgeX111, EdgeY11, + EdgeX121, EdgeY21)
+ +FaceZ12 = MakeQuad(EdgeX112, EdgeY12, + EdgeX122, EdgeY22)
+ ++ +
# create a solid
+ +Block = MakeHexa(FaceX11, FaceX21, FaceY111, + FaceY121, FaceZ11, FaceZ12)
+ ++ +
# create a compound
+ +box = MakeCompound([Block])
+ ++ +
# add in the study
+ +box_id = addToStudy(box, "Box compound")
+ ++ +
# create hexahedral mesh + on the box
+ +hexa = smesh.Mesh(box, "Box compound + : hexahedrical mesh")
+ +algo = hexa.Segment()
+ ++ +
# define "NumberOfSegments" + hypothesis to cut the edge in a fixed number of segments
+ +algo.NumberOfSegments(4)
+ ++ +
# creates a quadrangle + 2D algorithm for the faces
+ +hexa.Quadrangle()
+ ++ +
# construct a submesh with + a local hypothesis
+ +algo = hexa.Segment(EdgeX111)
+ ++ +
# define "Arithmetic1D" + hypothesis to cut an edge in several segments with increasing arithmetic + length
+ +algo.Arithmetic1D(1, 4)
+ ++ +
# define "Propagation" + hypothesis that propagates all other hypothesis on all edges on the opposite + side in case of quadrangular faces
+ +algo.Propagation()
+ ++ +
# compute the mesh
+ +hexa.Compute()
+ ++ +
+ +
import + salome
+ +import geompy
+ +import SMESH
+ +import StdMeshers
+ ++ +
smesh = salome.lcc.FindOrLoadComponent("FactoryServer", + "SMESH")
+ +smesh.SetCurrentStudy(salome.myStudy)
+ ++ +
box = + geompy.MakeBox(0., 0., 0., 20., 20., 20.)
+ +idbox = geompy.addToStudy(box, "box")
+ ++ +
subShapeList = geompy.SubShapeAll(box, + geompy.ShapeType["EDGE"])
+ +edge = + subShapeList[0]
+ +name = + geompy.SubShapeName(edge, box)
+ +idedge = geompy.addToStudyInFather(box, + edge, name)
+ ++ +
box = + salome.IDToObject(idbox)
+ +edge = salome.IDToObject(idedge)
+ ++ +
hyp1 = smesh.CreateHypothesis("NumberOfSegments", + "libStdMeshersEngine.so")
+ +hyp1.SetNumberOfSegments(3)
+ +hyp2 = smesh.CreateHypothesis("MaxElementArea", + "libStdMeshersEngine.so")
+ +hyp2.SetMaxElementArea(10)
+ +hyp3 = smesh.CreateHypothesis("Arithmetic1D", + "libStdMeshersEngine.so")
+ +hyp3.SetLength(1,1)
+ +hyp3.SetLength(6,0)
+ +hyp4 = smesh.CreateHypothesis("Propagation", + "libStdMeshersEngine.so")
+ ++ +
algo1 = smesh.CreateHypothesis("Regular_1D", + "libStdMeshersEngine.so")
+ +algo2 = smesh.CreateHypothesis("MEFISTO_2D", + "libStdMeshersEngine.so")
+ ++ +
mesh = smesh.CreateMesh(box)
+ +mesh.AddHypothesis(box,hyp1)
+ +mesh.AddHypothesis(box,hyp2)
+ +mesh.AddHypothesis(box,algo1)
+ +mesh.AddHypothesis(box,algo2)
+ +mesh.AddHypothesis(edge,hyp3)
+ +mesh.AddHypothesis(edge,hyp4)
+ +mesh.AddHypothesis(edge,algo1)
+ ++ +
smesh.Compute(mesh,box)
+ +salome.sg.updateObjBrowser(1)
+ ++ +
# remove a hypothesis
+ +mesh.RemoveHypothesis(edge,hyp4)
+ ++ +
smesh.Compute(mesh,box)
+ +salome.sg.updateObjBrowser(1)
+ ++ +
# change the value + of the hypothesis
+ +hyp2.SetMaxElementArea(2)
+ +mesh.AddHypothesis(box,hyp2)
+ ++ +
smesh.Compute(mesh,box)
+ +salome.sg.updateObjBrowser(1)
+ ++ +
+ +
import + salome
+ +import geompy
+ +import StdMeshers
+ +smesh = salome.lcc.FindOrLoadComponent("FactoryServer", + "SMESH")
+ +smeshgui = salome.ImportComponentGUI("SMESH")
+ +smeshgui.Init(salome.myStudyId);
+ ++ +
# create a box
+ +box = geompy.MakeBox(0., + 0., 0., 100., 200., 300.)
+ ++ +
# add the box to the study
+ +idbox = geompy.addToStudy(box, + "box")
+ ++ +
# create a hypothesis
+ +print "-------------------------- + create Hypothesis"
+ +print "-------------------------- + NumberOfSegments"
+ +numberOfSegments + = 7
+ +hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", + "libStdMeshersEngine.so")
+ +hypNbSeg.SetNumberOfSegments(numberOfSegments)
+ +print hypNbSeg.GetName()
+ +print hypNbSeg.GetId()
+ +print hypNbSeg.GetNumberOfSegments()
+ +smeshgui.SetName(salome.ObjectToID(hypNbSeg), + "NumberOfSegments_10")
+ +print "-------------------------- + MaxElementArea"
+ +maxElementArea = + 800
+ +hypArea = smesh.CreateHypothesis("MaxElementArea", + "libStdMeshersEngine.so")
+ +hypArea.SetMaxElementArea(maxElementArea)
+ +print hypArea.GetName()
+ +print hypArea.GetId()
+ +print hypArea.GetMaxElementArea()
+ +smeshgui.SetName(salome.ObjectToID(hypArea), + "MaxElementArea_500")
+ +print "-------------------------- + MaxElementVolume"
+ +maxElementVolume + = 900
+ +hypVolume = smesh.CreateHypothesis("MaxElementVolume", + "libStdMeshersEngine.so")
+ +hypVolume.SetMaxElementVolume(maxElementVolume)
+ +print hypVolume.GetName()
+ +print hypVolume.GetId()
+ +print hypVolume.GetMaxElementVolume()
+ +smeshgui.SetName(salome.ObjectToID(hypVolume), + "MaxElementVolume_500")
+ ++ +
# create algorithms
+ +print "-------------------------- + create Algorithms"
+ +print "-------------------------- + Regular_1D"
+ +regular1D = smesh.CreateHypothesis("Regular_1D", + "libStdMeshersEngine.so")
+ +smeshgui.SetName(salome.ObjectToID(regular1D), + "Wire Discretisation")
+ +print "-------------------------- + MEFISTO_2D"
+ +mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", + "libStdMeshersEngine.so")
+ +smeshgui.SetName(salome.ObjectToID(mefisto2D), + "MEFISTO_2D")
+ ++ +
# initialize a mesh with + the box
+ +mesh = smesh.CreateMesh(box)
+ +smeshgui.SetName(salome.ObjectToID(mesh), + "MeshBox")
+ ++ +
# add the hypothesis to + the box
+ +print "-------------------------- + add hypothesis to the box"
+ +mesh.AddHypothesis(box,hypNbSeg)
+ +mesh.AddHypothesis(box,hypArea)
+ +mesh.AddHypothesis(box,hypVolume)
+ +mesh.AddHypothesis(box,regular1D)
+ +mesh.AddHypothesis(box,mefisto2D)
+ ++ +
# compute the mesh
+ +print "-------------------------- + compute the mesh of the box"
+ +ret = smesh.Compute(mesh,box)
+ +print ret
+ +if ret == 0:
+ +print + "probleme when computing the mesh"
+ +salome.sg.updateObjBrowser(1)
+ +mesh.ExportMED("/tmp/meshMED.med",0)
+ ++ +
+ + + + diff --git a/doc/salome/gui/SMESH/cshdat_robohelp.htm b/doc/salome/gui/SMESH/cshdat_robohelp.htm index 2e1891e53..4a4ee57e1 100755 --- a/doc/salome/gui/SMESH/cshdat_robohelp.htm +++ b/doc/salome/gui/SMESH/cshdat_robohelp.htm @@ -1,258 +1,258 @@ - - -
- -
from geompy import - *
- -import smesh
- -- -
# create vertices
- -Point111 = MakeVertex( - 0, 0, 0)
- -Point211 = MakeVertex(10, - 0, 0)
- -Point121 = MakeVertex( - 0, 10, 0)
- -Point221 = MakeVertex(10, - 10, 0)
- -Point112 = MakeVertex( - 0, 0, 10)
- -Point212 = MakeVertex(10, - 0, 10)
- -Point122 = MakeVertex( - 0, 10, 10)
- -Point222 = MakeVertex(10, - 10, 10)
- -- -
# create edges
- -EdgeX111 = MakeEdge(Point111, - Point211)
- -EdgeX121 = MakeEdge(Point121, - Point221)
- -EdgeX112 = MakeEdge(Point112, - Point212)
- -EdgeX122 = MakeEdge(Point122, - Point222)
- -EdgeY11 = MakeEdge(Point111, - Point121)
- -EdgeY21 = MakeEdge(Point211, - Point221)
- -EdgeY12 = MakeEdge(Point112, - Point122)
- -EdgeY22 = MakeEdge(Point212, - Point222)
- -EdgeZ111 = MakeEdge(Point111, - Point112)
- -EdgeZ211 = MakeEdge(Point211, - Point212)
- -EdgeZ121 = MakeEdge(Point121, - Point122)
- -EdgeZ221 = MakeEdge(Point221, - Point222)
- -- -
# create faces
- -FaceX11 = MakeQuad(EdgeY11, - EdgeZ111, EdgeY12, EdgeZ121)
- -FaceX21 = MakeQuad(EdgeY21, - EdgeZ211, EdgeY22, EdgeZ221)
- -FaceY111 = MakeQuad(EdgeX111, - EdgeZ111, EdgeX112, EdgeZ211)
- -FaceY121 = MakeQuad(EdgeX121, - EdgeZ121, EdgeX122, EdgeZ221)
- -FaceZ11 = MakeQuad(EdgeX111, - EdgeY11, EdgeX121, EdgeY21)
- -FaceZ12 = MakeQuad(EdgeX112, - EdgeY12, EdgeX122, EdgeY22)
- -- -
# create a solid
- -Block = MakeHexa(FaceX11, - FaceX21, FaceY111, FaceY121, FaceZ11, FaceZ12)
- -- -
# create a compound
- -box = MakeCompound([Block])
- -- -
# add in the study
- -box_id = addToStudy(box, - "Box compound")
- -- -
# create a hexahedral mesh on the box
- -hexa = smesh.Mesh(box, - "Box compound : hexahedrical mesh")
- -algo = hexa.Segment()
- -- -
# define "NumberOfSegments" hypothesis to cut an edge in a - fixed number of segments
- -algo.NumberOfSegments(4)
- -- -
# create a quadrangle 2D algorithm for faces
- -hexa.Quadrangle()
- -- -
# create a hexahedron 3D algorithm for solids
- -hexa.Hexahedron()
- -- -
# create a local hypothesis
- -algo = hexa.Segment(EdgeX111)
- -- -
# define "Arithmetic1D" hypothesis to cut an edge in several - segments with arithmetic length increasing
- -algo.Arithmetic1D(1, - 4)
- -- -
# define "Propagation" hypothesis that propagates all other - hypothesis on all edges on the opposite side in case of quadrangular faces
- -algo.Propagation()
- -- -
# compute the mesh
- -hexa.Compute()
- -- -
- -
import smesh
- -import geompy
- -import salome
- -gg = salome.ImportComponentGUI("GEOM")
- -- -
# create vertices
- -px = - geompy.MakeVertex(100., 0. , - 0. )
- -py = - geompy.MakeVertex(0. , - 100., 0. )
- -pz = - geompy.MakeVertex(0. , - 0. , 100.)
- -- -
# create a vector from - two points
- -vxy = geompy.MakeVector(px, - py)
- -- -
# create an arc from - three points
- -arc = geompy.MakeArc(py, - pz, px)
- -- -
# create a wire
- -wire = geompy.MakeWire([vxy, - arc])
- -isPlanarFace = 1
- -- -
# create a face from - the wire
- -face1 = geompy.MakeFace(wire, - isPlanarFace)
- -- -
# add objects in the - study
- -id_face1 = geompy.addToStudy(face1,"Face1")
- -- -
# display faces
- -gg.createAndDisplayGO(id_face1)
- -gg.setDisplayMode(id_face1,1)
- -gg.setTransparency(id_face1,0.2)
- -- -
# create hexahedral mesh
- -hexa = smesh.Mesh(face1, - "Face compound : hexahedrical mesh")
- -algo = hexa.Triangle()
- -- -
# define "MaxElementArea" - hypothesis to be applied to - each triangle
- -algo.MaxElementArea(30)
- -- -
# create a quadrangle - 2D algorithm for faces
- -hexa.Quadrangle()
- -- -
# create a local hypothesis
- -algo = hexa.Segment(wire)
- -- -
# define "NumberOfSegments" - hypothesis to cut an edge in a fixed number of segments
- -algo.NumberOfSegments(6)
- -- -
# define "Deflection1D" - hypothesis
- -algo.Deflection1D(1)
- -- -
# compute the mesh
- -hexa.Compute()
- -- -
from geompy import - *
- -import smesh
- -- -
# create vertices
- -Point111 = MakeVertex( - 0, 0, 0)
- -Point211 = MakeVertex(10, - 0, 0)
- -Point121 = MakeVertex( - 0, 10, 0)
- -Point221 = MakeVertex(10, - 10, 0)
- -Point112 = MakeVertex( - 0, 0, 10)
- -Point212 = MakeVertex(10, - 0, 10)
- -Point122 = MakeVertex( - 0, 10, 10)
- -Point222 = MakeVertex(10, - 10, 10)
- -- -
# create edges
- -EdgeX111 = MakeEdge(Point111, - Point211)
- -EdgeX121 = MakeEdge(Point121, - Point221)
- -EdgeX112 = MakeEdge(Point112, - Point212)
- -EdgeX122 = MakeEdge(Point122, - Point222)
- -EdgeY11 = MakeEdge(Point111, - Point121)
- -EdgeY21 = MakeEdge(Point211, - Point221)
- -EdgeY12 = MakeEdge(Point112, - Point122)
- -EdgeY22 = MakeEdge(Point212, - Point222)
- -EdgeZ111 = MakeEdge(Point111, - Point112)
- -EdgeZ211 = MakeEdge(Point211, - Point212)
- -EdgeZ121 = MakeEdge(Point121, - Point122)
- -EdgeZ221 = MakeEdge(Point221, - Point222)
- -- -
# create faces
- -FaceX11 = MakeQuad(EdgeY11, - EdgeZ111, EdgeY12, EdgeZ121)
- -FaceX21 = MakeQuad(EdgeY21, - EdgeZ211, EdgeY22, EdgeZ221)
- -FaceY111 = MakeQuad(EdgeX111, - EdgeZ111, EdgeX112, EdgeZ211)
- -FaceY121 = MakeQuad(EdgeX121, - EdgeZ121, EdgeX122, EdgeZ221)
- -FaceZ11 = MakeQuad(EdgeX111, - EdgeY11, EdgeX121, EdgeY21)
- -FaceZ12 = MakeQuad(EdgeX112, - EdgeY12, EdgeX122, EdgeY22)
- -- -
# create a solid
- -Block = MakeHexa(FaceX11, - FaceX21, FaceY111, FaceY121, FaceZ11, FaceZ12)
- -- -
# create a compound
- -box = MakeCompound([Block])
- -- -
# add in the study
- -box_id = addToStudy(box, - "Box compound")
- -- -
# create a hexahedral mesh on the box
- -hexa = smesh.Mesh(box, - "Box compound : hexahedrical mesh")
- -algo = hexa.Segment()
- -- -
# define "NumberOfSegments" hypothesis to cut an edge in a - fixed number of segments
- -algo.NumberOfSegments(4)
- -- -
# create a quadrangle 2D algorithm for faces
- -hexa.Quadrangle()
- -- -
# create a hexahedron 3D algorithm for solids
- -hexa.Hexahedron()
- -- -
# create a local hypothesis
- -algo = hexa.Segment(EdgeX111)
- -- -
# define "StartEndLength" hypothesis to cut an edge in several - segments with increasing geometric length
- -algo.StartEndLength(1, - 6)
- -- -
# define "Propagation" hypothesis that propagates all other - hypothesis on all edges on the opposite side in case of quadrangular faces
- -algo.Propagation()
- -- -
# compute the mesh
- -hexa.Compute()
- -- -
from geompy import - *
- -import smesh
- -- -
# create vertices
- -Point111 = MakeVertex( - 0, 0, 0)
- -Point211 = MakeVertex(10, - 0, 0)
- -Point121 = MakeVertex( - 0, 10, 0)
- -Point221 = MakeVertex(10, - 10, 0)
- -Point112 = MakeVertex( - 0, 0, 10)
- -Point212 = MakeVertex(10, - 0, 10)
- -Point122 = MakeVertex( - 0, 10, 10)
- -Point222 = MakeVertex(10, - 10, 10)
- -- -
# create edges
- -EdgeX111 = MakeEdge(Point111, - Point211)
- -EdgeX121 = MakeEdge(Point121, - Point221)
- -EdgeX112 = MakeEdge(Point112, - Point212)
- -EdgeX122 = MakeEdge(Point122, - Point222)
- -EdgeY11 = MakeEdge(Point111, - Point121)
- -EdgeY21 = MakeEdge(Point211, - Point221)
- -EdgeY12 = MakeEdge(Point112, - Point122)
- -EdgeY22 = MakeEdge(Point212, - Point222)
- -EdgeZ111 = MakeEdge(Point111, - Point112)
- -EdgeZ211 = MakeEdge(Point211, - Point212)
- -EdgeZ121 = MakeEdge(Point121, - Point122)
- -EdgeZ221 = MakeEdge(Point221, - Point222)
- -- -
# create faces
- -FaceX11 = MakeQuad(EdgeY11, - EdgeZ111, EdgeY12, EdgeZ121)
- -FaceX21 = MakeQuad(EdgeY21, - EdgeZ211, EdgeY22, EdgeZ221)
- -FaceY111 = MakeQuad(EdgeX111, - EdgeZ111, EdgeX112, EdgeZ211)
- -FaceY121 = MakeQuad(EdgeX121, - EdgeZ121, EdgeX122, EdgeZ221)
- -FaceZ11 = MakeQuad(EdgeX111, - EdgeY11, EdgeX121, EdgeY21)
- -FaceZ12 = MakeQuad(EdgeX112, - EdgeY12, EdgeX122, EdgeY22)
- -- -
# create a solid
- -Block = MakeHexa(FaceX11, - FaceX21, FaceY111, FaceY121, FaceZ11, FaceZ12)
- -- -
# create a compound
- -box = MakeCompound([Block])
- -- -
# add in the study
- -box_id = addToStudy(box, - "Box compound")
- -- -
# create a hexahedral - mesh on the box
- -hexa = smesh.Mesh(box, - "Box compound : hexahedrical mesh")
- -algo = hexa.Segment()
- -- -
# define "NumberOfSegments" - hypothesis to cut an edge in a fixed number of segments
- -algo.NumberOfSegments(4)
- -- -
# create a quadrangle - 2D algorithm for faces
- -hexa.Quadrangle()
- -- -
# create a hexahedron - 3D algorithm for solids
- -hexa.Hexahedron()
- -- -
# create a local hypothesis
- -algo = hexa.Segment(EdgeX111)
- -- -
# define "LocalLength" - hypothesis to cut an edge in several segments with the same length
- -algo.LocalLength(2)
- -- -
# define "Propagation" - hypothesis that propagates all other hypothesis on all edges on - the opposite side in case of quadrangular faces
- -algo.Propagation()
- -- -
# compute the mesh
- -hexa.Compute()
- -- -
- -
import smesh
- -import geompy
- -import salome
- -gg = salome.ImportComponentGUI("GEOM")
- -- -
# create vertices
- -px = - geompy.MakeVertex(100., 0. , - 0. )
- -py = - geompy.MakeVertex(0. , - 100., 0. )
- -pz = - geompy.MakeVertex(0. , - 0. , 100.)
- -- -
# create a vector from - two points
- -vxy = geompy.MakeVector(px, - py)
- -- -
# create an arc from three - points
- -arc = geompy.MakeArc(py, - pz, px)
- -- -
# create a wire
- -wire = geompy.MakeWire([vxy, - arc])
- -isPlanarFace = 1
- -- -
# create a face from the - wire
- -face1 = geompy.MakeFace(wire, - isPlanarFace)
- -- -
# add objects in the study
- -id_face1 = geompy.addToStudy(face1,"Face1")
- -- -
# display faces
- -gg.createAndDisplayGO(id_face1)
- -gg.setDisplayMode(id_face1,1)
- -gg.setTransparency(id_face1,0.2)
- -- -
# create a hexahedral mesh
- -hexa = smesh.Mesh(face1, - "Face compound : hexahedrical mesh")
- -algo = hexa.Triangle()
- -- -
# define "MaxElementArea" - hypothesis to be applied to each triangle
- -algo.MaxElementArea(7)
- -- -
# create a quadrangle 2D - algorithm for faces
- -hexa.Quadrangle()
- -- -
# create a local hypothesis
- -algo = hexa.Segment(wire)
- -- -
# define "NumberOfSegments" - hypothesis to cut an edge in a fixed number of segments
- -algo.NumberOfSegments(10)
- -- -
# compute the mesh
- -hexa.Compute()
- -- -
import - salome
- -import geompy
- -import StdMeshers
- -smesh = salome.lcc.FindOrLoadComponent("FactoryServer", - "SMESH")
- -smeshgui = salome.ImportComponentGUI("SMESH")
- -smeshgui.Init(salome.myStudyId);
- -- -
# create a box
- -box = geompy.MakeCylinderRH(30, - 50) #MakeBox(0., 0., 0., 100., 200., 300.)
- -- -
# add the box to the - study
- -idbox = geompy.addToStudy(box, - "box")
- -- -
# create vertices
- -px = - geompy.MakeVertex(100., 0. , - 0. )
- -py = - geompy.MakeVertex(0. , - 100., 0. )
- -pz = - geompy.MakeVertex(0. , - 0. , 100.)
- -- -
# create a vector from - two points
- -vxy = geompy.MakeVector(px, - py)
- -- -
# create an arc from - three points
- -arc = geompy.MakeArc(py, - pz, px)
- -- -
# create a wire
- -wire = geompy.MakeWire([vxy, - arc])
- -isPlanarFace = 1
- -- -
# create a face from - the wire
- -#face1
- -box = geompy.MakeFace(wire, - isPlanarFace)
- -- -
# add objects in the - study
- -id_face1 = geompy.addToStudy(box,"Face1")
- -#geompy.addToStudy(face1,"Face1")
- -- -
# display faces
- -gg.createAndDisplayGO(id_face1)
- -gg.setDisplayMode(id_face1,1)
- -gg.setTransparency(id_face1,0.2)
- -- -
# create a hypothesis
- -print "-------------------------- - create Hypothesis"
- -print "-------------------------- - NumberOfSegments"
- -numberOfSegments - = 7
- -hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", - "libStdMeshersEngine.so")
- -hypNbSeg.SetNumberOfSegments(numberOfSegments)
- -print hypNbSeg.GetName()
- -print hypNbSeg.GetId()
- -print hypNbSeg.GetNumberOfSegments()
- -smeshgui.SetName(salome.ObjectToID(hypNbSeg), - "NumberOfSegments_10")
- -print "-------------------------- - MaxElementArea"
- -maxElementArea = - 800
- -hypArea = smesh.CreateHypothesis("MaxElementArea", - "libStdMeshersEngine.so")
- -hypArea.SetMaxElementArea(maxElementArea)
- -print hypArea.GetName()
- -print hypArea.GetId()
- -print hypArea.GetMaxElementArea()
- -smeshgui.SetName(salome.ObjectToID(hypArea), - "MaxElementArea_800")
- -print "-------------------------- - MaxElementVolume"
- -maxElementVolume - = 900
- -hypVolume = smesh.CreateHypothesis("MaxElementVolume", - "libStdMeshersEngine.so")
- -hypVolume.SetMaxElementVolume(maxElementVolume)
- -print hypVolume.GetName()
- -print hypVolume.GetId()
- -print hypVolume.GetMaxElementVolume()
- -smeshgui.SetName(salome.ObjectToID(hypVolume), - "MaxElementVolume_900")
- -- -
# create algorithms
- -print "-------------------------- - create Algorithms"
- -print "-------------------------- - Regular_1D"
- -regular1D = smesh.CreateHypothesis("Regular_1D", - "libStdMeshersEngine.so")
- -smeshgui.SetName(salome.ObjectToID(regular1D), - "Wire Discretisation")
- -print "-------------------------- - MEFISTO_2D"
- -mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", - "libStdMeshersEngine.so")
- -smeshgui.SetName(salome.ObjectToID(mefisto2D), - "MEFISTO_2D")
- -#print "-------------------------- - Hexa_3D (Hexahedron meshing algorithm)"
- -hexa3D = smesh.CreateHypothesis("Hexa_3D", - "libStdMeshersEngine.so")
- -smeshgui.SetName(salome.ObjectToID(hexa3D), - "HEXA_3D")
- -- -
# initialize a mesh - with the box
- -mesh = smesh.CreateMesh(box)
- -smeshgui.SetName(salome.ObjectToID(mesh), - "MeshBox")
- -- -
# add a hypothesis - to the box
- -print "-------------------------- - add hypothesis to the box"
- -mesh.AddHypothesis(box,hypNbSeg)
- -mesh.AddHypothesis(box,hypArea)
- -mesh.AddHypothesis(box,hypVolume)
- -mesh.AddHypothesis(box,regular1D)
- -mesh.AddHypothesis(box,mefisto2D)
- -mesh.AddHypothesis(box,hexa3D)
- -- -
# compute the mesh
- -print "-------------------------- - compute the mesh of the box"
- -ret = smesh.Compute(mesh,box)
- -print ret
- -if ret == 0:
- -print - "probleme when computing the mesh"
- -salome.sg.updateObjBrowser(1)
- -- -
import smesh
- -import geompy
- -import salome
- -gg = salome.ImportComponentGUI("GEOM")
- -- -
# create sketchers
- -sketcher1 = geompy.MakeSketcher("Sketcher:F - 0 0:TT 70 0:TT 70 70:TT 0 70:WW")
- -sketcher2 = geompy.MakeSketcher("Sketcher:F - 20 20:TT 50 20:TT 50 50:TT 20 50:WW")
- -isPlanarFace = 1
- -- -
# create faces from two wires
- -face1 = geompy.MakeFaces([sketcher1, - sketcher2],isPlanarFace)
- -- -
# add objects in the study
- -id_face1 = geompy.addToStudy(face1,"Face1")
- -- -
# display faces
- -gg.createAndDisplayGO(id_face1)
- -gg.setDisplayMode(id_face1,1)
- -gg.setTransparency(id_face1,0.2)
- -- -
# create a mesh
- -hexa = smesh.Mesh(face1, - "Face : triangle 2D mesh")
- -algo = hexa.Triangle()
- -- -
# define "MaxElementArea" hypothesis to be applied to each - triangle
- -algo.MaxElementArea(30)
- -- -
# define "LengthFromEdges" hypothesis to build triangles based - on the length of the edges taken from the wire
- -algo.LengthFromEdges()
- -- -
# create local hypothesis
- -algo = hexa.Segment()
- -- -
# define "NumberOfSegments" hypothesis to cut an edge in a - fixed number of segments
- -algo.NumberOfSegments(2)
- -- -
# compute the mesh
- -hexa.Compute()
- -- -
from geompy import - *
- -import smesh
- -- -
# create vertices
- -Point111 = MakeVertex( - 0, 0, 0)
- -Point211 = MakeVertex(10, - 0, 0)
- -Point121 = MakeVertex( - 0, 10, 0)
- -Point221 = MakeVertex(10, - 10, 0)
- -Point112 = MakeVertex( - 0, 0, 10)
- -Point212 = MakeVertex(10, - 0, 10)
- -Point122 = MakeVertex( - 0, 10, 10)
- -Point222 = MakeVertex(10, - 10, 10)
- -- -
# create edges
- -EdgeX111 = MakeEdge(Point111, - Point211)
- -EdgeX121 = MakeEdge(Point121, - Point221)
- -EdgeX112 = MakeEdge(Point112, - Point212)
- -EdgeX122 = MakeEdge(Point122, - Point222)
- -EdgeY11 = MakeEdge(Point111, - Point121)
- -EdgeY21 = MakeEdge(Point211, - Point221)
- -EdgeY12 = MakeEdge(Point112, - Point122)
- -EdgeY22 = MakeEdge(Point212, - Point222)
- -EdgeZ111 = MakeEdge(Point111, - Point112)
- -EdgeZ211 = MakeEdge(Point211, - Point212)
- -EdgeZ121 = MakeEdge(Point121, - Point122)
- -EdgeZ221 = MakeEdge(Point221, - Point222)
- -- -
# create faces
- -FaceX11 = MakeQuad(EdgeY11, - EdgeZ111, EdgeY12, EdgeZ121)
- -FaceX21 = MakeQuad(EdgeY21, - EdgeZ211, EdgeY22, EdgeZ221)
- -FaceY111 = MakeQuad(EdgeX111, - EdgeZ111, EdgeX112, EdgeZ211)
- -FaceY121 = MakeQuad(EdgeX121, - EdgeZ121, EdgeX122, EdgeZ221)
- -FaceZ11 = MakeQuad(EdgeX111, - EdgeY11, EdgeX121, EdgeY21)
- -FaceZ12 = MakeQuad(EdgeX112, - EdgeY12, EdgeX122, EdgeY22)
- -- -
# create a solid
- -Block = MakeHexa(FaceX11, - FaceX21, FaceY111, FaceY121, FaceZ11, FaceZ12)
- -- -
# create a compound
- -box = MakeCompound([Block])
- -- -
# add in the study
- -box_id = addToStudy(box, - "Box compound")
- -- -
# create a hexahedral - mesh on the box
- -hexa = smesh.Mesh(box, - "Box compound : hexahedrical mesh")
- -algo = hexa.Segment()
- -- -
# define "NumberOfSegments" - hypothesis to cut an edge in a fixed number of segments
- -algo.NumberOfSegments(4)
- -- -
# create a quadrangle - 2D algorithm for faces
- -hexa.Quadrangle()
- -- -
# create a hexahedron - 3D algorithm for solids
- -hexa.Hexahedron()
- -- -
# create a local hypothesis
- -algo = hexa.Segment(EdgeX111)
- -- -
# - define "Arithmetic1D" hypothesis to cut an edge in several segments - with arithmetic length
- -increasing
- -algo.Arithmetic1D(1, - 4)
- -- -
# define "Propagation" - hypothesis that propagatea all other hypothesis on all edges on the opposite - side in case of quadrangular faces
- -algo.Propagation()
- -- -
# compute the mesh
- -hexa.Compute()
- -- -
import - salome
- -import StdMeshers
- -import NETGENPlugin
- -- -
smesh = salome.lcc.FindOrLoadComponent("FactoryServer", - "SMESH")
- -smeshgui = salome.ImportComponentGUI("SMESH")
- -smeshgui.Init(salome.myStudyId);
- -- -
# create algorithms
- -print "-------------------------- - create Algorithms"
- -print "-------------------------- - Regular_1D (Wire discretisation)"
- -regular1D = smesh.CreateHypothesis("Regular_1D", - "libStdMeshersEngine.so")
- -smeshgui.SetName(salome.ObjectToID(regular1D), - "Wire Discretisation")
- -- -
print "-------------------------- - MEFISTO_2D (Triangle meshing algorithm)"
- -mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", - "libStdMeshersEngine.so")
- -smeshgui.SetName(salome.ObjectToID(mefisto2D), - "MEFISTO_2D")
- -- -
print "-------------------------- - Quadrangle_2D (Quadrangle meshing algorithm)"
- -quad2D = smesh.CreateHypothesis( - "Quadrangle_2D", "libStdMeshersEngine.so" )
- -smeshgui.SetName(salome.ObjectToID(quad2D), - "Quadrangle_2D")
- -- -
print "-------------------------- - Hexa_3D (Hexahedron meshing algorithm)"
- -hexa3D = smesh.CreateHypothesis("Hexa_3D", - "libStdMeshersEngine.so")
- -smeshgui.SetName(salome.ObjectToID(hexa3D), - "HEXA_3D")
- -- -
print "-------------------------- - NETGEN_3D (Tetrahedron meshing algorithm)"
- -netgen3D = smesh.CreateHypothesis("NETGEN_3D", - "libNETGENEngine.so")
- -smeshgui.SetName(salome.ObjectToID(netgen3D), - "NETGEN_3D")
- -salome.sg.updateObjBrowser(1)
- -- - - - + + + + + +
+ +
from geompy import + *
+ +import smesh
+ ++ +
# create vertices
+ +Point111 = MakeVertex( + 0, 0, 0)
+ +Point211 = MakeVertex(10, + 0, 0)
+ +Point121 = MakeVertex( + 0, 10, 0)
+ +Point221 = MakeVertex(10, + 10, 0)
+ +Point112 = MakeVertex( + 0, 0, 10)
+ +Point212 = MakeVertex(10, + 0, 10)
+ +Point122 = MakeVertex( + 0, 10, 10)
+ +Point222 = MakeVertex(10, + 10, 10)
+ ++ +
# create edges
+ +EdgeX111 = MakeEdge(Point111, + Point211)
+ +EdgeX121 = MakeEdge(Point121, + Point221)
+ +EdgeX112 = MakeEdge(Point112, + Point212)
+ +EdgeX122 = MakeEdge(Point122, + Point222)
+ +EdgeY11 = MakeEdge(Point111, + Point121)
+ +EdgeY21 = MakeEdge(Point211, + Point221)
+ +EdgeY12 = MakeEdge(Point112, + Point122)
+ +EdgeY22 = MakeEdge(Point212, + Point222)
+ +EdgeZ111 = MakeEdge(Point111, + Point112)
+ +EdgeZ211 = MakeEdge(Point211, + Point212)
+ +EdgeZ121 = MakeEdge(Point121, + Point122)
+ +EdgeZ221 = MakeEdge(Point221, + Point222)
+ ++ +
# create faces
+ +FaceX11 = MakeQuad(EdgeY11, + EdgeZ111, EdgeY12, EdgeZ121)
+ +FaceX21 = MakeQuad(EdgeY21, + EdgeZ211, EdgeY22, EdgeZ221)
+ +FaceY111 = MakeQuad(EdgeX111, + EdgeZ111, EdgeX112, EdgeZ211)
+ +FaceY121 = MakeQuad(EdgeX121, + EdgeZ121, EdgeX122, EdgeZ221)
+ +FaceZ11 = MakeQuad(EdgeX111, + EdgeY11, EdgeX121, EdgeY21)
+ +FaceZ12 = MakeQuad(EdgeX112, + EdgeY12, EdgeX122, EdgeY22)
+ ++ +
# create a solid
+ +Block = MakeHexa(FaceX11, + FaceX21, FaceY111, FaceY121, FaceZ11, FaceZ12)
+ ++ +
# create a compound
+ +box = MakeCompound([Block])
+ ++ +
# add in the study
+ +box_id = addToStudy(box, + "Box compound")
+ ++ +
# create a hexahedral mesh on the box
+ +hexa = smesh.Mesh(box, + "Box compound : hexahedrical mesh")
+ +algo = hexa.Segment()
+ ++ +
# define "NumberOfSegments" hypothesis to cut an edge in a + fixed number of segments
+ +algo.NumberOfSegments(4)
+ ++ +
# create a quadrangle 2D algorithm for faces
+ +hexa.Quadrangle()
+ ++ +
# create a hexahedron 3D algorithm for solids
+ +hexa.Hexahedron()
+ ++ +
# create a local hypothesis
+ +algo = hexa.Segment(EdgeX111)
+ ++ +
# define "Arithmetic1D" hypothesis to cut an edge in several + segments with arithmetic length increasing
+ +algo.Arithmetic1D(1, + 4)
+ ++ +
# define "Propagation" hypothesis that propagates all other + hypothesis on all edges on the opposite side in case of quadrangular faces
+ +algo.Propagation()
+ ++ +
# compute the mesh
+ +hexa.Compute()
+ ++ +
+ +
import smesh
+ +import geompy
+ +import salome
+ +gg = salome.ImportComponentGUI("GEOM")
+ ++ +
# create vertices
+ +px = + geompy.MakeVertex(100., 0. , + 0. )
+ +py = + geompy.MakeVertex(0. , + 100., 0. )
+ +pz = + geompy.MakeVertex(0. , + 0. , 100.)
+ ++ +
# create a vector from + two points
+ +vxy = geompy.MakeVector(px, + py)
+ ++ +
# create an arc from + three points
+ +arc = geompy.MakeArc(py, + pz, px)
+ ++ +
# create a wire
+ +wire = geompy.MakeWire([vxy, + arc])
+ +isPlanarFace = 1
+ ++ +
# create a face from + the wire
+ +face1 = geompy.MakeFace(wire, + isPlanarFace)
+ ++ +
# + get edges from the face
+ +vxy,arc = geompy.SubShapeAll(face1,geompy.ShapeType["EDGE"])
+ ++ +
# add objects in the + study
+ +id_face1 = geompy.addToStudy(face1,"Face1")
+ +id_arc = geompy.addToStudyInFather(face1,arc,"Arc + Edge")
+ ++ +
# display faces
+ +gg.createAndDisplayGO(id_face1)
+ +gg.setDisplayMode(id_face1,1)
+ +gg.setTransparency(id_face1,0.2)
+ ++ +
# create hexahedral mesh
+ +hexa = smesh.Mesh(face1, + "Face compound : hexahedrical mesh")
+ +algo = hexa.Triangle()
+ ++ +
# define "MaxElementArea" + hypothesis
+ +algo.MaxElementArea(30)
+ ++ +
# create a local hypothesis + on the wire
+ +algo = hexa.Segment(wire)
+ ++ +
# define "NumberOfSegments" + hypothesis to cut a straight edge in a fixed number of segments
+ +algo.NumberOfSegments(6)
+ ++ +
# define a local "Deflection1D" + hypothesis on the arc
+ +algo = hexa.Segment(arc)
+ +algo.Deflection1D(1)
+ ++ +
+ +
# compute the mesh
+ +hexa.Compute()
+ ++ +
from geompy import + *
+ +import smesh
+ ++ +
# create vertices
+ +Point111 = MakeVertex( + 0, 0, 0)
+ +Point211 = MakeVertex(10, + 0, 0)
+ +Point121 = MakeVertex( + 0, 10, 0)
+ +Point221 = MakeVertex(10, + 10, 0)
+ +Point112 = MakeVertex( + 0, 0, 10)
+ +Point212 = MakeVertex(10, + 0, 10)
+ +Point122 = MakeVertex( + 0, 10, 10)
+ +Point222 = MakeVertex(10, + 10, 10)
+ ++ +
# create edges
+ +EdgeX111 = MakeEdge(Point111, + Point211)
+ +EdgeX121 = MakeEdge(Point121, + Point221)
+ +EdgeX112 = MakeEdge(Point112, + Point212)
+ +EdgeX122 = MakeEdge(Point122, + Point222)
+ +EdgeY11 = MakeEdge(Point111, + Point121)
+ +EdgeY21 = MakeEdge(Point211, + Point221)
+ +EdgeY12 = MakeEdge(Point112, + Point122)
+ +EdgeY22 = MakeEdge(Point212, + Point222)
+ +EdgeZ111 = MakeEdge(Point111, + Point112)
+ +EdgeZ211 = MakeEdge(Point211, + Point212)
+ +EdgeZ121 = MakeEdge(Point121, + Point122)
+ +EdgeZ221 = MakeEdge(Point221, + Point222)
+ ++ +
# create faces
+ +FaceX11 = MakeQuad(EdgeY11, + EdgeZ111, EdgeY12, EdgeZ121)
+ +FaceX21 = MakeQuad(EdgeY21, + EdgeZ211, EdgeY22, EdgeZ221)
+ +FaceY111 = MakeQuad(EdgeX111, + EdgeZ111, EdgeX112, EdgeZ211)
+ +FaceY121 = MakeQuad(EdgeX121, + EdgeZ121, EdgeX122, EdgeZ221)
+ +FaceZ11 = MakeQuad(EdgeX111, + EdgeY11, EdgeX121, EdgeY21)
+ +FaceZ12 = MakeQuad(EdgeX112, + EdgeY12, EdgeX122, EdgeY22)
+ ++ +
# create a solid
+ +Block = MakeHexa(FaceX11, + FaceX21, FaceY111, FaceY121, FaceZ11, FaceZ12)
+ ++ +
# create a compound
+ +box = MakeCompound([Block])
+ ++ +
# add in the study
+ +box_id = addToStudy(box, + "Box compound")
+ ++ +
# create a hexahedral mesh on the box
+ +hexa = smesh.Mesh(box, + "Box compound : hexahedrical mesh")
+ +algo = hexa.Segment()
+ ++ +
# define "NumberOfSegments" hypothesis to cut an edge in a + fixed number of segments
+ +algo.NumberOfSegments(4)
+ ++ +
# create a quadrangle 2D algorithm for faces
+ +hexa.Quadrangle()
+ ++ +
# create a hexahedron 3D algorithm for solids
+ +hexa.Hexahedron()
+ ++ +
# create a local hypothesis
+ +algo = hexa.Segment(EdgeX111)
+ ++ +
# define "StartEndLength" hypothesis to cut an edge in several + segments with increasing geometric length
+ +algo.StartEndLength(1, + 6)
+ ++ +
# define "Propagation" hypothesis that propagates all other + hypothesis on all edges on the opposite side in case of quadrangular faces
+ +algo.Propagation()
+ ++ +
# compute the mesh
+ +hexa.Compute()
+ ++ +
from geompy import + *
+ +import smesh
+ ++ +
# create vertices
+ +Point111 = MakeVertex( + 0, 0, 0)
+ +Point211 = MakeVertex(10, + 0, 0)
+ +Point121 = MakeVertex( + 0, 10, 0)
+ +Point221 = MakeVertex(10, + 10, 0)
+ +Point112 = MakeVertex( + 0, 0, 10)
+ +Point212 = MakeVertex(10, + 0, 10)
+ +Point122 = MakeVertex( + 0, 10, 10)
+ +Point222 = MakeVertex(10, + 10, 10)
+ ++ +
# create edges
+ +EdgeX111 = MakeEdge(Point111, + Point211)
+ +EdgeX121 = MakeEdge(Point121, + Point221)
+ +EdgeX112 = MakeEdge(Point112, + Point212)
+ +EdgeX122 = MakeEdge(Point122, + Point222)
+ +EdgeY11 = MakeEdge(Point111, + Point121)
+ +EdgeY21 = MakeEdge(Point211, + Point221)
+ +EdgeY12 = MakeEdge(Point112, + Point122)
+ +EdgeY22 = MakeEdge(Point212, + Point222)
+ +EdgeZ111 = MakeEdge(Point111, + Point112)
+ +EdgeZ211 = MakeEdge(Point211, + Point212)
+ +EdgeZ121 = MakeEdge(Point121, + Point122)
+ +EdgeZ221 = MakeEdge(Point221, + Point222)
+ ++ +
# create faces
+ +FaceX11 = MakeQuad(EdgeY11, + EdgeZ111, EdgeY12, EdgeZ121)
+ +FaceX21 = MakeQuad(EdgeY21, + EdgeZ211, EdgeY22, EdgeZ221)
+ +FaceY111 = MakeQuad(EdgeX111, + EdgeZ111, EdgeX112, EdgeZ211)
+ +FaceY121 = MakeQuad(EdgeX121, + EdgeZ121, EdgeX122, EdgeZ221)
+ +FaceZ11 = MakeQuad(EdgeX111, + EdgeY11, EdgeX121, EdgeY21)
+ +FaceZ12 = MakeQuad(EdgeX112, + EdgeY12, EdgeX122, EdgeY22)
+ ++ +
# create a solid
+ +Block = MakeHexa(FaceX11, + FaceX21, FaceY111, FaceY121, FaceZ11, FaceZ12)
+ ++ +
# create a compound
+ +box = MakeCompound([Block])
+ ++ +
# add in the study
+ +box_id = addToStudy(box, + "Box compound")
+ ++ +
# create a hexahedral + mesh on the box
+ +hexa = smesh.Mesh(box, + "Box compound : hexahedrical mesh")
+ +algo = hexa.Segment()
+ ++ +
# define "NumberOfSegments" + hypothesis to cut an edge in a fixed number of segments
+ +algo.NumberOfSegments(4)
+ ++ +
# create a quadrangle + 2D algorithm for faces
+ +hexa.Quadrangle()
+ ++ +
# create a hexahedron + 3D algorithm for solids
+ +hexa.Hexahedron()
+ ++ +
# create a local hypothesis
+ +algo = hexa.Segment(EdgeX111)
+ ++ +
# define "LocalLength" + hypothesis to cut an edge in several segments with the same length
+ +algo.LocalLength(2)
+ ++ +
# define "Propagation" + hypothesis that propagates all other hypothesis on all edges on + the opposite side in case of quadrangular faces
+ +algo.Propagation()
+ ++ +
# compute the mesh
+ +hexa.Compute()
+ ++ +
+ +
import + smesh
+ +import geompy
+ +import salome
+ ++ +
# create a face
+ +px = + geompy.MakeVertex(100., 0. , + 0. )
+ +py = + geompy.MakeVertex(0. , + 100., 0. )
+ +pz = + geompy.MakeVertex(0. , + 0. , 100.)
+ ++ +
vxy = geompy.MakeVector(px, + py)
+ +arc = geompy.MakeArc(py, + pz, px)
+ +wire = geompy.MakeWire([vxy, + arc])
+ ++ +
isPlanarFace = 1
+ +face = geompy.MakeFace(wire, + isPlanarFace)
+ ++ +
# add the face in the + study
+ +id_face = geompy.addToStudy(face, + "Face to be meshed")
+ ++ +
# create a mesh
+ +tria_mesh = smesh.Mesh(face, + "Face : triangulation")
+ ++ +
# define 1D meshing:
+ +algo = tria_mesh.Segment()
+ +algo.NumberOfSegments(20)
+ ++ +
# define 2D meshing:
+ ++ +
# assign triangulation + algorithm
+ +algo = tria_mesh.Triangle()
+ ++ +
# apply "Max Element + Area" hypothesis to each triangle
+ +algo.MaxElementArea(100)
+ ++ +
# compute the mesh
+ +tria_mesh.Compute() +
+ ++ +
import + salome
+ +import geompy
+ +import StdMeshers
+ +import NETGENPlugin
+ ++ +
smesh = salome.lcc.FindOrLoadComponent("FactoryServer", + "SMESH")
+ +smeshgui = salome.ImportComponentGUI("SMESH")
+ +smeshgui.Init(salome.myStudyId);
+ ++ +
# create a box
+ +box = geompy.MakeCylinderRH(30, + 50) #MakeBox(0., 0., 0.,
+ +100., 200., 300.)
+ ++ +
# add the box in the + study
+ +idbox = geompy.addToStudy(box, + "box")
+ ++ +
# create a set of hypotheses
+ ++ +
# Number of Segments
+ +numberOfSegments + = 7
+ +hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", + "libStdMeshersEngine.so")
+ +hypNbSeg.SetNumberOfSegments(numberOfSegments)
+ +print hypNbSeg.GetName()
+ +print hypNbSeg.GetNumberOfSegments()
+ +smeshgui.SetName(salome.ObjectToID(hypNbSeg), + "NumberOfSegments_7")
+ ++ +
# Max Element Area
+ +maxElementArea = + 800
+ +hypArea = smesh.CreateHypothesis("MaxElementArea", + "libStdMeshersEngine.so")
+ +hypArea.SetMaxElementArea(maxElementArea)
+ +print hypArea.GetName()
+ +print hypArea.GetMaxElementArea()
+ +smeshgui.SetName(salome.ObjectToID(hypArea), + "MaxElementArea_800")
+ ++ +
# Max Element Volume
+ +maxElementVolume + = 900
+ +hypVolume = smesh.CreateHypothesis("MaxElementVolume", + "libStdMeshersEngine.so")
+ +hypVolume.SetMaxElementVolume(maxElementVolume)
+ +print hypVolume.GetName()
+ +print hypVolume.GetMaxElementVolume()
+ +smeshgui.SetName(salome.ObjectToID(hypVolume), + "MaxElementVolume_900")
+ ++ +
# create a set of algorithms
+ ++ +
# Regular_1D
+ +regular1D = smesh.CreateHypothesis("Regular_1D", + "libStdMeshersEngine.so")
+ +smeshgui.SetName(salome.ObjectToID(regular1D), + "Wire Discretisation")
+ ++ +
# MEFISTO_2D
+ +mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", + "libStdMeshersEngine.so")
+ +smeshgui.SetName(salome.ObjectToID(mefisto2D), + "MEFISTO_2D")
+ ++ +
# NETGEN_3D (Tetrahedron + meshing algorithm)
+ +tetra3D = smesh.CreateHypothesis("NETGEN_3D", + "libNETGENEngine.so")
+ +smeshgui.SetName(salome.ObjectToID(tetra3D), + "NETGEN_3D")
+ ++ +
# initialize a mesh + with the box
+ +mesh = smesh.CreateMesh(box)
+ +smeshgui.SetName(salome.ObjectToID(mesh), + "MeshBox")
+ ++ +
# add hypotheses and + algorithms to the box
+ +mesh.AddHypothesis(box,hypNbSeg)
+ +mesh.AddHypothesis(box,hypArea)
+ +mesh.AddHypothesis(box,hypVolume)
+ +mesh.AddHypothesis(box,regular1D)
+ +mesh.AddHypothesis(box,mefisto2D)
+ +mesh.AddHypothesis(box,tetra3D)
+ ++ +
# compute the mesh
+ +ret = smesh.Compute(mesh,box)
+ +if ret == 0:
+ +print + "probleme when computing the mesh"
+ +else:
+ +print + "Computation succeded"
+ +salome.sg.updateObjBrowser(1) +
+ ++ +
import + salome
+ +import geompy
+ +import smesh
+ ++ +
# create sketchers
+ +sketcher1 = geompy.MakeSketcher("Sketcher:F + 0 0:TT 70 0:TT 70 70:TT 0 70:WW")
+ +sketcher2 = geompy.MakeSketcher("Sketcher:F + 20 20:TT 50 20:TT 50 50:TT 20 50:WW")
+ +isPlanarFace = 1
+ ++ +
# create a face from + two wires
+ +face1 = geompy.MakeFaces([sketcher1, + sketcher2],isPlanarFace)
+ ++ +
# add object in the study
+ +id_face1 = geompy.addToStudy(face1,"Face1")
+ ++ +
# create a mesh
+ +tria = smesh.Mesh(face1, + "Face : triangle 2D mesh")
+ ++ +
# Define 1D meshing
+ +algo = tria.Segment()
+ +algo.NumberOfSegments(2)
+ ++ +
# create and assign the + algorithm for 2D meshing with triangles
+ +algo = tria.Triangle()
+ ++ +
# create and assign "LengthFromEdges" + hypothesis to build triangles
+ +# based on the length + of the edges taken from the wire
+ +algo.LengthFromEdges()
+ ++ +
# compute the mesh
+ +tria.Compute()
+ ++ +
from + geompy import *
+ +import smesh
+ ++ +
# create vertices
+ +Point111 = MakeVertex( + 0, 0, 0)
+ +Point211 = MakeVertex(10, + 0, 0)
+ +Point121 = MakeVertex( + 0, 10, 0)
+ +Point221 = MakeVertex(10, + 10, 0)
+ +Point112 = MakeVertex( + 0, 0, 10)
+ +Point212 = MakeVertex(10, + 0, 10)
+ +Point122 = MakeVertex( + 0, 10, 10)
+ +Point222 = MakeVertex(10, + 10, 10)
+ ++ +
# create edges
+ +EdgeX111 = MakeEdge(Point111, + Point211)
+ +EdgeX121 = MakeEdge(Point121, + Point221)
+ +EdgeX112 = MakeEdge(Point112, + Point212)
+ +EdgeX122 = MakeEdge(Point122, + Point222)
+ +EdgeY11 = MakeEdge(Point111, + Point121)
+ +EdgeY21 = MakeEdge(Point211, + Point221)
+ +EdgeY12 = MakeEdge(Point112, + Point122)
+ +EdgeY22 = MakeEdge(Point212, + Point222)
+ +EdgeZ111 = MakeEdge(Point111, + Point112)
+ +EdgeZ211 = MakeEdge(Point211, + Point212)
+ +EdgeZ121 = MakeEdge(Point121, + Point122)
+ +EdgeZ221 = MakeEdge(Point221, + Point222)
+ ++ +
# create faces
+ +FaceX11 = MakeQuad(EdgeY11, + EdgeZ111, EdgeY12, EdgeZ121)
+ +FaceX21 = MakeQuad(EdgeY21, + EdgeZ211, EdgeY22, EdgeZ221)
+ +FaceY111 = MakeQuad(EdgeX111, + EdgeZ111, EdgeX112, EdgeZ211)
+ +FaceY121 = MakeQuad(EdgeX121, + EdgeZ121, EdgeX122, EdgeZ221)
+ +FaceZ11 = MakeQuad(EdgeX111, + EdgeY11, EdgeX121, EdgeY21)
+ +FaceZ12 = MakeQuad(EdgeX112, + EdgeY12, EdgeX122, EdgeY22)
+ ++ +
# create a solid
+ +box = MakeHexa(FaceX11, + FaceX21, FaceY111, FaceY121, FaceZ11, FaceZ12)
+ ++ +
# add in the study
+ +box_id = addToStudy(box, + "Box")
+ ++ +
# create a hexahedral + mesh on the box
+ +hexa = smesh.Mesh(box, + "Box : hexahedrical mesh")
+ ++ +
# create an 1D algorithm + for edges
+ +algo = hexa.Segment()
+ ++ +
# define "NumberOfSegments" + hypothesis to cut an edge in a fixed number of segments
+ +algo.NumberOfSegments(4)
+ ++ +
# create a quadrangle + 2D algorithm for faces
+ +hexa.Quadrangle()
+ ++ +
# create a hexahedron + 3D algorithm for solids
+ +hexa.Hexahedron()
+ ++ +
# create a local hypothesis
+ +algo = hexa.Segment(EdgeX111)
+ ++ +
# define "Arithmetic1D" + hypothesis to cut an edge + in several segments with increasing length
+ +algo.Arithmetic1D(1, + 4)
+ ++ +
# define "Propagation" + hypothesis that propagates all other 1D hypotheses
+ +# from all edges on the + opposite side of a face in case of quadrangular faces
+ +algo.Propagation()
+ ++ +
# compute the mesh
+ +hexa.Compute()
+ +import + salome
+ +import StdMeshers
+ +import NETGENPlugin
+ ++ +
smesh = salome.lcc.FindOrLoadComponent("FactoryServer", + "SMESH")
+ +smeshgui = salome.ImportComponentGUI("SMESH")
+ +smeshgui.Init(salome.myStudyId);
+ ++ +
# create algorithms
+ +print "-------------------------- + create Algorithms"
+ +print "-------------------------- + Regular_1D (Wire discretisation)"
+ +regular1D = smesh.CreateHypothesis("Regular_1D", + "libStdMeshersEngine.so")
+ +smeshgui.SetName(salome.ObjectToID(regular1D), + "Wire Discretisation")
+ ++ +
print "-------------------------- + MEFISTO_2D (Triangle meshing algorithm)"
+ +mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", + "libStdMeshersEngine.so")
+ +smeshgui.SetName(salome.ObjectToID(mefisto2D), + "MEFISTO_2D")
+ ++ +
print "-------------------------- + Quadrangle_2D (Quadrangle meshing algorithm)"
+ +quad2D = smesh.CreateHypothesis( + "Quadrangle_2D", "libStdMeshersEngine.so" )
+ +smeshgui.SetName(salome.ObjectToID(quad2D), + "Quadrangle_2D")
+ ++ +
print "-------------------------- + Hexa_3D (Hexahedron meshing algorithm)"
+ +hexa3D = smesh.CreateHypothesis("Hexa_3D", + "libStdMeshersEngine.so")
+ +smeshgui.SetName(salome.ObjectToID(hexa3D), + "HEXA_3D")
+ ++ +
print "-------------------------- + NETGEN_3D (Tetrahedron meshing algorithm)"
+ +netgen3D = smesh.CreateHypothesis("NETGEN_3D", + "libNETGENEngine.so")
+ +smeshgui.SetName(salome.ObjectToID(netgen3D), + "NETGEN_3D")
+ +salome.sg.updateObjBrowser(1)
+ ++ + + + diff --git a/doc/salome/gui/SMESH/deleting_groups.htm b/doc/salome/gui/SMESH/deleting_groups.htm index 85b273571..02a7b47e2 100755 --- a/doc/salome/gui/SMESH/deleting_groups.htm +++ b/doc/salome/gui/SMESH/deleting_groups.htm @@ -1,114 +1,119 @@ - - - - - -
To delete a group in the - Main Menu select Mesh - -> Delete Groups and select one or several - groups you wish to delete in the 3D viewer or in the Object Browser.
- -The selected groups will - be listed in Delete groups with contents - menu. Then click Ok button to remove the selected groups and close the - menu or Apply button to remove them and proceed with the selection.
- -- -
- -
- -
Please, note that this - operation removes groups with their elements. - To delete a group and leave its elements intact, right-click on the group - in the Object Browser and select Delete - in the pop-up menu or select the group and choose Edit - -> Delete in the Main Menu. -
- - - - + + + + + +To delete a group in the + Main Menu select Mesh + -> Delete Groups and select one or several + groups you wish to delete in the 3D viewer or in the Object Browser.
+ +The selected groups will + be listed in Delete groups with contents + menu. Then click Ok button to remove the selected groups and close the + menu or Apply button to remove them and proceed with the selection.
+ ++ +
+ +
+ +
Please, note that this + operation removes groups with their elements. + To delete a group and leave its elements intact, right-click on the group + in the Object Browser and select Delete + in the pop-up menu or select the group and choose Edit + -> Delete in the Main Menu. +
+ + + + diff --git a/doc/salome/gui/SMESH/display_entity.htm b/doc/salome/gui/SMESH/display_entity.htm index 8195fc580..51d7d6604 100755 --- a/doc/salome/gui/SMESH/display_entity.htm +++ b/doc/salome/gui/SMESH/display_entity.htm @@ -1,101 +1,101 @@ - - - - - -In this submenu you can choose to display only faces,
- -- -
- -
only edges,
- -- -
- -
or both.
- - - - + + + + + +In this submenu you can choose to display only volumes, faces or edges + or combine them.
+ ++ +
Only Faces Only + Edges
+ +
+ + + + diff --git a/doc/salome/gui/SMESH/ehelp.xml b/doc/salome/gui/SMESH/ehelp.xml index be729a46c..8d61adcdc 100755 --- a/doc/salome/gui/SMESH/ehelp.xml +++ b/doc/salome/gui/SMESH/ehelp.xml @@ -1,10 +1,10 @@ - - -