32 bool Foam::triSurface::stitchTriangles
43 bool hasMerged =
mergePoints(ps, tol, verbose, pointMap, newPoints);
49 Pout<<
"stitchTriangles : Merged from " << ps.size()
50 <<
" points down to " << newPoints.size() <<
endl;
54 ps.transfer(newPoints);
57 label newTriangleI = 0;
71 (newTri[0] != newTri[1])
72 && (newTri[0] != newTri[2])
73 && (newTri[1] != newTri[2])
80 Pout<<
"stitchTriangles : "
81 <<
"Removing triangle " << i
82 <<
" with non-unique vertices." <<
endl
83 <<
" vertices :" << newTri <<
endl
84 <<
" coordinates:" << newTri.points(ps)
89 if (newTriangleI !=
size())
93 Pout<<
"stitchTriangles : "
94 <<
"Removed " <<
size() - newTriangleI
95 <<
" triangles" <<
endl;
104 PackedBoolList pointIsUsed(ps.size());
115 if (pointIsUsed.set(pointi, 1))
125 pointMap.setSize(ps.size());
127 forAll(pointIsUsed, pointi)
129 if (pointIsUsed[pointi])
#define forAll(list, i)
Loop across all elements in list.
label size() const
Return the number of elements in the UList.
void setSize(const label)
Reset size of List.
label nPoints() const
Return number of points supporting patch faces.
std::remove_reference< ::Foam::List< labelledTri > >::type::value_type FaceType
T & operator[](const label)
Return element of UList.
pointField & storedPoints()
Non-const access to global points.
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
vectorField pointField
pointField is a vectorField.
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.
prefixOSstream Pout(cout, "Pout")