fix: Update ElCLib 2D/3D point conversion API in ViewportWidget
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <QtMath>
|
||||
#include <ElCLib.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <QOpenGLShaderProgram>
|
||||
#include <QVector>
|
||||
#include <map>
|
||||
@@ -574,14 +575,14 @@ void ViewportWidget::drawSketch(const SketchFeature* sketch)
|
||||
const auto& p1_3d = rect->corner1();
|
||||
const auto& p3_3d = rect->corner2();
|
||||
|
||||
gp_Pnt2d p1_2d = ElCLib::To2d(p1_3d, plane);
|
||||
gp_Pnt2d p3_2d = ElCLib::To2d(p3_3d, plane);
|
||||
gp_Pnt2d p1_2d(gp_Vec(plane.Location(), p1_3d).Dot(plane.XDirection()), gp_Vec(plane.Location(), p1_3d).Dot(plane.YDirection()));
|
||||
gp_Pnt2d p3_2d(gp_Vec(plane.Location(), p3_3d).Dot(plane.XDirection()), gp_Vec(plane.Location(), p3_3d).Dot(plane.YDirection()));
|
||||
|
||||
gp_Pnt2d p2_2d(p3_2d.X(), p1_2d.Y());
|
||||
gp_Pnt2d p4_2d(p1_2d.X(), p3_2d.Y());
|
||||
|
||||
gp_Pnt p2_3d = ElCLib::To3d(p2_2d, plane);
|
||||
gp_Pnt p4_3d = ElCLib::To3d(p4_2d, plane);
|
||||
gp_Pnt p2_3d = ElCLib::To3d(plane, p2_2d);
|
||||
gp_Pnt p4_3d = ElCLib::To3d(plane, p4_2d);
|
||||
|
||||
lineVertices << p1_3d.X() << p1_3d.Y() << p1_3d.Z();
|
||||
lineVertices << p2_3d.X() << p2_3d.Y() << p2_3d.Z();
|
||||
|
||||
Reference in New Issue
Block a user