Live data from Hacker News

OpenSCAD: The Programmer's Solid 3D CAD Modeller

openscad.org

31–40 of 191 posts

Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller

#31
post #29

If you want to do code-CAD for anything substantial and you haven't yet developed a significant dependency on OpenSCAD, do your brain a favour and spend at least some time with CadQuery, Build123D or (if you prefer JS to Python) Replicad. As impressive as NopSCADlib and BOSL2 are (and OMG they are, when you consider what they have to work with!) , OpenSCAD is a one-way, declarative CSG environment that essentially on…

I poked around with CadQuery and Build123D. The learning curve required a paradigm shifted in abstraction. That was too much. I just want OpenSCAD simplicity, but with modern programming language syntax. I ended up settling with PythonScad. I was able to hit the ground running and leverage what I already know about python within a day. It's new, but the author is extremely active and collaborative on github ( https:/…

> The learning curve required a paradigm shifted in abstraction.

This is true! And I think that brute-force simplicity of OpenSCAD is the appeal. I am still ultimately a CAD greenhorn but it got me started, and I don't blame you.

But I guess the point I am getting to is, that paradigm shift is where you really want to be. It's certainly where I think most competent programmers who want to really build in 3D should want to be.

Because it unlocks the ability to reason about the shapes you're creating, within the code that creates them. You can for example place a feature in the centre of a face of an object you just created, without having to recalculate the location of the centre of the face or the normal etc.

You can write code that is truly parametric with real encapsulations, and without a battery of variable definitions and calculations for every single element -- because you can reflect on what you've already made.

(You can also export STEP files to other packages, import STEP files and reason about/analyse those as objects rather than meshes.)

Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller

#32
post #19

Earlier quoted context omitted.

That is... a weird post to be making from a throwaway account. Do you work for Big OpenSCAD or something? :) But that said, this is all correct. OpenSCAD is actually an extremely limited environment and much more expressive tools exist in the same "code-based 3D modelling" space.

This is a totally reasonable question! I am using a throwaway to limit my HN usage, to be honest. I wish I had a better way to manage my addictive social media behaviour than torching accounts after a few discussions. But I do not. I saw this thread only because it's clearly a followup to the FreeCAD discussion the other day that I have contributed to. -- People do get oddly grumpy when you criticise OpenSCAD; there…

> People do get oddly grumpy when you criticise OpenSCAD

Most of us don't realize how much our comfort with familiar concepts affects our ability to objectively evaluate them. Moving from dev to being a tech artist, I see the same exact sort of irrational biases, hang-ups and endemic misconceptions with completely different tool chains and types of complexity. When I first started using Houdini, I tried to turn every task into a Python coding problem because that's what I was comfortable with— Python is amazing in Houdini but it's definitely not the best way to accomplish most tasks.

Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller

#33
One notable new development is the Python-enabled OpenPythonSCAD:

https://pythonscad.org/

which finally made it possible for me to finally have the ability to write out G-code (allowing one to use OpenSCAD as a CAM tool) and DXFs (allowing one to have fully control and to create not-closed/unconnected geometry, and to write out arcs rather than only polylines):

https://github.com/WillAdams/gcodepreview

For the current state see the latest preview of the current unit test:

https://forum.makerforums.info/uploads/default/original/3X/1...

Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller

#34
post #19

Earlier quoted context omitted.

That is... a weird post to be making from a throwaway account. Do you work for Big OpenSCAD or something? :) But that said, this is all correct. OpenSCAD is actually an extremely limited environment and much more expressive tools exist in the same "code-based 3D modelling" space.

This is a totally reasonable question! I am using a throwaway to limit my HN usage, to be honest. I wish I had a better way to manage my addictive social media behaviour than torching accounts after a few discussions. But I do not. I saw this thread only because it's clearly a followup to the FreeCAD discussion the other day that I have contributed to. -- People do get oddly grumpy when you criticise OpenSCAD; there…

The great thing about OpenSCAD is that it makes creating models which may be described mathematically/programmatically easy.

The awful thing about OpenSCAD is that what one can create in it is strongly bounded by one's facility with and fluency in mathematics.

I'm curious how the new Python-enabled (I really hope it gets added in to the program itself) will affect this.

Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller

#35

Earlier quoted context omitted.

This is a totally reasonable question! I am using a throwaway to limit my HN usage, to be honest. I wish I had a better way to manage my addictive social media behaviour than torching accounts after a few discussions. But I do not. I saw this thread only because it's clearly a followup to the FreeCAD discussion the other day that I have contributed to. -- People do get oddly grumpy when you criticise OpenSCAD; there…

> People do get oddly grumpy when you criticise OpenSCAD Most of us don't realize how much our comfort with familiar concepts affects our ability to objectively evaluate them. Moving from dev to being a tech artist, I see the same exact sort of irrational biases, hang-ups and endemic misconceptions with completely different tool chains and types of complexity. When I first started using Houdini, I tried to turn every…

[deleted]

Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller

#36

Earlier quoted context omitted.

This is a totally reasonable question! I am using a throwaway to limit my HN usage, to be honest. I wish I had a better way to manage my addictive social media behaviour than torching accounts after a few discussions. But I do not. I saw this thread only because it's clearly a followup to the FreeCAD discussion the other day that I have contributed to. -- People do get oddly grumpy when you criticise OpenSCAD; there…

The great thing about OpenSCAD is that it makes creating models which may be described mathematically/programmatically easy. The awful thing about OpenSCAD is that what one can create in it is strongly bounded by one's facility with and fluency in mathematics. I'm curious how the new Python-enabled (I really hope it gets added in to the program itself) will affect this.

You said this so much more succinctly than me.

Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller

#37
post #30

If you find yourself doing a lot of OpenSCAD, you might want to check out what you're missing from more traditional CAD systems: A few examples of simple fillets in SOLIDWORKS: https://www.youtube.com/watch?v=f78gblpqxHc Higher level continuity: https://www.youtube.com/watch?v=h5QN40d02cw A good example of nontrivial surfacing: https://www.youtube.com/watch?v=cujS1icUTtg (the entire channel is a goldmine of surfacing…

Yes, it’s a wonderful tool. This post kind of upset me; it’s comparing totally different classes of program. SolidWorks is subscription based, so your $50 buys access this year and probably you won’t want to use the model again next year, right? OpenSCAD is free software, and that matters. Hopefully readers know it’s decades behind and very rough to use. Your example of “superpower modern CAD” could have been a whole…

Your $50 buys you nothing from Solidworks, expect to pay multiple thousands for that

Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller

#38
For people interested in coding CAD in React, my team built a react fiber layer over jscad and are investing heavily into building an MIT-licensed 3d electronics library: https://github.com/tscircuit/jscad-fiber

I don't think you need a custom language to declare CAD, typescript/python have heavily invested in type systems so I hope the world moves more toward using existing languages.

The biggest limitation with code-CAD today is the lack of a constraint system (e.g. a clean way to say "these edges are 3mm apart") without X/Y coordinates everywhere. We're slowly building higher-level components that allow you to specify constraints so that you can write CAD in a way that more closely mimics the design intent, rather than a bunch of calculations.

OpenSCAD started it all so we're very grateful, but it's also time for some innovation to bring the language closer to design intent

Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller

#39

If you want to do code-CAD for anything substantial and you haven't yet developed a significant dependency on OpenSCAD, do your brain a favour and spend at least some time with CadQuery, Build123D or (if you prefer JS to Python) Replicad. As impressive as NopSCADlib and BOSL2 are (and OMG they are, when you consider what they have to work with!) , OpenSCAD is a one-way, declarative CSG environment that essentially on…

> OpenSCAD is a one-way, declarative CSG environment that essentially only outputs mesh formats

This is why such a basic-seeming thing as “how do i get the bounding box for this CSG frankenobject I’ve created?” comes up again and again on stackoverflow etc. it’s apparently not possible without some hacks.

I’ll take a look at the alternatives you mentioned, thanks.

Re: OpenSCAD: The Programmer's Solid 3D CAD Modeller

#40
post #30

If you find yourself doing a lot of OpenSCAD, you might want to check out what you're missing from more traditional CAD systems: A few examples of simple fillets in SOLIDWORKS: https://www.youtube.com/watch?v=f78gblpqxHc Higher level continuity: https://www.youtube.com/watch?v=h5QN40d02cw A good example of nontrivial surfacing: https://www.youtube.com/watch?v=cujS1icUTtg (the entire channel is a goldmine of surfacing…

Yes, it’s a wonderful tool. This post kind of upset me; it’s comparing totally different classes of program. SolidWorks is subscription based, so your $50 buys access this year and probably you won’t want to use the model again next year, right? OpenSCAD is free software, and that matters. Hopefully readers know it’s decades behind and very rough to use. Your example of “superpower modern CAD” could have been a whole…

First of all, I'm sorry I upset you! That was definitely not intended.

I'm not comparing the two, I want to show what's possible. I often see people finding OpenSCAD, getting comfortable with it because it's all code, and stopping there. But there's so much more to solid body modelling, it's not too complicated to learn, and a bit more advanced CAD really expands the range of physical objects we can create! This is why I chose those slightly more complex examples, I'm not trying to gotcha OpenSCAD, I tried to show why one might want to branch out, despite all the downsides (subscription, non-code source files, Windows*, etc) you mentioned.

Fwiw I dream of a good open source CAD that syncs code and GUI (like KittyCAD) but doesn't fall into the trap of "procedural" modelling like OpenSCAD or KittyCAD. The combination of sketches+constraints+3D operations+projections is perfectly representable as code, it's just much more work than raw CSG, requires a geometric kernel, and is more mind bending. Still, I hope we will get one some day.

*: it does run perfectly well in Parallels though, so between Mac and native Windows I suspect it's more like 80% here

Post reply on HN