1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-15 03:43:57 +02:00

Added bezier_join().

Moved path_length() from sweep.scad to maths.scad.
This commit is contained in:
Chris Palmer
2022-02-23 11:53:02 +00:00
parent 76aa613093
commit 42fccc1afb
6 changed files with 39 additions and 5 deletions

View File

@@ -77,6 +77,17 @@ module beziers() {
translate(control_points[1] - [0, 0, 2])
label(str("bezier_length = ", length, ", bezier_min_z = ", bezier_min_z(curve)), valign = "top");
path1 = [[20, 20, 0], [40, 20, 0]];
path2 = [[70, 40, -5], [60, 40, 0]];
color("green")
for(p = concat(path1, path2))
translate(p)
sphere(1);
color("orange")
sweep(bezier_join(path1, path2, 10), circle_points(0.5, $fn = 64));
}
if($preview)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 85 KiB