From: Artem Zhidkov Date: Tue, 15 Sep 2020 12:51:09 +0000 (+0300) Subject: Issue #19890: Shape displayed with some transparency after symmetry X-Git-Tag: V9_6_0a1~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9ef491f540879952217af7e01c7b092af0ccb7e4;p=modules%2Fshaper.git Issue #19890: Shape displayed with some transparency after symmetry Use correct transformation algorithm on the Part level. --- diff --git a/src/FeaturesPlugin/Test/TestSymmetry_Part.py b/src/FeaturesPlugin/Test/TestSymmetry_Part.py index e1853ee74..478bf3770 100644 --- a/src/FeaturesPlugin/Test/TestSymmetry_Part.py +++ b/src/FeaturesPlugin/Test/TestSymmetry_Part.py @@ -38,4 +38,4 @@ model.testNbSubShapes(Symmetry_3, GeomAPI_Shape.SOLID, [1, 1]) model.testNbSubShapes(Symmetry_3, GeomAPI_Shape.FACE, [6, 6]) model.testNbSubShapes(Symmetry_3, GeomAPI_Shape.EDGE, [24, 24]) model.testNbSubShapes(Symmetry_3, GeomAPI_Shape.VERTEX, [48, 48]) -model.testResultsVolumes(Symmetry_3, [-1000, 1000]) +model.testResultsVolumes(Symmetry_3, [1000, 1000]) diff --git a/src/Model/Model_ResultPart.cpp b/src/Model/Model_ResultPart.cpp index 01d7ef900..51d8879bd 100644 --- a/src/Model/Model_ResultPart.cpp +++ b/src/Model/Model_ResultPart.cpp @@ -36,6 +36,8 @@ #include +#include + #include #include @@ -197,12 +199,9 @@ std::shared_ptr Model_ResultPart::shape() ResultPtr anOrigResult = baseRef(); std::shared_ptr anOrigShape = anOrigResult->shape(); if (anOrigShape.get()) { - TopoDS_Shape aShape = anOrigShape->impl(); - if (!aShape.IsNull()) { - aShape.Move(*(myTrsf.get())); - myShape = aShape; - aResult->setImpl(new TopoDS_Shape(aShape)); - } + GeomTrsfPtr aTrsf = std::make_shared(new gp_Trsf(*myTrsf)); + GeomAlgoAPI_Transform aTransform(anOrigShape, aTrsf); + aResult = aTransform.shape(); } if (!myShape.IsNull() && aToSendUpdate) { static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED);