diff --git a/INSTALL b/INSTALL new file mode 100644 index 000000000..78255907a --- /dev/null +++ b/INSTALL @@ -0,0 +1,6 @@ +This is the version 3.1.0 of SMESH +Compatible with : + - KERNEL 3.1.0 + - SALOMEGUI 3.1.0 + - GEOM 3.1.0 + - MED 3.1.0 diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 000000000..f3a90dfb5 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,209 @@ +# -* Makefile *- +# +# Author : Patrick GOLDBRONN (CEA) +# Date : 28/06/2001 +# $Header$ +# + +# source path +top_srcdir=@top_srcdir@ +top_builddir=. +srcdir=@srcdir@ +VPATH=.:@srcdir@:@top_srcdir@/bin:@top_srcdir@/resources:./bin:@top_srcdir@/idl + + +@COMMENCE@ + +SUBDIRS = idl src doc + +RESOURCES_FILES = \ +delete.png \ +mesh_add_sub.png \ +mesh_algo_hexa.png \ +mesh_algo_mefisto.png \ +mesh_algo_quad.png \ +mesh_algo_regular.png \ +mesh_algo_tetra.png \ +mesh_angle.png \ +mesh_area.png \ +mesh_aspect.png \ +mesh_aspect_3d.png \ +mesh_compute.png \ +mesh_connectivity.png \ +mesh_diagonal.png \ +mesh_edit.png \ +mesh_hexa_n.png \ +mesh_hexa.png \ +mesh_hypo_area.png \ +mesh_hypo_length.png \ +mesh_hypo_segment.png \ +mesh_hypo_volume.png \ +mesh_hypo_edit.png \ +mesh_info.png \ +advanced_mesh_info.png \ +standard_mesh_info.png \ +mesh_init.png \ +mesh_length.png \ +mesh_length_2d.png \ +mesh_free_edges.png \ +mesh_free_edges_2d.png \ +mesh_multi_edges.png \ +mesh_multi_edges_2d.png \ +mesh_line_n.png \ +mesh_line.png \ +mesh_move_node.png \ +mesh_orientation.png \ +mesh.png \ +mesh_polygon.png \ +mesh_polyhedron.png \ +mesh_pyramid_n.png \ +mesh_pyramid.png \ +mesh_quad_n.png \ +mesh_quad.png \ +mesh_rem_element.png \ +mesh_rem_node.png \ +mesh_set_algo.png \ +mesh_set_hypo.png \ +mesh_shading.png \ +mesh_shrink.png \ +mesh_skew.png \ +mesh_taper.png \ +mesh_tetra_n.png \ +mesh_tetra.png \ +mesh_tree_algo_hexa.png \ +mesh_tree_algo_mefisto.png \ +mesh_tree_algo.png \ +mesh_tree_algo_quad.png \ +mesh_tree_algo_regular.png \ +mesh_tree_algo_tetra.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_mesh.png \ +mesh_tree_importedmesh.png \ +mesh_tree_mesh_warn.png \ +mesh_triangle_n.png \ +mesh_triangle.png \ +mesh_update.png \ +mesh_vertex_n.png \ +mesh_vertex.png \ +mesh_volume_3d.png \ +mesh_wireframe.png \ +mesh_points.png \ +mesh_wrap.png \ +mesh_tree_group.png \ +mesh_edit_group.png \ +mesh_make_group.png \ +mesh_union2tri.png \ +mesh_uniontri.png \ +mesh_cutquad.png \ +mesh_smoothing.png \ +mesh_renumbering_nodes.png \ +mesh_renumbering_elements.png \ +mesh_extrusion.png \ +mesh_extrusionpath.png \ +mesh_revolution.png \ +ModuleMesh.png \ +mesh_unionGroups.png \ +mesh_intersectGroups.png \ +mesh_cutGroups.png \ +mesh_deleteGroups.png \ +mesh_translation_vector.png \ +mesh_translation_points.png \ +mesh_rotation.png \ +mesh_symmetry_point.png \ +mesh_symmetry_axis.png \ +mesh_symmetry_plane.png \ +mesh_sew_freeborders.png \ +mesh_sew_conform_freeborders.png \ +mesh_sew_bordertoside.png \ +mesh_sew_sideelements.png \ +mesh_merge_nodes.png \ +mesh_merge_elements.png \ +select1.png \ +SMESH_en.xml \ +SMESH.config \ +StdMeshers.xml \ +SMESHCatalog.xml \ +mesh_pattern.png \ +pattern_sample_2d.png \ +pattern_sample_3D.png \ +mesh_add.png \ +mesh_remove.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 +endif + +inc: idl $(include_list) + +include/salome/SALOMEconfig.h: salome_adm/unix/SALOMEconfig.ref + -$(RM) $@ + $(LN_S) ../../$< $@ + +# test if SALOMEconfig.h has changed (contents) +salome_adm/unix/SALOMEconfig.ref: salome_adm/unix/SALOMEconfig.h + @if ! [ -a $@ ]; then \ + cp -p -f $< $@; \ + fi; \ + if ! cmp $< $@; then \ + cp -p -f $< $@; \ + fi; \ + +include/salome/sstream: salome_adm/unix/sstream + -$(RM) $@ + $(LN_S) ../../$< $@ + +depend: depend_idl + +depend_idl: + (cd idl ; $(MAKE) $@) || exit 1 + +# doc is already build : if you want to had documents, go manually to doc and run 'make doc' +#doc: +# (cd doc && $(MAKE) $@) || exit 1 + +install-end: +# finish libtool install +# @$(LT) --mode=finish $(libdir) + +install-include: $(include_list) + $(INSTALL) -d $(includedir) + @for f in X $(include_list); do \ + if test $$f != X; then \ + ($(INSTALL_DATA) -p $$f $(includedir)/. || exit 1); \ + fi; \ + done + +# install script in $(bindir) : +install-bin: $(BIN_SCRIPT) + $(INSTALL) -d $(bindir) + if test $(BIN_SCRIPT)X != X; then \ + $(INSTALL_PROGRAM) $^ $(bindir); \ + fi + +uninstall: uninstall-idl + +uninstall-idl: + $(RM) $(idldir)/*.idl + +distclean: distclean-other + +distclean-other: + -$(RM) salome_adm/unix/*~ salome_adm/unix/*% salome_adm/unix/*.bak salome_adm/unix/*.new salome_adm/unix/*.old + -$(RM) salome_adm/unix/make_* + -$(RM) salome_adm/unix/depend salome_adm/unix/SALOMEconfig.h + -$(RM) config.cache config.log config.status + +@MODULE@ + +install: install-bin install-include install-end + diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in new file mode 100644 index 000000000..5e556548e --- /dev/null +++ b/adm_local/unix/make_commence.in @@ -0,0 +1,253 @@ +# common directories to put headerfiles +inc_builddir=$(top_builddir)/include/salome + +@SET_MAKE@ +SHELL=/bin/sh + +# header missing + +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 +# add libstdc++ to link c++ library with libtool ! +LDFLAGS+= -lstdc++ +LDFLAGSFORBIN+= -lstdc++ + +CP=@CP@ + +# CPP + +CPP=@CPP@ +CXXCPP=@CXXCPP@ +CPPFLAGS=@CPPFLAGS@ -I$(inc_builddir) -I$(srcdir) -I. + +# C + +CC = @CC@ +CFLAGS = @CFLAGS@ +C_DEPEND_FLAG = @C_DEPEND_FLAG@ + +# C++ + +CXX = @CXX@ +CXXFLAGS = @CXXFLAGS@ +CXX_DEPEND_FLAG = @CXX_DEPEND_FLAG@ + +# BOOST Library + +BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ + +# JAVA + +JAVA_INCLUDES = @JAVA_INCLUDES@ +JAVA_LIBS = @JAVA_LIBS@ +JAVA_LDPATH = @JAVA_LDPATH@ + +# PYTHON + +PYTHON = @PYTHON@ +PYTHONHOME = @PYTHONHOME@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_LIBS = @PYTHON_LIBS@ +PYTHON_VERSION = @PYTHON_VERSION@ +PYTHON_SITE = @PYTHON_SITE@ +PYTHON_SITE_INSTALL = @PYTHON_SITE_INSTALL@ + +# QT + +QT_ROOT = @QT_ROOT@ +QT_INCLUDES = @QT_INCLUDES@ +QT_MT_INCLUDES = @QT_INCLUDES@ -DQT_THREAD_SUPPORT +QT_LIBS = @QT_LIBS@ +QT_MT_LIBS = @QT_MT_LIBS@ + +MOC = @MOC@ +UIC = @UIC@ +MSG2QM = @MSG2QM@ + +#QWT + +QWT_INCLUDES=@QWT_INCLUDES@ +QWT_LIBS=@QWT_LIBS@ + +# SIP +SIP = @SIP@ +SIP_INCLUDES = @SIP_INCLUDES@ +SIP_LIBS = @SIP_LIBS@ + +# PYQT +PYQT_SIPS = @PYQT_SIPS@ +PYQT_LIBS = @PYQT_LIBS@ + +# openGL +OGL_INCLUDES=@OGL_INCLUDES@ +OGL_LIBS=@OGL_LIBS@ + +# VTK +VTK_INCLUDES=@VTK_INCLUDES@ +VTK_LIBS=@VTK_LIBS@ + +# HDF5 + +HDF5_INCLUDES=@HDF5_INCLUDES@ +HDF5_LIBS=@HDF5_LIBS@ +HDF5_MT_LIBS=@HDF5_MT_LIBS@ + +# OpenCasCade + +OCC_INCLUDES=@CAS_CPPFLAGS@ +OCC_CXXFLAGS=@CAS_CXXFLAGS@ + +OCC_KERNEL_LIBS=@CAS_KERNEL@ +OCC_OCAF_LIBS=@CAS_OCAF@ +OCC_VIEWER_LIBS=@CAS_VIEWER@ +OCC_MODELER_LIBS=@CAS_MODELER@ +OCC_DATAEXCHANGE_LIBS=@CAS_DATAEXCHANGE@ +OCC_LIBS=@CAS_LDFLAGS@ +OCC_LDPATH=@CAS_LDPATH@ + +# MPICH + +MPICH_INCLUDES=@MPICH_INCLUDES@ +MPICH_LIBS=@MPICH_LIBS@ + +# Swig C++ Python + +SWIG = @SWIG@ +SWIG_FLAGS = @SWIG_FLAGS@ -I$(inc_builddir) -I$(srcdir) -I. + +# OMNIORB + +OMNIORB_ROOT = @OMNIORB_ROOT@ +OMNIORB_INCLUDES = @OMNIORB_INCLUDES@ +OMNIORB_LIBS = @OMNIORB_LIBS@ +OMNIORB_CXXFLAGS = @OMNIORB_CXXFLAGS@ + +OMNIORB_IDL = @OMNIORB_IDL@ +OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@ +OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_srcdir)/idl -I$(top_builddir)/idl/salome \ + -I$(KERNEL_ROOT_DIR)/idl/salome -I$(GEOM_ROOT_DIR)/idl/salome -I$(MED_ROOT_DIR)/idl/salome + +OMNIORB_IDL_CLN_H = @OMNIORB_IDL_CLN_H@ +OMNIORB_IDL_CLN_CXX = @OMNIORB_IDL_CLN_CXX@ +OMNIORB_IDL_CLN_OBJ = @OMNIORB_IDL_CLN_OBJ@ + +OMNIORB_IDL_SRV_H = @OMNIORB_IDL_SRV_H@ +OMNIORB_IDL_SRV_CXX = @OMNIORB_IDL_SRV_CXX@ +OMNIORB_IDL_SRV_OBJ = @OMNIORB_IDL_SRV_OBJ@ + +# Default ORB + +CORBA_ROOT = @CORBA_ROOT@ +CORBA_INCLUDES = @CORBA_INCLUDES@ +CORBA_LIBS = @CORBA_LIBS@ +CORBA_CXXFLAGS = @CORBA_CXXFLAGS@ + +IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_srcdir)/idl -I$(top_builddir)/idl/salome \ + -I$(KERNEL_ROOT_DIR)/idl/salome -I$(GEOM_ROOT_DIR)/idl/salome -I$(MED_ROOT_DIR)/idl/salome +IDLPYFLAGS = @IDLPYFLAGS@ + +IDL = @IDL@ + +IDL_CLN_H = @IDL_CLN_H@ +IDL_CLN_CXX = @IDL_CLN_CXX@ +IDL_CLN_OBJ = @IDL_CLN_OBJ@ + +IDL_SRV_H = @IDL_SRV_H@ +IDL_SRV_CXX = @IDL_SRV_CXX@ +IDL_SRV_OBJ = @IDL_SRV_OBJ@ + +CPPFLAGS+= $(CORBA_INCLUDES) +CXXFLAGS+= $(CORBA_CXXFLAGS) + +# add corba libs when link salome application ! +#LDFLAGS+= $(CORBA_LIBS) +LIBS+=$(CORBA_LIBS) + +## Shared libraries +LT_STATIC_EXEC=@LT_STATIC_EXEC@ +DYNAMIC_DIRS=@DYNAMIC_DIRS@ +LT_LIB=libtool +LT=$(top_builddir)/libtool +LT_COMPILE=$(LT) --mode=compile $(CC) +LT_LINK_LIB=$(LT_LIB) --mode=link $(CC) -rpath $(libdir) +LT_LINK_EXE=$(LT) --mode=link $(CC) $(LT_STATIC_EXEC) -dlopen self -rpath $(bindir) $(DYNAMIC_DIRS) +LT_RUN=$(LT) --mode=execute +LT_INSTALL_PROG=$(LT) --mode=install $(INSTALL_PROGRAM) +LT_INSTALL_LIB=$(LT) --mode=install $(INSTALL_DATA) +LT_UNINSTALL=$(LT) --mode=uninstall $(RM) + +INSTALL=@INSTALL@ +INSTALL_PROGRAM=@INSTALL_PROGRAM@ +INSTALL_DATA=@INSTALL_DATA@ + +# create a symbolic link (or a copie ?) +LN_S=@LN_S@ + +## Installation points +prefix=@prefix@ +exec_prefix=@exec_prefix@ +bindir=@bindir@/salome +libdir=@libdir@/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 + +docdir=${prefix}/doc/salome + +# +# begin of package rules +# + +.PHONY: all lib bin inc resources docs tests install uninstall dep depend depend_idl cleandep mostlyclean clean distclean + +.SUFFIXES: .cxx .cc .c .f .o .lo .idl .py .i .ui .po .qm + +all: + $(MAKE) inc + $(MAKE) depend_idl + $(MAKE) depend + $(MAKE) lib + $(MAKE) bin + $(MAKE) resources + +# +# add target to build administrative files +# + +Makefile: $(top_builddir)/config.status $(srcdir)/Makefile.in + cd $(top_builddir) ; ./config.status + +$(top_builddir)/config.status: $(top_srcdir)/configure + cd $(top_builddir) ; ./config.status --recheck + +# VPATH contain $(srcdir), so make configure is good in top_srcdir and we must add target configure otherwise :-) +ifneq ($(top_srcdir),$(srcdir)) +configure: $(top_srcdir)/configure +endif + +$(top_srcdir)/configure: $(top_srcdir)/configure.in $(top_srcdir)/aclocal.m4 + cd $(top_srcdir) ; autoconf + +$(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 + +$(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 diff --git a/bin/VERSION b/bin/VERSION new file mode 100755 index 000000000..9c664a112 --- /dev/null +++ b/bin/VERSION @@ -0,0 +1 @@ +THIS IS SALOME - SMESH VERSION: 3.1.0 diff --git a/build_configure b/build_configure new file mode 100755 index 000000000..b884b1757 --- /dev/null +++ b/build_configure @@ -0,0 +1,216 @@ +#!/bin/bash + +# +# Tool for updating list of .in file for the SALOME project +# and regenerating configure script +# +# Author : Marc Tajchman - CEA +# Date : 10/10/2002 +# $Header$ +# + +ORIG_DIR=`pwd` +CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` + +######################################################################## +# Test if the KERNEL_ROOT_DIR is set correctly + +if test ! -d "${KERNEL_ROOT_DIR}"; then + echo "failed : KERNEL_ROOT_DIR variable is not correct !" + exit +fi + +# Test if the KERNEL_SRC is set correctly + +#if test ! -d "${KERNEL_SRC}"; then +# echo "failed : KERNEL_SRC variable is not correct !" +# exit +#fi +######################################################################## +# find_in - utility function +# +# usage : +# find_in directory filename +# +# Finds files following the *.in pattern, recursively in the +# directory (first argument). +# Results are appended into the file (second argument) +# +# Difference from the standard unix find is that files are tested +# before directories +# + +find_in() +{ + local i + local f=$2 + +# if the first argument is not a directory, returns + + if [ ! -d "$1" ] ; then + return + fi + +# dont look in the CVS directories + + case $1 in + */CVS) return ;; + */adm_local/*) return ;; + *) ;; + esac + +# for each regular file contained in the directory +# test if it's a .in file + + for i in "$1"/* + do + if [ -f "$i" ] ; then + case $i in + *.in) echo " "$i" \\" >> $f;; + *) ;; + esac + fi + done + +# for each subdirectory of the first argument, proceeds recursively + + for i in "$1"/* + do + if [ -d "$i" ] ; then + find_in "$i" "$f" + fi + done +} + + +####################################################################### +# Generate list of .in files (Makefile.in, config.h.in, etc) +# appending it in file configure.in + +cd ${CONF_DIR} +ABS_CONF_DIR=`pwd` + +# +# Common part of the configure.in file +# +chmod u+w configure.in.base +if ! \cp -f configure.in.base configure.in_tmp1 +then + echo + echo "error : can't create files in" ${CONF_DIR} + echo "aborting ..." + chmod u-w configure.in.base + exit +fi +chmod u-w configure.in.base + +if [ -e "${CONF_DIR}/salome_adm" ] ; then + \rm -f ${CONF_DIR}/salome_adm +fi + +# make a link allowing AC_OUTPUT to find the salome_adm/.../*.in files +echo "" >> configure.in_tmp1 +echo 'ln -fs ${KERNEL_ROOT_DIR}/salome_adm ${ROOT_SRCDIR}/.' >> configure.in_tmp1 + +echo "" >> configure.in_tmp1 +echo "AC_OUTPUT([ \\" >> configure.in_tmp1 + +# +# List of .in files in the adm/unix directory +# These files MUST be on top of AC_OUTPUT list so we +# put them "manually" +# + +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 " ./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 " ./salome_adm/unix/make_module \\" >> configure.in_tmp1 + +\rm -f configure.in_tmp2 configure.in_tmp3 +touch configure.in_tmp2 +find_in . configure.in_tmp2 +sed -e '/^...salome_adm/d' configure.in_tmp2 > configure.in_tmp3 +sed -e '/^...adm_local.unix.make_omniorb/d' configure.in_tmp3 > configure.in_tmp2 +sed -e '/^...adm_local.unix.make_commence/d' configure.in_tmp2 > configure.in_tmp3 +sed -e '/configure.in/d' configure.in_tmp3 > configure.in_tmp2 +sed -e 's/.in / /' configure.in_tmp2 >> configure.in_tmp1 +#sed '/^.salome_adm/d' configure.in_tmp2 > configure.in_tmp3 +#sed '/configure.in/d' configure.in_tmp3 > configure.in_tmp2 +#sed 's/.in / /' configure.in_tmp2 >> configure.in_tmp1 + +echo "])" >> configure.in_tmp1 + +# delete the link created for AC_OUTPUT +echo "" >> configure.in_tmp1 +#echo 'rm -f ${ROOT_SRCDIR}/salome_adm' >> configure.in_tmp1 +\mv configure.in_tmp1 configure.in_new +\rm -f configure.in_tmp2 configure.in_tmp3 + + +######################################################################## +# Create new (or replace old) configure.in file +# Print a message if the file is write protected +# + +echo +if test ! -f configure.in +then + echo -n "Creating new file 'configure.in' ... " + if \mv configure.in_new configure.in >& /dev/null + then + echo "done" + else + echo "error, check your file permissions" + fi +else + echo -n "Updating 'configure.in' file ... " + if ! \cp configure.in configure.in_old >& /dev/null + then + echo + echo + echo "Can't backup previous configure.in" + echo -n "Continue (you will not be able to revert) - (Y/N) ? " + read R + case "x$R" in + xn*) exit;; + xN*) exit;; + esac + echo + echo -n " " + fi + if \cp configure.in_new configure.in >& /dev/null + then + echo "done" + else + echo + echo "error, can't update previous configure.in" + fi +fi + +######################################################################## +# Use autoconf to rebuild the configure script +# + +if test -f configure +then + echo -n "Updating 'configure' script ... " +else + echo -n "Creating 'configure' script ... " +fi + +aclocal --acdir=adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files +if autoconf +then + echo "done" +else + echo "failed (check file permissions and/or user quotas ...)" +fi + +cd ${ORIG_DIR} + +echo diff --git a/configure.in.base b/configure.in.base new file mode 100644 index 000000000..d81e49771 --- /dev/null +++ b/configure.in.base @@ -0,0 +1,399 @@ +# +# PLEASE DO NOT MODIFY configure.in FILE +# +# ALL CHANGES WILL BE DISCARDED BY THE NEXT +# build_configure COMMAND +# +# CHANGES MUST BE MADE IN configure.in.base FILE +# +# +# Author : Marc Tajchman (CEA) +# Date : 28/06/2001 +# Modified by : Patrick GOLDBRONN (CEA) +# Modified by : Marc Tajchman (CEA) +# +# Created from configure.in.base +# + +AC_INIT(src) +AC_CONFIG_AUX_DIR(${KERNEL_ROOT_DIR}/salome_adm/unix/config_files) +AC_CANONICAL_HOST + +PACKAGE=salome +AC_SUBST(PACKAGE) + +VERSION=0.0.1 +AC_SUBST(VERSION) + +dnl +dnl Initialize source and build root directories +dnl + +ROOT_BUILDDIR=`pwd` +ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` +cd $ROOT_SRCDIR +ROOT_SRCDIR=`pwd` +cd $ROOT_BUILDDIR + +AC_SUBST(ROOT_SRCDIR) +AC_SUBST(ROOT_BUILDDIR) + +echo +echo Source root directory : $ROOT_SRCDIR +echo Build root directory : $ROOT_BUILDDIR +echo +echo + +if test -z "$AR"; then + AC_CHECK_PROGS(AR,ar xar,:,$PATH) +fi +AC_SUBST(AR) + +dnl Export the AR macro so that it will be placed in the libtool file +dnl correctly. +export AR + +echo +echo --------------------------------------------- +echo testing make +echo --------------------------------------------- +echo + +AC_PROG_MAKE_SET +AC_PROG_INSTALL +dnl +dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques ! + +AC_ENABLE_DEBUG(yes) +AC_DISABLE_PRODUCTION + +echo --------------------------------------------- +echo testing libtool +echo --------------------------------------------- + +dnl first, we set static to no! +dnl if we want it, use --enable-static +AC_ENABLE_STATIC(no) + +AC_LIBTOOL_DLOPEN +AC_PROG_LIBTOOL + +dnl Fix up the INSTALL macro if it s a relative path. We want the +dnl full-path to the binary instead. +case "$INSTALL" in + *install-sh*) + INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh + ;; +esac + +echo +echo --------------------------------------------- +echo testing C/C++ +echo --------------------------------------------- +echo + +cc_ok=no +dnl inutil car libtool +dnl AC_PROG_CC +AC_PROG_CXX +AC_DEPEND_FLAG +# AC_CC_WARNINGS([ansi]) +cc_ok=yes + +dnl Library libdl : +AC_CHECK_LIB(dl,dlopen) + +dnl add library libm : +AC_CHECK_LIB(m,ceil) + +dnl +dnl Well we use sstream which is not in gcc pre-2.95.3 +dnl We must test if it exists. If not, add it in include ! +dnl + +AC_CXX_HAVE_SSTREAM + +echo +echo --------------------------------------------- +echo BOOST Library +echo --------------------------------------------- +echo + +CHECK_BOOST + +dnl +dnl --------------------------------------------- +dnl testing MPICH +dnl --------------------------------------------- +dnl + +CHECK_MPICH + +echo +echo --------------------------------------------- +echo testing LEX \& YACC +echo --------------------------------------------- +echo + +lex_yacc_ok=no +AC_PROG_YACC +AC_PROG_LEX +lex_yacc_ok=yes + +echo +echo --------------------------------------------- +echo testing python +echo --------------------------------------------- +echo + +CHECK_PYTHON + +echo +echo --------------------------------------------- +echo Testing qwt +echo --------------------------------------------- +echo + +CHECK_QWT + +dnl echo +dnl echo --------------------------------------------- +dnl echo testing java +dnl echo --------------------------------------------- +dnl echo + +dnl CHECK_JAVA + +echo +echo --------------------------------------------- +echo testing swig +echo --------------------------------------------- +echo + +CHECK_SWIG + +echo +echo --------------------------------------------- +echo testing threads +echo --------------------------------------------- +echo + +ENABLE_PTHREADS + +echo +echo --------------------------------------------- +echo testing omniORB +echo --------------------------------------------- +echo + +CHECK_OMNIORB + +dnl echo +dnl echo --------------------------------------------- +dnl echo testing mico +dnl echo --------------------------------------------- +dnl echo + +dnl CHECK_MICO + +echo +echo --------------------------------------------- +echo default ORB : omniORB +echo --------------------------------------------- +echo + +DEFAULT_ORB=omniORB +CHECK_CORBA + +AC_SUBST_FILE(CORBA) +corba=make_$ORB +CORBA=adm_local/unix/$corba + +echo +echo --------------------------------------------- +echo testing openGL +echo --------------------------------------------- +echo + +CHECK_OPENGL + +echo +echo --------------------------------------------- +echo testing QT +echo --------------------------------------------- +echo + +CHECK_QT + +echo +echo --------------------------------------------- +echo testing MSG2QM +echo --------------------------------------------- +echo + +CHECK_MSG2QM + +echo +echo --------------------------------------------- +echo testing VTK +echo --------------------------------------------- +echo + +CHECK_VTK + +echo +echo --------------------------------------------- +echo testing HDF5 +echo --------------------------------------------- +echo + +CHECK_HDF5 + +echo +echo --------------------------------------------- +echo Testing OpenCascade +echo --------------------------------------------- +echo + +CHECK_CAS + +echo +echo --------------------------------------------- +echo Testing html generators +echo --------------------------------------------- +echo + +CHECK_HTML_GENERATORS + +echo +echo --------------------------------------------- +echo Testing Kernel +echo --------------------------------------------- +echo + +CHECK_KERNEL + +echo +echo --------------------------------------------- +echo Testing Geom +echo --------------------------------------------- +echo + +CHECK_GEOM + +echo +echo --------------------------------------------- +echo Testing Med +echo --------------------------------------------- +echo + +CHECK_MED + +echo +echo --------------------------------------------- +echo Summary +echo --------------------------------------------- +echo + +echo Configure +variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok qwt_ok Kernel_ok Geom_ok Med_ok" + +for var in $variables +do + printf " %10s : " `echo \$var | sed -e "s,_ok,,"` + eval echo \$$var +done + +echo +echo "Default ORB : $DEFAULT_ORB" +echo + +dnl generals files which could be included in every makefile + +AC_SUBST_FILE(COMMENCE) COMMENCE=adm_local/unix/make_commence +AC_SUBST_FILE(CONCLUDE) CONCLUDE=adm_local/unix/make_conclude +AC_SUBST_FILE(MODULE) MODULE=salome_adm/unix/make_module + +dnl les dependences +AC_SUBST_FILE(DEPEND) DEPEND=salome_adm/unix/depend + +dnl We don t need to say when we re entering directories if we re using +dnl GNU make becuase make does it for us. +if test "X$GMAKE" = "Xyes"; then + AC_SUBST(SETX) SETX=":" +else + AC_SUBST(SETX) SETX="set -x" +fi + +# make other build directories +for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources idl +do +# if test ! -d $rep ; then +# eval mkdir $rep +# fi + $INSTALL -d $rep +done + +echo +echo --------------------------------------------- +echo copying resource files, shell scripts, and +echo xml files +echo --------------------------------------------- +echo + + +dnl copy resources directories + +#for i in `find $ROOT_SRCDIR -name 'resources' -print` +#do +# local_res=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"` +# local_res_dir=`echo $local_res | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` +# mkdir -p $local_res_dir +# cd $local_res_dir +# ln -fs $i +# echo $local_res +# cd $ROOT_BUILDDIR +#done + +dnl copy shells and utilities contained in the bin directory +dnl excluding .in files (treated in AC-OUTPUT below) and CVS +dnl directory + +mkdir -p bin/salome +cd bin/salome +for i in $ROOT_SRCDIR/bin/* +do + local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"` + case "$local_bin" in + *.in | *~) ;; + ./bin/CVS | ./bin/salome) ;; + *) /usr/bin/install $i .; echo $local_bin ;; + esac +done +cd $ROOT_BUILDDIR + +AC_SUBST_FILE(ENVSCRIPT) ENVSCRIPT=salome_adm/unix/envScript + +dnl copy xml files to the build tree (lib directory) +dnl pourquoi ???? + +#cd lib +#for i in `find $ROOT_SRCDIR -name "*.xml" -print` +#do +# ln -fs $i +# echo `echo $i | sed -e "s,$ROOT_SRCDIR,.,"` +#done +#cd $ROOT_BUILDDIR + + +echo +echo --------------------------------------------- +echo generating Makefiles and configure files +echo --------------------------------------------- +echo + +AC_OUTPUT_COMMANDS([ \ + chmod +x ./bin/* \ +]) + +## do not delete this line diff --git a/doc/salome/Makefile.in b/doc/salome/Makefile.in new file mode 100644 index 000000000..bd9a4eab5 --- /dev/null +++ b/doc/salome/Makefile.in @@ -0,0 +1,44 @@ + +# -* Makefile *- +# +# Author : Patrick GOLDBRONN (CEA) +# Date : 30/11/2001 +# $Header$ +# +# source path +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@ + +SUBDIRS= tui gui + +@COMMENCE@ + +docs: + @@SETX@; for d in $(SUBDIRS); 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; \ + done + +distclean: clean + @@SETX@; for d in $(SUBDIRS); do \ + (cd $$d && $(MAKE) $@) || exit 1; \ + done + +install: + $(MAKE) docs + (cd tui && $(MAKE) install); + (cd gui && $(MAKE) install); + cp -f SMESH_index_v3.1.0.html $(docdir) + +uninstall: + @@SETX@; for d in $(SUBDIRS); do \ + (cd $$d && $(MAKE) $@) || exit 1; \ + 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 new file mode 100644 index 000000000..8d4ef121a --- /dev/null +++ b/doc/salome/SMESH_index_v3.1.0.html @@ -0,0 +1,95 @@ + + +
+ + + + +![]() |
+ + + + | +
+
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.
+ ++ + + + diff --git a/doc/salome/gui/SMESH/aspect_ratio_3d.htm b/doc/salome/gui/SMESH/aspect_ratio_3d.htm new file mode 100755 index 000000000..20573a1fd --- /dev/null +++ b/doc/salome/gui/SMESH/aspect_ratio_3d.htm @@ -0,0 +1,163 @@ + + + + + +
+ +
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.
+ ++ +
+ +
+ +
+ + + + diff --git a/doc/salome/gui/SMESH/borders_at_multi-connection.htm b/doc/salome/gui/SMESH/borders_at_multi-connection.htm new file mode 100755 index 000000000..cba301b96 --- /dev/null +++ b/doc/salome/gui/SMESH/borders_at_multi-connection.htm @@ -0,0 +1,115 @@ + + + + + +
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.
+ ++ + + + diff --git a/doc/salome/gui/SMESH/borders_at_multiconnection_2d.htm b/doc/salome/gui/SMESH/borders_at_multiconnection_2d.htm new file mode 100755 index 000000000..9587602aa --- /dev/null +++ b/doc/salome/gui/SMESH/borders_at_multiconnection_2d.htm @@ -0,0 +1,110 @@ + + + + + +
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 new file mode 100755 index 000000000..8652fd75f --- /dev/null +++ b/doc/salome/gui/SMESH/clipping.htm @@ -0,0 +1,133 @@ + + + + + +
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 new file mode 100755 index 000000000..78d8030db --- /dev/null +++ b/doc/salome/gui/SMESH/constructing_meshes.htm @@ -0,0 +1,727 @@ + + + + + +
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 new file mode 100755 index 000000000..2e1891e53 --- /dev/null +++ b/doc/salome/gui/SMESH/cshdat_robohelp.htm @@ -0,0 +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)
+ ++ + + + diff --git a/doc/salome/gui/SMESH/deleting_groups.htm b/doc/salome/gui/SMESH/deleting_groups.htm new file mode 100755 index 000000000..85b273571 --- /dev/null +++ b/doc/salome/gui/SMESH/deleting_groups.htm @@ -0,0 +1,114 @@ + + + + + +
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 new file mode 100755 index 000000000..8195fc580 --- /dev/null +++ b/doc/salome/gui/SMESH/display_entity.htm @@ -0,0 +1,101 @@ + + + + + +In this submenu you can choose to display only faces,
+ ++ +
+ +
only edges,
+ ++ +
+ +
or both.
+ + + + diff --git a/doc/salome/gui/SMESH/ehelp.xml b/doc/salome/gui/SMESH/ehelp.xml new file mode 100755 index 000000000..be729a46c --- /dev/null +++ b/doc/salome/gui/SMESH/ehelp.xml @@ -0,0 +1,10 @@ + + +