Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can you explain the problem with openscad a little more? I’m not quite following.


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


To 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);


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




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: