teejaydub / tjw-scad

My reusable additions to OpenSCAD.
Creative Commons Zero v1.0 Universal
13 stars 2 forks source link

Use spline as outer border of a 2D object? #3

Open steve8x8 opened 3 months ago

steve8x8 commented 3 months ago

Is there a way to use the spline module to create a smoothed version of, say, polygon()? I found spline_ribbon() but that will only create the border, and I don't want to use hull() as that would drop too many details.

Any suggestions? (Did I overlook the obvious?)

teejaydub commented 3 months ago

Sure. Do you have a list of 2D points and you want to make a 2D shape that is spline-smoothed through those points?

Instead of doing polygon(points), I think you can just do polygon(smooth(points, loop=true)).

If that doesn't work, post a code example and I'll have a look.