Live data from Hacker News

Getting the best out of OpenSCAD

calbryant.uk

51–60 of 60 posts

Re: Getting the best out of OpenSCAD

#51
post #16

http://www.implicitcad.org/ is an interesting option if you're frustrated by OpenSCAD's limitations.

Awesome! Thanks.. I've been working with implicit modeling for the past half a year but I didn't know there was an "OpenSCAD" equivalent. Seems to work rather well(?)

Re: Getting the best out of OpenSCAD

#52
post #49
post #36

I've worked a bit in OpenSCAD, and although I really enjoy the programming approach to generating 3D designs, it really is limited when compared to traditional CAD software. Being able to visually align an item, or use even basic commands like offset or fillet, are absent in OpenSCAD. Sure OpenSCAD has it's place, but I think that's in the area of procedural generated shapes, and it's not for 3D part or machine desig…

As a successful power user making physical objects, I'm wondering how you work without dimensioned drawings? If you want to learn the distance between two arbitrary points on a part, you need to read the code, and sometimes even do some trig even if you wrote the code. Having markings on the axes is not the same thing: you really want to select two points on a drawing and say "show me this". This is my biggest wish f…

> This is my biggest wish for OpenSCAD.

Even better would be a procedural way to "measure" things on models returned by code.

e.g. a method that would return a sorted list of intersection points between a 3D line and a model.

This would be a killer feature for OpenSCAD.

This is all the more sad that the underlying engine (CGAL) does support this feature.

Re: Getting the best out of OpenSCAD

#54
post #35
post #28

Earlier quoted context omitted.

That's very cool, thank you for explaining it to me. I'm curious if there's any downsides to such a scheme for representing solids compared to BREP, and the kinds of primitives it supports. E.g how easily can it represent a loft between two arbitrary faces - it's not immediately clear how to represent that with a SDF (but my SDF-foo is admittedly not very strong). These are questions that I'm sure will be answered by…

With two arbitrary faces on the same axis (say z), at locations z1 and z2 and the shape of each face being represented by the functions a(x,y) and b(x,y), you can get a loft SDF L(x,y,z) between a and b by the following math (this is not correct syntax for any tool I know but should make it clear what's happening): if(z elif(z>z2) L=b(x,y) else L=((z-z1)/(z2-z1))*a(x,y)+((z2-z)/(z2-z1))*b(x,y) For way way more info,…

Thank you, however, this is but one kind of loft operations done that are common in CAD. Often you want to control the tangency between the connected profiles, or connect profiles that aren’t parallel, or use a center guiderail (arbitrary spline), or use multiple guiderails along specific vertexes on the profiles.

It’s these complex cases that I understand how to approach with a kernel based around face patches, less so how one could achieve it with an SDF

Re: Getting the best out of OpenSCAD

#56
post #54
post #35

Earlier quoted context omitted.

With two arbitrary faces on the same axis (say z), at locations z1 and z2 and the shape of each face being represented by the functions a(x,y) and b(x,y), you can get a loft SDF L(x,y,z) between a and b by the following math (this is not correct syntax for any tool I know but should make it clear what's happening): if(z elif(z>z2) L=b(x,y) else L=((z-z1)/(z2-z1))*a(x,y)+((z2-z)/(z2-z1))*b(x,y) For way way more info,…

Thank you, however, this is but one kind of loft operations done that are common in CAD. Often you want to control the tangency between the connected profiles, or connect profiles that aren’t parallel, or use a center guiderail (arbitrary spline), or use multiple guiderails along specific vertexes on the profiles. It’s these complex cases that I understand how to approach with a kernel based around face patches, less…

None of those cases are complicated - your SDF can be defined piecewise so you can have as many control points as you want. There's no fundamental difference between SDF and brep in terms of expressiveness - just breps define undirected surfaces and SDFs define volumes. Whether your tool (based on whichever underlying geometry approach) allows you to do what you want to do with them is another story.

Re: Getting the best out of OpenSCAD

#57
post #56
post #54

Earlier quoted context omitted.

Thank you, however, this is but one kind of loft operations done that are common in CAD. Often you want to control the tangency between the connected profiles, or connect profiles that aren’t parallel, or use a center guiderail (arbitrary spline), or use multiple guiderails along specific vertexes on the profiles. It’s these complex cases that I understand how to approach with a kernel based around face patches, less…

None of those cases are complicated - your SDF can be defined piecewise so you can have as many control points as you want. There's no fundamental difference between SDF and brep in terms of expressiveness - just breps define undirected surfaces and SDFs define volumes. Whether your tool (based on whichever underlying geometry approach) allows you to do what you want to do with them is another story.

This mostly makes sense to me.

I've been looking at the CAD space for a while, and it seems like tools exist at either extreme of the spectrum from "Point, click, drag" UI and "only code to describe the model" UIs. Rhino might be the exception here, but it's very expensive, and doesn't have the parametric / history preserving properties I'm looking for.

I think both of these extremes have drawbacks, so I've been toying with hybrid solutions that involve both a code editor and a 3D interactive pane. The code is still the source of truth, but the system allows you to interactively draw sketches, apply constraints, select faces etc, and then convert your UI interactions back into their equivalent code.

I've been playing with different ways of representing the models (and how that would inform the "language" the model is described with, and the sorts of operations it would support), but that's a whole different problem that I don't want to get mired in, so I'm looking for the simplest thing that gets the job done.

SDFs are looking like a reasonable solution here, but it's hard to look away when OpenCascade is just sitting there...

Re: Getting the best out of OpenSCAD

#58
post #33
post #23

Earlier quoted context omitted.

My go-to for getting work done has been (and for the foreseeable future will still be) Fusion 360. I can't find a free alternative that is simultaneously batteries included, but also gets out of your way. It makes me feel like a shill saying something so positive about expensive, proprietary software, but it works _really_ well for my usecases (3D printing, 2.5D and 3D woodcraft carving). Having CAD and CAM in the sa…

Is my understanding correct that all your CAD data is stored in Autodesk cloud servers if you are using Fusion 360?

Yes. I don't really mind this though, as I can export my STEP files (or the full f3d project file, but I rarely ever need to do this).

I hop between multiple computers in my workflow. I do most design on a desktop in my house, and then use the less powerful shop computer to run the CNC or have references up. The auto-syncing of project files "in the cloud" is pretty useful there (in a way that an e.g. sync'd dropbox folder would be clunky to use)

Re: Getting the best out of OpenSCAD

#59

Earlier quoted context omitted.

> We restrict access to serious software for early prototyping because people will try things like super complex organic shapes that require supports or special milling machines instead of machines that cost 100 less money. Restricting access to CAD features is a perplexing way to compensate for lack of mechanical engineering skills.

I get it. I see no room to be perplexed since he explained it. Aside from that, in general, requiring a student to do without a magic tool so they are forced to percieve and understand some fundamental that the magic tool hides, is hardly a new or perplexing concept. Otherwise, you get exactly what he just said, they got.

He's not talking about education, but about professionals producing prototypes.

And designing a part to be manufactured easily with the intended process is a basic mechanical engineering skill.

Re: Getting the best out of OpenSCAD

#60

Earlier quoted context omitted.

I get it. I see no room to be perplexed since he explained it. Aside from that, in general, requiring a student to do without a magic tool so they are forced to percieve and understand some fundamental that the magic tool hides, is hardly a new or perplexing concept. Otherwise, you get exactly what he just said, they got.

He's not talking about education, but about professionals producing prototypes. And designing a part to be manufactured easily with the intended process is a basic mechanical engineering skill.

He certainly is talking about education, at least, exactly as much as I was by using the word "student".

"student" just means "one who studies". It doesn't say anything about what they study or what kind of building or organizational structure they happen to inhabit at the time.

The principle I attempted to articulate is general and applies in any context, including this one.

Post reply on HN