Fix bug in Bfr::SurfaceFactory with valence-2 interior vertex:

- fixed IrregularPatchBuilder to correctly assign boundary sharpness
    - modified test shape creating creased val-2 interior face on boundary
This commit is contained in:
Barry Fowler 2023-03-14 19:02:04 -07:00
parent 578b1fb9d2
commit 51eb6a041c
2 changed files with 8 additions and 0 deletions

View File

@ -768,6 +768,10 @@ IrregularPatchBuilder::sharpenBoundaryControlEdges(
// sharp. And only boundary edges of the base face are sharpened
// here -- it is not necessary to deal with others.
//
// Append boundary edge sharpness to existing sharp edges:
edgeVertPairs += *numSharpEdges * 2;
edgeSharpness += *numSharpEdges;
int faceSize = _surface.GetFaceSize();
for (int corner = 0; corner < faceSize; ++corner) {

View File

@ -317,6 +317,10 @@ static const std::string catmark_val2_interior =
"f 87/87 88/88 89/89 93/93 92/92 91/91\n"
"f 94/94 92/92 93/93 89/89 88/88 90/90\n"
"\n"
"t crease 2/1/0 87 88 5.0\n"
"t crease 2/1/0 88 92 5.0\n"
"t crease 2/1/0 92 91 5.0\n"
"\n"
"#\n"
"# Shape 9: bottom-right\n"
"#\n"