#include <PlaneGCSSolver_PointWrapper.h>
#include <GeomDataAPI_Point2D.h>
+#include <SketchPlugin_SketchEntity.h>
#include <cmath>
std::vector<EntityWrapperPtr>& theAttributes)
{
if (myBaseFeature) {
+ // if the feature is copy, do not move it
+ std::shared_ptr<SketchPlugin_SketchEntity> aSketchFeature =
+ std::dynamic_pointer_cast<SketchPlugin_SketchEntity>(myBaseFeature);
+ if (aSketchFeature && aSketchFeature->isCopy()) {
+ myStorage->setNeedToResolve(true);
+ return;
+ }
+
// The feature is fixed.
EntityWrapperPtr aSolverEntity = getChangedEntity(myBaseFeature, myStorage);
myStorage->update(myBaseFeature);
void SketchSolver_ConstraintMirror::update()
{
cleanErrorMsg();
- remove();
- process();
+ adjustConstraint();
}
void SketchSolver_ConstraintMirror::adjustConstraint()
for (; anIt != myFeatures.end(); ++anIt)
(*anIt)->data()->blockSendAttributeUpdated(isBlocked);
+ AttributeRefListPtr aMirroredRefList =
+ myBaseConstraint->reflist(SketchPlugin_Constraint::ENTITY_C());
+ std::list<ObjectPtr> aMirroredList = aMirroredRefList->list();
+ std::list<ObjectPtr>::iterator aMIt = aMirroredList.begin();
+ for (; aMIt != aMirroredList.end(); ++aMIt) {
+ FeaturePtr aMirrored = ModelAPI_Feature::feature(*aMIt);
+ aMirrored->data()->blockSendAttributeUpdated(isBlocked);
+ }
+
+
SketchSolver_Constraint::blockEvents(isBlocked);
}