A collection of tools for triSurface. More...
Public Types | |
enum | sideType { UNKNOWN, INSIDE, OUTSIDE } |
Public Member Functions | |
triSurface | triangulateFaceCentre (const polyBoundaryMesh &mBesh, const labelHashSet &includePatches, const bool verbose=false) |
scalarField | featureProximity (const triSurface &surf, const scalar searchDistance) |
Static Public Member Functions | |
static void | writeOBJ (const fileName &fName, const pointField &pts) |
static void | writeOBJ (const triSurface &surf, const fileName &fName, const boolList &markedVerts) |
static void | getVertexTriangles (const triSurface &surf, const label edgeI, labelList &edgeTris) |
static labelList | getVertexVertices (const triSurface &surf, const edge &e) |
static label | otherFace (const triSurface &surf, const label facei, const label edgeI) |
static void | otherEdges (const triSurface &surf, const label facei, const label edgeI, label &e1, label &e2) |
static void | otherVertices (const triSurface &surf, const label facei, const label vertI, label &vert1I, label &vert2I) |
static label | oppositeEdge (const triSurface &surf, const label facei, const label vertI) |
static label | oppositeVertex (const triSurface &surf, const label facei, const label edgeI) |
static label | getEdge (const triSurface &surf, const label vert1I, const label vert2I) |
static label | getTriangle (const triSurface &surf, const label e0I, const label e1I, const label e2I) |
static triSurface | collapseEdges (const triSurface &surf, const labelList &collapsableEdges) |
static triSurface | collapseEdges (const triSurface &surf, const labelList &collapsableEdges, const pointField &edgeMids, labelList &faceStatus) |
static triSurface | greenRefine (const triSurface &surf, const labelList &refineEdges) |
static triSurface | redGreenRefine (const triSurface &surf, const labelList &refineFaces) |
static label | minEdge (const triSurface &surf, const labelList &edgeIndices) |
static label | maxEdge (const triSurface &surf, const labelList &edgeIndices) |
static triSurface | mergePoints (const triSurface &surf, const scalar mergeTol) |
static vector | surfaceNormal (const triSurface &surf, const label nearestFacei, const point &nearestPt) |
static sideType | edgeSide (const triSurface &surf, const point &sample, const point &nearestPoint, const label edgeI) |
static sideType | surfaceSide (const triSurface &surf, const point &sample, const label nearestFacei) |
static triSurface | triangulate (const polyBoundaryMesh &mBesh, const labelHashSet &includePatches, labelList &faceMap, const bool verbose=false) |
static triSurface | triangulate (const polyBoundaryMesh &bMesh, const labelHashSet &includePatches, const boundBox &bBox, const bool verbose=false) |
static triSurface | delaunay2D (const List< vector2D > &) |
static void | calcInterpolationWeights (const triPointRef &tri, const point &p, FixedList< scalar, 3 > &weights) |
static void | calcInterpolationWeights (const triSurface &s, const pointField &samplePts, List< FixedList< label, 3 >> &allVerts, List< FixedList< scalar, 3 >> &allWeights) |
static scalar | vertexNormalWeight (const triFace &f, const label pI, const vector &fN, const UList< point > &points) |
static tmp< vectorField > | vertexNormals (const triSurface &surf) |
static tmp< triadField > | vertexTriads (const triSurface &surf, const vectorField &pointNormals) |
static tmp< scalarField > | curvatures (const triSurface &surf, const vectorField &pointNormals, const triadField &pointTriads) |
static tmp< scalarField > | curvatures (const triSurface &surf) |
static tmp< scalarField > | writeCurvature (const Time &runTime, const word &basename, const triSurface &surf) |
static Pair< tmp< scalarField > > | writeCloseness (const Time &runTime, const word &basename, const triSurface &surf, const scalar internalAngleTolerance=45, const scalar externalAngleTolerance=10) |
static void | writeFeatureProximity (const Time &runTime, const word &basename, const triSurface &surf, const bool writeVTK, const scalar searchDistance) |
static bool | validTri (const triSurface &, const label facei, const bool verbose=true) |
static bool | validTri (const MeshedSurface< face > &, const label facei, const bool verbose=true) |
static surfaceLocation | classify (const triSurface &, const label triI, const point &trianglePoint) |
static surfaceLocation | trackToEdge (const triSurface &, const surfaceLocation &start, const surfaceLocation &end, const plane &cutPlane) |
static void | track (const triSurface &, const surfaceLocation &endInfo, const plane &cutPlane, surfaceLocation &hitInfo) |
Static Public Attributes | |
static const label | ANYEDGE = -1 |
static const label | NOEDGE = -2 |
static const label | COLLAPSED = -3 |
A collection of tools for triSurface.
"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
Definition at line 82 of file triSurfaceTools.H.
enum sideType |
Enumerator | |
---|---|
UNKNOWN | |
INSIDE | |
OUTSIDE |
Definition at line 446 of file triSurfaceTools.H.
|
static |
Definition at line 1195 of file triSurfaceTools.C.
References Foam::endl(), and Foam::Pout.
|
static |
Definition at line 1212 of file triSurfaceTools.C.
References Foam::endl(), forAll, PrimitivePatch< FaceList, PointField >::localPoints(), Foam::Pout, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
|
static |
Definition at line 1242 of file triSurfaceTools.C.
References Foam::constant::electromagnetic::e, PrimitivePatch< FaceList, PointField >::edgeFaces(), PrimitivePatch< FaceList, PointField >::edges(), PrimitivePatch< FaceList, PointField >::pointFaces(), and List::setSize().
|
static |
Definition at line 1283 of file triSurfaceTools.C.
References Foam::constant::electromagnetic::e, PrimitivePatch< FaceList, PointField >::edges(), HashSet::insert(), and PrimitivePatch< FaceList, PointField >::pointEdges().
|
static |
Definition at line 1314 of file triSurfaceTools.C.
References PrimitivePatch< FaceList, PointField >::edgeFaces().
|
static |
Definition at line 1339 of file triSurfaceTools.C.
References Foam::abort(), PrimitivePatch< FaceList, PointField >::edges(), PrimitivePatch< FaceList, PointField >::faceEdges(), Foam::FatalError, FatalErrorInFunction, and PrimitivePatch< FaceList, PointField >::localFaces().
|
static |
Definition at line 1368 of file triSurfaceTools.C.
References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, PrimitivePatch< FaceList, PointField >::localFaces(), and Foam::nl.
|
static |
Definition at line 1404 of file triSurfaceTools.C.
References Foam::abort(), Foam::constant::electromagnetic::e, PrimitivePatch< FaceList, PointField >::edges(), PrimitivePatch< FaceList, PointField >::faceEdges(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
|
static |
Definition at line 1433 of file triSurfaceTools.C.
References Foam::abort(), Foam::constant::electromagnetic::e, PrimitivePatch< FaceList, PointField >::edges(), f(), Foam::FatalError, FatalErrorInFunction, and PrimitivePatch< FaceList, PointField >::localFaces().
|
static |
Definition at line 1460 of file triSurfaceTools.C.
References Foam::constant::electromagnetic::e, PrimitivePatch< FaceList, PointField >::edges(), and PrimitivePatch< FaceList, PointField >::pointEdges().
|
static |
Definition at line 1483 of file triSurfaceTools.C.
References Foam::abort(), PrimitivePatch< FaceList, PointField >::edgeFaces(), PrimitivePatch< FaceList, PointField >::faceEdges(), Foam::FatalError, and FatalErrorInFunction.
|
static |
Definition at line 1528 of file triSurfaceTools.C.
References Foam::constant::electromagnetic::e, PrimitivePatch< FaceList, PointField >::edges(), forAll, PrimitivePatch< FaceList, PointField >::localPoints(), and PrimitivePatch< FaceList, PointField >::nEdges().
|
static |
Definition at line 1575 of file triSurfaceTools.C.
References Foam::abort(), Foam::constant::physicoChemical::b, Foam::constant::universal::c, Foam::constant::electromagnetic::e, PrimitivePatch< FaceList, PointField >::edgeFaces(), PrimitivePatch< FaceList, PointField >::edges(), Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, forAll, PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), Foam::min(), PrimitivePatch< FaceList, PointField >::nEdges(), triSurface::patches(), and List::setSize().
|
static |
Definition at line 1754 of file triSurfaceTools.C.
References DynamicList::append(), Foam::constant::electromagnetic::e, PrimitivePatch< FaceList, PointField >::edgeFaces(), PrimitivePatch< FaceList, PointField >::edges(), forAll, PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), PrimitivePatch< FaceList, PointField >::nEdges(), newPointi, PrimitivePatch< FaceList, PointField >::nPoints(), triSurface::patches(), and DynamicList::shrink().
|
static |
Definition at line 1735 of file triSurfaceTools.C.
References forAll.
|
static |
Definition at line 1837 of file triSurfaceTools.C.
References Foam::constant::electromagnetic::e, PrimitivePatch< FaceList, PointField >::edges(), and PrimitivePatch< FaceList, PointField >::localPoints().
|
static |
Definition at line 1864 of file triSurfaceTools.C.
References Foam::constant::electromagnetic::e, PrimitivePatch< FaceList, PointField >::edges(), and PrimitivePatch< FaceList, PointField >::localPoints().
|
static |
Definition at line 1891 of file triSurfaceTools.C.
References f(), forAll, PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), Foam::mergePoints(), PrimitivePatch< FaceList, PointField >::nPoints(), triSurface::patches(), and List::setSize().
|
static |
Definition at line 1948 of file triSurfaceTools.C.
References triangle::EDGE, PrimitivePatch< FaceList, PointField >::edgeFaces(), f(), PrimitivePatch< FaceList, PointField >::faceEdges(), PrimitivePatch< FaceList, PointField >::faceNormals(), PrimitivePatch< FaceList, PointField >::localFaces(), triangle::NONE, Foam::normalised(), PrimitivePatch< FaceList, PointField >::pointNormals(), points, PrimitivePatch< FaceList, PointField >::points(), and Foam::Zero.
|
static |
Definition at line 1992 of file triSurfaceTools.C.
References PrimitivePatch< FaceList, PointField >::edgeFaces(), faceNormals(), PrimitivePatch< FaceList, PointField >::faceNormals(), and n.
|
static |
Definition at line 2029 of file triSurfaceTools.C.
References Foam::abort(), Foam::constant::universal::c, Foam::constant::electromagnetic::e, triangle::EDGE, PrimitivePatch< FaceList, PointField >::edges(), f(), PrimitivePatch< FaceList, PointField >::faceEdges(), PrimitivePatch< FaceList, PointField >::faceNormals(), Foam::FatalError, FatalErrorInFunction, forAll, PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), Foam::mag(), Foam::magSqr(), triangle::NONE, PrimitivePatch< FaceList, PointField >::pointEdges(), points, PrimitivePatch< FaceList, PointField >::points(), PointHit< PointType >::rawPoint(), and Foam::sqr().
|
static |
Definition at line 2185 of file triSurfaceTools.C.
References Foam::endl(), f(), Foam::faceMap(), PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), mesh, Foam::foamVersion::patch, triSurface::patches(), points, polyMesh::points(), Foam::Pout, and List::setSize().
|
static |
Definition at line 2283 of file triSurfaceTools.C.
References DynamicList::append(), boundBox::containsAny(), Foam::endl(), f(), forAll, PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), mesh, primitiveMesh::nBoundaryFaces(), Foam::foamVersion::patch, triSurface::patches(), points, polyMesh::points(), Foam::Pout, List::setSize(), and DynamicList::shrink().
Foam::triSurface triangulateFaceCentre | ( | const polyBoundaryMesh & | mBesh, |
const labelHashSet & | includePatches, | ||
const bool | verbose = false |
||
) |
Definition at line 2369 of file triSurfaceTools.C.
References DynamicList::append(), Foam::endl(), f(), primitiveMesh::faceCentres(), forAll, PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), mesh, primitiveMesh::nBoundaryFaces(), newPointi, Foam::foamVersion::patch, triSurface::patches(), points, polyMesh::points(), Foam::Pout, List::setSize(), and DynamicList::shrink().
|
static |
Definition at line 2465 of file triSurfaceTools.C.
References Foam::abort(), dtris2(), Foam::FatalError, FatalErrorInFunction, forAll, points, and List::setSize().
|
static |
Definition at line 2531 of file triSurfaceTools.C.
References triangle::a(), triangle::b(), triangle::c(), Foam::max(), Foam::normalised(), and p.
|
static |
Definition at line 2562 of file triSurfaceTools.C.
References PointHit< PointType >::distance(), triangle::EDGE, f(), forAll, PointHit< PointType >::hit(), Foam::mag(), Foam::max(), Foam::min(), triangle::nearestPointClassify(), p0, triangle::POINT, points, PointHit< PointType >::rawPoint(), and s.
|
static |
Definition at line 36 of file triSurfaceCurvature.C.
References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, Foam::mag(), Foam::magSqr(), and points.
Referenced by triSurfaceTools::curvatures(), and triSurfaceTools::vertexNormals().
|
static |
Definition at line 59 of file triSurfaceCurvature.C.
References Foam::endl(), f(), forAll, Foam::Info, PrimitivePatch< FaceList, PointField >::meshPoints(), tmp::New(), Vector< Cmpt >::normalise(), PrimitivePatch< FaceList, PointField >::nPoints(), pFaces, PrimitivePatch< FaceList, PointField >::pointFaces(), points, PrimitivePatch< FaceList, PointField >::points(), triSurfaceTools::vertexNormalWeight(), and Foam::Zero.
Referenced by triSurfaceTools::curvatures().
|
static |
Definition at line 103 of file triSurfaceCurvature.C.
References Foam::constant::electromagnetic::e, forAll, Foam::mag(), PrimitivePatch< FaceList, PointField >::meshPointMap(), tmp::New(), Foam::normalised(), p, points, PrimitivePatch< FaceList, PointField >::points(), and triad::unset.
Referenced by triSurfaceTools::curvatures().
|
static |
Definition at line 140 of file triSurfaceCurvature.C.
References Foam::constant::electromagnetic::e, Foam::eigenValues(), Foam::endl(), f(), forAll, Foam::Info, Foam::LUsolve(), Foam::mag(), Foam::magSqr(), Foam::max(), PrimitivePatch< FaceList, PointField >::meshPointMap(), PrimitivePatch< FaceList, PointField >::meshPoints(), tmp::New(), triad::normalize(), points, PrimitivePatch< FaceList, PointField >::points(), Foam::rotationTensor(), triad::set(), Foam::sqr(), Foam::T(), triSurfaceTools::vertexNormalWeight(), x, Tensor2D< Cmpt >::x(), y, Tensor2D< Cmpt >::y(), VectorSpace< SymmTensor2D< Cmpt >, Cmpt, 3 >::zero, and Foam::Zero.
Referenced by triSurfaceTools::writeCurvature().
|
static |
Definition at line 325 of file triSurfaceCurvature.C.
References tmp::clear(), triSurfaceTools::vertexNormals(), and triSurfaceTools::vertexTriads().
|
static |
Definition at line 342 of file triSurfaceCurvature.C.
References TimePaths::constant(), triSurfaceTools::curvatures(), Foam::dimLength, Foam::endl(), Foam::Info, IOobject::NO_READ, IOobject::NO_WRITE, tmp::ref(), and runTime.
|
static |
Definition at line 89 of file triSurfaceCloseness.C.
References searchableSurface::bounds(), Foam::cos(), Foam::degToRad(), Foam::dimLength, Foam::drawHitProblem(), stdFoam::end(), Foam::endl(), PrimitivePatch< FaceList, PointField >::faceCentres(), PrimitivePatch< FaceList, PointField >::faceNormals(), triSurfaceMesh::findLineAll(), forAll, Foam::Info, boundBox::mag(), Foam::mag(), Foam::nl, and runTime.
scalarField featureProximity | ( | const triSurface & | surf, |
const scalar | searchDistance | ||
) |
|
static |
|
static |
Definition at line 2689 of file triSurfaceTools.C.
References Foam::endl(), f(), PrimitivePatch< FaceList, PointField >::faceFaces(), PrimitivePatch< FaceList, PointField >::points(), and WarningInFunction.
Referenced by isoSurfaceCell::isoSurfaceCell(), and isoSurfacePoint::isoSurfacePoint().
|
static |
Definition at line 2768 of file triSurfaceTools.C.
References Foam::endl(), f(), MeshedSurface::size(), and WarningInFunction.
|
static |
Definition at line 2862 of file triSurfaceTools.C.
References triangle::EDGE, surfaceLocation::elementType(), triangle::NONE, triangle::POINT, s, PointIndexHit::setHit(), PointIndexHit::setIndex(), PointIndexHit::setMiss(), and PointIndexHit::setPoint().
|
static |
Definition at line 2906 of file triSurfaceTools.C.
References triangle::EDGE, surfaceLocation::elementType(), stdFoam::end(), PointIndexHit::hit(), PointIndexHit::index(), triangle::NONE, pFaces, PointIndexHit::rawPoint(), s, PointIndexHit::setMiss(), and surfaceLocation::triangle().
|
static |
Definition at line 2984 of file triSurfaceTools.C.
References PointIndexHit::hit(), s, and surfaceLocation::triangle().
|
static |
Definition at line 376 of file triSurfaceTools.H.
|
static |
Definition at line 377 of file triSurfaceTools.H.
|
static |
Definition at line 378 of file triSurfaceTools.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.