GenCAD

(gencad.github.io)

348 points | by dagenix 13 hours ago

23 comments

  • hspeiser 4 hours ago
    I spent a few hours trying to get this to work, and I couldn’t get it to produce usable results on anything except the training data, even with very simple drawings.

    I noticed in the GitHub that they mention it is only around 60% reliable even on their own training data, but the image shown on the front page feels pretty misleading. I made 10 images that were very similar in complexity to the examples shown, and even after running it around 50 times on each image, not a single one worked correctly. In the rare cases where it produced something, the output was completely wrong.

    This seems pretty misleading in its current state and definitely needs more work.

    • ololobus 1 hour ago
      I’m also confused by their examples. All of them seem to be perfect renders/exports from 3D models — this is not the use case where I see it the most useful. Making a parametrized CAD model out of a hand-drawn sketch — yes, please
  • jrflo 7 hours ago
    Neat, but I don't really see the utility. The time consuming part of CAD drawing comes from figuring out the correct dimensions of each feature, spacing, sizing, tolerances, etc., and constraining the drawing in a way so that it's easy to tweak later on- which this doesn't do at all. Maybe you could draw a 2d sketch of what you want then generate it, but you'd still have to do the hard part.
    • ololobus 1 hour ago
      I think this is true under assumption that you know the CAD tool well. From my recent experience (I have a 3D printer), I regularly find myself in a situation where I know what I want to do, I can do measurements and I can make a sketch on a paper. Yet, making it a proper 3D model in something like FreeCAD is super tedious. I know OpenSCAD relatively well, but when it comes to something more complex I struggle a lot. The recent example, I was making a water tap for Lego duplo kitchen sink for my little one :)

      So I would really appreciate a good AI/LLM tool that I can feed my sketch and parameters and it can save me hours of searching web and watching tutorials on how to extrude a circle over a curve

      BTW, any existing AI tools work really well with OpenSCAD, so if you want a parametrized model that can be made out of simple shapes, I highly recommend this flow

      • johnvanommen 59 minutes ago
        > So I would really appreciate a good AI/LLM tool that I can feed my sketch and parameters and it can save me hours of searching web and watching tutorials on how to extrude a circle over a curve

        I think this is possible, but the ‘trick’ would be translating your instructions in English into some kind of language that the CAD software understands.

        I’m on a bunch of 3D printing forums, and everyone tries to describe what the finished product would LOOK like. They end up making PICTURES when what they really want is a STL file.

        Two dimensions are easier to visualize then three, so let’s put it this way:

        If you wanted to turn “English” into “a 2D image that’s dimensionally accurate”, you’d want to translate from “English” to “SVG.”

        SVG is dimensionally accurate. JPG isn’t. The file format itself has no concept of “dimensions” only “pixels.”

    • smartmic 4 hours ago
      As is often the case in the GenAI space, this also appears to be a solution to a non-existent problem.
      • willis936 1 hour ago
        I very much have this problem. I am uninterested in the art of sketching and constraining. I have spent many hours attempting and am content with the knowledge that I don't have the touch but still sometimes have problems I want to solve with 3D prints. LLMs could offer a solution, but they are bullshit machines and by their nature over promise. Drafting is not a trivial skill that we just wave a wand and magically have it automated. We'll get there eventually, but we're not there.
    • KaiserPro 1 hour ago
      Good question!

      So why $work-1 spent so much time on this was quite logical. When you have point clouds generated from crappy head mounted cameras, you get models that are very complex.

      for example, if you look at a point cloud of an Ikea LACK (https://www.ikea.com/gb/en/p/lack-nest-of-tables-set-of-2-wh...) It will be massively complex. this means that when you want to perform nay kind of interaction with it, its computationally difficult (https://www.researchgate.net/publication/221064696/figure/fi...)

      So an active area of research is point cloud to "CAD" model (ie simplyfied, where a LACK tabl would be ~40 triangles rather than 400k)

      One of those ways is to say "oh this pointcloud looks like a table, lets generate a bunch of hypothesis tables and see if they fit." One way to do that is to have a model that understands parametric CAD, and can create a number of tables with parameters that can be adjusted until it fits.

      A perhaps easier way is to take a point cloud, get an image model trained on CAD models to draw models, in 2d imagery, then use something like this to get an actual model out.

      Its not efficient, but it might work.

      There are also lots of other cases, like automatic plagiarism, which are less good.

      • johnvanommen 52 minutes ago
        If you wanted to brute force it, it might be possible to have it generate a hundred outputs and then include a second pass to automatically select the generated model that most accurately resembles the expected output.

        Basically leverage the randomness to create many variations, then select the most accurate variation automatically.

        Terribly wasteful of time and processing power, but so is using GPU time to make pretty pictures randomly.

    • stck 4 hours ago
      If you can just take a pencil and draw a piece of furniture, press a button and get a semi-decent CAD drawing to tweak, that'd be a huge tool for carpenters and such.
      • Arch-TK 2 hours ago
        "to tweak" is probably quite far away even if "get a semi-decent CAD drawing" was remotely reliable which it isn't.
    • whazor 3 hours ago
      Strangely, it would work better if it generates CAD as code with clear labels. Then you can grab your caliper and make sure its all the right size.
    • CodeCompost 5 hours ago
      Missing IKEA screws.
      • timvdalen 3 hours ago
        IKEA will send you those for free if you order them on the site, including free shipping
    • nextlevelwizard 6 hours ago
      If down the line this model could create 3D model from 2D images that would be very neat way to pay less for war gaming models
      • satvikpendem 4 hours ago
        Gaussian splats and neural radiance fields already exist.
        • nextlevelwizard 1 hour ago
          I dont know how that solves this. How do you get STLs out of gausian splats?
          • whywhywhywhy 1 hour ago
            Not splats as such but text to polygon model and image to polygon model exist and for the use case of figurines that's fine to convert to formats for 3D printers.
      • semi-extrinsic 5 hours ago
        You can already do this with apps like Kira. I believe it is especially good on the iPhone variants with LiDAR.
        • nextlevelwizard 1 hour ago
          I dont know that app specifically, but from all videos of different lidar and other 3d scanning tools I have seen the results are pretty bad and require a lot of sculpting after the scan. Whole point was that with few images the ML model could construct the actual 3d model for you
      • protocolture 5 hours ago
        Already done. Cults generally has stls of 40k models before release. Its just a matter of finding them.
        • nextlevelwizard 1 hour ago
          doesnt really help if I cant find them and I guess if I could find them so could GW and they would be taken down. Having an application you can host at home that could do the job from pictures would be awesome
    • cadmeup 5 hours ago
      [dead]
  • cjtrowbridge 10 hours ago
    This has been easy with OpenSCAD for a long time. I have made lots of cool, complex models this way. I built a repo of the prompts I use to show the llm how to do this and it includes many of the models I've created this way...

    https://github.com/cjtrowbridge/vibe-modeling

    • oasisaimlessly 10 hours ago
      OpenSCAD has almost zero crossover with B-rep modelling ('true' CAD, what this apparently is), though.
      • Karliss 26 minutes ago
        This isn't B-rep based modelling. Far from it. It builds up the feature tree and then uses geometry kernel to generate B-rep based representation. The final generator output script could probably be adjusted to generate openscad. It only supports 2d drawings containing lines, arcs and circles and extrude operation for making them 3d. Operations like fillets and chamfers which depend on intermediate B-rep model state are not supported.

        I would even argue that for basic modelling majority of tools/features in CAD operate at the abstraction closer to CSG for describing what and B-rep is only treated as how. Just like good chunk of code based CAD use combination of CSG for what and triangle mesh based geometry engine for how. That's assuming you consider standard 2d->3d operations (extrude, revolve, sweep along arbitrary 2d profile) as valid primitives for CSG.

        User comes into direct contact of B-rep in very specific situations: 1 doing operations like fillets/chamfers/draft/thickness based on intermediate geometry, 2 attaching sketches or other features to generated geometry or using generated edges (instead of new sketches) for guiding operations like complex sweeps, 3 surface based modelling workflows where you build up the the solid from individual faces typically including complex curved surfaces.

        In case of 1 and 2 the the dependency on b-rep based representation is only marginal, in theory you could select edges in triangle mesh based underlying representation but the final result but quality of result wouldn't be as nice and TNP issues for parametric model editing would likely be even bigger than it is for existing CAD. That's not really CSG territory anymore but isn't exclusive to B-rep either, and involves a bunch of work that's outside the scope of B-rep. In non parametric mesh modellers with more destructive editing workflows like blender chamfers and fillets work fine. And if anything for reliable parametric models you often want to limit dependencies on intermediate geometry as that depends on CAD keeping track of where each edge/face originated from outside the b-rep and increases the chance of TNP issues.

        3 is critical for industrial design containing large amount of complex curved surfaces like cars and other consumer products, but there are also many more technical parts where it can be completely ignored. Cad tutorials for beginner tutorials almost completely ignore this category of cad modelling. The part about not being exclusive to b-rep also applies for surface modelling part.

      • iamgopal 8 hours ago
        how hard it is ? with AI prevalent, how long ? any pointers to start from ?
        • bschwindHN 8 hours ago
          If you want something based on B-Rep, look at projects that use opencascade under the hood, as that is one of the only B-Rep CAD kernels available which is free and open source. Some examples would be CADQuery, CascadeStudio, or RepliCAD.
      • twelvechairs 7 hours ago
        OpenSCAD uses CSG which is generally better. Easy to convert CSG to BREP. Cant generally do the opposite
        • auxiliarymoose 7 hours ago
          It's easy to convert because CSG is a small subset of what BREP can do.

          It's analogous to "all squares are rectangles, but not all rectangles are squares" (squares=CSG, rectangles=BREP)

          CSG by itself isn't suitable for most CAD use-cases.

        • rowanG077 7 hours ago
          How can I convert openSCAD models to true STEP files? As in no meshes. I Literally have wanted that for years.
          • tinmith 4 hours ago
            You need to use https://github.com/smurfix/buildscad which can convert OpenSCAD to Build123d, then you can export a STEP file. It has a few limitations, but for simple OpenSCAD files it can generate an equivalent representation in OpenCASCADE.
            • rowanG077 4 hours ago
              Yeah, that fails for even moderately complex models...
    • jvanderbot 10 hours ago
      Same. Working with an LLM and OpenSCAD has been totally painless.
      • richk449 10 hours ago
        I’ve been using cadquery and build123 with Claude code and I find it incredibly painful.

        What is your workflow for llm integration to openscad?

        • andoando 5 hours ago
          Tell it to use the existing libraries. https://openscad.org/libraries.html, in particular BOSL2

          I've one shotted a light saber hilt with threaded parts and it worked flawlessly.

        • jacobn 5 hours ago
          I just ask it for what I’m looking for (doing very simple “spare part” level at home 3d printing, nothing fancy or elaborate) and it gives me a starting point. Then I sometimes just edit the scad code by hand, and some times I ask the AI to revise, sometimes a mix (many iterations).

          For very simple geometries it works great, but it very quickly becomes apparent that there’s a bit of a disconnect between “LLM views image” and “LLM emits scad that looks like that image” when it comes to anything non-trivial.

          Still gives me a starting point I can mess with, which is great since I have zero CAD training or experience.

          (I’m not the commenter you replied to)

          • IshKebab 4 hours ago
            Tbh that sounds harder than just learning CAD, which is really not that difficult if you use a proper parametric editor - I would recommend SOLIDWORKS first. It's got the easiest UX so is ideal for learning. They actually have a vaguely reasonably priced subscription now, but IMO it's still way too much for occasional hobby use so I'd recommend just pirating it (which is easy).

            Once you have learnt a bit then the only FOSS options that are worth a damn are a) SolveSpace which is quite good and light, has a slightly quirky UI (but not in a bad way) but unfortunately has some critical missing features at the moment - notably bevels/chamfers. Although I did see someone made a sloppy PR to add them so we'll see where that goes.

            Or b) FreeCAD which is actually good now and fairly close to SOLIDWORKS (at least for the basic stuff you're likely to use) and has a reasonably good UX. Some rough edges still but overall it's very usable. Good enough that I reach for it instead of pirating SOLIDWORKS these days.

            The basic workflow is pretty simple:

            1. Make some planes, referenced from existing geometry. 2. Make sketches on the planes. 3. Extrude/revolve them (either adding or subtracting from the existing geometry). 4. Repeat until you have the right shape. 5. Add a load of chamfers to make it pretty.

            • q3k 4 hours ago
              From my experience people who heavily rely on LLMs are allergic to learning anything new (with the exception of learning new and improved ways to generate slop). They just 'want to get stuff done', even if it means staying in a local maximum forever.
        • pdntspa 6 hours ago
          Not OP but I just ask Claude Code to make me an openscad file. If I need changes I ask for them in plain english. If you are specific, it's not the quickest loop but it works. I usually ask it to parameterize the model enough so that I can quickly print small prototypes in my 3d printer. Once I am happy with the mini version I print the full-size model.
    • alexgoodhart 9 hours ago
      What is the inference overhead on this
    • q3k 4 hours ago
      I'm sorry, but which ones of these are complex? I'm looking through some [1] [2] [3] of the output PNGs and they look trivial. Like, my first 3d model in Blender trivial.

      In comparison, here's one of my recent designs: what I would still call a very simple case [4]. And it's not like I'm a trained mechanical engineer working commercially, this is stuff I design in my spare time as a programmer.

      [1] - https://github.com/cjtrowbridge/vibe-modeling/blob/main/outp...

      [2] - https://github.com/cjtrowbridge/vibe-modeling/blob/main/outp...

      [3] - https://github.com/cjtrowbridge/vibe-modeling/blob/main/outp...

      [4] - https://object.ceph-eu.hswaw.net/q3k-personal/fe3e54e6df604a...

  • achllle 9 hours ago
    I wanted to see how well it performed on real pictures of parts or hand-drawn drawings, but when I tried setting up the docker image, immediately ran into all kinds of dependencies not being installed. The examples make me suspect it doesn't work well beyond images that were generated from CAD in the first place.
    • xiaoyu2006 7 hours ago
      > docker image, immediately ran into all kinds of dependencies not being installed

      Ironically the former is engineered to avoid the latter.

      • pocksuppet 1 hour ago
        A Docker image is a reinvention of a program, and a Docker container is a reinvention of a process. At first they were self-contained - but so were the first programs and processes.
      • sjjsjsvdd 5 hours ago
        [dead]
    • atoav 8 hours ago
      If only there was some kind of container that allowed you to bundle all your dependencies together with your software.
      • dnnddidiej 6 hours ago
        That thing is called Nix
        • coldtea 3 hours ago
          Parent said "bundle"
          • dnnddidiej 2 hours ago
            Nix to give you reproducable builds. Docker to bundle.

            Docker files alone is usually full of aptgets and curlshs. Which might be why the docker image wont build.

  • geuis 9 hours ago
    To the author if they happen to see this. Please kill the auto playing video. If someone is listening to something else on their phone this always takes over and interrupts.
    • whatsupdog 7 hours ago
      TIL: people are still browsing the internet without an ad blocker.
      • cassianoleal 5 hours ago
        Doesn’t even have to go that far. TIL people are still browsing the internet without disabling auto-play on their browsers.
        • culi 5 hours ago
          Should be disabled by default tbh.
  • ponyous 1 hour ago
    I've seen this and other attempts like this[0] while exploring improvements for my CAD AI[1]. And I think these are potentially powerful solutions, but none of the current projects/weights have enough training (data or time) to make it work on arbitrary models. MeshCoder pretty much works only on models based of their training data. I haven't tried GenCAD but other commenters have confirmed my suspicion.

    [0]: https://daibingquan.github.io/MeshCoder/

    [1]: https://grandpacad.com

  • ecto 9 hours ago
    Readers may also enjoy my open source Rust BRep CAD kernel https://github.com/ecto/vcad or the hosted version at https://vcad.io.

    I also wrote a bit about what goes into CAD apps! https://campedersen.com/tessellation

    • vincent-uden 3 hours ago
      Seeing as I'm attempting to build my own CAD program in Rust I checked out the hosted website. I'm not really sure what is supposed to be working and what isn't.

      I can't help but to be skeptical of one person writing ~115k LOC in 4 months which is just the Rust crates, nevermind the frontend (which is another 100k LOC!!!).

      I'm curious why you decided to go with "eager" tessellation. Creating a circle immediately results in a bunch of lines which resemble a circle but would fail under tangency constraints quickly. Is this a current limitation or part of the strategy for the kernel?

      • clmul 2 hours ago
        As someone also working on CAD in their spare time, also tried the hosted app. I get the feeling that this is made by someone who has never opened a (professional) CAD app at all. It feels like a mix between a tool like blender and CSG-style CAD, but even all of that doesn't seem to work. Maybe this is the proof that vibe coding does not work, at least not for this kind of application.

        In my own project I use LLMs very sparingly and hesitantly, but made the observation that they are not very useful on the hard parts of CAD. I expect this is because of a lack of training material. Most professional CAD applications are proprietary and books on the topic are usually sparse on implementation details. The non-BRep CAD applications such as OpenSCAD and family are probably overrepresented in the training data.

        This might also explain why people's experiences with LLMs are very varied. If you stay in the happy path of CRUD web development and stuff all is nice and well, but if you start to veer off this path you get more and more challenged.

    • ecto 9 hours ago
      (forgot to mention, it's wired up to Claude so you can vibe CAD, like OP but with a few more steps - I'd like to train a similar model soon! I also wrote about my first stab at this https://campedersen.com/cad0)
  • ricardobayes 1 hour ago
    Anyone finding this interesting will likely also like OpenSCAD - generate 3D CAD models from code. https://openscad.org/
  • dajt 2 hours ago
    I'm stumped by things like this. The drawing & modelling are not the difficult bit - the CAM programming is.

    That seems difficult enough that I have not found an open source program to load a 3D model and allow me to set the toolpaths in a UI, never mind have an LLM generate them from the model.

  • clippy99 8 hours ago
    Maybe I missed something, if you have the image rendering in the first place, you already (likely) have the CAD. It is a nice demo, but what is the utility?
    • soupspaces 6 hours ago
      generate from sketch or replicate a part you don't have
  • ugh123 10 hours ago
    The examples they show are so basic.
  • mamami 11 hours ago
    Ideally it would tie in with an llm, no? Like you would want to be able to say something like "create a design of car suspension subject to x,y,z contrains"
    • cush 11 hours ago
      The input is images, and the output is CAD models, so it appears you could use a multi-modal LLM to natural language -> image -> CAD
  • knollimar 12 hours ago
    It says "can convert cad latents into a sequence of parametric CAD commands"

    Which CAD program? I'm confused

    Am I reading this right?

    >Most importantly, GenCAD does not merely generate a 3D solid but also the entire CAD program.

    • dbcurtis 11 hours ago
      > Which CAD program? I'm confused

      Clue here: > Our proposed GenCAD architecture...

      So, at this point, it seems like this will work with all CAD programs, since they have yet to encounter any systems that they can't work with. More seriously, my guess would be whatever one is available for free in their lab. Kind of standard operating procedure for academic projects -- do a proof of concept, make a video that avoids known bugs, get a grade, push source to git, graduate. Good ideas come out of that... production code... eh... maybe.

      More likely someone ends up in the situation that my kid did, previous graduate student's git repo is stale by 2 versions of C++, and 4 versions of ROS, and neither of the two unit tests still work after porting.

    • hug 11 hours ago
      It's DeepCAD* output, it looks like, which is a JSON payload that is the sketch / extrude / whatever steps, which is itself based on Onshape output.

      Looks like you can go JSON -> step files, but not really in such a way that you can modify any of the operations.

      * https://github.com/mightyhorst/DeepCAD

    • lagrange77 12 hours ago
      > Which CAD program?

      Doesn't matter. CAD models/objects are represented by a sequence of operations on a primitive or sketch. Unlike meshes, that describe the manifested resulting shape of objects in 3D programs like Blender.

      So it's about the fact, that their model outputs that hierarchy of operations. The history of development, not just the result.

      • SchemaLoad 11 hours ago
        How does it not matter? Every CAD program is not going to have exactly the same interface and commands. I doubt for example this will for example generate and OpenSCAD text file.
        • plumeria 11 hours ago
          It could be used as pseudo-code for LLMs to produce specific CAD commands?
          • martinpw 8 hours ago
            It will still be application dependent.

            Code to compute fillets and blends gets incredibly complex when multiple surfaces are involved. And when surfaces are barely intersecting, or almost coincident, all bets are off what the command will do - very much depends on the geometry kernel and the tolerances it uses whether it decides the surfaces even intersect. And if it decides they don't intersect, all downstream commands will fail. Handling tolerances is one of the hardest aspects of CAD. (It's no coincidence that most open source CAD applications always demo with the same relatively basic types of models - they just can't do truly complex CAD.)

            So a simple set of operations - cube, sphere, intersect - sure that will work anywhere and will be portable across applications and makes a nice simple demo. But once you start doing any serious CAD modeling the result is kernel dependent. That's why portable CAD formats like STEP do not preserve the commands used to generate the results. And why native CAD application formats do preserve the command history but are not portable across applications.

          • SchemaLoad 11 hours ago
            It could be anything which is why the question was asked what it actually outputs. I had a skim through the page and code but couldn't see what the output was.
      • itishappy 10 hours ago
        Nothing stops you from storing a history of mesh operations. This is exactly what modifiers (including geometry nodes) do in Blender today.
  • physicsguy 3 hours ago
    This is over a year old now, why post now? There have been other advancements in this area.
  • isaisabella 8 hours ago
    The demo seems pretty cool, but also pretty simple. When it comes to complicate models, I afriad it would be hard to generate the accurate 3D model.
  • simpleintheory 11 hours ago
    Is this Google-affiliated? The heading font is Product/Google Sans which IIRC only Alphabet is allowed to use and the entire webpage seems to be Google-style but neither of the two named researchers seem to be employed by Google?
  • ironhaven 11 hours ago
    A another take on this problem is zoo.dev . They wrote a brand new from scratch cad engine that is driven a custom openscad style language called kcl.

    Then then have a trained llm that has can generate kcl to either create new parts or act as a llm assistant for changes to existing parts.

    It’s neat that llms can do 3-D but I wonder how much of the problem is integration.

  • zkmon 5 hours ago
    How are the input images generated?
  • andrew_kwak 7 hours ago
    Checked out GenCAD. It seems pretty useful for simple circuit designs. Wondering if it supports import/export with other CAD formats?
  • Riany 8 hours ago
    the idea is good, but the examples still feel like a distance to handle real constraints and dimensions
  • nik282000 8 hours ago
    Website renders so poorly on my phone that I cant read half the text. Fits the bill for a slop project.
  • Lapsa 4 hours ago
    "In 1975, Dr. Joseph Sharp proved that correct modulation of microwave energy can result in wireless and receiverless transmission of audible speech."
  • abstract257 5 hours ago
    [dead]