Live data from Hacker News

OpenSCAD: The Programmer's Solid 3D CAD Modeller

openscad.org

111–120 of 191 posts

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

#111

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.

I bought into Plasticity in the hope that it would gain such facilities, but the dev said that that sort of thing was being pushed off to v3.

Tried Dune3D and was moderately successful, but couldn't see where in the U.I. such numeric/programmatic access would be afforded and it doesn't seem to be on the roadmap there either.

I suppose I should break down and buy Rhino 3D and use Grasshopper, or Moment of Inspiration and use its Node Editor, but for now, I've been using:

https://github.com/derkork/openscad-graph-editor

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

#112

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…

> There's nothing I've not managed to make with openscad yet, though the things I have made are embarrassingly simple (yet highly functional).

It is workable if you have an extremely solid grasp of mathematics, and you don't mind objects that ultimately retain the feel of the combination of a few CSG primitives.

But I make 3D-printed things that for a variety of reasons are little more than rings, plates, discs, and helixes, and I've already very clearly run into situations where the face/vertex/wire model of a proper CAD package is more or less the only way to keep control over a design.

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

#113

I haven't touched it in years. I didn't have problems, uh, thinking in parametrics , but lordy was the rendering slow. I might try it again.

The new Manifold library is blindingly fast for most things --- even things which bring the previous renderer to its knees complete in a reasonable timeframe for Preview(ing), though Render(ing) can require a measurably long wait.

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

#114

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…

Fornjot[0][1] is also really impressive as a CAD kernel. It is written in Rust, and is still a WIP, but I think is turning out nicely. [0] https://www.fornjot.app/ [1] https://github.com/hannobraun/fornjot

I was extremely excited about Fornjot for both personal and professional reasons, but the author has shared important updates that would deter me from using it outside of hobbyist contexts:

May 2023 https://www.fornjot.app/blog/a-new-direction/

I don't know how things will shake out long-term, but for now, I'm going to reduce my effort to one day per week...

As of now, the goal of Fornjot is no longer to build a CAD application. From now on, Fornjot is a CAD kernel...

Last week: https://www.fornjot.app/blog/changes-to-the-development-proc...

There will be no more releases for the time being.

I will no longer submit pull requests for my own work.

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

#115
post #99

Nice to see this here. If anyone’s interested, I collected a bunch of resources for it over the years: https://taoofmac.com/space/apps/openscad

Nice! Great to see (Open)PythonSCAD listed! (I know this sort of thing is hard to keep up with --- I was trying for a long while on the old Shapeoko wiki (see link elsethread)).

(below has been edited to reflect my reading the entire page)

A tool which I didn't find and thought wasn't included is:

https://github.com/derkork/openscad-graph-editor

(which I was expecting would fall under "GUI", but is instead near the end under "Wrappers")

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

#116
Nice to see OpenSCAD getting relevance.

Last January I offered a course on OpenSCAD in my university, perhaps the first one in Brazil or even in Portuguese. The lectures are available here (but it's in Portuguese, perhaps someday I'll translate it to English...): https://lucasoshiro.github.io/posts-en/2024-03-24-openscad/

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

#117
OpenSCAD of course is not as powerful as other tools, but it has a lot of pros (depending on what you consider a pro):

- Free, unlike other tools such as Fusion or SolidWorks - Open Source, unlike other tools such as Tinkercad or OnShape - 100% based on a programming language: compared to others is like comparing plain HTML with HTML + JS - Parameterizable (as a consequence of being based on a programming language), makes it a lot easier to adjust the model in a second iteration - Lightweight (it runs ok in my 12 year old desktop) - It can be used in CLI to generate STL files, makes it easier to automate the model generation

But of course it has a lot of cons: - It isn't multithreaded, so, it doesn't matter if you have an 32-core CPU or a single core. It also doesn't matter if you have a GPU. So, there's no "best machine" for running it - You can't compute the size of a shape, unless you know a formula for it. It's specially bad if you are dealing with texts, as you can't predict their shapes unless you're using a monospace font - It has some bugs in visualization - Even though it's on active development (you can see that in their Git), its latest release was in 2021

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

#118
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…

This is good -- but they aren't quite the same? [0]

And the way they are not the same is (as the GP is saying) rather telling about the challenge of getting really precise things working in OpenSCAD without a pretty solid grasp of maths.

[0] they might be functionally equivalent in application, which is not nothing, of course

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

#119
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…

This does not match the drawing. In addition it only took 4 minutes to do it correctly in a normal CAD package [1]. OpenSCAD is cool, but it's not at all a replacement for traditional 3D CAD and I wish people would try to sell it on its strengths instead of selling it as a replacement for traditional CAD.

[1]: https://youtu.be/aL5KLXNV-FI

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

#120

OpenSCAD of course is not as powerful as other tools, but it has a lot of pros (depending on what you consider a pro): - Free, unlike other tools such as Fusion or SolidWorks - Open Source, unlike other tools such as Tinkercad or OnShape - 100% based on a programming language: compared to others is like comparing plain HTML with HTML + JS - Parameterizable (as a consequence of being based on a programming language),…

> But of course it has a lot of cons: - It isn't multithreaded, so, it doesn't matter if you have an 32-core CPU or a single core. It also doesn't matter if you have a GPU.

FWIW these don't have massive benefits for CAD modelling either. Most CAD kernels, even commercial ones, are sort of stubbornly single-threaded.

Sure, multi-threading can really help make the wider application feel more responsive, and a GPU is enormously useful for high-level photorealistic rendering as an end product. But it doesn't bring that much to bear on geometry solving, and the kind of 3D you need for CAD modelling and viewing is pretty old hat in OpenGL terms, I think?

Post reply on HN