Gui: Render profile preview in proper coordinate space

This commit is contained in:
Kacper Donat
2025-09-14 17:09:00 +02:00
committed by Chris Hennes
parent 05707c61fb
commit b3fd31b108

View File

@@ -33,6 +33,7 @@
#include "StyleParameters.h"
#include <Gui/Inventor/So3DAnnotation.h>
#include <Mod/Part/App/BodyBase.h>
using namespace PartDesignGui;
@@ -96,7 +97,12 @@ void ViewProviderSketchBased::updateProfileShape()
}
auto profileBased = getObject<PartDesign::ProfileBased>();
updatePreviewShape(profileBased->getTopoShapeVerifiedFace(true), pcProfileShape);
auto profileShape = profileBased->getTopoShapeVerifiedFace(true);
// set the correct coordinate space for the profile shape
profileShape.setPlacement(profileShape.getPlacement() * profileBased->Placement.getValue().inverse());
updatePreviewShape(profileShape, pcProfileShape);
}
void ViewProviderSketchBased::updateData(const App::Property* prop)