NRI : First integration.

This commit is contained in:
nri 2003-05-19 13:18:36 +00:00
parent 6b640d82d8
commit 0b959120c5
144 changed files with 11257 additions and 5 deletions

145
Makefile.in Normal file
View File

@ -0,0 +1,145 @@
# -* 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
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_angle.png \
mesh_area.png \
mesh_aspect.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_info.png \
mesh_init.png \
mesh_length.png \
mesh_line_n.png \
mesh_line.png \
mesh_move_node.png \
mesh_orientation.png \
mesh.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_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_mesh_warn.png \
mesh_triangle_n.png \
mesh_triangle.png \
mesh_update.png \
mesh_vertex_n.png \
mesh_vertex.png \
mesh_wireframe.png \
mesh_wrap.png \
ModuleMesh.png \
select1.png \
SMESH_en.xml
# 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.h
-$(RM) $@
$(LN_S) ../../$< $@
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) $$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

206
build_configure Executable file
View File

@ -0,0 +1,206 @@
#!/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 ;;
*) ;;
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
# 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}/salome_adm' >> 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 " ./salome_adm/unix/make_omniorb \\" >> configure.in_tmp1
echo " ./salome_adm/unix/envScript \\" >> configure.in_tmp1
echo " ./salome_adm/unix/make_commence \\" >> configure.in_tmp1
echo " ./salome_adm/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 '/^.*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=${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

366
configure.in.base Normal file
View File

@ -0,0 +1,366 @@
#
# 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
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 java
echo ---------------------------------------------
echo
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
echo
echo ---------------------------------------------
echo testing mico
echo ---------------------------------------------
echo
CHECK_MICO
echo
echo ---------------------------------------------
echo default ORB : omniORB
echo ---------------------------------------------
echo
DEFAULT_ORB=omniORB
CHECK_CORBA
AC_SUBST_FILE(CORBA)
corba=make_$ORB
CORBA=salome_adm/unix/$corba
echo
echo ---------------------------------------------
echo testing openGL
echo ---------------------------------------------
echo
CHECK_OPENGL
echo
echo ---------------------------------------------
echo testing QT
echo ---------------------------------------------
echo
CHECK_QT
echo
echo ---------------------------------------------
echo testing VTK
echo ---------------------------------------------
echo
CHECK_VTK
echo
echo ---------------------------------------------
echo testing HDF5
echo ---------------------------------------------
echo
CHECK_HDF5
echo
echo ---------------------------------------------
echo testing MED2
echo ---------------------------------------------
echo
CHECK_MED2
echo
echo ---------------------------------------------
echo Testing OpenCascade
echo ---------------------------------------------
echo
CHECK_CAS
echo
echo ---------------------------------------------
echo Testing Kernel
echo ---------------------------------------------
echo
CHECK_KERNEL
echo
echo ---------------------------------------------
echo Testing Geom
echo ---------------------------------------------
echo
CHECK_GEOM
echo
echo ---------------------------------------------
echo Summary
echo ---------------------------------------------
echo
echo Configure
variables="cc_ok lex_yacc_ok python_ok java_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok mico_ok occ_ok Kernel_ok Geom_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=salome_adm/unix/make_commence
AC_SUBST_FILE(CONCLUDE) CONCLUDE=salome_adm/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 share/salome/doc 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
cd bin
for i in $ROOT_SRCDIR/bin/*
do
local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
case "$local_bin" in
*.in | *~) ;;
./bin/CVS) ;;
*) ln -fs $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

76
idl/Makefile.in Normal file
View File

@ -0,0 +1,76 @@
#
# generate dependencies for idl file :
#
# source path
top_srcdir=@top_srcdir@
top_builddir=..
srcdir=@srcdir@
VPATH=.:$(srcdir):${KERNEL_ROOT_DIR}/idl/salome:${GEOM_ROOT_DIR}/idl/salome
@COMMENCE@
IDL_FILES = \
SALOME_Component.idl \
SALOMEDS.idl \
SALOMEDS_Attributes.idl \
SALOME_Exception.idl \
Logger.idl \
SALOME_ModuleCatalog.idl \
GEOM_Shape.idl \
GEOM_Gen.idl \
SMESH_Gen.idl \
SMESH_Mesh.idl \
SMESH_Hypothesis.idl \
SMESH_BasicHypothesis.idl
PY_CLIENT_IDL = $(IDL_FILES)
# we copy all idl file in $(top_builddir)/idl
inc: $(IDL_FILES:%=$(top_builddir)/idl/%)
$(IDL_FILES:%=$(top_builddir)/idl/%):$(top_builddir)/idl/%:%
# $(CP) $< $@
cp -f $< $@
lib: pyidl
PYTHON_BUILD_SITE=$(top_builddir)/lib/python$(PYTHON_VERSION)/site-packages/@PACKAGE@
pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py)
$(PYTHON_BUILD_SITE):
$(INSTALL) -d $@
$(PYTHON_BUILD_SITE)/%_idl.py: %.idl
$(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_BUILD_SITE) $<
# install python client (generated from idl file
install: install-pyidl install-idl
# create directory $(idldir) and copy idl files into it
install-idl: $(IDL_FILES)
$(INSTALL) -d $(idldir)
$(INSTALL_DATA) $^ $(idldir)
install-pyidl: $(IDL_FILES)
$(INSTALL) -d $(PYTHON_SITE_INSTALL)
@for file in $^ dummy; do \
if [ $$file != "dummy" ]; then \
$(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_SITE_INSTALL) $$file ; \
fi ; \
done ;
#@ CONCLUDE @
cleandep:
-$(RM) .dep*
distclean:
-$(RM) *.py
-$(RM) $(IDL_FILES:%=$(top_builddir)/idl/%)
-$(RM) Makefile

View File

@ -0,0 +1,64 @@
//=============================================================================
// File : SMESH_BasicHypothesis.idl
// Created : mer mai 15 13:37:18 CEST 2002
// Author : Paul RASCLE, EDF
// Project : SALOME
// Copyright : EDF 2002
// $Header$
//=============================================================================
#ifndef _SMESH_BASICHYPOTHESIS_IDL_
#define _SMESH_BASICHYPOTHESIS_IDL_
#include "SALOME_Exception.idl"
#include "SMESH_Hypothesis.idl"
module SMESH
{
interface SMESH_LocalLength : SMESH_Hypothesis
{
void SetLength(in double length)
raises (SALOME::SALOME_Exception);
double GetLength();
};
interface SMESH_NumberOfSegments : SMESH_Hypothesis
{
void SetNumberOfSegments(in long segmentsNumber)
raises (SALOME::SALOME_Exception);
long GetNumberOfSegments();
};
interface SMESH_MaxElementArea : SMESH_Hypothesis
{
void SetMaxElementArea(in double area)
raises (SALOME::SALOME_Exception);
double GetMaxElementArea();
};
interface SMESH_MaxElementVolume : SMESH_Hypothesis
{
void SetMaxElementVolume(in double volume)
raises (SALOME::SALOME_Exception);
double GetMaxElementVolume();
};
interface SMESH_Regular_1D : SMESH_1D_Algo
{
};
interface SMESH_MEFISTO_2D : SMESH_2D_Algo
{
};
interface SMESH_Quadrangle_2D : SMESH_2D_Algo
{
};
interface SMESH_Hexa_3D : SMESH_3D_Algo
{
};
};
#endif

96
idl/SMESH_Gen.idl Normal file
View File

@ -0,0 +1,96 @@
//=============================================================================
// File : SMESH_Gen.idl
// Created : jeu avr 11 15:26:35 CEST 2002
// Author : Paul RASCLE, EDF
// Project : SALOME
// Copyright : EDF 2002
// $Header$
//=============================================================================
#ifndef _SMESH_GEN_IDL_
#define _SMESH_GEN_IDL_
#include "SALOME_Exception.idl"
#include "SALOME_Component.idl"
#include "SALOMEDS.idl"
#include "GEOM_Gen.idl"
#include "GEOM_Shape.idl"
#include "SMESH_Mesh.idl"
#include "SMESH_Hypothesis.idl"
module SMESH
{
typedef sequence<GEOM::GEOM_Shape> shape_array;
interface SMESH_Gen : Engines::Component, SALOMEDS::Driver
{
/*!
* Create an hypothesis that can be shared by differents parts of the mesh.
* An hypothesis is either:
* - a method used to generate or modify a part of the mesh (algorithm).
* - a parameter or a law used by an algorithm.
* Algorithms are 1D, 2D or 3D.
*/
SMESH_Hypothesis CreateHypothesis( in string anHyp,
in long studyId)
raises (SALOME::SALOME_Exception);
/*!
* Create a Mesh object, given a geometry shape.
* Mesh is created empty (no points, no elements).
* Shape is explored via GEOM_Client to create local copies.
* of TopoDS_Shapes and bind CORBA references of shape & subshapes
* with TopoDS_Shapes
*/
SMESH_Mesh Init(in GEOM::GEOM_Gen geomEngine,
in long studyId,
in GEOM::GEOM_Shape aShape)
raises (SALOME::SALOME_Exception);
/*!
* Create a Mesh object, without a geometry shape reference
*/
// SMESH_Mesh NewEmpty(in GEOM::GEOM_Gen geomEngine,
// in long studyId)
// raises (SALOME::SALOME_Exception);
/*!
* Mesh a subShape.
* First, verify list of hypothesis associated with the subShape,
* return NOK if hypothesis are not sufficient
*/
boolean Compute(in SMESH_Mesh aMesh, in GEOM::GEOM_Shape aSubShape)
raises (SALOME::SALOME_Exception);
/*!
*
*/
boolean IsReadyToCompute(in SMESH_Mesh aMesh, in GEOM::GEOM_Shape aSubShape)
raises (SALOME::SALOME_Exception);
/*!
*
*/
long_array GetSubShapesId(in GEOM::GEOM_Gen geomEngine,
in long studyId,
in GEOM::GEOM_Shape mainShape,
in shape_array listOfSubShape)
raises (SALOME::SALOME_Exception);
/*!
*
*/
// long_array GetSubMeshesState(in GEOM::GEOM_Gen geomEngine,
// in long studyId,
// in shape_array listOfSubShape)
// raises (SALOME::SALOME_Exception);
};
};
#endif

71
idl/SMESH_Hypothesis.idl Normal file
View File

@ -0,0 +1,71 @@
//=============================================================================
// File : SMESH_Hypothesis.idl
// Created : jeu avr 11 19:26:16 CEST 2002
// Author : Paul RASCLE, EDF
// Project : SALOME
// Copyright : EDF 2002
// $Header$
//=============================================================================
#ifndef _SMESH_HYPOTHESIS_IDL_
#define _SMESH_HYPOTHESIS_IDL_
#include "SALOME_Exception.idl"
module SMESH
{
interface SMESH_Hypothesis;
typedef sequence<SMESH_Hypothesis> ListOfHypothesis;
typedef sequence<string> ListOfHypothesisName;
interface SMESH_Hypothesis
{
/*!
* Get the Hypothesis typeName
*/
string GetName();
/*!
* Get the internal Id
*/
long GetId();
};
interface SMESH_Algo : SMESH_Hypothesis
{
/*!
* Get list of hypothesis that can be used with this algorithm
*/
ListOfHypothesisName GetCompatibleHypothesis();
};
interface SMESH_1D_Algo : SMESH_Algo
{
/*!
*
*/
};
interface SMESH_2D_Algo : SMESH_Algo
{
/*!
*
*/
};
interface SMESH_3D_Algo : SMESH_Algo
{
/*!
*
*/
};
};
// -----------------------------------------------------------------
// Specific Algorithms in separate idl file
// -----------------------------------------------------------------
#endif

262
idl/SMESH_Mesh.idl Normal file
View File

@ -0,0 +1,262 @@
//=============================================================================
// File : SMESH_Mesh.idl
// Created : jeu avr 11 15:31:39 CEST 2002
// Author : Paul RASCLE, EDF
// Project : SALOME
// Copyright : EDF 2002
// $Header$
//=============================================================================
#ifndef _SMESH_MESH_IDL_
#define _SMESH_MESH_IDL_
#include "SALOME_Exception.idl"
#include "SMESH_Hypothesis.idl"
#include "GEOM_Shape.idl"
#include "MED.idl"
module SMESH
{
typedef sequence<double> double_array ;
typedef sequence<long> long_array ;
typedef sequence<string> string_array ;
enum log_command
{
ADD_NODE,
ADD_EDGE,
ADD_TRIANGLE,
ADD_QUADRANGLE,
ADD_TETRAHEDRON,
ADD_PYRAMID,
ADD_PRISM,
ADD_HEXAHEDRON,
REMOVE_NODE,
REMOVE_ELEMENT
};
struct log_block
{
long commandType;
long number;
double_array coords;
long_array indexes;
};
typedef sequence<log_block> log_array;
interface SMESH_subMesh;
interface SMESH_MeshEditor;
interface SMESH_Mesh
{
/*!
* Associate a Shape to a Mesh created with NewEmpty
*/
// boolean SetMesh(in GEOM::GEOM_Shape aShape)
// raises (SALOME::SALOME_Exception);
/*!
* Get the subMesh object associated to a subShape. The subMesh object
* gives access to nodes and elements IDs.
* SubMesh will be used instead of SubShape in a next idl version to
* adress a specific subMesh...
*/
SMESH_subMesh GetElementsOnShape(in GEOM::GEOM_Shape aSubShape)
raises (SALOME::SALOME_Exception);
/*!
* Create a subMesh without reference to a subShape
*/
// SMESH_subMesh NewEmpty()
// raises (SALOME::SALOME_Exception);
/*!
* Add hypothesis to the mesh, under a particular subShape
* (or the main shape itself)
* The Add method is only used to prepare the build of the mesh and store
* the algorithms and associated parameters.
* Actual job of mesh the shape is done by MESH_Gen.
* @params
* - aSubShape : subShape obtained by a shape explode in GEOM
* (or main shape)
* - anHyp : hypothesis object
* @return
* - OK if the hypothesis is compatible with the subShape
* (and all previous hypothesis on the subShape)
* - NOK if the hypothesis is not compatible with the subShape
* (or one previous hypothesis on the subShape)
* raises exception if hypothesis has not been created
*/
boolean AddHypothesis(in GEOM::GEOM_Shape aSubShape, in SMESH_Hypothesis anHyp)
raises (SALOME::SALOME_Exception);
// boolean AddHypothesis(in SMESH_subMesh aSubMesh, in SMESH_Hypothesis anHyp)
// raises (SALOME::SALOME_Exception);
/*!
* Remove an hypothesis previouly added with AddHypothesis.
*/
boolean RemoveHypothesis(in GEOM::GEOM_Shape aSubShape,
in SMESH_Hypothesis anHyp)
raises (SALOME::SALOME_Exception);
// boolean RemoveHypothesis(in SMESH_subMesh aSubMesh,
// in SMESH_Hypothesis anHyp)
// raises (SALOME::SALOME_Exception);
/*!
* Get the list of hypothesis added on a subShape
*/
ListOfHypothesis GetHypothesisList(in GEOM::GEOM_Shape aSubShape)
raises (SALOME::SALOME_Exception);
// ListOfHypothesis GetHypothesisList(in SMESH_subMesh aSubMesh)
// raises (SALOME::SALOME_Exception);
/*!
* Get the log of nodes and elements added or removed since previous
* clear of the log.
* @params
* - clearAfterGet : log is emptied after Get (safe if concurrents access)
*/
// string_array GetLog(in boolean clearAfterGet)
// raises (SALOME::SALOME_Exception);
log_array GetLog(in boolean clearAfterGet)
raises (SALOME::SALOME_Exception);
/*!
* Clear the log of nodes and elements added or removed since previous
* clear. Must be used immediately after GetLog if clearAfterGet is false.
*/
void ClearLog()
raises (SALOME::SALOME_Exception);
/*!
* Get the internal Id
*/
long GetId();
/*!
* Get the study Id
*/
long GetStudyId();
SMESH_MeshEditor GetMeshEditor()
raises (SALOME::SALOME_Exception);
/*!
* Export Mesh with DAT and MED Formats
*/
void ExportDAT( in string file )
raises (SALOME::SALOME_Exception);
void ExportMED( in string file )
raises (SALOME::SALOME_Exception);
void ExportUNV( in string file )
raises (SALOME::SALOME_Exception);
/*!
* Get MED Mesh
*/
SALOME_MED::MESH GetMEDMesh()
raises (SALOME::SALOME_Exception);
long NbNodes()
raises (SALOME::SALOME_Exception);
long NbEdges()
raises (SALOME::SALOME_Exception);
long NbFaces()
raises (SALOME::SALOME_Exception);
long NbTriangles()
raises (SALOME::SALOME_Exception);
long NbQuadrangles()
raises (SALOME::SALOME_Exception);
long NbVolumes()
raises (SALOME::SALOME_Exception);
long NbTetras()
raises (SALOME::SALOME_Exception);
long NbHexas()
raises (SALOME::SALOME_Exception);
long NbSubMesh()
raises (SALOME::SALOME_Exception);
};
interface SMESH_subMesh
{
/*!
*
*/
long GetNumberOfElements()
raises (SALOME::SALOME_Exception);
/*!
*
*/
long GetNumberOfNodes()
raises (SALOME::SALOME_Exception);
/*!
*
*/
long_array GetElementsId()
raises (SALOME::SALOME_Exception);
/*!
*
*/
long_array GetNodesId()
raises (SALOME::SALOME_Exception);
/*!
* Get SMESH_Mesh which stores nodes coordinates & elements definition
*/
SMESH_Mesh GetFather()
raises (SALOME::SALOME_Exception);
/*!
* Get the internal Id
*/
long GetId();
/*!
* Get MED subMesh
*/
SALOME_MED::FAMILY GetFamily()
raises (SALOME::SALOME_Exception);
};
/*
* This interface makes modifications on the Mesh - removing elements and nodes
*/
interface SMESH_MeshEditor {
boolean RemoveElements(in long_array IDsOfElements)
raises (SALOME::SALOME_Exception);
boolean RemoveNodes(in long_array IDsOfNodes)
raises (SALOME::SALOME_Exception);
boolean AddNode(in double x, in double y, in double z)
raises (SALOME::SALOME_Exception);
boolean AddEdge(in long_array IDsOfNodes)
raises (SALOME::SALOME_Exception);
boolean AddFace(in long_array IDsOfNodes)
raises (SALOME::SALOME_Exception);
boolean AddVolume(in long_array IDsOfNodes)
raises (SALOME::SALOME_Exception);
};
};
#endif

BIN
resources/ModuleMesh.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

169
resources/SMESHCatalog.xml Normal file
View File

@ -0,0 +1,169 @@
<?xml version='1.0' encoding='us-ascii' ?>
<!-- XML component catalog -->
<begin-catalog>
<!-- Path prefix information -->
<path-prefix-list>
</path-prefix-list>
<!-- Component list -->
<component-list>
<component>
<!-- Component identification -->
<component-name>SMESH</component-name>
<component-type>Mesh</component-type>
<component-author>NRI</component-author>
<component-version> 1.0</component-version>
<component-comment>New Mesh component</component-comment>
<component-multistudy>1</component-multistudy>
<component-icone>ModuleMesh.png</component-icone>
<component-interface-list>
<component-interface-name>SMESH</component-interface-name>
<component-interface-comment></component-interface-comment>
<component-service-list>
<component-service>
<service-name>CreateHypothesis</service-name>
<service-author></service-author>
<service-version></service-version>
<service-comment></service-comment>
<service-by-default>1</service-by-default>
<inParameter-list>
<inParameter>
<inParameter-type>string</inParameter-type>
<inParameter-name>anHyp</inParameter-name>
<inParameter-comment></inParameter-comment>
</inParameter>
<inParameter>
<inParameter-type>long</inParameter-type>
<inParameter-name>studyId</inParameter-name>
<inParameter-comment></inParameter-comment>
</inParameter>
</inParameter-list>
<outParameter-list>
<outParameter>
<outParameter-type>SMESH_Hypothesis</outParameter-type>
<outParameter-name>aHyp</outParameter-name>
<outParameter-comment></outParameter-comment>
</outParameter>
</outParameter-list>
</component-service>
<component-service>
<service-name>Init</service-name>
<service-author></service-author>
<service-version></service-version>
<service-comment></service-comment>
<service-by-default>1</service-by-default>
<inParameter-list>
<inParameter>
<inParameter-type>GEOM_Gen</inParameter-type>
<inParameter-name>geomEngine</inParameter-name>
<inParameter-comment></inParameter-comment>
</inParameter>
<inParameter>
<inParameter-type>long</inParameter-type>
<inParameter-name>studyId</inParameter-name>
<inParameter-comment></inParameter-comment>
</inParameter>
<inParameter>
<inParameter-type>GEOM_Shape</inParameter-type>
<inParameter-name>aShape</inParameter-name>
<inParameter-comment></inParameter-comment>
</inParameter>
</inParameter-list>
<outParameter-list>
<outParameter>
<outParameter-type>SMESH_Mesh</outParameter-type>
<outParameter-name>aMesh</outParameter-name>
<outParameter-comment></outParameter-comment>
</outParameter>
</outParameter-list>
</component-service>
<component-service>
<service-name>Compute</service-name>
<service-author></service-author>
<service-version></service-version>
<service-comment></service-comment>
<service-by-default>1</service-by-default>
<inParameter-list>
<inParameter>
<inParameter-type>SMESH_Mesh</inParameter-type>
<inParameter-name>aMesh</inParameter-name>
<inParameter-comment></inParameter-comment>
</inParameter>
<inParameter>
<inParameter-type>GEOM_Shape</inParameter-type>
<inParameter-name>aSubShape</inParameter-name>
<inParameter-comment></inParameter-comment>
</inParameter>
</inParameter-list>
<outParameter-list>
<outParameter>
<outParameter-type>boolean</outParameter-type>
<outParameter-name>res</outParameter-name>
<outParameter-comment>Result</outParameter-comment>
</outParameter>
</outParameter-list>
</component-service>
<component-service>
<service-name>IsReadyToCompute</service-name>
<service-author></service-author>
<service-version></service-version>
<service-comment></service-comment>
<service-by-default>1</service-by-default>
<inParameter-list>
<inParameter>
<inParameter-type>SMESH_Mesh</inParameter-type>
<inParameter-name>aMesh</inParameter-name>
<inParameter-comment></inParameter-comment>
</inParameter>
<inParameter>
<inParameter-type>GEOM_Shape</inParameter-type>
<inParameter-name>aSubShape</inParameter-name>
<inParameter-comment></inParameter-comment>
</inParameter>
</inParameter-list>
<outParameter-list>
<outParameter-type>boolean</outParameter-type>
<outParameter-name>res</outParameter-name>
<outParameter-comment>Result</outParameter-comment>
</outParameter-list>
</component-service>
</component-service-list>
<component-interface-name>SMESH_Mesh</component-interface-name>
<component-interface-comment></component-interface-comment>
<component-service-list>
<component-service>
<service-name>AddHypothesis</service-name>
<service-author></service-author>
<service-version></service-version>
<service-comment></service-comment>
<service-by-default>1</service-by-default>
<inParameter-list>
<inParameter>
<inParameter-type>GEOM_Shape</inParameter-type>
<inParameter-name>aSubShape</inParameter-name>
<inParameter-comment></inParameter-comment>
</inParameter>
<inParameter>
<inParameter-type>SMESH_Hypothesis</inParameter-type>
<inParameter-name>aHyp</inParameter-name>
<inParameter-comment></inParameter-comment>
</inParameter>
</inParameter-list>
<outParameter-list>
<outParameter>
<outParameter-type>boolean</outParameter-type>
<outParameter-name>res</outParameter-name>
<outParameter-comment>Result</outParameter-comment>
</outParameter>
</outParameter-list>
</component-service>
</component-service-list>
</component-interface-list>
<constraint>hostname = localhost</constraint>
</component>
</component-list>
</begin-catalog>

246
resources/SMESH_en.xml Normal file
View File

@ -0,0 +1,246 @@
<?xml version='1.0' encoding='us-ascii'?>
<!DOCTYPE application PUBLIC "" "desktop.dtd">
<!-- GUI customization for MESH component -->
<application
title="Mesh component"
date="13/05/2002"
author="Nicolas REJNERI"
appId="Mesh for Salome" >
<desktop>
<menubar>
<!-- ************************** File (menubar) ************************************ -->
<menu-item label-id="File" item-id="1" pos-id="">
<submenu label-id="Import" item-id="11" pos-id="8">
<popup-item item-id="111" pos-id="" label-id="DAT file" icon-id="" tooltip-id="" accel-id="Ctrl+B" toggle-id="" execute-action=""/>
<popup-item item-id="112" pos-id="" label-id="UNV File" icon-id="" tooltip-id="" accel-id="Ctrl+I" toggle-id="" execute-action=""/>
<popup-item item-id="113" pos-id="" label-id="MED File" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</submenu>
<endsubmenu />
<submenu label-id="Export" item-id="12" pos-id="9">
<popup-item item-id="121" pos-id="" label-id="DAT File" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="122" pos-id="" label-id="MED File" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="123" pos-id="" label-id="UNV File" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</submenu>
<endsubmenu />
<separator pos-id="10"/>
</menu-item>
<!-- ************************* Edit (menubar) ************************************** -->
<menu-item label-id="Edit" item-id="3" pos-id="2">
<separator pos-id=""/>
<popup-item item-id="33" pos-id="" label-id="Delete" icon-id="delete.png" tooltip-id="" accel-id="" toggle-id="" execute-action="" />
</menu-item>
<!-- ************************** Hypothesis (menubar) ************************************ -->
<menu-item label-id="Hypotheses" item-id="50" pos-id="3">
<popup-item item-id="5030" pos-id="" label-id="Average length" icon-id="mesh_hypo_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="5031" pos-id="" label-id="Nb. Segments" icon-id="mesh_hypo_segment.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="5032" pos-id="" label-id="Max. Triangle Area" icon-id="mesh_hypo_area.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="5033" pos-id="" label-id="Max. Hexahedron Volume" icon-id="mesh_hypo_volume.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="5000" pos-id="" label-id="Wire discretisation" icon-id="mesh_algo_regular.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="5010" pos-id="" label-id="Triangle (Mefisto)" icon-id="mesh_algo_mefisto.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="5011" pos-id="" label-id="Quadrangle (Mapping)" icon-id="mesh_algo_quad.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="5020" pos-id="" label-id="Hexaedron (i,j,k)" icon-id="mesh_algo_hexa.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</menu-item>
<!-- ************************** Mesh (menubar) ************************************ -->
<menu-item label-id="Mesh" item-id="70" pos-id="4">
<popup-item item-id="703" pos-id="" label-id="Global Hyp." icon-id="mesh_init.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="702" pos-id="" label-id="Local Hyp." icon-id="mesh_add_sub.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="704" pos-id="" label-id="Edit Hyp." icon-id="mesh_edit.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="701" pos-id="" label-id="Compute" icon-id="mesh_compute.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="900" pos-id="" label-id="Mesh Infos" icon-id="mesh_info.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</menu-item>
<!-- ************************** Control (menubar) ************************************ -->
<menu-item label-id="Controls" item-id="60" pos-id="5">
<popup-item item-id="6001" pos-id="" label-id="Length" icon-id="mesh_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6002" pos-id="" label-id="Connectivity" icon-id="mesh_connectivity.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6011" pos-id="" label-id="Area" icon-id="mesh_area.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6012" pos-id="" label-id="Taper" icon-id="mesh_taper.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6013" pos-id="" label-id="Aspect Ratio" icon-id="mesh_aspect.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6014" pos-id="" label-id="Minimum angle" icon-id="mesh_angle.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6015" pos-id="" label-id="Warp" icon-id="mesh_wrap.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6016" pos-id="" label-id="Skew" icon-id="mesh_skew.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</menu-item>
<!-- ************************** Entity (menubar) ************************************ -->
<menu-item label-id="Modification" item-id="40" pos-id="6">
<submenu label-id="Add" item-id="402" pos-id="">
<popup-item item-id="400" pos-id="" label-id="Node" icon-id="mesh_vertex.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="401" pos-id="" label-id="Beam" icon-id="mesh_line.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="4021" pos-id="" label-id="Triangle" icon-id="mesh_triangle.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="4022" pos-id="" label-id="Quadrangle" icon-id="mesh_quad.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="4031" pos-id="" label-id="Tetrahedron" icon-id="mesh_tetra.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="4032" pos-id="" label-id="Hexahedron" icon-id="mesh_hexa.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</submenu>
<endsubmenu />
<submenu label-id="Remove" item-id="403" pos-id="">
<popup-item item-id="4041" pos-id="" label-id="Nodes" icon-id="mesh_rem_node.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="4042" pos-id="" label-id="Elements" icon-id="mesh_rem_element.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</submenu>
<endsubmenu />
<popup-item item-id="405" pos-id="" label-id="Move Node" icon-id="mesh_move_node.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="806" pos-id="" label-id="Orientation" icon-id="mesh_orientation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="807" pos-id="" label-id="Diagonal Inversion" icon-id="mesh_diagonal.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</menu-item>
<!-- ************************** Numbering (menubar) ************************************ -->
<menu-item label-id="Numbering" item-id="80" pos-id="7">
<popup-item item-id="9010" pos-id="" label-id="Display Nodes #" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
<popup-item item-id="9011" pos-id="" label-id="Display Elements #" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
</menu-item>
<!-- ********************************* Settings (menubar) ********************************* -->
<menu-item label-id="Preferences" item-id="4" pos-id="">
<submenu label-id="Mesh" item-id="100" pos-id="-1">
<submenu label-id="Display Mode" item-id="1000" pos-id="">
<popup-item item-id="10001" pos-id="" label-id="Wireframe" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
<popup-item item-id="10002" pos-id="" label-id="Shading" icon-id="" tooltip-id=""accel-id="" toggle-id="true" execute-action=""/>
<popup-item item-id="10003" pos-id="" label-id="Shrink" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
</submenu>
<endsubmenu />
<popup-item item-id="1001" pos-id="" label-id="Automatic Update" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="1003" pos-id="" label-id="Colors - Size" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="1005" pos-id="" label-id="Scalars Bar" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</submenu>
<endsubmenu />
<separator pos-id="-1"/>
</menu-item>
<!-- ********************************* View (menubar) ********************************* -->
<menu-item label-id="View" item-id="2" pos-id="">
<submenu label-id="Display Mode" item-id="21" pos-id="">
<popup-item item-id="211" pos-id="" label-id="Wireframe" icon-id="mesh_wireframe.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="212" pos-id="" label-id="Shading" icon-id="mesh_shading.png" tooltip-id=""accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="213" pos-id="" label-id="Shrink" icon-id="mesh_shrink.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</submenu>
<endsubmenu />
<separator pos-id=""/>
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="mesh_update.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</menu-item>
<!-- ################################# POPUP MENU ################################# -->
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Mesh">
<popup-item item-id="705" pos-id="" label-id="Edit Global Hyp." icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="701" pos-id="" label-id="Compute" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="1101" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</popupmenu>
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="SubMesh">
<popup-item item-id="706" pos-id="" label-id="Edit Local Hyp." icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</popupmenu>
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Hypothesis">
<popup-item item-id="1100" pos-id="" label-id="Edit" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="1102" pos-id="" label-id="Unassign Hyp." icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="1101" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</popupmenu>
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Algorithm">
<popup-item item-id="1102" pos-id="" label-id="Unassign Algo." icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="1101" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</popupmenu>
<popupmenu label-id="Popup for Viewer" context-id="" parent-id="Viewer" object-id="Mesh">
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<submenu label-id="Properties" item-id="113" pos-id="">
<submenu label-id="Display Mode" item-id="1131" pos-id="">
<popup-item item-id="211" pos-id="" label-id="Wireframe" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="212" pos-id="" label-id="Shading" icon-id="" tooltip-id=""accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="213" pos-id="" label-id="Shrink" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</submenu>
<endsubmenu />
<separator pos-id=""/>
<popup-item item-id="1132" pos-id="" label-id="Colors - Size" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="1133" pos-id="" label-id="Transparency" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</submenu>
<endsubmenu />
</popupmenu>
<popupmenu label-id="ScalarBar" context-id="" parent-id="Viewer" object-id="ScalarBar">
<popup-item item-id="200" pos-id="" label-id="Erase" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="201" pos-id="" label-id="Edit" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="202" pos-id="" label-id="Update View" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</popupmenu>
</menubar>
<!-- ///////////////////////////////////// TOOLBARS ////////////////////////////////////// -->
<toolbar label-id="Mesh Toolbar">
<toolbutton-item item-id="703" pos-id="" label-id="Init" icon-id="mesh_init.png" tooltip-id="Global Hyp." accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="702" pos-id="" label-id="Add SubMesh" icon-id="mesh_add_sub.png" tooltip-id="Local Hyp." accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="704" pos-id="" label-id="Edit" icon-id="mesh_edit.png" tooltip-id="Edit Hyp." accel-id="" toggle-id="" execute-action=""/>
<separatorTB/>
<toolbutton-item item-id="701" pos-id="" label-id="Compute" icon-id="mesh_compute.png" tooltip-id="Compute" accel-id="" toggle-id="" execute-action=""/>
<separatorTB/>
<toolbutton-item item-id="900" pos-id="" label-id="Mesh Infos" icon-id="mesh_info.png" tooltip-id="Mesh Infos" accel-id="" toggle-id="" execute-action=""/>
</toolbar>
<toolbar label-id="Hypotheses Toolbar">
<toolbutton-item item-id="5030" label-id="Average length" icon-id="mesh_hypo_length.png" tooltip-id="Avreage length Hypothesis" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="5031" label-id="Segments" icon-id="mesh_hypo_segment.png" tooltip-id="Nb. Segments Hypothesis" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="5032" label-id="Max. Triangle Area" icon-id="mesh_hypo_area.png" tooltip-id="Max. Triangle Area Hypothesis" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="5033" label-id="Max. Hexaedron Volume" icon-id="mesh_hypo_volume.png" tooltip-id="Max. Hexaedron Volume Hypothesis" accel-id="" toggle-id="" execute-action=""/>
<separatorTB/>
<toolbutton-item item-id="5000" label-id="Wire Discretisation" icon-id="mesh_algo_regular.png" tooltip-id="Wire Discratisation Algorithm" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="5010" label-id="Triangle (Mefisto)" icon-id="mesh_algo_mefisto.png" tooltip-id="Triangle (Mefisto) Algorithm" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="5011" label-id="Quadrangle (Mapping)" icon-id="mesh_algo_quad.png" tooltip-id="Quadrangle (Mapping) Algorithm" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="5020" label-id="Hexaedron (i,j,k)" icon-id="mesh_algo_hexa.png" tooltip-id="Hexaedron (i,j,k) Algorithm" accel-id="" toggle-id="" execute-action=""/>
</toolbar>
<toolbar label-id="Controls toolbar">
<toolbutton-item item-id="6001" label-id="Length" icon-id="mesh_length.png" tooltip-id="Length" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6002" label-id="Connectivity" icon-id="mesh_connectivity.png" tooltip-id="Connectivity" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6011" label-id="Area" icon-id="mesh_area.png" tooltip-id="Area" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6012" label-id="Taper" icon-id="mesh_taper.png" tooltip-id="Taper" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6013" label-id="Aspect Ratio" icon-id="mesh_aspect.png" tooltip-id="Aspect Ratio" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6014" label-id="Minimum angle" icon-id="mesh_angle.png" tooltip-id="Minimum angle" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6015" label-id="Warp" icon-id="mesh_wrap.png" tooltip-id="Warp" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6016" label-id="Skew" icon-id="mesh_skew.png" tooltip-id="Skew" accel-id="" toggle-id="" execute-action=""/>
</toolbar>
<toolbar label-id="Add/Remove toolbar">
<toolbutton-item item-id="400" label-id="Node" icon-id="mesh_vertex.png" tooltip-id="Add Node" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="401" label-id="Beam" icon-id="mesh_line.png" tooltip-id="Add Beam" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="4021" label-id="Triangle" icon-id="mesh_triangle.png" tooltip-id="Add Triangle" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="4022" label-id="Quadrangle" icon-id="mesh_quad.png" tooltip-id="Add Quadrangle" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="4031" label-id="Tetrahedron" icon-id="mesh_tetra.png" tooltip-id="Add Tetrahedron" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="4032" label-id="Hexahedron" icon-id="mesh_hexa.png" tooltip-id="Add Hexahedron" accel-id="" toggle-id="" execute-action=""/>
<separatorTB/>
<toolbutton-item item-id="4041" label-id="Nodes" icon-id="mesh_rem_node.png" tooltip-id="Remove Nodes" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="4042" label-id="Elements" icon-id="mesh_rem_element.png" tooltip-id="Remove Elements" accel-id="" toggle-id="" execute-action=""/>
</toolbar>
<toolbar label-id="Modification toolbar">
<toolbutton-item item-id="405" label-id="Move Node" icon-id="mesh_move_node.png" tooltip-id="Move Node" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="806" label-id="Orientation" icon-id="mesh_orientation.png" tooltip-id="Orientation" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="807" label-id="Diagonal Inversion" icon-id="mesh_diagonal.png" tooltip-id="Diagonal Inversion" accel-id="" toggle-id="" execute-action=""/>
</toolbar>
<toolbar label-id="Display Mode Toolbar">
<toolbutton-item item-id="214" pos-id="" label-id="Update" icon-id="mesh_update.png" tooltip-id="Update View" accel-id="" toggle-id="" execute-action=""/>
<separatorTB/>
<toolbutton-item item-id="211" pos-id="" label-id="Wireframe" icon-id="mesh_wireframe.png" tooltip-id="Wireframe" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="212" pos-id="" label-id="Shading" icon-id="mesh_shading.png" tooltip-id="shading" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="213" pos-id="" label-id="Shrink" icon-id="mesh_shrink.png" tooltip-id="shrink" accel-id="" toggle-id="" execute-action=""/>
</toolbar>
</desktop>
</application>

246
resources/SMESH_fr.xml Normal file
View File

@ -0,0 +1,246 @@
<?xml version='1.0' encoding='us-ascii'?>
<!DOCTYPE application PUBLIC "" "desktop.dtd">
<!-- GUI customization for MESH component -->
<application
title="Mesh component"
date="13/05/2002"
author="Nicolas REJNERI"
appId="Mesh for Salome" >
<desktop>
<menubar>
<!-- ************************** File (menubar) ************************************ -->
<menu-item label-id="File" item-id="1" pos-id="">
<submenu label-id="Import" item-id="11" pos-id="8">
<popup-item item-id="111" pos-id="" label-id="DAT file" icon-id="" tooltip-id="" accel-id="Ctrl+B" toggle-id="" execute-action=""/>
<popup-item item-id="112" pos-id="" label-id="UNV File" icon-id="" tooltip-id="" accel-id="Ctrl+I" toggle-id="" execute-action=""/>
<popup-item item-id="113" pos-id="" label-id="MED File" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</submenu>
<endsubmenu />
<submenu label-id="Export" item-id="12" pos-id="9">
<popup-item item-id="121" pos-id="" label-id="DAT File" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="122" pos-id="" label-id="MED File" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="123" pos-id="" label-id="UNV File" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</submenu>
<endsubmenu />
<separator pos-id="10"/>
</menu-item>
<!-- ************************* Edit (menubar) ************************************** -->
<menu-item label-id="Edit" item-id="3" pos-id="2">
<separator pos-id=""/>
<popup-item item-id="33" pos-id="" label-id="Delete" icon-id="delete.png" tooltip-id="" accel-id="" toggle-id="" execute-action="" />
</menu-item>
<!-- ************************** Hypothesis (menubar) ************************************ -->
<menu-item label-id="Hypotheses" item-id="50" pos-id="3">
<popup-item item-id="5030" pos-id="" label-id="Average length" icon-id="mesh_hypo_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="5031" pos-id="" label-id="Nb. Segments" icon-id="mesh_hypo_segment.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="5032" pos-id="" label-id="Max. Triangle Area" icon-id="mesh_hypo_area.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="5033" pos-id="" label-id="Max. Hexahedron Volume" icon-id="mesh_hypo_volume.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="5000" pos-id="" label-id="Wire discretisation" icon-id="mesh_algo_regular.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="5010" pos-id="" label-id="Triangle (Mefisto)" icon-id="mesh_algo_mefisto.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="5011" pos-id="" label-id="Quadrangle (Mapping)" icon-id="mesh_algo_quad.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="5020" pos-id="" label-id="Hexaedron (i,j,k)" icon-id="mesh_algo_hexa.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</menu-item>
<!-- ************************** Mesh (menubar) ************************************ -->
<menu-item label-id="Mesh" item-id="70" pos-id="4">
<popup-item item-id="703" pos-id="" label-id="Global Hyp." icon-id="mesh_init.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="702" pos-id="" label-id="Local Hyp." icon-id="mesh_add_sub.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="704" pos-id="" label-id="Edit Hyp." icon-id="mesh_edit.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="701" pos-id="" label-id="Compute" icon-id="mesh_compute.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="900" pos-id="" label-id="Mesh Infos" icon-id="mesh_info.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</menu-item>
<!-- ************************** Control (menubar) ************************************ -->
<menu-item label-id="Controls" item-id="60" pos-id="5">
<popup-item item-id="6001" pos-id="" label-id="Length" icon-id="mesh_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6002" pos-id="" label-id="Connectivity" icon-id="mesh_connectivity.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6011" pos-id="" label-id="Area" icon-id="mesh_area.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6012" pos-id="" label-id="Taper" icon-id="mesh_taper.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6013" pos-id="" label-id="Aspect Ratio" icon-id="mesh_aspect.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6014" pos-id="" label-id="Minimum angle" icon-id="mesh_angle.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6015" pos-id="" label-id="Warp" icon-id="mesh_wrap.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6016" pos-id="" label-id="Skew" icon-id="mesh_skew.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</menu-item>
<!-- ************************** Entity (menubar) ************************************ -->
<menu-item label-id="Modification" item-id="40" pos-id="6">
<submenu label-id="Add" item-id="402" pos-id="">
<popup-item item-id="400" pos-id="" label-id="Node" icon-id="mesh_vertex.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="401" pos-id="" label-id="Beam" icon-id="mesh_line.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="4021" pos-id="" label-id="Triangle" icon-id="mesh_triangle.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="4022" pos-id="" label-id="Quadrangle" icon-id="mesh_quad.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="4031" pos-id="" label-id="Tetrahedron" icon-id="mesh_tetra.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="4032" pos-id="" label-id="Hexahedron" icon-id="mesh_hexa.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</submenu>
<endsubmenu />
<submenu label-id="Remove" item-id="403" pos-id="">
<popup-item item-id="4041" pos-id="" label-id="Nodes" icon-id="mesh_rem_node.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="4042" pos-id="" label-id="Elements" icon-id="mesh_rem_element.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</submenu>
<endsubmenu />
<popup-item item-id="405" pos-id="" label-id="Move Node" icon-id="mesh_move_node.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="806" pos-id="" label-id="Orientation" icon-id="mesh_orientation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="807" pos-id="" label-id="Diagonal Inversion" icon-id="mesh_diagonal.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</menu-item>
<!-- ************************** Numbering (menubar) ************************************ -->
<menu-item label-id="Numbering" item-id="80" pos-id="7">
<popup-item item-id="9010" pos-id="" label-id="Display Nodes #" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
<popup-item item-id="9011" pos-id="" label-id="Display Elements #" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
</menu-item>
<!-- ********************************* Settings (menubar) ********************************* -->
<menu-item label-id="Preferences" item-id="4" pos-id="">
<submenu label-id="Mesh" item-id="100" pos-id="-1">
<submenu label-id="Display Mode" item-id="1000" pos-id="">
<popup-item item-id="10001" pos-id="" label-id="Wireframe" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
<popup-item item-id="10002" pos-id="" label-id="Shading" icon-id="" tooltip-id=""accel-id="" toggle-id="true" execute-action=""/>
<popup-item item-id="10003" pos-id="" label-id="Shrink" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
</submenu>
<endsubmenu />
<popup-item item-id="1001" pos-id="" label-id="Automatic Update" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="1003" pos-id="" label-id="Colors - Size" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="1005" pos-id="" label-id="Scalars Bar" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</submenu>
<endsubmenu />
<separator pos-id="-1"/>
</menu-item>
<!-- ********************************* View (menubar) ********************************* -->
<menu-item label-id="View" item-id="2" pos-id="">
<submenu label-id="Display Mode" item-id="21" pos-id="">
<popup-item item-id="211" pos-id="" label-id="Wireframe" icon-id="mesh_wireframe.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="212" pos-id="" label-id="Shading" icon-id="mesh_shading.png" tooltip-id=""accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="213" pos-id="" label-id="Shrink" icon-id="mesh_shrink.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</submenu>
<endsubmenu />
<separator pos-id=""/>
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="mesh_update.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</menu-item>
<!-- ################################# POPUP MENU ################################# -->
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Mesh">
<popup-item item-id="705" pos-id="" label-id="Edit Global Hyp." icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="701" pos-id="" label-id="Compute" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="1101" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</popupmenu>
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="SubMesh">
<popup-item item-id="706" pos-id="" label-id="Edit Local Hyp." icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</popupmenu>
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Hypothesis">
<popup-item item-id="1100" pos-id="" label-id="Edit" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="1102" pos-id="" label-id="Unassign Hyp." icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="1101" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</popupmenu>
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Algorithm">
<popup-item item-id="1102" pos-id="" label-id="Unassign Algo." icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="1101" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</popupmenu>
<popupmenu label-id="Popup for Viewer" context-id="" parent-id="Viewer" object-id="Mesh">
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<submenu label-id="Properties" item-id="113" pos-id="">
<submenu label-id="Display Mode" item-id="1131" pos-id="">
<popup-item item-id="211" pos-id="" label-id="Wireframe" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="212" pos-id="" label-id="Shading" icon-id="" tooltip-id=""accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="213" pos-id="" label-id="Shrink" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</submenu>
<endsubmenu />
<separator pos-id=""/>
<popup-item item-id="1132" pos-id="" label-id="Colors - Size" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="1133" pos-id="" label-id="Transparency" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</submenu>
<endsubmenu />
</popupmenu>
<popupmenu label-id="ScalarBar" context-id="" parent-id="Viewer" object-id="ScalarBar">
<popup-item item-id="200" pos-id="" label-id="Erase" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="201" pos-id="" label-id="Edit" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="202" pos-id="" label-id="Update View" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
</popupmenu>
</menubar>
<!-- ///////////////////////////////////// TOOLBARS ////////////////////////////////////// -->
<toolbar label-id="Mesh Toolbar">
<toolbutton-item item-id="703" pos-id="" label-id="Init" icon-id="mesh_init.png" tooltip-id="Global Hyp." accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="702" pos-id="" label-id="Add SubMesh" icon-id="mesh_add_sub.png" tooltip-id="Local Hyp." accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="704" pos-id="" label-id="Edit" icon-id="mesh_edit.png" tooltip-id="Edit Hyp." accel-id="" toggle-id="" execute-action=""/>
<separatorTB/>
<toolbutton-item item-id="701" pos-id="" label-id="Compute" icon-id="mesh_compute.png" tooltip-id="Compute" accel-id="" toggle-id="" execute-action=""/>
<separatorTB/>
<toolbutton-item item-id="900" pos-id="" label-id="Mesh Infos" icon-id="mesh_info.png" tooltip-id="Mesh Infos" accel-id="" toggle-id="" execute-action=""/>
</toolbar>
<toolbar label-id="Hypotheses Toolbar">
<toolbutton-item item-id="5030" label-id="Average length" icon-id="mesh_hypo_length.png" tooltip-id="Avreage length Hypothesis" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="5031" label-id="Segments" icon-id="mesh_hypo_segment.png" tooltip-id="Nb. Segments Hypothesis" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="5032" label-id="Max. Triangle Area" icon-id="mesh_hypo_area.png" tooltip-id="Max. Triangle Area Hypothesis" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="5033" label-id="Max. Hexaedron Volume" icon-id="mesh_hypo_volume.png" tooltip-id="Max. Hexaedron Volume Hypothesis" accel-id="" toggle-id="" execute-action=""/>
<separatorTB/>
<toolbutton-item item-id="5000" label-id="Wire Discretisation" icon-id="mesh_algo_regular.png" tooltip-id="Wire Discratisation Algorithm" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="5010" label-id="Triangle (Mefisto)" icon-id="mesh_algo_mefisto.png" tooltip-id="Triangle (Mefisto) Algorithm" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="5011" label-id="Quadrangle (Mapping)" icon-id="mesh_algo_quad.png" tooltip-id="Quadrangle (Mapping) Algorithm" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="5020" label-id="Hexaedron (i,j,k)" icon-id="mesh_algo_hexa.png" tooltip-id="Hexaedron (i,j,k) Algorithm" accel-id="" toggle-id="" execute-action=""/>
</toolbar>
<toolbar label-id="Controls toolbar">
<toolbutton-item item-id="6001" label-id="Length" icon-id="mesh_length.png" tooltip-id="Length" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6002" label-id="Connectivity" icon-id="mesh_connectivity.png" tooltip-id="Connectivity" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6011" label-id="Area" icon-id="mesh_area.png" tooltip-id="Area" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6012" label-id="Taper" icon-id="mesh_taper.png" tooltip-id="Taper" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6013" label-id="Aspect Ratio" icon-id="mesh_aspect.png" tooltip-id="Aspect Ratio" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6014" label-id="Minimum angle" icon-id="mesh_angle.png" tooltip-id="Minimum angle" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6015" label-id="Warp" icon-id="mesh_wrap.png" tooltip-id="Warp" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6016" label-id="Skew" icon-id="mesh_skew.png" tooltip-id="Skew" accel-id="" toggle-id="" execute-action=""/>
</toolbar>
<toolbar label-id="Add/Remove toolbar">
<toolbutton-item item-id="400" label-id="Node" icon-id="mesh_vertex.png" tooltip-id="Add Node" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="401" label-id="Beam" icon-id="mesh_line.png" tooltip-id="Add Beam" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="4021" label-id="Triangle" icon-id="mesh_triangle.png" tooltip-id="Add Triangle" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="4022" label-id="Quadrangle" icon-id="mesh_quad.png" tooltip-id="Add Quadrangle" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="4031" label-id="Tetrahedron" icon-id="mesh_tetra.png" tooltip-id="Add Tetrahedron" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="4032" label-id="Hexahedron" icon-id="mesh_hexa.png" tooltip-id="Add Hexahedron" accel-id="" toggle-id="" execute-action=""/>
<separatorTB/>
<toolbutton-item item-id="4041" label-id="Nodes" icon-id="mesh_rem_node.png" tooltip-id="Remove Nodes" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="4042" label-id="Elements" icon-id="mesh_rem_element.png" tooltip-id="Remove Elements" accel-id="" toggle-id="" execute-action=""/>
</toolbar>
<toolbar label-id="Modification toolbar">
<toolbutton-item item-id="405" label-id="Move Node" icon-id="mesh_move_node.png" tooltip-id="Move Node" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="806" label-id="Orientation" icon-id="mesh_orientation.png" tooltip-id="Orientation" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="807" label-id="Diagonal Inversion" icon-id="mesh_diagonal.png" tooltip-id="Diagonal Inversion" accel-id="" toggle-id="" execute-action=""/>
</toolbar>
<toolbar label-id="Display Mode Toolbar">
<toolbutton-item item-id="214" pos-id="" label-id="Update" icon-id="mesh_update.png" tooltip-id="Update View" accel-id="" toggle-id="" execute-action=""/>
<separatorTB/>
<toolbutton-item item-id="211" pos-id="" label-id="Wireframe" icon-id="mesh_wireframe.png" tooltip-id="Wireframe" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="212" pos-id="" label-id="Shading" icon-id="mesh_shading.png" tooltip-id="shading" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="213" pos-id="" label-id="Shrink" icon-id="mesh_shrink.png" tooltip-id="shrink" accel-id="" toggle-id="" execute-action=""/>
</toolbar>
</desktop>
</application>

BIN
resources/delete.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 943 B

BIN
resources/mesh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

BIN
resources/mesh_add_sub.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

BIN
resources/mesh_angle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

BIN
resources/mesh_area.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

BIN
resources/mesh_aspect.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 B

BIN
resources/mesh_compute.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

BIN
resources/mesh_diagonal.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

BIN
resources/mesh_edit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

BIN
resources/mesh_hexa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

BIN
resources/mesh_hexa_n.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

BIN
resources/mesh_info.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

BIN
resources/mesh_init.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

BIN
resources/mesh_length.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

BIN
resources/mesh_line.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

BIN
resources/mesh_line_n.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

BIN
resources/mesh_pyramid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

BIN
resources/mesh_quad.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

BIN
resources/mesh_quad_n.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

BIN
resources/mesh_rem_node.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

BIN
resources/mesh_set_algo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

BIN
resources/mesh_set_hypo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

BIN
resources/mesh_shading.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

BIN
resources/mesh_shrink.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

BIN
resources/mesh_skew.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

BIN
resources/mesh_taper.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

BIN
resources/mesh_tetra.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

BIN
resources/mesh_tetra_n.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

BIN
resources/mesh_triangle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

BIN
resources/mesh_update.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

BIN
resources/mesh_vertex.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

BIN
resources/mesh_vertex_n.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

BIN
resources/mesh_wrap.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

BIN
resources/select1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

View File

@ -0,0 +1,175 @@
using namespace std;
#include "DriverDAT_R_SMDS_Mesh.h"
#include "utilities.h"
DriverDAT_R_SMDS_Mesh::DriverDAT_R_SMDS_Mesh() {
;
}
DriverDAT_R_SMDS_Mesh::~DriverDAT_R_SMDS_Mesh() {
;
}
void DriverDAT_R_SMDS_Mesh::SetMesh(Handle(SMDS_Mesh)& aMesh) {
myMesh = aMesh;
}
void DriverDAT_R_SMDS_Mesh::SetFile(string aFile) {
myFile = aFile;
}
void DriverDAT_R_SMDS_Mesh::SetFileId(FILE* aFileId) {
myFileId = aFileId;
}
void DriverDAT_R_SMDS_Mesh::SetMeshId(int aMeshId) {
myMeshId = aMeshId;
}
void DriverDAT_R_SMDS_Mesh::Add() {
;
}
void DriverDAT_R_SMDS_Mesh::Read() {
int i,j;
int nbNodes,nbCells;
int intNumPoint;
float coordX, coordY, coordZ;
int nbNoeuds;
int intNumMaille,Degre;
int ValElement;
int ValDegre;
int NoeudsMaille[20];
int NoeudMaille;
bool ok;
MESSAGE("in DriverDAT_R_SMDS_Mesh::Read()");
/****************************************************************************
* OUVERTURE DU FICHIER EN LECTURE *
****************************************************************************/
char* file2Read = (char*)myFile.c_str();
myFileId = fopen(file2Read,"r");
if (myFileId < 0)
{
fprintf(stderr,">> ERREUR : ouverture du fichier %s \n",file2Read);
exit(EXIT_FAILURE);
}
fscanf(myFileId,"%d %d\n",&nbNodes,&nbCells);
/****************************************************************************
* LECTURE DES NOEUDS *
****************************************************************************/
fprintf(stdout,"\n(************************)\n");
fprintf(stdout,"(* NOEUDS DU MAILLAGE : *)\n");
fprintf(stdout,"(************************)\n");
for (i=0;i<nbNodes;i++) {
fscanf(myFileId,"%d %e %e %e\n",&intNumPoint,&coordX,&coordY,&coordZ);
ok = myMesh->AddNodeWithID(coordX,coordY,coordZ,intNumPoint);
}
fprintf(stdout,"%d noeuds\n",myMesh->NbNodes());
/****************************************************************************
* LECTURE DES ELEMENTS *
****************************************************************************/
fprintf(stdout,"\n(**************************)\n");
fprintf(stdout,"(* ELEMENTS DU MAILLAGE : *)\n");
fprintf(stdout,"(**************************)");
fprintf(stdout,"%d elements\n",nbCells);
for (i=0; i<nbCells; i++) {
fscanf(myFileId,"%d %d",&intNumMaille,&ValElement);
Degre=abs(ValElement/100);
nbNoeuds=ValElement-(Degre*100);
// Recuperation des noeuds de la maille
for (j=0; j<nbNoeuds; j++) {
fscanf(myFileId,"%d",&NoeudMaille);
NoeudsMaille[j]=NoeudMaille;
}
// Analyse des cas de cellules
switch (ValElement) {
case 102 : ;
case 103 : ;
{
ValDegre=3;
nbNoeuds=2;
ok = myMesh->AddEdgeWithID(NoeudsMaille[0],NoeudsMaille[1],intNumMaille);
break;
}
case 204 : ;
case 208 : ;
{
ValDegre=9;
nbNoeuds=4;
ok = myMesh->AddFaceWithID(NoeudsMaille[0],NoeudsMaille[1],NoeudsMaille[2],NoeudsMaille[3],intNumMaille);
break;
}
case 203 : ;
case 206 : ;
{
ValDegre=5;
nbNoeuds=3;
ok = myMesh->AddFaceWithID(NoeudsMaille[0],NoeudsMaille[1],NoeudsMaille[2],intNumMaille);
break;
}
case 308 : ;
case 320 : ;
{
ValDegre=12;
nbNoeuds=8;
if (ValElement==320) {
//A voir, correspondance VTK
NoeudsMaille[4]=NoeudsMaille[8];
NoeudsMaille[5]=NoeudsMaille[9];
NoeudsMaille[6]=NoeudsMaille[10];
NoeudsMaille[7]=NoeudsMaille[11];
}
ok = myMesh->AddVolumeWithID(NoeudsMaille[0],NoeudsMaille[1],NoeudsMaille[2],NoeudsMaille[3],NoeudsMaille[4],NoeudsMaille[5],NoeudsMaille[6],NoeudsMaille[7],intNumMaille);
break;
}
case 304 : ;
case 310 : ;
{
ValDegre=10;
nbNoeuds=4;
if (ValElement==310)
NoeudsMaille[3]=NoeudsMaille[6];
ok = myMesh->AddVolumeWithID(NoeudsMaille[0],NoeudsMaille[1],NoeudsMaille[2],NoeudsMaille[3],intNumMaille);
break;
}
case 306 : ;
case 315 : ;
{
ValDegre=12;
nbNoeuds=8;
if (ValElement==315) {
NoeudsMaille[3]=NoeudsMaille[6];
NoeudsMaille[4]=NoeudsMaille[7];
NoeudsMaille[5]=NoeudsMaille[8];
}
NoeudsMaille[7]=NoeudsMaille[5];
NoeudsMaille[6]=NoeudsMaille[5];
NoeudsMaille[5]=NoeudsMaille[4];
NoeudsMaille[4]=NoeudsMaille[3];
NoeudsMaille[3]=NoeudsMaille[2];
ok = myMesh->AddVolumeWithID(NoeudsMaille[0],NoeudsMaille[1],NoeudsMaille[2],NoeudsMaille[3],NoeudsMaille[4],NoeudsMaille[5],intNumMaille);
break;
}
}
}
/****************************************************************************
* FERMETURE DU FICHIER *
****************************************************************************/
fclose(myFileId);
}

View File

@ -0,0 +1,30 @@
#ifndef _INCLUDE_DRIVERDAT_R_SMDS_MESH
#define _INCLUDE_DRIVERDAT_R_SMDS_MESH
#include <stdio.h>
#include "SMDS_Mesh.hxx"
#include "Mesh_Reader.h"
class DriverDAT_R_SMDS_Mesh : public Mesh_Reader {
public :
DriverDAT_R_SMDS_Mesh();
~DriverDAT_R_SMDS_Mesh();
void Add();
void Read();
void SetMesh(Handle(SMDS_Mesh)& aMesh);
void SetFile(string);
void SetFileId(FILE*);
void SetMeshId(int);
private :
Handle_SMDS_Mesh myMesh;
string myFile;
FILE* myFileId;
int myMeshId;
};
#endif

View File

@ -0,0 +1,86 @@
using namespace std;
#include "DriverDAT_R_SMESHDS_Document.h"
#include "DriverDAT_R_SMESHDS_Mesh.h"
#include "utilities.h"
int getOne() {
printf("in getOne");
return (1);
}
extern "C" {
// Document_Reader* maker() {
DriverDAT_R_SMESHDS_Document* maker() {
fprintf(stdout,"here in maker\n");
return new DriverDAT_R_SMESHDS_Document;
}
}
DriverDAT_R_SMESHDS_Document::DriverDAT_R_SMESHDS_Document() {
myFile = string("");
}
DriverDAT_R_SMESHDS_Document::~DriverDAT_R_SMESHDS_Document() {
;
}
//void DriverDAT_R_SMESHDS_Document::SetFile(string aFile) {
//myFile = aFile;
//}
//void DriverDAT_R_SMESHDS_Document::SetDocument(Handle(SMESHDS_Document)& aDoc) {
//myDocument = aDoc;
//}
void DriverDAT_R_SMESHDS_Document::Read() {
int myMeshId;
MESSAGE("in read");
SCRUTE(myFile);
//Handle(SMESHDS_Document) myDocument = new SMESHDS_Document(1);
/****************************************************************************
* OUVERTURE DU FICHIER EN LECTURE *
****************************************************************************/
char* file2Read = (char*)myFile.c_str();
FILE* fid = fopen(file2Read,"r");
if (fid < 0)
{
fprintf(stderr,">> ERREUR : ouverture du fichier %s \n",file2Read);
exit(EXIT_FAILURE);
}
/****************************************************************************
* COMBIEN DE MAILLAGES ? *
****************************************************************************/
int nmaa = 1;
/****************************************************************************
* FERMETURE DU FICHIER *
****************************************************************************/
fclose(fid);
printf("Nombre de maillages = %d\n",nmaa);
string myClass = string("SMESHDS_Mesh");
string myExtension = string("DAT");
for (int meshIt=1;meshIt<=nmaa;meshIt++) {
myMeshId = myDocument->NewMesh();
Handle(SMDS_Mesh) myMesh = myDocument->GetMesh(myMeshId);
DriverDAT_R_SMESHDS_Mesh* myReader = new DriverDAT_R_SMESHDS_Mesh;
myReader->SetMesh(myMesh);
myReader->SetFile(myFile);
//myReader->SetFileId(fid);
myReader->Read();
}
}

View File

@ -0,0 +1,24 @@
#ifndef _INCLUDE_DRIVERDAT_R_SMESHDS_DOCUMENT
#define _INCLUDE_DRIVERDAT_R_SMESHDS_DOCUMENT
#include <stdio.h>
#include "SMESHDS_Document.hxx"
#include "Document_Reader.h"
class DriverDAT_R_SMESHDS_Document : public Document_Reader {
public :
DriverDAT_R_SMESHDS_Document();
~DriverDAT_R_SMESHDS_Document();
void Read();
//void SetFile(string);
//void SetDocument(Handle_SMESHDS_Document&);
private :
//Handle_SMESHDS_Document myDocument;
//string myFile;
};
#endif

View File

@ -0,0 +1,52 @@
using namespace std;
#include "DriverDAT_R_SMESHDS_Mesh.h"
#include "DriverDAT_R_SMDS_Mesh.h"
#include "utilities.h"
DriverDAT_R_SMESHDS_Mesh::DriverDAT_R_SMESHDS_Mesh() {
;
}
DriverDAT_R_SMESHDS_Mesh::~DriverDAT_R_SMESHDS_Mesh() {
;
}
void DriverDAT_R_SMESHDS_Mesh::SetMesh(Handle(SMDS_Mesh)& aMesh) {
//myMesh = Handle(SMESHDS_Mesh)::DownCast(aMesh);
myMesh = aMesh;
}
void DriverDAT_R_SMESHDS_Mesh::SetFile(string aFile) {
myFile = aFile;
}
void DriverDAT_R_SMESHDS_Mesh::SetFileId(FILE* aFileId) {
myFileId = aFileId;
}
void DriverDAT_R_SMESHDS_Mesh::SetMeshId(int aMeshId) {
myMeshId = aMeshId;
}
void DriverDAT_R_SMESHDS_Mesh::Add() {
;
}
void DriverDAT_R_SMESHDS_Mesh::Read() {
string myClass = string("SMDS_Mesh");
string myExtension = string("DAT");
MESSAGE("in DriverDAT_R_SMESHDS_Mesh::Read() 1");
DriverDAT_R_SMDS_Mesh* myReader = new DriverDAT_R_SMDS_Mesh;
MESSAGE("in DriverDAT_R_SMESHDS_Mesh::Read() 2");
myReader->SetMesh(myMesh);
MESSAGE("in DriverDAT_R_SMESHDS_Mesh::Read() 3");
myReader->SetFile(myFile);
//myReader->SetFileId(myFileId);
MESSAGE("in DriverDAT_R_SMESHDS_Mesh::Read() 4");
myReader->Read();
}

View File

@ -0,0 +1,30 @@
#ifndef _INCLUDE_DRIVERDAT_R_SMESHDS_MESH
#define _INCLUDE_DRIVERDAT_R_SMESHDS_MESH
#include <stdio.h>
#include "SMESHDS_Mesh.hxx"
#include "Mesh_Reader.h"
class DriverDAT_R_SMESHDS_Mesh : public Mesh_Reader {
public :
DriverDAT_R_SMESHDS_Mesh();
~DriverDAT_R_SMESHDS_Mesh();
void Add();
void Read();
void SetMesh(Handle(SMDS_Mesh)& aMesh);
void SetFile(string);
void SetFileId(FILE*);
void SetMeshId(int);
private :
Handle_SMDS_Mesh myMesh;
string myFile;
FILE* myFileId;
int myMeshId;
};
#endif

View File

@ -0,0 +1,164 @@
using namespace std;
#include "DriverDAT_W_SMDS_Mesh.h"
#include "SMDS_MeshElement.hxx"
#include "SMDS_MeshNode.hxx"
#include "SMDS_MeshEdgesIterator.hxx"
#include "SMDS_MeshFacesIterator.hxx"
#include "SMDS_MeshNodesIterator.hxx"
#include "SMDS_MeshVolumesIterator.hxx"
#include "utilities.h"
DriverDAT_W_SMDS_Mesh::DriverDAT_W_SMDS_Mesh() {
;
}
DriverDAT_W_SMDS_Mesh::~DriverDAT_W_SMDS_Mesh() {
;
}
void DriverDAT_W_SMDS_Mesh::SetMesh(Handle(SMDS_Mesh)& aMesh) {
myMesh = aMesh;
}
void DriverDAT_W_SMDS_Mesh::SetFile(string aFile) {
myFile = aFile;
}
void DriverDAT_W_SMDS_Mesh::SetFileId(FILE* aFileId) {
myFileId = aFileId;
}
void DriverDAT_W_SMDS_Mesh::SetMeshId(int aMeshId) {
myMeshId = aMeshId;
}
void DriverDAT_W_SMDS_Mesh::Add() {
;
}
void DriverDAT_W_SMDS_Mesh::Write() {
int nbNodes,nbCells;
int i;
char* file2Read = (char*)myFile.c_str();
myFileId = fopen(file2Read,"w+");
if (myFileId < 0)
{
fprintf(stderr,">> ERREUR : ouverture du fichier %s \n",file2Read);
exit(EXIT_FAILURE);
}
SCRUTE(myMesh);
/****************************************************************************
* NOMBRES D'OBJETS *
****************************************************************************/
fprintf(stdout,"\n(****************************)\n");
fprintf(stdout,"(* INFORMATIONS GENERALES : *)\n");
fprintf(stdout,"(****************************)\n");
/* Combien de noeuds ? */
nbNodes = myMesh->NbNodes();
/* Combien de mailles, faces ou aretes ? */
Standard_Integer nb_of_nodes, nb_of_edges,nb_of_faces, nb_of_volumes;
nb_of_edges = myMesh->NbEdges();
nb_of_faces = myMesh->NbFaces();
nb_of_volumes = myMesh->NbVolumes();
nbCells = nb_of_edges + nb_of_faces + nb_of_volumes;
SCRUTE(nb_of_edges);
SCRUTE(nb_of_faces);
SCRUTE(nb_of_volumes);
fprintf(stdout,"%d %d\n",nbNodes,nbCells);
fprintf(myFileId,"%d %d\n",nbNodes,nbCells);
/****************************************************************************
* ECRITURE DES NOEUDS *
****************************************************************************/
fprintf(stdout,"\n(************************)\n");
fprintf(stdout,"(* NOEUDS DU MAILLAGE : *)\n");
fprintf(stdout,"(************************)\n");
SMDS_MeshNodesIterator itNodes(myMesh);
for (;itNodes.More();itNodes.Next()) {
const Handle(SMDS_MeshElement)& elem = itNodes.Value();
const Handle(SMDS_MeshNode)& node = myMesh->GetNode(1,elem);
fprintf(myFileId,"%d %e %e %e\n",node->GetID(),node->X(),node->Y(),node->Z());
}
/****************************************************************************
* ECRITURE DES ELEMENTS *
****************************************************************************/
fprintf(stdout,"\n(**************************)\n");
fprintf(stdout,"(* ELEMENTS DU MAILLAGE : *)\n");
fprintf(stdout,"(**************************)");
/* Ecriture des connectivites, noms, numeros des mailles */
SMDS_MeshEdgesIterator itEdges(myMesh);
for (;itEdges.More();itEdges.Next()) {
const Handle(SMDS_MeshElement)& elem = itEdges.Value();
switch (elem->NbNodes()) {
case 2 : {
fprintf(myFileId,"%d %d ",elem->GetID(),102);
break;
}
case 3 : {
fprintf(myFileId,"%d %d ",elem->GetID(),103);
break;
}
}
for (i=0;i<elem->NbNodes();i++)
fprintf(myFileId,"%d ",elem->GetConnection(i+1));
fprintf(myFileId,"\n");
}
SMDS_MeshFacesIterator itFaces(myMesh);
for (;itFaces.More();itFaces.Next()) {
const Handle(SMDS_MeshElement)& elem = itFaces.Value();
switch (elem->NbNodes()) {
case 3 : {
fprintf(myFileId,"%d %d ",elem->GetID(),203);
break;
}
case 4 : {
fprintf(myFileId,"%d %d ",elem->GetID(),204);
break;
}
case 6 : {
fprintf(myFileId,"%d %d ",elem->GetID(),206);
break;
}
}
for (i=0;i<elem->NbNodes();i++)
fprintf(myFileId,"%d ",elem->GetConnection(i+1));
fprintf(myFileId,"\n");
}
SMDS_MeshVolumesIterator itVolumes(myMesh);
for (;itVolumes.More();itVolumes.Next()) {
const Handle(SMDS_MeshElement)& elem = itVolumes.Value();
switch (elem->NbNodes()) {
case 8 : {
fprintf(myFileId,"%d %d ",elem->GetID(),308);
break;
}
}
for (i=0;i<elem->NbNodes();i++)
fprintf(myFileId,"%d ",elem->GetConnection(i+1));
fprintf(myFileId,"\n");
}
fclose (myFileId);
}

View File

@ -0,0 +1,31 @@
#ifndef _INCLUDE_DRIVERDAT_W_SMDS_MESH
#define _INCLUDE_DRIVERDAT_W_SMDS_MESH
#include <stdio.h>
#include <string>
#include "SMDS_Mesh.hxx"
#include "Mesh_Writer.h"
class DriverDAT_W_SMDS_Mesh : public Mesh_Writer {
public :
DriverDAT_W_SMDS_Mesh();
~DriverDAT_W_SMDS_Mesh();
void Add();
void Write();
void SetMesh(Handle(SMDS_Mesh)& aMesh);
void SetFile(string);
void SetFileId(FILE*);
void SetMeshId(int);
private :
Handle_SMDS_Mesh myMesh;
string myFile;
FILE* myFileId;
int myMeshId;
};
#endif

View File

@ -0,0 +1,78 @@
using namespace std;
#include "DriverDAT_W_SMESHDS_Document.h"
#include "DriverDAT_W_SMESHDS_Mesh.h"
#include "utilities.h"
extern "C"
{
Document_Writer* Wmaker() {
return new DriverDAT_W_SMESHDS_Document;
}
}
DriverDAT_W_SMESHDS_Document::DriverDAT_W_SMESHDS_Document() {
;
}
DriverDAT_W_SMESHDS_Document::~DriverDAT_W_SMESHDS_Document() {
;
}
//void DriverDAT_W_SMESHDS_Document::SetFile(string aFile) {
//myFile = aFile;
//}
//void DriverDAT_W_SMESHDS_Document::SetDocument(Handle(SMESHDS_Document)& aDocument) {
//myDocument = aDocument;
//}
void DriverDAT_W_SMESHDS_Document::Write() {
Handle(SMESHDS_Mesh) myMesh;
/****************************************************************************
* OUVERTURE DU FICHIER EN ECRITURE *
****************************************************************************/
char* file2Write = (char*)myFile.c_str();
FILE* fid = fopen(file2Write,"w+");
if (fid < 0)
{
fprintf(stderr,">> ERREUR : ouverture du fichier %s \n",file2Write);
exit(EXIT_FAILURE);
}
/****************************************************************************
* FERMETURE DU FICHIER *
****************************************************************************/
fclose(fid);
/******** Nombre de maillages ********/
int nb_of_meshes = myDocument->NbMeshes(); //voir avec Yves
//nb_of_meshes = 1;
int numero = 0;
string myClass = string("SMESHDS_Mesh");
string myExtension = string("DAT");
//while (numero<nb_of_meshes) {
//numero++;
//myMesh = myDocument->GetMesh(numero);
myDocument->InitMeshesIterator();
for (;myDocument->MoreMesh();myDocument->NextMesh()) {
numero++;
myMesh = myDocument->CurrentMesh();
DriverDAT_W_SMESHDS_Mesh* myWriter = new DriverDAT_W_SMESHDS_Mesh;
//Mesh_Writer* myWriter = Driver::GetMeshWriter(myExtension, myClass);
myWriter->SetMesh(myMesh);
myWriter->SetFile(myFile);
SCRUTE(myMesh);
//myWriter->SetFileId(fid);
myWriter->SetMeshId(numero);
myWriter->Write();
}
}

View File

@ -0,0 +1,25 @@
#ifndef _INCLUDE_DRIVERDAT_W_SMESHDS_DOCUMENT
#define _INCLUDE_DRIVERDAT_W_SMESHDS_DOCUMENT
#include <stdio.h>
#include <string>
#include "SMESHDS_Document.hxx"
#include "Document_Writer.h"
class DriverDAT_W_SMESHDS_Document : public Document_Writer {
public :
DriverDAT_W_SMESHDS_Document();
~DriverDAT_W_SMESHDS_Document();
void Write();
//void SetFile(string);
//void SetDocument(Handle(SMESHDS_Document)&);
private :
//Handle_SMESHDS_Document myDocument;
//string myFile;
};
#endif

View File

@ -0,0 +1,175 @@
using namespace std;
#include "DriverDAT_W_SMESHDS_Mesh.h"
#include "DriverDAT_W_SMDS_Mesh.h"
#include "SMDS_MeshElement.hxx"
#include "SMDS_MeshNode.hxx"
#include "SMDS_MeshEdgesIterator.hxx"
#include "SMDS_MeshFacesIterator.hxx"
#include "SMDS_MeshNodesIterator.hxx"
#include "SMDS_MeshVolumesIterator.hxx"
#include "utilities.h"
DriverDAT_W_SMESHDS_Mesh::DriverDAT_W_SMESHDS_Mesh() {
;
}
DriverDAT_W_SMESHDS_Mesh::~DriverDAT_W_SMESHDS_Mesh() {
;
}
void DriverDAT_W_SMESHDS_Mesh::SetMesh(Handle(SMDS_Mesh)& aMesh) {
//myMesh = Handle(SMESHDS_Mesh)::DownCast(aMesh);
myMesh = aMesh;
}
void DriverDAT_W_SMESHDS_Mesh::SetFile(string aFile) {
myFile = aFile;
}
void DriverDAT_W_SMESHDS_Mesh::SetFileId(FILE* aFileId) {
myFileId = aFileId;
}
void DriverDAT_W_SMESHDS_Mesh::SetMeshId(int aMeshId) {
myMeshId = aMeshId;
}
void DriverDAT_W_SMESHDS_Mesh::Write() {
string myClass = string("SMDS_Mesh");
string myExtension = string("DAT");
DriverDAT_W_SMDS_Mesh* myWriter = new DriverDAT_W_SMDS_Mesh;
myWriter->SetMesh(myMesh);
myWriter->SetFile(myFile);
myWriter->SetMeshId(myMeshId);
//myWriter->SetFileId(myFileId);
myWriter->Write();
}
void DriverDAT_W_SMESHDS_Mesh::Add() {
int nbNodes,nbCells;
int i;
char* file2Read = (char*)myFile.c_str();
myFileId = fopen(file2Read,"w+");
if (myFileId < 0)
{
fprintf(stderr,">> ERREUR : ouverture du fichier %s \n",file2Read);
exit(EXIT_FAILURE);
}
/****************************************************************************
* NOMBRES D'OBJETS *
****************************************************************************/
fprintf(stdout,"\n(****************************)\n");
fprintf(stdout,"(* INFORMATIONS GENERALES : *)\n");
fprintf(stdout,"(****************************)\n");
/* Combien de noeuds ? */
nbNodes = myMesh->NbNodes();
/* Combien de mailles, faces ou aretes ? */
Standard_Integer nb_of_nodes, nb_of_edges,nb_of_faces, nb_of_volumes;
nb_of_edges = myMesh->NbEdges();
nb_of_faces = myMesh->NbFaces();
nb_of_volumes = myMesh->NbVolumes();
nbCells = nb_of_edges + nb_of_faces + nb_of_volumes;
fprintf(stdout,"%d %d\n",nbNodes,nbCells);
fprintf(myFileId,"%d %d\n",nbNodes,nbCells);
/****************************************************************************
* ECRITURE DES NOEUDS *
****************************************************************************/
fprintf(stdout,"\n(************************)\n");
fprintf(stdout,"(* NOEUDS DU MAILLAGE : *)\n");
fprintf(stdout,"(************************)\n");
SMDS_MeshNodesIterator itNodes(myMesh);
for (;itNodes.More();itNodes.Next()) {
const Handle(SMDS_MeshElement)& elem = itNodes.Value();
const Handle(SMDS_MeshNode)& node = myMesh->GetNode(1,elem);
fprintf(myFileId,"%d %e %e %e\n",node->GetID(),node->X(),node->Y(),node->Z());
}
/****************************************************************************
* ECRITURE DES ELEMENTS *
****************************************************************************/
fprintf(stdout,"\n(**************************)\n");
fprintf(stdout,"(* ELEMENTS DU MAILLAGE : *)\n");
fprintf(stdout,"(**************************)");
/* Ecriture des connectivites, noms, numeros des mailles */
SMDS_MeshEdgesIterator itEdges(myMesh);
for (;itEdges.More();itEdges.Next()) {
const Handle(SMDS_MeshElement)& elem = itEdges.Value();
switch (elem->NbNodes()) {
case 2 : {
fprintf(myFileId,"%d %d ",elem->GetID(),102);
break;
}
case 3 : {
fprintf(myFileId,"%d %d ",elem->GetID(),103);
break;
}
}
for (i=0;i<elem->NbNodes();i++)
fprintf(myFileId,"%d ",elem->GetConnection(i+1));
fprintf(myFileId,"\n");
}
SMDS_MeshFacesIterator itFaces(myMesh);
for (;itFaces.More();itFaces.Next()) {
const Handle(SMDS_MeshElement)& elem = itFaces.Value();
switch (elem->NbNodes()) {
case 3 : {
fprintf(myFileId,"%d %d ",elem->GetID(),203);
break;
}
case 4 : {
fprintf(myFileId,"%d %d ",elem->GetID(),204);
break;
}
case 6 : {
fprintf(myFileId,"%d %d ",elem->GetID(),206);
break;
}
}
for (i=0;i<elem->NbNodes();i++)
fprintf(myFileId,"%d ",elem->GetConnection(i+1));
fprintf(myFileId,"\n");
}
SMDS_MeshVolumesIterator itVolumes(myMesh);
for (;itVolumes.More();itVolumes.Next()) {
const Handle(SMDS_MeshElement)& elem = itVolumes.Value();
switch (elem->NbNodes()) {
case 8 : {
fprintf(myFileId,"%d %d ",elem->GetID(),308);
break;
}
}
for (i=0;i<elem->NbNodes();i++)
fprintf(myFileId,"%d ",elem->GetConnection(i+1));
fprintf(myFileId,"\n");
}
fclose (myFileId);
}

View File

@ -0,0 +1,31 @@
#ifndef _INCLUDE_DRIVERDAT_W_SMESHDS_MESH
#define _INCLUDE_DRIVERDAT_W_SMESHDS_MESH
#include <stdio.h>
#include <string>
#include "SMESHDS_Mesh.hxx"
#include "Mesh_Writer.h"
class DriverDAT_W_SMESHDS_Mesh : public Mesh_Writer {
public :
DriverDAT_W_SMESHDS_Mesh();
~DriverDAT_W_SMESHDS_Mesh();
void Add();
void Write();
void SetMesh(Handle(SMDS_Mesh)& aMesh);
void SetFile(string);
void SetFileId(FILE*);
void SetMeshId(int);
private :
Handle_SMDS_Mesh myMesh;
string myFile;
FILE* myFileId;
int myMeshId;
};
#endif

39
src/DriverDAT/Makefile.in Normal file
View File

@ -0,0 +1,39 @@
# -* Makefile *-
#
# Author : Marc Tajchman (CEA)
# Date : 5/07/2001
# $Header$
#
# source path
top_srcdir=@top_srcdir@
top_builddir=../..
srcdir=@srcdir@
VPATH=.:@srcdir@
@COMMENCE@
# header files
EXPORT_HEADERS= DriverDAT_R_SMDS_Mesh.h DriverDAT_R_SMESHDS_Mesh.h DriverDAT_R_SMESHDS_Document.h DriverDAT_W_SMDS_Mesh.h DriverDAT_W_SMESHDS_Mesh.h DriverDAT_W_SMESHDS_Document.h
# Libraries targets
LIB = libMeshDriverDAT.la
LIB_SRC = DriverDAT_R_SMDS_Mesh.cxx DriverDAT_R_SMESHDS_Mesh.cxx DriverDAT_R_SMESHDS_Document.cxx DriverDAT_W_SMDS_Mesh.cxx DriverDAT_W_SMESHDS_Mesh.cxx DriverDAT_W_SMESHDS_Document.cxx
LIB_CLIENT_IDL =
LIB_SERVER_IDL =
# additionnal information to compil and link file
CPPFLAGS += $(OCC_INCLUDES)
CXXFLAGS += $(OCC_CXXFLAGS) $(MED2_INCLUDES)
LDFLAGS += $(OCC_LIBS) $(MED2_LIBS) -lMeshDriver
%_moc.cxx: %.h
$(MOC) $< -o $@
@CONCLUDE@

View File

@ -1,3 +1,4 @@
using namespace std;
#include "DriverMED_R_SMDS_Mesh.h"
#include "utilities.h"

View File

@ -1,3 +1,4 @@
using namespace std;
#include "DriverMED_R_SMESHDS_Document.h"
#include "DriverMED_R_SMESHDS_Mesh.h"
#include "utilities.h"

View File

@ -1,3 +1,4 @@
using namespace std;
#include "DriverMED_R_SMESHDS_Mesh.h"
#include "DriverMED_R_SMDS_Mesh.h"
#include "utilities.h"

View File

@ -1,3 +1,4 @@
using namespace std;
#include "DriverMED_W_SMDS_Mesh.h"
#include "SMDS_MeshElement.hxx"

View File

@ -1,3 +1,4 @@
using namespace std;
#include "DriverMED_W_SMESHDS_Document.h"
#include "DriverMED_W_SMESHDS_Mesh.h"
#include "utilities.h"

View File

@ -1,3 +1,4 @@
using namespace std;
#include "DriverMED_W_SMESHDS_Mesh.h"
#include "DriverMED_W_SMDS_Mesh.h"
@ -186,15 +187,65 @@ void DriverMED_W_SMESHDS_Mesh::Add() {
/* calcul de la dimension */
mdim=2;
double epsilon=0.00001;
double nodeRefX;
double nodeRefY;
double nodeRefZ;
bool dimX = true;
bool dimY = true;
bool dimZ = true;
SMDS_MeshNodesIterator myItNodes(myMesh);
int inode = 0;
for (;myItNodes.More();myItNodes.Next()) {
const Handle(SMDS_MeshElement)& elem = myItNodes.Value();
const Handle(SMDS_MeshNode)& node = myMesh->GetNode(1,elem);
if ( fabs(node->Z()) > epsilon ) {
mdim=3;
if ( inode == 0 ) {
nodeRefX = fabs(node->X());
nodeRefY = fabs(node->Y());
nodeRefZ = fabs(node->Z());
}
SCRUTE( inode );
SCRUTE( nodeRefX );
SCRUTE( nodeRefY );
SCRUTE( nodeRefZ );
if ( inode !=0 ) {
if ( (fabs(fabs(node->X()) - nodeRefX) > epsilon ) && dimX )
dimX = false;
if ( (fabs(fabs(node->Y()) - nodeRefY) > epsilon ) && dimY )
dimY = false;
if ( (fabs(fabs(node->Z()) - nodeRefZ) > epsilon ) && dimZ )
dimZ = false;
}
if ( !dimX && !dimY && !dimZ ) {
mdim = 3;
break;
}
inode++;
}
if ( mdim != 3 ) {
if ( dimX && dimY && dimZ )
mdim = 0;
else if ( !dimX ) {
if ( dimY && dimZ )
mdim = 1;
else if (( dimY && !dimZ ) || ( !dimY && dimZ ) )
mdim = 2;
} else if ( !dimY ) {
if ( dimX && dimZ )
mdim = 1;
else if (( dimX && !dimZ ) || ( !dimX && dimZ ) )
mdim = 2;
} else if ( !dimZ ) {
if ( dimY && dimX )
mdim = 1;
else if (( dimY && !dimX ) || ( !dimY && dimX ) )
mdim = 2;
}
}
MESSAGE ( " mdim " << mdim );
/* creation du maillage */
@ -339,8 +390,18 @@ void DriverMED_W_SMESHDS_Mesh::Add() {
coo[i*3+1]=node->Y();
coo[i*3+2]=node->Z();
} else {
coo[i*2]=node->X();
coo[i*2+1]=node->Y();
if ( dimX ) {
coo[i*2]=node->Y();
coo[i*2+1]=node->Z();
}
if ( dimY ) {
coo[i*2]=node->X();
coo[i*2+1]=node->Z();
}
if ( dimZ ) {
coo[i*2]=node->X();
coo[i*2+1]=node->Y();
}
}
mapNoeud[node->GetID()] = i+1;

View File

@ -7,7 +7,7 @@
# source path
top_srcdir=@top_srcdir@
top_builddir=../../..
top_builddir=../..
srcdir=@srcdir@
VPATH=.:@srcdir@

View File

@ -0,0 +1,153 @@
using namespace std;
#include "DriverUNV_R_SMDS_Mesh.h"
#include "utilities.h"
DriverUNV_R_SMDS_Mesh::DriverUNV_R_SMDS_Mesh() {
;
}
DriverUNV_R_SMDS_Mesh::~DriverUNV_R_SMDS_Mesh() {
;
}
void DriverUNV_R_SMDS_Mesh::SetMesh(Handle(SMDS_Mesh)& aMesh) {
myMesh = aMesh;
}
void DriverUNV_R_SMDS_Mesh::SetFile(string aFile) {
myFile = aFile;
}
void DriverUNV_R_SMDS_Mesh::SetFileId(FILE* aFileId) {
myFileId = aFileId;
}
void DriverUNV_R_SMDS_Mesh::SetMeshId(int aMeshId) {
myMeshId = aMeshId;
}
void DriverUNV_R_SMDS_Mesh::Add() {
;
}
void DriverUNV_R_SMDS_Mesh::Read() {
int cell=0,node=0,n1,n2,n3,n4,n_nodes,nodes[6],blockId,i;
char *s1,*s2,*s3;
string str1,str2,str3;
int i1=0;
bool ok, found_block2411, found_block2412;
/****************************************************************************
* OUVERTURE DU FICHIER EN LECTURE *
****************************************************************************/
char* file2Read = (char*)myFile.c_str();
myFileId = fopen(file2Read,"r");
if (myFileId < 0)
{
fprintf(stderr,">> ERREUR : ouverture du fichier %s \n",file2Read);
exit(EXIT_FAILURE);
}
s1 = (char*) malloc(sizeof(char)*100);
s2 = (char*) malloc(sizeof(char)*100);
s3 = (char*) malloc(sizeof(char)*100);
found_block2411 = false;
found_block2412 = false;
do {
while (i1==-1) {
fscanf(myFileId,"%d\n",&blockId);
switch (blockId) {
case 2411 : {
MESSAGE("BlockId "<<blockId);
fscanf(myFileId,"%d",&node);
//MESSAGE("Node "<<node);
while (node!=-1) {
fscanf(myFileId,"%d %d %d\n",&n1,&n2,&n3);
fscanf(myFileId,"%s %s %s\n",s1,s2,s3);
str1=string(s1);
str2=string(s2);
str3=string(s3);
if (str1.find("D")!=string::npos) str1.replace(str1.find("D"),1,"E");
if (str2.find("D")!=string::npos) str2.replace(str2.find("D"),1,"E");
if (str3.find("D")!=string::npos) str3.replace(str3.find("D"),1,"E");
ok = myMesh->AddNodeWithID(atof(str1.c_str()),atof(str2.c_str()),atof(str3.c_str()),node);
fscanf(myFileId,"%d",&node);
}
i1=0;
found_block2411 = true;
break;
}
case 2412 : {
MESSAGE("BlockId "<<blockId);
fscanf(myFileId,"%d",&cell);
//MESSAGE("Cell "<<cell);
while (cell!=-1) {
fscanf(myFileId,"%d %d %d %d %d\n",&n1,&n2,&n3,&n4,&n_nodes);
if ((n1==71)||(n1==72)||(n1==74)||(n1==91)||(n1==92)) {//203
if (n_nodes==3) {
for (i=1;i<=n_nodes;i++)
fscanf(myFileId,"%d",&nodes[i-1]);
ok = myMesh->AddFaceWithID(nodes[0],nodes[1],nodes[2],cell);
}
else if (n_nodes==6) {//206
for (i=1;i<=n_nodes;i++)
fscanf(myFileId,"%d",&nodes[i-1]);
ok = myMesh->AddFaceWithID(nodes[0],nodes[2],nodes[4],cell);
}
}
else if ((n1==11)||(n1==21)||(n1==24)||(n1==25)) {//103
fgets(s2,100,myFileId);
if (n_nodes==3) {
for (i=1;i<=n_nodes;i++)
fscanf(myFileId,"%d",&nodes[i-1]);
ok = myMesh->AddEdgeWithID(nodes[0],nodes[1],cell);
//MESSAGE("in 103 "<<cell);
}
else if (n_nodes==2) {//102
for (i=1;i<=n_nodes;i++)
fscanf(myFileId,"%d",&nodes[i-1]);
ok = myMesh->AddEdgeWithID(nodes[0],nodes[1],cell);
//MESSAGE("in 102 "<<cell);
}
}
fscanf(myFileId,"\n");
fscanf(myFileId,"%d",&cell);
}
i1=0;
found_block2412 = true;
break;
}
case -1 : {
break;
}
default:
MESSAGE("BlockId "<<blockId);
i1=0;
break;
}
}
fscanf(myFileId,"%s\n",s1);
i1 = atoi(s1);
}
while ((!feof(myFileId))&&((!found_block2411)||(!found_block2412)));
/****************************************************************************
* FERMETURE DU FICHIER *
****************************************************************************/
free(s1);
free(s2);
free(s3);
fclose(myFileId);
}

View File

@ -0,0 +1,30 @@
#ifndef _INCLUDE_DRIVERUNV_R_SMDS_MESH
#define _INCLUDE_DRIVERUNV_R_SMDS_MESH
#include <stdio.h>
#include "SMDS_Mesh.hxx"
#include "Mesh_Reader.h"
class DriverUNV_R_SMDS_Mesh : public Mesh_Reader {
public :
DriverUNV_R_SMDS_Mesh();
~DriverUNV_R_SMDS_Mesh();
void Add();
void Read();
void SetMesh(Handle(SMDS_Mesh)& aMesh);
void SetFile(string);
void SetFileId(FILE*);
void SetMeshId(int);
private :
Handle_SMDS_Mesh myMesh;
string myFile;
FILE* myFileId;
int myMeshId;
};
#endif

View File

@ -0,0 +1,85 @@
using namespace std;
#include "DriverUNV_R_SMESHDS_Document.h"
#include "DriverUNV_R_SMESHDS_Mesh.h"
#include "utilities.h"
int getOne() {
printf("in getOne");
return (1);
}
extern "C" {
// Document_Reader* maker() {
DriverUNV_R_SMESHDS_Document* maker() {
fprintf(stdout,"here in maker\n");
return new DriverUNV_R_SMESHDS_Document;
}
}
DriverUNV_R_SMESHDS_Document::DriverUNV_R_SMESHDS_Document() {
myFile = string("");
}
DriverUNV_R_SMESHDS_Document::~DriverUNV_R_SMESHDS_Document() {
;
}
//void DriverUNV_R_SMESHDS_Document::SetFile(string aFile) {
//myFile = aFile;
//}
//void DriverUNV_R_SMESHDS_Document::SetDocument(Handle(SMESHDS_Document)& aDoc) {
//myDocument = aDoc;
//}
void DriverUNV_R_SMESHDS_Document::Read() {
int myMeshId;
SCRUTE(myFile);
//Handle(SMESHDS_Document) myDocument = new SMESHDS_Document(1);
/****************************************************************************
* OUVERTURE DU FICHIER EN LECTURE *
****************************************************************************/
char* file2Read = (char*)myFile.c_str();
FILE* fid = fopen(file2Read,"r");
if (fid < 0)
{
fprintf(stderr,">> ERREUR : ouverture du fichier %s \n",file2Read);
exit(EXIT_FAILURE);
}
/****************************************************************************
* COMBIEN DE MAILLAGES ? *
****************************************************************************/
int nmaa = 1;
/****************************************************************************
* FERMETURE DU FICHIER *
****************************************************************************/
fclose(fid);
printf("Nombre de maillages = %d\n",nmaa);
string myClass = string("SMESHDS_Mesh");
string myExtension = string("UNV");
for (int meshIt=1;meshIt<=nmaa;meshIt++) {
myMeshId = myDocument->NewMesh();
Handle(SMDS_Mesh) myMesh = myDocument->GetMesh(myMeshId);
DriverUNV_R_SMESHDS_Mesh* myReader = new DriverUNV_R_SMESHDS_Mesh;
myReader->SetMesh(myMesh);
myReader->SetFile(myFile);
//myReader->SetFileId(fid);
myReader->Read();
}
}

View File

@ -0,0 +1,24 @@
#ifndef _INCLUDE_DRIVERUNV_R_SMESHDS_DOCUMENT
#define _INCLUDE_DRIVERUNV_R_SMESHDS_DOCUMENT
#include <stdio.h>
#include "SMESHDS_Document.hxx"
#include "Document_Reader.h"
class DriverUNV_R_SMESHDS_Document : public Document_Reader {
public :
DriverUNV_R_SMESHDS_Document();
~DriverUNV_R_SMESHDS_Document();
void Read();
//void SetFile(string);
//void SetDocument(Handle_SMESHDS_Document&);
private :
//Handle_SMESHDS_Document myDocument;
//string myFile;
};
#endif

View File

@ -0,0 +1,48 @@
using namespace std;
#include "DriverUNV_R_SMESHDS_Mesh.h"
#include "DriverUNV_R_SMDS_Mesh.h"
#include "utilities.h"
DriverUNV_R_SMESHDS_Mesh::DriverUNV_R_SMESHDS_Mesh() {
;
}
DriverUNV_R_SMESHDS_Mesh::~DriverUNV_R_SMESHDS_Mesh() {
;
}
void DriverUNV_R_SMESHDS_Mesh::SetMesh(Handle(SMDS_Mesh)& aMesh) {
//myMesh = Handle(SMESHDS_Mesh)::DownCast(aMesh);
myMesh = aMesh;
}
void DriverUNV_R_SMESHDS_Mesh::SetFile(string aFile) {
myFile = aFile;
}
void DriverUNV_R_SMESHDS_Mesh::SetFileId(FILE* aFileId) {
myFileId = aFileId;
}
void DriverUNV_R_SMESHDS_Mesh::SetMeshId(int aMeshId) {
myMeshId = aMeshId;
}
void DriverUNV_R_SMESHDS_Mesh::Add() {
;
}
void DriverUNV_R_SMESHDS_Mesh::Read() {
string myClass = string("SMDS_Mesh");
string myExtension = string("UNV");
DriverUNV_R_SMDS_Mesh* myReader = new DriverUNV_R_SMDS_Mesh;
myReader->SetMesh(myMesh);
myReader->SetFile(myFile);
//myReader->SetFileId(myFileId);
myReader->Read();
}

View File

@ -0,0 +1,30 @@
#ifndef _INCLUDE_DRIVERUNV_R_SMESHDS_MESH
#define _INCLUDE_DRIVERUNV_R_SMESHDS_MESH
#include <stdio.h>
#include "SMESHDS_Mesh.hxx"
#include "Mesh_Reader.h"
class DriverUNV_R_SMESHDS_Mesh : public Mesh_Reader {
public :
DriverUNV_R_SMESHDS_Mesh();
~DriverUNV_R_SMESHDS_Mesh();
void Add();
void Read();
void SetMesh(Handle(SMDS_Mesh)& aMesh);
void SetFile(string);
void SetFileId(FILE*);
void SetMeshId(int);
private :
Handle_SMDS_Mesh myMesh;
string myFile;
FILE* myFileId;
int myMeshId;
};
#endif

View File

@ -0,0 +1,196 @@
using namespace std;
#include "DriverUNV_W_SMDS_Mesh.h"
#include "SMDS_MeshElement.hxx"
#include "SMDS_MeshNode.hxx"
#include "SMDS_MeshEdgesIterator.hxx"
#include "SMDS_MeshFacesIterator.hxx"
#include "SMDS_MeshNodesIterator.hxx"
#include "SMDS_MeshVolumesIterator.hxx"
#include <utilities.h>
#define sNODE_UNV_ID " 2411"
#define sELT_UNV_ID " 2412"
#define sUNV_SEPARATOR " -1"
#define sNODE_UNV_DESCR "%10d 1 1 11\n"
#define sELT_SURF_DESC "%10d %2d 1 1 11 %1d\n"
#define sELT_VOLU_DESC "%10d %2d 1 1 9 %1d\n"
#define sELT_BEAM_DESC1 "%10d %2d 1 1 7 %1d\n"
#define sELT_BEAM_DESC2 " 0 1 1\n"
DriverUNV_W_SMDS_Mesh::DriverUNV_W_SMDS_Mesh() {
;
}
DriverUNV_W_SMDS_Mesh::~DriverUNV_W_SMDS_Mesh() {
;
}
void DriverUNV_W_SMDS_Mesh::SetMesh(Handle(SMDS_Mesh)& aMesh) {
myMesh = aMesh;
}
void DriverUNV_W_SMDS_Mesh::SetFile(string aFile) {
myFile = aFile;
}
void DriverUNV_W_SMDS_Mesh::SetFileId(FILE* aFileId) {
myFileId = aFileId;
}
void DriverUNV_W_SMDS_Mesh::SetMeshId(int aMeshId) {
myMeshId = aMeshId;
}
void DriverUNV_W_SMDS_Mesh::Add() {
;
}
void DriverUNV_W_SMDS_Mesh::Write() {
int nbNodes,nbCells;
int i;
char* file2Read = (char*)myFile.c_str();
myFileId = fopen(file2Read,"w+");
if (myFileId < 0)
{
fprintf(stderr,">> ERREUR : ouverture du fichier %s \n",file2Read);
exit(EXIT_FAILURE);
}
SCRUTE(myMesh);
/****************************************************************************
* NOMBRES D'OBJETS *
****************************************************************************/
fprintf(stdout,"\n(****************************)\n");
fprintf(stdout,"(* INFORMATIONS GENERALES : *)\n");
fprintf(stdout,"(****************************)\n");
/* Combien de noeuds ? */
nbNodes = myMesh->NbNodes();
/* Combien de mailles, faces ou aretes ? */
Standard_Integer nb_of_nodes, nb_of_edges,nb_of_faces, nb_of_volumes;
nb_of_edges = myMesh->NbEdges();
nb_of_faces = myMesh->NbFaces();
nb_of_volumes = myMesh->NbVolumes();
nbCells = nb_of_edges + nb_of_faces + nb_of_volumes;
SCRUTE(nb_of_edges);
SCRUTE(nb_of_faces);
SCRUTE(nb_of_volumes);
fprintf(stdout,"%d %d\n",nbNodes,nbCells);
fprintf(myFileId,"%d %d\n",nbNodes,nbCells);
/****************************************************************************
* ECRITURE DES NOEUDS *
****************************************************************************/
fprintf(stdout,"\n(************************)\n");
fprintf(stdout,"(* NOEUDS DU MAILLAGE : *)\n");
fprintf(stdout,"(************************)\n");
SMDS_MeshNodesIterator itNodes(myMesh);
fprintf(myFileId,"%s\n", sUNV_SEPARATOR);
fprintf(myFileId,"%s\n", sNODE_UNV_ID );
for (;itNodes.More();itNodes.Next()) {
const Handle(SMDS_MeshElement)& elem = itNodes.Value();
const Handle(SMDS_MeshNode )& node = myMesh->GetNode(1, elem);
fprintf(myFileId, sNODE_UNV_DESCR, node->GetID());
fprintf(myFileId, "%25.16E%25.16E%25.16E\n", node->X(), node->Y(), node->Z());
}
fprintf(myFileId,"%s\n", sUNV_SEPARATOR);
/****************************************************************************
* ECRITURE DES ELEMENTS *
****************************************************************************/
fprintf(stdout,"\n(**************************)\n");
fprintf(stdout,"(* ELEMENTS DU MAILLAGE : *)\n");
fprintf(stdout,"(**************************)");
/* Ecriture des connectivites, noms, numeros des mailles */
fprintf(myFileId,"%s\n", sUNV_SEPARATOR);
fprintf(myFileId,"%s\n", sELT_UNV_ID );
SMDS_MeshEdgesIterator itEdges(myMesh);
for (;itEdges.More();itEdges.Next()) {
const Handle(SMDS_MeshElement)& elem = itEdges.Value();
switch (elem->NbNodes()) {
case 2 : {
fprintf(myFileId, sELT_BEAM_DESC1, elem->GetID(), 21, elem->NbNodes());
fprintf(myFileId, sELT_BEAM_DESC2);
fprintf(myFileId, "%10d%10d\n", elem->GetConnection(1), elem->GetConnection(2));
break;
}
case 3 : {
fprintf(myFileId, sELT_BEAM_DESC1, elem->GetID(), 24, elem->NbNodes());
fprintf(myFileId, sELT_BEAM_DESC2);
fprintf(myFileId, "%10d%10d%10d\n",elem->GetConnection(1), elem->GetConnection(2), elem->GetConnection(3));
break;
}
}
}
SMDS_MeshFacesIterator itFaces(myMesh);
for (;itFaces.More();itFaces.Next()) {
const Handle(SMDS_MeshElement)& elem = itFaces.Value();
switch (elem->NbNodes()) {
case 3 :
// linear triangle
fprintf(myFileId, sELT_SURF_DESC, elem->GetID(), 74, elem->NbNodes());
break;
case 4 :
// linear quadrilateral
fprintf(myFileId, sELT_SURF_DESC, elem->GetID(), 71, elem->NbNodes());
break;
case 6 :
// parabolic triangle
fprintf(myFileId, sELT_SURF_DESC, elem->GetID(), 72, elem->NbNodes());
break;
case 8 :
// parabolic quadrilateral
fprintf(myFileId, sELT_SURF_DESC, elem->GetID(), 75, elem->NbNodes());
break;
default:
fprintf(myFileId, "element not registered\n");
}
for (i=0;i<elem->NbNodes();i++)
fprintf(myFileId,"%10d",elem->GetConnection(i+1));
fprintf(myFileId,"\n");
}
SMDS_MeshVolumesIterator itVolumes(myMesh);
for (;itVolumes.More();itVolumes.Next()) {
const Handle(SMDS_MeshElement)& elem = itVolumes.Value();
switch (elem->NbNodes()) {
case 4 :
// linear tetrahedron
fprintf(myFileId, sELT_SURF_DESC, elem->GetID(), 111, elem->NbNodes());
break;
case 6 :
// linear tetrahedron
fprintf(myFileId, sELT_SURF_DESC, elem->GetID(), 112, elem->NbNodes());
break;
case 8 :
// linear brick
fprintf(myFileId, sELT_SURF_DESC, elem->GetID(), 115, elem->NbNodes());
break;
}
for (i=0;i<elem->NbNodes();i++)
fprintf(myFileId,"%10d",elem->GetConnection(i+1));
fprintf(myFileId,"\n");
}
fprintf(myFileId,"%s\n", sUNV_SEPARATOR);
fclose (myFileId);
}

Some files were not shown because too many files have changed in this diff Show More