diff --git a/README.md b/README.md index c987a389..97b890e1 100644 --- a/README.md +++ b/README.md @@ -371,7 +371,7 @@ These examples incubate dotSCAD and dotSCAD refactors these examples. See [examp --|-- [**select**(i)](https://openhome.cc/eGossip/OpenSCAD/lib3x-select.html) | select module objects. [**polyline_join**(points)](https://openhome.cc/eGossip/OpenSCAD/lib3x-polyline_join.html) | place a join on each point. Hull each pair of joins and union all convex hulls. -shape_star | create a 2D star. +[**shape_star**([outer_radius, inner_radius, n])](https://openhome.cc/eGossip/OpenSCAD/lib3x-shape_star.html) | create a 2D star. ## Polyhedra diff --git a/docs/images/lib3x-shape_star-1.JPG b/docs/images/lib3x-shape_star-1.JPG new file mode 100644 index 00000000..70c2cf8d Binary files /dev/null and b/docs/images/lib3x-shape_star-1.JPG differ diff --git a/docs/lib3x-star.md b/docs/lib3x-star.md new file mode 100644 index 00000000..5fe92a96 --- /dev/null +++ b/docs/lib3x-star.md @@ -0,0 +1,22 @@ +# shape_star + +Create a star. Default to a pentagram. + +**Since:** 3.2 + +## Parameters + +- `outer_radius`: the outer radius of the star. Default to 1. +- `inner_radius`: the inner radius of the star. Default to 0.381966. +- `n`: the burst number. Default to 5. + +## Examples + + use ; + + polygon(shape_star()); + translate([3, 0, 0]) + polygon(shape_star(n = 8)); + +![shape_star](images/lib3x-shape_star-1.JPG) + diff --git a/src/shape_star.scad b/src/shape_star.scad index 1d94d989..2b8af952 100644 --- a/src/shape_star.scad +++ b/src/shape_star.scad @@ -10,4 +10,4 @@ use <_impl/_shape_star_impl.scad>; -function shape_star(outerRadius = 1, innerRadius = 0.381966, n = 5) = _shape_star_impl(outerRadius, innerRadius, n); \ No newline at end of file +function shape_star(outer_radius = 1, inner_radius = 0.381966, n = 5) = _shape_star_impl(outer_radius, inner_radius, n); \ No newline at end of file