1 / 1
SCAD polygon outline module — image 1

SCAD polygon outline module

Order a print of this model

We calculate the final price from your selected file. You review and accept it before payment.

Saved on this device.

An OpenSCAD module to render a 2D polygon outline including rounded vertices/corners.

Rating
0 / 5
Likes
5
Downloads
32
Makes
0
Views
257
Reviews
0

Updated at source:

Model information

Category
Engineering
License
Creative Commons — Attribution

An OpenSCAD module to render a 2D polygon outline including rounded corners.

It takes a list of vertices as [X,Y] points (vec2), a boolean value for whether to fill the polygon, and a float of the thickness of the outline. The outline is centred on the line between vertices; rounded corners are centred on their vec2 point.

It is not possible to make the script generate polygons inside of the given vertices as it would require calculating a hull, which is not possible in OpenSCAD. You will need to change the positions of vertices to suit.

It supports both filled and unfilled polygons.

Example Usage
use <OutlinePolygon.scad>

Points = [ [0,0], [0,1], [1,1], [1,0] ];

linear_extrude(5) { OutlinePolygon(lineThickness=4, fill=false, points=Points, $fn=24); }

 

Tags