The chip in the corner was holding the keyboard, and the planes were holding the bed

Two reports, three defects, all three measured on the running app rather than reasoned about.

"Keyboard focus in drawing tool is broken so that now they are slow and cumbersome." After a
dimensioned entity the bottom-right readout chip — 119x31, borderless, a wxFrame — held the X
input focus. Pressing r produced NO [KEYTRACE] line at all: the key never reached the panel's
CHAR_HOOK. One bare canvas click moved focus back to the main window and the identical key armed
the tool. So every shortcut was dead after every dimension, and the way to get the keyboard back
was to click somewhere harmless. That is the whole of "slow and cumbersome".

Its sibling, the status chip, is a wxPopupWindow for exactly this reason and carries a comment
warning against turning it back into a frame. The readout was left a frame on the premise that
"it appears mid-gesture and the next input is the mouse" — which the measurement falsifies: the
chip keeps the last value on screen after the gesture ends, and a frame that has the focus does
not give it back. It is now a popup too, with the placement and the iconise/deactivate lifecycle
its sibling already needed, because an override-redirect window would otherwise sit on the bare
desktop when the app is minimised.

"Planes hide the bed." Literally true, twice over. The reference planes were half-extent 0.6 *
the bed's larger side — a square 1.2x the plate — and all three are drawn with depth testing
off, so they painted over the plate grid from edge to edge. 0.3 puts them inside the bed, which
is also the Onshape look the size was reaching for: a modest square at the origin, not a
tablecloth.

And the other half was mine. 3f52166e32 muted the bed for the duration of a sketch, on the
argument that a plate grid and a sketch grid are the same visual language. The argument is right
and the call was wrong, because there IS no sketch grid to take over. Pick XY, arm Line, and the
viewport was an empty grey field: no bed, no grid, no origin, nothing to judge a length or a
direction against. The plate grid was carrying the ground reference for the whole tab. The banner
already says where you are; taking the floor away as well only made the sketch harder to draw.
The Bed checkbox is the one thing that governs the bed, in every mode.

Verified on behemoth :10 with the rebuilt binary: focus after a dimension chain is the main
window, r arms Rectangle with no click in between, and the plate grid is under the sketch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011FbJKJAJxxkhDTs9XdZzKA
This commit is contained in:
Tommaso Bianchi
2026-09-05 13:58:40 +02:00
co-authored by Claude Opus 5
parent cf444a6ab6
commit 00d6c191dc
4 changed files with 50 additions and 16 deletions
+7 -5
View File
@@ -4780,16 +4780,18 @@ void DesignSketchTool::clear_base_pick()
m_dbp_hover = -1;
}
// Reference planes are larger than the bed (Onshape default-plane feel). Half-extent = 0.6 * the
// bed's larger side, so the square fully overhangs the print area. Falls back to 150mm if the bed
// isn't queryable yet.
// Reference planes sit INSIDE the bed. They used to be 0.6 * the bed's larger side, i.e. a square
// 1.2x the plate, and three of them are drawn with depth testing off — so they painted over the
// plate grid from edge to edge and the bed simply was not readable any more. "The planes hide the
// bed", reported exactly that way. Small enough to leave the grid legible around them is also the
// Onshape look this was reaching for: a modest square at the origin, not a tablecloth.
double DesignSketchTool::dbp_half_extent() const
{
double half = 150.0;
double half = 75.0;
if (auto* pl = wxGetApp().plater()) {
const BoundingBoxf bb = pl->build_volume().bounding_volume2d();
const double w = bb.max.x() - bb.min.x(), d = bb.max.y() - bb.min.y();
if (w > 1.0 && d > 1.0) half = 0.6 * std::max(w, d);
if (w > 1.0 && d > 1.0) half = 0.3 * std::max(w, d);
}
return half;
}