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:
32
undocumented_features/in_shape_demo.scad
Normal file
32
undocumented_features/in_shape_demo.scad
Normal 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);
|
||||
}
|
||||
|
||||
|
14
undocumented_features/midpt_smooth_demo.scad
Normal file
14
undocumented_features/midpt_smooth_demo.scad
Normal 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));
|
14
undocumented_features/trim_shape_demo.scad
Normal file
14
undocumented_features/trim_shape_demo.scad
Normal 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);
|
18
undocumented_features/undocumented_note.md
Normal file
18
undocumented_features/undocumented_note.md
Normal 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
|
Reference in New Issue
Block a user