-// Copyright (C) 2014-2019 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
}
}
-SketchAPI_Projection::SketchAPI_Projection(
- const std::shared_ptr<ModelAPI_Feature> & theFeature,
- const std::string & theExternalName)
-: SketchAPI_SketchEntity(theFeature)
-{
- if (initialize()) {
- setByExternalName(theExternalName);
- }
-}
-
SketchAPI_Projection::~SketchAPI_Projection()
{
execute(true);
}
-void SketchAPI_Projection::setByExternalName(const std::string& theExternalName)
+void SketchAPI_Projection::setIncludeToResult(bool theKeepResult)
{
- setExternalFeature(ModelHighAPI_Selection("EDGE", theExternalName));
+ fillAttribute(theKeepResult, includeToResult());
+ execute(true);
}
-void SketchAPI_Projection::setIncludeToResult(bool theKeepResult)
+void SketchAPI_Projection::setKeepReferenceToOriginal(bool theKeepRefToOriginal)
{
- fillAttribute(theKeepResult, includeToResult());
+ // the Fixed constraint should be assigned explicitly
+ fillAttribute(false, feature()->boolean(SketchPlugin_Projection::MAKE_FIXED()));
+ fillAttribute(theKeepRefToOriginal ? "true" : "false",
+ feature()->string(SketchPlugin_Projection::KEEP_REFERENCE_ID()));
execute(true);
}