std::shared_ptr<GeomAPI_Shape> aGeomShape = aConstr->shape();
if (aGeomShape.get()) {
const TopoDS_Shape& aShape = aGeomShape->impl<TopoDS_Shape>();
- if (!aShape.IsNull() && aShape.ShapeType() != TopAbs_EDGE)
+ if (aShape.ShapeType() != TopAbs_EDGE)
anAuxiliaryResults.push_back(aConstr);
}
}
static const double tolerance = 1.e-7;
-static std::shared_ptr<GeomAPI_Edge> emptyEdge()
-{
- static std::shared_ptr<GeomAPI_Edge> anEdge(new GeomAPI_Edge);
- return anEdge;
-}
-
SketchPlugin_Projection::SketchPlugin_Projection()
: SketchPlugin_SketchEntity(),
myIsComputing(false)
if (!lastResult().get() && aProjection->lastResult().get()) {
ResultConstructionPtr aConstr = document()->createConstruction(data());
- aConstr->setShape(emptyEdge());
+ aConstr->setShape(aProjection->lastResult()->shape());
aConstr->setIsInHistory(false);
aConstr->setDisplayed(false);
setResult(aConstr);
selection(EXTERNAL_ID())->setValue(aExtFeature->context(), aExtFeature->context()->shape());
if (aResult) {
- aResult->setShape(emptyEdge());
+ aResult->setShape(aProjection->lastResult()->shape());
setResult(aResult);
aProjection->selection(EXTERNAL_ID())->setValue(lastResult(), lastResult()->shape());
}
virtual bool isFixed()
{ return true; }
+ /// Returns true if object must be displayed in the viewer
+ virtual bool isDisplayed()
+ { return false; }
+
/// Creates a new part document if needed
SKETCHPLUGIN_EXPORT virtual void execute();