68 int main(
int argc,
char *argv[])
85 <<
"0: no change 1: move vertices to average of neighbours"
95 Info<<
"Reading surface from " << surfFileName <<
" ..." <<
endl;
99 Info<<
"Triangles : " << surf1.size() <<
endl;
100 Info<<
"Vertices : " << surf1.nPoints() <<
endl;
101 Info<<
"Bounding Box : " <<
boundBox(surf1.localPoints()) << endl;
108 for(label iter = 0; iter < iters; iter++)
114 const labelList& myEdges = pointEdges[vertI];
118 const edge&
e = surf1.edges()[myEdges[myEdgeI]];
122 avgPos += surf1.localPoints()[otherVertI];
124 avgPos /= myEdges.
size();
126 newPoints[vertI] = (1-
relax)*newPoints[vertI] +
relax*avgPos;
137 Info<<
"Writing surface to " << outFileName <<
" ..." <<
endl;
139 surf2.
write(outFileName);