Skip to content

feat(examples): add cylindrical tank calculation sources - #91

Closed
viktar-b wants to merge 1 commit into
mainfrom
cursor/cylinder-tank-authoring-2924
Closed

viktar-b wants to merge 1 commit into
mainfrom
cursor/cylinder-tank-authoring-2924

Conversation

@viktar-b

@viktar-b viktar-b commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

What changed

Adds a cylindrical tank example under examples/cylinder-tank. It follows the authoring method: shared quantity metadata, constrained .cso.py formulas, generated bindings, and an independent reference file. The root README points at the new walkthrough.

The sources are separate calculation shapes:

  • shared float and int metadata in quantities.py
  • a reusable circle in a nested Python-identifier path, with math.pi and a hidden radius
  • an explicit millimetre-to-metre conversion
  • integer course and bolt counts, including math.ceil and max, with a callee default
  • conditional liquid fill using a comparison chain
  • plan offsets that reuse c_{off} in x-axis and y-axis scopes, with degree-to-radian trigonometry, hypot, and atan2
  • a shell that composes those calculations, groups the plate formulas in a document_section, and keeps developed area documented without returning it
  • a parent estimate that forwards the inside area, with assumptions, a notation legend, and a diagram
  • a two-shell comparison that qualifies repeated glyphs
  • a standalone circle transcription that preserves the published glyphs d, r, C, and A and records the reference URL

reference.json binds hand-derived binary64 results to the source closure, function, and resolved inputs. Expected numbers were calculated from the formulas outside cso, then checked against execution. They were not copied from the execution being verified.

How it was checked

From a repository setup (Node 24, Python 3.12, the cs-object wheel, and npm run build:cli):

  • cso_python bindings examples/cylinder-tank and bindings --check passed
  • cso verify --reference passed for the default estimate, empty fill, full fill, bearing 90 degrees, three courses, both shell comparisons, and the published circle
  • a plain Python consumer passed for area pi, 48 bolts, radial offset 5 m, mass ratio 1.25, and equal-diameter ratio 1
  • html --check-layout passed for the default estimate, the default comparison, and the published circle
  • pdf passed for those same three documents

Source-to-document consistency, independent reference agreement, document content, and automated rendering passed on the generated HTML and PDF. The CLI still leaves visualInspection pending. Page rasters of the 4-page estimate, 4-page comparison, and 1-page published circle were reviewed for missing steps, notation, and clipping; no missing section or clipped formula was found. That review is not human engineering approval.

Variant input cases were verified numerically and were not rendered to PDF. The workspace test suite and Windows checks were not run; this change is example sources and the root README pointer.

Open in Web Open in Cursor 

Exercise shared metadata, nested reuse, unit conversion, integer counts,
conditional fill, notation scopes, composition, repeated calls, and a
glyph-faithful circle transcription with an independent reference file.

Co-authored-by: Viktar Beliakou <viktar-b@users.noreply.github.com>
@vercel

vercel Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
calculation-source-object Ready Ready Preview Oct 6, 2026 11:17am UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 463ec374 Deployed Oct 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants