5 ms·
I really hope CADmium can wean me off of OpenSCAD. With OpenSCAD, I don't really have to think at first; I use a simple language to write modules that build on
by hathawsh 2y ago
I really hope CADmium can wean me off of OpenSCAD. With OpenSCAD, I don't really have to think at first; I use a simple language to write modules that build on other modules. The problem with OpenSCAD is there's no solver: I have variables, but no constraints. As I make changes, suddenly I have to think hard and solve the constraints manually and it's easy to introduce errors. However, the problem isn't severe enough to get me to use something else, because starting a model with OpenSCAD is IMHO far easier that anything else I've tried.
- btreecat 2y agoFreeCAD has a built in OpenSCAD engine. I started with OpenSCAD but found FreeCAD to be way more productive for me when it came to actually producing 3d objects. Sometimes I want to start with a square, then delete a line, and add a semi circle. But I don't always know that until I start sketching. With OpenSCAD I feel you have to know the shape primitive you need, then the exact way to modify it, and the fact that it encourages 3D primitives over 2d w/ extrusion and rotating was kinda annoying imo.
- ecjhdnc2025 2y agoBelatedly: this engine has one absolutely fantastic advantage, too. Because it interprets the file as a sequence of Part object manipulations, it's a very useful way of getting a bRep representation of an OpenSCAD document, so you get the opportunity to generate a clean, minimal STEP file. OpenSCAD cannot do this itself, and the other conversion approaches just get you a triangle mesh packaged in a STEP file. It's not perfect -- you get a mesh if you use Minkowski or hull operations. But it's good.
- ipsod 2y agoI'd add PyMadCAD, to those already mentioned.
- bilsbie 2y agoCan you explain the problem with openscad a little more? I’m not quite following.
- RobotToaster 2y agoDifferent person but I've had the same experience. You can't just write code to, for example, "put this line at a 56.7 degree angle and have it end 0.22mm from this surface". You have to break out the trigonometry to calculate how long that line needs to be.
- hathawsh 2y agoAs the complexity of a model increases, so does the complexity of determining correct dimensions and object placement. At some point the work becomes complex enough that I spend most of my modeling time cleaning up equations rather than finishing the model. A solver would theoretically replace many of the equations. As a trivial example, let's say I want a square and a diamond and I want the diamond's corner to touch the square on the side. It would look something like this: square([10, 10], center=true); dx = 5 + 5 * sqrt(2); translate([dx, 0, 0]) rotate([0, 0, 45]) square([10, 10], center=true); This is a simple case, but what if either shape is replaced with a hexagon, a gear, or a duck? What if I decide there should be some other shapes between them? What about...? Ideally, it seems like I should be able to tell OpenSCAD that the square contains a reference point on one side, and one of the corners of the diamond is also a reference point, and OpenSCAD should translate the diamond however is needed to make those two reference points match. Alternatively, I should use some other software that lets me do something like that.
- sornen 2y agoTo illustrate what can be done with the BOSL2 library for openscad this can add 3 "diamonds" to the RIGHT, FWD, and TOP direction of a square, with the RIGHT and FWD diamond's corner touching the square on the side and the TOP diamond sitting atop the square: cuboid([8,8,2]) align([RIGHT, FWD, TOP]) cuboid([5,5,2], spin=45);
- ecjhdnc2025 2y agoHave you looked at Build123D?
- hathawsh 2y agoI haven't. Thanks for the pointer!
- ecjhdnc2025 2y agohttps://build123d.readthedocs.io/ https://build123d.readthedocs.io/ Many interesting features, and as it is bRep you have faces and edges, some access to constraints, the ability to import STEP etc. (oh and fillets/chamfers, with the usual OpenCascade caveats) I have not got into it yet (mostly I am a happy FreeCADder) but your feelings about OpenSCAD resonate with me and this looks like it addresses many of them. On the one hand OpenSCAD was the first thing that ever gave me any confidence that I would be able to make my own designs to print, and on the other the fact that it is wholly declarative is exasperating. People make such amazing things in OpenSCAD (like Edgar Kech’s scalable large format field camera) but I do not have the tenacity to keep up with all the maths, or keep consistently avoiding coplanar issues in the preview.
- bvrmn 2y agoJust wow. I've tried CadQuery and I'm too dumb to use its fluent syntax. But Build123D has amazing DSL, it was an instant understanding what code actually does and it's easy to write also. Thank you for recommendation!
- ecjhdnc2025 2y agoImpressively it’s even the same underlying object system so the two can coexist, use the same previewer etc., and I think there’s even Jupyter support. But yes, the syntax is IMO much better because it isn’t trying to be so clever.
- oehpr 2y agoI wish Solvespace and OpenSCAD would have a baby so I could have the best of both worlds.
- sornen 2y agoAnother option is the BOSL2 library for openscad which has align, attach and anchor operations and many other useful operations and parts.
- aiksiongkoh 2y agoOndsel has developed an LGPL 3D assembly solver at https://github.com/Ondsel-Development/OndselSolver https://github.com/Ondsel-Development/OndselSolver It is being used in FreeCAD and Ondsel ES.