1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-22 14:23:23 +02:00

add px_surround_demo

This commit is contained in:
Justin Lin
2020-03-09 11:33:47 +08:00
parent 2d1bbe05f2
commit cb5bca7ee2

View File

@@ -0,0 +1,27 @@
use <pixel/px_circle.scad>;
use <pixel/px_polyline.scad>;
use <shape_pentagram.scad>;
use <hull_polyline2d.scad>;
use <experimental/px_surround.scad>;
pts = px_circle(10, true);
for(p = pts) {
translate(p)
square(1, center = true);
}
#hull_polyline2d(px_surround(pts), width = .1);
pentagram = [
for(pt = shape_pentagram(15))
[round(pt[0]), round(pt[1])]
];
pts2 = px_polyline(concat(pentagram, [pentagram[0]]));
translate([30, 0]) {
for(pt = pts2) {
translate(pt)
linear_extrude(1, scale = 0.5)
square(1, center = true);
}
#hull_polyline2d(px_surround(pts2), width = .1);
}