mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-29 01:11:30 +02:00
voronoi preview
This commit is contained in:
@@ -2,7 +2,7 @@ use <trim_shape.scad>;
|
||||
use <bezier_curve.scad>;
|
||||
use <shape_taiwan.scad>;
|
||||
use <path_scaling_sections.scad>;
|
||||
use <polysections.scad>;
|
||||
use <sweep.scad>;
|
||||
use <ptf/ptf_rotate.scad>;
|
||||
use <bijection_offset.scad>;
|
||||
|
||||
@@ -54,8 +54,8 @@ module dancing_formosan(x1, x2, x3, y1, y2, y3, twist, t_step) {
|
||||
sections2 = cal_sections(taiwan2, edge_path2, twist);
|
||||
|
||||
difference() {
|
||||
polysections(sections);
|
||||
polysections(sections2);
|
||||
sweep(sections);
|
||||
sweep(sections2);
|
||||
}
|
||||
|
||||
translate([0, 0, -2])
|
||||
|
@@ -1,5 +1,5 @@
|
||||
use <hollow_out.scad>;
|
||||
use <voronoi2d.scad>;
|
||||
use <voronoi/vrn2_from.scad>;
|
||||
use <bend_extrude.scad>;
|
||||
|
||||
r = 35;
|
||||
@@ -30,7 +30,7 @@ module voronoi_bracelet(r, height, thickness, n, frags, offset_r, region_type) {
|
||||
{
|
||||
difference() {
|
||||
square([x, y]);
|
||||
voronoi2d(points, spacing = thickness, r = offset_r, region_type = region_type);
|
||||
vrn2_from(points, spacing = thickness, r = offset_r, region_type = region_type);
|
||||
}
|
||||
hollow_out(thickness * 1.5)
|
||||
square([x, y]);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
use <golden_spiral.scad>;
|
||||
use <ptf/ptf_rotate.scad>;
|
||||
use <hollow_out.scad>;
|
||||
use <experimental/voronoi_cells.scad>;
|
||||
use <voronoi/vrn2_cells_from.scad>;
|
||||
|
||||
spirals = 2; // [2:]
|
||||
line_thickness = .5;
|
||||
@@ -33,7 +33,7 @@ module voronoi_fibonacci() {
|
||||
half_line_thicness = line_thickness / 2;
|
||||
lst_r = norm(spiral[len(spiral) - 1]) + half_line_thicness;
|
||||
|
||||
cells = voronoi2d_cells(pts);
|
||||
cells = vrn2_cells_from(pts);
|
||||
for(i = [0:len(pts) - 1]) {
|
||||
cell = cells[i];
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
use <experimental/voronoi_square.scad>;
|
||||
use <voronoi/vrn2_space.scad>;
|
||||
use <bend_extrude.scad>;
|
||||
use <arc.scad>;
|
||||
|
||||
@@ -11,7 +11,7 @@ $fn = 24;
|
||||
|
||||
color("black")
|
||||
bend_extrude(size, thickness = thickness, angle = 360)
|
||||
voronoi_square(size, grid_w, seed, spacing);
|
||||
vrn2_space(size, grid_w, seed, spacing);
|
||||
|
||||
r = size[0] / (2 * PI);
|
||||
linear_extrude(size[1])
|
||||
|
@@ -1,10 +1,10 @@
|
||||
use <experimental/voronoi_square_cells.scad>;
|
||||
use <voronoi/vrn2_space_cells.scad>;
|
||||
use <hull_polyline3d.scad>;
|
||||
use <ptf/ptf_torus.scad>;
|
||||
|
||||
size = [40, 80];
|
||||
grid_w = 5;
|
||||
cells = voronoi_square_cells(size, grid_w);
|
||||
cells = vrn2_space_cells(size, grid_w);
|
||||
|
||||
$fn = 4;
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
use <voronoi3d.scad>;
|
||||
use <voronoi/vrn3_from.scad>;
|
||||
use <bezier_curve.scad>;
|
||||
use <hollow_out.scad>;
|
||||
use <polysections.scad>;
|
||||
use <sweep.scad>;
|
||||
|
||||
r = 13;
|
||||
h = 60;
|
||||
@@ -44,13 +44,13 @@ module voronoi_vase(r, h, thickness, num_of_pts, fn, profile_step) {
|
||||
|
||||
difference() {
|
||||
scale([0.95, 0.95, 1])
|
||||
polysections(sections);
|
||||
sweep(sections);
|
||||
scale([0.85, 0.85, 1])
|
||||
polysections(sections);
|
||||
sweep(sections);
|
||||
intersection() {
|
||||
polysections(sections);
|
||||
sweep(sections);
|
||||
render()
|
||||
voronoi3d(concat([for(i = indices) pts[i]], [sections[0][0], sections[0][half_fn], sections[last_section_i][0], sections[last_section_i][half_fn]]));
|
||||
vrn3_from(concat([for(i = indices) pts[i]], [sections[0][0], sections[0][half_fn], sections[last_section_i][0], sections[last_section_i][half_fn]]));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user