Skip to content
Snippets Groups Projects
Commit d9180668 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

canevas for --with-occ-mesh-constraints-prefix

parent b8878d3d
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,7 @@ int WaitForData(int socket, int num, double waitint); ...@@ -56,7 +56,7 @@ int WaitForData(int socket, int num, double waitint);
#endif #endif
int myselect(int socket, int seconds) static int myselect(int socket, int seconds)
{ {
struct timeval tv; struct timeval tv;
tv.tv_sec = seconds; tv.tv_sec = seconds;
......
// $Id: GModelIO_OCC.cpp,v 1.34 2008-06-03 07:25:07 geuzaine Exp $ // $Id: GModelIO_OCC.cpp,v 1.35 2008-06-30 17:42:49 geuzaine Exp $
// //
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -27,6 +27,11 @@ ...@@ -27,6 +27,11 @@
#include "OCCFace.h" #include "OCCFace.h"
#include "OCCRegion.h" #include "OCCRegion.h"
#if defined(HAVE_OCC_MESH_CONSTRAINTS)
#include "MeshGmsh_Constrain.hxx"
#include "MeshGmsh_EdgeConstrain.hxx"
#endif
extern Context_T CTX; extern Context_T CTX;
#if defined(HAVE_OCC) #if defined(HAVE_OCC)
...@@ -476,13 +481,33 @@ int GModel::readOCCSTEP(const std::string &fn) ...@@ -476,13 +481,33 @@ int GModel::readOCCSTEP(const std::string &fn)
int GModel::importOCCShape(const void *shape, const void *options) int GModel::importOCCShape(const void *shape, const void *options)
{ {
extern void SetBoundingBox();
_occ_internals = new OCC_Internals; _occ_internals = new OCC_Internals;
_occ_internals->loadShape((TopoDS_Shape*)shape); _occ_internals->loadShape((TopoDS_Shape*)shape);
_occ_internals->buildGModel(this); _occ_internals->buildGModel(this);
snapVertices(); snapVertices();
// FIXME remove this when CL API is done
extern void SetBoundingBox();
SetBoundingBox(); SetBoundingBox();
if(!options) return 1;
#if defined(HAVE_OCC_MESH_CONSTRAINTS)
MeshGmsh_Constrain *c = (MeshGmsh_Constrain*)options;
MeshGmsh_DataMapOfShapeOfEdgeConstrain ecmap;
c->GetEdgeConstrain(ecmap);
// iterate on all the edges of the model and set constraints (if
// any)
for(eiter it = firstEdge(); it != lastEdge(); ++it){
TopoDS_Edge *edge = (*it)->getNativePtr();
try {
MeshGmsh_EdgeConstrain &ec = ecmap.Find(*edge);
printf("got edge constraints\n");
}
catch(...){
}
}
#endif
return 1; return 1;
} }
......
...@@ -1303,6 +1303,9 @@ Optional Packages: ...@@ -1303,6 +1303,9 @@ Optional Packages:
prefix where OSMesa is installed prefix where OSMesa is installed
--with-cgns-prefix=PFX prefix where CGNS is installed --with-cgns-prefix=PFX prefix where CGNS is installed
--with-occ-prefix=PFX prefix where OpenCascade is installed --with-occ-prefix=PFX prefix where OpenCascade is installed
--occ-mesh-constraints-prefix=PFX
prefix where OCC mesh contraints source code is
located
--with-hdf5-prefix=PFX prefix where OpenCascade is installed --with-hdf5-prefix=PFX prefix where OpenCascade is installed
--with-med-prefix=PFX prefix where OpenCascade is installed --with-med-prefix=PFX prefix where OpenCascade is installed
--with-fftw3-prefix=PFX prefix where FFTW3 is installed --with-fftw3-prefix=PFX prefix where FFTW3 is installed
...@@ -1797,6 +1800,12 @@ if test "${with_occ_prefix+set}" = set; then ...@@ -1797,6 +1800,12 @@ if test "${with_occ_prefix+set}" = set; then
fi fi
# Check whether --with-occ-mesh-constraints-prefix was given.
if test "${with_occ_mesh_constraints_prefix+set}" = set; then
withval=$with_occ_mesh_constraints_prefix; OCC_MESH_CONTRAINTS_PREFIX=$withval
fi
# Check whether --with-hdf5-prefix was given. # Check whether --with-hdf5-prefix was given.
if test "${with_hdf5_prefix+set}" = set; then if test "${with_hdf5_prefix+set}" = set; then
withval=$with_hdf5_prefix; HDF5_PREFIX=$withval withval=$with_hdf5_prefix; HDF5_PREFIX=$withval
...@@ -5074,6 +5083,39 @@ fi ...@@ -5074,6 +5083,39 @@ fi
fi fi
fi fi
if test "x${OCC}" = "xyes"; then
if test "x${OCC_MESH_CONTRAINTS_PREFIX}" != "x"; then
as_ac_File=`echo "ac_cv_file_${OCC_MESH_CONTRAINTS_PREFIX}/MeshGmsh_Constrain.hxx" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for ${OCC_MESH_CONTRAINTS_PREFIX}/MeshGmsh_Constrain.hxx" >&5
echo $ECHO_N "checking for ${OCC_MESH_CONTRAINTS_PREFIX}/MeshGmsh_Constrain.hxx... $ECHO_C" >&6; }
if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
test "$cross_compiling" = yes &&
{ { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
{ (exit 1); exit 1; }; }
if test -r "${OCC_MESH_CONTRAINTS_PREFIX}/MeshGmsh_Constrain.hxx"; then
eval "$as_ac_File=yes"
else
eval "$as_ac_File=no"
fi
fi
ac_res=`eval echo '${'$as_ac_File'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_File'}'` = yes; then
OMC="yes"
else
OMC="no"
fi
if test "x${OMC}" = "xyes"; then
FLAGS="${FLAGS} -DHAVE_OCC_MESH_CONSTRAINTS -I${OCC_MESH_CONTRAINTS_PREFIX}"
fi
fi
fi
ac_ext=f ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
......
dnl $Id: configure.in,v 1.158 2008-06-27 18:00:51 geuzaine Exp $ dnl $Id: configure.in,v 1.159 2008-06-30 17:42:49 geuzaine Exp $
dnl dnl
dnl Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle dnl Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
dnl dnl
...@@ -61,6 +61,10 @@ AC_ARG_WITH(occ-prefix, ...@@ -61,6 +61,10 @@ AC_ARG_WITH(occ-prefix,
AC_HELP_STRING([--with-occ-prefix=PFX], AC_HELP_STRING([--with-occ-prefix=PFX],
[prefix where OpenCascade is installed]), [prefix where OpenCascade is installed]),
[OCC_PREFIX=$withval]) [OCC_PREFIX=$withval])
AC_ARG_WITH(occ-mesh-constraints-prefix,
AC_HELP_STRING([--occ-mesh-constraints-prefix=PFX],
[prefix where OCC mesh contraints source code is located]),
[OCC_MESH_CONTRAINTS_PREFIX=$withval])
AC_ARG_WITH(hdf5-prefix, AC_ARG_WITH(hdf5-prefix,
AC_HELP_STRING([--with-hdf5-prefix=PFX], AC_HELP_STRING([--with-hdf5-prefix=PFX],
[prefix where OpenCascade is installed]), [prefix where OpenCascade is installed]),
...@@ -617,6 +621,16 @@ if test "x$enable_occ" = "xyes"; then ...@@ -617,6 +621,16 @@ if test "x$enable_occ" = "xyes"; then
fi fi
fi fi
dnl Check for OpenCascade mesh constraints
if test "x${OCC}" = "xyes"; then
if test "x${OCC_MESH_CONTRAINTS_PREFIX}" != "x"; then
AC_CHECK_FILE(${OCC_MESH_CONTRAINTS_PREFIX}/MeshGmsh_Constrain.hxx, OMC="yes", OMC="no")
if test "x${OMC}" = "xyes"; then
FLAGS="${FLAGS} -DHAVE_OCC_MESH_CONSTRAINTS -I${OCC_MESH_CONTRAINTS_PREFIX}"
fi
fi
fi
dnl Check for blas and lapack (used by FourierModel) dnl Check for blas and lapack (used by FourierModel)
AC_LANG_PUSH(Fortran 77) AC_LANG_PUSH(Fortran 77)
if test "x${BLAS_LAPACK_PREFIX}" != "x"; then if test "x${BLAS_LAPACK_PREFIX}" != "x"; then
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<key>CFBundleTypeExtensions</key><array> <key>CFBundleTypeExtensions</key><array>
<string>msh</string> <string>msh</string>
<string>unv</string> <string>unv</string>
<string>stl</string>
<string>vrml</string><string>wrl</string><string>iv</string> <string>vrml</string><string>wrl</string><string>iv</string>
<string>bdf</string><string>nas</string> <string>bdf</string><string>nas</string>
<string>mesh</string> <string>mesh</string>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment