pycadmcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pycadmcp-0.1.0/.github/workflows/ci.yml +41 -0
- pycadmcp-0.1.0/.github/workflows/publish.yml +30 -0
- pycadmcp-0.1.0/.gitignore +54 -0
- pycadmcp-0.1.0/ARCHITECTURE.md +62 -0
- pycadmcp-0.1.0/CHANGELOG.md +32 -0
- pycadmcp-0.1.0/CONTRIBUTING.md +55 -0
- pycadmcp-0.1.0/LICENSE +21 -0
- pycadmcp-0.1.0/PKG-INFO +175 -0
- pycadmcp-0.1.0/README.de.md +117 -0
- pycadmcp-0.1.0/README.ja.md +114 -0
- pycadmcp-0.1.0/README.md +140 -0
- pycadmcp-0.1.0/README.zh-CN.md +112 -0
- pycadmcp-0.1.0/SECURITY.md +28 -0
- pycadmcp-0.1.0/cadmcp/__init__.py +3 -0
- pycadmcp-0.1.0/cadmcp/auth.py +101 -0
- pycadmcp-0.1.0/cadmcp/backend/INDEX.yaml +42 -0
- pycadmcp-0.1.0/cadmcp/backend/__init__.py +1 -0
- pycadmcp-0.1.0/cadmcp/backend/api_baseline_s0.json +9816 -0
- pycadmcp-0.1.0/cadmcp/backend/baseline.lock +8 -0
- pycadmcp-0.1.0/cadmcp/backend/com_objects_whitelist.yaml +44 -0
- pycadmcp-0.1.0/cadmcp/backend/com_sequence_approvals.yaml +14 -0
- pycadmcp-0.1.0/cadmcp/backend/com_sequence_baseline.yaml +846 -0
- pycadmcp-0.1.0/cadmcp/backend/com_sequence_baseline_diff.md +16 -0
- pycadmcp-0.1.0/cadmcp/backend/export_formats.py +111 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/__init__.py +9 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/_calls.py +39 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/_engine.py +178 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/_state.py +250 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/assembly/__init__.py +5 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/assembly/component.py +512 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/assembly/explode.py +60 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/assembly/mate.py +422 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/assembly/query.py +96 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/backend.py +187 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/document.py +597 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/features/__init__.py +6 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/features/extrude.py +630 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/features/helix.py +465 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/features/loft.py +313 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/features/manage.py +56 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/features/modify.py +824 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/features/revolve.py +133 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/features/sheetmetal.py +276 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/features/surface.py +728 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/plane_axis.py +271 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/query.py +372 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/selection.py +158 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/sketch.py +1012 -0
- pycadmcp-0.1.0/cadmcp/backend/fake/view.py +48 -0
- pycadmcp-0.1.0/cadmcp/backend/migration_map.yaml +6321 -0
- pycadmcp-0.1.0/cadmcp/backend/migration_scope.yaml +4609 -0
- pycadmcp-0.1.0/cadmcp/backend/protocol/__init__.py +4 -0
- pycadmcp-0.1.0/cadmcp/backend/protocol/constants.py +185 -0
- pycadmcp-0.1.0/cadmcp/backend/protocol/geometry_engine.py +157 -0
- pycadmcp-0.1.0/cadmcp/backend/protocol/geometry_math.py +91 -0
- pycadmcp-0.1.0/cadmcp/backend/protocol/models.py +173 -0
- pycadmcp-0.1.0/cadmcp/backend/protocol/parsers.py +316 -0
- pycadmcp-0.1.0/cadmcp/backend/protocol/protocol.py +824 -0
- pycadmcp-0.1.0/cadmcp/backend/protocol/validators.py +200 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/__init__.py +13 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/_constants.py +192 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/_helpers.py +139 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/assembly/__init__.py +1 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/assembly/component.py +753 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/assembly/explode.py +136 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/assembly/mate.py +417 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/backend.py +96 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/config.py +147 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/dimension.py +377 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/document.py +648 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/drawing.py +1050 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/features/__init__.py +1 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/features/extrude.py +363 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/features/helix.py +548 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/features/modify.py +932 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/features/pattern.py +227 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/features/revolve.py +129 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/features/sheetmetal.py +642 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/features/surface.py +902 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/geometry.py +451 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/infrastructure.py +368 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/naming.py +85 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/plane_axis.py +362 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/probe.py +94 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/query.py +511 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/selection.py +541 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/sketch/__init__.py +28 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/sketch/constraints.py +391 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/sketch/draw.py +429 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/sketch/lifecycle.py +376 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/sketch/modify.py +138 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/sta.py +235 -0
- pycadmcp-0.1.0/cadmcp/backend/solidworks/view.py +151 -0
- pycadmcp-0.1.0/cadmcp/backend/structural_changes.md +62 -0
- pycadmcp-0.1.0/cadmcp/cli.py +383 -0
- pycadmcp-0.1.0/cadmcp/consistency/__init__.py +32 -0
- pycadmcp-0.1.0/cadmcp/consistency/_types.py +5 -0
- pycadmcp-0.1.0/cadmcp/consistency/fingerprint.py +43 -0
- pycadmcp-0.1.0/cadmcp/consistency/runner.py +27 -0
- pycadmcp-0.1.0/cadmcp/consistency/sequences/__init__.py +41 -0
- pycadmcp-0.1.0/cadmcp/consistency/sequences/assembly.py +487 -0
- pycadmcp-0.1.0/cadmcp/consistency/sequences/drawing.py +112 -0
- pycadmcp-0.1.0/cadmcp/consistency/sequences/errors.py +19 -0
- pycadmcp-0.1.0/cadmcp/consistency/sequences/features.py +338 -0
- pycadmcp-0.1.0/cadmcp/consistency/sequences/part_advanced.py +278 -0
- pycadmcp-0.1.0/cadmcp/consistency/sequences/part_basic.py +399 -0
- pycadmcp-0.1.0/cadmcp/consistency/sequences/reference.py +42 -0
- pycadmcp-0.1.0/cadmcp/consistency/sequences/sheetmetal.py +52 -0
- pycadmcp-0.1.0/cadmcp/consistency/sequences/sketch.py +292 -0
- pycadmcp-0.1.0/cadmcp/drawing_spec.py +177 -0
- pycadmcp-0.1.0/cadmcp/errors.py +152 -0
- pycadmcp-0.1.0/cadmcp/executor.py +373 -0
- pycadmcp-0.1.0/cadmcp/install_client.py +123 -0
- pycadmcp-0.1.0/cadmcp/kernel.py +246 -0
- pycadmcp-0.1.0/cadmcp/probe.py +64 -0
- pycadmcp-0.1.0/cadmcp/recipe.py +124 -0
- pycadmcp-0.1.0/cadmcp/registry.py +153 -0
- pycadmcp-0.1.0/cadmcp/resources/__init__.py +69 -0
- pycadmcp-0.1.0/cadmcp/resources/content/skills/solidworks-assembly.md +51 -0
- pycadmcp-0.1.0/cadmcp/resources/content/skills/solidworks-modeling.md +56 -0
- pycadmcp-0.1.0/cadmcp/resources/content/skills/solidworks-recovery.md +49 -0
- pycadmcp-0.1.0/cadmcp/resources/content.py +228 -0
- pycadmcp-0.1.0/cadmcp/result.py +182 -0
- pycadmcp-0.1.0/cadmcp/safety.py +289 -0
- pycadmcp-0.1.0/cadmcp/selectors.py +219 -0
- pycadmcp-0.1.0/cadmcp/server.py +256 -0
- pycadmcp-0.1.0/cadmcp/skills.py +93 -0
- pycadmcp-0.1.0/cadmcp/toolbox.py +147 -0
- pycadmcp-0.1.0/cadmcp/toolsets/__init__.py +1 -0
- pycadmcp-0.1.0/cadmcp/toolsets/assembly.py +735 -0
- pycadmcp-0.1.0/cadmcp/toolsets/core/__init__.py +61 -0
- pycadmcp-0.1.0/cadmcp/toolsets/core/_common.py +39 -0
- pycadmcp-0.1.0/cadmcp/toolsets/core/document.py +182 -0
- pycadmcp-0.1.0/cadmcp/toolsets/core/features.py +441 -0
- pycadmcp-0.1.0/cadmcp/toolsets/core/meta.py +191 -0
- pycadmcp-0.1.0/cadmcp/toolsets/core/query.py +421 -0
- pycadmcp-0.1.0/cadmcp/toolsets/core/reference.py +158 -0
- pycadmcp-0.1.0/cadmcp/toolsets/core/sketch.py +120 -0
- pycadmcp-0.1.0/cadmcp/toolsets/drawing.py +567 -0
- pycadmcp-0.1.0/cadmcp/toolsets/export.py +71 -0
- pycadmcp-0.1.0/cadmcp/toolsets/features_adv/__init__.py +27 -0
- pycadmcp-0.1.0/cadmcp/toolsets/features_adv/_common.py +12 -0
- pycadmcp-0.1.0/cadmcp/toolsets/features_adv/features.py +362 -0
- pycadmcp-0.1.0/cadmcp/toolsets/features_adv/path.py +202 -0
- pycadmcp-0.1.0/cadmcp/toolsets/features_adv/selection.py +279 -0
- pycadmcp-0.1.0/cadmcp/toolsets/features_adv/sketch.py +500 -0
- pycadmcp-0.1.0/cadmcp/toolsets/features_adv/surface.py +325 -0
- pycadmcp-0.1.0/cadmcp/toolsets/features_adv/view.py +49 -0
- pycadmcp-0.1.0/cadmcp/toolsets/paging.py +16 -0
- pycadmcp-0.1.0/cadmcp/toolsets/sheetmetal.py +276 -0
- pycadmcp-0.1.0/cadmcp/units.py +130 -0
- pycadmcp-0.1.0/cadmcp/verification.py +85 -0
- pycadmcp-0.1.0/docs/TOOL_INVENTORY.md +199 -0
- pycadmcp-0.1.0/docs/naming.md +83 -0
- pycadmcp-0.1.0/examples/box_recipe.json +23 -0
- pycadmcp-0.1.0/mcpb/manifest.json +21 -0
- pycadmcp-0.1.0/pyproject.toml +78 -0
- pycadmcp-0.1.0/scripts/check_base_imports.py +34 -0
- pycadmcp-0.1.0/scripts/check_deps.py +268 -0
- pycadmcp-0.1.0/scripts/check_protocol_imports.py +28 -0
- pycadmcp-0.1.0/scripts/compare_api.py +321 -0
- pycadmcp-0.1.0/scripts/diff_constants.py +39 -0
- pycadmcp-0.1.0/scripts/diff_golden.py +66 -0
- pycadmcp-0.1.0/scripts/protocol_index.py +28 -0
- pycadmcp-0.1.0/scripts/rebuild_lock.py +66 -0
- pycadmcp-0.1.0/scripts/snapshot_api_s9.py +174 -0
- pycadmcp-0.1.0/scripts/snapshot_com_sequence.py +393 -0
- pycadmcp-0.1.0/scripts/sync_skills.py +54 -0
- pycadmcp-0.1.0/scripts/token_report.py +58 -0
- pycadmcp-0.1.0/scripts/tool_inventory.py +107 -0
- pycadmcp-0.1.0/scripts/verify_baseline_lock.py +57 -0
- pycadmcp-0.1.0/scripts/verify_migration.py +367 -0
- pycadmcp-0.1.0/tests/architecture/__init__.py +1 -0
- pycadmcp-0.1.0/tests/architecture/test_error_codes.py +39 -0
- pycadmcp-0.1.0/tests/architecture/test_layer_dependencies.py +80 -0
- pycadmcp-0.1.0/tests/architecture/test_migration_map.py +73 -0
- pycadmcp-0.1.0/tests/architecture/test_mixin_no_conflict.py +65 -0
- pycadmcp-0.1.0/tests/architecture/test_naming.py +76 -0
- pycadmcp-0.1.0/tests/architecture/test_no_circular_imports.py +74 -0
- pycadmcp-0.1.0/tests/architecture/test_no_undefined_names.py +40 -0
- pycadmcp-0.1.0/tests/architecture/test_protocol_completeness.py +44 -0
- pycadmcp-0.1.0/tests/conftest.py +44 -0
- pycadmcp-0.1.0/tests/data/consistency/assembly_basic.json +291 -0
- pycadmcp-0.1.0/tests/data/consistency/assembly_bbox.json +204 -0
- pycadmcp-0.1.0/tests/data/consistency/assembly_bom.json +240 -0
- pycadmcp-0.1.0/tests/data/consistency/assembly_components.json +270 -0
- pycadmcp-0.1.0/tests/data/consistency/assembly_edges.json +263 -0
- pycadmcp-0.1.0/tests/data/consistency/assembly_faces.json +342 -0
- pycadmcp-0.1.0/tests/data/consistency/assembly_linear_pattern.json +268 -0
- pycadmcp-0.1.0/tests/data/consistency/assembly_mate_pose.json +305 -0
- pycadmcp-0.1.0/tests/data/consistency/assembly_nut.json +422 -0
- pycadmcp-0.1.0/tests/data/consistency/assembly_pattern.json +211 -0
- pycadmcp-0.1.0/tests/data/consistency/assembly_pattern_feat.json +270 -0
- pycadmcp-0.1.0/tests/data/consistency/assembly_pose.json +467 -0
- pycadmcp-0.1.0/tests/data/consistency/assembly_query.json +662 -0
- pycadmcp-0.1.0/tests/data/consistency/assembly_screw.json +220 -0
- pycadmcp-0.1.0/tests/data/consistency/circle_cylinder.json +107 -0
- pycadmcp-0.1.0/tests/data/consistency/circular_pattern.json +234 -0
- pycadmcp-0.1.0/tests/data/consistency/delete_feature.json +151 -0
- pycadmcp-0.1.0/tests/data/consistency/detail_features.json +173 -0
- pycadmcp-0.1.0/tests/data/consistency/doc_cycle.json +93 -0
- pycadmcp-0.1.0/tests/data/consistency/drawing_detail.json +421 -0
- pycadmcp-0.1.0/tests/data/consistency/drawing_l3.json +254 -0
- pycadmcp-0.1.0/tests/data/consistency/drawing_views.json +181 -0
- pycadmcp-0.1.0/tests/data/consistency/dxf_layers.json +226 -0
- pycadmcp-0.1.0/tests/data/consistency/error_paths.json +120 -0
- pycadmcp-0.1.0/tests/data/consistency/explode_views.json +335 -0
- pycadmcp-0.1.0/tests/data/consistency/export_options.json +185 -0
- pycadmcp-0.1.0/tests/data/consistency/extrude_both.json +145 -0
- pycadmcp-0.1.0/tests/data/consistency/extrude_midplane.json +144 -0
- pycadmcp-0.1.0/tests/data/consistency/extrude_thin.json +416 -0
- pycadmcp-0.1.0/tests/data/consistency/extrude_through.json +219 -0
- pycadmcp-0.1.0/tests/data/consistency/extrude_up_to.json +348 -0
- pycadmcp-0.1.0/tests/data/consistency/extrude_up_to_body.json +314 -0
- pycadmcp-0.1.0/tests/data/consistency/extrude_up_to_vertex.json +328 -0
- pycadmcp-0.1.0/tests/data/consistency/fillet_edges.json +169 -0
- pycadmcp-0.1.0/tests/data/consistency/find_faces.json +344 -0
- pycadmcp-0.1.0/tests/data/consistency/golden_cube.json +107 -0
- pycadmcp-0.1.0/tests/data/consistency/helix_basic.json +185 -0
- pycadmcp-0.1.0/tests/data/consistency/hole_cut.json +200 -0
- pycadmcp-0.1.0/tests/data/consistency/hole_cut_reverse.json +188 -0
- pycadmcp-0.1.0/tests/data/consistency/hole_wizard.json +228 -0
- pycadmcp-0.1.0/tests/data/consistency/in_context_edit.json +552 -0
- pycadmcp-0.1.0/tests/data/consistency/lightweight_comp.json +329 -0
- pycadmcp-0.1.0/tests/data/consistency/loft_basic.json +249 -0
- pycadmcp-0.1.0/tests/data/consistency/loft_centerline.json +272 -0
- pycadmcp-0.1.0/tests/data/consistency/loft_guides.json +261 -0
- pycadmcp-0.1.0/tests/data/consistency/mirror_feature.json +221 -0
- pycadmcp-0.1.0/tests/data/consistency/mold_parting.json +210 -0
- pycadmcp-0.1.0/tests/data/consistency/mold_parting_surface.json +168 -0
- pycadmcp-0.1.0/tests/data/consistency/mold_shutoff.json +178 -0
- pycadmcp-0.1.0/tests/data/consistency/param_edit.json +234 -0
- pycadmcp-0.1.0/tests/data/consistency/part_color.json +123 -0
- pycadmcp-0.1.0/tests/data/consistency/part_dimensions.json +223 -0
- pycadmcp-0.1.0/tests/data/consistency/part_equations.json +304 -0
- pycadmcp-0.1.0/tests/data/consistency/part_material_config.json +182 -0
- pycadmcp-0.1.0/tests/data/consistency/recipe_replay.json +124 -0
- pycadmcp-0.1.0/tests/data/consistency/ref_plane_angle.json +220 -0
- pycadmcp-0.1.0/tests/data/consistency/ref_plane_sketch.json +213 -0
- pycadmcp-0.1.0/tests/data/consistency/revolve_and_cut.json +185 -0
- pycadmcp-0.1.0/tests/data/consistency/revolve_edge.json +214 -0
- pycadmcp-0.1.0/tests/data/consistency/rib_draft.json +691 -0
- pycadmcp-0.1.0/tests/data/consistency/selector_refs.json +158 -0
- pycadmcp-0.1.0/tests/data/consistency/sheet_metal.json +386 -0
- pycadmcp-0.1.0/tests/data/consistency/shell_and_pattern.json +171 -0
- pycadmcp-0.1.0/tests/data/consistency/shell_open.json +158 -0
- pycadmcp-0.1.0/tests/data/consistency/sketch_3d.json +235 -0
- pycadmcp-0.1.0/tests/data/consistency/sketch_arc.json +117 -0
- pycadmcp-0.1.0/tests/data/consistency/sketch_arc_3d.json +212 -0
- pycadmcp-0.1.0/tests/data/consistency/sketch_basic.json +102 -0
- pycadmcp-0.1.0/tests/data/consistency/sketch_circle_3d.json +137 -0
- pycadmcp-0.1.0/tests/data/consistency/sketch_dims.json +229 -0
- pycadmcp-0.1.0/tests/data/consistency/sketch_offset_trim.json +496 -0
- pycadmcp-0.1.0/tests/data/consistency/sketch_polygon_3d.json +138 -0
- pycadmcp-0.1.0/tests/data/consistency/sketch_rect_3d.json +137 -0
- pycadmcp-0.1.0/tests/data/consistency/sketch_relations_ext.json +187 -0
- pycadmcp-0.1.0/tests/data/consistency/sketch_slot.json +164 -0
- pycadmcp-0.1.0/tests/data/consistency/sketch_solve.json +295 -0
- pycadmcp-0.1.0/tests/data/consistency/sketch_spline.json +266 -0
- pycadmcp-0.1.0/tests/data/consistency/sketch_spline_3d.json +139 -0
- pycadmcp-0.1.0/tests/data/consistency/sketch_symmetric.json +133 -0
- pycadmcp-0.1.0/tests/data/consistency/split_body.json +210 -0
- pycadmcp-0.1.0/tests/data/consistency/subassembly.json +459 -0
- pycadmcp-0.1.0/tests/data/consistency/suppress_feature.json +127 -0
- pycadmcp-0.1.0/tests/data/consistency/surface_extend.json +205 -0
- pycadmcp-0.1.0/tests/data/consistency/surface_fill.json +363 -0
- pycadmcp-0.1.0/tests/data/consistency/surface_fillet.json +203 -0
- pycadmcp-0.1.0/tests/data/consistency/surface_thicken.json +382 -0
- pycadmcp-0.1.0/tests/data/consistency/surface_trim.json +353 -0
- pycadmcp-0.1.0/tests/data/consistency/surface_untrim.json +253 -0
- pycadmcp-0.1.0/tests/data/consistency/sweep_basic.json +524 -0
- pycadmcp-0.1.0/tests/data/consistency/sweep_chain.json +581 -0
- pycadmcp-0.1.0/tests/data/consistency/sweep_helix.json +324 -0
- pycadmcp-0.1.0/tests/data/consistency/thread_basic.json +179 -0
- pycadmcp-0.1.0/tests/data/consistency/thread_internal.json +192 -0
- pycadmcp-0.1.0/tests/data/consistency/top_sketch_revolve.json +124 -0
- pycadmcp-0.1.0/tests/data/recipes/bracket.json +11 -0
- pycadmcp-0.1.0/tests/data/recipes/param_sketch_circle.json +25 -0
- pycadmcp-0.1.0/tests/test_adv_tools.py +1328 -0
- pycadmcp-0.1.0/tests/test_auth.py +225 -0
- pycadmcp-0.1.0/tests/test_bom_template_resolve.py +50 -0
- pycadmcp-0.1.0/tests/test_com_backend.py +386 -0
- pycadmcp-0.1.0/tests/test_com_probe.py +191 -0
- pycadmcp-0.1.0/tests/test_consistency.py +134 -0
- pycadmcp-0.1.0/tests/test_contract.py +172 -0
- pycadmcp-0.1.0/tests/test_core_tools.py +1907 -0
- pycadmcp-0.1.0/tests/test_drawing_spec.py +192 -0
- pycadmcp-0.1.0/tests/test_errors.py +83 -0
- pycadmcp-0.1.0/tests/test_executor.py +301 -0
- pycadmcp-0.1.0/tests/test_fake_backend.py +223 -0
- pycadmcp-0.1.0/tests/test_install_client.py +57 -0
- pycadmcp-0.1.0/tests/test_kernel.py +197 -0
- pycadmcp-0.1.0/tests/test_param_tools.py +83 -0
- pycadmcp-0.1.0/tests/test_recipe.py +87 -0
- pycadmcp-0.1.0/tests/test_resources.py +73 -0
- pycadmcp-0.1.0/tests/test_result.py +106 -0
- pycadmcp-0.1.0/tests/test_safety.py +277 -0
- pycadmcp-0.1.0/tests/test_selectors.py +135 -0
- pycadmcp-0.1.0/tests/test_server.py +513 -0
- pycadmcp-0.1.0/tests/test_sheetmetal_sm2.py +36 -0
- pycadmcp-0.1.0/tests/test_skills.py +45 -0
- pycadmcp-0.1.0/tests/test_smoke.py +7 -0
- pycadmcp-0.1.0/tests/test_static_scan.py +110 -0
- pycadmcp-0.1.0/tests/test_status.py +121 -0
- pycadmcp-0.1.0/tests/test_stdio.py +119 -0
- pycadmcp-0.1.0/tests/test_sw_handle_drift.py +136 -0
- pycadmcp-0.1.0/tests/test_toolbox.py +122 -0
- pycadmcp-0.1.0/tests/test_toolsets.py +85 -0
- pycadmcp-0.1.0/tests/test_units.py +100 -0
- pycadmcp-0.1.0/tests/test_verification.py +161 -0
- pycadmcp-0.1.0/uv.lock +929 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master, main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [master, main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
offline:
|
|
11
|
+
name: Offline checks
|
|
12
|
+
runs-on: windows-latest
|
|
13
|
+
defaults:
|
|
14
|
+
run:
|
|
15
|
+
shell: pwsh
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.11"
|
|
22
|
+
|
|
23
|
+
- name: Install package + dev deps
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip
|
|
26
|
+
pip install -e ".[dev]"
|
|
27
|
+
|
|
28
|
+
- name: Ruff
|
|
29
|
+
run: python -m ruff check .
|
|
30
|
+
|
|
31
|
+
- name: Pytest (offline)
|
|
32
|
+
env:
|
|
33
|
+
PYTHONPATH: "."
|
|
34
|
+
PYTHONUTF8: "1"
|
|
35
|
+
PYTHONIOENCODING: "utf-8"
|
|
36
|
+
run: python -m pytest -q -m "not sw"
|
|
37
|
+
|
|
38
|
+
- name: Tool inventory check
|
|
39
|
+
env:
|
|
40
|
+
PYTHONPATH: "."
|
|
41
|
+
run: python scripts/tool_inventory.py --check
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
id-token: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
name: Build and publish
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
environment: pypi
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.11"
|
|
23
|
+
|
|
24
|
+
- name: Build
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip build
|
|
27
|
+
python -m build
|
|
28
|
+
|
|
29
|
+
- name: Publish to PyPI
|
|
30
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Environment
|
|
2
|
+
.venv/
|
|
3
|
+
__pycache__/
|
|
4
|
+
*.py[cod]
|
|
5
|
+
*.egg-info/
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
*.egg
|
|
9
|
+
|
|
10
|
+
# Test / tool caches
|
|
11
|
+
.pytest_cache/
|
|
12
|
+
.ruff_cache/
|
|
13
|
+
.mypy_cache/
|
|
14
|
+
.coverage
|
|
15
|
+
htmlcov/
|
|
16
|
+
.tox/
|
|
17
|
+
.nox/
|
|
18
|
+
|
|
19
|
+
# Runtime artifacts (workspace hygiene)
|
|
20
|
+
logs/
|
|
21
|
+
*.log
|
|
22
|
+
backup_*/
|
|
23
|
+
output/
|
|
24
|
+
workspace/
|
|
25
|
+
.env
|
|
26
|
+
.env.*
|
|
27
|
+
|
|
28
|
+
# Real-machine / probe artifacts (stay on the Windows workstation)
|
|
29
|
+
spike*.json
|
|
30
|
+
probe_out/
|
|
31
|
+
deliverables/
|
|
32
|
+
archive/
|
|
33
|
+
*.bak
|
|
34
|
+
|
|
35
|
+
# Read-only reference clones
|
|
36
|
+
.refs/
|
|
37
|
+
|
|
38
|
+
# Evidence moved out of the package tree (never wheel / never public export)
|
|
39
|
+
internal-evidence/
|
|
40
|
+
|
|
41
|
+
# Editor / OS
|
|
42
|
+
.DS_Store
|
|
43
|
+
Thumbs.db
|
|
44
|
+
.idea/
|
|
45
|
+
.vscode/
|
|
46
|
+
*.swp
|
|
47
|
+
*~
|
|
48
|
+
|
|
49
|
+
# Local IDE / agent workspace noise (tracked .opencode/skills sync can stay until export)
|
|
50
|
+
.cursor/
|
|
51
|
+
.codegraph/
|
|
52
|
+
|
|
53
|
+
# One-shot S9 API snapshot (must not overwrite / commit; compare locally)
|
|
54
|
+
cadmcp/backend/api_baseline_s9.json
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
Product runtime constraints for `cadmcp`. This document is **not** an
|
|
4
|
+
internal agent playbook; it describes what any SolidWorks COM maintainer
|
|
5
|
+
must preserve.
|
|
6
|
+
|
|
7
|
+
## Backends
|
|
8
|
+
|
|
9
|
+
| Backend | Package | Role |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| Protocol / CAD-neutral | `cadmcp.backend.protocol` | Shared models, validators, `CADBackend` surface |
|
|
12
|
+
| Fake | `cadmcp.backend.fake` | Offline geometry engine for CI and local tests |
|
|
13
|
+
| SolidWorks | `cadmcp.backend.solidworks` | Real COM automation (Windows + SolidWorks 2025) |
|
|
14
|
+
|
|
15
|
+
`fake` and `solidworks` are peer implementations of the same protocol.
|
|
16
|
+
Feature packages must not depend on assembly packages across domains.
|
|
17
|
+
Business mixins must not import `backend.py` composition modules.
|
|
18
|
+
|
|
19
|
+
## STA (SolidWorks COM)
|
|
20
|
+
|
|
21
|
+
All SolidWorks COM work runs on a dedicated Single-Threaded Apartment (STA)
|
|
22
|
+
thread:
|
|
23
|
+
|
|
24
|
+
1. Every COM call goes through the STA executor.
|
|
25
|
+
2. Business mixins must not open their own COM connections.
|
|
26
|
+
3. COM objects must not be used from other threads.
|
|
27
|
+
4. COM objects must not be passed across threads.
|
|
28
|
+
5. COM init / attach / release / exception mapping stay on the STA lifecycle.
|
|
29
|
+
6. Thread start / stop / ready / error state remain explicit.
|
|
30
|
+
7. COM reference release is audited carefully.
|
|
31
|
+
|
|
32
|
+
Business mixins call COM only via `infrastructure.py`, which is the sole
|
|
33
|
+
business-side facade over `sta.py`. `sta.py` must not depend upward on
|
|
34
|
+
`infrastructure.py`.
|
|
35
|
+
|
|
36
|
+
## Layering
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
toolsets / kernel / executor
|
|
40
|
+
↓
|
|
41
|
+
backend protocol models
|
|
42
|
+
↓
|
|
43
|
+
fake ⊥ solidworks
|
|
44
|
+
↓
|
|
45
|
+
infrastructure → sta
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
- `naming.py` owns feature-name alias state.
|
|
49
|
+
- Sketch lifecycle state lives in the sketch modules.
|
|
50
|
+
- Error codes for COM failures are mapped in `sta.py` only.
|
|
51
|
+
|
|
52
|
+
## Public API stability
|
|
53
|
+
|
|
54
|
+
Do not casually rename public tools, change default arguments, reorder COM
|
|
55
|
+
API sequences, or alter OpResult / error envelopes. Compatibility shims for
|
|
56
|
+
the pre-rename package name were removed; see [docs/naming.md](docs/naming.md).
|
|
57
|
+
|
|
58
|
+
## Skills and resources
|
|
59
|
+
|
|
60
|
+
Usage-layer skills ship as markdown under
|
|
61
|
+
`cadmcp/resources/content/skills/` and are exposed as `cadmcp://skill/...`
|
|
62
|
+
resources (same source as `help` topics under `cadmcp://help/...`).
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
|
7
|
+
once public tags are cut.
|
|
8
|
+
|
|
9
|
+
## [Unreleased]
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Public project facade: MIT license, four-language READMEs, CONTRIBUTING,
|
|
14
|
+
SECURITY, ARCHITECTURE, CHANGELOG, and CI workflow.
|
|
15
|
+
- `examples/box_recipe.json` for `replay_recipe` quick start.
|
|
16
|
+
- Naming gate (`tests/architecture/test_naming.py`) and [docs/naming.md](docs/naming.md).
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Product identity is **cadmcp** (distribution, import, CLI). SolidWorks COM
|
|
21
|
+
backend lives under `cadmcp.backend.solidworks` with `--backend solidworks`.
|
|
22
|
+
- Resource URIs use `cadmcp://`; environment variables use `CADMCP_*`.
|
|
23
|
+
|
|
24
|
+
### Removed
|
|
25
|
+
|
|
26
|
+
- Compatibility shims for the pre-rename package name (`backend/base.py`,
|
|
27
|
+
`com_backend.py`, `fake_backend.py`, `compat/`). See [docs/naming.md](docs/naming.md).
|
|
28
|
+
|
|
29
|
+
## [0.1.0] — 2026-11-10
|
|
30
|
+
|
|
31
|
+
First public release on GitHub and PyPI (`pip install pycadmcp`;
|
|
32
|
+
import/CLI remain `cadmcp`).
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for helping improve **cadmcp**.
|
|
4
|
+
|
|
5
|
+
## Where to send changes
|
|
6
|
+
|
|
7
|
+
| Kind of change | Where |
|
|
8
|
+
|---|---|
|
|
9
|
+
| Public bug fixes, docs, examples | Open a **GitHub** pull request against the public repo |
|
|
10
|
+
| Day-to-day product development | Happens on the **internal Gitee** tree (whitelist export → GitHub) |
|
|
11
|
+
|
|
12
|
+
Do **not** treat the GitHub mirror as the primary development remote. Maintainers
|
|
13
|
+
merge GitHub PRs, then **patch-back** the diff onto Gitee (`gh pr diff` /
|
|
14
|
+
`git format-patch` → apply on Gitee → green tests → next Sync export).
|
|
15
|
+
Commit SHAs are **not** shared between the two remotes.
|
|
16
|
+
|
|
17
|
+
## Development setup
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
git clone https://github.com/shiyang19822000/cad-mcp.git
|
|
21
|
+
cd cad-mcp
|
|
22
|
+
python -m venv .venv
|
|
23
|
+
# Windows: .venv\Scripts\activate
|
|
24
|
+
source .venv/bin/activate
|
|
25
|
+
pip install -e ".[dev]" # or: uv sync
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Offline checks (no SolidWorks required):
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
ruff check .
|
|
32
|
+
pytest -q
|
|
33
|
+
python scripts/tool_inventory.py --check
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Coding rules (short)
|
|
37
|
+
|
|
38
|
+
- Keep tool names, schemas, and COM call order stable unless the PR is an
|
|
39
|
+
intentional breaking change.
|
|
40
|
+
- SolidWorks COM must stay on the STA path — see [ARCHITECTURE.md](ARCHITECTURE.md).
|
|
41
|
+
- Prefer asserting `error.code` over brittle message substrings.
|
|
42
|
+
- Do not add compatibility aliases for removed legacy package names
|
|
43
|
+
(see [docs/naming.md](docs/naming.md)).
|
|
44
|
+
|
|
45
|
+
## Pull requests
|
|
46
|
+
|
|
47
|
+
1. One concern per PR when practical.
|
|
48
|
+
2. Include offline test results in the description.
|
|
49
|
+
3. Update [CHANGELOG.md](CHANGELOG.md) for user-visible changes.
|
|
50
|
+
4. DE/JA README edits should keep chapter structure aligned with `README.md`
|
|
51
|
+
(English is authoritative).
|
|
52
|
+
|
|
53
|
+
## Security
|
|
54
|
+
|
|
55
|
+
See [SECURITY.md](SECURITY.md). Do not file public issues for vulnerabilities.
|
pycadmcp-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 shiyang19822000
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
pycadmcp-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: pycadmcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: CAD MCP server: one process, dedicated STA executor, offline-testable (SolidWorks backend first)
|
|
5
|
+
Project-URL: Homepage, https://github.com/shiyang19822000/cad-mcp
|
|
6
|
+
Project-URL: Repository, https://github.com/shiyang19822000/cad-mcp.git
|
|
7
|
+
Project-URL: Issues, https://github.com/shiyang19822000/cad-mcp/issues
|
|
8
|
+
Author-email: shiyang19822000 <shiyang19822000@gmail.com>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: cad,com,mcp,solidworks,sta
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
16
|
+
Classifier: Operating System :: POSIX
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Requires-Dist: jsonschema>=4.26.0
|
|
24
|
+
Requires-Dist: mcp>=2.3.0
|
|
25
|
+
Requires-Dist: pydantic>=2.14.1
|
|
26
|
+
Requires-Dist: pywin32>=312; sys_platform == 'win32'
|
|
27
|
+
Requires-Dist: starlette>=0.48
|
|
28
|
+
Requires-Dist: uvicorn>=0.34
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: httpx>=0.28.1; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest>=9.1.1; extra == 'dev'
|
|
32
|
+
Requires-Dist: pyyaml>=6.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: ruff>=0.17.1; extra == 'dev'
|
|
34
|
+
Description-Content-Type: text/markdown
|
|
35
|
+
|
|
36
|
+
# cadmcp
|
|
37
|
+
|
|
38
|
+
**Languages:** [English](README.md) · [简体中文](README.zh-CN.md) · [Deutsch](README.de.md) · [日本語](README.ja.md)
|
|
39
|
+
|
|
40
|
+
CAD MCP server: one process, a dedicated STA executor, and an offline-testable
|
|
41
|
+
Fake backend — **SolidWorks backend first**.
|
|
42
|
+
|
|
43
|
+
> **Not affiliated with Dassault Systèmes.** SolidWorks® is a trademark of
|
|
44
|
+
> Dassault Systèmes or its subsidiaries. This project is an independent
|
|
45
|
+
> community MCP server.
|
|
46
|
+
|
|
47
|
+
[](https://github.com/shiyang19822000/cad-mcp/actions/workflows/ci.yml)
|
|
48
|
+
[](https://pypi.org/project/pycadmcp/)
|
|
49
|
+
[](LICENSE)
|
|
50
|
+
|
|
51
|
+
## Requirements
|
|
52
|
+
|
|
53
|
+
| Mode | Needs |
|
|
54
|
+
|---|---|
|
|
55
|
+
| **Fake backend (default for CI)** | Python 3.11+, Windows/macOS/Linux |
|
|
56
|
+
| **SolidWorks backend** | Windows + SolidWorks **2025** (ProgID `SldWorks.Application` / `SOLIDWORKS_2025`) + `pywin32` |
|
|
57
|
+
|
|
58
|
+
The full offline test suite runs against **FakeBackend** — you do **not** need
|
|
59
|
+
SolidWorks installed to develop or verify locally.
|
|
60
|
+
|
|
61
|
+
## Install
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pip install pycadmcp
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
For development (editable + test tools):
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
git clone https://github.com/shiyang19822000/cad-mcp.git
|
|
71
|
+
cd cad-mcp
|
|
72
|
+
python -m venv .venv
|
|
73
|
+
# Windows PowerShell:
|
|
74
|
+
.\.venv\Scripts\Activate.ps1
|
|
75
|
+
pip install -e ".[dev]"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
CLI entry point: `cadmcp`.
|
|
79
|
+
|
|
80
|
+
## Quick start
|
|
81
|
+
|
|
82
|
+
Health check (Fake):
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
cadmcp doctor --backend fake
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Replay a design recipe from the workspace (Fake):
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Copy examples/box_recipe.json into your workspace, then via MCP tool:
|
|
92
|
+
# replay_recipe(path="box_recipe.json")
|
|
93
|
+
# Or drive the same tools interactively through an MCP client.
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Install into a local MCP client (writes server key `solidworks`):
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
cadmcp install --client opencode --dry-run
|
|
100
|
+
cadmcp install --client opencode
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Stdio serve (typical for editors):
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
cadmcp serve --transport stdio --backend fake --profile part
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
For real SolidWorks, use `--backend solidworks` on Windows with SolidWorks running.
|
|
110
|
+
|
|
111
|
+
## Capability matrix
|
|
112
|
+
|
|
113
|
+
**134 tools** across 9 toolsets (see [docs/TOOL_INVENTORY.md](docs/TOOL_INVENTORY.md)):
|
|
114
|
+
|
|
115
|
+
| Toolset | Count | Focus |
|
|
116
|
+
|---|---|---|
|
|
117
|
+
| core | 45 | Documents, sketches, basic features, queries |
|
|
118
|
+
| features_adv | 25 | Thread, helix, sweep, surfaces, feature ops |
|
|
119
|
+
| assembly | 20 | Insert, mates, component ops |
|
|
120
|
+
| drawing | 16 | Views, annotations, DrawingSpec |
|
|
121
|
+
| sketch_adv | 12 | Splines, offset/trim, constraints, dims |
|
|
122
|
+
| sheetmetal | 7 | Base/flange/hem, flat pattern |
|
|
123
|
+
| selection | 6 | Face/edge pick helpers |
|
|
124
|
+
| view | 2 | Orientations / screenshots |
|
|
125
|
+
| export | 1 | STEP/STL/PDF/DXF |
|
|
126
|
+
|
|
127
|
+
Skills (`solidworks-modeling`, `solidworks-assembly`, `solidworks-recovery`)
|
|
128
|
+
ship as `cadmcp://skill/...` resources.
|
|
129
|
+
|
|
130
|
+
## Architecture (summary)
|
|
131
|
+
|
|
132
|
+
- **Protocol layer** shared by Fake and SolidWorks backends.
|
|
133
|
+
- **SolidWorks COM** runs only on a dedicated **STA** thread; business code
|
|
134
|
+
never creates COM connections itself.
|
|
135
|
+
- Tool results use a typed OpResult envelope (`ok` / `error.code` / `delta` /
|
|
136
|
+
`state_version`).
|
|
137
|
+
|
|
138
|
+
Details: [ARCHITECTURE.md](ARCHITECTURE.md). Naming history: [docs/naming.md](docs/naming.md).
|
|
139
|
+
|
|
140
|
+
## Testing
|
|
141
|
+
|
|
142
|
+
Offline (default):
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
ruff check .
|
|
146
|
+
pytest -q
|
|
147
|
+
python scripts/tool_inventory.py --check
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Real SolidWorks (destructive):
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# WARNING: closes all open SolidWorks documents WITHOUT saving.
|
|
154
|
+
set CADMCP_REAL_SW=1
|
|
155
|
+
pytest -q -m sw
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Only run real-SW tests on disposable sessions.
|
|
159
|
+
|
|
160
|
+
## Known limitations
|
|
161
|
+
|
|
162
|
+
| Limitation | Notes |
|
|
163
|
+
|---|---|
|
|
164
|
+
| Mold Core/Cavity | Blocked pending reliable parting-surface / license context — [#1](https://github.com/shiyang19822000/cad-mcp/issues/1) |
|
|
165
|
+
| Native InsertThread API | Helix + sweep cut path is used instead — [#2](https://github.com/shiyang19822000/cad-mcp/issues/2) |
|
|
166
|
+
| SolidWorks Toolbox | Not integrated — [#3](https://github.com/shiyang19822000/cad-mcp/issues/3) |
|
|
167
|
+
| Part in-context edit (`EditPart2`) | Not supported; subassembly edit is — [#4](https://github.com/shiyang19822000/cad-mcp/issues/4) |
|
|
168
|
+
| Axial screw-in / feed mate motion | Not supported |
|
|
169
|
+
|
|
170
|
+
## License
|
|
171
|
+
|
|
172
|
+
[MIT](LICENSE) — Copyright (c) 2026 shiyang19822000.
|
|
173
|
+
|
|
174
|
+
Not affiliated with Dassault Systèmes. SolidWorks® is a trademark of
|
|
175
|
+
Dassault Systèmes or its subsidiaries.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# cadmcp
|
|
2
|
+
|
|
3
|
+
**Sprachen:** [English](README.md) · [简体中文](README.zh-CN.md) · [Deutsch](README.de.md) · [日本語](README.ja.md)
|
|
4
|
+
|
|
5
|
+
> **English README is authoritative; translations welcome via PR.**
|
|
6
|
+
|
|
7
|
+
CAD-MCP-Server: ein Prozess, eigener STA-Executor, offline testbares Fake-Backend —
|
|
8
|
+
**SolidWorks-Backend zuerst**.
|
|
9
|
+
|
|
10
|
+
> **Nicht verbunden mit Dassault Systèmes.** SolidWorks® ist eine Marke von
|
|
11
|
+
> Dassault Systèmes oder verbundenen Unternehmen. Dies ist ein unabhängiger
|
|
12
|
+
> Community-MCP-Server.
|
|
13
|
+
|
|
14
|
+
[](https://github.com/shiyang19822000/cad-mcp/actions/workflows/ci.yml)
|
|
15
|
+
[](https://pypi.org/project/pycadmcp/)
|
|
16
|
+
[](LICENSE)
|
|
17
|
+
|
|
18
|
+
## Anforderungen
|
|
19
|
+
|
|
20
|
+
| Modus | Benötigt |
|
|
21
|
+
|---|---|
|
|
22
|
+
| **Fake-Backend (CI-Standard)** | Python 3.11+, Windows/macOS/Linux |
|
|
23
|
+
| **SolidWorks-Backend** | Windows + SolidWorks **2025** + `pywin32` |
|
|
24
|
+
|
|
25
|
+
Die komplette Offline-Testsuite läuft gegen **FakeBackend** — SolidWorks ist
|
|
26
|
+
für lokale Entwicklung nicht erforderlich.
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install pycadmcp
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Entwicklung (editierbar + Testdeps):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
git clone https://github.com/shiyang19822000/cad-mcp.git
|
|
38
|
+
cd cad-mcp
|
|
39
|
+
python -m venv .venv
|
|
40
|
+
# Windows:
|
|
41
|
+
.\.venv\Scripts\Activate.ps1
|
|
42
|
+
pip install -e ".[dev]"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
CLI: `cadmcp`.
|
|
46
|
+
|
|
47
|
+
## Schnellstart
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
cadmcp doctor --backend fake
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Beispiel-Rezept: `examples/box_recipe.json` (MCP-Tool `replay_recipe`).
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
cadmcp install --client opencode --dry-run
|
|
57
|
+
cadmcp serve --transport stdio --backend fake --profile part
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Für echte SolidWorks-Nutzung: `--backend solidworks` unter Windows.
|
|
61
|
+
|
|
62
|
+
## Fähigkeitsmatrix
|
|
63
|
+
|
|
64
|
+
**134 Tools** in **9 Toolsets** — siehe [docs/TOOL_INVENTORY.md](docs/TOOL_INVENTORY.md).
|
|
65
|
+
|
|
66
|
+
| Toolset | Anzahl | Fokus |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| core | 45 | Dokumente, Skizzen, Basis-Features, Abfragen |
|
|
69
|
+
| features_adv | 25 | Gewinde, Helix, Sweep, Flächen |
|
|
70
|
+
| assembly | 20 | Einfügen, Verknüpfungen, Komponenten |
|
|
71
|
+
| drawing | 16 | Ansichten, Annotationen |
|
|
72
|
+
| sketch_adv | 12 | Splines, Offset/Trim, Bemaßungen |
|
|
73
|
+
| sheetmetal | 7 | Blech |
|
|
74
|
+
| selection | 6 | Flächen-/Kantenwahl |
|
|
75
|
+
| view | 2 | Ansichten / Screenshots |
|
|
76
|
+
| export | 1 | STEP/STL/PDF/DXF |
|
|
77
|
+
|
|
78
|
+
Skills: `cadmcp://skill/...`.
|
|
79
|
+
|
|
80
|
+
## Architektur (Kurz)
|
|
81
|
+
|
|
82
|
+
- Gemeinsame Protocol-Schicht für Fake und SolidWorks.
|
|
83
|
+
- SolidWorks-COM nur auf einem **STA**-Thread.
|
|
84
|
+
- Ergebnisse als OpResult-Umschlag.
|
|
85
|
+
|
|
86
|
+
Details: [ARCHITECTURE.md](ARCHITECTURE.md). Umbenennung: [docs/naming.md](docs/naming.md).
|
|
87
|
+
|
|
88
|
+
## Tests
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
ruff check .
|
|
92
|
+
pytest -q
|
|
93
|
+
python scripts/tool_inventory.py --check
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Echte SolidWorks-Tests (schließen Dokumente **ohne Speichern**):
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
set CADMCP_REAL_SW=1
|
|
100
|
+
pytest -q -m sw
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Bekannte Einschränkungen
|
|
104
|
+
|
|
105
|
+
| Einschränkung | Hinweis |
|
|
106
|
+
|---|---|
|
|
107
|
+
| Mold Core/Cavity | Blockiert — [#1](https://github.com/shiyang19822000/cad-mcp/issues/1) |
|
|
108
|
+
| Native InsertThread-API | Helix + Sweep-Cut-Pfad — [#2](https://github.com/shiyang19822000/cad-mcp/issues/2) |
|
|
109
|
+
| Toolbox | Nicht integriert — [#3](https://github.com/shiyang19822000/cad-mcp/issues/3) |
|
|
110
|
+
| Part in-context edit | Nicht unterstützt — [#4](https://github.com/shiyang19822000/cad-mcp/issues/4) |
|
|
111
|
+
| Axiale Einschraubbewegung | Nicht unterstützt |
|
|
112
|
+
|
|
113
|
+
## Lizenz
|
|
114
|
+
|
|
115
|
+
[MIT](LICENSE) — Copyright (c) 2026 shiyang19822000.
|
|
116
|
+
|
|
117
|
+
Nicht verbunden mit Dassault Systèmes.
|