mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
fix index of degenerated vertex within multiple faces
This commit is contained in:
@@ -360,15 +360,25 @@ namespace
|
|||||||
: -1;
|
: -1;
|
||||||
if (aDegenInTri != -1)
|
if (aDegenInTri != -1)
|
||||||
{
|
{
|
||||||
|
aPoint = aNodes (anIndex[aDegenInTri]);
|
||||||
|
if (!aLoc.IsIdentity())
|
||||||
|
{
|
||||||
|
aPoint.Transform (aTrsf);
|
||||||
|
aV1.Transform (aTrsf);
|
||||||
|
if (aV1.SquareMagnitude() > aPreci)
|
||||||
|
{
|
||||||
|
aV1.Normalize();
|
||||||
|
}
|
||||||
|
}
|
||||||
if (theHasTexels && aUVNodes.Upper() == aNodes.Upper())
|
if (theHasTexels && aUVNodes.Upper() == aNodes.Upper())
|
||||||
{
|
{
|
||||||
const gp_Pnt2d aTexel = gp_Pnt2d ((-theUVOrigin.X() + (theUVRepeat.X() * (aUVNodes (anIndex[aDegenInTri]).X() - aUmin)) / dUmax) / theUVScale.X(),
|
const gp_Pnt2d aTexel = gp_Pnt2d ((-theUVOrigin.X() + (theUVRepeat.X() * (aUVNodes (anIndex[aDegenInTri]).X() - aUmin)) / dUmax) / theUVScale.X(),
|
||||||
(-theUVOrigin.Y() + (theUVRepeat.Y() * (aUVNodes (anIndex[aDegenInTri]).Y() - aVmin)) / dVmax) / theUVScale.Y());
|
(-theUVOrigin.Y() + (theUVRepeat.Y() * (aUVNodes (anIndex[aDegenInTri]).Y() - aVmin)) / dVmax) / theUVScale.Y());
|
||||||
anIndex[aDegenInTri] = anArray->AddVertex (aNodes (anIndex[aDegenInTri]), aV1, aTexel);
|
anIndex[aDegenInTri] = anArray->AddVertex (aPoint, aV1, aTexel) - aDecal;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
anIndex[aDegenInTri] = anArray->AddVertex (aNodes (anIndex[aDegenInTri]), aV1);
|
anIndex[aDegenInTri] = anArray->AddVertex (aPoint, aV1) - aDecal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user