Comment by etskinner

Comment by etskinner 5 days ago

55 replies

The opening paragraph is very telling; the author doesn't seem to understand typical pro-level parametric CAD programs available on the market:

> I keep designing physical parts for our robots. Motor mounts, sensor brackets, wheel hubs. Every time, the workflow is the same: open a GUI CAD program, click around for an hour, export an STL, realize the bolt pattern is 2mm off, repeat.

This doesn't make sense. When you realize the bolt pattern is 2mm off, you just edit that dimension and let the CAD program recalculate. You don't need to click around for an hour again. That's the beauty of contstraint-based parametric modeling as opposed to, say, modeling in Blender.

The author's program is akin to writing vim to replace Publisher. They're solving entirely different problems. Not to mention, this code-as-model paradigm already exists: OpenSCAD

bangaladore 5 days ago

> That's the beauty of constraint-based parametric modeling as opposed to, say, modeling in Blender.

I was thinking the same thing. This looks more like an API that makes 3d modeling look closer to CAD, but without realizing that CAD is about constraints, parametrizing, and far more.

  • throwup238 5 days ago

    > but without realizing that CAD is about constraints, parametrizing, and far more

    Constraints and parametrizing are the trivial parts of CAD, something you can now implement in a weekend with Claude Code, the MINPACK/SolveSpace test suite, and OpenCascade as an oracle. The hard part is a geometric kernel that can express boundary representations for complex shapes (sketches, chamfers, fillets, etc) and boolean operations while somewhat handling the topographical naming problem without driving the user insane (which existing kernels are still all shit at).

    • delusional 5 days ago

      > Constraints and parametrizing are the trivial parts of CAD, something you can now implement in a weekend with Claude Code

      You go ahead and try that.

      • throwup238 4 days ago

        ;)

        Keywords: Jacobian, Newton-Raphson, Levenberg-Marquardt, Powell dog leg, Schur complements, sparse QR/Cholesky, and so on. The LLM can figure the rest out. Try it yourself!

        I recommend Rust because the methods are old and most of the algorithms are already implemented by crates, you just have to wire them together. Like I said the hard part is the b-rep: you’re not going to find anything equivalent to Parasolid or ACIS in the literature or open source.

  • tomcur 4 days ago

    We've started a 2D geometric constraint solver at https://github.com/endoli/fiksi doing the constraint part of this in Rust. We're using it internally and so far it works well, though it's still experimental. More constraints and especially better behavior around failure are needed. The latter will likely entail at least doing more with degree of freedom counting, though there's some of that already.

    A C++-library to be aware of is SolveSpace's slvs: https://github.com/solvespace/solvespace/tree/e74c2eae54fdd9....

  • imtringued 4 days ago

    This is something I don't get about the code-based CAD tools. They don't let you specify declarative geometric constraints.

    Constraints are useful beyond just designing parts. If you have a parallel mechanism there are only two ways to solve the kinematics/dynamics for it: Constraint solving for rigid contacts or iterative solving by approximating the model with non-rigid contacts via internal springs.

    • WillAdams 4 days ago

      Could you mock up some code to describe which you feel would be suitable to describing such a thing?

ecto 5 days ago

You're correct, I'm completely uneducated! Pull requests welcome :)

  • IshKebab 5 days ago

    The pull request is to delete the project and open SOLIDWORKS or FreeCAD.

    But don't actually delete it. It looks like a nice alternative to OpenSCAD. But like OpenSCAD it's really a niche thing for designs that are highly parametric like fasteners, gears, 3D printed boxes, etc.

    Like OpenSCAD using it for normal "irregular" CAD is going to be extremely frustrating. Like editing an SVG in notepad instead of Inkscape.

    I still feel like there's a unexplored space where you combine the benefits of both somehow though. Like a code-based CAD but it also has a GUI editor that stays in sync and avoids the need to type in coordinates by hand. That would be extremely difficult though.

    • dang 4 days ago

      > The pull request is to delete the project

      Ouch. Please don't attack someone's work this way. It's too aggressive and against the site guidelines: https://news.ycombinator.com/newsguidelines.html.

      I'm sure you didn't intend it as an attack, but it's easy to cross into poisoning the community without meaning to. Many people have been hounded into abandoning HN because of this type of swipe, or at least into never sharing their work here. We all lose when that happens.

      It's a pity, because what you wrote was otherwise a fine contribution. if you had begun your comment at the good part ("It looks like a nice alternative [etc.]") it would have been great.

    • DannyBee 5 days ago

      This is actually what onshape is, under the covers.

      The GUI is really just using their scripting primitives, etc. You can access it the same as they can, actually.

      • throwup238 5 days ago

        Onshape is just a GUI over the Parasolid geometric modeling kernel, the same kernel used by Solidworks [1]. Whatever their scripting primitives are, they're at best a thin wrapper over Parasolid (which is true for the entire industry - it's all Siemens Parasolid and Dassault ACIS).

        [1] https://en.wikipedia.org/wiki/Parasolid#Applications

    • amelius 5 days ago

      > Like editing an SVG in notepad instead of Inkscape.

      Speaking of which, I would love to have parametric capabilities in Inkscape.

      • TheTaytay 5 days ago

        I recently stumbled across cuttle.xyz, and it’s a code-based parametric vector editor. I recently did a real world art project in it and LOVED it.

      • avhon1 4 days ago

        FWIW, the FLOSS CAD program SolveSpace can generate parametric sketches and export them as SVG files (file > export 2d view)

    • hyperbrainer 4 days ago

      > "highly paramteric like fastners, gears, 3D printed boxes"

      1. These parts should probably be on McMaster. If you are not using them straight from there, you better have a _great_ reason as to why not when it comes up in the design review.

      2. Solidworks has Smart Fasteners, Inventor has Spur Gear Component Generator, Sketch->Extrude->Shell takes 30 seconds, so not sure why 3D printed boxes would be faster or better with this for most stuff. Also, this stuff is easily solved by things like the component library and configurations.

      • IshKebab 4 days ago

        > you better have a _great_ reason as to why not

        Because I don't live in America?

    • aaronblohowiak 5 days ago

      >I still feel like there's an unexplored space where you combine the benefits of both somehow though. Like a code-based CAD but it also has a GUI editor that stays in sync and avoids the need to type in coordinates by hand. That would be extremely difficult though.

      I think you can do this if the data representation of operations and values is human readable. The simplest implementation would restrict the language/data format to operations representable in the gui.

      Unlike trying to solve the "visual programming" problems, we don't need or desire Turing completeness.

      Very interesting indeed!

    • prennert 4 days ago

      Ha! Since you mention SVG, there is a trick!

      Draw your free-hand shape in Inkscape, export to SVG, import it in FreeCAD and go from there.

      I used that trick to trace a part from an image and it worked surprisingly well. Not very efficient compared to commercial tooling, but despite the clumsiness its fairly intuitive and free.

    • [removed] 4 days ago
      [deleted]
    • jfindley 4 days ago

      All the good commercial parametric CAD apps have an API that allow you to define models programatically to avoid repitition, or do more complicated things like ensure gear ratios are exactly correct. I'm not sure I entirely understand what you're getting at with the "stays in sync" part though.

    • NonHyloMorph 5 days ago

      Are you aware of Rhino 3D with grasshopper?

jetter 4 days ago

If you like OpenSCAD, you should check https://modelrift.com which is an OpenSCAD browser-based IDE which uses LLM to generate .scad and instantly shows the .stl 3d model result via 3d model viewer. Since AI models are still not good at openscad, the useful feature of modelrift is the "screenshot-powered" iteration where human annotates visual problems and sends it back to AI assistant to fix, all using hotkey shortcuts.

gwbas1c 5 days ago

Read a bit before critisizing:

> One thing I care about that most CAD tools don't: vcad is designed to be used by AI coding agents.

  • amelius 5 days ago

    AI coding agents are notoriously bad at anything that involves spatial awareness.

    • neomantra 4 days ago

      Over the weekend I took pictures of the four walls of my office and asked Claude Desktop to examine them and give me a plan for tackling it. It absolutely “understood” my room, identifying the different (messy) workspaces and various piles of stuff on the ground. It generated a checklist with targeted advice and said that I should be motivated to clean up because the “welcome back daddy” sign up on the wall indicates that my kids love me and want a nice space to share with me.

      I vibe-code TUI and GUI by making statements like “make the panel on the right side two pixels thinner”.

      Related to this thread, I explored agentic looping for 3d models (with a swift library, could be done with this Rust one by following the workflow: https://github.com/ConAcademy/WeaselToonCadova

    • storystarling 4 days ago

      I've found they are actually quite good at semantic geometry even if they struggle with visual or pixel-based reasoning. Since this is parametric the agent just needs to understand the API and constraints rather than visualize the final output. It seems like a code-first interface is exactly what you want for this.

  • ilogik 5 days ago

    For that there’s openscad

    • dymk 4 days ago

      Breaks down for complex parts with lots of repeated operations, suffers from floating point rounding errors. No constraint solver.

      • WillAdams 4 days ago

        Usually when one needs constraints one can code it up as a recursive function.

    • hnuser123456 5 days ago

      I've even already asked an LLM to generate designs in openscad, and there's plenty of examples out there. Obviously there's a complexity limit, but there's also a cheat sheet that makes it pretty easy to discover how to do almost anything that's possible within.