# Softening a polygon Classic List Threaded 4 messages Open this post in threaded view
|

## Softening a polygon

 This post was updated on . Hi List, I'm trying to code a toy bus that I made (in wood) years ago when my kids were young, just to see if my (cheapo) CNC could make a miniature version. For the time being, I have mostly entered dimensions, and made the bottom part. I am now trying to code the rear block, and I want to soften the polygon lines, like I did with the wood and the big disc sander. I thought of using a Béziers curve, and I found a library with a function that returns a set of points corresponding to the Béziers curve. Now, I can't seem to be able to create a polygon from this list, so for the time being (bear with me, my code is terrible) I have used a linear_extrude of a projection of a hull_polyline3d. It's not really what I was aiming for. Would there be a more "openScad" way of concatenating a polygon with a softened version of a part of itself? I will have to do it in other places too, like the top for example... Thanks in advance.
Open this post in threaded view
|

## Re: Softening a polygon

 Hi gounthar Rounding is one of the most asked questions. Short answer for 3d boolean operations union difference  and intersection: There is none as most think of them. Now there are a bunch of work arounds. Best but limited is to do all the heavy lifting in 2d. There are many but two common methods is the Round_Anything library or using a triplet of 2d offsets. 2d offsets. First offset out 1=r, then offset in r=2 , last offset out r=1. That get you outer and inner radii of 1. For thin features   It's all my pleasure. One tip is to give the techniques  a practice run on some simple stuff before your real project, The rotation of the three 2d sketches was  somewhat confusing the first time i tried. Best of luck. `````` translate([-10,0,0]) intersect_planes(h=26){ square([40,8],center=true); //XY circle(5.5); //YZ text("OK!",halign="center",valign="center"); // XZ } translate([30,0,0]) show_intersect_planes(h=26){ text("XY",halign="center",valign="center"); text("YZ",halign="center",valign="center"); text("XZ",halign="center",valign="center"); } module intersect_planes(h ){ intersection(){ color("blue") linear_extrude(h,center=true,convexity=20)children(0); color("red") rotate([0,-90,0])rotate(-90) linear_extrude(h,center=true,convexity=20)children(1); color("green") rotate([90,0,0]) linear_extrude(h,center=true,convexity=20)children(2); } } module show_intersect_planes(){ union(){ color("blue") linear_extrude(h,center=true,convexity=20)children(0); color("red") rotate([0,-90,0])rotate(-90) linear_extrude(h,center=true,convexity=20)children(1); color("green") rotate([90,0,0]) linear_extrude(h,center=true,convexity=20)children(2); } } ``` ```