//=================================================================================================
void FeaturesAPI_Recover::setBaseFeature(const ModelHighAPI_Reference& theBaseFeature)
{
- fillAttribute(theBaseFeature, mybaseFeature);
+
+ fillAttribute(theBaseFeature.feature(), mybaseFeature);
// do not need to execute because on attribute changed it does everything anyway
}
execute();
}
+//--------------------------------------------------------------------------------------
+std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Projection::createdFeature() const
+{
+ AttributeRefAttrPtr aProjectedRefAttr = projectedFeature();
+ FeaturePtr aProjectedFeature = ModelAPI_Feature::feature(aProjectedRefAttr->object());
+
+ return std::shared_ptr<ModelHighAPI_Interface>(new ModelHighAPI_Interface(aProjectedFeature));
+}
+
//--------------------------------------------------------------------------------------
void SketchAPI_Projection::dump(ModelHighAPI_Dumper& theDumper) const
theDumper << aBase << " = " << aSketchName << ".addProjection(" << anExternal << ")" << std::endl;
// dump "auxiliary" flag if necessary
SketchAPI_SketchEntity::dump(theDumper);
+
+ // Dump created line feature
+ AttributeRefAttrPtr aProjectedRefAttr = projectedFeature();
+ FeaturePtr aProjectedFeature = ModelAPI_Feature::feature(aProjectedRefAttr->object());
+ std::string aProjectedName = theDumper.name(aProjectedFeature, false);
+ theDumper << aProjectedName << " = " << theDumper.name(aBase) << ".createdFeature()" << std::endl;
}
SKETCHAPI_EXPORT
void setByExternalName(const std::string & theExternalName);
+ /// Returns created feature
+ SKETCHAPI_EXPORT
+ std::shared_ptr<ModelHighAPI_Interface> createdFeature() const;
+
/// Dump wrapped feature
SKETCHAPI_EXPORT
virtual void dump(ModelHighAPI_Dumper& theDumper) const;