]> OCCT Git - occt.git/commitdiff
0026984: Draw Harness, ViewerTest - preserve local transformation of presentation...
authorisk <isk@opencascade.com>
Fri, 11 Dec 2015 16:29:09 +0000 (19:29 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 17 Dec 2015 13:35:58 +0000 (16:35 +0300)
src/ViewerTest/ViewerTest.cxx

index 316fd1441ca38346eac035c47b122ca344e430b0..7fc38d352b92e48391e7f31b1ff5f13d92f7845e 100644 (file)
@@ -3220,8 +3220,15 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb,
   }
   else
   {
-    anAISContext->Remove (anIO, Standard_False);
     aTexturedIO = new AIS_TexturedShape (DBRep::Get (theArgv[1]));
+
+    if (anIO->HasTransformation())
+    {
+      const gp_Trsf& aLocalTrsf = anIO->LocalTransformation();
+      aTexturedIO->SetLocalTransformation (aLocalTrsf);
+    }
+
+    anAISContext->Remove (anIO, Standard_False);
     GetMapOfAIS().UnBind1 (anIO);
     GetMapOfAIS().UnBind2 (aShapeName);
     GetMapOfAIS().Bind (aTexturedIO, aShapeName);