surfaceFeatureExtract: Refactoring surface closeness functions

This commit is contained in:
Henry Weller
2018-04-12 07:42:25 +01:00
parent 4e2074419b
commit ed5f44e7e8
5 changed files with 460 additions and 485 deletions

View File

@ -31,6 +31,7 @@ Description
#include "surfaceFeatures.H"
#include "extendedFeatureEdgeMesh.H"
#include "triSurfaceMesh.H"
#include "triSurfaceFields.H"
#include "pointIndexHitList.H"
#include "plane.H"
@ -61,6 +62,39 @@ namespace Foam
List<surfaceFeatures::edgeStatus>& edgeStat
);
//- Divide into multiple normal bins
// - return REGION if != 2 normals
// - return REGION if 2 normals that make feature angle
// - otherwise return NONE and set normals,bins
surfaceFeatures::edgeStatus checkNonManifoldEdge
(
const triSurface& surf,
const scalar tol,
const scalar includedAngle,
const label edgei
);
void deleteNonManifoldEdges
(
const triSurface& surf,
const scalar tol,
const scalar includedAngle,
List<surfaceFeatures::edgeStatus>& edgeStat
);
void writeStats(const extendedFeatureEdgeMesh& fem, Ostream& os);
void drawHitProblem
(
const label fi,
const triSurface& surf,
const point& start,
const point& p,
const point& end,
const pointIndexHitList& hitInfo
);
void processHit
(
scalar& internalCloseness,
@ -75,53 +109,15 @@ namespace Foam
const pointIndexHitList& hitInfo
);
void drawHitProblem
Pair<tmp<triSurfaceScalarField>> extractCloseness
(
const label fi,
const triSurface& surf,
const point& start,
const point& p,
const point& end,
const pointIndexHitList& hitInfo
const triSurfaceMesh& surf
);
//- Unmark non-manifold edges if individual triangles are not features
void unmarkBaffles
Pair<tmp<triSurfacePointScalarField>> extractPointCloseness
(
const triSurface& surf,
const scalar includedAngle,
List<surfaceFeatures::edgeStatus>& edgeStat
const triSurfaceMesh& surf
);
//- Divide into multiple normal bins
// - return REGION if != 2 normals
// - return REGION if 2 normals that make feature angle
// - otherwise return NONE and set normals,bins
surfaceFeatures::edgeStatus checkFlatRegionEdge
(
const triSurface& surf,
const scalar tol,
const scalar includedAngle,
const label edgeI
);
void extractCloseness
(
const fileName &sFeatFileName,
const Time& runTime,
const triSurface &surf,
const bool writeVTK
);
void extractPointCloseness
(
const fileName &sFeatFileName,
const Time& runTime,
const triSurface &surf,
const bool writeVTK
);
void writeStats(const extendedFeatureEdgeMesh& fem, Ostream& os);
}