mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-28 17:00:00 +02:00
a uniform knot vector is enough
This commit is contained in:
@@ -43,8 +43,8 @@ module klein_bottle(radius1, radius2, bottom_height, thickness, t_step, fn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module tube() {
|
module tube() {
|
||||||
|
|
||||||
mid_pts = [
|
mid_pts = [
|
||||||
|
[0, 0, bottom_height + radius1 / 2],
|
||||||
[0, 0, bottom_height + radius1],
|
[0, 0, bottom_height + radius1],
|
||||||
[0, 0, bottom_height + radius1 * 2],
|
[0, 0, bottom_height + radius1 * 2],
|
||||||
[0, radius1, bottom_height + radius1 * 3.5],
|
[0, radius1, bottom_height + radius1 * 3.5],
|
||||||
@@ -57,34 +57,24 @@ module klein_bottle(radius1, radius2, bottom_height, thickness, t_step, fn) {
|
|||||||
[0, radius1 * 1, bottom_height - radius1 * 2],
|
[0, radius1 * 1, bottom_height - radius1 * 2],
|
||||||
[0, radius1 * 0.15, bottom_height + half_thickness - radius1 * 3],
|
[0, radius1 * 0.15, bottom_height + half_thickness - radius1 * 3],
|
||||||
[0, 0, bottom_height - radius1 * 4],
|
[0, 0, bottom_height - radius1 * 4],
|
||||||
[0, 0, bottom_height - radius1 * 5]
|
[0, 0, bottom_height - radius1 * 5],
|
||||||
|
[0, 0, bottom_height - radius1 * 6]
|
||||||
];
|
];
|
||||||
|
|
||||||
degree = 2;
|
degree = 2;
|
||||||
pts_leng = 15;
|
bs_curve = bspline_curve(t_step, degree, mid_pts);
|
||||||
knot_leng = 18;
|
|
||||||
|
|
||||||
knots = concat(
|
tube_path = concat(
|
||||||
[0, 0, 0],
|
[[0, 0, bottom_height]],
|
||||||
[for(i = [1:12]) i / 13],
|
bs_curve,
|
||||||
[2, 2, 2]
|
[[0, 0, 0]]
|
||||||
);
|
);
|
||||||
|
|
||||||
tube_path = bspline_curve(
|
tube_path2 = concat(
|
||||||
t_step,
|
[[0, 0, bottom_height - thickness]],
|
||||||
degree,
|
bs_curve,
|
||||||
concat(
|
[[0, 0, -thickness]]
|
||||||
concat([[0, 0, bottom_height]], mid_pts),
|
);
|
||||||
[[0, 0, -thickness]]
|
|
||||||
), knots);
|
|
||||||
|
|
||||||
tube_path2 = bspline_curve(
|
|
||||||
t_step,
|
|
||||||
degree,
|
|
||||||
concat(
|
|
||||||
concat([[0, 0, bottom_height - thickness]], mid_pts),
|
|
||||||
[[0, 0, -thickness * 1.5]]
|
|
||||||
), knots);
|
|
||||||
|
|
||||||
difference() {
|
difference() {
|
||||||
union() {
|
union() {
|
||||||
@@ -101,7 +91,6 @@ module klein_bottle(radius1, radius2, bottom_height, thickness, t_step, fn) {
|
|||||||
tube_path2
|
tube_path2
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tube();
|
tube();
|
||||||
|
Reference in New Issue
Block a user