Setting a diagonal by hand in Studio never ends up perfect and is tedious to do, so this tool lets you mark which holes go together and rotates and moves the parts automatically to the correct position.
Draw it here:
drop parts on the board, click which holes stay fixed and which holes go together,
and it solves as you go. When you're finished, you can save a .ldr you can import
to your Studio.
Or build it in Studio: lay the parts out roughly, drop marker pins in the holes that have to meet, and hand the file over. That way any part in the LDraw library works, and so do submodels. Either press Solve .ldr or .io in the web app, or:
deno run -A diagonal.js mymodel.ldrHow to mark a model up: TUTORIAL.md
# solve a model
deno run -A diagonal.js mymodel.ldr
# check the math
deno run -A test.js
# the web app needs serving, ES modules will not load from file://
python -m http.serverThree generators rebuild what is derived from the LDraw library. Run them when you add a part to the palette, or when the library is updated, or never.
deno run -A tools/parts.js # parts.js — the palette's holes
deno run -A tools/pictures.js # img/*.png — the palette's pictures
deno run -A tools/holes.js # holes.js — every hole in the library, for the browserCheck out LEGO chain generator too
My other tool for making chains, source code in donmerendolo/LEGO-chain-generator.
The code is GPL-3.0.
parts.js, holes.js and everything in img/ are generated from the
LDraw parts library, which is CC BY 4.0.

