Skip to content

Commit 9b6b2d2

Browse files
author
You Wu
committed
cutoff for two triangle structure
1 parent cac8981 commit 9b6b2d2

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/MeshFactory/MeshNeoWeaver.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,7 @@ vector<QVector3D> heOverlap(refHeCount*4);
15801580
curHE->flip()->prev()->flip()->index
15811581
};
15821582
//get bezier control points
1583-
// Quad--Tri--Quad--Tri(face band)--Quad(Edge band)
1583+
// Tri - Quad--Tri--Quad--Tri(face band)--Quad(Edge band) - Tri(Connector region)
15841584
auto patchVerts = &verts[(curPatchID-1) * sPatchVertCount];
15851585

15861586
patchPos[segIndex[0] + 1] = cornerPatchPos[neiEdgeIDs[0] * 6];
@@ -1674,11 +1674,11 @@ vector<QVector3D> heOverlap(refHeCount*4);
16741674
//interpolate edge samples
16751675
cubicBezierPos(patchPos[segIndex[0]], Utils::Lerp(patchPos[segIndex[0]], patchPos[segIndex[1]], smoothness / 2.0),
16761676
Utils::Lerp(patchPos[segIndex[2]], patchPos[segIndex[1]], smoothness / 2.0), patchPos[segIndex[2]],
1677-
&patchPos[segIndex[0]], nESamples + 1);
1677+
&patchPos[segIndex[1]], nESamples);
16781678

16791679
cubicBezierPos(patchPos[segIndex[0]+1], Utils::Lerp(patchPos[segIndex[0]+1], patchPos[segIndex[1]+1], smoothness / 2.0),
16801680
Utils::Lerp(patchPos[segIndex[2]+1], patchPos[segIndex[1]+1], smoothness / 2.0), patchPos[segIndex[2]+1],
1681-
&patchPos[segIndex[0]+1], nESamples + 1);
1681+
&patchPos[segIndex[1]+1], nESamples);
16821682
#if 0
16831683

16841684
QVector3D cp;
@@ -1702,11 +1702,11 @@ vector<QVector3D> heOverlap(refHeCount*4);
17021702

17031703
cubicBezierPos(patchPos[segIndex[11]], Utils::Lerp(patchPos[segIndex[11]], patchPos[segIndex[12]], smoothness / 2.0),
17041704
Utils::Lerp(patchPos[segIndex[13]], patchPos[segIndex[12]], smoothness / 2.0), patchPos[segIndex[13]],
1705-
&patchPos[segIndex[11]], nESamples + 1);
1705+
&patchPos[segIndex[11]], nESamples);
17061706

17071707
cubicBezierPos(patchPos[segIndex[11] + 1], Utils::Lerp(patchPos[segIndex[11] + 1], patchPos[segIndex[12] + 1], smoothness / 2.0),
17081708
Utils::Lerp(patchPos[segIndex[13] + 1], patchPos[segIndex[12] + 1], smoothness / 2.0), patchPos[segIndex[13] + 1],
1709-
&patchPos[segIndex[11] + 1], nESamples + 1);
1709+
&patchPos[segIndex[11] + 1], nESamples);
17101710
#if 0
17111711
cp = Utils::Lerp(patchPos[segIndex[12]], (patchPos[segIndex[12]] + patchPos[segIndex[13]]) / 2, smoothness);
17121712
cubicBezierPos(patchPos[segIndex[11]], patchPos[segIndex[12]],
@@ -1718,6 +1718,7 @@ vector<QVector3D> heOverlap(refHeCount*4);
17181718
&patchPos[segIndex[11] + 1], nESamples);
17191719
#endif
17201720

1721+
17211722
// Assign evaluated positions to patch
17221723
for (int j = 0; j < sPatchVertCount; j++)
17231724
{

0 commit comments

Comments
 (0)