33 unweighted_(unweighted)
70 flipped_ = ow ? false :
true;
75 const label startPoint = faceEdgei;
83 fp = pointsAlpha[
f[startPoint]] < pointsAlpha[
f[lEdgeP]]
84 ? startPoint : lEdgeP;
91 && pointsAlpha[
f[startPoint]] < pointsAlpha[
f[lEdgeP]]
95 && pointsAlpha[
f[startPoint]] > pointsAlpha[
f[lEdgeP]]
119 const scalar& fl = pointsAlpha[
f[fp]];
120 const scalar& fk = pointsAlpha[
f[nextFp]];
125 const label edg = faceEdges[edgei];
128 if (fl >= target && cutPoints_.size() > 0)
133 subPointsU_.append(pointsU[
f[fp]]);
141 && ((fl < target && fk >= target) || (fl >= target && fk < target))
144 const scalar coeff = (target - fk)/(fl - fk);
145 const point cut = pK + coeff*(pL - pK);
151 + coeff*(pointsU[
f[fp]] - pointsU[
f[nextFp]])
154 cutPoints_.append(cut);
155 subPoints_.append(cut);
156 cutEdges_.append(edg);
157 isEdgeCut[edg] =
true;
161 if (cutPoints_.size() == 2)
201 flipped_ = ow ? false :
true;
214 const scalar& fl = pointsAlpha[
f[fp]];
215 const scalar& fk = pointsAlpha[
f[nextFp]];
221 if (fl >= target && cutPoints_.size() > 0)
226 subPointsU_.append(pointsU[
f[fp]]);
231 if ((fl < target && fk >= target) || (fl >= target && fk < target))
233 const scalar coeff = (target - fk)/(fl - fk);
234 const point cut = pK + coeff*(pL - pK);
240 + coeff*(pointsU[
f[fp]] - pointsU[
f[nextFp]])
243 cutPoints_.append(cut);
244 subPoints_.append(cut);
260 if (cutPoints_.size() == 2)
266 else if (cutPoints_.size() > 2)
#define forAll(list, i)
Loop across all elements in list.
void append(const T &)
Append an element at the end of the list.
MPLICface(const bool unweighted=true)
Construct empty.
label cutFace(const labelList &f, const labelList &faceEdges, const pointField &points, const boolList &isEdgeCutOld, boolList &isEdgeCut, label &faceEdgei, const UList< scalar > &pointsAlpha, const UList< vector > &pointsU, const label facei, const scalar target, const bool ow)
Function to cut for multi cut.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label rcIndex(const label i) const
Return the reverse circular index, i.e. the previous index.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
label findMin(const ListType &, const label start=0)
Find index of min element (and less than given element).