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:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user