Thingiverse
OpenSCAD Rounded Cube Corners by Sembiance
by Thingiverse
Last crawled date: 4 years, 7 months ago
roundedCube() Allows you to round any edge of a cube in OpenSCAD
NOTE! I do not update thingiverse with new versions.
LATEST version can always be found here: https://github.com/Sembiance/common/tree/master/openscad
Usage
Prototype: roundedCube(dim, r, x, y, z, xcorners, ycorners, zcorners)
Arguments:
dim = Array of x,y,z numbers representing cube size
r = Radius of corners. Default: 1
x = Round the corners along the X axis of the cube. Default: false
y = Round the corners along the Y axis of the cube. Default: false
z = Round the corners along the Z axis of the cube. Default: true
xcorners = Array of 4 booleans, one for each X side of the cube, if true then round that side. Default: [true, true, true, true]
ycorners = Array of 4 booleans, one for each Y side of the cube, if true then round that side. Default: [true, true, true, true]
zcorners = Array of 4 booleans, one for each Z side of the cube, if true then round that side. Default: [true, true, true, true]
$fn = How smooth you want the rounding to be. Default: 128
Thanks to Sergio Vilches for the initial code inspiration
NOTE! I do not update thingiverse with new versions.
LATEST version can always be found here: https://github.com/Sembiance/common/tree/master/openscad
Usage
Prototype: roundedCube(dim, r, x, y, z, xcorners, ycorners, zcorners)
Arguments:
dim = Array of x,y,z numbers representing cube size
r = Radius of corners. Default: 1
x = Round the corners along the X axis of the cube. Default: false
y = Round the corners along the Y axis of the cube. Default: false
z = Round the corners along the Z axis of the cube. Default: true
xcorners = Array of 4 booleans, one for each X side of the cube, if true then round that side. Default: [true, true, true, true]
ycorners = Array of 4 booleans, one for each Y side of the cube, if true then round that side. Default: [true, true, true, true]
zcorners = Array of 4 booleans, one for each Z side of the cube, if true then round that side. Default: [true, true, true, true]
$fn = How smooth you want the rounding to be. Default: 128
Thanks to Sergio Vilches for the initial code inspiration
