Live data from Hacker News

OpenSCAD: The Programmer's Solid 3D CAD Modeller

openscad.org

181–190 of 191 posts

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

#181

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…

CADquery was a neat intro to using code for CAD, but it ended up being kind of a pain when it came down to designing stuff that I'd want to be able to come back to and understand months later (ie being able to tell what exactly each number is referring to), or stuff that might need curves and constraints. I also got into it in part because of the idea of using typical version control to tracks changes and of being ab…

Yes -- despite my comment, I am in the same boat. Code-CAD is actually a backup/toolbox item alongside FreeCAD, for me.

(The programmer in me would love to be able to leave comments in more places on FreeCAD designs. I have spent a lot of time trying to learn how to make the simplest, most self-documenting parametric flow.)

But the reason I framed my comment above in terms of spending at least some time with CadQuery or Build123D etc. over OpenSCAD, is that CadQuery taught me additional CAD concepts that helped me make progress.

I had tried to use FreeCAD before, about 18 months before I finally got my 3D printer, but I was absolutely bamboozled. So when I finally started with my 3D printer, I started with OpenSCAD. I got small stuff done and held it in my hands, but I immediately felt its limitations (partly because I struggle with co-ordinate spaces and maths). Was I really going to be stuck doing all the maths, over and over again, or using libraries of specific functions like BOSL? My maths skills are weaker than I'd like, and it felt like a dead-end.

I stumbled on CadQuery, spent some time working on some key things in it, really immersed myself in the documentation, and this helped me grasp the bRep fundamental ideas of faces, vertexes and edges, normals, orientations, planes, etc. All the higher-order concepts in modern CAD above CSG.

I then had two things I knew could work for me -- CadQuery or in a pinch OpenSCAD. And because as you know there are/were workbenches for both, the knowledge gave me the confidence to spend time with FreeCAD.

Without stumbling on CadQuery I would have been stuck with OpenSCAD and it may have driven me away from trying to make my own things.

There are elements of my designs I will be (re-)building in Build123D to get some code-CAD advantages (scripted customisation). But it's the time with CadQuery that helped me make the transition to CAD thinking.

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

#182
post #175

Earlier quoted context omitted.

By "faces" I don't mean triangles. I mean the true geometry of the object. Say for example a single six-sided die: six faces, twelve edges. But this would be twelve mesh triangles, right? None of which individually represent a face -- and six of the mesh edges are not edges in the true geometry. A rounded six-sided die might have 26 faces (including the curved edges, rounded corners). 48 edges between them. etc. But…

What if I tend to import STLs from thing verse and modify them? IIRC STLs are triangular meshes. Would bRep programs like build123d able to "convert" them to "true geometric objects"? I would presume the answer is no.

bRep apps can handle and work with meshes (though it's probably not the most efficient way to work with them) but no, generally speaking extracting the real geometry requires redrawing them. You can get a long way by decimating meshes and using various tools but you're going to end up breaking the result down and partly redrawing.

Plasticity (the sorta-CAD-sorta-modeller app) has seemingly just added some logic to the recent version to help with extracting the true geometry from meshes. I want to like Plasticity but it's not enough CAD for me right now.

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

#183
post #175

Earlier quoted context omitted.

What if I tend to import STLs from thing verse and modify them? IIRC STLs are triangular meshes. Would bRep programs like build123d able to "convert" them to "true geometric objects"? I would presume the answer is no.

Conversely, what if I want to import STEP files and modify them? You can make an almost perfect analogy with raster and vector image formats. They both have their niches; however: it's trivial to rasterize a vector drawing, but it's a ton of work to vectorize an raster image well. So, all things being equal, it makes sense to start your designs at the 'high ground'.

> Conversely, what if I want to import STEP files and modify them?

Right. OpenSCAD can import and mesh STEP files. But the process throws away the true geometry.

I agree that the raster/vector analogy is strong!

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

#184

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 don’t understand the intricacies and much of what you said. I am sure those are legitimate concerns for a professional.

But as a hobbyist, this is the tool I have turned to time and again for making simple parts or objects. I found this to be more intuitive and easier to onboard vs. learning different visual designing tools each with its own quirks.

So it definitely has a place in my toolbox as is.

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

#185

Earlier quoted context omitted.

> 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 wa…

I find it quite surprising that you're a self-proclaimed greenhorn, but very opinionated about what apps people should be using.

It dismays me to see you still downvoted for asking me the question I should be asked so have an upvote!

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

#186
We used openSCAD in college for our 3D printing class. I think it was a good introduction to modeling in a 3d space since you really have to know what you're doing and the math you want to do, especially for CS majors. But, making anything complex in it is a GIANT pain.

Once we got past the few introductory assignments we were allowed to chose what we wanted and at that point no one in the class was still using it.

Its great for simple things but you'll find it tedious for anything complex, unless of course you like the challenge

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

#187

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 don’t understand the intricacies and much of what you said. I am sure those are legitimate concerns for a professional. But as a hobbyist, this is the tool I have turned to time and again for making simple parts or objects. I found this to be more intuitive and easier to onboard vs. learning different visual designing tools each with its own quirks. So it definitely has a place in my toolbox as is.

Oh, I'm a hobbyist. (Well, at the moment. Some things I am making might soon get to the Tindie/Etsy/online sales level.)

And you're right it has a place. I'm not totally advocating switching if it works for you. But for newer users who want to really use code-CAD, out there are tools that are not held back by OpenSCAD's limitations (and which scale less painfully with complexity), and learning about them might help see simpler solutions or even bridge the gap to GUI CAD.

The most significant limitation I can see for a hobbyist maker is reaching the point where you can't make something yourself (or can't make it cost-effectively) and need to get it fabricated elsewhere. That is when you may very well find you would benefit from something OpenSCAD cannot (ever, I think) do: true, efficient STEP export.

As my 3D printed designs get more complex I am pushing closer and closer to the point where I will need a part cut conventionally out of steel or aluminium, or -- most likely sooner -- where I will need custom fasteners. One of the advantages of a workflow that will produce STEP is being able to work with someone who has those specialisations (and/or import work into the software tools they use). So at the earliest point I could, I made sure I was in that world. As a side bonus, it means being able to potentially use home CNC, or even just extract vector faces from generated models for use with a laser cutter or a Silhouette-type machine.

Out of completeness I should note that in that situation you're not totally out of options, as FreeCAD can interpret OpenSCAD in a bRep context with the exception of a few operations like minkowski() that get left as meshes. But it's a real limitation.

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

#188

As cool as OpenSCAD is, it's just one way of writing code to work with CAD. The commercial CAD systems all have APIs to do the same kind of stuff, but they also have sophisticated UIs on top to make them easier to use visually. NX even lets the user record UI interactions as a function to make creating initial code faster. In fact, there's a whole niche of CAD programming.

> recording ui interactions, etc This is a sign that the software has grown to become its own operating system. They also have to add their own version control… remote editing, etc. Unix style versions of tools are interesting in their own right (photoshop vs imagemagick).

> This is a sign that the software has grown to become its own operating system. They also have to add their own version control… remote editing, etc.

Not really, though most of the commercial CAD systems are comparable in size to an operating system already. NX just spits out the journal file, it's assumed the dev will take the code and modify it to their needs using their normal dev workflow and their own version control, IDE, etc..

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

#189

Earlier quoted context omitted.

CADquery was a neat intro to using code for CAD, but it ended up being kind of a pain when it came down to designing stuff that I'd want to be able to come back to and understand months later (ie being able to tell what exactly each number is referring to), or stuff that might need curves and constraints. I also got into it in part because of the idea of using typical version control to tracks changes and of being ab…

Yes -- despite my comment, I am in the same boat. Code-CAD is actually a backup/toolbox item alongside FreeCAD, for me. (The programmer in me would love to be able to leave comments in more places on FreeCAD designs. I have spent a lot of time trying to learn how to make the simplest, most self-documenting parametric flow.) But the reason I framed my comment above in terms of spending at least some time with CadQuery…

Nice to get your detailed thoughts and experiences!

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

#190
post #153

Earlier quoted context omitted.

It's not a serious problem I have, just saying I like OpenSCAD, I have been able to generate every shape I've ever needed to create, and it would do everything I want if it was possible to generate true curves (because I farm out the manufacturing).

Do you have a sample DXF (which uses arcs) which describes a lathe project?

I dug up an OpenSCAD from some backups if that's interesting to you https://pastebin.com/xwhrLwQH

I do not have any DXF of something like this.

Post reply on HN