35 #ifndef triSurfaceTools_H 36 #define triSurfaceTools_H 56 class polyBoundaryMesh;
75 static void calcRefineStatus
81 static void greenRefine
86 const label newPointI,
98 static scalar faceCosAngle
106 static void protectNeighbours
122 static label vertexUsesFace
137 static void getMergedEdges
149 static scalar edgeCosAngle
165 static scalar collapseMinCosAngle
176 bool collapseCreatesFold
207 const label excludeEdgeI,
208 const label excludePointI,
209 const point& triPoint,
210 const plane& cutPlane,
216 static void snapToEnd
236 const label excludeEdgeI,
237 const label excludePointI,
239 const plane& cutPlane
423 const scalar mergeTol
432 const label nearestFaceI,
433 const point& nearestPt
450 const point& nearestPoint,
461 const label nearestFaceI
473 const bool verbose =
false 484 const bool verbose =
false 526 const point& trianglePoint
551 const plane& cutPlane
563 const plane& cutPlane,
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject( name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE ))
static void calcInterpolationWeights(const triPointRef &, const point &, FixedList< scalar, 3 > &weights)
Calculate linear interpolation weights for point (guaranteed to be.
PointFrompoint toPoint(const Foam::point &p)
static label getEdge(const triSurface &surf, const label vert1I, const label vert2I)
Returns edge label connecting v1, v2 (local numbering)
An STL-conforming hash table.
static const label NOEDGE
Triangulated surface description with patch information.
static void getVertexTriangles(const triSurface &surf, const label edgeI, labelList &edgeTris)
Get all triangles using edge endpoint.
static label oppositeEdge(const triSurface &surf, const label faceI, const label vertI)
Get edge opposite vertex (local numbering)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static labelList getVertexVertices(const triSurface &surf, const edge &e)
Get all vertices (local numbering) connected to vertices of edge.
static vector surfaceNormal(const triSurface &surf, const label nearestFaceI, const point &nearestPt)
Triangle (unit) normal. If nearest point to triangle on edge use.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
A triangle primitive used to calculate face normals and swept volumes.
static label maxEdge(const triSurface &surf, const labelList &edgeIndices)
Returns element in edgeIndices with minimum length.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Hash function class for primitives. All non-primitives used to hash entries on hash tables likely nee...
static surfaceLocation trackToEdge(const triSurface &, const surfaceLocation &start, const surfaceLocation &end, const plane &cutPlane)
Track on surface to get closer to point.
static const label ANYEDGE
Face collapse status.
const double e
Elementary charge.
static const label COLLAPSED
static label getTriangle(const triSurface &surf, const label e0I, const label e1I, const label e2I)
Return index of triangle (or -1) using all three edges.
static triSurface redGreenRefine(const triSurface &surf, const labelList &refineFaces)
Refine face by splitting all edges. Neighbouring face is.
static void track(const triSurface &, const surfaceLocation &endInfo, const plane &cutPlane, surfaceLocation &hitInfo)
Track from edge to edge across surface. Uses trackToEdge.
static triSurface collapseEdges(const triSurface &surf, const labelList &collapsableEdges)
Create new triSurface by collapsing edges to edge mids.
static void writeOBJ(const fileName &fName, const pointField &pts)
Write pointField to OBJ format file.
static triSurface mergePoints(const triSurface &surf, const scalar mergeTol)
Merge points within distance.
static label otherFace(const triSurface &surf, const label faceI, const label edgeI)
Get face connected to edge not faceI.
sideType
On which side of surface.
static label minEdge(const triSurface &surf, const labelList &edgeIndices)
Returns element in edgeIndices with minimum length.
static sideType edgeSide(const triSurface &surf, const point &sample, const point &nearestPoint, const label edgeI)
If nearest point is on edgeI, determine on which side of surface.
Geometric class that creates a 2D plane and can return the intersection point between a line and the ...
triSurface triangulateFaceCentre(const polyBoundaryMesh &mBesh, const labelHashSet &includePatches, const bool verbose=false)
Face-centre triangulation of (selected patches of) boundaryMesh.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
static triSurface triangulate(const polyBoundaryMesh &mBesh, const labelHashSet &includePatches, const bool verbose=false)
Simple triangulation of (selected patches of) boundaryMesh. Needs.
A class for handling file names.
labelHashSet includePatches
A collection of tools for triSurface.
static surfaceLocation classify(const triSurface &, const label triI, const point &trianglePoint)
Test point on plane of triangle to see if on edge or point or inside.
static void otherVertices(const triSurface &surf, const label faceI, const label vertI, label &vert1I, label &vert2I)
Get the two vertices (local numbering) on faceI counterclockwise.
Contains information about location on a triSurface:
static triSurface delaunay2D(const List< vector2D > &)
Do unconstrained Delaunay of points. Returns triSurface with 3D.
static sideType surfaceSide(const triSurface &surf, const point &sample, const label nearestFaceI)
Given nearest point (to sample) on surface determines which side.
static void otherEdges(const triSurface &surf, const label faceI, const label edgeI, label &e1, label &e2)
Get the two edges on faceI counterclockwise after edgeI.
static label oppositeVertex(const triSurface &surf, const label faceI, const label edgeI)
Get vertex (local numbering) opposite edge.