mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-05 23:24:18 +05:00
This commit was generated by cvs2git to create branch 'BR-D5-38-2003'.
Cherrypick from master 2005-10-20 12:59:41 UTC mzn <mzn@opencascade.com> 'Movement of examples to CVS EXAMPLES SAMPLES_SRC.': src/Controls/Makefile.in src/DriverDAT/Makefile.in src/DriverMED/Makefile.in src/DriverSTL/Makefile.in src/DriverUNV/Makefile.in src/SMESH_I/Makefile.in src/SMESH_I/SMESH_MEDMesh_i.hxx src/SMESH_SWIG/SMESH_Nut.py src/SMESH_SWIG/SMESH_flight_skin.py src/SMESH_SWIG/SMESH_test5.py
This commit is contained in:
parent
dcdd0fa9ef
commit
4d46b6e49f
52
src/Controls/Makefile.in
Normal file
52
src/Controls/Makefile.in
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
# SMESH OBJECT : interactive object for SMESH visualization
|
||||||
|
#
|
||||||
|
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License.
|
||||||
|
#
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# File : Makefile.in
|
||||||
|
# Module : SMESH
|
||||||
|
|
||||||
|
top_srcdir=@top_srcdir@
|
||||||
|
top_builddir=../..
|
||||||
|
srcdir=@srcdir@
|
||||||
|
VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl
|
||||||
|
|
||||||
|
@COMMENCE@
|
||||||
|
|
||||||
|
EXPORT_HEADERS = SMESH_Controls.hxx SMESH_ControlsDef.hxx
|
||||||
|
|
||||||
|
|
||||||
|
# Libraries targets
|
||||||
|
|
||||||
|
LIB = libSMESHControls.la
|
||||||
|
LIB_SRC = SMESH_Controls.cxx
|
||||||
|
|
||||||
|
# Executables targets
|
||||||
|
BIN = SMESHControls
|
||||||
|
BIN_SRC =
|
||||||
|
|
||||||
|
CPPFLAGS+=$(OCC_INCLUDES) $(BOOST_CPPFLAGS) -I${KERNEL_ROOT_DIR}/include/salome
|
||||||
|
|
||||||
|
LDFLAGS+=$(OCC_KERNEL_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome -lOpUtil -lSMDS -lTKBRep -lTKG3d
|
||||||
|
|
||||||
|
LDFLAGSFORBIN += -lSMDS -L${KERNEL_ROOT_DIR}/lib/salome -lOpUtil -lSALOMELocalTrace -lSALOMEBasics $(OCC_KERNEL_LIBS) -lTKBRep -lTKG3d
|
||||||
|
|
||||||
|
@CONCLUDE@
|
61
src/DriverDAT/Makefile.in
Normal file
61
src/DriverDAT/Makefile.in
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# SMESH DriverDAT : driver to read and write 'dat' files
|
||||||
|
#
|
||||||
|
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License.
|
||||||
|
#
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# File : Makefile.in
|
||||||
|
# Author : Marc Tajchman (CEA)
|
||||||
|
# Module : SMESH
|
||||||
|
# $Header$
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
# Executables targets
|
||||||
|
BIN = DAT_Test
|
||||||
|
|
||||||
|
LIB_CLIENT_IDL =
|
||||||
|
|
||||||
|
LIB_SERVER_IDL =
|
||||||
|
|
||||||
|
# additionnal information to compil and link file
|
||||||
|
CPPFLAGS += -I${KERNEL_ROOT_DIR}/include/salome $(OCC_INCLUDES) $(BOOST_CPPFLAGS)
|
||||||
|
CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome
|
||||||
|
LDFLAGS += -lMeshDriver $(OCC_KERNEL_LIBS)
|
||||||
|
|
||||||
|
LDFLAGSFORBIN += -lMeshDriver -lSMDS -L${KERNEL_ROOT_DIR}/lib/salome -lOpUtil -lSALOMELocalTrace -lSALOMEBasics
|
||||||
|
|
||||||
|
@CONCLUDE@
|
||||||
|
|
||||||
|
|
||||||
|
|
71
src/DriverMED/Makefile.in
Normal file
71
src/DriverMED/Makefile.in
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
# SMESH DriverMED : driver to read and write 'med' files
|
||||||
|
#
|
||||||
|
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License.
|
||||||
|
#
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# File : Makefile.in
|
||||||
|
# Author : Marc Tajchman (CEA)
|
||||||
|
# Module : SMESH
|
||||||
|
# $Header$
|
||||||
|
|
||||||
|
top_srcdir=@top_srcdir@
|
||||||
|
top_builddir=../..
|
||||||
|
srcdir=@srcdir@
|
||||||
|
VPATH=.:@srcdir@
|
||||||
|
|
||||||
|
|
||||||
|
@COMMENCE@
|
||||||
|
|
||||||
|
# header files
|
||||||
|
EXPORT_HEADERS = \
|
||||||
|
DriverMED_R_SMDS_Mesh.h DriverMED_R_SMESHDS_Mesh.h DriverMED_R_SMESHDS_Document.h \
|
||||||
|
DriverMED_W_SMDS_Mesh.h DriverMED_W_SMESHDS_Mesh.h DriverMED_W_SMESHDS_Document.h \
|
||||||
|
DriverMED_Family.h
|
||||||
|
|
||||||
|
# Libraries targets
|
||||||
|
LIB = libMeshDriverMED.la
|
||||||
|
LIB_SRC = \
|
||||||
|
DriverMED_R_SMDS_Mesh.cxx \
|
||||||
|
DriverMED_R_SMESHDS_Mesh.cxx \
|
||||||
|
DriverMED_R_SMESHDS_Document.cxx \
|
||||||
|
DriverMED_W_SMDS_Mesh.cxx \
|
||||||
|
DriverMED_W_SMESHDS_Document.cxx \
|
||||||
|
DriverMED_W_SMESHDS_Mesh.cxx \
|
||||||
|
DriverMED_Family.cxx
|
||||||
|
|
||||||
|
# Executables targets
|
||||||
|
BIN = MED_Test
|
||||||
|
|
||||||
|
LIB_CLIENT_IDL =
|
||||||
|
|
||||||
|
LIB_SERVER_IDL =
|
||||||
|
|
||||||
|
# additionnal information to compil and link file
|
||||||
|
CPPFLAGS += $(OCC_INCLUDES) -I${MED_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS)
|
||||||
|
CXXFLAGS += $(OCC_CXXFLAGS) $(HDF5_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
|
||||||
|
LDFLAGS += -lMeshDriver -L${MED_ROOT_DIR}/lib/salome -lMEDWrapper
|
||||||
|
|
||||||
|
LDFLAGSFORBIN += -lMeshDriver -lSMDS -lSMESHDS -L${KERNEL_ROOT_DIR}/lib/salome -L${MED_ROOT_DIR}/lib/salome -lMEDWrapper -lMEDWrapperBase -lMEDWrapper_V2_1 -lMEDWrapper_V2_2 -lOpUtil -lSALOMELocalTrace -lSALOMEBasics
|
||||||
|
|
||||||
|
@CONCLUDE@
|
||||||
|
|
||||||
|
|
||||||
|
|
61
src/DriverSTL/Makefile.in
Normal file
61
src/DriverSTL/Makefile.in
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# SMESH DriverSTL : driver to read and write 'stl' files
|
||||||
|
#
|
||||||
|
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License.
|
||||||
|
#
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# File : Makefile.in
|
||||||
|
# Author : Marc Tajchman (CEA)
|
||||||
|
# Module : SMESH
|
||||||
|
# $Header$
|
||||||
|
|
||||||
|
top_srcdir=@top_srcdir@
|
||||||
|
top_builddir=../..
|
||||||
|
srcdir=@srcdir@
|
||||||
|
VPATH=.:@srcdir@
|
||||||
|
|
||||||
|
|
||||||
|
@COMMENCE@
|
||||||
|
|
||||||
|
# header files
|
||||||
|
EXPORT_HEADERS= DriverSTL_R_SMDS_Mesh.h DriverSTL_W_SMDS_Mesh.h
|
||||||
|
|
||||||
|
# Libraries targets
|
||||||
|
LIB = libMeshDriverSTL.la
|
||||||
|
LIB_SRC = DriverSTL_R_SMDS_Mesh.cxx DriverSTL_W_SMDS_Mesh.cxx
|
||||||
|
|
||||||
|
# Executables targets
|
||||||
|
BIN = STL_Test
|
||||||
|
|
||||||
|
LIB_CLIENT_IDL =
|
||||||
|
|
||||||
|
LIB_SERVER_IDL =
|
||||||
|
|
||||||
|
# additionnal information to compil and link file
|
||||||
|
CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS)
|
||||||
|
CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome
|
||||||
|
LDFLAGS += $(OCC_KERNEL_LIBS) -lMeshDriver -lTKSTL -lTKTopAlgo -lTKMesh
|
||||||
|
|
||||||
|
LDFLAGSFORBIN += -lMeshDriver -lSMDS -L${KERNEL_ROOT_DIR}/lib/salome -lOpUtil -lSALOMELocalTrace -lSALOMEBasics $(OCC_KERNEL_LIBS) -lTKSTL -lTKTopAlgo -lTKMesh -lTKBO
|
||||||
|
|
||||||
|
@CONCLUDE@
|
||||||
|
|
||||||
|
|
||||||
|
|
73
src/DriverUNV/Makefile.in
Normal file
73
src/DriverUNV/Makefile.in
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# SMESH DriverUNV : driver to read and write 'unv' files
|
||||||
|
#
|
||||||
|
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License.
|
||||||
|
#
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# File : Makefile.in
|
||||||
|
# Author : Marc Tajchman (CEA)
|
||||||
|
# Module : SMESH
|
||||||
|
# $Header$
|
||||||
|
|
||||||
|
top_srcdir=@top_srcdir@
|
||||||
|
top_builddir=../..
|
||||||
|
srcdir=@srcdir@
|
||||||
|
VPATH=.:@srcdir@
|
||||||
|
|
||||||
|
|
||||||
|
@COMMENCE@
|
||||||
|
|
||||||
|
# header files
|
||||||
|
EXPORT_HEADERS= DriverUNV_R_SMDS_Mesh.h \
|
||||||
|
DriverUNV_R_SMESHDS_Mesh.h \
|
||||||
|
DriverUNV_R_SMESHDS_Document.h \
|
||||||
|
DriverUNV_W_SMDS_Mesh.h \
|
||||||
|
DriverUNV_W_SMESHDS_Mesh.h \
|
||||||
|
DriverUNV_W_SMESHDS_Document.h
|
||||||
|
|
||||||
|
# Libraries targets
|
||||||
|
LIB = libMeshDriverUNV.la
|
||||||
|
LIB_SRC = \
|
||||||
|
DriverUNV_R_SMDS_Mesh.cxx \
|
||||||
|
DriverUNV_R_SMESHDS_Mesh.cxx \
|
||||||
|
DriverUNV_R_SMESHDS_Document.cxx \
|
||||||
|
DriverUNV_W_SMESHDS_Document.cxx \
|
||||||
|
DriverUNV_W_SMDS_Mesh.cxx \
|
||||||
|
DriverUNV_W_SMESHDS_Mesh.cxx \
|
||||||
|
UNV_Utilities.cxx UNV2411_Structure.cxx UNV2412_Structure.cxx
|
||||||
|
|
||||||
|
# Executables targets
|
||||||
|
BIN = UNV_Test
|
||||||
|
|
||||||
|
LIB_CLIENT_IDL =
|
||||||
|
|
||||||
|
LIB_SERVER_IDL =
|
||||||
|
|
||||||
|
# additionnal information to compil and link file
|
||||||
|
CPPFLAGS += -I${KERNEL_ROOT_DIR}/include/salome $(OCC_INCLUDES) $(BOOST_CPPFLAGS)
|
||||||
|
CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome
|
||||||
|
LDFLAGS += -lMeshDriver $(OCC_KERNEL_LIBS)
|
||||||
|
|
||||||
|
LDFLAGSFORBIN += -lMeshDriver -lSMDS -L${KERNEL_ROOT_DIR}/lib/salome -lOpUtil -lSALOMELocalTrace -lSALOMEBasics
|
||||||
|
|
||||||
|
@CONCLUDE@
|
||||||
|
|
||||||
|
|
||||||
|
|
105
src/SMESH_I/Makefile.in
Normal file
105
src/SMESH_I/Makefile.in
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
# SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||||
|
#
|
||||||
|
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License.
|
||||||
|
#
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# File : Makefile.in
|
||||||
|
# Author : Paul RASCLE, EDF
|
||||||
|
# Module : SMESH
|
||||||
|
# $Header$
|
||||||
|
|
||||||
|
|
||||||
|
top_srcdir=@top_srcdir@
|
||||||
|
top_builddir=../..
|
||||||
|
srcdir=@srcdir@
|
||||||
|
VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl:
|
||||||
|
|
||||||
|
|
||||||
|
@COMMENCE@
|
||||||
|
|
||||||
|
# header files
|
||||||
|
EXPORT_HEADERS= \
|
||||||
|
SMESH_Gen_i.hxx \
|
||||||
|
SMESH_Algo_i.hxx \
|
||||||
|
SMESH_1D_Algo_i.hxx \
|
||||||
|
SMESH_2D_Algo_i.hxx \
|
||||||
|
SMESH_3D_Algo_i.hxx \
|
||||||
|
SMESH_subMesh_i.hxx \
|
||||||
|
SMESH_Mesh_i.hxx \
|
||||||
|
SMESH_Hypothesis_i.hxx \
|
||||||
|
SMESH.hxx
|
||||||
|
|
||||||
|
EXPORT_PYSCRIPTS = smeshpy.py
|
||||||
|
|
||||||
|
# Libraries targets
|
||||||
|
|
||||||
|
LIB= libSMESHEngine.la
|
||||||
|
|
||||||
|
LIB_SRC = \
|
||||||
|
SMESH_Gen_i.cxx \
|
||||||
|
SMESH_Gen_i_1.cxx \
|
||||||
|
SMESH_DumpPython.cxx \
|
||||||
|
SMESH_Mesh_i.cxx \
|
||||||
|
SMESH_MEDMesh_i.cxx \
|
||||||
|
SMESH_MEDFamily_i.cxx \
|
||||||
|
SMESH_MEDSupport_i.cxx \
|
||||||
|
SMESH_subMesh_i.cxx \
|
||||||
|
SMESH_MeshEditor_i.cxx \
|
||||||
|
SMESH_Hypothesis_i.cxx \
|
||||||
|
SMESH_Algo_i.cxx \
|
||||||
|
SMESH_1D_Algo_i.cxx \
|
||||||
|
SMESH_2D_Algo_i.cxx \
|
||||||
|
SMESH_3D_Algo_i.cxx \
|
||||||
|
SMESH_Filter_i.cxx \
|
||||||
|
SMESH_Group_i.cxx \
|
||||||
|
SMESH_Pattern_i.cxx
|
||||||
|
|
||||||
|
LIB_SERVER_IDL = SMESH_Gen.idl SMESH_Hypothesis.idl SMESH_Mesh.idl \
|
||||||
|
SALOME_Component.idl SALOME_Exception.idl \
|
||||||
|
SMESH_Filter.idl SMESH_Group.idl SMESH_Pattern.idl
|
||||||
|
|
||||||
|
LIB_CLIENT_IDL = SALOMEDS.idl GEOM_Gen.idl MED.idl SALOMEDS_Attributes.idl SALOME_GenericObj.idl SALOME_Comm.idl
|
||||||
|
|
||||||
|
# Executables targets
|
||||||
|
BIN = SMESHEngine
|
||||||
|
BIN_SRC =
|
||||||
|
|
||||||
|
# additionnal information to compil and link file
|
||||||
|
CPPFLAGS+= $(OCC_INCLUDES) $(HDF5_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome \
|
||||||
|
-I${MED_ROOT_DIR}/include/salome -I${GEOM_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS)
|
||||||
|
CXXFLAGS+= $(OCC_CXXFLAGS) $(HDF5_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome \
|
||||||
|
-I${MED_ROOT_DIR}/include/salome -I${GEOM_ROOT_DIR}/include/salome
|
||||||
|
|
||||||
|
LDFLAGS+= -L${KERNEL_ROOT_DIR}/lib/salome -lSalomeContainer -lSalomeNS -lRegistry -lSalomeHDFPersist -lSalomeLifeCycleCORBA -lTOOLSDS -lSalomeGenericObj \
|
||||||
|
-L${GEOM_ROOT_DIR}/lib/salome -lGEOMClient -lSMESHimpl -lSMESHControls \
|
||||||
|
-L${CASROOT}/lin/lib -lTKCDF -lTKBO
|
||||||
|
|
||||||
|
|
||||||
|
LDFLAGSFORBIN += -lSMDS -lSMESHDS \
|
||||||
|
-L${MED_ROOT_DIR}/lib/salome -lMEDWrapper -lMEDWrapperBase -lMEDWrapper_V2_1 -lMEDWrapper_V2_2 \
|
||||||
|
-lMeshDriver -lMeshDriverMED -lMeshDriverUNV -lMeshDriverDAT -lMeshDriverSTL \
|
||||||
|
-L${KERNEL_ROOT_DIR}/lib/salome -lSalomeContainer -lSalomeNS -lRegistry -lSalomeResourcesManager \
|
||||||
|
-lOpUtil -lSALOMELocalTrace -lSALOMEBasics -lSalomeNotification -lCASCatch \
|
||||||
|
-lSalomeHDFPersist -lSalomeLifeCycleCORBA -lTOOLSDS -lSalomeGenericObj \
|
||||||
|
-L${GEOM_ROOT_DIR}/lib/salome -lGEOMClient -lSMESHimpl -lSMESHControls -lNMTTools -lNMTDS \
|
||||||
|
-L${CASROOT}/lin/lib -lTKCDF -lTKBO -lTKMath
|
||||||
|
|
||||||
|
@CONCLUDE@
|
239
src/SMESH_I/SMESH_MEDMesh_i.hxx
Normal file
239
src/SMESH_I/SMESH_MEDMesh_i.hxx
Normal file
@ -0,0 +1,239 @@
|
|||||||
|
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2.1 of the License.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
//
|
||||||
|
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// File : SMESH_MEDMesh_i.hxx
|
||||||
|
// Module : SMESH
|
||||||
|
|
||||||
|
#ifndef _MED_SMESH_MESH_I_HXX_
|
||||||
|
#define _MED_SMESH_MESH_I_HXX_
|
||||||
|
|
||||||
|
#include <SALOMEconfig.h>
|
||||||
|
#include CORBA_SERVER_HEADER(MED)
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
#include "SMESHDS_Mesh.hxx"
|
||||||
|
|
||||||
|
#include "SMDS_MeshElement.hxx"
|
||||||
|
#include "SMDS_MeshNode.hxx"
|
||||||
|
#include "SALOME_GenericObj_i.hh"
|
||||||
|
|
||||||
|
#define MED_NBR_GEOMETRIE_MAILLE 15
|
||||||
|
#define MED_NBR_TYPE 5
|
||||||
|
|
||||||
|
class SMESH_Mesh_i;
|
||||||
|
|
||||||
|
class SMESH_MEDMesh_i:
|
||||||
|
public virtual POA_SALOME_MED::MESH, public virtual SALOME::GenericObj_i
|
||||||
|
{
|
||||||
|
public: private: protected:
|
||||||
|
// C++ object containing values
|
||||||
|
::SMESH_Mesh_i * _mesh_i;
|
||||||
|
SMESHDS_Mesh *_meshDS;
|
||||||
|
|
||||||
|
string _meshId;
|
||||||
|
bool _compte;
|
||||||
|
bool _creeFamily;
|
||||||
|
int _indexElts;
|
||||||
|
int _indexEnts;
|
||||||
|
int _famIdent;
|
||||||
|
|
||||||
|
map < SALOME_MED::medGeometryElement, int >_mapIndToSeqElts;
|
||||||
|
SALOME_MED::long_array_var _seq_elemId[MED_NBR_GEOMETRIE_MAILLE];
|
||||||
|
|
||||||
|
map < SALOME_MED::medEntityMesh, int >_mapNbTypes;
|
||||||
|
map < SALOME_MED::medEntityMesh, int >_mapIndToVectTypes;
|
||||||
|
vector < SALOME_MED::medGeometryElement >
|
||||||
|
_TypesId[MED_NBR_GEOMETRIE_MAILLE];
|
||||||
|
|
||||||
|
vector < SALOME_MED::FAMILY_ptr > _families;
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors and associated internal methods
|
||||||
|
SMESH_MEDMesh_i();
|
||||||
|
SMESH_MEDMesh_i(SMESH_Mesh_i * m);
|
||||||
|
~SMESH_MEDMesh_i();
|
||||||
|
|
||||||
|
// IDL Methods
|
||||||
|
void setProtocol(SALOME::TypeOfCommunication typ) {}
|
||||||
|
void release() {}
|
||||||
|
SALOME::SenderDouble_ptr getSenderForCoordinates(long int) {return SALOME::SenderDouble::_nil();}
|
||||||
|
SALOME::SenderInt_ptr getSenderForConnectivity(long int, long int, long int, long int) {return SALOME::SenderInt::_nil();}
|
||||||
|
SALOME::SenderInt_ptr getSenderForPolygonsConnectivity(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
|
||||||
|
SALOME::SenderInt_ptr getSenderForPolygonsConnectivityIndex(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
|
||||||
|
SALOME::SenderInt_ptr getSenderForPolyhedronConnectivity(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();}
|
||||||
|
SALOME::SenderInt_ptr getSenderForPolyhedronIndex(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();}
|
||||||
|
SALOME::SenderInt_ptr getSenderForPolyhedronFacesIndex() {return SALOME::SenderInt::_nil();}
|
||||||
|
|
||||||
|
char *getName() throw(SALOME::SALOME_Exception);
|
||||||
|
CORBA::Long getSpaceDimension() throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
CORBA::Long getMeshDimension() throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
CORBA::Boolean getIsAGrid() throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
CORBA::Boolean
|
||||||
|
existConnectivity(SALOME_MED::medConnectivity connectivityType,
|
||||||
|
SALOME_MED::medEntityMesh entity)
|
||||||
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
char *getCoordinatesSystem() throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
CORBA::Double getCoordinate(CORBA::Long Number, CORBA::Long Axis)
|
||||||
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::double_array * getCoordinates(SALOME_MED::medModeSwitch typeSwitch)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::string_array * getCoordinatesNames()
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::string_array * getCoordinatesUnits()
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
CORBA::Long getNumberOfNodes() throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
CORBA::Long getNumberOfTypes(SALOME_MED::medEntityMesh entity)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::medGeometryElement_array *
|
||||||
|
getTypes(SALOME_MED::medEntityMesh entity) throw(SALOME::
|
||||||
|
SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::medGeometryElement
|
||||||
|
getElementType(SALOME_MED::medEntityMesh entity,
|
||||||
|
CORBA::Long number)
|
||||||
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
CORBA::Long getNumberOfElements(SALOME_MED::medEntityMesh entity,
|
||||||
|
SALOME_MED::medGeometryElement geomElement)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::long_array *
|
||||||
|
getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
|
||||||
|
SALOME_MED::medConnectivity mode,
|
||||||
|
SALOME_MED::medEntityMesh entity,
|
||||||
|
SALOME_MED::medGeometryElement geomElement)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::long_array *
|
||||||
|
getConnectivityIndex(SALOME_MED::medConnectivity mode,
|
||||||
|
SALOME_MED::medEntityMesh entity)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::long_array*
|
||||||
|
getGlobalNumberingIndex(SALOME_MED::medEntityMesh entity)
|
||||||
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
CORBA::Long getElementNumber(SALOME_MED::medConnectivity mode,
|
||||||
|
SALOME_MED::medEntityMesh entity,
|
||||||
|
SALOME_MED::medGeometryElement type,
|
||||||
|
const SALOME_MED::long_array & connectivity)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::long_array *
|
||||||
|
getReverseConnectivity(SALOME_MED::medConnectivity mode)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::long_array *
|
||||||
|
getReverseConnectivityIndex(SALOME_MED::
|
||||||
|
medConnectivity mode) throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
// Family and Group
|
||||||
|
CORBA::Long getNumberOfFamilies(SALOME_MED::medEntityMesh entity)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
CORBA::Long getNumberOfGroups(SALOME_MED::medEntityMesh entity)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::Family_array *
|
||||||
|
getFamilies(SALOME_MED::medEntityMesh entity)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::FAMILY_ptr getFamily(SALOME_MED::medEntityMesh entity,
|
||||||
|
CORBA::Long i) throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::Group_array * getGroups(SALOME_MED::medEntityMesh entity)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::GROUP_ptr getGroup(SALOME_MED::medEntityMesh entity,
|
||||||
|
CORBA::Long i) throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::SUPPORT_ptr
|
||||||
|
getBoundaryElements(SALOME_MED::medEntityMesh entity)
|
||||||
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::SUPPORT_ptr getSkin(SALOME_MED::SUPPORT_ptr mySupport3D)
|
||||||
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::FIELD_ptr getVolume(SALOME_MED::SUPPORT_ptr mySupport)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::FIELD_ptr getArea(SALOME_MED::SUPPORT_ptr mySupport)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::FIELD_ptr getLength(SALOME_MED::SUPPORT_ptr mySupport)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::FIELD_ptr getNormal(SALOME_MED::SUPPORT_ptr mySupport)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::FIELD_ptr getBarycenter(SALOME_MED::SUPPORT_ptr mySupport)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::FIELD_ptr getNeighbourhood(SALOME_MED::SUPPORT_ptr mySupport)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
// Others
|
||||||
|
void addInStudy(SALOMEDS::Study_ptr myStudy,
|
||||||
|
SALOME_MED::MESH_ptr myIor) throw(SALOME::SALOME_Exception);
|
||||||
|
CORBA::Long addDriver(SALOME_MED::medDriverTypes driverType,
|
||||||
|
const char *fileName, const char *meshName)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
void rmDriver(CORBA::Long i) throw(SALOME::SALOME_Exception);
|
||||||
|
void read(CORBA::Long i) throw(SALOME::SALOME_Exception);
|
||||||
|
void write(CORBA::Long i, const char *driverMeshName)
|
||||||
|
throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
// Cuisine interne
|
||||||
|
CORBA::Long getCorbaIndex() throw(SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::MESH::meshInfos * getMeshGlobal()
|
||||||
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
bool areEquals(SALOME_MED::MESH_ptr other) { return false;};
|
||||||
|
|
||||||
|
SALOME_MED::MESH::coordinateInfos * getCoordGlobal()
|
||||||
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
SALOME_MED::MESH::connectivityInfos *
|
||||||
|
getConnectGlobal(SALOME_MED::medEntityMesh entity)
|
||||||
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
//
|
||||||
|
void calculeNbElts() throw(SALOME::SALOME_Exception);
|
||||||
|
void createFamilies() throw(SALOME::SALOME_Exception);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* _MED_MESH_I_HXX_ */
|
161
src/SMESH_SWIG/SMESH_Nut.py
Executable file
161
src/SMESH_SWIG/SMESH_Nut.py
Executable file
@ -0,0 +1,161 @@
|
|||||||
|
#####################################################################
|
||||||
|
#Created :17/02/2005
|
||||||
|
#Auhtor :MASLOV Eugeny, KOVALTCHUK Alexey
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
import geompy
|
||||||
|
import salome
|
||||||
|
import os
|
||||||
|
import math
|
||||||
|
import StdMeshers
|
||||||
|
import SMESH
|
||||||
|
|
||||||
|
#Sketcher_1 creation
|
||||||
|
print "Sketcher creation..."
|
||||||
|
Sketcher_1 = geompy.MakeSketcher("Sketcher:F 100 -57.7:TT 100 57.7:TT 0 115.47:TT -100 57.7:TT -100 -57.7:TT 0 -115.47:WW")
|
||||||
|
geompy.addToStudy(Sketcher_1, "Sketcher_1")
|
||||||
|
Face_1 = geompy.MakeFace(Sketcher_1, 1)
|
||||||
|
geompy.addToStudy(Face_1, "Face_1")
|
||||||
|
|
||||||
|
#Line creation
|
||||||
|
print "Line creation..."
|
||||||
|
Line_1 = geompy.MakeLineTwoPnt(geompy.MakeVertex(0,0,0), geompy.MakeVertex(0,0,100))
|
||||||
|
geompy.addToStudy(Line_1, "Line_1")
|
||||||
|
|
||||||
|
#Prism creation
|
||||||
|
print "Prism creation..."
|
||||||
|
Prism_1 = geompy.MakePrismVecH(Face_1, Line_1, 100)
|
||||||
|
geompy.addToStudy(Prism_1, "Prism_1")
|
||||||
|
|
||||||
|
#Sketcher_2 creation
|
||||||
|
print "Sketcher creation..."
|
||||||
|
Sketcher_2 = geompy.MakeSketcher("Sketcher:F 50 0:TT 80 0:TT 112 13:TT 112 48:TT 80 63:TT 80 90:TT 50 90:WW", [0,0,0, 1,0,0, 0,1,0])
|
||||||
|
geompy.addToStudy(Sketcher_2, "Sketcher_2")
|
||||||
|
Face_2 = geompy.MakeFace(Sketcher_2, 1)
|
||||||
|
geompy.addToStudy(Face_2, "Face_2")
|
||||||
|
|
||||||
|
#Revolution creation
|
||||||
|
print "Revolution creation..."
|
||||||
|
Revolution_1 = geompy.MakeRevolution(Face_2, Line_1, 2*math.pi)
|
||||||
|
geompy.addToStudy(Revolution_1, "Revolution_1")
|
||||||
|
|
||||||
|
#Common applying
|
||||||
|
print "Common of Revolution and Prism..."
|
||||||
|
Common_1 = geompy.MakeBoolean(Revolution_1, Prism_1, 1)
|
||||||
|
geompy.addToStudy(Common_1, "Common_1")
|
||||||
|
|
||||||
|
#Explode Common_1 on edges
|
||||||
|
CommonExplodedListEdges = geompy.SubShapeAll(Common_1, geompy.ShapeType["EDGE"])
|
||||||
|
for i in range(0, len(CommonExplodedListEdges)):
|
||||||
|
name = "Edge_"+str(i+1)
|
||||||
|
geompy.addToStudyInFather(Common_1, CommonExplodedListEdges[i], name)
|
||||||
|
|
||||||
|
#Fillet applying
|
||||||
|
print "Fillet creation..."
|
||||||
|
Fillet_1 = geompy.MakeFillet(Common_1, 10, geompy.ShapeType["EDGE"], [6])
|
||||||
|
geompy.addToStudy(Fillet_1, "Fillet_1")
|
||||||
|
|
||||||
|
#Chamfer applying
|
||||||
|
print "Chamfer creation..."
|
||||||
|
Chamfer_1 = geompy.MakeChamferEdge(Fillet_1, 10, 10, 16, 50 )
|
||||||
|
geompy.addToStudy(Chamfer_1, "Chamfer_1")
|
||||||
|
Chamfer_2 = geompy.MakeChamferEdge(Chamfer_1, 10, 10, 21, 31 )
|
||||||
|
geompy.addToStudy(Chamfer_2, "Chamfer_2")
|
||||||
|
|
||||||
|
#Import of the shape from "slots.brep"
|
||||||
|
print "Import multi-rotation from the DATA_DIR/Shapes/Brep/slots.brep"
|
||||||
|
thePath = os.getenv("DATA_DIR")
|
||||||
|
theFileName = thePath + "/Shapes/Brep/slots.brep"
|
||||||
|
theShapeForCut = geompy.ImportBREP(theFileName)
|
||||||
|
geompy.addToStudy(theShapeForCut, "slot.brep_1")
|
||||||
|
|
||||||
|
#Cut applying
|
||||||
|
print "Cut..."
|
||||||
|
Cut_1 = geompy.MakeBoolean(Chamfer_2, theShapeForCut, 2)
|
||||||
|
Cut_1_ID = geompy.addToStudy(Cut_1, "Cut_1")
|
||||||
|
|
||||||
|
#Mesh creation
|
||||||
|
smesh = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH")
|
||||||
|
|
||||||
|
# -- Init --
|
||||||
|
shape_mesh = salome.IDToObject( Cut_1_ID )
|
||||||
|
smesh.SetCurrentStudy(salome.myStudy)
|
||||||
|
mesh = smesh.CreateMesh(shape_mesh)
|
||||||
|
smeshgui = salome.ImportComponentGUI("SMESH")
|
||||||
|
smeshgui.Init(salome.myStudyId)
|
||||||
|
idmesh = salome.ObjectToID(mesh)
|
||||||
|
smeshgui.SetName( idmesh, "Nut" )
|
||||||
|
|
||||||
|
#HYPOTHESIS CREATION
|
||||||
|
print "-------------------------- Average length"
|
||||||
|
theAverageLength = 5
|
||||||
|
hAvLength = smesh.CreateHypothesis( "LocalLength", "libStdMeshersEngine.so" )
|
||||||
|
hAvLength.SetLength( theAverageLength )
|
||||||
|
print hAvLength.GetName()
|
||||||
|
print hAvLength.GetId()
|
||||||
|
smeshgui.SetName(salome.ObjectToID(hAvLength), "AverageLength_5")
|
||||||
|
|
||||||
|
print "-------------------------- MaxElementArea"
|
||||||
|
theMaxElementArea = 20
|
||||||
|
hArea20 = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" )
|
||||||
|
hArea20.SetMaxElementArea( theMaxElementArea )
|
||||||
|
print hArea20.GetName()
|
||||||
|
print hArea20.GetId()
|
||||||
|
print hArea20.GetMaxElementArea()
|
||||||
|
smeshgui.SetName(salome.ObjectToID(hArea20), "MaxElementArea_20")
|
||||||
|
|
||||||
|
print "-------------------------- MaxElementVolume"
|
||||||
|
theMaxElementVolume = 150
|
||||||
|
hVolume150 = smesh.CreateHypothesis( "MaxElementVolume", "libStdMeshersEngine.so" )
|
||||||
|
hVolume150.SetMaxElementVolume( theMaxElementVolume )
|
||||||
|
print hVolume150.GetName()
|
||||||
|
print hVolume150.GetId()
|
||||||
|
print hVolume150.GetMaxElementVolume()
|
||||||
|
smeshgui.SetName(salome.ObjectToID(hVolume150), "MaxElementVolume_150")
|
||||||
|
|
||||||
|
mesh.AddHypothesis(shape_mesh, hAvLength)
|
||||||
|
mesh.AddHypothesis(shape_mesh, hArea20)
|
||||||
|
mesh.AddHypothesis(shape_mesh, hVolume150)
|
||||||
|
|
||||||
|
print "-------------------------- Regular_1D"
|
||||||
|
|
||||||
|
algoReg1D = smesh.CreateHypothesis( "Regular_1D", "libStdMeshersEngine.so" )
|
||||||
|
listHyp = algoReg1D.GetCompatibleHypothesis()
|
||||||
|
for hyp in listHyp:
|
||||||
|
print hyp
|
||||||
|
print algoReg1D.GetName()
|
||||||
|
print algoReg1D.GetId()
|
||||||
|
smeshgui.SetName(salome.ObjectToID(algoReg1D), "Wire discretisation")
|
||||||
|
|
||||||
|
print "-------------------------- MEFISTO_2D"
|
||||||
|
algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "libStdMeshersEngine.so" )
|
||||||
|
listHyp = algoMef.GetCompatibleHypothesis()
|
||||||
|
for hyp in listHyp:
|
||||||
|
print hyp
|
||||||
|
print algoMef.GetName()
|
||||||
|
print algoMef.GetId()
|
||||||
|
smeshgui.SetName(salome.ObjectToID(algoMef), "Triangle (Mefisto)")
|
||||||
|
|
||||||
|
print "-------------------------- NETGEN_3D"
|
||||||
|
|
||||||
|
algoNg = smesh.CreateHypothesis( "NETGEN_3D", "libNETGENEngine.so" )
|
||||||
|
print algoNg.GetName()
|
||||||
|
print algoNg.GetId()
|
||||||
|
smeshgui.SetName(salome.ObjectToID(algoNg), "Tetrahedron (NETGEN)")
|
||||||
|
mesh.AddHypothesis(shape_mesh, algoReg1D)
|
||||||
|
mesh.AddHypothesis(shape_mesh, algoMef)
|
||||||
|
mesh.AddHypothesis(shape_mesh, algoNg)
|
||||||
|
|
||||||
|
print "-------------------------- compute the mesh of the mechanic piece"
|
||||||
|
smesh.Compute(mesh,shape_mesh)
|
||||||
|
|
||||||
|
print "Information about the Nut:"
|
||||||
|
print "Number of nodes : ", mesh.NbNodes()
|
||||||
|
print "Number of edges : ", mesh.NbEdges()
|
||||||
|
print "Number of faces : ", mesh.NbFaces()
|
||||||
|
print "Number of triangles : ", mesh.NbTriangles()
|
||||||
|
print "Number of quadrangles : ", mesh.NbQuadrangles()
|
||||||
|
print "Number of volumes : ", mesh.NbVolumes()
|
||||||
|
print "Number of tetrahedrons: ", mesh.NbTetras()
|
||||||
|
|
||||||
|
salome.sg.updateObjBrowser(1)
|
115
src/SMESH_SWIG/SMESH_flight_skin.py
Normal file
115
src/SMESH_SWIG/SMESH_flight_skin.py
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
#
|
||||||
|
# Triangulation of the skin of the geometry from a Brep representing a plane
|
||||||
|
# This geometry is from EADS
|
||||||
|
# Hypothesis and algorithms for the mesh generation are global
|
||||||
|
#
|
||||||
|
|
||||||
|
import os
|
||||||
|
import salome
|
||||||
|
import geompy
|
||||||
|
import StdMeshers
|
||||||
|
|
||||||
|
smesh = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH")
|
||||||
|
|
||||||
|
smeshgui = salome.ImportComponentGUI("SMESH")
|
||||||
|
smeshgui.Init(salome.myStudyId)
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------- GEOM --------------------------------------
|
||||||
|
|
||||||
|
# import a BRep
|
||||||
|
#before running this script, please be sure about
|
||||||
|
#the path the file fileName
|
||||||
|
|
||||||
|
filePath = os.environ["DATA_DIR"]
|
||||||
|
filePath = filePath + "/Shapes/Brep/"
|
||||||
|
|
||||||
|
filename = "flight_solid.brep"
|
||||||
|
filename = filePath + filename
|
||||||
|
|
||||||
|
shape = geompy.Import(filename, "BREP")
|
||||||
|
idShape = geompy.addToStudy(shape, "flight")
|
||||||
|
|
||||||
|
print "Analysis of the geometry flight :"
|
||||||
|
subShellList = geompy.SubShapeAll(shape, geompy.ShapeType["SHELL"])
|
||||||
|
subFaceList = geompy.SubShapeAll(shape, geompy.ShapeType["FACE"])
|
||||||
|
subEdgeList = geompy.SubShapeAll(shape, geompy.ShapeType["EDGE"])
|
||||||
|
|
||||||
|
print "number of Shells in flight : ", len(subShellList)
|
||||||
|
print "number of Faces in flight : ", len(subFaceList)
|
||||||
|
print "number of Edges in flight : ", len(subEdgeList)
|
||||||
|
|
||||||
|
|
||||||
|
### ---------------------------- SMESH --------------------------------------
|
||||||
|
|
||||||
|
print "-------------------------- create Hypothesis"
|
||||||
|
|
||||||
|
print "-------------------------- LocalLength"
|
||||||
|
|
||||||
|
lengthOfSegments = 0.3
|
||||||
|
|
||||||
|
hypLength = smesh.CreateHypothesis("LocalLength", "libStdMeshersEngine.so")
|
||||||
|
hypLength.SetLength(lengthOfSegments)
|
||||||
|
|
||||||
|
print hypLength.GetName()
|
||||||
|
print hypLength.GetId()
|
||||||
|
print hypLength.GetLength()
|
||||||
|
|
||||||
|
smeshgui.SetName(salome.ObjectToID(hypLength), "LocalLength_0.3")
|
||||||
|
|
||||||
|
print "-------------------------- LengthFromEdges"
|
||||||
|
|
||||||
|
hypLengthFromEdge = smesh.CreateHypothesis("LengthFromEdges", "libStdMeshersEngine.so")
|
||||||
|
|
||||||
|
print hypLengthFromEdge.GetName()
|
||||||
|
print hypLengthFromEdge.GetId()
|
||||||
|
|
||||||
|
smeshgui.SetName(salome.ObjectToID(hypLengthFromEdge), "LengthFromEdge")
|
||||||
|
|
||||||
|
print "-------------------------- create Algorithms"
|
||||||
|
|
||||||
|
print "-------------------------- Regular_1D"
|
||||||
|
|
||||||
|
regular1D = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
|
||||||
|
|
||||||
|
smeshgui.SetName(salome.ObjectToID(regular1D), "Wire Discretisation")
|
||||||
|
|
||||||
|
print "-------------------------- MEFISTO_2D"
|
||||||
|
|
||||||
|
mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", "libStdMeshersEngine.so")
|
||||||
|
|
||||||
|
smeshgui.SetName(salome.ObjectToID(mefisto2D), "MEFISTO_2D")
|
||||||
|
|
||||||
|
# ---- init a Mesh with the shell
|
||||||
|
shape_mesh = salome.IDToObject( idShape )
|
||||||
|
|
||||||
|
mesh = smesh.CreateMesh(shape_mesh)
|
||||||
|
smeshgui.SetName(salome.ObjectToID(mesh), "MeshFlight")
|
||||||
|
|
||||||
|
# ---- add hypothesis to flight
|
||||||
|
|
||||||
|
print "-------------------------- add hypothesis to flight"
|
||||||
|
|
||||||
|
mesh.AddHypothesis(shape_mesh,regular1D)
|
||||||
|
mesh.AddHypothesis(shape_mesh,hypLength)
|
||||||
|
mesh.AddHypothesis(shape_mesh,mefisto2D)
|
||||||
|
mesh.AddHypothesis(shape_mesh,hypLengthFromEdge)
|
||||||
|
|
||||||
|
salome.sg.updateObjBrowser(1)
|
||||||
|
|
||||||
|
|
||||||
|
print "-------------------------- compute the skin flight"
|
||||||
|
ret = smesh.Compute(mesh,shape_mesh)
|
||||||
|
print ret
|
||||||
|
if ret != 0:
|
||||||
|
log = mesh.GetLog(0) # no erase trace
|
||||||
|
for linelog in log:
|
||||||
|
print linelog
|
||||||
|
print "Information about the Mesh_mechanic_tetra:"
|
||||||
|
print "Number of nodes : ", mesh.NbNodes()
|
||||||
|
print "Number of edges : ", mesh.NbEdges()
|
||||||
|
print "Number of faces : ", mesh.NbFaces()
|
||||||
|
print "Number of triangles : ", mesh.NbTriangles()
|
||||||
|
print "Number of volumes : ", mesh.NbVolumes()
|
||||||
|
else:
|
||||||
|
print "probleme when computing the mesh"
|
80
src/SMESH_SWIG/SMESH_test5.py
Normal file
80
src/SMESH_SWIG/SMESH_test5.py
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
|
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License.
|
||||||
|
#
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# File : SMESH_test1.py
|
||||||
|
# Module : SMESH
|
||||||
|
|
||||||
|
import salome
|
||||||
|
import SMESH
|
||||||
|
import SALOMEDS
|
||||||
|
import CORBA
|
||||||
|
import os
|
||||||
|
import os.path
|
||||||
|
|
||||||
|
def SetSObjName(theSObj,theName) :
|
||||||
|
ok, anAttr = theSObj.FindAttribute("AttributeName")
|
||||||
|
if ok:
|
||||||
|
aName = anAttr._narrow(SALOMEDS.AttributeName)
|
||||||
|
#print aName.__dict__
|
||||||
|
aName.SetValue(theName)
|
||||||
|
|
||||||
|
def ConvertMED2UNV(thePath,theFile) :
|
||||||
|
anInitFileName = thePath + theFile
|
||||||
|
aMeshes,aResult = smesh.CreateMeshesFromMED(anInitFileName)
|
||||||
|
print aResult, aMeshes
|
||||||
|
|
||||||
|
for iMesh in range(len(aMeshes)) :
|
||||||
|
aMesh = aMeshes[iMesh]
|
||||||
|
anSObj = salome.ObjectToSObject(aMesh)
|
||||||
|
print anSObj.GetName(),
|
||||||
|
aFileName = anInitFileName
|
||||||
|
aFileName = os.path.basename(aFileName)
|
||||||
|
SetSObjName(anSObj,aFileName)
|
||||||
|
print anSObj.GetName()
|
||||||
|
|
||||||
|
aOutPath = '/tmp/'
|
||||||
|
aFileName = aOutPath + theFile + "." + str(iMesh) + ".unv"
|
||||||
|
aMesh.ExportUNV(aFileName)
|
||||||
|
aMesh = smesh.CreateMeshesFromUNV(aFileName)
|
||||||
|
anSObj = salome.ObjectToSObject(aMesh)
|
||||||
|
print anSObj.GetName(),
|
||||||
|
os.remove(aFileName)
|
||||||
|
aFileName = os.path.basename(aFileName)
|
||||||
|
SetSObjName(anSObj,aFileName)
|
||||||
|
print anSObj.GetName()
|
||||||
|
|
||||||
|
smesh = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH")
|
||||||
|
smesh.SetCurrentStudy(salome.myStudy)
|
||||||
|
|
||||||
|
aPath = os.getenv('DATA_DIR') + '/MedFiles/'
|
||||||
|
aListDir = os.listdir(aPath)
|
||||||
|
print aListDir
|
||||||
|
|
||||||
|
for iFile in range(len(aListDir)) :
|
||||||
|
aFileName = aListDir[iFile]
|
||||||
|
aName,anExt = os.path.splitext(aFileName)
|
||||||
|
if anExt == ".med" :
|
||||||
|
aFileName = os.path.basename(aFileName)
|
||||||
|
print aFileName
|
||||||
|
ConvertMED2UNV(aPath,aFileName)
|
||||||
|
#break
|
||||||
|
|
||||||
|
salome.sg.updateObjBrowser(1)
|
Loading…
Reference in New Issue
Block a user