From: nds Date: Thu, 16 Nov 2017 08:53:43 +0000 (+0300) Subject: Issue #2204 Display a sketch plane: construction plane - using the plane face in... X-Git-Tag: V_2.10.0RC~159 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5a4aba18295fb112b20b964c36071623b2990e4f;p=modules%2Fshaper.git Issue #2204 Display a sketch plane: construction plane - using the plane face in sketch preview. --- diff --git a/src/PartSet/PartSet_PreviewSketchPlane.cpp b/src/PartSet/PartSet_PreviewSketchPlane.cpp index 6de85edc7..9ef700df7 100644 --- a/src/PartSet/PartSet_PreviewSketchPlane.cpp +++ b/src/PartSet/PartSet_PreviewSketchPlane.cpp @@ -75,9 +75,13 @@ void PartSet_PreviewSketchPlane::createSketchPlane(const CompositeFeaturePtr& th // selected linear face parameters AttributeSelectionPtr aSelAttr = std::dynamic_pointer_cast (theSketch->data()->attribute(SketchPlugin_SketchEntity::EXTERNAL_ID())); - if (aSelAttr) + if (aSelAttr) { myShape = aSelAttr->value(); - + // this case is needed by constructing sketch on a plane, where result shape is equal + // to context result, therefore value() returns NULL and we should use shape of context. + if (!myShape.get() && aSelAttr->context().get()) + myShape = aSelAttr->context()->shape(); + } if (!myShape.get()) { // Create Preview for default planes std::shared_ptr anOrigin = std::dynamic_pointer_cast(