Repository navigation
Code2Form 0.4.0
Note (27 October 2026): manual modelling (#26, #27, #28) is not in this release after all. That work was lost from
mainbefore 0.4.0 was built, so the app you download here does not have it. It is coming back in a later release; 0.5.0 does not have it either.
Model by hand as well as in code, plan an object with an agent before drawing it, then bring in its electronics; export to game engines, robots and CAD; a new window, a light theme, and the app in French.
What's new
- Plan before drawing (#36): the MCP prompt
plan_objectasks what the object must do, in short rounds of questions that follow your answers, then reviews its mechanics as an engineer would (masses, balance, forces and supports, torque, material, fastening, assembly, energy) and writes a brief you approve. New tools give it numbers:mass_properties(c2f mass: printed mass by material and infill, center of gravity, tipping angle),loads(c2f loads: the torque a shaft needs, what each support takes, the motor's margins, the reduction to aim for), andcheck_brief, which measures a design and its circuit against the brief. Guide:docs/plan-mode.md; example:examples/winder/. - From an idea to its electronics (#35): the prompts
design_objectandadd_electronicslead an agent from a description to an approved model, then to its parts placed, wired and checked inside it.electrifymakes a design ready for its circuit without rewriting it; parts get a sheet (description, specs, sources) and the catalogue a search in English and French;check_partandsave_partwrite a part from its product page;fitgives each part its clearance in its enclosure; wires takeviapoints andchannel_for(); the view cuts the enclosure open and sees through it;imagedraws a sheet of four views at one scale. Guide:docs/idea-to-build.md; example:examples/nightlight/. - Mechanical library (#36): 608, 625, 6800 and 6001 bearings, shafts, ISO screws and nuts, heat-set inserts, a coupling, an involute spur gear,
gear_pair()andbearing_seat(), the 28BYJ-48 stepper and an N20 gear motor; every part's mass on its sheet. Manual modelling (#26, #27, #28)(not in this release, see the note above): select, move, turn and scale objects in the view, put down shapes and holes, combine them, round their edges, and draw constrained sketches to extrude or revolve, on a plane picked in the view. Every gesture is one edit of the code, and one undo step.- Meshes in, more formats out (#34): open and insert STL, OBJ, 3MF and STEP files (STEP through FreeCAD, when it is installed), repaired as they load, or turned into an editable design; export OBJ, STEP, URDF (robots, with joints from
part()), the parts as JSON, and a view's outline as DXF. The MCPsectiontool cuts a mesh to measure it again as a design. - Godot and Unity (#25): export animated models as glTF, each
part()a node, its motion from$t. - Exploded view (#30, #32): slides a design's parts apart, radially or along each part's axis.
- A new window (#33): one bar on top with the File menu, the tabs, the layout switch, Render and Export; the code beside a view whose tools float over it.
- Settings (#19, #23, #31): a light theme beside the dark one, shortcuts of your own, STL in binary, export options, a window that opens where you left it, and the whole app in French.
Fixes
%and#parts are drawn where their transformations put them (#29).- The reference implementation is named nowhere in the app or the docs (#24).
Downloads
| File | For |
|---|---|
Code2Form-0.4.0-macos-universal.zip |
The app, for every Mac (Apple silicon and Intel), macOS 11 or later |
c2f-0.4.0-macos-universal.zip |
The command line and MCP server, same platforms |
SHA256SUMS.txt |
Checksums of both |
The app is not notarized by Apple yet. On first launch, macOS blocks it: open it once, then go to System Settings → Privacy & Security and click Open Anyway. Or run, once:
xattr -dr com.apple.quarantine /Applications/Code2Form.appTo open .c2f, .c2fc and .scad files with Code2Form by double-click: Finder → Get Info on a file → Open with → Code2Form → Change All.
Windows and Linux: build from source with Rust 1.85 or later (cargo build --release); see the README.
Known limitations
projection()withoutcutkeeps holes open where the reference implementation fills them, which changes the volume of some models (0.3% on the GEB example).- Part annotations are plain numbers: a part's pins do not follow its parameters.
- Masses and some dimensions of the library's parts are estimated where no source gives them; each file says which.
- The calculations of the plan are static orders of magnitude with margins: no dynamics, no finite elements.
check_brief's torque margin comes from the brief'sloadsscenario, not from the design's geometry. - A part in your own library (
~/Documents/Code2Form/libraries) is found before the app's part of the same name.