-// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <BRep_Tool.hxx>
#include <Precision.hxx>
-#include <AIS_Dimension.hxx>
+#include <PrsDim_Dimension.hxx>
namespace SketcherPrs_Tools {
std::shared_ptr<GeomAPI_Shape> getShape(ObjectPtr theObject)
{
ResultConstructionPtr aRes = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(theObject);
+ if (!aRes.get()) {
+ FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theObject);
+ if (aFeature.get())
+ aRes = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aFeature->lastResult());
+ }
if (aRes.get() != NULL && aRes->data()->isValid()) {
/// essential check as it is called in openGl thread
return aRes->shape();