Fix: marca de tope en boyas Pillar/Barrel/Spar depende del catlam
El bloque PILLAR (boyshp=4) siempre usaba drawTopmarkConeSmall (triángulo) sin importar el catlam, causando que boyas VERDES (babor, catlam=1) mostraran un triángulo en vez del cuadrado correcto. Todas las formas genéricas (Pillar, Barrel, Spar) ahora consultan el catlam: catlam 1/3 (PORT, babor) → drawTopmarkCan (cuadrado) catlam 2/4 (STBD, estribor) → drawTopmarkCone (cono) sin catlam (desconocido) → cono pequeño genérico Las formas puras Can/Cone ya tenían el topmark correcto; sin cambio. Afecta principalmente a boyas BOYLAT boyshp=4 (Barranquilla, Miami pilares). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+13
-4
@@ -631,8 +631,10 @@ function _encBuoyCanvas(opts) {
|
|||||||
// ── SPAR / ESPEQUE — tall thin cylinder ────────────────────
|
// ── SPAR / ESPEQUE — tall thin cylinder ────────────────────
|
||||||
const sw = bW * 0.24, sparTop = bTop - bH * 0.40;
|
const sw = bW * 0.24, sparTop = bTop - bH * 0.40;
|
||||||
drawCylinder(cx - sw/2, sparTop, sw, bH * 1.40, css.length ? css : [c1]);
|
drawCylinder(cx - sw/2, sparTop, sw, bH * 1.40, css.length ? css : [c1]);
|
||||||
// Topmark above
|
// Topmark: spar lateral = same rule por catlam
|
||||||
drawTopmarkConeSmall(cx, sparTop - 2, sw * 1.4, c1);
|
if (cl === 1 || cl === 3) drawTopmarkCan (cx, sparTop - 2, sw * 1.4, c1);
|
||||||
|
else if (cl === 2 || cl === 4) drawTopmarkCone(cx, sparTop - 2, sw * 1.4, c1);
|
||||||
|
else drawTopmarkConeSmall(cx, sparTop - 2, sw * 1.4, c1);
|
||||||
|
|
||||||
} else if (isBar) {
|
} else if (isBar) {
|
||||||
// ── BARREL (Barril) — fat ellipsoid with stave lines ───────
|
// ── BARREL (Barril) — fat ellipsoid with stave lines ───────
|
||||||
@@ -653,7 +655,9 @@ function _encBuoyCanvas(opts) {
|
|||||||
ctx.strokeStyle = _darken3D(c1, 0.45); ctx.lineWidth = 0.7; ctx.stroke();
|
ctx.strokeStyle = _darken3D(c1, 0.45); ctx.lineWidth = 0.7; ctx.stroke();
|
||||||
});
|
});
|
||||||
_st(ctx, cx, bcy - ry, stTop);
|
_st(ctx, cx, bcy - ry, stTop);
|
||||||
drawTopmarkConeSmall(cx, stTop, bW * 0.44, c1);
|
if (cl === 1 || cl === 3) drawTopmarkCan (cx, stTop, bW * 0.40, c1);
|
||||||
|
else if (cl === 2 || cl === 4) drawTopmarkCone(cx, stTop, bW * 0.42, c1);
|
||||||
|
else drawTopmarkConeSmall(cx, stTop, bW * 0.44, c1);
|
||||||
|
|
||||||
} else if (isSuper) {
|
} else if (isSuper) {
|
||||||
// ── SUPER-BUOY / LANBY — wide low platform + tower ─────────
|
// ── SUPER-BUOY / LANBY — wide low platform + tower ─────────
|
||||||
@@ -678,7 +682,12 @@ function _encBuoyCanvas(opts) {
|
|||||||
const sw2 = pw * 0.7;
|
const sw2 = pw * 0.7;
|
||||||
drawCylinder(cx - sw2/2, bTop, sw2, bH*0.4, [_darken3D(c1, 0.08)]);
|
drawCylinder(cx - sw2/2, bTop, sw2, bH*0.4, [_darken3D(c1, 0.08)]);
|
||||||
_st(ctx, cx, bTop, stTop);
|
_st(ctx, cx, bTop, stTop);
|
||||||
drawTopmarkConeSmall(cx, stTop, bW * 0.50, c1);
|
// Topmark depends on lateral significance (catlam), NOT on hull shape.
|
||||||
|
// PORT (babor, catlam 1/3) → cuadrado (can)
|
||||||
|
// STBD (estribor, catlam 2/4) → cono (cone)
|
||||||
|
if (cl === 1 || cl === 3) drawTopmarkCan (cx, stTop, bW * 0.42, c1);
|
||||||
|
else if (cl === 2 || cl === 4) drawTopmarkCone(cx, stTop, bW * 0.44, c1);
|
||||||
|
else drawTopmarkConeSmall(cx, stTop, bW * 0.50, c1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── Waterline ──────────────────────────────────────────────────────────
|
// ── Waterline ──────────────────────────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user