1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-18 04:21:16 +02:00
This commit is contained in:
Justin Lin
2020-04-02 11:48:56 +08:00
parent f0d993e623
commit 353981870e
4 changed files with 6 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
use <hull_polyline2d.scad>;
use <shape_square.scad>;
use <experimental/voronoi2d_cells.scad>;
use <experimental/voronoi_cells.scad>;
xs1 = rands(-20, 20, 15);
ys1 = rands(-20, 20, 15);
@@ -16,7 +16,7 @@ function default_region_size(points) =
size = default_region_size(points);
region_shape = shape_square(size, corner_r = size / 10);
cells = voronoi2d_cells(points, region_shape);
cells = voronoi_cells(points, region_shape);
for(i = [0:len(points) - 1]) {
pt = points[i];
cell = cells[i];

View File

@@ -1,5 +1,5 @@
use <hull_polyline2d.scad>;
use <experimental/voronoi2d_lines.scad>;
use <experimental/voronoi_lines.scad>;
use <experimental/convex_hull.scad>;
pt_nums = 50;
@@ -13,7 +13,7 @@ hull_polyline2d(
);
intersection() {
for(line = voronoi2d_lines(points)) {
for(line = voronoi_lines(points)) {
hull_polyline2d(
line,
width = width,

View File

@@ -2,7 +2,7 @@ use <experimental/_impl/_voronoi2d_cells_impl.scad>;
use <experimental/convex_intersection_for.scad>;
use <shape_square.scad>;
function voronoi2d_cells(points, region_shape) =
function voronoi_cells(points, region_shape) =
let(
size = _default_region_size(points),
shape = is_undef(region_shape) ? shape_square(size) : region_shape,

View File

@@ -2,7 +2,7 @@ use <experimental/_impl/_voronoi2d_lines_impl.scad>;
use <experimental/tri_delaunay.scad>;
use <experimental/tri_circumcircle.scad>;
function voronoi2d_lines(points) =
function voronoi_lines(points) =
let(
tris = [
for(idxes = tri_delaunay(points))