Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edit those columns by hand, then re-run the script.
the feature-tree level) · `done` (regenerates, round-trips save/load, undo/redo, command +
MCP, tests) · `verified` (done + golden/e2e coverage + reviewed on macOS).

**Totals:** 1000 rows — not started: 836 · in progress: 136 · done: 28 · verified: 0
**Totals:** 1000 rows — not started: 834 · in progress: 138 · done: 28 · verified: 0

## Platform (SPEC §2–§6, §8–§9)

Expand Down Expand Up @@ -69,7 +69,7 @@ MCP, tests) · `verified` (done + golden/e2e coverage + reviewed on macOS).
| `P/inspector` | Inspector panel instead of modal PropertyManagers (§6.2) | in progress | ForgeApp | — | — | PropertyManager panels (OK/Cancel, groups, selection boxes) for every UI operation; read-only entity descriptors |
| `P/handles` | Direct-manipulation handles (§6.3) | not started | — | — | — | |
| `P/explainable-failures` | Explainable failures in the viewport (§6.4) | not started | — | — | — | |
| `P/smart-selection` | Smart selection, filters, select-other (§6.5) | not started | — | — | — | |
| `P/smart-selection` | Smart selection, filters, select-other (§6.5) | in progress | ForgeCommands / ForgeRender / ForgeUI | Tests/ForgeCommandsTests/SelectionPickingTests.swift, Tests/ForgeUITests/SelectionWorkflowTests.swift, Tests/ForgeRenderTests/CandidatePickingTests.swift | execute:selection.set_filter, execute:view.pick_candidates | all/body/face/edge filters; occluded candidate cycling via Tab/ribbon/menu; hidden-body exclusion and style parity; radial picker, vertex filters, hover and chain selection pending |
| `P/input-devices` | Trackpad gestures, 3Dconnexion, Pencil/Sidecar, keymaps (§1.4, §6.9) | in progress | ForgeApp | — | — | mouse + trackpad written, unverified; 3Dconnexion/keymaps pending |
| `P/accessibility` | VoiceOver, keyboard-only, high contrast, Dynamic Type (§6.10) | not started | — | — | — | |
| `P/performance` | Performance targets + benchmarks with regression alerts (§6.11, §9) | not started | — | — | — | |
Expand Down Expand Up @@ -160,7 +160,7 @@ MCP, tests) · `verified` (done + golden/e2e coverage + reviewed on macOS).
| `7.1/tools/sketchxpert/conflict-repair` | ↳ conflict repair | in progress | ForgeSketch | Tests/ForgeSketchTests/SolverTests.swift, Tests/ForgeCommandsTests/SketchCommandTests.swift | — | see parent |
| `7.1/tools/check-sketch-for-feature` | Tools: Check Sketch for Feature | in progress | ForgeSketch | Tests/ForgeSketchTests/SolverTests.swift, Tests/ForgeCommandsTests/SketchCommandTests.swift | check_sketch | loops, nesting, open ends, branches, crossings; exact areas |
| `7.1/tools/repair-sketch` | Tools: Repair Sketch | not started | ForgeSketch | — | — | |
| `7.1/tools/sketch-contours-regions-selection` | Tools: sketch contours/regions selection | in progress | ForgeSketch | Tests/ForgeSketchTests/SolverTests.swift, Tests/ForgeCommandsTests/SketchCommandTests.swift | check_sketch | loop/region detection done; picking a region for a feature lands with extrude (M2) |
| `7.1/tools/sketch-contours-regions-selection` | Tools: sketch contours/regions selection | in progress | ForgeSketch | Tests/ForgeCommandsTests/SketchRegionTests.swift, Tests/ForgeUITests/ExtrudeRegionSurfaceWorkflowTests.swift | execute:sketch.regions, execute:body.extrude | closed-loop region discovery and point picking; stable complete-curve selectors, holes and nested islands; crossing/branching intersection cells pending |
| `7.1/tools/sketch-ink-equivalent` | Tools: Sketch Ink equivalent | not started | ForgeSketch | — | — | |
| `7.1/tools/sketch-ink-equivalent/pencil` | ↳ pencil | not started | ForgeSketch | — | — | |
| `7.1/relations/coincident` | Relations: coincident | in progress | ForgeSketch | Tests/ForgeSketchTests/SolverTests.swift, Tests/ForgeCommandsTests/SketchCommandTests.swift | execute:sketch.add_relation | round-trips document.save/open (golden test); not yet a feature-tree item (M2) |
Expand Down Expand Up @@ -223,12 +223,12 @@ MCP, tests) · `verified` (done + golden/e2e coverage + reviewed on macOS).
| `7.2/boss-base-and-cut/extrude` | Boss/base & cut: extrude | in progress | ForgeKernel / ForgeCommands | Tests/GoldenModelTests (013–016), Tests/ForgeCommandsTests/SketchCommandTests.swift | execute:body.extrude | kernel-level from sketch profiles (holes, islands); parametric feature, cut and end conditions in M2 |
| `7.2/boss-base-and-cut/extrude/blind` | ↳ blind | in progress | ForgeCommands | Tests/GoldenModelTests (013–016), Tests/ForgeCommandsTests/SketchCommandTests.swift | execute:body.extrude | normal/reverse |
| `7.2/boss-base-and-cut/extrude/through-all` | ↳ through all | in progress | ForgeCommands | Tests/ForgeCommandsTests/FeatureTreeTests.swift | execute:body.extrude | through_all and through_all_both (depth from the bodies in scope) |
| `7.2/boss-base-and-cut/extrude/up-to-next-vertex-surface-offset` | ↳ up to next/vertex/surface/offset | in progress | ForgeCommands | Tests/ForgeCommandsTests/FeatureTreeTests.swift | execute:body.extrude | up_to_vertex; up to next/surface/offset not started |
| `7.2/boss-base-and-cut/extrude/up-to-next-vertex-surface-offset` | ↳ up to next/vertex/surface/offset | in progress | ForgeCommands | Tests/ForgeCommandsTests/SurfaceExtrudeTests.swift, Tests/ForgeUITests/ExtrudeRegionSurfaceWorkflowTests.swift | execute:body.extrude | vertex and planar face/plane limits, oblique caps, true perpendicular offset in both directions; Up To Next, curved limits, Translate Surface and surface-limit draft pending |
| `7.2/boss-base-and-cut/extrude/mid-plane` | ↳ mid-plane | in progress | ForgeCommands | Tests/ForgeCommandsTests/FeatureTreeTests.swift | execute:body.extrude | end_condition mid_plane |
| `7.2/boss-base-and-cut/extrude/thin-feature` | ↳ thin feature | in progress | ForgeKernel / ForgeCommands | Tests/ForgeCommandsTests/FeatureTreeTests.swift, Tests/ForgeKernelTests/KernelTests.swift | execute:body.extrude | closed profiles: one direction (either side), mid plane, two directions; open-profile thin features pending |
| `7.2/boss-base-and-cut/extrude/draft` | ↳ draft | in progress | ForgeKernel / ForgeCommands | Tests/ForgeCommandsTests/FeatureTreeTests.swift, Tests/ForgeKernelTests/KernelTests.swift | execute:body.extrude | Direction 1, inward/outward |
| `7.2/boss-base-and-cut/extrude/direction-2` | ↳ direction-2 | in progress | ForgeCommands | Tests/ForgeCommandsTests/FeatureTreeTests.swift | execute:body.extrude | blind, through all, up to vertex |
| `7.2/boss-base-and-cut/extrude/contour-selection` | ↳ contour selection | not started | ForgeModel | — | — | |
| `7.2/boss-base-and-cut/extrude/contour-selection` | ↳ contour selection | in progress | ForgeCommands / ForgeUI | Tests/ForgeCommandsTests/SketchRegionTests.swift, Tests/ForgeUITests/ExtrudeRegionSurfaceWorkflowTests.swift | execute:sketch.regions, execute:body.extrude | closed-loop selectors with holes, desktop checklist/ray picking, preview/edit/rebuild/save/undo; intersection-cell decomposition pending |
| `7.2/boss-base-and-cut/revolve` | Boss/base & cut: revolve | in progress | ForgeKernel / ForgeCommands | Tests/GoldenModelTests (013–016), Tests/ForgeCommandsTests/SketchCommandTests.swift | execute:body.revolve | about a sketch line, any angle; parametric feature in M2 |
| `7.2/boss-base-and-cut/sweep` | Boss/base & cut: sweep | in progress | ForgeKernel / ForgeCommands | Tests/ForgeCommandsTests/SweepLoftRibTests.swift, Tests/ForgeKernelTests/KernelTests.swift, Tests/GoldenModelTests | execute:body.sweep | Swept Boss/Base and Swept Cut: sketch profile or circular profile along a path chain (lines, arcs, splines); follow path / keep normal constant; merge, scope; feature + UI pages. Guide curves, twist, thin, solid-body sweep: not implemented |
| `7.2/boss-base-and-cut/sweep/profile` | ↳ profile | done | ForgeCommands | Tests/ForgeCommandsTests/SweepLoftRibTests.swift, Tests/ForgeKernelTests/KernelTests.swift | execute:body.sweep | sketch profile (holes kept) or circular_diameter |
Expand Down
37 changes: 37 additions & 0 deletions PROGRESS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# Progress

## Session 12 — 2026-09-30 — Selected contours, planar limits and selection filters

- Added `sketch.regions` with stable complete-curve selectors, holes, nested islands,
analytic areas, sampled display outlines and point hits. `body.extrude.contours`
selects only the requested closed regions, retaining holes and allowing unrelated
open geometry. Changed contour membership fails explicitly instead of rebinding.
- Both desktop extrusion pages now have region checklists and explicit viewport region
picking, including when opened from a still-active sketch drawing tool. Stored
selectors survive feature editing. Qualified IDs compare canonically; async region
queries coalesce and are guarded against document/sketch/scene changes.
- Up To Surface and Offset From Surface support planar face/plane limits, parallel or
oblique, both directions, true perpendicular offset, persistent references, dependency
validation, cuts, previews and feature editing. Exact planar clipping uses geometry-sized
masks. Lost/suppressed supports fail; upstream edits and save/open regenerate correctly.
- All/body/face/edge selection filters and Select Other candidate cycling share ray
picking across macOS, Windows/Linux and `view.pick_candidates`. Tab/ribbon/menu actions
cycle occluded geometry while retaining other selections. Hidden bodies and reference
overlays are excluded. Session filter preferences survive geometry undo but are not saved.
- Fixed curved-edge candidate deduplication so an occluded segment cannot discard the
visible part of that same edge. All-filter picking follows shaded/wireframe styles;
explicit filters can still request geometry regardless of display style.
- Added the analytic selected-annulus/offset-plane golden model and a real MCP
selected-region/extrude/filter/save/open/rebuild workflow.

Validation: build with tests and all **379 Swift tests** pass; **33 golden models**,
**five MCP subprocess workflows**, and **three packaging regressions** pass. Windows
frontend cross-platform and optimized Linux desktop/CLI builds pass. Native runtime
checks run in CI using virtual displays; no app windows were launched on the live desktop.
Matrix synchronization and whitespace checks pass.

Remaining boundaries: contour selection handles complete closed loops, not intersection
cells of crossing/branching sketches. Region hit/display outlines are sampled. Surface
limits require planes, extend a face's supporting plane, reject crossing/behind limits,
and do not support curved limits, Translate Surface, Up To Next or draft+surface.
Select Other cycles candidates; radial UI, vertex filters, hover and tangent-chain
selection remain pending. Broader SolidWorks parity remains unfinished.

## Session 11 — 2026-09-30 — Subentity measurement, visibility and curved slots

- `query.measure` now resolves bodies, faces, edges and vertices, including persistent
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,21 @@ The Slot tool offers straight, centerpoint straight, centerpoint arc and three-p
variants. Curved slots use center/start/end/width or start/end/through/width clicks,
respect construction mode and remain editable with sketch dimensions and relations.
The typed command is `sketch.add_arc_slot`; it rejects collapsed or self-overlapping slots.

Extrusion now supports **Selected Contours**: choose closed regions from the checklist
or enable **Pick Regions in View** and click inside them. Holes stay attached to their
outer region; nested islands are independent. MCP `sketch.regions` returns stable
`selector` arrays for `body.extrude.contours`. Crossing/branching geometry is not split
into intersection cells; changed contour membership produces an explicit reference error.

**Up To Surface** and **Offset From Surface** accept planar faces and reference planes,
including tilted planes, in either direction. Pick a face/plane, then use **Use Selected
Face/Plane**. Offset is perpendicular to the limiting plane; **Beyond surface** reverses
it. The face's supporting plane is extended. Curved limits and draft with these end
conditions remain unsupported.

The **Selection** ribbon offers All Geometry/Bodies/Faces/Edges filters. Click in the
viewport, then **Select Other** or **Tab** to cycle candidates behind the first hit.
Hidden bodies are excluded; other selected entities remain selected. Filters are session
preferences and do not restrict tree/explicit selections. MCP commands are
`selection.set_filter` and `view.pick_candidates`; the existing `view.pick` stays compatible.
1 change: 1 addition & 0 deletions Sources/CForgeWin/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,7 @@ static const char *keyName(WPARAM vk) {
case VK_DELETE:
case VK_BACK: return "delete";
case VK_SPACE: return "space";
case VK_TAB: return "tab";
default: return nullptr;
}
}
Expand Down
1 change: 1 addition & 0 deletions Sources/CForgeWin/gtk/gtk_render.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ static gboolean onKey(GtkEventControllerKey *k, guint keyval, guint code, GdkMod
case GDK_KEY_Delete:
case GDK_KEY_BackSpace: name = "delete"; break;
case GDK_KEY_space: name = "space"; break;
case GDK_KEY_Tab: name = "tab"; break;
default: {
gunichar c = gdk_keyval_to_unicode(keyval);
if (c < 32 || c == 127) return FALSE;
Expand Down
9 changes: 9 additions & 0 deletions Sources/ForgeApp/ForgeApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ struct ForgeApp: App {
Button("Trimetric") { model.setOrientation(.trimetric) }
Button("Normal To") { model.normalToSketch() }.keyboardShortcut("8", modifiers: .control).disabled(!model.canNormalTo)
Divider()
Menu("Selection Filter") {
ForEach(SelectionFilter.allCases, id: \.rawValue) { filter in
Toggle(filter.title, isOn: Binding(get: { model.selectionFilter == filter }, set: { enabled in
if enabled { Task { await model.setSelectionFilter(filter) } }
}))
}
}
Button("Select Other (Tab)") { Task { await model.selectOther() } }.disabled(!model.canSelectOther)
Divider()
Button("Zoom to Fit (F)") { model.zoomToFit() }
Button("Previous View") { model.previousView() }
Divider()
Expand Down
32 changes: 29 additions & 3 deletions Sources/ForgeApp/PMPages.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ struct OperationPage: View {
.help("Reverse Direction")
.disabled(model.form.endCondition == .midPlane || model.form.endCondition == .throughAllBoth)
Picker("End condition", selection: $model.form.endCondition) {
ForEach(EndConditionUI.allCases.filter { op == .cutExtrude || !model.bodies.isEmpty || $0.needsDepth || $0 == .upToVertex }, id: \.self) {
ForEach(EndConditionUI.allCases.filter { op == .cutExtrude || !model.bodies.isEmpty || $0.needsDepth || $0 == .upToVertex || $0.needsSurface }, id: \.self) {
Text($0.rawValue).tag($0)
}
}
Expand All @@ -89,6 +89,15 @@ struct OperationPage: View {
PMField(label: "Vertex Y", text: $model.form.vertexY, unit: "mm")
PMField(label: "Vertex Z", text: $model.form.vertexZ, unit: "mm")
}
if model.form.endCondition.needsSurface {
PMField(label: "Face or plane", text: $model.form.surface)
Button("Use Selected Face/Plane") { model.useSelectedExtrudeSurface() }
PMNote(text: "Planar limits only. Faces use their supporting plane.")
if model.form.endCondition == .offsetFromSurface {
PMField(label: "Normal offset", text: $model.form.surfaceOffset, unit: "mm")
PMCheckbox(label: "Beyond surface", isOn: $model.form.reverseSurfaceOffset)
}
}
if op == .extrude && !model.bodies.isEmpty && model.editingFeatureCreatesBody != true {
PMCheckbox(label: "Merge result", isOn: $model.form.merge)
}
Expand All @@ -106,7 +115,7 @@ struct OperationPage: View {
if model.form.endCondition != .midPlane && model.form.endCondition != .throughAllBoth {
PMCheckGroup(title: "Direction 2", isOn: $model.form.direction2) {
Picker("End condition", selection: $model.form.endCondition2) {
ForEach([EndConditionUI.blind, .throughAll, .upToVertex].filter { $0 != .throughAll || !model.bodies.isEmpty }, id: \.self) { Text($0.rawValue).tag($0) }
ForEach([EndConditionUI.blind, .throughAll, .upToVertex, .upToSurface, .offsetFromSurface].filter { $0 != .throughAll || !model.bodies.isEmpty }, id: \.self) { Text($0.rawValue).tag($0) }
}
.labelsHidden()
.pickerStyle(.menu)
Expand All @@ -118,6 +127,15 @@ struct OperationPage: View {
if model.form.endCondition2 == .blind {
PMField(label: "Depth", text: $model.form.depth2, unit: "mm", icon: .smartDimension)
}
if model.form.endCondition2.needsSurface {
PMField(label: "Face or plane", text: $model.form.surface2)
Button("Use Selected Face/Plane") { model.useSelectedExtrudeSurface(direction2: true) }
PMNote(text: "Planar limits only. Faces use their supporting plane.")
if model.form.endCondition2 == .offsetFromSurface {
PMField(label: "Normal offset", text: $model.form.surfaceOffset2, unit: "mm")
PMCheckbox(label: "Beyond surface", isOn: $model.form.reverseSurfaceOffset2)
}
}
}
}
PMCheckGroup(title: "Thin Feature", isOn: $model.form.thinOn) {
Expand All @@ -140,7 +158,15 @@ struct OperationPage: View {
PMPicker(label: "Sketch", selection: Binding(get: { model.operationSketch ?? "" }, set: { model.operationSketch = $0 }), icon: .sketch) {
ForEach(model.sketches) { Text($0.name).tag($0.id) }
}
PMNote(text: "All closed regions of the sketch are used; holes and islands are kept.")
PMCheckbox(label: "All closed regions", isOn: Binding(get: { model.form.contours == nil }, set: { model.form.contours = $0 ? nil : [] }))
Button(model.form.activeBox == "contours" ? "Stop Picking Regions" : "Pick Regions in View") {
model.form.activeBox = model.form.activeBox == "contours" ? "" : "contours"
}
if let error = model.contourQueryError { PMNote(text: error) }
ForEach(Array(model.contourChoices.enumerated()), id: \.element.id) { index, region in
PMCheckbox(label: "\(index + 1). \(region.title)", isOn: Binding(get: { model.contourIsSelected(region) }, set: { model.setContourSelected(region, $0) }))
}
PMNote(text: "Each selected outer contour keeps its holes. Nested islands are independent regions.")
}
if op == .cutExtrude || model.form.merge && !model.bodies.isEmpty {
PMSection("Feature Scope") {
Expand Down
Loading
Loading