6 comments

  • bschwindHN21 hours ago
    Nice! I love code-based CAD. Eventually I want to build a tool which uses a hybrid approach: a GUI for things that are hard&#x2F;tedious to express in code like complicated 2D sketches, with code as the &quot;persistence&quot; layer so at the end you still just have code to maintain, no binary files or piles of XML.<p>One of the hard parts though will be synchronizing changes between UI and code. I suppose it could start as a unidirectional flow from UI to code... if you were to generate a sketch with something like a loop, it would be hard to recover that code structure from just a bunch of resulting points and line segments.<p>But anyway, I&#x27;m happy to see more code-based CAD approaches pop up. I think there&#x27;s still a lot to explore in this space.
    • addaon16 hours ago
      For my airplane design, I&#x27;ve used Rhino3D (which is 3d modeling, not CAD), and used their Python-based plug-in API to create a very custom, limited scope parametric CAD on it... using a mix of geometric and aerodynamic parameters, and using vortex lattice methods to bridge between them. So the wing chord (MAC) can be set in centimeters, but the wing span set to achieve a specific modeled climb rate. It&#x27;s all very ad hoc, but also lovely to develop in. Hit run, in three seconds have a freshly-generated OML, use Rhino&#x27;s UI to make a few changes, confirm I like them, then move those changes to code and re-run. Hit undo&#x2F;redo a few times to compare the hand-drawn and generated versions, then move on to the next feature.
      • jazzyjackson10 hours ago
        Do you find you prefer python to grasshopper? I loved how easy it was to connect data sources to geometry, and feedback is instantaneous. never tried the Python plugin.
        • addaon9 hours ago
          (a) I started this before grasshopper was mature enough to use. (b) I haven&#x27;t looked too much into grasshopper because of that, but my impression was that the version control story was basically non-existent. As pure text, Python is easier to change review and to version. (c) Having a &quot;real&quot; language to bridge to other languages is fundamental for what I&#x27;m doing. For example, the panel code is written in Fortran, and the CFD libraries are written in C++.
      • sfpotter16 hours ago
        Why would you say Rhino 3D &quot;isn&#x27;t CAD&quot;?
        • addaon15 hours ago
          Well, it&#x27;s certainly not parametric CAD -- it&#x27;s a drawing program that happens to be in 3D, with limited (and, I&#x27;m very glad to see, growing) ability to use history for some more structured creation. But the biggest limitation is that it&#x27;s numerics are mediocre, and subtle -- everything is in float space, and it&#x27;s very easy to get into a space where things just don&#x27;t make sense, especially far from the origin. In a CAD tool I&#x27;d expect to be able to enforce constraints to resolve this (&quot;these two points must match&quot;); I&#x27;ve been able to do that somewhat with my plug-in when the precision is there but the error stack-up has been too high, but there&#x27;s also cases where the precision just doesn&#x27;t exist.
          • sfpotter11 hours ago
            You&#x27;re in luck! As of a year ago, I work at McNeel on the math team on Rhino&#x27;s in-house CAD kernel. Luckily, we own the entirety of the kernel, so we are free to improve it. I&#x27;ve been in the field of numerical methods for most of my career in academia and industry, so you are preaching to the converted when you say that Rhino&#x27;s numerics are mediocre. At McNeel, I&#x27;m actively pursuing strategies to improve this situation, although it will be a massive long term project.<p>Hopefully you know that you can reach out to the McNeel developers directly and on the Discourse forums. But I would also love to chat directly if you&#x27;re interested. It sounds like you&#x27;re working on a project that is both sophisticated and interesting, which directly stresses many of the known pain points in the kernel. If you&#x27;re interested, I can shoot an email to the address you&#x27;ve got listed in your profile from my McNeel email.
          • fainpul14 hours ago
            I think this definition is a bit too strict. CAD just means computer aided design. Architects use Rhino to design buildings. You use it to design airplanes. CAD doesn&#x27;t even have to be 3D.
            • Brian_K_White12 hours ago
              You could design entirely in notepad.exe, and that would be computer aided design by your definition.<p>Rather than that definition being too strict, this one is too litteral.<p>It was perfectly reasonable to characterize the tool as not really CAD, even though a 3d drawing&#x2F;modelling&#x2F;rendering&#x2F;visualizing program is on a computer and is part of a design process.
              • fainpul10 hours ago
                I&#x27;m not gonna argue with you. That&#x27;s just silly. Have a read here if you want, but I suppose you&#x27;re just trolling:<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Rhinoceros_3D" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Rhinoceros_3D</a><p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Computer-aided_design" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Computer-aided_design</a>
    • jazzyjackson10 hours ago
      FreeCAD apparently supports OpenSCAD as well as build123d, which looks like a very nice DSL for geometry. Still no 2 way binding tho, unless you count the variable editor in the GUI.
    • amelius14 hours ago
      &gt; Nice! I love code-based CAD.<p>I haven&#x27;t tried it yet, but I would think that coming up with variable names for all the little parts and distances and whatnot must be a nightmare! :)<p>And could someone read the code and understand it?
    • MattRix20 hours ago
      Yeah I like the idea of combining code and a visual editor of some kind. Many of my current openscad projects are just mixing code with SVG files, which is finicky and feels like it could easily be improved.
      • jazzyjackson10 hours ago
        There&#x27;s a VScode extension for that! For viewing renderings from cadquery and build123d. Haven&#x27;t tried it yet, but maybe it&#x27;s the weekend for it.<p><a href="https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=bernhard-42.ocp-cad-viewer" rel="nofollow">https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=bernhard...</a>
    • ur-whale17 hours ago
      &gt; I love code-based CAD.<p>So do I. A lot.<p>But wait until you try to pair it with an Agentic AI, it will simply blow you away.<p>Until, that is, you realize LLM&#x27;s have strictly no sense of how 3D geometry works, but still, it&#x27;s amazing.
      • neomantra14 hours ago
        I too love seeing code-based CAD and the general aspect of using LLM&#x27;s using code as an expression-intermediary: SQL to data, Swift to CAD, SVG to images of pelicans.<p>I have not used Constructive Solid Geometry CAD MCPs myself (but I have used some of the AI model creators). Some of the videos I&#x27;ve seen look very cool.<p>But, I wonder how much longer the claim of &quot;LLM&#x27;s have strictly no sense of how 3D geometry&quot; works will stand.<p>Last week I used Claude extensively to design the upgrade to my homemade pontoon boat. In addition to my textual descriptions, I uploaded pictures of hat channel cross-sections with dimensions and screenshots of my CAD drawings. I was asking questions about strength and stability and relationships between parts and evolved the design. It took some sort of world understanding of boats, relationships of parts, types of physical interconnects, materials properties. There&#x27;s definitely some understanding going on.<p>---<p>Actually, show rather than tell. I just took Cadova for a spin, using screenshots of my boat&#x27;s CAD and the previous conversation. Then I vibe-coded my boat up with Cadova, in an agentic loop with Claude Desktop and VSCode and the Cadova Viewer and screen shots. Pretty wild. Certainly not perfect, and I don&#x27;t think this is how I would actually go about it, but it was interesting!<p>There&#x27;s nothing proprietary, so I&#x27;ll made a quick GitHub project [1] since the Claude links don&#x27;t show files.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;ConAcademy&#x2F;WeaselToonCadova" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ConAcademy&#x2F;WeaselToonCadova</a>
        • neomantra10 hours ago
          I&#x27;ve started fresher and am now in an agentic loop in Claude Code, asking it to render the generated 3mf and look at the results and evolve the Swift code to have a model that matches the reference image. Not sure how it will go but it is doing it.... will eventually update the repo.
      • amelius14 hours ago
        Funny that you say that. Just yesterday I was playing with the thought of using SDFs. I asked ChatGPT how, given a SDF, I could implement erosion followed by dilation (by the same amount), and ChatGPT said that the entire operation is the identity. Here the LLM failed to see that the erosion step could delete parts of the design. Anyway, it was interesting to see an area where LLMs clearly have no idea what they&#x27;re talking about.
        • jazzyjackson10 hours ago
          I&#x27;ve had very poor results trying to reason about geometry with chatgpt (to the point where it hallucinated that a line can intersect a sphere 3 times...) but it would be interesting to have a feedback loop from code to image. I just found out about build123d as a newer variety of cadquery and looking forward to trying an LLM out with it.
  • fainpul20 hours ago
    I&#x27;d like to see the code for this more complex object: <a href="https:&#x2F;&#x2F;github.com&#x2F;tomasf&#x2F;Cadova&#x2F;wiki" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tomasf&#x2F;Cadova&#x2F;wiki</a>
    • tomasf13 hours ago
      This is the base part of my little delta printer. This was an experimental project and not something I planned to publish. The code is unfinished, unorganized and originally written for an older version of Cadova. I’ve patched it to work with the latest release, but otherwise it’s largely unchanged. Posting it as-is for reference: <a href="https:&#x2F;&#x2F;github.com&#x2F;tomasf&#x2F;m3" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tomasf&#x2F;m3</a>
      • fainpul2 hours ago
        Thanks, but that&#x27;s a 404 for me. Maybe a private repo? I would just like to see something more complex than very simple examples — an actual real project.
  • willtemperley20 hours ago
    This project uses some very interesting Swift techniques. Is this the new C++ interop? Looks very clean.
  • snitty14 hours ago
    I find this much more readable than KCL[0], but I also understand the ultimate goals of the two are probably a bit different.<p>[0]: <a href="https:&#x2F;&#x2F;zoo.dev&#x2F;docs&#x2F;kcl-samples&#x2F;pillow-block-bearing" rel="nofollow">https:&#x2F;&#x2F;zoo.dev&#x2F;docs&#x2F;kcl-samples&#x2F;pillow-block-bearing</a>
  • ur-whale17 hours ago
    Regarding the geometry engine, the README says:<p>Cadova uses Manifold-Swift, Apus and ThreeMF.<p>First I hear of those. Curious to see how those compare to things like OpenCascade.
    • samwillis17 hours ago
      Manifold works on solid triangle meshes, OpenCascade is a true BREP kernel that represents solids as edges (straight and curved) and surfaces (not meshed) computed from those edges. There is no triangulation in the root model in OpenCascade.
      • ur-whale17 hours ago
        So ... meaning Cadova has an underlying Mesh model, like OpenSCAD ... I wonder how they pull off proper filetting and curves.
    • le-mark17 hours ago
      Manifold is impressive, lots of info here:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;elalish&#x2F;manifold" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;elalish&#x2F;manifold</a>
  • Mars00812 hours ago
    Looks similar to OpenSCAD:<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;OpenSCAD" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;OpenSCAD</a>
    • macshome11 hours ago
      Indeed. The home page of the wiki says as much.<p>“Cadova builds on the ideas of OpenSCAD, but replaces its limited language with the power and elegance of Swift. It’s inspired by SwiftUI and designed for developers who want a better way to build models through code. It&#x27;s cross-platform and works on macOS, Linux and Windows.”
      • Mars0087 hours ago
        I&#x27;m pretty sure FreeCAD can be used the same way, ignoring its UI. Just with Python as a core language.