56 bool Foam::hexCellLooper::walkHex
59 const label startFaceI,
60 const label startEdgeI,
66 label faceI = startFaceI;
68 label edgeI = startEdgeI;
76 Pout<<
" walkHex : inserting cut onto edge:" << edgeI
82 loopWeights[cutI] = 0.5;
92 if (edgeI == startEdgeI)
102 Pout<<
"hexCellLooper::walkHex" <<
"Problem : cell:" << cellI
103 <<
" collected loop:";
105 Pout<<
"loopWeights:" << loopWeights <<
endl;
117 void Foam::hexCellLooper::makeFace
126 facePoints.setSize(loop.size());
127 faceVerts.setSize(loop.size());
131 label cut = loop[cutI];
135 label edgeI = getEdge(cut);
143 loopWeights[cutI]*v1 + (1.0-loopWeights[cutI])*v0;
147 label vertI = getVertex(cut);
152 faceVerts[cutI] = cutI;
187 bool success =
false;
204 success = walkHex(cellI, face0, edgeI, loop, loopWeights);
226 <<
"could not cut cell " << cellI <<
endl;
228 fileName cutsFile(
"hexCellLooper_" +
name(cellI) +
".obj");
230 Pout<<
"hexCellLooper : writing cell to " << cutsFile <<
endl;
251 label elem = loop[elemI];
253 if (loopSet.found(elem))
255 FatalErrorIn(
"hexCellLooper::walkHex") <<
" duplicate cut"
258 loopSet.insert(elem);
265 makeFace(loop, loopWeights, faceVerts, facePoints);
267 if ((faceVerts.mag(facePoints) < SMALL) || (loop.
size() < 3))
269 FatalErrorIn(
"hexCellLooper::walkHex") <<
"Face:" << faceVerts
270 <<
" on points:" << facePoints <<
endl
282 const plane& cutPlane,