Skip to content

Drawings: the Center Mark button places a centre mark on a picked circle or arc #25430

Todo

Description

@CamWight

The Center Mark button on the Drawing ribbon (DRAWING ANNOTATE > SYMBOLS) is still a planned entry, so there is no way to place a centre mark from the app.

The engine side is done: @armin0411's #16132 added drawing.center_mark.add / edit / inspect / remove (and the centre line commands), and #16144 added automatic marks. Only the button is missing.

Today: planned!("drawing.centre_mark", "Center Mark", "4896") at crates/engine/src/cmd/drawing_ui.rs:76.

What this adds

  • The Center Mark button becomes a real tool: pick a circle or arc in a drawing view and it places a centre mark with drawing.center_mark.add.
  • The tool stays active so you can pick more circles, like Inventor's Center Mark; Esc ends it.
  • A picked mark can be removed with Delete and undone with Ctrl+Z, through the existing commands.
  • Overshoot uses the command's default; editing it can follow in the mark's panel.

Out of scope

Part of #4896.

Activity

  1. added
    area:ui
    needs-triage
    in progress
    on Dec 2, 2026
  2. github-actions commented on Dec 2, 2026

    @github-actions
    Contributor

    Claimed by @CamWight through #25431. The claim lapses after 14 days without pushes.

  3. CamWight commented on Dec 2, 2026

    @CamWight
    ContributorAuthor

    Plan for the Center Mark button, before any code:

    What it does. The button starts a tool on the sheet. Hovering a circle or arc in a view shades it. A click places a centre mark on it through drawing.center_mark.add, with the command's default overshoot. The tool stays in hand for more holes, and Esc puts it away. Any other line says "Pick a circle or arc" in the status bar. Each mark is one undo step, so Ctrl+Z takes it back. I'll check in the app that Delete on a selected mark removes it, and add that if it doesn't.

    How. The Dimension tool already picks an edge in a view and names it the way drawing.center_mark.add takes it (drawing_workspace/dimension.rs: pick, shape_of, the hover cache, the shading). So the first commit moves that into one shared edge_pick module with no change in behaviour, and both tools use it. No second copy of the edge naming. The pick costs what the Dimension tool's does: one line_at per pointer rest.

    Tests first. A harness test starts the tool. A click on a hole's edge adds one mark. A click on a straight edge adds none and says why. Esc ends the tool. The Dimension tool's tests stay as they are.

    Design. It follows docs/design/drawing-ui/README.md (Annotate › Symbols › Centre Mark) and D21. The C shortcut from D30 is left out for now, since D30 asks for a check against the app's shortcuts first.

    Out of scope. Centre lines (#19942), automatic marks (#16144), and editing the overshoot.

    @Nathan-Dane, one question: do you want a small right panel for this tool, like Dimension's and Detail View's, or just the status line? I'll go with a one-line panel saying what a click does, unless you'd rather not.

  4. CamWight commented on Dec 2, 2026

    @CamWight
    ContributorAuthor

    Here's the plan for every button in #25431. Each button becomes a tool that runs a command the engine already has. Nothing changes in the engine or in crates/geom, apart from one paper form for Section View (below).

    How all of them fit. Each button keeps its ribbon id. The Drawing workspace's start opens its tool or runs its command. can_open_options names the same ids through runs_for_the_sheet, as in #18986. So a button is enabled exactly when start handles it. Whichever of #18986 and #25431 lands second keeps both sets of arms. Scripts still call the real commands. Each change is one undo step, and errors go to the status line.

    Order of commits, one per button:

    1. Edge picking, shared. The Dimension tool's pick, hover cache and shading move into one edge_pick module, with no change in behaviour. Center Mark and Balloon both use it, so there is one way to name a picked edge.
    2. Center Mark (Drawings: the Center Mark button places a centre mark on a picked circle or arc #25430): as in the plan above. Pick a circle or arc, and drawing.center_mark.add runs. The tool stays in hand, and Esc ends it.
    3. Pictorial View, Flat Pattern View, Model Dimensions (Drawing ribbon: Pictorial View, Flat Pattern View and Model Dimensions are greyed out #18995). Pictorial View opens Base View's placement with the isometric orientation chosen. Flat Pattern View runs drawing.view.flat on the open sheet. Model Dimensions runs drawing.dimension.from_model on the selected view. With no view selected, the status line asks for one.
    4. Balloon (Drawings: a balloon can't be placed or edited by hand from the app #19029). Click a part's edge in a view, then click where the balloon goes, and drawing.balloon.add runs. A selected or double-clicked balloon opens its panel, which runs drawing.balloon.edit.
    5. Revision Tag (Drawings: the Revision Tag button can't be used, so a revision tag can't be placed from the app #19033). Each click on the sheet places a tag with the newest revision's letter. A double-click on a tag opens its panel. select.set and Delete take a tag like a note.
    6. Move to sheet, Copy to sheet (Drawings: a view can't be moved or copied to another sheet from the app #19027). A selected view's right-click menu and the two buttons list the drawing's sheets. A pick runs drawing.view.move_to_sheet or drawing.view.copy_to_sheet. The status line says where the view went.
    7. Insert Image and a title block logo (Drawings: an image or a title block logo can't be added from the app #19031). Insert Image asks for a PNG or JPEG with the app's file dialog. The image then follows the pointer at its own size: its pixels at the drawing's resolution, shrunk to fit the sheet if needed. A click places it with drawing.image.add. A right-click on a title block text cell offers Logo… and Remove Logo, which run drawing.title_block.logo.
    8. Section View (Drawings: the Section View button can't be used, so a section view can't be made from the app #19019). Pick the parent view, or start from a selected view. Click the cutting line's two ends, snapping to model points with the same picking as Dimension. The section's box then follows the pointer on the projection side, and a click places it. The engine takes the line on the parent's plane in model millimetres. So drawing.view.section gains a paper form, line_mm, converted by the same rule the Detail command uses for boundary_mm. The preview is the view's box only, so no model is cut while the pointer moves.

    Tests first, in each area's existing test file. Each button is enabled with a drawing open, and a click runs its command or opens its tool. Each command runs in one undo step, and Esc ends the tool. The tests that list these buttons as faded change as each one goes live. Every slice also gets 3 or 4 planted faults.

    Pictures: each tool in the real app, with a plain test part, at 1280×720 and in a small window.

    Left out, because someone else holds them: GD&T and Datum (#7362), Break View (#7578), Hole Callout (#22250), Auxiliary View (#25374). Update Drawing, Check Drawing and Revision Table stay in #18986.

    @Nathan-Dane, the drawing ribbon and its tools are yours. This only wires buttons that already have a place in your design. The question in the Center Mark plan (a small right panel, or the status line only) goes for Insert Image and Section View too. Your thoughts on the look are very welcome.

  5. Nathan-Dane commented on Dec 3, 2026

    @Nathan-Dane
    Contributor

    Please use the small right panel with a one-line instruction. That keeps the guidance visible and consistent with Dimension and Detail View.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uiin progressneeds-triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions