Go to the documentation of this file.
47 bool hasMerged =
mergePoints(rawPoints, tol, verbose, pointMap, newPoints);
53 Pout<<
"stitchTriangles : Merged from " << rawPoints.size()
54 <<
" points down to " << newPoints.size() <<
endl;
58 label newTriangleI = 0;
72 (newTri[0] != newTri[1])
73 && (newTri[0] != newTri[2])
74 && (newTri[1] != newTri[2])
77 operator[](newTriangleI++) = newTri;
81 Pout<<
"stitchTriangles : "
82 <<
"Removing triangle " << i
83 <<
" with non-unique vertices." <<
endl
84 <<
" vertices :" << newTri <<
endl
85 <<
" coordinates:" << newTri.
points(newPoints)
91 if (newTriangleI != size())
95 Pout<<
"stitchTriangles : "
96 <<
"Removed " << size() - newTriangleI
97 <<
" triangles" <<
endl;
116 label pointI = tri[fp];
117 if (pointIsUsed.
set(pointI, 1))
124 if (
nPoints != newPoints.size())
127 pointMap.
setSize(newPoints.size());
129 forAll(pointIsUsed, pointI)
131 if (pointIsUsed[pointI])
133 newPoints[newPointI] = newPoints[pointI];
134 pointMap[pointI] = newPointI++;
137 newPoints.setSize(newPointI);
155 storedPoints().transfer(newPoints);
points setSize(newPointi)
#define forAll(list, i)
Loop across all elements in list.
void set(const PackedList< 1 > &)
Set specified bits.
Ostream & endl(Ostream &os)
Add newline and flush stream.
pointField points(const pointField &) const
Return the points corresponding to this face.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
void setSize(const label)
Reset size of List.
prefixOSstream Pout(cout, "Pout")
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool stitchTriangles(const pointField &rawPoints, const scalar tol=SMALL, const bool verbose=false)
Function to stitch the triangles by removing duplicate points.
Triangle with additional region number.
label mergePoints(const UList< Type > &points, const scalar mergeTol, const bool verbose, labelList &pointMap, const Type &origin=Type::zero)
Sorts and merges points. All points closer than/equal mergeTol get merged.