mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Update Rounding the Cube.md
This commit is contained in:
parent
bf6d366d87
commit
e19744da70
1 changed files with 22 additions and 1 deletions
|
@ -140,7 +140,7 @@ prismoid(100, 80, rounding1=[0,50,0,50], rounding2=[40,0,40,0], h=50);
|
|||
|
||||
|
||||
##Masking Edges of the Cuboid, Cube and Prismoid
|
||||
###2D Edge Masking with [edge_profile()](https://github.com/BelfrySCAD/BOSL2/wiki/attachments.scad#module-edge_profile)
|
||||
###2D Edge Masking with [edge_profile()](https://github.com/BelfrySCAD/BOSL2/wiki/attachments.scad#module-edge_profile) and [edge_profile_asym()](https://github.com/BelfrySCAD/BOSL2/wiki/attachments.scad#module-edge_profile_asym)
|
||||
|
||||
One limitation of using rounding arguments in [cuboid()](https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#module-cuboid) is that all the rounded edges must have the same rounding radius. Using masking we have the flexibility to apply different edge treatments to the same cube. Masking can also be used on the [cube()](https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#functionmodule-cube) and [prismoid()](https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#functionmodule-prismoid) shapes.
|
||||
|
||||
|
@ -156,6 +156,27 @@ diff()
|
|||
mask2d_roundover(r=10);
|
||||
```
|
||||
|
||||
We could also fillet the bottom of the cube using [edge_profile_asym()](https://github.com/BelfrySCAD/BOSL2/wiki/attachments.scad#module-edge_profile_asym) and [xflip()](https://github.com/BelfrySCAD/BOSL2/wiki/transforms.scad#functionmodule-xflip)
|
||||
|
||||
```openscad-3D
|
||||
include<BOSL2/std.scad>
|
||||
cuboid(50)
|
||||
edge_profile_asym(BOT, corner_type="round")
|
||||
xflip() mask2d_roundover(10);
|
||||
```
|
||||
|
||||
The flip argumet in [edge_profile_asym()](https://github.com/BelfrySCAD/BOSL2/wiki/attachments.scad#module-edge_profile_asym) determines whether the fillet flares out or up. The corner_type argument is used to shape the corners of external fillets.
|
||||
|
||||
```openscad-3D
|
||||
include<BOSL2/std.scad>
|
||||
cuboid(50){
|
||||
edge_profile_asym(TOP, flip = true)
|
||||
xflip() mask2d_roundover(10);
|
||||
edge_profile_asym(BOT, corner_type="round")
|
||||
xflip() mask2d_roundover(10);
|
||||
}
|
||||
```
|
||||
|
||||
See [mask2d_roundover()](https://github.com/BelfrySCAD/BOSL2/wiki/masks2d.scad#functionmodule-mask2d_roundover) for additional mask parameters. Here we use the *inset* parameter in mask2d_roundover:
|
||||
|
||||
```openscad-3D
|
||||
|
|
Loading…
Reference in a new issue