You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/Rounding the Cube.md
+32-11Lines changed: 32 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -263,7 +263,7 @@ You can construct cube-like objects, as well as a variety of other prisms using
263
263
A feature unique to [rounded_prism()](https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#functionmodule-rounded_prism) is that it uses continuous curvature rounding. Rather than using constant radius arcs, continuous curvature rounding uses 4th-order Bezier curves. For complete details on how this works see [Types of Roundovers](https://github.com/BelfrySCAD/BOSL2/wiki/rounding.scad#section-types-of-roundovers).
264
264
265
265
266
-
Two parameters control the roundover k and joint. The joint parameter is the distance from where the rounding starts to the unrounded edge. The k parameter ranges from 0 to 1 with a default of 0.5. Larger values give a more abrupt transition and smaller ones a more gradual transition.
266
+
Two parameters control the roundover, k and joint. The joint parameter is the distance from where the rounding starts to the unrounded edge. The k parameter ranges from 0 to 1 with a default of 0.5. Larger values give a more abrupt transition and smaller ones a more gradual transition.
267
267
268
268
Parameters of a "smooth" roundover, with k=0.75.
269
269
@@ -276,33 +276,33 @@ Parameters of a "smooth" roundover, with k=0.15. The transition is so gradual th
276
276
The joint parameter is specified separately for the top, bottom and side edges; joint\_top, joint\_bot, and joint_sides.
277
277
278
278
279
-
If you want a very smooth roundover, set the joint parameter as large as possible and then adjust the k value down low enough to achieve a sufficiently large roundover.
279
+
If you want a very smooth roundover, set the joint parameter as large as possible and then adjust the k value down low enough to achieve a sufficiently large roundover. Joint parameters usually need to be < side/2.
280
280
281
281
282
282
```openscad-3D
283
283
include <BOSL2/std.scad>
284
284
include <BOSL2/rounding.scad>
285
285
rounded_prism(rect(20), height=20,
286
-
joint_top=10, joint_bot=10, joint_sides=10, k = 0.5);
286
+
joint_top=9.99, joint_bot=9.99, joint_sides=9.99, k = 0.5);
287
287
```
288
288
289
-
Here we're using the same cube size of 20, setting the joint paramater to 10 and varying the k parameter.
289
+
Here we're using the same cube size and joint sizes, but varying the k parameter.
290
290
291
291
```openscad-3D;ImgOnly NoScales Med VPD=170 VPR=[75,0,25]
292
292
include <BOSL2/std.scad>
293
293
include <BOSL2/rounding.scad>
294
294
left(30) {
295
-
rounded_prism(rect(20), height=20, joint_top=10, joint_bot=10, joint_sides=10, k = 0.15);
295
+
rounded_prism(rect(20), height=20, joint_top=9.99, joint_bot=9.99, joint_sides=9.99, k = 0.15);
296
296
move([0,-12,-12]) xrot(90) color("black") text3d("k=0.15", size=3, h = 0.01, anchor= CENTER);
297
297
}
298
298
299
299
right(0){
300
-
rounded_prism(rect(20), height=20, joint_top=10, joint_bot=10, joint_sides=10, k = 0.5);
300
+
rounded_prism(rect(20), height=20, joint_top=9.99, joint_bot=9.99, joint_sides=9.99, k = 0.5);
301
301
move([0,-12,-12]) xrot(90) color("black") text3d("k=0.5", size=3, h = 0.01, anchor= CENTER);
302
302
}
303
303
304
304
right(30){
305
-
rounded_prism(rect(20), height=20, joint_top=10, joint_bot=10, joint_sides=10, k = 0.75);
305
+
rounded_prism(rect(20), height=20, joint_top=9.99, joint_bot=9.99, joint_sides=9.99, k = 0.75);
306
306
move([0,-12,-12]) xrot(90) color("black") text3d("k=0.75", size=3, h = 0.01, anchor= CENTER);
307
307
}
308
308
```
@@ -330,15 +330,36 @@ right(30){
330
330
331
331
You can match the cicrular roundover of cuboid() by setting the joint values to the rounding used in cuboid() and setting the k value to 0.93:
332
332
333
-
```openscad-3D: Med
333
+
```openscad-3D: Med, VPR=[75,0,25], VPD=180
334
334
include <BOSL2/std.scad>
335
335
include <BOSL2/rounding.scad>
336
-
rounded_prism(rect(20), height=20,
337
-
joint_top=4, joint_bot=4, joint_sides=4, k = 0.93);
338
-
right(30)
336
+
left(15)
337
+
rounded_prism(rect(20), height=20, joint_top=4, joint_bot=4, joint_sides=4, k = 0.93);
338
+
right(15)
339
339
cuboid(20, rounding = 4, $fn = 72);
340
340
```
341
341
342
+
Unlike other cube-like objects, the rounded prism smoothness is not affected by the special variable $fn, but by the splinesteps argument. Splinesteps defaults to 16.
0 commit comments