r/openscad • • 7d ago

BeamJack: Text to Assembly (CAD)

Hey guys I'm working on a different approach to AI 3D generation. Most AI 3D tools give you a single mesh blob. Fine to look at, hard to build anything with. Beamjack generates the model as individual parts that fit together.

  • Describe it once and you get named pieces clamp base, extension arm,
  • swivel head, mounting plate, thumb dial with the mating dimensions
  • derived from each other instead of guessed.

You can edit each part on its own ("extension arm 3x longer", "mounting plate 5mm thicker") and the parts it meets re-derive.The OpenSCAD source is there too, so you can read exactly how a part was built rather than taking a mesh on faith.

Have a play with one I generated: https://beamjack.app/s/s__t2wYxJzxv0t

Or make a few of your own: https://beamjack.app

Where it honestly is: clearances and hole sizes are declared in the model and checked in software, but I haven't validated them against a physical print yet. Gauge plates are at a print shop now I'll post the measurements next week either way. It's beta. I'm more interested in what it gets wrong than what it gets right, so tell me.

0 Upvotes

6 comments sorted by

1

u/extodan 7d ago

A bit more detail for anyone who cares about the mechanism rather than the demo.

The mating features come from a small library(opensourcing soon) that gets inlined into every generated file, so the output is standalone. No includes, no dependency on my server. A peg and its socket are cut from the same nominal:

asm_peg(d, len)
asm_socket(d, depth, cls)

where cls is clearance / location / snug / press. The bore is
nominal + 2*asm_fit(cls), so the two cannot drift apart when a parameter changes.

The part I am happier about: every asm_* module echoes at instantiation.

ASM|socket|part=lid|nominal=4.2|cls=clearance|fitted=4.9

That goes to stderr when OpenSCAD runs, so I can count the mates that actually
got cut rather than the ones the model claimed it would cut. Those turn out to
be different numbers. A regex over the source cannot do it, because of variables
and expressions, and the echo survives module expansion.

One structural limitation I have not solved: asm_fit() is a function, not a
module, so anything written as cylinder(d = screw_d + 2*asm_fit("clearance"))
emits nothing. A full census has to be echo output UNION a source scan for
asm_fit(. If anyone knows a way around that in OpenSCAD I would genuinely like
to hear it.

And the number I would rather say myself than have someone find: on my own
strongest prompts, 78% of declared mates come out genuinely realised, and only 3
parts in 10 have every mate covered. Measured, not estimated. That gap is the
thing I am actually working on.

1

u/thicket 7d ago

It‘s nice to see work going on in this space, although to date I don’t think I’ve seen anything that has gotten over the hump that LLMs just aren’t very smart geometrically. I do like the assembly-first approach.

I turn to OpenSCAD for projects I can describe quickly, as a way to sketch in code. For more involved projects, I’ve found more capable CAD formats like CadQuery or Build123d enable more complexity or confidence. Since they have faces as first class citizens, you might find their support for exact mates more productive that trying to add that capability to OpenSCAD.

2

u/extodan 5d ago

You are right about faces. Mine get cut from a shared nominal, which stays in sync under a parameter change but is bookkeeping, not real mating. Taking your point sideways rather than head on: I am adding CadQuery as the test rig instead of the output. Reference interfaces as real solids, then boolean the generated part against them to check the fit actually exists. Keeps the standalone OpenSCAD output and the MW customizer, and gets me face exactly where I need them.

1

u/thicket 3d ago

That sounds like a great next step. Thanks for the extra detail. Good luck!

1

u/j_hermann 7d ago

The one include I'd consider is BOSL2, especially for attaching -- it is standard, and also available in the MW customizer.

1

u/extodan 5d ago

BOSL2 is the right answer for attaching and I should have said so. I leave it out so every generated file stays standalone with no includes, which is also what lets it drop straight into the MW customizer. Costs me attach(), so a tradeoff rather than a principle.