COMP: surfaceFeatureExtract: Clean up build
This commit is contained in:
parent
138f149b47
commit
c6a2710bbe
@ -3,30 +3,25 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
set -x
|
||||
|
||||
if [ ! -e "Make/files" ] || [ ! -e "Make/options" ]
|
||||
if [ -n "$CGAL_ARCH_PATH" ]
|
||||
then
|
||||
mkdir -p Make
|
||||
echo
|
||||
echo "Compiling surfaceFeatureExtract with CGAL curvature support"
|
||||
echo
|
||||
|
||||
if [ -n "$CGAL_ARCH_PATH" ]
|
||||
then
|
||||
cp -r MakeWithCGAL/* Make
|
||||
|
||||
echo
|
||||
echo Compiling surfaceFeatureExtract with CGAL support for curvature
|
||||
echo
|
||||
|
||||
wmake
|
||||
else
|
||||
cp -r MakeWithoutCGAL/* Make
|
||||
|
||||
echo
|
||||
echo Compiling surfaceFeatureExtract without CGAL support for curvature
|
||||
echo
|
||||
|
||||
wmake
|
||||
fi
|
||||
wmake "ENABLE_CURVATURE=-DENABLE_CURVATURE \
|
||||
EXE_FROUNDING_MATH=-frounding-math \
|
||||
USE_F2C=-DCGAL_USE_F2C \
|
||||
CGAL_LIBDIR=-L$CGAL_ARCH_PATH/lib \
|
||||
LAPACK_LIB=-llapack \
|
||||
BLAS_LIB=-lblas \
|
||||
CGAL_LIB=-lCGAL"
|
||||
else
|
||||
echo surfaceFeatureExtract already has a Make folder
|
||||
echo
|
||||
echo "Compiling surfaceFeatureExtract without CGAL curvature support"
|
||||
echo
|
||||
|
||||
wmake
|
||||
fi
|
||||
|
||||
|
||||
|
@ -1,89 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM 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 General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "buildCGALPolyhedron.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::buildCGALPolyhedron::buildCGALPolyhedron
|
||||
(
|
||||
const Foam::triSurface& surf
|
||||
)
|
||||
:
|
||||
CGAL::Modifier_base<HalfedgeDS>(),
|
||||
surf_(surf)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::buildCGALPolyhedron::~buildCGALPolyhedron()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::buildCGALPolyhedron::operator()
|
||||
(
|
||||
HalfedgeDS& hds
|
||||
)
|
||||
{
|
||||
typedef HalfedgeDS::Traits Traits;
|
||||
typedef Traits::Point_3 Point;
|
||||
|
||||
// Postcondition: `hds' is a valid polyhedral surface.
|
||||
CGAL::Polyhedron_incremental_builder_3<HalfedgeDS> B(hds, false);
|
||||
|
||||
B.begin_surface
|
||||
(
|
||||
surf_.points().size(), // n points
|
||||
surf_.size(), // n facets
|
||||
2*surf_.edges().size() // n halfedges
|
||||
);
|
||||
|
||||
forAll(surf_.points(), pI)
|
||||
{
|
||||
const Foam::point& p = surf_.points()[pI];
|
||||
|
||||
B.add_vertex(Point(p.x(), p.y(), p.z()));
|
||||
}
|
||||
|
||||
forAll(surf_, fI)
|
||||
{
|
||||
B.begin_facet();
|
||||
|
||||
B.add_vertex_to_facet(surf_[fI][0]);
|
||||
B.add_vertex_to_facet(surf_[fI][1]);
|
||||
B.add_vertex_to_facet(surf_[fI][2]);
|
||||
|
||||
B.end_facet();
|
||||
}
|
||||
|
||||
B.end_surface();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -53,7 +53,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class buildCGALPolyhedron Declaration
|
||||
Class buildCGALPolyhedron Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class buildCGALPolyhedron
|
||||
@ -80,18 +80,56 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct with reference to triSurface
|
||||
buildCGALPolyhedron(const triSurface& surf);
|
||||
explicit buildCGALPolyhedron(const triSurface& surf)
|
||||
:
|
||||
CGAL::Modifier_base<HalfedgeDS>(),
|
||||
surf_(surf)
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
~buildCGALPolyhedron();
|
||||
~buildCGALPolyhedron(){}
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- operator() of this `modifier' called by delegate function of
|
||||
// Polyhedron
|
||||
void operator()(HalfedgeDS& hds);
|
||||
void operator()(HalfedgeDS& hds)
|
||||
{
|
||||
typedef HalfedgeDS::Traits Traits;
|
||||
typedef Traits::Point_3 Point;
|
||||
|
||||
// Postcondition: `hds' is a valid polyhedral surface.
|
||||
CGAL::Polyhedron_incremental_builder_3<HalfedgeDS> B(hds, false);
|
||||
|
||||
B.begin_surface
|
||||
(
|
||||
surf_.points().size(), // n points
|
||||
surf_.size(), // n facets
|
||||
2*surf_.edges().size() // n halfedges
|
||||
);
|
||||
|
||||
forAll(surf_.points(), pI)
|
||||
{
|
||||
const Foam::point& p = surf_.points()[pI];
|
||||
|
||||
B.add_vertex(Point(p.x(), p.y(), p.z()));
|
||||
}
|
||||
|
||||
forAll(surf_, fI)
|
||||
{
|
||||
B.begin_facet();
|
||||
|
||||
B.add_vertex_to_facet(surf_[fI][0]);
|
||||
B.add_vertex_to_facet(surf_[fI][1]);
|
||||
B.add_vertex_to_facet(surf_[fI][2]);
|
||||
|
||||
B.end_facet();
|
||||
}
|
||||
|
||||
B.end_surface();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,4 +1,11 @@
|
||||
include $(GENERAL_RULES)/CGAL
|
||||
|
||||
EXE_INC = \
|
||||
${ENABLE_CURVATURE}\
|
||||
${EXE_FROUNDING_MATH} \
|
||||
${USE_F2C} \
|
||||
${CGAL_INC} \
|
||||
-ICGALPolyhedron \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude \
|
||||
@ -7,6 +14,11 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
$(CGAL_LIBS) \
|
||||
${CGAL_LIBDIR} \
|
||||
${LAPACK_LIB} \
|
||||
${BLAS_LIB} \
|
||||
${CGAL_LIB} \
|
||||
-lmeshTools \
|
||||
-ledgeMesh \
|
||||
-ltriSurface \
|
||||
|
@ -1,4 +0,0 @@
|
||||
surfaceFeatureExtract.C
|
||||
CGALPolyhedron/buildCGALPolyhedron.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/surfaceFeatureExtract
|
@ -1,29 +0,0 @@
|
||||
EXE_FROUNDING_MATH = -frounding-math
|
||||
EXE_NDEBUG = -DNDEBUG
|
||||
USE_F2C = -DCGAL_USE_F2C
|
||||
include $(GENERAL_RULES)/CGAL
|
||||
|
||||
EXE_INC = \
|
||||
-DENABLE_CURVATURE \
|
||||
${EXE_FROUNDING_MATH} \
|
||||
${EXE_NDEBUG} \
|
||||
${USE_F2C} \
|
||||
${CGAL_INC} \
|
||||
-ICGALPolyhedron \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||
-I$(LIB_SRC)/surfMesh/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
$(CGAL_LIBS) \
|
||||
-L$(CGAL_ARCH_PATH)/lib \
|
||||
-llapack \
|
||||
-lblas \
|
||||
-lCGAL \
|
||||
-lmeshTools \
|
||||
-ledgeMesh \
|
||||
-ltriSurface \
|
||||
-lsampling
|
@ -1,3 +0,0 @@
|
||||
surfaceFeatureExtract.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/surfaceFeatureExtract
|
@ -1,13 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||
-I$(LIB_SRC)/surfMesh/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-ledgeMesh \
|
||||
-ltriSurface \
|
||||
-lsampling
|
Loading…
Reference in New Issue
Block a user