Color palette:
- Control net (nodes + connecting lines): neutral grey (#A8B8D0 / 110,120,140)
— matches DELFTship convention for control polygon handles
- Forward stations (proa): bright green #22CC58
- Aft stations (popa): amber #C8A010
- Midship: orange #FF7020
- Node size reduced 4.5→3.0 px so hull curves dominate visually
Plan view (Vista de Planta):
- World bbox now symmetric: y ∈ [−B/2·1.22, +B/2·1.22] shows BOTH halves
- Waterlines drawn as closed contours: CL-AP → starboard curve → CL-FP
→ port curve (mirrored) → close at CL-AP
Every waterline terminates at the centerline at bow and stern
- Control net grid: both directions (station-arm + waterline-arm) drawn
on port AND starboard — same visual language as DELFTship control polygon
- Station reference lines span full beam (both sides)
- Centerline (eje de crujía) drawn as solid line dividing the two halves
- Edit nodes remain on starboard only; port updates symmetrically
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Root cause: base _w2s mapped world-Z directly to screen-Y (which
increases downward), placing the keel at the TOP of every viewer.
BodyPlanViewer:
- Override _w2s/_s2w/_fit_to_view to invert Y axis (keel now at bottom)
- Fix section drawing: remove keel-appended B-spline closure that
distorted the curve; close section with a straight lineTo(0,0) instead
ProfileViewer:
- Same Y-inversion overrides as BodyPlanViewer
- Add _compute_buttock_pts() helper (interpolates Z at constant Y_b
across all stations) and draw 3 buttock lines (B/4, B/2, 3B/4)
as smooth curves in the profile view
Buttocks, stations and waterlines now appear in their correct views:
Body Plan → station cross-section curves, keel at bottom
Profile → buttock curves (vertical long. sections), keel at bottom
Plan View → waterline contours (unchanged)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 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>
_draw_cnet_bodyplan: eliminated the longitudinal edges (same WL index
across all stations) — in the body plan all sections are overlaid in
the same y-z plane so those connections produce confusing diagonal
spoke patterns radiating from bow/stern. Now only transverse section
polylines are drawn as the muted control-net underlay.
_draw_cnet_planview: likewise removed the redundant longitudinal layer
(waterline contours) because layer-3 already draws them bold on top.
Only the transverse station-direction edges are kept, which are the
genuinely new information in plan view.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- viewer_lines.py: añade toggle curvatura (tecla C), señal offsets_dragging,
método update_offsets (sin resetear zoom/pan), keyPressEvent, hint overlay,
funciones _curvature_comb_data y _draw_curvature_comb para BodyPlan y Plan
- main_window.py: conecta offsets_dragging → slot ligero _on_offsets_dragging
que actualiza vistas 2D en vivo; _on_offsets_edited_from_viewer usa
update_offsets en lugar de set_hull para preservar zoom/pan al soltar
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
_StepBar:
- setFixedHeight(40→54) — label text (cy+r+4=34, h=16) ya no se recorta
- cy fijado a 20 en lugar de h//2 para dejar margen inferior al texto
- drawText rect ampliado a 112×16 para labels más largos (esp. "Refinamiento")
- setStyleSheet background:_PANEL para que coincida con el header
NewShipWizard content area:
- QStackedWidget: stylesheet "background:_BG" para el widget contenedor
- Cada página de paso: autoFillBackground=True + palette Window→_BG
(palette en vez de setStyleSheet evita que el fondo cascadee a los
hijos QDoubleSpinBox/QLineEdit que tienen sus propios estilos inline)
- QPalette añadido al import de PySide6.QtGui
282 tests, 0 fallos.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
test_iacs_rec34.py: 29 tests organizados en 6 clases segun IACS Rec.34:
A. par.4.3 Verificacion analitica (V001-V009):
V, Cb, Awp, Cw, LCB, KB, IT, TPC, KMT vs. solucion analitica Wigley.
B. par.4.4 Convergencia de malla (V010-V012):
Error de V y Awp decrece monotonamente n=11->21->41->81.
C. par.4.5 Simetria (V013-V015):
LCB=L/2, areas de cuadernas simetricas, offsets simetricos.
D. Geometria NURBS (V016-V019):
BSplineCurve (linea recta exacta, semicirculo); superficie Wigley
(semi-manga correcta en midship, cero en AP/FP).
E. Serializacion / trazabilidad par.6 (V020-V023):
V, IT, tabla de offsets identica tras round-trip; JSON legible
por auditor externo (sin base64, floats decimales).
F. Cobertura (meta-test V001-V023 documentados en el modulo).
Tolerancias explicitas por tipo de integral (par.6.3):
integrales directas < 0.5 %, momentos 1er orden < 1 %,
momentos 2do orden < 2 %, coeficientes adim. < 0.005.
Suite total: 141 tests -- 141 passed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- hull.py: Hull.to_dict() serializa a dict JSON con formato hull_v1
(arrays numpy -> listas Python); Hull.from_dict() deserializa con
validacion de claves y forma de array.
- project.py: Project.hull (property lazy) deserializa el Hull desde
ship_data; Project.set_hull() persiste el Hull y marca is_modified.
- main_window.py: _on_new_project guarda el Hull en el proyecto;
_on_project_loaded restaura el Hull en todos los visores al abrir
un archivo .arsd; _on_hull_changed_from_editor mantiene el proyecto
sincronizado con ediciones en el editor de offsets.
- test_serialization.py: 26 tests (round-trip dict, round-trip ZIP,
5 familias parametricas, escritura atomica, proyecto sin Hull).
Suite total: 112 tests -- 112 passed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- offsets_editor.py: OffsetsEditor (QTableWidget editable con zoom de
celdas modificadas en ambar, invalidas en rojo; Aplicar reconstruye Hull
y emite hull_changed; importar/exportar CSV; info bar con dimensiones).
- main_window.py: OffsetsEditor inyectado como MOD_OFFSETS (F4);
_load_hull_viewers recibe _skip_offsets_editor para evitar bucle;
_on_hull_changed_from_editor propaga el Hull editado a todos los visores
y al panel de hidrostáticos en vivo; ModuleArea.set_module_widget()
para reemplazar placeholders en tiempo de setup.
86 tests pasan sin regresiones.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- viewer_lines.py: BodyPlanViewer, ProfileViewer, PlanViewer (QPainter,
zoom/paneo, tema dark navy); conectados a los tres viewports 2D del
layout 4-viewport (bodyplan / profile / plan).
- hull.py: añadidos waterplane_coefficient (Cw), it_waterplane (IT),
il_waterplane (IL), bm_transverse (BMT), bm_longitudinal (BML),
km_transverse (KMT), tpc, mct1cm — todos verificados analíticamente
contra el casco Wigley (IACS Rec.34 §4.3).
- main_window.py: _load_hull_viewers() conecta los 4 visores y el panel
hidrostáticos al crear un nuevo proyecto; _update_hydrostatics() puebla
los 11 campos de la barra inferior en vivo.
- test_module1_hydrostatics.py: 35 tests nuevos (IT analítico exacto,
consistencia BMT=IT/V, KMT=KB+BMT, TPC=Awp·ρ/1e5, visores headless).
Suite total: 86 tests — 86 passed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Qt dimensiona QToolButton por el ícono (22px), no por el texto, lo que
causaba que etiquetas como 'Nuevo Tq.' se cortaran al renderizar.
Ahora add_button() usa fontMetrics().horizontalAdvance(text)+20 para
establecer setMinimumWidth() correcto en cada botón.
Además: RibbonBar.setFixedHeight(110) (antes 92), padding y font-size
del ribbonButton QSS aumentados ligeramente para mejor legibilidad.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Reemplaza fondos casi-negros (#0e1117, #1e2128) por paleta
azul-gris marino profesional (#252a38 main, #1a1e2c viewport canvas)
- Elimina max-width:72px de ribbonButton — texto como "C. Incendio",
"Post-Proc.", "Agua Dulce" ya no se corta
- layerVisBtn: indicador visual por color (azul=#0d99ff visible /
gris=#363b4e oculta) sin depender de texto ni ícono
- layerLockBtn: ámbar=#fbbf24 bloqueada / gris libre
- Mejora contraste de ribbonGroupTitle, viewportTitle,
placeholderTitle, placeholderDesc y viewportPlaceholder
- Agrega border-bottom a ribbonContent para separación visual
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace simple QToolBar with 6-tab functional RibbonBar
(Home / Geometría / Análisis / Tanques / Sistemas / Fabricación)
Each tab shows relevant button groups with icons + text below.
- Replace single 3D placeholder with FourViewport layout
(Perspectiva 3D · Vista Lateral · Body Plan · Vista de Planta)
divided by draggable cyan splitters — standard naval CAD layout.
- Replace ProjectTreePanel with DELFTship-style LayersPanel:
10 preset layers with visibility toggle, lock toggle, and color swatch.
- Add pipe/cable routing modules (MOD_ROUTING_PIPES=21, MOD_ROUTING_CABLES=22)
visible in Sistemas ribbon tab and main menu under Sistemas → Routing 3D.
- Move Units/Language info from toolbar to status bar (cleaner ribbon).
- Update dark.qss: new styles for ribbon tabs, viewports, layers panel,
viewport splitter handles (accent blue), placeholder text.
- All 12 Sprint 0 tests pass.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>