Core: Datums: Fix axis placement and add migration script.

This commit is contained in:
PaddleStroke
2024-11-26 09:27:40 +01:00
parent d835cde3a5
commit 655ae579ed
6 changed files with 81 additions and 14 deletions

View File

@@ -1357,9 +1357,10 @@ void ProfileBased::getAxis(const App::DocumentObject * pcReferenceAxis, const st
}
if (pcReferenceAxis->isDerivedFrom<App::Line>()) {
const App::Line* line = static_cast<const App::Line*>(pcReferenceAxis);
base = Base::Vector3d(0, 0, 0);
line->Placement.getValue().multVec(Base::Vector3d(1, 0, 0), dir);
auto* line = static_cast<const App::Line*>(pcReferenceAxis);
Base::Placement plc = line->Placement.getValue();
base = plc.getPosition();
plc.getRotation().multVec(Base::Vector3d(0, 0, 1), dir);
verifyAxisFunc(checkAxis, sketchplane, gp_Dir(dir.x, dir.y, dir.z));
return;