]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fixed naming; Fixed UnitTestBox.py
authordbv <dbv@opencascade.com>
Thu, 7 Jul 2016 11:53:28 +0000 (14:53 +0300)
committerdbv <dbv@opencascade.com>
Thu, 7 Jul 2016 11:53:28 +0000 (14:53 +0300)
src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.cpp
src/PrimitivesPlugin/Test/UnitTestBox.py

index e8a372682ca278c676a25b58035ceed90b96890a..061529b7d5923af651b4110bcab41ffaf83889a4 100644 (file)
@@ -157,6 +157,11 @@ void GeomAlgoAPI_MakeShape::setShape(const std::shared_ptr<GeomAPI_Shape> theSha
     }
 
     const TopoDS_Shape& aTopoDSShape = myShape->impl<TopoDS_Shape>();
+    for(TopExp_Explorer anExp(aTopoDSShape,TopAbs_EDGE); anExp.More(); anExp.Next()) {
+      std::shared_ptr<GeomAPI_Shape> aCurrentShape(new GeomAPI_Shape());
+      aCurrentShape->setImpl(new TopoDS_Shape(anExp.Current()));
+      myMap->bind(aCurrentShape, aCurrentShape);
+    }
     for(TopExp_Explorer anExp(aTopoDSShape,TopAbs_FACE); anExp.More(); anExp.Next()) {
       std::shared_ptr<GeomAPI_Shape> aCurrentShape(new GeomAPI_Shape());
       aCurrentShape->setImpl(new TopoDS_Shape(anExp.Current()));
index 3245a09c6662e3824df37b736c5f9d48861267d7..ef63b01098246a956d326904e49e47c348317eef 100644 (file)
@@ -77,7 +77,7 @@ aPlaneTop.execute()
 #The face should be at 1.6, so the plane should be at 1.6 + 0.4 = 2.
 aRefPlaneTopLocation = 2.
 
-#location() is a method from GeomAPI_Face that returns a GeomAPI_Pnt, from which we can extract the z coordinate 
+#location() is a method from GeomAPI_Face that returns a GeomAPI_Pnt, from which we can extract the z coordinate
 aPlaneTopResult = aPlaneTop.firstResult()
 aPlaneTopFace = GeomAPI_Face(aPlaneTopResult.shape())
 aPlaneTestLocation = aPlaneTopFace.getPlane()
@@ -97,9 +97,11 @@ aPoint1 = aPart.addFeature("Point")
 aPoint2 = aPart.addFeature("Point")
 assert(aPoint1.getKind() == "Point")
 assert(aPoint2.getKind() == "Point")
+aPoint1.string("creation_method").setValue("by_xyz")
 aPoint1.real("x").setValue(2.0)
 aPoint1.real("y").setValue(2.0)
 aPoint1.real("z").setValue(2.0)
+aPoint2.string("creation_method").setValue("by_xyz")
 aPoint2.real("x").setValue(2.5)
 aPoint2.real("y").setValue(2.5)
 aPoint2.real("z").setValue(2.5)
@@ -119,7 +121,7 @@ aBoxBy2Pts.execute()
 
 # Check box volume
 aBoxResult2 = modelAPI_ResultBody(aBoxBy2Pts.firstResult())
-aRefVolume2 = 0.5 * 0.5 * 0.5 
+aRefVolume2 = 0.5 * 0.5 * 0.5
 aResVolume2 = GeomAlgoAPI_ShapeTools_volume(aBoxResult2.shape())
 assert (math.fabs(aResVolume2 - aRefVolume2) < 10 ** -5)