From: nds Date: Tue, 22 Mar 2016 12:03:43 +0000 (+0300) Subject: Issue #1343 Improvement of Extrusion and Revolution operations: plane selection in OB. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=073fc3e933c4d6062fddb1c51789df100773e881;p=modules%2Fshaper.git Issue #1343 Improvement of Extrusion and Revolution operations: plane selection in OB. --- diff --git a/src/PartSet/PartSet_WidgetSketchLabel.cpp b/src/PartSet/PartSet_WidgetSketchLabel.cpp index 4fdd0033a..74697d45f 100644 --- a/src/PartSet/PartSet_WidgetSketchLabel.cpp +++ b/src/PartSet/PartSet_WidgetSketchLabel.cpp @@ -334,8 +334,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.ShapeType() == TopAbs_FACE) { + if (aShape.IsNull()) { + GeomShapePtr aGeomShape = aResult->shape(); + std::shared_ptr aGeomFace(new GeomAPI_Face(aGeomShape)); + aCanFillSketch = aGeomFace.get() && aGeomFace->isPlanar(); + } + else if (aShape.ShapeType() == TopAbs_FACE) { std::shared_ptr aGeomFace(new GeomAPI_Face()); aGeomFace->setImpl(new TopoDS_Shape(aShape)); aCanFillSketch = aGeomFace.get() && aGeomFace->isPlanar();