[Bugfix]Sketcher/Point-on-object: do not substitute constraint if conditions are not OK
This commit is contained in:
@@ -2649,15 +2649,10 @@ void CmdSketcherConstrainPointOnObject::applyConstraint(std::vector<SelIdPair> &
|
||||
return;
|
||||
}
|
||||
|
||||
if(substituteConstraintCombinations(Obj, GeoIdVt, PosIdVt, GeoIdCrv)) {
|
||||
commitCommand();
|
||||
tryAutoRecompute(Obj);
|
||||
return;
|
||||
}
|
||||
|
||||
if (allOK) {
|
||||
Gui::cmdAppObjectArgs(sketchgui->getObject(), "addConstraint(Sketcher.Constraint('PointOnObject',%d,%d,%d)) ",
|
||||
GeoIdVt, static_cast<int>(PosIdVt), GeoIdCrv);
|
||||
if (!substituteConstraintCombinations(Obj, GeoIdVt, PosIdVt, GeoIdCrv))
|
||||
Gui::cmdAppObjectArgs( sketchgui->getObject(), "addConstraint(Sketcher.Constraint('PointOnObject',%d,%d,%d)) ",
|
||||
GeoIdVt, static_cast<int>(PosIdVt), GeoIdCrv);
|
||||
|
||||
commitCommand();
|
||||
tryAutoRecompute(Obj);
|
||||
|
||||
Reference in New Issue
Block a user