Live data from Hacker News

OpenSCAD: The Programmer's Solid 3D CAD Modeller

openscad.org

141–150 of 191 posts

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

#141
post #101

I don't say it's impossible but I believe it's quite near to impossible for most of OpenSCAD users to model this relatively simple drawing[1]. It's a breeze in CAD with constraint solver. Also it's viable in code-first systems with access to shape coordinates (build123d) using only construction geometry and projections. OpenSCAD requires hard trigonometry and math skills to pull it out. OpenSCAD has amazing community…

13 minutes. And I am very much at the lower end of the CAD skill scale $fn=100; difference(){ union(){ cylinder(d=55,h=60); translate([125,0,0]) cylinder(d=30,h=32); linear_extrude(11) polygon([[0,25],[125,15],[125,-15],[0,-25]]); translate([0,5.5,0]) rotate([90,0,0]) linear_extrude(11) polygon([[0,50],[125,40],[125,0],[0,0]]); } cylinder(d=35,h=70); translate([125,0,0]) cylinder(d=20,h=40); translate([110,8,98]) rot…

The best thing about the challenges from 3d CAD Speedmodelling is that they needed a quick way to validate submissions, so they do it by validating the mass of the design. The density to use is included in the problem. The answer is on this page: https://build123d.readthedocs.io/en/latest/tttt.html#t-24-cu...

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

#142

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…

On the contrary if you're a coder doing anything non-substantial and only rarely need to do some basic 3d modelling I would say definitely look to openscad! I make models for my 3d printer just a few times a year. I find it much easier to get back into openscad than remember my way around a gui or wrestle with more advanced tools. There's nothing I've not managed to make with openscad yet, though the things I have ma…

You CAN get things done, but there is no getting around the fundamental problems expressed here.

All my models are about 50% variable declarations and 50% inscrutable equations to express the relationships between the values. Sometimes huge ternary stacks because the language doesn't allow variable changes, so you can't have simple if/else/case to have a simple concept like a default value that maybe gets replaced based on some other condition.

And the lack of things like fillets is simply impossibl. The things you have to do to attain the end result of a fillet without an actual fillet function is ridiculous, and even after doing the ridiculous things, you still have a limited crap result where no matter what you simply can't actually have a fillet wherever you want, but you can compromise and get at least the ones you really need if you're willing to live with a simple design.

That is not a good tool. A good tool gives you the means to express whatever you need to express. Openscad gives you the power to express cubes and spheres and hulls and intersections of those, and even that only in a bafflingly limited way thanks to the language limitations.

It's not a great tool. It's a great proof of concept for a great idea for a great tool.

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

#143

I'm wondering why I appear to be in the minority questioning how this is news and why it was shared? I've been noticing a general increase in low effort link shares of, what I consider to be, well known projects. These shared links contain no news or anything that appears to be related to updates or recent development, just links to home pages of relatively popular projects.

At this point, there are 138 comments, which, as is often the case on HN, are much more informative than the link itself and show that the topic is hardly worn out. If it was, it wouldn’t have made the front page.

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

#144

Earlier quoted context omitted.

> 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.

I’d recommend taking a look at SolidWorks. For hobbyist use, it’s $50 / year or $15 for a month. You will save yourself so much time and headaches and develop a skill that could be useful for your resume.

Or OnShape, which isn't quite as capable, but is free and probably easier to learn.

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

#145

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 is a reasonable point. I am a greenhorn in the sense that I've been learning CAD for my own somewhat complex, multi-part projects for three years. And I am not an industrial designer. Or a mathematician! (I am opinionated.)

The point for me is that, as a relative novice, I have got past some really important hurdles recently. So I can explain the benefits of getting past them to people who maybe don't know they are there.

I started off using OpenSCAD because it convinced me I'd be able to make something, quite quickly. My first two or three things were OpenSCAD things. It introduces you to stuff that isn't immediately obvious: the more complex booleans like difference of simple primitives, extrudes, lofts, sweeps, revolves. Great! I made things, I printed them, it was transformative.

(There's also quite a good thread library -- Adrian Schlatter's threadlib -- that I do want to say is very helpful and I learned a lot from.)

But it will likely hold back your development as a CAD user for even modestly complex things. Because you will never get access to the fundamentals of your objects -- the faces, vertexes and edges. Putting aside BOSL and the like, it leaves you stuck with a lot of increasingly complex maths, when if you could use the generated geometry you would not have to be. You would have much simpler operations relative to faces and edges.

This is why I said it would be worth spending at least some time with these tools. So you know what is out there.

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

#147

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…

The main complaint I have with CadQuery et. al. is the API verbs are all coming from the point of view of describing bRep shapes instead of thinking about the design from the standpoint of "how would I make this?".

I think there's an opportunity for a code-first CAD API to incorporate GD&T and manufacturability information directly as part of the modeling process. For example, if I'm making a shaft I want to describe that operation as it will actually be performed in the shop e.g.:

  (1) select round stock of nominal dimension X
  (2) cut to rough length
  (3) chuck in 3-jaw chuck and drill center
  (4) flip around in 3-jaw chuck and drill the other center
  (5) mount between centers
  (6) turn to rough outer dimension
  (8) turn down to add the various bosses, threads, chamfers, other details, etc...
With this kind of a process I get all kinds of GD&T information for free--for example, the precision of my 3-jaw chuck determines how much larger my nominal dimension X needs to be than my target rough outer dimension to be able to reliably achieve it.

So I think these APIs are coming at the problem from the wrong point of view--they're all about driving the CAD kernel and telling it how to draw abstract shapes in a computer. Instead what I want is to tell the computer how I intend to make the thing and get an estimate of what the result will look like.

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

#148

For those who are interested. I have been working on a similar CAD Modeler. I think of it as a spiritual successor to OpenSCAD. It has support for bidirectional modeling (ex: get the height and width of an object and use it later) and multi part workflows to design more complex works. https://www.dslcad.com/

This is really cool, does it fix OpenSCAD's need to spam epsilons everywhere to avoid Z-fighting?

TBH I am not sure but I suspect the answer is yes. I use OpenCascade as the base CAD kernel and it handles things like Z-fighting a lot better. I built DSLCAD after completing porting OpenSCAD to wasm because I wanted a better programmatic CAD platform. It's development is really "as I need it" from then on.

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

#149

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…

The main complaint I have with CadQuery et. al. is the API verbs are all coming from the point of view of describing bRep shapes instead of thinking about the design from the standpoint of "how would I make this?". I think there's an opportunity for a code-first CAD API to incorporate GD&T and manufacturability information directly as part of the modeling process. For example, if I'm making a shaft I want to describe…

> So I think these APIs are coming at the problem from the wrong point of view--they're all about driving the CAD kernel and telling it how to draw abstract shapes in a computer. Instead what I want is to tell the computer how I intend to make the thing and get an estimate of what the result will look like.

I have certainly learned over time that when you're looking at an object that exists in the real world, one way to start to figure out how to model it is to figure out how it -- or its injection-mould positive -- was physically made. Can it be cut with a mill? Was it glued together in parts?

It absolutely is fun to try to work out how to come up with a shape subtractively from some giant primitive as if it was a block of steel. I often find myself visualising in terms of a scroll saw. I watched a couple of great videos about three-dimensional scroll-saw work and it weirdly affected my understanding of CAD!

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

#150

Earlier quoted context omitted.

> 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.

I’d recommend taking a look at SolidWorks. For hobbyist use, it’s $50 / year or $15 for a month. You will save yourself so much time and headaches and develop a skill that could be useful for your resume.

Siemens Solid Edge is also available in a free community edition. https://resources.sw.siemens.com/en-US/download-solid-edge-c...
Post reply on HN