]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1343 Improvement of Extrusion and Revolution operations: plane selection in OB.
authornds <nds@opencascade.com>
Tue, 22 Mar 2016 12:03:43 +0000 (15:03 +0300)
committerdbv <dbv@opencascade.com>
Fri, 25 Mar 2016 15:50:18 +0000 (18:50 +0300)
src/PartSet/PartSet_WidgetSketchLabel.cpp

index 4fdd0033ad52bb141add2d4904f151cb5eac6cfa..74697d45f95cbb6f5092aa4b5685aeff8a09b477 100644 (file)
@@ -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<GeomAPI_Face> aGeomFace;
     const TopoDS_Shape aShape = thePrs.shape();
-    if (aShape.ShapeType() == TopAbs_FACE) {
+    if (aShape.IsNull()) {
+      GeomShapePtr aGeomShape = aResult->shape();
+      std::shared_ptr<GeomAPI_Face> aGeomFace(new GeomAPI_Face(aGeomShape));
+      aCanFillSketch = aGeomFace.get() && aGeomFace->isPlanar();
+    }
+    else if (aShape.ShapeType() == TopAbs_FACE) {
       std::shared_ptr<GeomAPI_Face> aGeomFace(new GeomAPI_Face());
       aGeomFace->setImpl(new TopoDS_Shape(aShape));
       aCanFillSketch = aGeomFace.get() && aGeomFace->isPlanar();