From f16556647b6c2ea6bcd5c5cdb9d97941b65729db Mon Sep 17 00:00:00 2001 From: Ajinkya Dahale Date: Sat, 23 Nov 2024 19:02:19 +0530 Subject: [PATCH] [Sketcher] Remove some commented code from `SketchObject::trim()` ...and replace with a TODO --- src/Mod/Sketcher/App/SketchObject.cpp | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 1a30ae4479..77e9731482 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -3502,29 +3502,13 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point) int GeoId1, Base::Vector3d point1, Constraint* constr) { + // TODO: Move code currently later in this method (that does as per the following description) here. /* It is possible that the trimming entity has both a PointOnObject constraint to the - * trimmed entity, and a simple Tangent contstrait to the trimmed entity. In this case we + * trimmed entity, and a simple Tangent contstraint to the trimmed entity. In this case we * want to change to a single end-to-end tangency, i.e we want to ensure that constrType1 is * set to Sketcher::Tangent, that the secondPos1 is captured from the PointOnObject, and * also make sure that the PointOnObject constraint is deleted. The below loop ensures this, * also in case the ordering of the constraints is first Tangent and then PointOnObject. */ - // if (!(constr->Type == Sketcher::Tangent - // || constr->Type == Sketcher::Perpendicular)) { - // return; - // } - - // if (constr->First == GeoId1 && constr->Second == GeoId) { - // constr->Type = constr->Type; - // if (secondPos == Sketcher::PointPos::none) - // secondPos = constr->FirstPos; - // delete_list.push_back(constrId); - // } - // else if (constr->First == GeoId && constr->Second == GeoId1) { - // constr->Type = constr->Type; - // if (secondPos == Sketcher::PointPos::none) - // secondPos = constr->SecondPos; - // delete_list.push_back(constrId); - // } }; // makes an equality constraint between GeoId1 and GeoId2