std::dynamic_pointer_cast<GCS::Line>(aMirrorLine->entity());
std::list<GCSConstraintPtr> aConstrList;
- aConstrList.push_back(GCSConstraintPtr(new GCS::ConstraintPerpendicular(
- *(aPoint1->point()), *(aPoint2->point()), aLine->p1, aLine->p2)));
aConstrList.push_back(GCSConstraintPtr(new GCS::ConstraintMidpointOnLine(
*(aPoint1->point()), *(aPoint2->point()), aLine->p1, aLine->p2)));
+ aConstrList.push_back(GCSConstraintPtr(new GCS::ConstraintPerpendicular(
+ *(aPoint1->point()), *(aPoint2->point()), aLine->p1, aLine->p2)));
ConstraintWrapperPtr aSubResult(new PlaneGCSSolver_ConstraintWrapper(
theConstraint, aConstrList, CONSTRAINT_SYMMETRIC));
}
}
+ // Mirrored entities are placed out-of-group by default, due to they are copies.
+ // Place them into current group manually.
+ std::vector<EntityWrapperPtr>::iterator aMirIt = theMirrorEntities.begin();
+ for (; aMirIt != theMirrorEntities.end(); ++aMirIt)
+ (*aMirIt)->setGroup(myGroupID);
+
if (theBaseEntities.size() > theMirrorEntities.size())
myErrorMsg = SketchSolver_Error::NOT_INITIALIZED();
}
aMirConstrList.insert(aMirConstrList.end(), aNewConstraints.begin(), aNewConstraints.end());
}
- myStorage->addConstraint(myBaseConstraint, aMirConstrList);
// update mirrored features to be in the current group
for (aMIt = aMirrorList.begin(); aMIt != aMirrorList.end(); ++aMIt)
myStorage->update((*aMIt)->baseFeature(), myGroupID);
+ myStorage->addConstraint(myBaseConstraint, aMirConstrList);
}