三维显示与二维共用深度色标,配置名改为 Finger
箭头阈值写入设置;去掉网格告警。三维色标改为立刻采用二维量程(不再 P5/P95 缓变)。选择器显示 Finger。已用 pane UI、shared-scale 与 catalog 单测验证。
This commit is contained in:
@@ -129,6 +129,21 @@ def test_arrow_threshold_round_trips_and_feeds_the_shared_policy(panel):
|
||||
assert policy_for_settings(again).flow_on_px == pytest.approx(0.9)
|
||||
|
||||
|
||||
def test_depth_legend_follows_the_shared_2d_span_immediately(panel):
|
||||
"""The 3D colour-bar numbers are the 2D span, not a lagged GL automatic range."""
|
||||
from orisys_app_shared.scene3d.contracts import FieldDescriptor, RenderStats
|
||||
|
||||
panel.set_descriptor(
|
||||
FieldDescriptor("depth_response", "1", "approximate", False)
|
||||
)
|
||||
panel.set_render_stats(
|
||||
RenderStats(scale_lower=0.0, scale_upper=0.0489, scale_mode="automatic")
|
||||
)
|
||||
panel.set_shared_depth_scale((0.0, 0.029))
|
||||
assert panel.scale_lower_label.text() == "0.000"
|
||||
assert panel.scale_upper_label.text() == "0.029"
|
||||
|
||||
|
||||
def test_source_kind_analysis_uses_its_own_label(panel):
|
||||
"""A stored result is not labelled as live acquisition."""
|
||||
panel.set_diagnostics_visible(True)
|
||||
@@ -241,8 +256,8 @@ def test_the_diagnostics_switch_governs_what_the_pane_explains(panel):
|
||||
)
|
||||
panel.set_diagnostics_visible(False)
|
||||
assert not panel.scale_bar.isHidden()
|
||||
assert panel.scale_lower_label.text() == "0.25"
|
||||
assert panel.scale_upper_label.text() == "2.5"
|
||||
assert panel.scale_lower_label.text() == "0.250"
|
||||
assert panel.scale_upper_label.text() == "2.500"
|
||||
assert not panel.scale_lower_label.isHidden()
|
||||
assert not panel.scale_upper_label.isHidden()
|
||||
assert panel.legend_label.isHidden()
|
||||
|
||||
@@ -1018,7 +1018,7 @@ def test_the_legend_shows_the_range_the_shader_actually_used(qt_app):
|
||||
)
|
||||
)
|
||||
legend = panel.legend_label.text()
|
||||
assert "0.25" in legend and "7.5" in legend, legend
|
||||
assert "0.250" in legend and "7.500" in legend, legend
|
||||
assert t("scene3d.legend_auto") in legend, legend
|
||||
assert panel.scale_bar.isVisible() or panel.scale_bar.parent() is not None
|
||||
assert "flow_magnitude" not in legend
|
||||
|
||||
@@ -51,13 +51,13 @@ EXPECTED_SHIPPED: dict[str, tuple[str, str, str, bool, str]] = {
|
||||
}
|
||||
|
||||
#: What an operator reads in the picker, one row per shipped bundle: the bundle's name, and
|
||||
#: nothing else. ``finger`` declares ``Finger R01`` in its descriptor; the other three have no
|
||||
#: nothing else. ``finger`` declares ``Finger`` in its descriptor; the other three have no
|
||||
#: descriptor and are named by the folder they live in, as the SDK's built-in table words it.
|
||||
#: The origin, the calibration selection and the SDK's ``degraded`` verdict are not rows — they
|
||||
#: are read in the dialog's details surface, which sits under the selector.
|
||||
EXPECTED_ROWS: dict[str, str] = {
|
||||
"box": "Box",
|
||||
"finger": "Finger R01",
|
||||
"finger": "Finger",
|
||||
"finger-mems": "Finger (MEMS)",
|
||||
"mini": "Mini",
|
||||
}
|
||||
|
||||
@@ -43,12 +43,10 @@ def test_depth_without_a_shared_span_still_measures_the_field() -> None:
|
||||
field = _field("depth_response", np.linspace(0.0, 9.0, 16).reshape(4, 4))
|
||||
span = _field_scalar_range(
|
||||
field,
|
||||
previous=None,
|
||||
previous=(0.0, 2.0),
|
||||
shared_depth_scale=None,
|
||||
)
|
||||
assert span is not None
|
||||
assert span[0] == 0.0
|
||||
assert span[1] > 1.0
|
||||
assert span == (0.0, 9.0)
|
||||
|
||||
|
||||
def test_a_degenerate_shared_span_falls_back_to_the_measurement() -> None:
|
||||
|
||||
Reference in New Issue
Block a user