From: nds Date: Wed, 6 Apr 2016 10:47:06 +0000 (+0300) Subject: Issue #1343. Improvement of Extrusion and Revolution operations: compilation correction X-Git-Tag: V_2.3.0~294 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9bbbe88cc0ba2e6bc814fedf5cd0c5dd05a9dacc;p=modules%2Fshaper.git Issue #1343. Improvement of Extrusion and Revolution operations: compilation correction --- diff --git a/src/PartSet/PartSet_WidgetSketchLabel.cpp b/src/PartSet/PartSet_WidgetSketchLabel.cpp index 50d0308ec..8a45411db 100644 --- a/src/PartSet/PartSet_WidgetSketchLabel.cpp +++ b/src/PartSet/PartSet_WidgetSketchLabel.cpp @@ -359,17 +359,14 @@ bool PartSet_WidgetSketchLabel::canFillSketch(const ModuleBase_ViewerPrs& thePrs // check plane or planar face of any non-sketch object if (aCanFillSketch) { std::shared_ptr aGeomFace; - const TopoDS_Shape aShape = thePrs.shape(); - if (aShape.IsNull()) { - if (aResult.get()) { - GeomShapePtr aGeomShape = aResult->shape(); - std::shared_ptr aGeomFace(new GeomAPI_Face(aGeomShape)); - aCanFillSketch = aGeomFace.get() && aGeomFace->isPlanar(); - } + + GeomShapePtr aGeomShape = thePrs.shape(); + if ((!aGeomShape.get() || aGeomShape->isNull()) && aResult.get()) { + aGeomShape = aResult->shape(); } - else if (aShape.ShapeType() == TopAbs_FACE) { - std::shared_ptr aGeomFace(new GeomAPI_Face()); - aGeomFace->setImpl(new TopoDS_Shape(aShape)); + + if (aGeomShape.get() && aGeomShape->shapeType() == GeomAPI_Shape::FACE) { + std::shared_ptr aGeomFace(new GeomAPI_Face(aGeomShape)); aCanFillSketch = aGeomFace.get() && aGeomFace->isPlanar(); } else @@ -410,7 +407,7 @@ bool PartSet_WidgetSketchLabel::fillSketchPlaneBySelection(const FeaturePtr& the } else if (aShape.get() && !aShape->isNull()) { const TopoDS_Shape& aTDShape = aShape->impl(); - aDir = setSketchPlane(aTDShape); + aDir = setSketchPlane(theFeature, aTDShape); isOwnerSet = aDir.get(); } return isOwnerSet;