refactor: Adjust XY and YZ selection plane positions and hit areas
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -702,8 +702,8 @@ void ViewportWidget::drawSelectionPlanes()
|
||||
};
|
||||
|
||||
// XY Plane (Top)
|
||||
QVector<GLfloat> xyQuad = { planeOffset, planeOffset, 0, planeOffset + planeSize, planeOffset, 0,
|
||||
planeOffset + planeSize, planeOffset + planeSize, 0, planeOffset, planeOffset + planeSize, 0 };
|
||||
QVector<GLfloat> xyQuad = { planeOffset, -planeOffset, 0, planeOffset + planeSize, -planeOffset, 0,
|
||||
planeOffset + planeSize, -planeOffset - planeSize, 0, planeOffset, -planeOffset - planeSize, 0 };
|
||||
drawPlane(xyQuad, m_highlightedPlane == SketchPlane::XY);
|
||||
|
||||
// XZ Plane (Front)
|
||||
@@ -712,8 +712,8 @@ void ViewportWidget::drawSelectionPlanes()
|
||||
drawPlane(xzQuad, m_highlightedPlane == SketchPlane::XZ);
|
||||
|
||||
// YZ Plane (Right)
|
||||
QVector<GLfloat> yzQuad = { 0, planeOffset, planeOffset, 0, planeOffset + planeSize, planeOffset,
|
||||
0, planeOffset + planeSize, planeOffset + planeSize, 0, planeOffset, planeOffset + planeSize };
|
||||
QVector<GLfloat> yzQuad = { 0, -planeOffset, planeOffset, 0, -planeOffset, planeOffset + planeSize,
|
||||
0, -planeOffset - planeSize, planeOffset + planeSize, 0, -planeOffset - planeSize, planeOffset };
|
||||
drawPlane(yzQuad, m_highlightedPlane == SketchPlane::YZ);
|
||||
|
||||
glEnable(GL_CULL_FACE);
|
||||
@@ -731,7 +731,7 @@ ViewportWidget::SketchPlane ViewportWidget::checkPlaneSelection(const QPoint& sc
|
||||
// Check front to back to handle overlaps
|
||||
// YZ plane (Right)
|
||||
intersection = unproject(screenPos, SketchPlane::YZ);
|
||||
if (intersection.y() >= planeOffset && intersection.y() <= planeOffset + planeSize &&
|
||||
if (intersection.y() >= -planeOffset - planeSize && intersection.y() <= -planeOffset &&
|
||||
intersection.z() >= planeOffset && intersection.z() <= planeOffset + planeSize) {
|
||||
return SketchPlane::YZ;
|
||||
}
|
||||
@@ -746,7 +746,7 @@ ViewportWidget::SketchPlane ViewportWidget::checkPlaneSelection(const QPoint& sc
|
||||
// XY plane (Top)
|
||||
intersection = unproject(screenPos, SketchPlane::XY);
|
||||
if (intersection.x() >= planeOffset && intersection.x() <= planeOffset + planeSize &&
|
||||
intersection.y() >= planeOffset && intersection.y() <= planeOffset + planeSize) {
|
||||
intersection.y() >= -planeOffset - planeSize && intersection.y() <= -planeOffset) {
|
||||
return SketchPlane::XY;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user