Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Squircle and rounded cube openScad modules

Modules for OpenScad that draw a parallelepiped with rounded edges. In other words, these are analogs of the OpenScad "cube" function, only with rounding. Two modules are presented:

  • The usual "roundedCube", which rounds the corners of the rectangle lying at the base of the parallelepiped using circles.
  • The more modern "squircleCube", where a "squircle" is used instead of a rectangle at the base of the parallelepiped.

A "squircle" is a special shape, which produced by curve that follows the equation

$$ \left| \frac{x}{a} \right|^n+\left| \frac{y}{b} \right|^n=1 $$

Where a is the length along the X axis, b is the length along the Y axis, n is the parameter responsible for the power of rounding. More details about the squircle shape can be found in Wikipedia.
In short, the use of such curves gives a smoother rounding of the corners of the rectangle without sharp transitions. And it is convenient to adjust the power of rounding by changing the parameter n. Then greater the n - then less the power of rounding. For example, for n = 2 - there will be an ellipse.

About

Modules for OpenScad that draw a parallelepiped with rounded edges

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages