- GroupIndexer::REMOVE_GROUP(myID);
-}
-
-// ============================================================================
-// Function: isBaseWorkplane
-// Class: SketchSolver_Group
-// Purpose: verify the group is based on the given workplane
-// ============================================================================
-bool SketchSolver_Group::isBaseWorkplane(CompositeFeaturePtr theWorkplane) const
-{
- return theWorkplane == mySketch;
-}
-
-// ============================================================================
-// Function: isInteract
-// Class: SketchSolver_Group
-// Purpose: verify are there any entities in the group used by given constraint
-// ============================================================================
-bool SketchSolver_Group::isInteract(
- std::shared_ptr<SketchPlugin_Feature> theFeature) const
-{
- // Empty group interacts with everything
- if (isEmpty()) return true;
- ConstraintPtr aConstraint = std::dynamic_pointer_cast<SketchPlugin_Constraint>(theFeature);
- if (aConstraint)
- return myFeatureStorage->isInteract(aConstraint);
- return myFeatureStorage->isInteract(std::dynamic_pointer_cast<ModelAPI_Feature>(theFeature));
-}
-
-// ============================================================================
-// Function: getFeatureId
-// Class: SketchSolver_Group
-// Purpose: Find the identifier of the feature, if it already exists in the group
-// ============================================================================
-Slvs_hEntity SketchSolver_Group::getFeatureId(FeaturePtr theFeature) const
-{
- Slvs_hEntity aResult = SLVS_E_UNKNOWN;
- if (!myFeatureStorage)
- return aResult;
- std::set<ConstraintPtr> aConstraints = myFeatureStorage->getConstraints(theFeature);
- if (aConstraints.empty())
- return aResult;
- std::set<ConstraintPtr>::iterator aConstrIter = aConstraints.begin();
- for (; aConstrIter != aConstraints.end(); aConstrIter++) {
- ConstraintConstraintMap::const_iterator aCIter = myConstraints.find(*aConstrIter);
- if (aCIter == myConstraints.end())
- continue;
- aResult = aCIter->second->getId(theFeature);
- if (aResult != SLVS_E_UNKNOWN)
- return aResult;
- }
- return SLVS_E_UNKNOWN;
-}
-
-// ============================================================================
-// Function: getAttributeId
-// Class: SketchSolver_Group
-// Purpose: Find the identifier of the attribute, if it already exists in the group
-// ============================================================================
-Slvs_hEntity SketchSolver_Group::getAttributeId(AttributePtr theAttribute) const
-{
- Slvs_hEntity aResult = SLVS_E_UNKNOWN;
- if (!myFeatureStorage)
- return aResult;
- std::set<ConstraintPtr> aConstraints = myFeatureStorage->getConstraints(theAttribute);
- if (aConstraints.empty())
- return aResult;
- std::set<ConstraintPtr>::iterator aConstrIter = aConstraints.begin();
- for (; aConstrIter != aConstraints.end(); aConstrIter++) {
- ConstraintConstraintMap::const_iterator aCIter = myConstraints.find(*aConstrIter);
- if (aCIter == myConstraints.end())
- continue;
- aResult = aCIter->second->getId(theAttribute);
- if (aResult != SLVS_E_UNKNOWN)
- return aResult;