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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user