From: isk Date: Fri, 11 Dec 2015 16:29:09 +0000 (+0300) Subject: 0026984: Draw Harness, ViewerTest - preserve local transformation of presentation... X-Git-Tag: V7_0_0_beta~53 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=16420da1d40435222873fcf6385ae9d8dbd4f06c;p=occt.git 0026984: Draw Harness, ViewerTest - preserve local transformation of presentation within vtexture command --- diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 316fd1441c..7fc38d352b 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -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);