Commit 19b84635 authored by graham's avatar graham
Browse files

ENH: Remove feature edges from curvature field.

parent 52bc7df7
......@@ -59,9 +59,9 @@ void Foam::buildCGALPolyhedron::operator()
B.begin_surface
(
surf_.points().size(), // n points
surf_.size(), // n facets
2*surf_.edges().size() // n halfedges
surf_.points().size(), // n points
surf_.size(), // n facets
2*surf_.edges().size() // n halfedges
);
forAll(surf_.points(), pI)
......
EXE_FROUNDING_MATH = -frounding-math
EXE_NDEBUG = -DNDEBUG
USE_F2C = -DCGAL_USE_F2C
include $(GENERAL_RULES)/CGAL
EXE_INC = \
${EXE_FROUNDING_MATH} \
${EXE_NDEBUG} \
${USE_F2C} \
${CGAL_INC} \
-ICGALPolyhedron \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \
......
......@@ -528,7 +528,7 @@ int main(int argc, char *argv[])
args.optionReadIfPresent("closeness", span);
Info<< "span " << span << endl;
// Info<< "span " << span << endl;
pointField start = searchSurf.faceCentres() - span*normals;
pointField end = searchSurf.faceCentres() + span*normals;
......@@ -766,6 +766,16 @@ int main(int argc, char *argv[])
scalarField k = curvature(surf);
// Modify the curvature values on feature edges and points to be zero.
forAll(newSet.featureEdges(), fEI)
{
const edge& e = surf.edges()[newSet.featureEdges()[fEI]];
k[surf.meshPoints()[e.start()]] = 0.0;
k[surf.meshPoints()[e.end()]] = 0.0;
}
triSurfacePointScalarField kField
(
IOobject
......@@ -784,7 +794,7 @@ int main(int argc, char *argv[])
kField.write();
if (args.optionFound("writeObj"))
if (args.optionFound("writeVTK"))
{
vtkSurfaceWriter<scalar>().write
(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment