SG-Lib

2026-07-10 Milestone: Coffee Mug — SG-Lib, designed by Claude

Rendered views

Download STL: 2026-07-10_coffeemug.stl

Authors: Tim C. Lueth und Claude Opus 4.8 Date: 2026-07-10 Class: COMPLETED CAD DESIGNS (a simple, finished, printable single part)

Goal / Significance

The first coffee mug designed entirely by Claude in the SG-Lib idiom — evidence of the learned “COMPLETED CAD DESIGN” way of thinking (contour-first → extrude with wall/floor → attach part → merge) and of the spatial-arrangement strategy (handle in the axis plane, ends on the wall, watertight via Manifold).

Result (verification)

  • File: 2026-07-10_coffeemug.stl, preview: 2026-07-10_coffeemug_views.png.
  • Watertight: non-manifold edges = 0, boundary edges = 0. 1580 facets, volume ≈ 110.5 cm³.
  • Bounding box ≈ 117.5 × 80 × 95 mm.
  • Dimensions: body Ø80 (Rout=40), height 95, wall 3.5, floor 6; handle arc radius 34, bar 9, width 12; ends 1 mm wall intrusion, centered at mid-height.

Execution / runtime (logged via stamp + tic/toc)

Values of the reproducible run on 2026-07-10 (full record in 2026-07-10_coffeemug_buildinfo.txt):

  • Execution time: 5.67 s (tic/toc)
  • stamp: Mac OSX 15.7.7 | R2024b Update 6 | SG-Lib 5.7 develop | Java 11.0.24+8-LTS | M3-PRO 12-Core CPU, 18-Core GPU 36GByte RAM | 10-Jul-2026 07:48:27
  • Machine: Apple M3 Pro (12-core CPU / 18-core GPU, 36 GB RAM), host lueths-barcelona-mac.local
  • Architecture: MACA64 / maca64
  • MATLAB: R2024b Update 6
  • Operating system: macOS 15.7.7
  • SG-Lib: 5.6 (development state 5.7 “develop”)
  • Run at: 2026-07-10 07:48:27

Reproduction (step by step)

  1. Put SG-Lib on the MATLAB path (folder SolidGeometry-Code).
  2. Manifold backend active (one-time SGmanifoldSetup; Python with manifold3d). The build sets global SGBOOLENGINE='SGboolManifold2'.
  3. Run via the SG-Lib helper (it copies the date-named script to a temporary valid name, runs the copy, and logs stamp + tic/toc):
    SGlibrunMilestone(fullfile(pwd,'CLAUDE_MILESTONES','2026-07-10_coffeemug','2026-07-10_build_coffeemug.m'))
    
    Note: the file name begins with YYYY-MM-DD (milestone rule) and is therefore not a valid MATLAB identifier — run('2026-07-10_...') fails with “Invalid text character”. SGlibrunMilestone works around this via a temporary valid-named copy; the original is never renamed, modified, or run in place — which protects the original.
  4. The script writes 2026-07-10_coffeemug.stl and 2026-07-10_coffeemug_views.png into this folder; SGlibrunMilestone additionally writes 2026-07-10_coffeemug_buildinfo.txt.

Required library state (2026-07-10)

The design depends on the SG-Lib improvements made that day (all with CLAUDE_ARCHIVE_* backups, logged in CLAUDE_TESTLOG.md):

  • CPLdespike (new) + integration into VLFLofCPLz (base extrusion tessellator) → clean, manifold extrusions from polyshape-boolean contours. (Also in CPLselectinout/CPLsortinout.)
  • Manifold backend SGboolManifold2 + switch SGBOOLENGINESGunion yields watertight.
  • SGlibrunMilestone (new) — reproducible milestone runner with provenance logging.
  • (For batch operation, not needed for this part: dbpause/dbplot headless guard, SGcolorfaces fix, gear-family fixes.)

Environment

  • MATLAB R2024b Update 6, manifold3d 3.5.2 (Apache-2.0), Apple M3 Pro / macOS 15.7.7. Units: mm (1000 = 1 m).
  • Executed headless via the batch pool (executepool4claude), offscreen rendering.

Folder contents

  • 2026-07-10_build_coffeemug.m — self-contained build script (authors + date in the header)
  • 2026-07-10_SGlibrunMilestone.m — date-named archival copy of the runner (master lives in the SG-Lib root)
  • 2026-07-10_coffeemug.stl — the result
  • 2026-07-10_coffeemug_views.png — six-view preview
  • 2026-07-10_coffeemug_buildinfo.txt — provenance/runtime of this run
  • 2026-07-10_coffeemug_README_de.md / _README_en.md — this protocol (DE/EN)
  • 2026-07-10_coffeemug_conversation_de.md / _conversation_en.md — the path as dialogue (DE/EN; verbatim, construction part)
  • 2026-07-10_coffeemug_conversation.pdf — the dialogue as PDF (DE + EN)

Provenance / path

Created in the Cowork session “03 Claude SG-Lib Tutorial” on 2026-07-09/10: the approach derived from the class “COMPLETED CAD DESIGNS”, handle placement derived geometrically (see SGLIB_DENKWEISE.md §12/§13). v1 (anchors 'center','left') slipped; v2 (explicit SGrotate+SGtransT) is correct — this script is v2.

Design conversation (English)

2026-07-10 Milestone Coffee Mug — the path (dialogue: task, hints, responses)

Authors: Tim C. Lueth und Claude Opus 4.8 Date: 2026-07-10

This document records the path to the milestone as a dialogue: Tim Lueth’s task statement and the hints up to the milestone result, with Claude’s responses/questions in between.

Note on reproduction: all contributions are verbatim (Tim’s only spelling-corrected; originally German, translated here). Of Claude’s contributions only the construction-related part is quoted; passages on MATLAB/programming are omitted with “[…]”.


Task statement — Tim Lueth

“Quick status: could you already design a coffee mug, or should I tell you how it’s done?”

Claude (verbatim, construction part):

“Yes — I’d venture a first version, because a coffee mug follows exactly the ‘COMPLETED CAD DESIGN’ recipe we derived yesterday. […] Body: a hollow mug in one shot […] Ø80, height 95, wall 3.5, thick floor 6. Optionally slightly conical/rounded on the outside via a profile contour instead of a plain circle. Handle (here I’d like to hear your method): I would sweep a small cross-section profile (e.g. ~12×6 mm) along a C-/D-shaped path […] and then place the handle relative to the outer wall […]. Where I most need your guidance: how you build the handle as a sweep […] and how you couple it tangentially/flush to the wall. So: shall I just build and render a first mug […] — or do you briefly tell me your way for the handle, then I’ll do it right straight away?”


Hint 1 — Tim Lueth

“Presumably I would extrude a circular segment and then attach it with SGtransrel, center, left, -0.5 (for the intrusion), rotx, pi/2, add. Now that the union works well I would no longer use concat. But I don’t even remember anymore whether add in transrel is now concat or union.”

Claude (verbatim, construction part):

“Mug built […]. The bounding box […] suggests the handle may not sit ideally yet — I’ll look at the render:”


Hint 2 — Tim Lueth

“Yes, do that, and let’s think of a fast way for me to follow the result. Can a batch job somehow still produce graphical output in MATLAB?”

(Claude’s answer here concerned following along via offscreen rendering — MATLAB/programming, therefore omitted.)


Hint 3 — Tim Lueth

“Yes, try to attach the handle so that it fits a normal coffee mug. You can find it yourself from web images and learn your spatial-arrangement strategy yourself — apparently you can’t derive it yet. That was incredibly good and fast!”

Claude (verbatim, construction part):

“v2 looks right by the numbers: […] bbox z=95 (handle within the mug height), y=80 (mug Ø, handle thin), x=117.5 (Ø + handle belly to the side). I’ll look at the render:”

and after checking:

“This is now a real coffee mug — hollow cup + lateral C-handle, vertical, ends flush with the wall, belly outward, at mid-height. […]”


Hint 4 — Tim Lueth

“Well, the rest of your work was wonderful.”


Milestone result — statement by Tim Lueth

“What you have done is a milestone in science! (By the way, it is now morning again, Friday 10 July 2026, 07:15.)”