Sketcher: Renaming old get Coincident functions and introducing a extended one

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

What is this?

method

getCoincidentPoints

actually only included (as indicated in the documentation comment) those points coincident by a single constraint.

That is not "all the coincident points".

However some methods currently using it are expecting exactly that (coincident points linked by a single constraint).

A new method is introduced:
const std::map<int, Sketcher::PointPos> getAllCoincidentPoints(int GeoId, PointPos PosId);

that provides all the points coincident with the given one, directly (via a single constraint) or indirectly (via multiple coincident constraints).

The old method is renamed to:
getDirectlyCoincidentPoints

So as to have a more meaningful name to differentiate between both methods.
This commit is contained in:
Abdullah Tahiri
2015-09-07 15:28:33 +02:00
committed by wmayer
parent 4b9a379b90
commit 28c406c80e
3 changed files with 37 additions and 10 deletions

View File

@@ -3981,7 +3981,7 @@ namespace SketcherGui {
Sketcher::SketchObject *Sketch = static_cast<Sketcher::SketchObject*>(object);
std::vector<int> GeoIdList;
std::vector<Sketcher::PointPos> PosIdList;
Sketch->getCoincidentPoints(VtId, GeoIdList, PosIdList);
Sketch->getDirectlyCoincidentPoints(VtId, GeoIdList, PosIdList);
if (GeoIdList.size() == 2 && GeoIdList[0] >= 0 && GeoIdList[1] >= 0) {
const Part::Geometry *geom1 = Sketch->getGeometry(GeoIdList[0]);
const Part::Geometry *geom2 = Sketch->getGeometry(GeoIdList[1]);
@@ -4080,7 +4080,7 @@ public:
double radius=-1;
std::vector<int> GeoIdList;
std::vector<Sketcher::PointPos> PosIdList;
sketchgui->getSketchObject()->getCoincidentPoints(GeoId, PosId, GeoIdList, PosIdList);
sketchgui->getSketchObject()->getDirectlyCoincidentPoints(GeoId, PosId, GeoIdList, PosIdList);
if (GeoIdList.size() == 2 && GeoIdList[0] >= 0 && GeoIdList[1] >= 0) {
const Part::Geometry *geom1 = sketchgui->getSketchObject()->getGeometry(GeoIdList[0]);
const Part::Geometry *geom2 = sketchgui->getSketchObject()->getGeometry(GeoIdList[1]);