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!

  • sp3ctr4l@lemmy.zip
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    21 days ago

    Ah… oops.

    I did not realize that basically Step 0 did not work, due to your input data format being incompatible with the actual function…

    But, your ‘stepped pyramid’ solution does work!

    I am not at all familiar with the actual material you are printing… but I did have a friend who got into thermoplastic 3D printing over a decade ago, when it was all pretty new.

    For some shapes, he would do a similar approach to your stepped pyramid approach, and then just physically sand them down to smoothness by hand, with sand paper and … some kind of small, dremel style sanding tool, something like this.

    You just have to enlarge the whole shape such that you can sand it down to the actual desired size/shape.

    But that would probably be pretty time consuming with your pattern here, as its something like 30 different pieces… and with pieces this small, it may be impractical if you are not pretty dextrous.

    • TootSweet@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      21 days ago

      I’m planning to print in PLA. Aside from sanding, I’ve heard primer/filler and even wood filler can be used to help hide layer lines. Also, I’m planning to paint the result with something kindof patterned/blotchy to help obscure the layer lines.

      I don’t have stringent tolerances or anything, so I don’t expect I’ll need to build it up to account for material removed by sanding or anything. My ultimate goal is to make tiles for the backsplash over my stove. The back (bottom for printing orientation) needs to be roughly as flat as my wall. The front(/top), aside from the features, needs to be sufficiently flat and of consistent thickness as to not stand out to the eye from a couple of feet away. And they need to be square enough to tile nicely on the wall. Aside from that, if sanding makes my 2mm thick features into 1.9mm thick features, that’s no real problem for my application.

      You may have a point about the hard-to-reach corners. I’m hoping the spray primer/filler will help a lot with that.