1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-12 09:44:16 +02:00

add undocumented_features

This commit is contained in:
Justin Lin
2019-05-30 08:11:34 +08:00
parent 90b2d542ef
commit a71b9fe174
4 changed files with 78 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
include <shape_taiwan.scad>;
include <in_shape.scad>;
/*
points = [
[10, 0],
[10, 10],
[-10, 10],
[-10, -10]
];*/
points = shape_taiwan(30);
%polygon(points);
pt = [-10, 9];
n = 200;
xs = rands(-10, 10, n);
ys = rands(-18, 18, n);
pts = [
for(i = [0:n])
let(p = [xs[i], ys[i]])
if(in_shape(points, p, true))
p
];
for(p = pts) {
translate(p) circle(.2);
}

View File

@@ -0,0 +1,14 @@
include <hull_polyline2d.scad>;
include <shape_taiwan.scad>;
include <bijection_offset.scad>;
include <midpt_smooth.scad>;
taiwan = shape_taiwan(100, .5);
sm = midpt_smooth(taiwan, 1, true);
*translate([10, 0, 0]) hull_polyline2d(shape_taiwan(100), .1);
translate([10, 0, 0]) hull_polyline2d(sm, .1);
echo(len(taiwan));

View File

@@ -0,0 +1,14 @@
include <hull_polyline2d.scad>;
include <trim_shape.scad>;
include <shape_taiwan.scad>;
include <bijection_offset.scad>;
include <midpt_smooth.scad>;
taiwan = shape_taiwan(50);
offseted = bijection_offset(taiwan, -2);
trimmed = trim_shape(offseted, 3, len(offseted) - 6);
smoothed = midpt_smooth(trimmed, 3);
#hull_polyline2d(taiwan, .1);
%translate([25, 0, 0]) hull_polyline2d(offseted, .2);
hull_polyline2d(smoothed, .1);

View File

@@ -0,0 +1,18 @@
voronoi, bend_extrude:
https://www.thingiverse.com/thing:3650115
voronoi3d
3d version of voronoi, slow but workable
in_shape, in_line
in_shape_demo.scad
midpt_smooth
midpt_smooth.scad
trim_shape
trim_shape_demo.scad
shape_taiwan: new `dt` parameter
bijection_offset: new `epsilon` parameter