update csv export and added fixed mesh axis drawing
This commit is contained in:
+30
-5
@@ -19,6 +19,9 @@ MeshLighting (below) controls the 3D mesh panel sun light:
|
||||
|
||||
MESH_BACKGROUND (below) sets the 3D mesh panel clear color (RGB 0–255).
|
||||
|
||||
MESH_AXIS_OVERLAY (below) controls the fixed top-right pre-rendered 3D axis triad:
|
||||
enabled, padding_px, size_px, opacity
|
||||
|
||||
MESH_CONTACT_ARROW (below) controls the yellow 3D contact arrow on the mesh panel:
|
||||
reference_normal_force — Fn at which arrow reaches full size (log/power/linear curve)
|
||||
force_strength_mode — "log" | "power" | "linear"
|
||||
@@ -87,7 +90,7 @@ TOP_ROW = PanelRow(
|
||||
PanelSlot("mesh", "3D mesh", width_px=400, height_px=400),
|
||||
PanelSlot("arrows", "UV Unrolled", width_px=400, height_px=400, enabled=True),
|
||||
PanelSlot("charts", "Force charts", width_px=300, height_px=400),
|
||||
PanelSlot("settings", "Settings", width_px=200, height_px=0),
|
||||
PanelSlot("settings", "Settings", width_px=250, height_px=0),
|
||||
),
|
||||
)
|
||||
|
||||
@@ -142,6 +145,20 @@ class MeshBackground:
|
||||
|
||||
MESH_BACKGROUND = MeshBackground(color=(0, 0, 0))
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class MeshAxisOverlay:
|
||||
"""Fixed pre-rendered XYZ triad HUD on the 3D mesh RGB output."""
|
||||
|
||||
enabled: bool = True
|
||||
padding_px: int = 12
|
||||
size_px: int = 96
|
||||
opacity: float = 1.0
|
||||
|
||||
|
||||
MESH_AXIS_OVERLAY = MeshAxisOverlay()
|
||||
|
||||
|
||||
# 3D mesh contact arrow — edit here for dashboard tuning (see ContactArrowStyle in viz/contact_arrow.py).
|
||||
MESH_CONTACT_ARROW = ContactArrowStyle(
|
||||
reference_normal_force=10000.0,
|
||||
@@ -197,6 +214,7 @@ class LogConfig:
|
||||
flow_rms: float = 0.0,
|
||||
mask_coverage: float = 0.0,
|
||||
wall_fps: float | None = None,
|
||||
contact_xyz_mm: tuple[float, float, float] | None = None,
|
||||
) -> str:
|
||||
shear_mag = float((fshearx**2 + fsheary**2) ** 0.5)
|
||||
if wall_fps is not None:
|
||||
@@ -206,11 +224,17 @@ class LogConfig:
|
||||
parts.extend(
|
||||
[
|
||||
f"Fn={fnormal:.1f}",
|
||||
f"|Fs|={shear_mag:.1f}",
|
||||
f"Fs=({fshearx:.1f}, {fsheary:.1f})",
|
||||
f"|(Fx,Fy)|={shear_mag:.1f}",
|
||||
f"Fx, Fy=({fshearx:.1f}, {fsheary:.1f})",
|
||||
]
|
||||
)
|
||||
return " ".join(parts)
|
||||
force_line = " ".join(parts)
|
||||
if contact_xyz_mm is None:
|
||||
contact_line = "contact=---"
|
||||
else:
|
||||
cx, cy, cz = contact_xyz_mm
|
||||
contact_line = f"contact=({cx:.1f}, {cy:.1f}, {cz:.1f}) mm"
|
||||
return f"{force_line}\n{contact_line}"
|
||||
|
||||
|
||||
LOG_CONFIG = LogConfig()
|
||||
@@ -224,7 +248,7 @@ class DashboardLayout:
|
||||
|
||||
window_title: str = "Orisys Finger Dashboard"
|
||||
window_width: int = 1300
|
||||
window_height: int = 520
|
||||
window_height: int = 560
|
||||
|
||||
root_margin_px: int = 6
|
||||
root_spacing_px: int = 6
|
||||
@@ -249,6 +273,7 @@ class DashboardLayout:
|
||||
mesh_background: MeshBackground = MESH_BACKGROUND
|
||||
mesh_contact_arrow: ContactArrowStyle = MESH_CONTACT_ARROW
|
||||
mesh_flow_arrow: FlowArrowStyle = MESH_FLOW_ARROW
|
||||
mesh_axis_overlay: MeshAxisOverlay = MESH_AXIS_OVERLAY
|
||||
|
||||
log_config: LogConfig = LOG_CONFIG
|
||||
|
||||
|
||||
Reference in New Issue
Block a user