mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0025936: Modeling Data - reusable data structure for 2D tesselation (3- and 4-nodal mesh)
// Fixed a regression in bugs vis bug30630_1 (mirrored shape)
This commit is contained in:
@@ -188,10 +188,8 @@ namespace
|
|||||||
// Determinant of transform matrix less then 0 means that mirror transform applied.
|
// Determinant of transform matrix less then 0 means that mirror transform applied.
|
||||||
Standard_Boolean isMirrored = aTrsf.VectorialPart().Determinant() < 0;
|
Standard_Boolean isMirrored = aTrsf.VectorialPart().Determinant() < 0;
|
||||||
|
|
||||||
Poly_Connect aPolyConnect (aT);
|
|
||||||
// Extracts vertices & normals from nodes
|
// Extracts vertices & normals from nodes
|
||||||
TColgp_Array1OfDir aNormals (1, aT->NbNodes());
|
StdPrs_ToolTriangulatedShape::ComputeNormals (aFace, aT);
|
||||||
StdPrs_ToolTriangulatedShape::Normal (aFace, aPolyConnect, aNormals);
|
|
||||||
|
|
||||||
if (theHasTexels)
|
if (theHasTexels)
|
||||||
{
|
{
|
||||||
@@ -200,11 +198,17 @@ namespace
|
|||||||
dVmax = (aVmax - aVmin);
|
dVmax = (aVmax - aVmin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gp_Dir aNorm;
|
||||||
const Standard_Integer aDecal = anArray->VertexNumber();
|
const Standard_Integer aDecal = anArray->VertexNumber();
|
||||||
for (Standard_Integer aNodeIter = 1; aNodeIter <= aT->NbNodes(); ++aNodeIter)
|
for (Standard_Integer aNodeIter = 1; aNodeIter <= aT->NbNodes(); ++aNodeIter)
|
||||||
{
|
{
|
||||||
aPoint = aT->Node (aNodeIter);
|
aPoint = aT->Node (aNodeIter);
|
||||||
gp_Dir aNorm = aNormals (aNodeIter);
|
const Vec3f& aVec = aT->Normal (aNodeIter);
|
||||||
|
aNorm.SetCoord (aVec.x(), aVec.y(), aVec.z());
|
||||||
|
if ((aFace.Orientation() == TopAbs_REVERSED) ^ isMirrored)
|
||||||
|
{
|
||||||
|
aNorm.Reverse();
|
||||||
|
}
|
||||||
if (!aLoc.IsIdentity())
|
if (!aLoc.IsIdentity())
|
||||||
{
|
{
|
||||||
aPoint.Transform (aTrsf);
|
aPoint.Transform (aTrsf);
|
||||||
|
Reference in New Issue
Block a user