}
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()));
#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()
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)
# 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)