mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-07-31 03:50:27 +02:00
use polyline_join
This commit is contained in:
@@ -11,21 +11,21 @@ Creates an arc path. You can pass a 2 element vector to define the central angle
|
||||
|
||||
## Examples
|
||||
|
||||
use <arc_path.scad>;
|
||||
use <hull_polyline2d.scad>;
|
||||
|
||||
$fn = 24;
|
||||
points = arc_path(radius = 20, angle = [45, 290]);
|
||||
hull_polyline2d(points, width = 2);
|
||||
use <arc_path.scad>;
|
||||
use <polyline_join.scad>;
|
||||
|
||||
$fn = 24;
|
||||
points = arc_path(radius = 20, angle = [45, 290]);
|
||||
polyline_join(points) circle(1);
|
||||
|
||||

|
||||
|
||||
use <arc_path.scad>;
|
||||
use <hull_polyline2d.scad>;
|
||||
use <polyline_join.scad>;
|
||||
|
||||
$fn = 24;
|
||||
points = arc_path(radius = 20, angle = 135);
|
||||
hull_polyline2d(points, width = 2);
|
||||
polyline_join(points) circle(1);
|
||||
|
||||

|
||||
|
||||
|
@@ -15,7 +15,7 @@ Creates visually even spacing of n points on the surface of the sphere. Successi
|
||||
## Examples
|
||||
|
||||
use <bauer_spiral.scad>;
|
||||
use <hull_polyline3d.scad>;
|
||||
use <polyline_join.scad>;
|
||||
|
||||
n = 200;
|
||||
radius = 20;
|
||||
@@ -26,7 +26,7 @@ Creates visually even spacing of n points on the surface of the sphere. Successi
|
||||
sphere(1, $fn = 24);
|
||||
}
|
||||
|
||||
hull_polyline3d(pts, 1);
|
||||
polyline_join(pts) sphere(.5);
|
||||
|
||||

|
||||
|
||||
|
@@ -12,7 +12,7 @@ Given a path, the `bezier_smooth` function uses bazier curves to smooth all corn
|
||||
|
||||
## Examples
|
||||
|
||||
use <hull_polyline3d.scad>;
|
||||
use <polyline_join.scad>;
|
||||
use <bezier_smooth.scad>;
|
||||
|
||||
width = 2;
|
||||
@@ -25,15 +25,15 @@ Given a path, the `bezier_smooth` function uses bazier curves to smooth all corn
|
||||
[-10, -10, 50]
|
||||
];
|
||||
|
||||
hull_polyline3d(
|
||||
path_pts, width
|
||||
);
|
||||
polyline_join(path_pts)
|
||||
sphere(width / 2);
|
||||
|
||||
smoothed_path_pts = bezier_smooth(path_pts, round_d);
|
||||
|
||||
color("red") translate([30, 0, 0]) hull_polyline3d(
|
||||
smoothed_path_pts, width
|
||||
);
|
||||
color("red")
|
||||
translate([30, 0, 0])
|
||||
polyline_join(smoothed_path_pts)
|
||||
sphere(width / 2);
|
||||
|
||||

|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# bspline_curve
|
||||
|
||||
[B-spline](https://en.wikipedia.org/wiki/B-spline) interpolation using [de Boor's algorithm](https://en.wikipedia.org/wiki/De_Boor%27s_algorithm). This function returns points of the B-spline path. Combined with the `polyline`, `polyline3d` or `hull_polyline3d` module, you can create a B-spline curve.
|
||||
[B-spline](https://en.wikipedia.org/wiki/B-spline) interpolation using [de Boor's algorithm](https://en.wikipedia.org/wiki/De_Boor%27s_algorithm). This function returns points of the B-spline path.
|
||||
|
||||
**Since:** 2.1
|
||||
|
||||
|
@@ -11,7 +11,7 @@ Computes contour polygons by applying [marching squares](https://en.wikipedia.or
|
||||
|
||||
## Examples
|
||||
|
||||
use <hull_polyline2d.scad>;
|
||||
use <polyline_join.scad>;
|
||||
use <surface/sf_thicken.scad>;
|
||||
use <contours.scad>;
|
||||
|
||||
@@ -36,7 +36,8 @@ Computes contour polygons by applying [marching squares](https://en.wikipedia.or
|
||||
translate([0, 0, z])
|
||||
linear_extrude(1)
|
||||
for(isoline = contours(points, z)) {
|
||||
hull_polyline2d(isoline, width = 1);
|
||||
polyline_join(isoline)
|
||||
circle(.5);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,7 @@ Draws a curved line from control points. The curve is drawn only from the 2nd co
|
||||
## Examples
|
||||
|
||||
use <curve.scad>;
|
||||
use <hull_polyline3d.scad>;
|
||||
use <polyline_join.scad>;
|
||||
|
||||
pts = [
|
||||
[28, 2, 1],
|
||||
@@ -32,12 +32,14 @@ Draws a curved line from control points. The curve is drawn only from the 2nd co
|
||||
tightness = 0;
|
||||
points = curve(t_step, pts, tightness);
|
||||
|
||||
hull_polyline3d(points, 1);
|
||||
polyline_join(points)
|
||||
sphere(.5);
|
||||
|
||||
#for(pt = pts) {
|
||||
translate(pt)
|
||||
sphere(1);
|
||||
}
|
||||
#hull_polyline3d(pts, .1);
|
||||
#polyline_join(pts)
|
||||
sphere(.05);
|
||||
|
||||

|
@@ -31,7 +31,7 @@ Creates visually even spacing of n points on the surface of the sphere. Nearest-
|
||||

|
||||
|
||||
use <fibonacci_lattice.scad>;
|
||||
use <hull_polyline3d.scad>;
|
||||
use <polyline_join.scad>;
|
||||
|
||||
n = 200;
|
||||
radius = 20;
|
||||
@@ -49,7 +49,8 @@ Creates visually even spacing of n points on the surface of the sphere. Nearest-
|
||||
];
|
||||
|
||||
for(spiral = spirals) {
|
||||
hull_polyline3d(spiral, 1);
|
||||
polyline_join(spiral)
|
||||
sphere(.5);
|
||||
}
|
||||
|
||||

|
@@ -11,7 +11,7 @@ Drive a turtle with `["forward", length]` or `["turn", angle]`. This function is
|
||||
|
||||
## Examples
|
||||
|
||||
use <polyline2d.scad>;
|
||||
use <polyline_join.scad>;
|
||||
use <turtle/footprints2.scad>;
|
||||
|
||||
function arc_cmds(radius, angle, steps) =
|
||||
@@ -48,7 +48,8 @@ Drive a turtle with `["forward", length]` or `["turn", angle]`. This function is
|
||||
)
|
||||
);
|
||||
|
||||
polyline2d(poly, width = 1);
|
||||
polyline_join(poly)
|
||||
circle(.5);
|
||||
|
||||

|
||||
|
||||
|
@@ -11,7 +11,7 @@ A 3D verion of [footprint2](https://openhome.cc/eGossip/OpenSCAD/lib3x-footprint
|
||||
|
||||
## Examples
|
||||
|
||||
use <hull_polyline3d.scad>;
|
||||
use <polyline_join.scad>;
|
||||
use <turtle/footprints3.scad>;
|
||||
|
||||
function xy_arc_cmds(radius, angle, steps) =
|
||||
@@ -49,7 +49,8 @@ A 3D verion of [footprint2](https://openhome.cc/eGossip/OpenSCAD/lib3x-footprint
|
||||
)
|
||||
);
|
||||
|
||||
hull_polyline3d(poly, thickness = 1);
|
||||
polyline_join(poly)
|
||||
sphere(.5);
|
||||
|
||||

|
||||
|
||||
|
@@ -14,7 +14,7 @@ Gets all points on the path of a spiral around a cylinder. Its `$fa`, `$fs` and
|
||||
## Examples
|
||||
|
||||
use <helix.scad>;
|
||||
use <hull_polyline3d.scad>;
|
||||
use <polyline_join.scad>;
|
||||
|
||||
$fn = 12;
|
||||
|
||||
@@ -30,12 +30,13 @@ Gets all points on the path of a spiral around a cylinder. Its `$fa`, `$fs` and
|
||||
translate(p) sphere(5);
|
||||
}
|
||||
|
||||
hull_polyline3d(points, 2);
|
||||
polyline_join(points)
|
||||
sphere(1);
|
||||
|
||||

|
||||
|
||||
use <helix.scad>;
|
||||
use <hull_polyline3d.scad>;
|
||||
use <polyline_join.scad>;
|
||||
|
||||
$fn = 12;
|
||||
|
||||
@@ -47,7 +48,8 @@ Gets all points on the path of a spiral around a cylinder. Its `$fa`, `$fs` and
|
||||
rt_dir = "CLK"
|
||||
);
|
||||
|
||||
hull_polyline3d(points, 2);
|
||||
polyline_join(points)
|
||||
sphere(1);
|
||||
|
||||
%cylinder(h = 100, r1 = 40, r2 = 20);
|
||||
|
||||
|
Reference in New Issue
Block a user