[FEM] improve cylinder function

- set better initial position and size
- add misting triggering of ViewProvider
- some code style improvements (fix too long lines, consistency etc.)
This commit is contained in:
Uwe
2023-03-09 05:58:11 +01:00
parent bedfd8f743
commit 1bfaa6965b
4 changed files with 18 additions and 11 deletions

View File

@@ -2178,14 +2178,13 @@ void CmdFemPostFunctions::activated(int iMsg)
FeatName.c_str(),
center[0],
center[1] + box.GetLength(1) / 2,
center[2] + box.GetLength(2) / 2);
center[2]);
doCommand(Doc,
"App.ActiveDocument.%s.Radius = %f",
FeatName.c_str(),
box.GetDiagonalLength() / 2);
box.GetDiagonalLength() / 3.6); // make cylinder a bit higher than the box
}
this->updateActive();
//most of the times functions are added inside of a filter, make sure this still works
if (!Gui::Application::Instance->activeDocument()->getInEdit())