Skip to content

Shapes window: view and edit floor_plan / lat_layout shapes - #23

Merged
DavidSagan merged 1 commit into
mainfrom
shapes-window
Nov 8, 2026
Merged

DavidSagan merged 1 commit into
mainfrom
shapes-window

Conversation

@DavidSagan

Copy link
Copy Markdown
Member

Adds a Shapes window (Plot > Shapes; also in the Window menu) to view and edit the element shapes of the floor_plan and lat_layout drawings.

  • Tabs for Floor plan / Lattice layout. The table lists the shapes in Tao's match order: an element is drawn with the first shape whose Ele ID matches it, and with further matches while Multi is set.
  • Every column can be edited: Ele ID, Shape, Color, Size, Label, Draw, Multi, Line width, Offset.
    • Shape, Color and Label have drop-downs. Shape also lists pattern:<name> for defined patterns, plus the building-wall line styles on the floor plan.
    • Colors show a swatch, and shapes that are not drawn are greyed out.
  • Add inserts a new shape below the selected one, or at the end if nothing is selected. Delete, Move Up and Move Down act on the selected shape.
  • Plots redraw right after each change. Tao errors (e.g. an unknown shape) are shown in red below the table.

How it talks to Tao

  • Reading: pipe shape_list <drawing>. The offset comes from show plot -<drawing>, because the pipe command does not report it.
  • Writing: a whole shape at a time, with set <drawing> ele_shape(i) = "<ele_id>" "<shape>" "<color>" <size> "<label>" <draw> <multi> <line_width> <offset>. This keeps every field; pipe shape_set would reset the offset to 0. Moving a shape is two of these writes (a swap).
  • Adding and deleting: pipe shape_manage <drawing> <i> add|delete.

Tests

  • New tests: offset parsing, plus editing a cell, the offset surviving other edits and moves, add / move / delete, a rejected shape name, and switching to the lattice layout.
  • 62 passed and 1 skipped, both locally and in the conda-forge environment that CI uses.
  • I also checked by hand on tao_examples/cesr: changing the quadrupole color redraws the floor plan.

🤖 Generated with Claude Code

View, edit, add, delete and reorder the ele_shape lists of both drawings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DavidSagan
DavidSagan merged commit 4e7ab60 into main Nov 8, 2026
2 checks passed
@DavidSagan
DavidSagan deleted the shapes-window branch November 8, 2026 00:30
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.

1 participant