Sketcher: Trim bug

==================

Trim tool fails to generate coincidence upon trimming an arc of ellipse at the end of the arc.

https://forum.freecadweb.org/viewtopic.php?f=3&t=31594&start=50#p266765
This commit is contained in:
Abdullah Tahiri
2018-11-04 09:15:40 +01:00
committed by Yorik van Havre
parent 20faec46ec
commit eac4352b75

View File

@@ -2534,7 +2534,19 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
delConstraintOnPoint(GeoId, end, false);
Part::GeomArcOfEllipse *aoe1 = static_cast<Part::GeomArcOfEllipse*>(geomlist[GeoId]);
aoe1->setRange(startAngle, startAngle + theta1, /*emulateCCW=*/true);
Sketcher::Constraint *newConstr = new Sketcher::Constraint();
newConstr->Type = constrType;
newConstr->First = GeoId;
newConstr->FirstPos = end;
newConstr->Second = GeoId1;
if (constrType == Sketcher::Coincident)
newConstr->SecondPos = secondPos;
addConstraint(newConstr);
delete newConstr;
if(noRecomputes) // if we do not have a recompute, the sketch must be solved to update the DoF of the solver
solve();
return 0;