]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #19890: Shape displayed with some transparency after symmetry
authorArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Tue, 15 Sep 2020 12:51:09 +0000 (15:51 +0300)
committerArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Tue, 15 Sep 2020 12:51:09 +0000 (15:51 +0300)
Use correct transformation algorithm on the Part level.

src/FeaturesPlugin/Test/TestSymmetry_Part.py
src/Model/Model_ResultPart.cpp

index e1853ee74e9f481640bf5bd2d6d09d378b78b357..478bf3770564a20a0f446e7a1799729d6298d42e 100644 (file)
@@ -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])
index 01d7ef900e78482cef0e320e097372a5f39ce653..51d8879bd4265946b869c31db4ab0f4bd05ef60f 100644 (file)
@@ -36,6 +36,8 @@
 
 #include <GeomAPI_Trsf.h>
 
+#include <GeomAlgoAPI_Transform.h>
+
 #include <Locale_Convert.h>
 
 #include <TNaming_Tool.hxx>
@@ -197,12 +199,9 @@ std::shared_ptr<GeomAPI_Shape> Model_ResultPart::shape()
       ResultPtr anOrigResult = baseRef();
       std::shared_ptr<GeomAPI_Shape> anOrigShape = anOrigResult->shape();
       if (anOrigShape.get()) {
-        TopoDS_Shape aShape = anOrigShape->impl<TopoDS_Shape>();
-        if (!aShape.IsNull()) {
-          aShape.Move(*(myTrsf.get()));
-          myShape = aShape;
-          aResult->setImpl(new TopoDS_Shape(aShape));
-        }
+        GeomTrsfPtr aTrsf = std::make_shared<GeomAPI_Trsf>(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);