From: nds Date: Wed, 31 Aug 2016 12:37:59 +0000 (+0300) Subject: Issue #1664 In the Sketcher, add the function Split a segment - correction of constra... X-Git-Tag: V_2.5.0~97 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0b0fa91e0ed2bddc8f6b990ab6086a80e90e9ddb;p=modules%2Fshaper.git Issue #1664 In the Sketcher, add the function Split a segment - correction of constraints built to the point attributes of the split object --- diff --git a/src/SketchPlugin/SketchPlugin_ConstraintSplit.cpp b/src/SketchPlugin/SketchPlugin_ConstraintSplit.cpp index 2647f986b..05eb84265 100755 --- a/src/SketchPlugin/SketchPlugin_ConstraintSplit.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintSplit.cpp @@ -62,10 +62,10 @@ void SketchPlugin_ConstraintSplit::execute() setError("Error: Base object is not initialized."); return; } - AttributePoint2DPtr aFirstPointAttr = getPointOfRefAttr(aData->attribute(SketchPlugin_Constraint::ENTITY_A())); - AttributePoint2DPtr aSecondPointAttr = getPointOfRefAttr(aData->attribute(SketchPlugin_Constraint::ENTITY_B())); - if (!aFirstPointAttr.get() || !aFirstPointAttr->isInitialized() || - !aSecondPointAttr.get() || !aSecondPointAttr->isInitialized()) { + AttributePoint2DPtr aFirstPointAttrOfSplit = getPointOfRefAttr(aData->attribute(SketchPlugin_Constraint::ENTITY_A())); + AttributePoint2DPtr aSecondPointAttrOfSplit = getPointOfRefAttr(aData->attribute(SketchPlugin_Constraint::ENTITY_B())); + if (!aFirstPointAttrOfSplit.get() || !aFirstPointAttrOfSplit->isInitialized() || + !aSecondPointAttrOfSplit.get() || !aSecondPointAttrOfSplit->isInitialized()) { setError("Error: Sub-shape is not initialized."); return; } @@ -84,8 +84,8 @@ void SketchPlugin_ConstraintSplit::execute() std::set aFeaturesToDelete; std::map aTangentFeatures; std::map aCoincidenceToFeature; - std::map aCoincidenceToPoint; - getConstraints(aFeaturesToDelete, aTangentFeatures, aCoincidenceToFeature, aCoincidenceToPoint); + //std::map aCoincidenceToPoint; + getConstraints(aFeaturesToDelete, aTangentFeatures, aCoincidenceToFeature);//, aCoincidenceToPoint); std::map > aBaseRefAttributes; getRefAttributes(aBaseFeature, aBaseRefAttributes); @@ -139,7 +139,7 @@ void SketchPlugin_ConstraintSplit::execute() } } - if (!aCoincidenceToPoint.empty()) { + /*if (!aCoincidenceToPoint.empty()) { std::cout << std::endl; std::cout << "Coincidences to points on base feature[" << aCoincidenceToPoint.size() << "]: " << std::endl; std::map::const_iterator anIt = aCoincidenceToPoint.begin(), @@ -153,10 +153,10 @@ void SketchPlugin_ConstraintSplit::execute() std::cout << " -Attribute to correct:" << anAttributeId << std::endl; std::cout << " -Point attribute:" << ModelGeomAlgo_Point2D::getPointAttributeInfo(aPointAttr) << std::endl; } - } + }*/ std::map >::const_iterator aRefIt = aBaseRefAttributes.begin(), aRefLast = aBaseRefAttributes.end(); - std::cout << "References to bound point of feature [" << aBaseRefAttributes.size() << "]" <first; std::list aRefAttributes = aRefIt->second; @@ -164,15 +164,16 @@ void SketchPlugin_ConstraintSplit::execute() std::list::const_iterator aRefAttrIt = aRefAttributes.begin(), aRefAttrLast = aRefAttributes.end(); for (; aRefAttrIt != aRefAttrLast; aRefAttrIt++) { + if (!aRefsInfo.empty()) + aRefsInfo.append("\n"); AttributePtr aRAttr = *aRefAttrIt; aRefsInfo.append(aRAttr->id()); FeaturePtr aRFeature = ModelAPI_Feature::feature(aRAttr->owner()); aRefsInfo.append("(" + aRFeature->name() + ") "); } - std::shared_ptr aPointAttr = std::dynamic_pointer_cast(aBaseAttr); std::cout << " -Point attribute:" << aPointAttr->id().c_str() - << "[" << aRefAttributes.size() << "]" << aRefsInfo << std::endl; + << "[" << aRefAttributes.size() << "] " < aFurtherCoincidences; std::set aCreatedFeatures; + std::set> aModifiedAttributes; if (aFeatureKind == SketchPlugin_Line::ID()) - splitLine(aSplitFeature, aBaseFeature, anAfterFeature, aFurtherCoincidences, aCreatedFeatures); + splitLine(aSplitFeature, aBaseFeature, anAfterFeature, aFurtherCoincidences, aCreatedFeatures, + aModifiedAttributes); else if (aFeatureKind == SketchPlugin_Arc::ID()) - splitArc(aSplitFeature, aBaseFeature, anAfterFeature, aFurtherCoincidences, aCreatedFeatures); + splitArc(aSplitFeature, aBaseFeature, anAfterFeature, aFurtherCoincidences, aCreatedFeatures, + aModifiedAttributes); if (aFeatureKind == SketchPlugin_Circle::ID()) { FeaturePtr aCircleFeature = aBaseFeature; - splitCircle(aSplitFeature, aBaseFeature, anAfterFeature, aFurtherCoincidences, aCreatedFeatures); + splitCircle(aSplitFeature, aBaseFeature, anAfterFeature, aFurtherCoincidences, aCreatedFeatures, + aModifiedAttributes); aFeaturesToDelete.insert(aCircleFeature); aBaseObjectAttr->setObject(ResultPtr()); // as circle is removed, temporary fill this attribute } @@ -219,6 +224,30 @@ void SketchPlugin_ConstraintSplit::execute() std::cout << ModelGeomAlgo_Point2D::getPointAttributeInfo(anAttribute) << " [" << getFeatureInfo(aFeature, false) << "]" << std::endl; } + + std::cout << "Modifed attributes (constraints to attributes are moved here):" << std::endl; + std::set >::const_iterator aPIt = aModifiedAttributes.begin(), + aPLast = aModifiedAttributes.end(); + std::string aResInfo; + for (; aPIt != aPLast; aPIt++) { + if (!aResInfo.empty()) + aResInfo += "\n"; + + std::pair aPair = *aPIt; + + AttributePtr anAttr = aPair.first; + aResInfo.append(anAttr->id()); + FeaturePtr aFeature = ModelAPI_Feature::feature(anAttr->owner()); + aResInfo.append("(" + aFeature->name() + ") "); + + aResInfo.append(" - is modified to - "); + + anAttr = aPair.second; + aResInfo.append(anAttr->id()); + aFeature = ModelAPI_Feature::feature(anAttr->owner()); + aResInfo.append("(" + aFeature->name() + ") "); + } + std::cout << aResInfo << std::endl; #endif std::set aFeatureResults; @@ -230,11 +259,13 @@ void SketchPlugin_ConstraintSplit::execute() updateCoincidenceConstraintsToFeature(aCoincidenceToFeature, aFurtherCoincidences, aFeatureResults); // coincidence to points - updateCoincidenceConstraintsToFeature(aCoincidenceToPoint, aFurtherCoincidences, - std::set()); + //updateCoincidenceConstraintsToFeature(aCoincidenceToPoint, aFurtherCoincidences, + // std::set()); // tangency updateTangentConstraintsToFeature(aTangentFeatures, aFurtherCoincidences); + updateRefAttConstraints(aBaseRefAttributes, aModifiedAttributes); + // delete constraints #ifdef DEBUG_SPLIT std::cout << "remove features and references:" << std::endl; @@ -310,8 +341,8 @@ void SketchPlugin_ConstraintSplit::getFeaturePoints(AttributePoint2DPtr& theStar void SketchPlugin_ConstraintSplit::getConstraints(std::set& theFeaturesToDelete, std::map& theTangentFeatures, - std::map& theCoincidenceToFeature, - std::map& theCoincidenceToPoint) + std::map& theCoincidenceToFeature/*, + std::map& theCoincidenceToPoint*/) { std::shared_ptr aData = data(); @@ -408,9 +439,9 @@ void SketchPlugin_ConstraintSplit::getConstraints(std::set& theFeatu if (isToFeature) theCoincidenceToFeature[aRefFeature] = std::make_pair(anAttributeToBeModified, aCoincidentPoint); - else - theCoincidenceToPoint[aRefFeature] = std::make_pair(anAttributeToBeModified, - aCoincidentPoint); + //else + //theCoincidenceToPoint[aRefFeature] = std::make_pair(anAttributeToBeModified, + // aCoincidentPoint); } else theFeaturesToDelete.insert(aRefFeature); /// this case should not happen @@ -544,11 +575,45 @@ void SketchPlugin_ConstraintSplit::updateTangentConstraintsToFeature( } } +void SketchPlugin_ConstraintSplit::updateRefAttConstraints( + const std::map >& theBaseRefAttributes, + const std::set >& theModifiedAttributes) +{ +#ifdef DEBUG_SPLIT + std::cout << "SketchPlugin_ConstraintSplit::updateRefAttConstraints" << std::endl; +#endif + + std::set >::const_iterator anIt = theModifiedAttributes.begin(), + aLast = theModifiedAttributes.end(); + for (; anIt != aLast; anIt++) { + AttributePtr anAttribute = anIt->first; + + if (theBaseRefAttributes.find(anAttribute) == theBaseRefAttributes.end()) /// not found in references + continue; + std::list aRefAttributes = theBaseRefAttributes.at(anAttribute); + std::list::const_iterator aRefIt = aRefAttributes.begin(), + aRLast = aRefAttributes.end(); + + AttributePtr aNewAttribute = anIt->second; + for (; aRefIt != aRLast; aRefIt++) { + AttributeRefAttrPtr aRefAttr = std::dynamic_pointer_cast(*aRefIt); + if (aRefAttr.get()) { + aRefAttr->setAttr(aNewAttribute); +#ifdef DEBUG_SPLIT + FeaturePtr aFeature = ModelAPI_Feature::feature(aRefAttr->owner()); + std::cout << " -" << getFeatureInfo(aFeature) << std::endl; +#endif + } + } + } +} + void SketchPlugin_ConstraintSplit::splitLine(FeaturePtr& theSplitFeature, FeaturePtr& theBaseFeatureModified, FeaturePtr& theAfterFeature, std::set& thePoints, - std::set& theCreatedFeatures) + std::set& theCreatedFeatures, + std::set>& theModifiedAttributes) { std::set aCreatedFeatures; FeaturePtr aConstraintFeature; @@ -565,38 +630,44 @@ void SketchPlugin_ConstraintSplit::splitLine(FeaturePtr& theSplitFeature, if (aFeatureKind != SketchPlugin_Line::ID()) return; - AttributePoint2DPtr aFirstPointAttr = getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_A())); - AttributePoint2DPtr aSecondPointAttr = getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_B())); - AttributePoint2DPtr aStartPointAttr, anEndPointAttr; - getFeaturePoints(aStartPointAttr, anEndPointAttr); - if (!aStartPointAttr.get() && !anEndPointAttr.get()) { + AttributePoint2DPtr aFirstPointAttrOfSplit = getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_A())); + AttributePoint2DPtr aSecondPointAttrOfSplit = getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_B())); + AttributePoint2DPtr aStartPointAttrOfBase, anEndPointAttrOfBase; + getFeaturePoints(aStartPointAttrOfBase, anEndPointAttrOfBase); + if (!aStartPointAttrOfBase.get() && !anEndPointAttrOfBase.get()) { setError("Error: Feature has no start and end points."); return; } - arrangePoints(aStartPointAttr, anEndPointAttr, aFirstPointAttr, aSecondPointAttr); + arrangePoints(aStartPointAttrOfBase, anEndPointAttrOfBase, aFirstPointAttrOfSplit, aSecondPointAttrOfSplit); - /// split feature - theSplitFeature = createLineFeature(aBaseFeature, aFirstPointAttr, aSecondPointAttr); + /// create a split feature + theSplitFeature = createLineFeature(aBaseFeature, aFirstPointAttrOfSplit, aSecondPointAttrOfSplit); theCreatedFeatures.insert(theSplitFeature); // before split feature - if (!aStartPointAttr->pnt()->isEqual(aFirstPointAttr->pnt())) { + if (aStartPointAttrOfBase->pnt()->isEqual(aFirstPointAttrOfSplit->pnt())) { + theModifiedAttributes.insert(std::make_pair(aStartPointAttrOfBase, + theSplitFeature->attribute(SketchPlugin_Line::START_ID()))); + } + else { theBaseFeatureModified = aBaseFeature; ///< use base feature to store all constraints here /// move end arc point to start of split } // after split feature - if (!aSecondPointAttr->pnt()->isEqual(anEndPointAttr->pnt())) { + if (!aSecondPointAttrOfSplit->pnt()->isEqual(anEndPointAttrOfBase->pnt())) { FeaturePtr aFeature; if (!theBaseFeatureModified.get()) { aFeature = aBaseFeature; ///< use base feature to store all constraints here - fillAttribute(aFeature->attribute(SketchPlugin_Line::START_ID()), aSecondPointAttr); + fillAttribute(aFeature->attribute(SketchPlugin_Line::START_ID()), aSecondPointAttrOfSplit); aFeature->execute(); // to update result } else { - aFeature = createLineFeature(aBaseFeature, aSecondPointAttr, anEndPointAttr); + aFeature = createLineFeature(aBaseFeature, aSecondPointAttrOfSplit, anEndPointAttrOfBase); theCreatedFeatures.insert(aFeature); + theModifiedAttributes.insert(std::make_pair(anEndPointAttrOfBase, + aFeature->attribute(SketchPlugin_Line::END_ID()))); } aConstraintFeature = createConstraint(SketchPlugin_ConstraintCoincidence::ID(), theSplitFeature->attribute(SketchPlugin_Line::END_ID()), @@ -613,16 +684,18 @@ void SketchPlugin_ConstraintSplit::splitLine(FeaturePtr& theSplitFeature, else theAfterFeature = aFeature; } - else + else { thePoints.insert(std::dynamic_pointer_cast (theSplitFeature->attribute(SketchPlugin_Line::END_ID()))); - + theModifiedAttributes.insert(std::make_pair(anEndPointAttrOfBase, + theSplitFeature->attribute(SketchPlugin_Line::END_ID()))); + } // base split, that is defined before split feature should be changed at end // (after the after feature creation). Otherwise modified value will be used in after feature // before split feature - if (!aStartPointAttr->pnt()->isEqual(aFirstPointAttr->pnt())) { + if (!aStartPointAttrOfBase->pnt()->isEqual(aFirstPointAttrOfSplit->pnt())) { /// move end arc point to start of split - fillAttribute(theBaseFeatureModified->attribute(SketchPlugin_Line::END_ID()), aFirstPointAttr); + fillAttribute(theBaseFeatureModified->attribute(SketchPlugin_Line::END_ID()), aFirstPointAttrOfSplit); theBaseFeatureModified->execute(); // to update result aConstraintFeature = createConstraint(SketchPlugin_ConstraintCoincidence::ID(), theBaseFeatureModified->attribute(SketchPlugin_Line::END_ID()), @@ -655,7 +728,8 @@ void SketchPlugin_ConstraintSplit::splitArc(FeaturePtr& theSplitFeature, FeaturePtr& theBaseFeatureModified, FeaturePtr& theAfterFeature, std::set& thePoints, - std::set& theCreatedFeatures) + std::set& theCreatedFeatures, + std::set>& theModifiedAttributes) { std::set aCreatedFeatures; FeaturePtr aConstraintFeature; @@ -672,38 +746,44 @@ void SketchPlugin_ConstraintSplit::splitArc(FeaturePtr& theSplitFeature, if (aFeatureKind != SketchPlugin_Arc::ID()) return; - AttributePoint2DPtr aFirstPointAttr = getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_A())); - AttributePoint2DPtr aSecondPointAttr = getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_B())); - AttributePoint2DPtr aStartPointAttr, anEndPointAttr; - getFeaturePoints(aStartPointAttr, anEndPointAttr); - if (!aStartPointAttr.get() && !anEndPointAttr.get()) { + AttributePoint2DPtr aFirstPointAttrOfSplit = getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_A())); + AttributePoint2DPtr aSecondPointAttrOfSplit = getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_B())); + AttributePoint2DPtr aStartPointAttrOfBase, anEndPointAttrOfBase; + getFeaturePoints(aStartPointAttrOfBase, anEndPointAttrOfBase); + if (!aStartPointAttrOfBase.get() && !anEndPointAttrOfBase.get()) { setError("Error: Feature has no start and end points."); return; } - arrangePoints(aStartPointAttr, anEndPointAttr, aFirstPointAttr, aSecondPointAttr); + arrangePoints(aStartPointAttrOfBase, anEndPointAttrOfBase, aFirstPointAttrOfSplit, aSecondPointAttrOfSplit); /// split feature - theSplitFeature = createArcFeature(aBaseFeature, aFirstPointAttr, aSecondPointAttr); + theSplitFeature = createArcFeature(aBaseFeature, aFirstPointAttrOfSplit, aSecondPointAttrOfSplit); theCreatedFeatures.insert(theSplitFeature); // before split feature - if (!aStartPointAttr->pnt()->isEqual(aFirstPointAttr->pnt())) { + if (aStartPointAttrOfBase->pnt()->isEqual(aFirstPointAttrOfSplit->pnt())) { + theModifiedAttributes.insert(std::make_pair(aStartPointAttrOfBase, + theSplitFeature->attribute(SketchPlugin_Arc::START_ID()))); + } + else { theBaseFeatureModified = aBaseFeature; ///< use base feature to store all constraints here /// move end arc point to start of split } // after split feature - if (!aSecondPointAttr->pnt()->isEqual(anEndPointAttr->pnt())) { + if (!aSecondPointAttrOfSplit->pnt()->isEqual(anEndPointAttrOfBase->pnt())) { FeaturePtr aFeature; if (!theBaseFeatureModified.get()) { aFeature = aBaseFeature; ///< use base feature to store all constraints here - fillAttribute(aFeature->attribute(SketchPlugin_Arc::START_ID()), aSecondPointAttr); + fillAttribute(aFeature->attribute(SketchPlugin_Arc::START_ID()), aSecondPointAttrOfSplit); aFeature->execute(); // to update result } else { - aFeature = createArcFeature(aBaseFeature, aSecondPointAttr, anEndPointAttr); + aFeature = createArcFeature(aBaseFeature, aSecondPointAttrOfSplit, anEndPointAttrOfBase); theCreatedFeatures.insert(aFeature); + theModifiedAttributes.insert(std::make_pair(anEndPointAttrOfBase, + aFeature->attribute(SketchPlugin_Arc::END_ID()))); } aConstraintFeature = createConstraint(SketchPlugin_ConstraintCoincidence::ID(), theSplitFeature->attribute(SketchPlugin_Arc::END_ID()), @@ -720,16 +800,18 @@ void SketchPlugin_ConstraintSplit::splitArc(FeaturePtr& theSplitFeature, else theAfterFeature = aFeature; } - else + else { thePoints.insert(std::dynamic_pointer_cast (theSplitFeature->attribute(SketchPlugin_Arc::END_ID()))); - + theModifiedAttributes.insert(std::make_pair(anEndPointAttrOfBase, + theSplitFeature->attribute(SketchPlugin_Arc::END_ID()))); + } // base split, that is defined before split feature should be changed at end // (after the after feature creation). Otherwise modified value will be used in after feature // before split feature - if (!aStartPointAttr->pnt()->isEqual(aFirstPointAttr->pnt())) { + if (!aStartPointAttrOfBase->pnt()->isEqual(aFirstPointAttrOfSplit->pnt())) { /// move end arc point to start of split - fillAttribute(theBaseFeatureModified->attribute(SketchPlugin_Arc::END_ID()), aFirstPointAttr); + fillAttribute(theBaseFeatureModified->attribute(SketchPlugin_Arc::END_ID()), aFirstPointAttrOfSplit); theBaseFeatureModified->execute(); // to update result aConstraintFeature = createConstraint(SketchPlugin_ConstraintCoincidence::ID(), theBaseFeatureModified->attribute(SketchPlugin_Arc::END_ID()), @@ -770,7 +852,8 @@ void SketchPlugin_ConstraintSplit::splitCircle(FeaturePtr& theSplitFeature, FeaturePtr& theBaseFeatureModified, FeaturePtr& theAfterFeature, std::set& thePoints, - std::set& theCreatedFeatures) + std::set& theCreatedFeatures, + std::set>& theModifiedAttributes) { std::set aCreatedFeatures; FeaturePtr aConstraintFeature; @@ -787,18 +870,22 @@ void SketchPlugin_ConstraintSplit::splitCircle(FeaturePtr& theSplitFeature, if (aFeatureKind != SketchPlugin_Circle::ID()) return; - AttributePoint2DPtr aFirstPointAttr = getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_A())); - AttributePoint2DPtr aSecondPointAttr = getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_B())); + AttributePoint2DPtr aFirstPointAttrOfSplit = getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_A())); + AttributePoint2DPtr aSecondPointAttrOfSplit = getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_B())); /// split feature - theSplitFeature = createArcFeature(aBaseFeature, aFirstPointAttr, aSecondPointAttr); + theSplitFeature = createArcFeature(aBaseFeature, aFirstPointAttrOfSplit, aSecondPointAttrOfSplit); bool aSplitReversed = std::dynamic_pointer_cast(theSplitFeature)->isReversed(); theCreatedFeatures.insert(theSplitFeature); /// base feature is a left part of the circle - theBaseFeatureModified = createArcFeature(aBaseFeature, aFirstPointAttr, aSecondPointAttr); + theBaseFeatureModified = createArcFeature(aBaseFeature, aFirstPointAttrOfSplit, aSecondPointAttrOfSplit); std::dynamic_pointer_cast(theBaseFeatureModified)->setReversed(!aSplitReversed); theBaseFeatureModified->execute(); + + theModifiedAttributes.insert(std::make_pair(aBaseFeature->attribute(SketchPlugin_Circle::CENTER_ID()), + theBaseFeatureModified->attribute(SketchPlugin_Arc::CENTER_ID()))); + theCreatedFeatures.insert(theBaseFeatureModified); thePoints.insert(std::dynamic_pointer_cast diff --git a/src/SketchPlugin/SketchPlugin_ConstraintSplit.h b/src/SketchPlugin/SketchPlugin_ConstraintSplit.h index bd602854c..6555d79c0 100755 --- a/src/SketchPlugin/SketchPlugin_ConstraintSplit.h +++ b/src/SketchPlugin/SketchPlugin_ConstraintSplit.h @@ -106,8 +106,8 @@ private: /// \param theCoincidenceToPoint [out] coincidence to point be connected to new feature void getConstraints(std::set>& theFeaturesToDelete, std::map, IdToPointPair>& theTangentFeatures, - std::map, IdToPointPair>& theCoincidenceToFeature, - std::map, IdToPointPair>& theCoincidenceToPoint); + std::map, IdToPointPair>& theCoincidenceToFeature/*, + std::map, IdToPointPair>& theCoincidenceToPoint*/); void getRefAttributes(const FeaturePtr& theFeature, std::map >& theRefs); @@ -128,17 +128,27 @@ private: const std::map, IdToPointPair>& theTangentFeatures, const std::set >& theFurtherCoincidences); + /// Move constraints from attribute of base feature to attribute after modification + /// \param theBaseRefAttributes container of references to the attributes of base feature + /// \param theModifiedAttributes container of attributes placed instead of base attributes + /// at the same place + void updateRefAttConstraints( + const std::map >& theBaseRefAttributes, + const std::set >& theModifiedAttributes); + /// Make the base object is splitted by the point attributes /// \param theSplitFeature a result split feature /// \param theBeforeFeature a feature between start point and the 1st point of split feature /// \param theAfterFeature a feature between last point of split feature and the end point /// \param thePoints a list of points where coincidences will be build /// \param theCreatedFeatures a container of created features + /// \param theModifiedAttributes a container of attribute on base feature to attribute on new feature void splitLine(std::shared_ptr& theSplitFeature, std::shared_ptr& theBeforeFeature, std::shared_ptr& theAfterFeature, std::set >& thePoints, - std::set>& theCreatedFeatures); + std::set>& theCreatedFeatures, + std::set>& theModifiedAttributes); /// Make the base object is splitted by the point attributes /// \param theSplitFeature a result split feature @@ -150,7 +160,8 @@ private: std::shared_ptr& theBeforeFeature, std::shared_ptr& theAfterFeature, std::set >& thePoints, - std::set>& theCreatedFeatures); + std::set>& theCreatedFeatures, + std::set>& theModifiedAttributes); /// Make the base object is splitted by the point attributes /// \param theSplitFeature a result split feature @@ -162,7 +173,8 @@ private: std::shared_ptr& theBeforeFeature, std::shared_ptr& theAfterFeature, std::set >& thePoints, - std::set>& theCreatedFeatures); + std::set>& theCreatedFeatures, + std::set>& theModifiedAttributes); /// Correct the first and the second point to provide condition that the first is closer to /// the start point and the second point - to the last end of current segment. To rearrange