OpenSCAD

57 readers
1 users here now

A community for The Programmers Solid CAD Modeller, OpenSCAD.

founded 2 years ago
MODERATORS
1
 
 

We all know about the linear_extrude(...) function that turns 2d things into 3d things.

I sometimes have found myself wishing for a similar function which could make a more rounded, result.

Just to illustrate what I'm hoping to achieve, my dream solution would, given this 2d outline:

Capsule-shaped 2d outline.

would give me something like the following:

The same outline "pillowed" up into the third dimension.

Another angle of demonstrating the "back"/"bottom" is flat.

Just to further illustrate, the code I used to generate outline above:

hull() {
	for (i=[-1:1])
		translate([i*15, 0])
			circle(d=10);
}

And the "pillowed" version that shows the desired result giving the above outline:

$fn=64;
rotate([0, 90, 0])
	linear_extrude(30, center=true)
		scale([4, 10])
			difference() {
				circle(d=1);
				translate([0.5, 0])
					square(1, center=true);
			}
for (i = [-1, 1])
	translate([i*15, 0, 0])
		scale([10, 10, 4])
			difference() {
				sphere(d=1);
				translate([0, 0, -0.5])
					cube(1, center=true);
			}

The outline I actually want to pillow for my particular current use case looks like this:

A pattern in the style of a Talavera tile.

(Credit to this person on Printables for the Talavera tile pattern.)

I'm hoping there's a way to do this I'm not thinking of, or a library I'm not familiar with. The example above makes an elliptical curve, but I'm not married to elliptical in particular. Anything somewhat similar would be fine.

Thanks in advance for any help!

2
 
 

I want to post my design on Printables but my scad file uses a threads library found here. Should I just add a comment above the "use" statement with a link on where to get the library?

3
 
 

I made this partly as an exercise in learning OpenSCAD, and partly as a convenient way of adding rails to designs for 3d printable nerf blasters.

There's several OpenSCAD Picatinny rail generators on printables, but I think mine has the most features. I may have gotten a bit carried away in terms of adding more and more options - so I'm calling this done, at least for now.

I'd be happy to hear suggestions for more features, though it might be a little while before I get around to implementing them.

4
 
 

I created a lib for designing cabinets. I'm not a woodworker, but I can design some for myself and I found this lib useful enough to share. So enjoy.