[Sketcher] Scale DSH : adds a tool to scale geometries. (#11265)

* Scale DSH : sketcher tool to scale geometries.
* Sketcher: Rotate and Scale : Move indexInVec to Utils.h as indexOfGeoId

---------

Co-authored-by: Paddle <PaddleStroke@users.noreply.github.com>
This commit is contained in:
PaddleStroke
2024-02-01 09:08:58 +01:00
committed by GitHub
parent a54840c2c5
commit 8afa940ca2
10 changed files with 1670 additions and 17 deletions

View File

@@ -865,3 +865,16 @@ bool SketcherGui::areColinear(const Base::Vector2d& p1,
return false;
}
int SketcherGui::indexOfGeoId(const std::vector<int>& vec, int elem)
{
if (elem == GeoEnum::GeoUndef) {
return GeoEnum::GeoUndef;
}
for (size_t i = 0; i < vec.size(); i++) {
if (vec[i] == elem) {
return static_cast<int>(i);
}
}
return -1;
}