diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C index 3ae006e69d..1ea773f16b 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C +++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C @@ -31,817 +31,31 @@ Description Extracts and writes surface features to file. All but the basic feature extraction is a work-in-progress. - The curvature calculation is an implementation of the algorithm from: - \verbatim - "Estimating Curvatures and their Derivatives on Triangle Meshes" - by S. Rusinkiewicz - 3DPVT'04 Proceedings of the 3D Data Processing, - Visualization, and Transmission, 2nd International Symposium - Pages 486-493 - http://gfx.cs.princeton.edu/pubs/_2004_ECA/curvpaper.pdf - \endverbatim - \*---------------------------------------------------------------------------*/ #include "argList.H" #include "Time.H" #include "triSurface.H" +#include "triSurfaceTools.H" +#include "edgeMeshTools.H" #include "surfaceFeaturesExtraction.H" #include "surfaceIntersection.H" #include "featureEdgeMesh.H" #include "extendedFeatureEdgeMesh.H" #include "treeBoundBox.H" #include "meshTools.H" -#include "OFstream.H" +#include "OBJstream.H" #include "triSurfaceMesh.H" #include "vtkSurfaceWriter.H" -#include "triSurfaceFields.H" -#include "indexedOctree.H" -#include "treeDataEdge.H" #include "unitConversion.H" #include "plane.H" -#include "tensor2D.H" -#include "symmTensor2D.H" #include "point.H" -#include "triadField.H" -#include "transform.H" #include "triSurfaceLoader.H" using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -scalar calcVertexNormalWeight -( - const triFace& f, - const label pI, - const vector& fN, - const pointField& points -) -{ - label index = findIndex(f, pI); - - if (index == -1) - { - FatalErrorInFunction - << "Point not in face" << abort(FatalError); - } - - const vector e1 = points[f[index]] - points[f[f.fcIndex(index)]]; - const vector e2 = points[f[index]] - points[f[f.rcIndex(index)]]; - - return mag(fN)/(magSqr(e1)*magSqr(e2) + VSMALL); -} - - -triadField calcVertexCoordSys -( - const triSurface& surf, - const vectorField& pointNormals -) -{ - const pointField& points = surf.points(); - const Map