fix: Update Open CASCADE point conversion API in ApplicationController

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2026-03-03 16:33:21 -07:00
parent aa8127c5f8
commit 6d92349938
+5 -4
View File
@@ -20,6 +20,7 @@
#include <gp_Ax2.hxx>
#include <gp_Circ.hxx>
#include <gp_Dir.hxx>
#include <gp_Vec.hxx>
#include <gp_Pnt2d.hxx>
#include <QInputDialog>
@@ -155,14 +156,14 @@ void ApplicationController::addRectangle(const gp_Pnt& corner1, const gp_Pnt& co
const auto& plane = m_activeSketch->plane();
gp_Pnt2d p1_2d = ElCLib::Value(corner1, plane);
gp_Pnt2d p3_2d = ElCLib::Value(corner2, plane);
gp_Pnt2d p1_2d(gp_Vec(plane.Location(), corner1).Dot(plane.XDirection()), gp_Vec(plane.Location(), corner1).Dot(plane.YDirection()));
gp_Pnt2d p3_2d(gp_Vec(plane.Location(), corner2).Dot(plane.XDirection()), gp_Vec(plane.Location(), corner2).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::Value(p2_2d, plane);
gp_Pnt p4_3d = ElCLib::Value(p4_2d, plane);
gp_Pnt p2_3d = ElCLib::To3d(plane, p2_2d);
gp_Pnt p4_3d = ElCLib::To3d(plane, p4_2d);
TopoDS_Edge e1 = BRepBuilderAPI_MakeEdge(corner1, p2_3d);
TopoDS_Edge e2 = BRepBuilderAPI_MakeEdge(p2_3d, corner2);