mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-26 10:21:00 +00:00
CoordSys: pick a body first, x-ray the rest
In an assembly the face you want for a mate connector is nearly always behind another body, and a click only ever returns the frontmost hit. Hiding the occluder from the Parts list works but means leaving the tool mid-pick. The CoordSys card now carries a Body chooser. Pick a body and every other one drops to 0.25 alpha AND stops catching clicks, so the wanted face is both visible and reachable in one gesture. "(all)" restores normal picking. Deliberately NOT hit cycling: repeated-click cycling was removed from solid picking as a charter L5/§10 violation (DesignSketchTool.cpp, "NO CYCLE"), and re-introducing it here would make "click a face" a multi-click gesture again. Mechanics: DesignSketchTool::set_pick_only_body() gates body_pickable(), which every pick path already consults; DesignCanvas::set_xray_focus() drives both it and the per-body alpha in reload(). The chooser stays a pick FILTER only -- coordsys_body still comes from the actual pick, so nothing in the kernel moves. Body focus follows the CoordSys card: open_tool() reads it back from the combo rather than clearing outright, because editing a CoordSys feature loads the card (and its body) before open_tool runs. snaporca-bgvk. NOT COMPILED: deps/build lacks OpenVDB so the GUI tree will not configure here; reviewed by diff only. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
8ff7ba440d
commit
3eec65f2bd
@@ -296,6 +296,7 @@ void DesignCanvas::reload(bool keep_view)
|
||||
if (b == m_hl_body_target) c = ColorRGBA(0.30f, 0.90f, 0.70f, 1.0f); // target = teal-green
|
||||
else if (b == m_hl_body_tool) c = ColorRGBA(1.00f, 0.55f, 0.15f, 1.0f); // tool = orange
|
||||
if (m_body_translucent) c.a(0.30f);
|
||||
else if (m_xray_focus >= 0 && b != m_xray_focus) c.a(0.25f);
|
||||
v->set_color(c);
|
||||
}
|
||||
} else if (obj_idx == 1) {
|
||||
@@ -1050,6 +1051,14 @@ void DesignCanvas::set_body_translucent(bool on)
|
||||
reload(true); // re-applies object-0 alpha so the solid fades for the fillet preview
|
||||
}
|
||||
|
||||
void DesignCanvas::set_xray_focus(int body)
|
||||
{
|
||||
if (m_xray_focus == body) return;
|
||||
m_xray_focus = body;
|
||||
m_sketch_tool.set_pick_only_body(body);
|
||||
reload(true); // re-applies per-body alpha so the non-focused bodies fade
|
||||
}
|
||||
|
||||
void DesignCanvas::set_body_hidden(bool on)
|
||||
{
|
||||
if (m_body_hidden == on) return;
|
||||
|
||||
Reference in New Issue
Block a user