10 comments

  • fhn2 days ago
    Does this have a web-based playground? I find <a href="https:&#x2F;&#x2F;www.pythonscad.org&#x2F;playground&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.pythonscad.org&#x2F;playground&#x2F;</a> to be nice to try out the project.
    • adius2 days ago
      Agreed! I’m already working on it, but it’s not quite ready yet. ETA is 1-2 weeks.
    • adius1 day ago
      I was actually able to get a first version released just now: <a href="https:&#x2F;&#x2F;luacad.ad-si.com&#x2F;playground" rel="nofollow">https:&#x2F;&#x2F;luacad.ad-si.com&#x2F;playground</a> It&#x27;s still rather bare bones and won&#x27;t work well for large models, but otherwise it should be fully functional!
  • tolugenius2 days ago
    Really interesting! I actually use freecad so I&#x27;m use to that layer of the process but I&#x27;ll check this out. Also good to see the work being done in modeling software these days
  • psd12 days ago
    A scripting engine is a great feature in cad, you should be proud of your achievement. The reason I&#x27;m not personally interested is that i used lisp in AutoCAD in the 00s. What i like most about lua is that it&#x27;s not php. It&#x27;s a sane choice, but insipid.<p><a href="https:&#x2F;&#x2F;www.cadtutor.net&#x2F;tutorials&#x2F;autolisp&#x2F;quick-start.php" rel="nofollow">https:&#x2F;&#x2F;www.cadtutor.net&#x2F;tutorials&#x2F;autolisp&#x2F;quick-start.php</a>
  • vrinsd1 day ago
    Honest question here -- for doing 3D parametric design, is the &quot;programmatic&quot; approach a good thing? If you compare doing a design in LuaCAD to something like Solidworks or ProE, can you get to the end result faster, and easier?
    • adius1 day ago
      I&#x27;ve tried to get into Solidworks, Fusion, and FreeCAD several times, but every time I come back to programmatic CAD. It just better matches how I think about 3D design I guess. Also, I love that there can&#x27;t be any hidden state or constraints -everything is fully defined by your code and fully visible.<p>Just give it a try, I guess, and see if it works for your use cases!
  • manny_rat2 days ago
    Love it! OpenSCAD has very painful syntax. Is it possible to easily do bevels&#x2F;chamfers or does it have the same limitations as OpenSCAD there?
    • adius2 days ago
      Thanks! It natively supports all BOSL2 functions which include a chamfer argument (<a href="https:&#x2F;&#x2F;github.com&#x2F;revarbat&#x2F;BOSL&#x2F;wiki#common-arguments" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;revarbat&#x2F;BOSL&#x2F;wiki#common-arguments</a>). So that makes it quite straightforward to add chamfers to everything!
      • kragen2 days ago
        Can you fillet unions? Like, if I union a cube with a smaller cube sticking out of its side, can I make a fillet so that the edge where the two cubes&#x27; faces intersect doesn&#x27;t become a stress concentration point for cracks to start at? This is OpenSCAD&#x27;s primary weakness from my point of view.
      • addaon2 days ago
        Which is what separates us from the animals.
      • adastra222 days ago
        Quite easy to add chamfers to everything in the CAD file. But your manufacturing guy is going to strangle you...
        • gunalx2 days ago
          So ill strangle myself while the 3d printer goes back and forth.
  • WillAdams2 days ago
    Is it able to access the file system and write&#x2F;read files?<p>I&#x27;ve been doing that via PythonSCAD for my current project <a href="https:&#x2F;&#x2F;github.com&#x2F;WillAdams&#x2F;gcodepreview" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;WillAdams&#x2F;gcodepreview</a> and it might be interesting to do a re-write in another language.
    • adius2 days ago
      Yes, it executes in a full fledged Lua environment. So you can do all the things you expect do be able to do with Lua!<p>I’d pick Lua over Python any day, but maybe that’s just me. ;-)
      • WillAdams2 days ago
        I&#x27;ve had good success w&#x2F; using Lua in LuaLaTeX, so hopefully a good fit for me to exercise my programming chops. I think it will be interesting to maintain two parallel versions for comparison&#x2F;contrast. Thanks!
  • adastra222 days ago
    Isn&#x27;t OpenSCAD&#x27;s limited (non-Turing complete) language a feature?
    • adius2 days ago
      I&#x27;m pretty sure it&#x27;s Turing complete by now. If it was conceptualized as a limited language and only became a full fledged programming language over time, it would certainly explain all its weird warts. (Here is some more details: <a href="https:&#x2F;&#x2F;github.com&#x2F;ad-si&#x2F;LuaCAD#why-lua" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ad-si&#x2F;LuaCAD#why-lua</a>) I guess 3D modeling is just too complex for a simple, but limited DSL.<p>Lua is easier to use, faster, and more feature-rich. It&#x27;s one of those rare occasions when a new solution is actually better in every single way.
      • adastra222 days ago
        In the pedantic sense, yes. You can use recursive functions with tail-call optimization, or list comprehensions to emulate a universal Turing machine.<p>But my point is that OpenSCAD&#x27;s expression purity and one-way compilation model are purposefully limited, and not historical accident: models are a deterministic function of their parameters, subtrees can be cached and reused during preview without invalidation logic, designs diff and merge as text, etc.<p>Sometimes making things &quot;more programmable&quot; is an anti-feature.
        • cjbgkagh2 days ago
          AFAIK OpenSCAD does not do any meaningful optimizations that are enabled by having a limited DSL, despite that normally being a good reason to do a DSL. And ironically you often have use a general purpose language (python and C++) to do custom optimizations not possible in the DSL.
          • adastra221 day ago
            OpenSCAD is garbage and I&#x27;m not going to defend it. But I would prefer if a new CAD engine didn&#x27;t regress.
    • WillAdams2 days ago
      Yes, it is.<p>The most notable aspect of this (and one which I&#x27;ve complained in the past) is the inability to write out file, which has security implications.
  • lkjdsklf2 days ago
    The change history on this repository is fascinating
  • gohash3 hours ago
    Lua is the only language that&#x27;s born to be embedded — tiny, fast to start, trivial to bind.
  • kiops2 days ago
    [flagged]