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)
|
// XY Plane (Top)
|
||||||
QVector<GLfloat> xyQuad = { planeOffset, planeOffset, 0, planeOffset + planeSize, planeOffset, 0,
|
QVector<GLfloat> xyQuad = { planeOffset, -planeOffset, 0, planeOffset + planeSize, -planeOffset, 0,
|
||||||
planeOffset + planeSize, planeOffset + planeSize, 0, planeOffset, planeOffset + planeSize, 0 };
|
planeOffset + planeSize, -planeOffset - planeSize, 0, planeOffset, -planeOffset - planeSize, 0 };
|
||||||
drawPlane(xyQuad, m_highlightedPlane == SketchPlane::XY);
|
drawPlane(xyQuad, m_highlightedPlane == SketchPlane::XY);
|
||||||
|
|
||||||
// XZ Plane (Front)
|
// XZ Plane (Front)
|
||||||
@@ -712,8 +712,8 @@ void ViewportWidget::drawSelectionPlanes()
|
|||||||
drawPlane(xzQuad, m_highlightedPlane == SketchPlane::XZ);
|
drawPlane(xzQuad, m_highlightedPlane == SketchPlane::XZ);
|
||||||
|
|
||||||
// YZ Plane (Right)
|
// YZ Plane (Right)
|
||||||
QVector<GLfloat> yzQuad = { 0, planeOffset, planeOffset, 0, planeOffset + planeSize, planeOffset,
|
QVector<GLfloat> yzQuad = { 0, -planeOffset, planeOffset, 0, -planeOffset, planeOffset + planeSize,
|
||||||
0, planeOffset + planeSize, planeOffset + planeSize, 0, planeOffset, planeOffset + planeSize };
|
0, -planeOffset - planeSize, planeOffset + planeSize, 0, -planeOffset - planeSize, planeOffset };
|
||||||
drawPlane(yzQuad, m_highlightedPlane == SketchPlane::YZ);
|
drawPlane(yzQuad, m_highlightedPlane == SketchPlane::YZ);
|
||||||
|
|
||||||
glEnable(GL_CULL_FACE);
|
glEnable(GL_CULL_FACE);
|
||||||
@@ -731,7 +731,7 @@ ViewportWidget::SketchPlane ViewportWidget::checkPlaneSelection(const QPoint& sc
|
|||||||
// Check front to back to handle overlaps
|
// Check front to back to handle overlaps
|
||||||
// YZ plane (Right)
|
// YZ plane (Right)
|
||||||
intersection = unproject(screenPos, SketchPlane::YZ);
|
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) {
|
intersection.z() >= planeOffset && intersection.z() <= planeOffset + planeSize) {
|
||||||
return SketchPlane::YZ;
|
return SketchPlane::YZ;
|
||||||
}
|
}
|
||||||
@@ -746,7 +746,7 @@ ViewportWidget::SketchPlane ViewportWidget::checkPlaneSelection(const QPoint& sc
|
|||||||
// XY plane (Top)
|
// XY plane (Top)
|
||||||
intersection = unproject(screenPos, SketchPlane::XY);
|
intersection = unproject(screenPos, SketchPlane::XY);
|
||||||
if (intersection.x() >= planeOffset && intersection.x() <= planeOffset + planeSize &&
|
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;
|
return SketchPlane::XY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user