Added test case bugs/xde/bug30221
(anAlloc->Allocate (nNodes * sizeof(gp_XYZ)));
const TShort_Array1OfShortReal& Norm = theTri->Normals();
Standard_Integer j;
- for (i = 0, j = 1; i < nNodes; i++, j += 3) {
-
+ for (i = 0, j = 1; i < nNodes; i++, j += 3)
+ {
gp_XYZ aNormal(Norm(j), Norm(j+1), Norm(j+2));
+ if (isReverse)
+ {
+ aNormal.Reverse();
+ }
arrVec[i] = aNormal;
-
}
const Handle(VrmlData_Normal) aNormalNode =
new VrmlData_Normal (myScene, 0L, nNodes, arrVec);
--- /dev/null
+puts "========"
+puts "OCC30221"
+puts "========"
+puts ""
+#################################################################
+# Data Exchange - VRML is exported with inversed normals
+#################################################################
+
+set FileName bug30221_vmt01b
+XOpen [locate_data_file ${FileName}.xbf] D
+XShow D
+vfit
+vsetdispmode 1
+vclose
+file delete -force ${imagedir}/${FileName}.wrl
+WriteVrml D ${imagedir}/${FileName}.wrl
+loadvrml a ${imagedir}/${FileName}.wrl
+
+vinit View1
+vdisplay -dispMode 1 a
+vfit
+
+checkview -screenshot -3d -path ${imagedir}/${test_image}.png