Browse Source

inner tick marks

Lukas Goldschmidt 1 month ago
parent
commit
195e692841
1 changed files with 26 additions and 0 deletions
  1. 26 0
      src/astro_mcp/chart_renderer.py

+ 26 - 0
src/astro_mcp/chart_renderer.py

@@ -299,6 +299,32 @@ def render_natal_wheel(
         dwg.add(dwg.line(start=(t1x, t1y), end=(t2x, t2y),
                           stroke=stroke, stroke_width=width))
 
+    # ── Degree tick marks on inner zodiac ring ───────────────────────
+    for deg_tick in range(0, 360):
+        t_angle  = _svg_angle(float(deg_tick), asc_lon)
+        is_sign  = deg_tick % 30 == 0
+        is_10    = deg_tick % 10 == 0
+        is_5     = deg_tick % 5 == 0
+
+        if is_sign or is_10:
+            tick_len = 10
+            stroke   = theme["tick_major"]
+            width    = 1.5
+        elif is_5:
+            tick_len = 7
+            stroke   = theme["tick_major"]
+            width    = 1.0
+        else:
+            tick_len = 3
+            stroke   = theme["tick_minor"]
+            width    = 0.8
+
+        # Ticks extend INWARD from the zodiac inner edge
+        t1x, t1y = _polar_to_cartesian(wheel_cx, wheel_cy, r_zod_in, t_angle)
+        t2x, t2y = _polar_to_cartesian(wheel_cx, wheel_cy, r_zod_in - tick_len, t_angle)
+        dwg.add(dwg.line(start=(t1x, t1y), end=(t2x, t2y),
+                          stroke=stroke, stroke_width=width))
+
     # ── House sectors ────────────────────────────────────────────────
     r_cusp_in  = _r(outer_r, _R_CUSP_INNER)
     r_hnum     = _r(outer_r, _R_HOUSE_NUM)