fix(ui): smooth B-spline section/waterline curves + 3D ready-signal sync

- viewer_3d.py: add `ready` Signal emitted once QtInteractor finishes init
- main_window.py: connect ready signal to sync active hull into 3D viewer on startup
- viewer_lines.py: add _smooth_pts helper; replace straight polylines in BodyPlanViewer
  and PlanViewer CAPA 3 with B-spline interpolated curves (80 sample points)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-27 17:54:08 -04:00
parent eac3a3c965
commit 58228080e8
3 changed files with 53 additions and 10 deletions
+4 -1
View File
@@ -17,7 +17,7 @@ import logging
from typing import Optional
import numpy as np
from PySide6.QtCore import Qt, QTimer
from PySide6.QtCore import Qt, QTimer, Signal
from PySide6.QtWidgets import QLabel, QVBoxLayout, QWidget
logger = logging.getLogger("ui.viewer_3d")
@@ -50,6 +50,8 @@ class Viewer3DWidget(QWidget):
>>> v.reset_camera()
"""
ready: Signal = Signal()
def __init__(self, parent: Optional[QWidget] = None) -> None:
super().__init__(parent)
self._plotter: Optional["QtInteractor"] = None
@@ -114,6 +116,7 @@ class Viewer3DWidget(QWidget):
else:
self._load_default_wigley()
self._ready = True
self.ready.emit()
logger.info("Viewer3DWidget: QtInteractor iniciado correctamente")
except Exception as exc: