Skip to content

Face mates, component state, angled planes and chamfers, thin walls (#209) - #216

Merged
andrewbartels1 merged 8 commits into
mainfrom
feat/ujoint-tool-gaps
Nov 8, 2026
Merged

andrewbartels1 merged 8 commits into
mainfrom
feat/ujoint-tool-gaps

Conversation

@andrewbartels1

Copy link
Copy Markdown
Owner

What this does

Adds the tools both agent sessions were missing when they built the U-joint demo. Each one is checked live on SolidWorks 2026 by tests/live/test_live_sw_ujoint_tool_gaps.py (8 tests, all passing).

Gap Fix Checked live
Face mates add_mate takes face_a / face_b: a point on the face, in that part's own coordinates. Only that component's faces are searched, so a pin and its hole can't be confused. add_mate is now stable. Two face mates seat a pin in its hole: axis exactly 20.0 mm from the plate's origin, the pin spanning 0-30 mm through the plate
Fix, float, flexible New tool set_component_state. To change only solving, it passes back every setting it read. A part floated and fixed again; a sub-assembly made flexible with suppression, visibility, configuration and BOM unchanged
Angled planes create_reference_plane takes angle with an axis; create_axis now names the axis it made Exactly 40.000° from the Top Plane
Planes from a face create_reference_plane takes face_point; sloped faces work Exactly 5.000 mm off a 3-4-5 slope
Angled chamfers add_chamfer takes angle and flip 2 mm at 60° removes 138.56 mm³; flip swaps the slope from 60° to 30°
both_directions looked ignored It always worked, but the reply echoed direction: blind. The reply now gives the end condition SolidWorks used. z from −10 to 10; the reply says MidPlane
Thin walls New thin_side input; an open outline works A bent plate of exactly (80 + 40) × 6.35 × 38.1 = 29,032.2 mm³, one body
Plain dicts The tool boundary validates a dict as the tool's input model, so every tool can be called from a script Every live test calls the tools with dicts

The stale check_interference result was the router cache that #213 removed. The live test confirms it: 1 overlap before the mate, 0 after.

Notes for review

  • A read-only probe showed that a component's faces report part coordinates, wherever the component sits. So no transform is needed (recorded in design.md).
  • add_chamfer always called the angle-distance chamfer type (the code's comment said equal distance). At the default 45° nothing changes.
  • The export file tools no longer require format_type, which they ignored anyway.
  • The per-tool dict fallbacks are gone, now that the boundary handles dicts.
  • Live captures now stop with a clear message when SolidWorks is minimized, instead of saving blank frames.
  • Tool count: 155 → 156.
  • The plan is openspec/changes/ujoint-tool-gaps/.

Checks

  • Full mock suite: 3,714 passed, 100% coverage.
  • ruff and mkdocs build --strict are clean.
  • Live: 8 of 8 passed on SolidWorks 2026.

The demo GIFs are on the Demos page under "The tools the U-joint was missing", and in the comments below.

Closes #209

… thin walls (#209)

The tools the U-joint demo was missing, each checked live on SolidWorks 2026
(tests/live/test_live_sw_ujoint_tool_gaps.py, 8 tests):

- add_mate takes a face as a point on it in that part's own coordinates
  (face_a, face_b), searched among that component's faces only: a pin
  mates concentric in its hole. add_mate is now stable.
- set_component_state (new) fixes or floats a component, and makes a
  sub-assembly rigid or flexible; CompConfigProperties5 is given back every
  setting it read, so only solving changes.
- create_reference_plane: an angle about a named axis, and face_point for a
  plane on or off a flat face, sloped or not. create_axis names its axis.
- add_chamfer: angle and flip (it always called the angle-distance type at
  a fixed 45 degrees).
- create_extrusion: thin_side, and its reply reports the end condition
  SolidWorks used instead of echoing direction.
- The tool boundary validates a plain dict as the tool's input model, so
  every tool can be called from a script; the dead per-tool dict fallbacks
  are gone and the export tools' format_type is optional.
…wo face mates (#209)

Eight motion GIFs recorded on SolidWorks 2026, one per live test, on the
Demos page ("The tools the U-joint was missing") and two in the README grid.
The face-mate and interference tests now seat the pin with two face mates
(concentric, and the bottoms coincident), so the pin passes through the
hole and the clearance check means something; a concentric mate alone let
it slide up off the plate. Tests pick components by name, not list order,
and use their own part names. Live captures refuse a minimized window.
…e result

Each step now captions the recording as it starts, so a GIF shows the
whole build, not only the final result. The last frame holds for 5 s
before the GIF loops (make_demo_gif --end-seconds). The component-state
test also proves the switch back to rigid. (#209)
@andrewbartels1
andrewbartels1 merged commit bcf9577 into main Nov 8, 2026
15 checks passed
@andrewbartels1

Copy link
Copy Markdown
Owner Author

Live demos on SolidWorks 2026, one per test in tests/live/test_live_sw_ujoint_tool_gaps.py (8/8 passed). Every tool call is captioned as it runs, and each GIF holds its result for 5 s. They are also on the Demos page under "The tools the U-joint was missing".

A pin seated in its hole by two face mates

A pin seated in its hole by two face mates

Interference: 1 overlap, then 0 once the pin is seated

Interference: 1 overlap, then 0 once the pin is seated

Fixed, floating, flexible and rigid again

Fixed, floating, flexible and rigid again

A bent plate from an open outline

A bent plate from an open outline

Both directions, and the reply says MidPlane

Both directions, and the reply says MidPlane

A 60 degree chamfer, and flipping it

A 60 degree chamfer, and flipping it

A plane at 40 degrees about an axis

A plane at 40 degrees about an axis

A plane off a sloped face

A plane off a sloped face

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.

Tool gaps found building the U-joint: face mates, fixed parts, angled planes, angled chamfers

1 participant