omdl
v0.4
OpenSCAD Mechanical Design Library
|
Three dimensional geometric shapes. More...
Files | |
file | shapes3d.scad |
Three-dimensional basic shapes. | |
Functions | |
module | cone (r, h, d, vr, vr1, vr2) |
A cone. More... | |
module | cuboid (size, vr, center=false) |
A cuboid. More... | |
module | ellipsoid (size) |
An ellipsoid. More... | |
module | ellipsoid_s (size, a1=0, a2=0) |
A sector of an ellipsoid. More... | |
module | tetrahedron (r, center=false) |
A pyramid with trilateral base formed by four equilateral triangles. More... | |
module | pyramid_q (x, y, z, center=false) |
A pyramid with quadrilateral base. More... | |
module | star3d (size, n=5, half=false) |
A three dimensional star. More... | |
module | torus_rp (size, core, r, l, t, co, cr=0, vr, vr1, vr2, pa=0, ra=360, m=255, center=false, profile=false) |
A rectangular cross-sectional profile revolved about the z-axis. More... | |
module | torus_tp (vs, vc, r, l, co, cr=0, vr, vr1, vr2, pa=0, ra=360, m=255, centroid=false, incenter=false, profile=false,) |
A triangular cross-sectional profile revolved about the z-axis. More... | |
module | torus_ep (size, core, r, l, t, a1=0, a2=0, co, cr=0, pa=0, ra=360, m=255, profile=false) |
An elliptical cross-sectional profile revolved about the z-axis. More... | |
Three dimensional geometric shapes.
module cone | ( | r | , |
h | , | ||
d | , | ||
vr | , | ||
vr1 | , | ||
vr2 | |||
) |
A cone.
r | <decimal> The base radius. |
h | <decimal> The height. |
d | <decimal> The base diameter. |
vr | <decimal> The default corner rounding radius. |
vr1 | <decimal> The base corner rounding radius. |
vr2 | <decimal> The point corner rounding radius. |
Example
Definition at line 103 of file shapes3d.scad.
module cuboid | ( | size | , |
vr | , | ||
center | = false |
||
) |
A cuboid.
size | <vector|decimal> A vector [x, y, z] of decimals or a single decimal for (x=y=z). |
vr | <decimal> The corner rounding radius. |
center | <boolean> Center about origin. |
Example
Definition at line 150 of file shapes3d.scad.
module ellipsoid | ( | size | ) |
An ellipsoid.
size | <vector|decimal> A vector [w, h] of decimals or a single decimal for (w=h). |
Example
Definition at line 212 of file shapes3d.scad.
module ellipsoid_s | ( | size | , |
a1 | = 0 , |
||
a2 | = 0 |
||
) |
A sector of an ellipsoid.
size | <vector|decimal> A vector [w, h] of decimals or a single decimal for (w=h). |
a1 | <decimal> The start angle in degrees. |
a2 | <decimal> The stop angle in degrees. |
Example
Definition at line 244 of file shapes3d.scad.
module pyramid_q | ( | x | , |
y | , | ||
z | , | ||
center | = false |
||
) |
A pyramid with quadrilateral base.
x | <decimal> The base x-length. |
y | <decimal> The base y-length. |
z | <decimal> The z-height. |
center | <boolean> Center about origin. |
Example
Definition at line 348 of file shapes3d.scad.
module star3d | ( | size | , |
n | = 5 , |
||
half | = false |
||
) |
A three dimensional star.
size | <vector|decimal> A vector [l, w, h] of decimals or a single decimal for (size=l=2*w=4*h). |
n | <decimal> The number of points. |
half | <boolean> Render upper half only. |
Example
Definition at line 396 of file shapes3d.scad.
module tetrahedron | ( | r | , |
center | = false |
||
) |
A pyramid with trilateral base formed by four equilateral triangles.
r | <decimal> The face radius. |
center | <boolean> Center about origin. |
Example
Support vertex rounding radius.
Identify cause of missing face. Using hull() as a workaround.
Definition at line 303 of file shapes3d.scad.
module torus_ep | ( | size | , |
core | , | ||
r | , | ||
l | , | ||
t | , | ||
a1 | = 0 , |
||
a2 | = 0 , |
||
co | , | ||
cr | = 0 , |
||
pa | = 0 , |
||
ra | = 360 , |
||
m | = 255 , |
||
profile | = false |
||
) |
An elliptical cross-sectional profile revolved about the z-axis.
size | <vector|decimal> The profile size. A vector [x, y] of decimals or a single decimal for (x=y). |
core | <vector|decimal> The profile core. A vector [x, y] of decimals or a single decimal for (x=y). |
r | <decimal> The rotation radius. |
l | <vector|decimal> The elongation length. A vector [x, y] of decimals or a single decimal for (x=y) |
t | <vector|decimal> The profile thickness. A vector [x, y] of decimals or a single decimal for (x=y). |
a1 | <decimal> The profile start angle in degrees. |
a2 | <decimal> The profile stop angle in degrees. |
co | <vector> Core offset. A vector [x, y] of decimals. |
cr | <decimal> Core z-rotation. |
pa | <decimal> The profile pitch angle in degrees. |
ra | <decimal> The rotation sweep angle in degrees. |
m | <integer> The section render mode. An 8-bit encoded integer value that indicates the revolution sections to render. |
profile | <boolean> Show profile only (do not extrude). |
Thickness t
core = size - t
; when t
and size
are given. size = core + t
; when t
and core
are given.Example
Definition at line 617 of file shapes3d.scad.
module torus_rp | ( | size | , |
core | , | ||
r | , | ||
l | , | ||
t | , | ||
co | , | ||
cr | = 0 , |
||
vr | , | ||
vr1 | , | ||
vr2 | , | ||
pa | = 0 , |
||
ra | = 360 , |
||
m | = 255 , |
||
center | = false , |
||
profile | = false |
||
) |
A rectangular cross-sectional profile revolved about the z-axis.
size | <vector|decimal> The profile size. A vector [x, y] of decimals or a single decimal for (x=y). |
core | <vector|decimal> The profile core. A vector [x, y] of decimals or a single decimal for (x=y). |
r | <decimal> The rotation radius. |
l | <vector|decimal> The elongation length. A vector [x, y] of decimals or a single decimal for (x=y) |
t | <vector|decimal> The profile thickness. A vector [x, y] of decimals or a single decimal for (x=y). |
co | <vector> Core offset. A vector [x, y] of decimals. |
cr | <decimal> Core z-rotation. |
vr | <decimal> The profile default corner rounding radius. |
vr1 | <decimal> The profile outer corner rounding radius. |
vr2 | <decimal> The profile core corner rounding radius. |
vr | <vector|decimal> The profile default corner rounding radius. A vector [v1r, v2r, v3r, v4r] of decimals or a single decimal for (v1r=v2r=v3r=v4r). Unspecified corners are not rounded. |
vr1 | <vector|decimal> The profile outer corner rounding radius. A vector [v1r, v2r, v3r, v4r] of decimals or a single decimal for (v1r=v2r=v3r=v4r). Unspecified corners are not rounded. |
vr2 | <vector|decimal> The profile core corner rounding radius. A vector [v1r, v2r, v3r, v4r] of decimals or a single decimal for (v1r=v2r=v3r=v4r). Unspecified corners are not rounded. |
pa | <decimal> The profile pitch angle in degrees. |
ra | <decimal> The rotation sweep angle in degrees. |
m | <integer> The section render mode. An 8-bit encoded integer value that indicates the revolution sections to render. |
center | <boolean> Rotate about profile center. |
profile | <boolean> Show profile only (do not extrude). |
Thickness t
core = size - t
; when t
and size
are given. size = core + t
; when t
and core
are given.Example
Definition at line 481 of file shapes3d.scad.
module torus_tp | ( | vs | , |
vc | , | ||
r | , | ||
l | , | ||
co | , | ||
cr | = 0 , |
||
vr | , | ||
vr1 | , | ||
vr2 | , | ||
pa | = 0 , |
||
ra | = 360 , |
||
m | = 255 , |
||
centroid | = false , |
||
incenter | = false , |
||
profile | = false |
||
) |
A triangular cross-sectional profile revolved about the z-axis.
vs | <vector|decimal> The size. A vector [s1, s2, s3] of decimals or a single decimal for (s1=s2=s3). |
vc | <vector|decimal> The core. A vector [s1, s2, s3] of decimals or a single decimal for (s1=s2=s3). |
r | <decimal> The rotation radius. |
l | <vector|decimal> The elongation length. A vector [x, y] of decimals or a single decimal for (x=y) |
co | <vector> Core offset. A vector [x, y] of decimals. |
cr | <decimal> Core z-rotation. |
vr | <vector|decimal> The default vertex rounding radius. A vector [v1r, v2r, v3r] of decimals or a single decimal for (v1r=v2r=v3r). |
vr1 | <vector|decimal> The outer vertex rounding radius. A vector [v1r, v2r, v3r] of decimals or a single decimal for (v1r=v2r=v3r). |
vr2 | <vector|decimal> The core vertex rounding radius. A vector [v1r, v2r, v3r] of decimals or a single decimal for (v1r=v2r=v3r). |
pa | <decimal> The profile pitch angle in degrees. |
ra | <decimal> The rotation sweep angle in degrees. |
m | <integer> The section render mode. An 8-bit encoded integer value that indicates the revolution sections to render. |
centroid | <boolean> Rotate about profile centroid. |
incenter | <boolean> Rotate about profile incenter. |
profile | <boolean> Show profile only (do not extrude). |
Example
Definition at line 550 of file shapes3d.scad.