-// 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
#include <GeomDataAPI_Point2D.h>
#include <GeomAlgoAPI_ShapeTools.h>
+#include <Locale_Convert.h>
+
#include <ModelAPI_AttributeBoolean.h>
#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_AttributeRefAttr.h>
}
FeaturePtr SketchPlugin_Split::splitClosed(FeaturePtr& theSplitFeature,
- FeaturePtr& theBaseFeatureModified,
- FeaturePtr& theAfterFeature,
- std::set<AttributePoint2DPtr>& thePoints,
- std::set<FeaturePtr>& theCreatedFeatures,
+ FeaturePtr& theBaseFeatureModified,
+ FeaturePtr& /*theAfterFeature*/,
+ std::set<AttributePoint2DPtr>& thePoints,
+ std::set<FeaturePtr>& theCreatedFeatures,
std::set<std::pair<AttributePtr, AttributePtr>>& theModifiedAttributes)
{
FeaturePtr anNewFeature;
aRefsToParent.push_back(*aRef);
}
for (std::list<AttributePtr>::iterator aRef = aRefsToParent.begin();
- aRef != aRefsToParent.end(); ++aRef)
- std::dynamic_pointer_cast<ModelAPI_AttributeReference>(*aRef)->setValue(theSplitFeature);
+ aRef != aRefsToParent.end(); ++aRef) {
+ std::dynamic_pointer_cast<ModelAPI_AttributeReference>(*aRef)->setValue(
+ theBaseFeatureModified);
+
+ FeaturePtr anOwner = ModelAPI_Feature::feature((*aRef)->owner());
+ SketchPlugin_Tools::replaceInName(anOwner,
+ aBaseFeature->name(), theBaseFeatureModified->name());
+ SketchPlugin_Tools::replaceInName(anOwner->lastResult(),
+ aBaseFeature->name(), theBaseFeatureModified->name());
+ }
}
theCreatedFeatures.insert(theBaseFeatureModified);
void SketchPlugin_Split::arrangePointsOnLine(
const AttributePoint2DPtr& theStartPointAttr,
- const AttributePoint2DPtr& theEndPointAttr,
+ const AttributePoint2DPtr& /*theEndPointAttr*/,
AttributePoint2DPtr& theFirstPointAttr,
AttributePoint2DPtr& theLastPointAttr) const
{
void SketchPlugin_Split::arrangePointsOnArc(
const FeaturePtr& theArc,
const std::shared_ptr<GeomDataAPI_Point2D>& theStartPointAttr,
- const std::shared_ptr<GeomDataAPI_Point2D>& theEndPointAttr,
+ const std::shared_ptr<GeomDataAPI_Point2D>& /*theEndPointAttr*/,
std::shared_ptr<GeomDataAPI_Point2D>& theFirstPointAttr,
std::shared_ptr<GeomDataAPI_Point2D>& theSecondPointAttr) const
{
}
if (theFeature->data()->isValid())
- anInfo.append(theFeature->data()->name().c_str());
+ anInfo.append(Locale::Convert::toString(theFeature->data()->name()));
if (isUseAttributesInfo) {
std::string aPointsInfo = ModelGeomAlgo_Point2D::getPontAttributesInfo(theFeature,