// extract feature from the group
if (theFeature->baseAttribute())
myStorage->update(theFeature->baseAttribute(), GID_OUTOFGROUP);
- else
+ else if (theFeature->baseFeature())
myStorage->update(theFeature->baseFeature(), GID_OUTOFGROUP);
+
+ if (myBaseConstraint)
+ myStorage->addConstraint(myBaseConstraint, std::list<ConstraintWrapperPtr>());
}
void SketchSolver_ConstraintFixed::getAttributes(
EntityWrapperPtr aSolverEntity;
if (myBaseFeature) {
// The feature is fixed.
- myStorage->update(myBaseFeature, myGroupID);
+ myStorage->update(myBaseFeature/*, myGroupID*/);
aSolverEntity = myStorage->entity(myBaseFeature);
} else if (myBaseConstraint) {
// Constraint Fixed is added by user.
cleanErrorMsg();
// Move fixed entities back to the current group
FeaturePtr aFeature = myBaseFeature;
- if (myBaseConstraint && myFixedAttribute && myFixedAttribute->isObject())
- aFeature = ModelAPI_Feature::feature(myFixedAttribute->object());
+ if (myBaseConstraint && myFixedAttribute) {
+ if (myFixedAttribute->isObject())
+ aFeature = ModelAPI_Feature::feature(myFixedAttribute->object());
+ else {
+ if (myFixedAttribute->attr().get())
+ myStorage->update(AttributePtr(myFixedAttribute), myGroupID);
+ }
+ }
if (aFeature)
myStorage->update(aFeature, myGroupID);