Measurement: Added support for cylindrical surfaces (#27044)

* Added support for cylindrical surfaces

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Removed unnessecary sign

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Reverted change

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Morten Vajhøj
2026-01-24 17:12:16 +01:00
committed by GitHub
parent 23d3b4c135
commit 0e6e2f28e8
3 changed files with 55 additions and 15 deletions

View File

@@ -78,7 +78,8 @@ bool MeasureRadius::isValidSelection(const App::MeasureSelection& selection)
return false;
}
if (type != App::MeasureElementType::CIRCLE && type != App::MeasureElementType::ARC) {
if (type != App::MeasureElementType::CIRCLE && type != App::MeasureElementType::ARC
&& type != App::MeasureElementType::CYLINDER) {
return false;
}
@@ -96,7 +97,8 @@ bool MeasureRadius::isPrioritizedSelection(const App::MeasureSelection& selectio
auto element = selection.front();
auto type = App::MeasureManager::getMeasureElementType(element);
if (type == App::MeasureElementType::CIRCLE || type == App::MeasureElementType::ARC) {
if (type == App::MeasureElementType::CIRCLE || type == App::MeasureElementType::ARC
|| type == App::MeasureElementType::CYLINDER) {
return true;
}