else
# search SMESH binaries in PATH variable
- AC_PATH_PROG(TEMP, libSMESH_Swig.py)
+ #CCRTAC_PATH_PROG(TEMP, libSMESH_Swig.py)
+ #AC_PATH_PROG(TEMP, MED_Test)
+ AC_PATH_PROG(TEMP, smesh.py)
if test "x$TEMP" != "x" ; then
SMESH_BIN_DIR=`dirname $TEMP`
SMESH_DIR=`dirname $SMESH_BIN_DIR`
#
fi
-if test -f ${SMESH_DIR}/bin/salome/libSMESH_Swig.py ; then
+#CCRTif test -f ${SMESH_DIR}/bin/salome/libSMESH_Swig.py ; then
+#if test -f ${SMESH_DIR}/bin/salome/MED_Test ; then
+if test -f ${SMESH_DIR}/bin/salome/smesh.py ; then
SMesh_ok=yes
AC_MSG_RESULT(Using SMesh module distribution in ${SMESH_DIR})
# FORTRAN
F77 = @F77@
-FC = @FC@
+#CCRTFC = @FC@
+FC = @F77@
FFLAGS = @FFLAGS@
FCFLAGS = @FCFLAGS@
FLIBS = @FLIBS@
check_boost.m4 \
check_swig.m4
+ifeq ($(SMESH_WITH_GUI),yes)
ACLOCAL_GUI = \
check_vtk.m4 \
check_opengl.m4 \
check_qt.m4 \
check_GUI.m4 \
check_corba_in_GUI.m4
+endif
ACLOCAL_MED = check_Med.m4
ACLOCAL_GEOM = check_GEOM.m4
+ifeq ($(SMESH_WITH_GUI),yes)
$(top_srcdir)/aclocal.m4: $(ACLOCAL_KERNEL:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \
$(ACLOCAL_GUI:%=@GUI_ROOT_DIR@/adm_local/unix/config_files/%) \
$(ACLOCAL_MED:%=@MED_ROOT_DIR@/adm_local/unix/config_files/%) \
$(ACLOCAL_GEOM:%=@GEOM_ROOT_DIR@/adm_local/unix/config_files/%)
- cd $(top_srcdir) ; aclocal -I adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files \
- -I @GUI_ROOT_DIR@/adm_local/unix/config_files \
- -I @MED_ROOT_DIR@/adm_local/unix/config_files \
- -I @GEOM_ROOT_DIR@/adm_local/unix/config_files
-
+ cd $(top_srcdir) ; aclocal -I adm_local/unix/config_files \
+ -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files \
+ -I @GUI_ROOT_DIR@/adm_local/unix/config_files \
+ -I @MED_ROOT_DIR@/adm_local/unix/config_files \
+ -I @GEOM_ROOT_DIR@/adm_local/unix/config_files
+endif
+
+ifeq ($(SMESH_WITH_GUI),no)
+$(top_srcdir)/aclocal.m4: $(ACLOCAL_KERNEL:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \
+ $(ACLOCAL_MED:%=@MED_ROOT_DIR@/adm_local/unix/config_files/%) \
+ $(ACLOCAL_GEOM:%=@GEOM_ROOT_DIR@/adm_local/unix/config_files/%)
+ cd $(top_srcdir) ; aclocal -I adm_local/unix/config_files \
+ -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files \
+ -I @MED_ROOT_DIR@/adm_local/unix/config_files \
+ -I @GEOM_ROOT_DIR@/adm_local/unix/config_files
+endif
ORIG_DIR=`pwd`
CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+SMESH_WITH_GUI="yes"
########################################################################
# Test if the KERNEL_ROOT_DIR is set correctly
# exit
#fi
+for option
+do
+ case $option in
+ -with-ihm | --with-ihm)
+ SMESH_WITH_GUI="yes"
+ break;;
+ -without-ihm | --without-ihm | -with-ihm=no | --with-ihm=no)
+ SMESH_WITH_GUI="no"
+ break;;
+ esac
+done
+
########################################################################
# Test if the GUI_ROOT_DIR is set correctly
-if test ! -d "${GUI_ROOT_DIR}"; then
- echo "failed : GUI_ROOT_DIR variable is not correct !"
- exit
+if test ${SMESH_WITH_GUI} = yes; then
+ if test ! -d "${GUI_ROOT_DIR}"; then
+ echo "failed : GUI_ROOT_DIR variable is not correct !"
+ exit
+ fi
fi
########################################################################
echo -n "Creating 'configure' script ... "
fi
+if test ${SMESH_WITH_GUI} = yes; then
aclocal -I adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
-I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
-I ${MED_ROOT_DIR}/adm_local/unix/config_files \
-I ${GEOM_ROOT_DIR}/adm_local/unix/config_files
+fi
+
+if test ${SMESH_WITH_GUI} = no; then
+aclocal -I adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+ -I ${MED_ROOT_DIR}/adm_local/unix/config_files \
+ -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files
+fi
+
if autoconf
then
echo "done"
AC_CXX_HAVE_SSTREAM
+dnl
+dnl ---------------------------------------------
+dnl testing WITHIHM
+dnl ---------------------------------------------
+dnl
+
+CHECK_WITHIHM
+
dnl
corba=make_$ORB
CORBA=adm_local/unix/$corba
-echo
-echo ---------------------------------------------
-echo testing openGL
-echo ---------------------------------------------
-echo
+if test "X$WITHIHM" = "Xyes"; then
+ echo
+ echo ---------------------------------------------
+ echo testing openGL
+ echo ---------------------------------------------
+ echo
-CHECK_OPENGL
+ CHECK_OPENGL
+fi
echo
echo ---------------------------------------------
CHECK_MSG2QM
-echo
-echo ---------------------------------------------
-echo testing VTK
-echo ---------------------------------------------
-echo
+if test "X$WITHIHM" = "Xyes"; then
+ echo
+ echo ---------------------------------------------
+ echo testing VTK
+ echo ---------------------------------------------
+ echo
-CHECK_VTK
+ CHECK_VTK
+fi
echo
echo ---------------------------------------------
CHECK_HTML_GENERATORS
-echo
-echo ---------------------------------------------
-echo Testing GUI
-echo ---------------------------------------------
-echo
-
-CHECK_SALOME_GUI
-
-echo
-echo ---------------------------------------------
-echo Testing full GUI
-echo ---------------------------------------------
-echo
-
-CHECK_CORBA_IN_GUI
-if test "x${CORBA_IN_GUI}" != "xyes"; then
- echo "failed : For configure SMESH module necessary full GUI !"
- exit
+if test "X$WITHIHM" = "Xyes"; then
+ echo
+ echo ---------------------------------------------
+ echo Testing GUI
+ echo ---------------------------------------------
+ echo
+
+ CHECK_SALOME_GUI
+
+ echo
+ echo ---------------------------------------------
+ echo Testing full GUI
+ echo ---------------------------------------------
+ echo
+
+ CHECK_CORBA_IN_GUI
+ if test "x${CORBA_IN_GUI}" != "xyes"; then
+ echo "failed : For configure SMESH module necessary full GUI !"
+ exit
+ fi
fi
echo
interface SMESH_Gen : Engines::Component, SALOMEDS::Driver
{
+ GEOM::GEOM_Gen SetGeomEngine( in string containerLoc );
+
FilterManager CreateFilterManager();
SMESH_Pattern GetPattern();
MED_CXXFLAGS=@MED_CXXFLAGS@
+#SUBDIRS = \
+# SMDS SMESHDS Controls Driver DriverMED DriverDAT DriverUNV DriverSTL \
+# SMESH SMESH_I SMESHClient OBJECT SMESHFiltersSelection SMESHGUI SMESH_SWIG \
+# MEFISTO2 StdMeshers StdMeshers_I StdMeshersGUI
+
SUBDIRS = \
SMDS SMESHDS Controls Driver DriverMED DriverDAT DriverUNV DriverSTL \
- SMESH SMESH_I SMESHClient OBJECT SMESHFiltersSelection SMESHGUI SMESH_SWIG \
- MEFISTO2 StdMeshers StdMeshers_I StdMeshersGUI
+ SMESH SMESH_I SMESHClient MEFISTO2 SMESH_SWIG StdMeshers StdMeshers_I
+
+ifeq (@WITHIHM@,yes)
+ SUBDIRS+= OBJECT SMESHFiltersSelection SMESHGUI SMESH_SWIG_WITHIHM StdMeshersGUI
+endif
@MODULE@
case GEOM::SOLID:
case GEOM::SHELL: type = SMESH::VOLUME; break;
case GEOM::COMPOUND: {
- GEOM::GEOM_Gen_var aGeomGen = SMESH_Gen_i::GetSMESHGen()->GetGeomEngine();
+ GEOM::GEOM_Gen_ptr aGeomGen = SMESH_Gen_i::GetSMESHGen()->GetGeomEngine();
if ( !aGeomGen->_is_nil() ) {
GEOM::GEOM_IGroupOperations_var aGrpOp =
aGeomGen->GetIGroupOperations( study->StudyId() );
GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow( aList[ 0 ]->GetObject() );
if ( !aGeomObj->_is_nil() )
{
- GEOM::GEOM_Gen_var aGEOMGen = SMESH_Gen_i::GetGeomEngine();
+ GEOM::GEOM_Gen_ptr aGEOMGen = SMESH_Gen_i::GetGeomEngine();
TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, aGeomObj );
return aLocShape;
}
GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(obj);
if (!aGeomObj->_is_nil()) {
- GEOM::GEOM_Gen_var aGEOMGen = SMESH_Gen_i::GetGeomEngine();
+ GEOM::GEOM_Gen_ptr aGEOMGen = SMESH_Gen_i::GetGeomEngine();
TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, aGeomObj );
return aLocShape;
}
if ( theGeom->_is_nil() )
return;
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- GEOM::GEOM_Gen_var aGEOMGen = SMESH_Gen_i::GetGeomEngine();
+ GEOM::GEOM_Gen_ptr aGEOMGen = SMESH_Gen_i::GetGeomEngine();
TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, theGeom );
myBelongToGeomPtr->SetGeom( aLocShape );
TPythonDump()<<this<<".SetGeom("<<theGeom<<")";
if ( theGeom->_is_nil() )
return;
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- GEOM::GEOM_Gen_var aGEOMGen = SMESH_Gen_i::GetGeomEngine();
+ GEOM::GEOM_Gen_ptr aGEOMGen = SMESH_Gen_i::GetGeomEngine();
TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, theGeom );
if ( aLocShape.ShapeType() == TopAbs_FACE )
if ( theGeom->_is_nil() )
return;
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- GEOM::GEOM_Gen_var aGEOMGen = SMESH_Gen_i::GetGeomEngine();
+ GEOM::GEOM_Gen_ptr aGEOMGen = SMESH_Gen_i::GetGeomEngine();
TopoDS_Shape aLocShape = aSMESHGen->GetShapeReader()->GetShape( aGEOMGen, theGeom );
myLyingOnGeomPtr->SetGeom( aLocShape );
TPythonDump()<<this<<".SetGeom("<<theGeom<<")";
#endif
// Static variables definition
+GEOM::GEOM_Gen_var SMESH_Gen_i::myGeomGen = GEOM::GEOM_Gen::_nil();
CORBA::ORB_var SMESH_Gen_i::myOrb;
PortableServer::POA_var SMESH_Gen_i::myPoa;
SALOME_NamingService* SMESH_Gen_i::myNS = NULL;
*/
//=============================================================================
GEOM::GEOM_Gen_ptr SMESH_Gen_i::GetGeomEngine() {
- GEOM::GEOM_Gen_var aGeomEngine =
- GEOM::GEOM_Gen::_narrow( GetLCC()->FindOrLoad_Component("FactoryServer","GEOM") );
- return aGeomEngine._retn();
+ //CCRT GEOM::GEOM_Gen_var aGeomEngine =
+ //CCRT GEOM::GEOM_Gen::_narrow( GetLCC()->FindOrLoad_Component("FactoryServer","GEOM") );
+ //CCRT return aGeomEngine._retn();
+ if(CORBA::is_nil(myGeomGen))
+ {
+ Engines::Component_ptr temp=GetLCC()->FindOrLoad_Component("FactoryServer","GEOM");
+ myGeomGen=GEOM::GEOM_Gen::_narrow(temp);
+ }
+ return myGeomGen;
}
//=============================================================================
return myShapeReader;
}
+//=============================================================================
+/*!
+ * SMESH_Gen_i::SetGeomEngine
+ *
+ * Set GEOM::GEOM_Gen reference
+ */
+//=============================================================================
+GEOM::GEOM_Gen_ptr SMESH_Gen_i::SetGeomEngine( const char* containerLoc )
+{
+ Engines::Component_ptr temp=GetLCC()->FindOrLoad_Component(containerLoc,"GEOM");
+ myGeomGen=GEOM::GEOM_Gen::_narrow(temp);
+ return myGeomGen;
+}
+
//=============================================================================
/*!
* SMESH_Gen_i::SetEmbeddedMode
GEOM::GEOM_Object_var geom = FindGeometryByMeshElement(theMesh, theElementID);
if ( !geom->_is_nil() ) {
GEOM::GEOM_Object_var mainShape = theMesh->GetShapeToMesh();
- GEOM::GEOM_Gen_var geomGen = GetGeomEngine();
+ GEOM::GEOM_Gen_ptr geomGen = GetGeomEngine();
// try to find the corresponding SObject
SALOMEDS::SObject_var SObj = ObjectToSObject( myCurrentStudy, geom.in() );
THROW_SALOME_CORBA_EXCEPTION( "bad Mesh reference", SALOME::BAD_PARAM );
GEOM::GEOM_Object_var mainShape = theMesh->GetShapeToMesh();
- GEOM::GEOM_Gen_var geomGen = GetGeomEngine();
+ GEOM::GEOM_Gen_ptr geomGen = GetGeomEngine();
// get a core mesh DS
SMESH_Mesh_i* meshServant = SMESH::DownCast<SMESH_Mesh_i*>( theMesh );
// *****************************************
// Interface methods
// *****************************************
+ GEOM::GEOM_Gen_ptr SetGeomEngine( const char* containerLoc );
// Set current study
void SetEmbeddedMode( CORBA::Boolean theMode );
static void loadGeomData( SALOMEDS::SComponent_ptr theCompRoot );
private:
-
+ static GEOM::GEOM_Gen_var myGeomGen;
static CORBA::ORB_var myOrb; // ORB reference
static PortableServer::POA_var myPoa; // POA reference
static SALOME_NamingService* myNS; // Naming Service
TopoDS_Shape S;
if ( !theGeomObject->_is_nil() ) {
GEOM_Client* aClient = GetShapeReader();
- GEOM::GEOM_Gen_var aGeomEngine = GetGeomEngine();
+ GEOM::GEOM_Gen_ptr aGeomEngine = GetGeomEngine();
if ( aClient && !aGeomEngine->_is_nil () )
S = aClient->GetShape( aGeomEngine, theGeomObject );
}
# Libraries targets
-LIB = libSMESH_Swigcmodule.la
LIB_SRC =
-SWIG_DEF = libSMESH_Swig.i
-EXPORT_PYSCRIPTS = libSMESH_Swig.py \
- smesh.py \
+EXPORT_PYSCRIPTS = smesh.py \
batchmode_smesh.py \
batchmode_mefisto.py \
ex00_all.py \
CPPFLAGS+=$(QT_INCLUDES) $(PYTHON_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) $(KERNEL_CXXFLAGS) -DHAVE_CONFIG_H
LIBS+= $(PYTHON_LIBS)
-LDFLAGS+= -lSMESH $(KERNEL_LDFLAGS) -lSalomeGenericObj
@CONCLUDE@
+++ /dev/null
-// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : libGeometry_Swig.i
-// Author : Nicolas REJNERI, Paul RASCLE
-// Module : SMESH
-// $Header$
-
-%module libSMESH_Swig
-
-%include "SMESHGUI_Swig.i"
-
--- /dev/null
+# 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+#
+#
+# File : Makefile.in
+# Author : Nicolas REJNERI, Paul RASCLE
+# Module : SMESH
+# $Header$
+
+top_srcdir=@top_srcdir@
+top_builddir=../..
+srcdir=@srcdir@
+VPATH=.:@srcdir@:@top_srcdir@/idl
+
+
+@COMMENCE@
+
+# Libraries targets
+
+LIB = libSMESH_Swigcmodule.la
+LIB_SRC =
+
+SWIG_DEF = libSMESH_Swig.i
+EXPORT_PYSCRIPTS = libSMESH_Swig.py
+
+LIB_CLIENT_IDL = SALOMEDS.idl \
+ SALOME_Exception.idl \
+ GEOM_Gen.idl \
+ SMESH_Gen.idl \
+ SMESH_Mesh.idl \
+ SMESH_Hypothesis.idl \
+ SMESH_BasicHypothesis.idl \
+ SMESH_Group.idl \
+ SALOME_ModuleCatalog.idl \
+ SALOME_Component.idl \
+ SALOME_GenericObj.idl \
+ MED.idl \
+ SALOME_Comm.idl
+
+CPPFLAGS+=$(QT_INCLUDES) $(PYTHON_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) $(KERNEL_CXXFLAGS) -DHAVE_CONFIG_H
+LIBS+= $(PYTHON_LIBS)
+LDFLAGS+= -lSMESH $(KERNEL_LDFLAGS) -lSalomeGenericObj
+
+@CONCLUDE@
--- /dev/null
+// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+//
+// File : libGeometry_Swig.i
+// Author : Nicolas REJNERI, Paul RASCLE
+// Module : SMESH
+// $Header$
+
+%module libSMESH_Swig
+
+%include "SMESHGUI_Swig.i"
+