Skip to content

Drawing W20e: automatic centre marks for drawing views #9462

Open

Description

@armin0411

Part of #4896, for drawings: let a drawing view automatically mark eligible circular features, including hidden holes. Marks follow model and view changes, and users can persistently exclude individual generated marks.

Proposed design

Use a per-view opt-in rule, proposed as Option<AutoMarks { exclude: Vec<ModelEdge> }>. Save the rule and exclusions, not derived strokes. Recompute candidates from the view's current shown model; enabling or updating the rule repeatedly must not accumulate records. Exclusions use persistent model references, including occurrence paths, and remain saved when a reference is lost or suppressed.

Read circular geometry through existing facilities. Body::planar_edges accepts edge indices for one evaluation and returns exact planar segments where available; indices must never become saved identity. ModelEdge carries the body, originating feature, persistent edge name and occurrence path. Reuse or extract the current named-edge resolution and its lost, suppressed, ambiguous and unmeasurable statuses where their contracts fit.

The existing exact_arcs path starts from projected line runs, after hidden lines can have been filtered out. It is useful precedent for projection and placement, but cannot itself discover every hidden hole. Enumerate eligible edges independently of the visible-line filter, respecting the bodies and occurrences the view includes. Mesh bodies and geometry that cannot be read as a face-on circle need an explicit, bounded outcome, not a guessed mark.

Use W20d's shared paper geometry, centre-mark classification, paper-mm sizes and shared dash representation. Integrate with the same scene assembly and cached provider as manual marks; do not introduce a second mark renderer or dash system. Surface exclusions and unresolved references through the agreed command and reporting interfaces.

Acceptance tests

  • Enable the rule on one view of an analytic part with four face-on holes. It produces one mark per eligible centre; a repeated update adds no duplicates. Add a fifth hole and the next update adds its mark.
  • Two semicircular edges forming a rim produce one mark. A face-on through hole with front and back rims produces one mark. A concentric counterbore produces one mark sized from the largest eligible circle. Candidate ordering does not change the result.
  • A quarter-round fillet and an isolated partial arc do not become automatic marks under the proposed conservative full-rim rule. A circular edge seen obliquely produces no circular mark. Include a split rim whose pieces together form a complete circle, and incomplete or overlapping arc pieces that must not be mistaken for one.
  • A completely occluded hole is considered even when hidden view lines are off. Test it separately from a body or occurrence excluded by the view's source/hide settings, which must not produce marks. If the necessary view filtering is not yet available, document the limitation and test integration when it lands.
  • Two placed occurrences at different positions yield two marks with distinct paths. Excluding one leaves the other. Test coincident projected centres from unrelated occurrences or features: they must not be silently conflated merely because their paper coordinates match.
  • Exclude a generated mark through its persistent source association. It remains excluded after save/reopen, view movement and scale changes; a lost or suppressed exclusion remains recorded and is reported, and restoring the model or undoing the change restores the exclusion. Explicit removal permits the mark again. Split and ambiguous remaps never silently attach an exclusion to an unrelated feature.
  • Change hole size, position and model topology; marks move or resize with the resolved feature, disappear when no longer eligible, and return after undo. A changed view direction re-evaluates eligibility. Moving the view translates paper output; scale changes preserve W20d's paper-mm overshoot and dash sizes.
  • Rule changes and exclusions invalidate the cached result even if model state and resolved view settings are unchanged. One-shot scene construction and the cached provider agree after edits, undo/redo, save/reopen and a model update. Test stale-result rejection at the W14 publication boundary when that boundary exists.
  • Manual and automatic marks use the same W20d geometry and styling for the same circle and settings. Supported exports preserve the pattern; report unsupported writer behavior. Include bounded input and record-count tests, invalid references and hostile values without mutation or panic.
  • Include a small real-program reproduction, descriptive image and expected versus actual behavior in the implementation PR.

Dependencies and open decisions

Phases

  1. Settle W20d's shared function, naming and classification with its current work. Resolve grouping and exclusion semantics against analytic models.
  2. Add the validated per-view rule, persistent exclusions and command/inspection lifecycle using the pending drawing-format convention. Test backwards compatibility, undo and reference statuses.
  3. Discover and group face-on circular candidates independently of line visibility, retain occurrence identity, apply exclusions, and feed W20d's paper function. Keep work and output bounded.
  4. Integrate scene construction, cache invalidation and supported export reporting. Test model and view changes, provider parity and hidden holes. Integrate W14 publication and deferred-update behavior when its interface exists.
  5. Run targeted checks and repository CI, then capture the real-program evidence for the implementation PR.

Activity

  1. added
    needs-triage
    on Oct 30, 2026
  2. armin0411 commented on Oct 30, 2026

    @armin0411
    ContributorAuthor

    /claim

  3. added
    in progress
    on Oct 30, 2026
  4. github-actions commented on Oct 30, 2026

    @github-actions
    Contributor

    Claimed by @armin0411. Please open a draft PR referencing #9462 within 72 h; the claim lapses otherwise. /unclaim releases it.

  5. added 2 commits that reference this issue on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in progressneeds-triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions