feat: enhanced mate types with face-based geometry#11
Merged
Conversation
Expose create_slider_mate and create_cylindrical_mate tools (types already existed in MateBuilder but weren't available as MCP tools). Add create_mate_connector tool with axis orientation control for positioning mate connectors on assembly instances. Add optional motion limits (minLimit/maxLimit) to slider, revolute, and cylindrical mate tools. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrites MateConnectorBuilder to use BTMInferenceQueryWithOccurrence-1083 with CENTROID inference type and face deterministicIds, replacing the old BTMIndividualOccurrenceQuery-626 approach that couldn't resolve geometry. - MateConnectorBuilder now requires face_id + occurrence_path instead of origin coordinates and axis - Add flip_primary, secondary_axis, translation, and rotation options - Update all mate tool schemas to require firstFaceId/secondFaceId - Add AssemblyManager.delete_feature() for assembly feature cleanup - Handle empty DELETE response bodies in OnshapeClient - Verified working with live Onshape assembly API Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Slider/cylindrical linear limits use limitZMin/limitZMax (not limitAxialZMin/limitAxialZMax). Revolute rotation limits use limitAxialZMin/limitAxialZMax (not limitRotationMin/limitRotationMax). Also use BTMParameterNullableQuantity-807 type with isNull field. Verified all three mate types (fastened, slider+limits, revolute+limits) working against live Onshape assembly API. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… to get_assembly Add MCP tools for face geometry inspection and assembly feature listing to enable better mate placement workflows. Include elementId in assembly instance output to distinguish parts from different Part Studios. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add firstOffsetX/Y/Z and secondOffsetX/Y/Z params to all mate tools (fastened, revolute, slider, cylindrical) for shifting mate connectors from face centroids - needed for box joints and edge alignment - Add offsetX/Y/Z params to create_mate_connector tool - Fix get_body_details handler case-sensitivity bug (API returns "PLANE" uppercase but handler compared against lowercase "plane") - Add _extract_offsets helper to parse offset arguments Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add comprehensive documentation from live-testing a 25-instance cabinet assembly with 66 features (fastened + slider mates). Key additions: - Assembly workflow guide with same-direction face technique for fastened mates between free-floating parts - Worked cabinet assembly example with gotchas and lessons learned - CLAUDE.md project instructions for AI-assisted assembly workflows - Updated tool descriptions with behavioral notes (direction, limits) - README updated: 45 tools, new assembly analysis section, 497 tests - Face coordinate system query tool and tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BTMInferenceQueryWithOccurrence-1083withCENTROIDinference type and facedeterministicIds, replacing the oldBTMIndividualOccurrenceQuery-626approach that couldn't resolve geometry in assembly contextget_body_details,get_assembly_features,get_face_coordinate_system,get_assembly_positions,check_assembly_interference,align_instance_to_face,set_instance_positiondelete_featureto AssemblyManager for assembly feature cleanupChanges
onshape_mcp/builders/mate.py- Complete rewrite of MateConnectorBuilder; MateBuilder gains limits supportonshape_mcp/server.py- Updated tool schemas to require face IDs; added 10 new tools with behavioral notes in descriptionsonshape_mcp/api/assemblies.py- Addeddelete_feature()methodonshape_mcp/api/client.py- Handle empty DELETE response bodiesonshape_mcp/analysis/face_cs.py- Face coordinate system query moduletests/builders/test_mate.py- Full rewrite matching new builder APItests/test_server.py- Updated mate tool tests with face ID parameterstests/analysis/test_face_cs.py- Tests for face CS moduleknowledge_base/assembly_workflow_guide.md- Assembly methodology (positioning, mates, solver behavior, same-direction face technique)examples/cabinet_assembly.md- Complete worked example with gotchasCLAUDE.md- Project-level AI instructionsREADME.md- Updated tool tables, architecture, test count (497), roadmapVerified
Test plan
🤖 Generated with Claude Code