1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

Compare commits

..

1 Commits

Author SHA1 Message Date
dpasukhi
656b0d217f 0033557: Coding - Cocoa compilation problem
Fixed extern relation for VisTest component on MacOS
2023-12-26 08:37:59 +00:00
3 changed files with 3 additions and 74 deletions

View File

@@ -192,7 +192,6 @@ namespace
}
const Standard_Integer aDecal = anArray->VertexNumber();
Standard_Real aMaxX = -FLT_MAX, aMinX = FLT_MAX;
for (Standard_Integer aNodeIter = 1; aNodeIter <= aT->NbNodes(); ++aNodeIter)
{
aPoint = aT->Node (aNodeIter);
@@ -200,19 +199,13 @@ namespace
if ((aFace.Orientation() == TopAbs_REVERSED) ^ isMirrored)
{
aNorm.Reverse();
if (aT->HasUVNodes())
{
gp_Pnt2d aTmpPnt = aT->UVNode(aNodeIter);
if (aMaxX < aTmpPnt.X()) { aMaxX = aTmpPnt.X(); }
if (aMinX > aTmpPnt.X()) { aMinX = aTmpPnt.X(); }
}
}
if (!aLoc.IsIdentity())
{
aPoint.Transform (aTrsf);
aNorm .Transform (aTrsf);
}
if (theHasTexels && aT->HasUVNodes())
{
const gp_Pnt2d aNode2d = aT->UVNode (aNodeIter);
@@ -228,18 +221,6 @@ namespace
}
}
// changes uvs for reversed faces depending on number of vertex
// by flipping the uv coordinates according to face normal
if (((aFace.Orientation() == TopAbs_REVERSED) ^ isMirrored) && aT->HasUVNodes())
{
for (Standard_Integer anIndex = 1; anIndex <= aT->NbNodes(); anIndex++)
{
gp_Pnt2d aTmpPnt = aT->UVNode (anIndex);
aTmpPnt.SetX (aMaxX + aMinX - aTmpPnt.X());
aT->SetUVNode (anIndex, aTmpPnt);
}
}
// Fill array with vertex and edge visibility info
Standard_Integer anIndex[3];
for (Standard_Integer aTriIter = 1; aTriIter <= aT->NbTriangles(); ++aTriIter)

View File

@@ -176,11 +176,12 @@ namespace
GetDisplayConnection() = theDisplayConnection;
}
static ViewerTest_ViewerCommandsViewMap ViewerTest_myViews;
static ViewerTest_ViewerCommandsInteractiveContextMap ViewerTest_myContexts;
static ViewerTest_ViewerCommandsGraphicDriverMap ViewerTest_myDrivers;
}
ViewerTest_ViewerCommandsViewMap ViewerTest_myViews;
static struct
{
Quantity_Color FlatColor;

View File

@@ -1,53 +0,0 @@
puts "========"
puts "0025811: Visualization - Incorrect texture mapping on faces with reversed orientation"
puts "========"
puts ""
pload MODELING VISUALIZATION
vclear
vinit View1
vsetdispmode 1
vaxo
box b 10 10 10
vdisplay b
#dump image off textured box
vtexture b [locate_data_file bug25809_salome.png]
vfit
vdump $imagedir/${casename}_box.png
vviewparams -scale 60.0 -proj 1.0 -1.0 1.0 -up 0.0 0.0 1.0 -at 0 10 0
vrotate 3.14 0 0
vdump $imagedir/${casename}_box2.png
#dump image of capped sphere
vclear
psphere s 15 -60 60 90
vdisplay s
vtexture s [locate_data_file bug25809_salome.png]
vviewparams -scale 40.0 -proj 1.0 1.0 1.0 -up 0.0 0.0 1.0 -at 0 0 0
vfit
vdump $imagedir/${casename}_sphere.png
vrotate 3.14 0 0
vfit
vdump $imagedir/${casename}_sphere2.png
vviewparams -scale 40.0 -proj 1.0 1.0 1.0 -up 1.0 1.0 0.0 -at 0 0 0
vrotate 0 1 0
vfit
vdump $imagedir/${casename}_sphere3.png
vrotate 0 3.14 0
vfit
vdump $imagedir/${casename}_sphere4.png
#dump image off textured cylinder
vclear
pcylinder c 3 10
vdisplay c
vtexture c [locate_data_file bug25809_salome.png]
vviewparams -scale 60.0 -proj 1.0 1.0 1.0 -up 0.0 0.0 1.0 -at 0 0 5
vfit
vdump $imagedir/${casename}_cylinder.png
vviewparams -scale 60.0 -proj 1.0 1.0 1.0 -up 0.0 1.0 0.0 -at 0 0 5
vfit
vdump $imagedir/${casename}_cylinder2.png
vrotate 0 0 3.14
vfit
vdump $imagedir/${casename}_cylinder3.png