| 108 | |
| 109 | |
| 110 | void Foam::hexCellLooper::makeFace |
| 111 | ( |
| 112 | const labelList& loop, |
| 113 | const scalarField& loopWeights, |
| 114 | |
| 115 | labelList& faceVerts, |
| 116 | pointField& facePoints |
| 117 | ) const |
| 118 | { |
| 119 | facePoints.setSize(loop.size()); |
| 120 | faceVerts.setSize(loop.size()); |
| 121 | |
| 122 | forAll(loop, cutI) |
| 123 | { |
| 124 | label cut = loop[cutI]; |
| 125 | |
| 126 | if (isEdge(cut)) |
| 127 | { |
| 128 | label edgeI = getEdge(cut); |
| 129 | |
| 130 | const edge& e = mesh().edges()[edgeI]; |
| 131 | |
| 132 | const point& v0 = mesh().points()[e.start()]; |
| 133 | const point& v1 = mesh().points()[e.end()]; |
| 134 | |
| 135 | facePoints[cutI] = |
| 136 | loopWeights[cutI]*v1 + (1.0-loopWeights[cutI])*v0; |
| 137 | } |
| 138 | else |
| 139 | { |
| 140 | label vertI = getVertex(cut); |
| 141 | |
| 142 | facePoints[cutI] = mesh().points()[vertI]; |
| 143 | } |
| 144 | |
| 145 | faceVerts[cutI] = cutI; |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | |
| 150 | // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // |