mechvane 0.1.0a1__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.
- mechvane-0.1.0a1/LICENSE-APACHE +177 -0
- mechvane-0.1.0a1/LICENSE-MIT +21 -0
- mechvane-0.1.0a1/NOTICE +9 -0
- mechvane-0.1.0a1/PKG-INFO +157 -0
- mechvane-0.1.0a1/README.md +132 -0
- mechvane-0.1.0a1/mechvane/__init__.py +14 -0
- mechvane-0.1.0a1/mechvane/__main__.py +3 -0
- mechvane-0.1.0a1/mechvane/bolted.py +1745 -0
- mechvane-0.1.0a1/mechvane/cli.py +98 -0
- mechvane-0.1.0a1/mechvane/data/flange.build.json +132 -0
- mechvane-0.1.0a1/mechvane/design_rules.py +548 -0
- mechvane-0.1.0a1/mechvane/documents.py +132 -0
- mechvane-0.1.0a1/mechvane/examples.py +66 -0
- mechvane-0.1.0a1/mechvane/geometry.py +299 -0
- mechvane-0.1.0a1/mechvane/hole_tables.py +343 -0
- mechvane-0.1.0a1/mechvane/inplace.py +332 -0
- mechvane-0.1.0a1/mechvane/install.py +149 -0
- mechvane-0.1.0a1/mechvane/iso286.py +131 -0
- mechvane-0.1.0a1/mechvane/katalog.py +332 -0
- mechvane-0.1.0a1/mechvane/links.py +902 -0
- mechvane-0.1.0a1/mechvane/query.py +621 -0
- mechvane-0.1.0a1/mechvane/server.py +523 -0
- mechvane-0.1.0a1/mechvane/sketch_rule.py +128 -0
- mechvane-0.1.0a1/mechvane/solidcraft.py +164 -0
- mechvane-0.1.0a1/mechvane/standard_parts.py +607 -0
- mechvane-0.1.0a1/mechvane/tree.py +201 -0
- mechvane-0.1.0a1/mechvane/ui/__init__.py +15 -0
- mechvane-0.1.0a1/mechvane/ui/__main__.py +17 -0
- mechvane-0.1.0a1/mechvane/ui/mesh.py +103 -0
- mechvane-0.1.0a1/mechvane/ui/server.py +675 -0
- mechvane-0.1.0a1/mechvane/ui/static/app.js +756 -0
- mechvane-0.1.0a1/mechvane/ui/static/index.html +67 -0
- mechvane-0.1.0a1/mechvane/ui/static/model.html +290 -0
- mechvane-0.1.0a1/mechvane/ui/static/style.css +422 -0
- mechvane-0.1.0a1/mechvane/ui/webapp.py +80 -0
- mechvane-0.1.0a1/mechvane.egg-info/PKG-INFO +157 -0
- mechvane-0.1.0a1/mechvane.egg-info/SOURCES.txt +41 -0
- mechvane-0.1.0a1/mechvane.egg-info/dependency_links.txt +1 -0
- mechvane-0.1.0a1/mechvane.egg-info/entry_points.txt +2 -0
- mechvane-0.1.0a1/mechvane.egg-info/requires.txt +1 -0
- mechvane-0.1.0a1/mechvane.egg-info/top_level.txt +1 -0
- mechvane-0.1.0a1/pyproject.toml +39 -0
- mechvane-0.1.0a1/setup.cfg +4 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nils Gollub and Mechvane contributors
|
|
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.
|
mechvane-0.1.0a1/NOTICE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Mechvane
|
|
2
|
+
Copyright (c) 2026 Nils Gollub and Mechvane contributors
|
|
3
|
+
|
|
4
|
+
Licensed under either of the Apache License, Version 2.0 (LICENSE-APACHE) or the
|
|
5
|
+
MIT license (LICENSE-MIT), at your option.
|
|
6
|
+
|
|
7
|
+
Mechvane builds on SolidCraft (https://github.com/tangency-labs/solidcraft),
|
|
8
|
+
MIT OR Apache-2.0. Slicer engines such as CuraEngine (AGPL-3.0) are run as separate
|
|
9
|
+
processes and are not part of Mechvane; their licences apply to them alone.
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mechvane
|
|
3
|
+
Version: 0.1.0a1
|
|
4
|
+
Summary: Parametric 3D CAD for everyday mechanical engineering, with AI agents, built on SolidCraft
|
|
5
|
+
License-Expression: MIT OR Apache-2.0
|
|
6
|
+
Project-URL: Homepage, https://github.com/mechvane/mechvane
|
|
7
|
+
Project-URL: Demo, https://mechvane.github.io/mechvane/
|
|
8
|
+
Project-URL: Roadmap, https://github.com/mechvane/mechvane/blob/main/ROADMAP.md
|
|
9
|
+
Project-URL: Issues, https://github.com/mechvane/mechvane/issues
|
|
10
|
+
Keywords: cad,parametric,mechanical-engineering,mcp,solidcraft,ai-agents
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Manufacturing
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Topic :: Scientific/Engineering
|
|
17
|
+
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE-MIT
|
|
21
|
+
License-File: LICENSE-APACHE
|
|
22
|
+
License-File: NOTICE
|
|
23
|
+
Requires-Dist: mcp<2,>=1.20
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
|
|
26
|
+
# Mechvane
|
|
27
|
+
|
|
28
|
+
Parametric 3D CAD for everyday mechanical engineering (individual engineers, makers,
|
|
29
|
+
small and medium-sized companies), following the workflow of classic mechanical CAD systems
|
|
30
|
+
and rethought for AI agents. The core stays small; domain modules (sheet metal, standard
|
|
31
|
+
parts, frames, drawings …) load only when a document or the user needs them.
|
|
32
|
+
|
|
33
|
+
**[Try the web UI in your browser](https://mechvane.github.io/mechvane/)**: example models with the model
|
|
34
|
+
tree and design check findings, nothing to install.
|
|
35
|
+
|
|
36
|
+

|
|
37
|
+
|
|
38
|
+
*Change a part, and `update_links` notices that a joint jumped to a different bore and
|
|
39
|
+
repairs it (regenerate with `python3 tools/demo_update_links.py`).*
|
|
40
|
+
|
|
41
|
+
## Guiding principles
|
|
42
|
+
|
|
43
|
+
- **Agents are first-class operators.** Every action is a typed command. GUI, scripts,
|
|
44
|
+
plugins and AI agents (MCP) share one interface, with undo, batch rollback and precise
|
|
45
|
+
error messages.
|
|
46
|
+
- **Agents with engineering knowledge.** An open, sourced knowledge catalog: standard
|
|
47
|
+
values from freely accessible sources, best practice from public handbooks and design
|
|
48
|
+
guides, our own measurement series on the printer. Every rule carries its source,
|
|
49
|
+
rationale, exceptions and severity (error or hint), so agents design like experienced
|
|
50
|
+
engineers and `check_design` does not guess.
|
|
51
|
+
- **No dead weight.** What monolithic CAD suites carry around (piping, cable harness, BIM,
|
|
52
|
+
rendering studio …) is a plugin here or left out.
|
|
53
|
+
- **Proven workflows where they work.** Design accelerators (bolted connections, shafts,
|
|
54
|
+
gears), frame generator, standard parts, ISO drawings with parts list, rule-based
|
|
55
|
+
configuration.
|
|
56
|
+
- **Text- and git-friendly file format.**
|
|
57
|
+
|
|
58
|
+
## Foundation
|
|
59
|
+
|
|
60
|
+
Mechvane builds on [SolidCraft](https://github.com/tangency-labs/solidcraft) (Rust,
|
|
61
|
+
Apache-2.0), an open CAD kernel and app where "everything is a command", with a built-in
|
|
62
|
+
MCP server. SolidCraft stays unchanged as a dependency; Mechvane adds its own layer on top
|
|
63
|
+
([ADR 0001](https://github.com/mechvane/mechvane/blob/main/docs/adr/0001-grundlage-solidcraft.md)).
|
|
64
|
+
|
|
65
|
+
## Quick start
|
|
66
|
+
|
|
67
|
+
Requirements: Python ≥ 3.11. Everything else comes with `mechvane setup`: it downloads the
|
|
68
|
+
pinned `solidcraft-cli` and SolidCraft web app (v0.21.0) from the
|
|
69
|
+
[SolidCraft release](https://github.com/tangency-labs/solidcraft/releases) for your platform
|
|
70
|
+
(Linux x86_64/aarch64, Windows x64/arm64, macOS) and checks their SHA256. No build needed;
|
|
71
|
+
rendering works headless too.
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
pip install mechvane
|
|
75
|
+
mechvane setup # SolidCraft CLI and web app, about 90 MB, once
|
|
76
|
+
mechvane ui --demo # example models in the browser
|
|
77
|
+
mechvane ui my-project/ # your own .solidcraft files
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Alpha: so far tested on Linux; Windows and macOS are expected to work but not yet tested.
|
|
81
|
+
|
|
82
|
+
An existing `solidcraft-cli` is used when you set `SOLIDCRAFT_CLI` or skip `mechvane setup`
|
|
83
|
+
and have it on your `PATH`.
|
|
84
|
+
|
|
85
|
+
As an MCP server for an agent (e.g. Claude Code), `.mcp.json` in your project:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"mcpServers": {
|
|
90
|
+
"mechvane": {
|
|
91
|
+
"command": "mechvane",
|
|
92
|
+
"args": ["mcp", "--workspace", "./workspace"]
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
For development, clone the repo and run the checks:
|
|
99
|
+
|
|
100
|
+
```sh
|
|
101
|
+
git clone https://github.com/mechvane/mechvane && cd mechvane
|
|
102
|
+
pip install -e .
|
|
103
|
+
python3 tests/mechvane/check.py # about 240 checks, a few minutes
|
|
104
|
+
python3 tests/reference/check.py # reference parts with expected values
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Then ask, for example: "Build an 80×40×8 plate with four M5 clearance holes, bolt it to a
|
|
108
|
+
bracket and check the design." The agent uses `new_part`, `run`, `bolted_connection`,
|
|
109
|
+
`add_joint` and `check_design`. When a part changes, `update_links` finds joints that
|
|
110
|
+
jumped to a different face and repairs them.
|
|
111
|
+
Windows: [docs/installation-windows.md](https://github.com/mechvane/mechvane/blob/main/docs/installation-windows.md) (German).
|
|
112
|
+
|
|
113
|
+
## Status
|
|
114
|
+
|
|
115
|
+
Phase 1: a Python prototype running as an MCP server on top of SolidCraft. Separate part
|
|
116
|
+
and assembly files, sketches owned by their feature, a model browser in the classic tree
|
|
117
|
+
style, joints across files with checking and repair, standard parts (screws, nuts,
|
|
118
|
+
washers, ball bearings), a bolted connection assistant with patterns, `check_design` with
|
|
119
|
+
design rules, ISO 286 fits and a knowledge catalog of sourced standard values. A read-only
|
|
120
|
+
web UI (`python3 -m mechvane.ui <file.solidcraft> [--port 8765]`) shows the 3D model,
|
|
121
|
+
the model browser tree and design/joint findings with interactive face highlighting.
|
|
122
|
+
Its "Model by hand" mode (`/model`) embeds the SolidCraft web app: edit the part or
|
|
123
|
+
assembly with the mouse, save, and Mechvane checks it again and updates the links. The web
|
|
124
|
+
app is downloaded once from the SolidCraft release and checked against a pinned SHA256.
|
|
125
|
+
|
|
126
|
+

|
|
127
|
+
|
|
128
|
+
*A countersink that notches the wall, highlighted on click (regenerate with
|
|
129
|
+
`python3 tools/demo_web_ui.py`).*
|
|
130
|
+
|
|
131
|
+

|
|
132
|
+
|
|
133
|
+
*Model by hand: the same bracket in the embedded SolidCraft web app, the countersink moved away
|
|
134
|
+
from the wall and saved, Mechvane checked it again (regenerate with `python3 tools/demo_model_ui.py`).
|
|
135
|
+
Try it without installing: [live demo](https://mechvane.github.io/mechvane/model.html?demo=bracket).*
|
|
136
|
+
|
|
137
|
+
## Contents
|
|
138
|
+
|
|
139
|
+
- [ROADMAP.md](https://github.com/mechvane/mechvane/blob/main/ROADMAP.md): phases, decision points, risks
|
|
140
|
+
- [docs/adr/](https://github.com/mechvane/mechvane/tree/main/docs/adr): architecture decisions
|
|
141
|
+
- [MCP server](https://github.com/mechvane/mechvane/blob/main/docs/mechvane-mcp.md) (`mechvane/`): tools, data model, test reports
|
|
142
|
+
- [tests/](https://github.com/mechvane/mechvane/tree/main/tests): layer checks and reference parts
|
|
143
|
+
- [docs/research/](https://github.com/mechvane/mechvane/tree/main/docs/research): research notes and practice tests, dated. Notes
|
|
144
|
+
marked as drafts (e.g. `-flash`, `-gemini`) are unverified unless a check note says
|
|
145
|
+
otherwise.
|
|
146
|
+
|
|
147
|
+
Most project documentation is in German for now; code and comments are in English.
|
|
148
|
+
|
|
149
|
+
## License
|
|
150
|
+
|
|
151
|
+
MIT OR Apache-2.0, at your option (`LICENSE-MIT`, `LICENSE-APACHE`), like SolidCraft, so
|
|
152
|
+
code can move in both directions. Contributions are under the same terms. AGPL slicers
|
|
153
|
+
such as CuraEngine only run as separate processes and are not part of Mechvane
|
|
154
|
+
(`NOTICE`). See [CONTRIBUTING.md](https://github.com/mechvane/mechvane/blob/main/CONTRIBUTING.md).
|
|
155
|
+
|
|
156
|
+
Mechvane is an independent project and is not affiliated with Autodesk or any other CAD
|
|
157
|
+
vendor. Product names only describe workflows.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Mechvane
|
|
2
|
+
|
|
3
|
+
Parametric 3D CAD for everyday mechanical engineering (individual engineers, makers,
|
|
4
|
+
small and medium-sized companies), following the workflow of classic mechanical CAD systems
|
|
5
|
+
and rethought for AI agents. The core stays small; domain modules (sheet metal, standard
|
|
6
|
+
parts, frames, drawings …) load only when a document or the user needs them.
|
|
7
|
+
|
|
8
|
+
**[Try the web UI in your browser](https://mechvane.github.io/mechvane/)**: example models with the model
|
|
9
|
+
tree and design check findings, nothing to install.
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
*Change a part, and `update_links` notices that a joint jumped to a different bore and
|
|
14
|
+
repairs it (regenerate with `python3 tools/demo_update_links.py`).*
|
|
15
|
+
|
|
16
|
+
## Guiding principles
|
|
17
|
+
|
|
18
|
+
- **Agents are first-class operators.** Every action is a typed command. GUI, scripts,
|
|
19
|
+
plugins and AI agents (MCP) share one interface, with undo, batch rollback and precise
|
|
20
|
+
error messages.
|
|
21
|
+
- **Agents with engineering knowledge.** An open, sourced knowledge catalog: standard
|
|
22
|
+
values from freely accessible sources, best practice from public handbooks and design
|
|
23
|
+
guides, our own measurement series on the printer. Every rule carries its source,
|
|
24
|
+
rationale, exceptions and severity (error or hint), so agents design like experienced
|
|
25
|
+
engineers and `check_design` does not guess.
|
|
26
|
+
- **No dead weight.** What monolithic CAD suites carry around (piping, cable harness, BIM,
|
|
27
|
+
rendering studio …) is a plugin here or left out.
|
|
28
|
+
- **Proven workflows where they work.** Design accelerators (bolted connections, shafts,
|
|
29
|
+
gears), frame generator, standard parts, ISO drawings with parts list, rule-based
|
|
30
|
+
configuration.
|
|
31
|
+
- **Text- and git-friendly file format.**
|
|
32
|
+
|
|
33
|
+
## Foundation
|
|
34
|
+
|
|
35
|
+
Mechvane builds on [SolidCraft](https://github.com/tangency-labs/solidcraft) (Rust,
|
|
36
|
+
Apache-2.0), an open CAD kernel and app where "everything is a command", with a built-in
|
|
37
|
+
MCP server. SolidCraft stays unchanged as a dependency; Mechvane adds its own layer on top
|
|
38
|
+
([ADR 0001](https://github.com/mechvane/mechvane/blob/main/docs/adr/0001-grundlage-solidcraft.md)).
|
|
39
|
+
|
|
40
|
+
## Quick start
|
|
41
|
+
|
|
42
|
+
Requirements: Python ≥ 3.11. Everything else comes with `mechvane setup`: it downloads the
|
|
43
|
+
pinned `solidcraft-cli` and SolidCraft web app (v0.21.0) from the
|
|
44
|
+
[SolidCraft release](https://github.com/tangency-labs/solidcraft/releases) for your platform
|
|
45
|
+
(Linux x86_64/aarch64, Windows x64/arm64, macOS) and checks their SHA256. No build needed;
|
|
46
|
+
rendering works headless too.
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
pip install mechvane
|
|
50
|
+
mechvane setup # SolidCraft CLI and web app, about 90 MB, once
|
|
51
|
+
mechvane ui --demo # example models in the browser
|
|
52
|
+
mechvane ui my-project/ # your own .solidcraft files
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Alpha: so far tested on Linux; Windows and macOS are expected to work but not yet tested.
|
|
56
|
+
|
|
57
|
+
An existing `solidcraft-cli` is used when you set `SOLIDCRAFT_CLI` or skip `mechvane setup`
|
|
58
|
+
and have it on your `PATH`.
|
|
59
|
+
|
|
60
|
+
As an MCP server for an agent (e.g. Claude Code), `.mcp.json` in your project:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"mcpServers": {
|
|
65
|
+
"mechvane": {
|
|
66
|
+
"command": "mechvane",
|
|
67
|
+
"args": ["mcp", "--workspace", "./workspace"]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
For development, clone the repo and run the checks:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
git clone https://github.com/mechvane/mechvane && cd mechvane
|
|
77
|
+
pip install -e .
|
|
78
|
+
python3 tests/mechvane/check.py # about 240 checks, a few minutes
|
|
79
|
+
python3 tests/reference/check.py # reference parts with expected values
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Then ask, for example: "Build an 80×40×8 plate with four M5 clearance holes, bolt it to a
|
|
83
|
+
bracket and check the design." The agent uses `new_part`, `run`, `bolted_connection`,
|
|
84
|
+
`add_joint` and `check_design`. When a part changes, `update_links` finds joints that
|
|
85
|
+
jumped to a different face and repairs them.
|
|
86
|
+
Windows: [docs/installation-windows.md](https://github.com/mechvane/mechvane/blob/main/docs/installation-windows.md) (German).
|
|
87
|
+
|
|
88
|
+
## Status
|
|
89
|
+
|
|
90
|
+
Phase 1: a Python prototype running as an MCP server on top of SolidCraft. Separate part
|
|
91
|
+
and assembly files, sketches owned by their feature, a model browser in the classic tree
|
|
92
|
+
style, joints across files with checking and repair, standard parts (screws, nuts,
|
|
93
|
+
washers, ball bearings), a bolted connection assistant with patterns, `check_design` with
|
|
94
|
+
design rules, ISO 286 fits and a knowledge catalog of sourced standard values. A read-only
|
|
95
|
+
web UI (`python3 -m mechvane.ui <file.solidcraft> [--port 8765]`) shows the 3D model,
|
|
96
|
+
the model browser tree and design/joint findings with interactive face highlighting.
|
|
97
|
+
Its "Model by hand" mode (`/model`) embeds the SolidCraft web app: edit the part or
|
|
98
|
+
assembly with the mouse, save, and Mechvane checks it again and updates the links. The web
|
|
99
|
+
app is downloaded once from the SolidCraft release and checked against a pinned SHA256.
|
|
100
|
+
|
|
101
|
+

|
|
102
|
+
|
|
103
|
+
*A countersink that notches the wall, highlighted on click (regenerate with
|
|
104
|
+
`python3 tools/demo_web_ui.py`).*
|
|
105
|
+
|
|
106
|
+

|
|
107
|
+
|
|
108
|
+
*Model by hand: the same bracket in the embedded SolidCraft web app, the countersink moved away
|
|
109
|
+
from the wall and saved, Mechvane checked it again (regenerate with `python3 tools/demo_model_ui.py`).
|
|
110
|
+
Try it without installing: [live demo](https://mechvane.github.io/mechvane/model.html?demo=bracket).*
|
|
111
|
+
|
|
112
|
+
## Contents
|
|
113
|
+
|
|
114
|
+
- [ROADMAP.md](https://github.com/mechvane/mechvane/blob/main/ROADMAP.md): phases, decision points, risks
|
|
115
|
+
- [docs/adr/](https://github.com/mechvane/mechvane/tree/main/docs/adr): architecture decisions
|
|
116
|
+
- [MCP server](https://github.com/mechvane/mechvane/blob/main/docs/mechvane-mcp.md) (`mechvane/`): tools, data model, test reports
|
|
117
|
+
- [tests/](https://github.com/mechvane/mechvane/tree/main/tests): layer checks and reference parts
|
|
118
|
+
- [docs/research/](https://github.com/mechvane/mechvane/tree/main/docs/research): research notes and practice tests, dated. Notes
|
|
119
|
+
marked as drafts (e.g. `-flash`, `-gemini`) are unverified unless a check note says
|
|
120
|
+
otherwise.
|
|
121
|
+
|
|
122
|
+
Most project documentation is in German for now; code and comments are in English.
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
MIT OR Apache-2.0, at your option (`LICENSE-MIT`, `LICENSE-APACHE`), like SolidCraft, so
|
|
127
|
+
code can move in both directions. Contributions are under the same terms. AGPL slicers
|
|
128
|
+
such as CuraEngine only run as separate processes and are not part of Mechvane
|
|
129
|
+
(`NOTICE`). See [CONTRIBUTING.md](https://github.com/mechvane/mechvane/blob/main/CONTRIBUTING.md).
|
|
130
|
+
|
|
131
|
+
Mechvane is an independent project and is not affiliated with Autodesk or any other CAD
|
|
132
|
+
vendor. Product names only describe workflows.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Mechvane: an Inventor-style document layer on top of SolidCraft.
|
|
2
|
+
|
|
3
|
+
Parts and assemblies are separate .solidcraft files. Each open document runs in its own
|
|
4
|
+
headless `solidcraft-cli mcp` session. See docs/adr/0001-grundlage-solidcraft.md."""
|
|
5
|
+
|
|
6
|
+
METADATA_KEY = "dev.mechvane"
|
|
7
|
+
# Key used before the rename to Mechvane; still read so older files keep working.
|
|
8
|
+
LEGACY_METADATA_KEY = "io.github.nilsgollub.inventa"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def read_metadata(meta: dict) -> dict:
|
|
12
|
+
"""This layer's entry from a document's metadata map, under the current or the legacy key."""
|
|
13
|
+
meta = meta or {}
|
|
14
|
+
return meta.get(METADATA_KEY) or meta.get(LEGACY_METADATA_KEY) or {}
|