omdl
v0.6.1
OpenSCAD Mechanical Design Library
|
Extruded two-dimensional geometric shapes. More...
Files | |
file | shapes2de.scad |
Linearly extruded two-dimensional basic shapes. | |
Functions | |
module | erectangle (size, h, vr, vrm=0, center=false) |
An extruded rectangle with edge, fillet, and/or chamfer corners. More... | |
module | erectangle_c (size, core, h, t, co, cr=0, vr, vr1, vr2, vrm=0, vrm1, vrm2, center=false) |
An extruded rectangle with a removed rectangular core. More... | |
module | erhombus (size, h, vr, center=false) |
An extruded rhombus. More... | |
module | etriangle_ppp (v1, v2, v3, h, vr, v1r, v2r, v3r, centroid=false, incenter=false, center=false) |
An extruded general triangle specified by three vertices. More... | |
module | etriangle_lp (v, h, vr, centroid=false, incenter=false, center=false) |
An extruded general triangle specified by a list of its three vertices. More... | |
module | etriangle_sss (s1, s2, s3, h, vr, v1r, v2r, v3r, centroid=false, incenter=false, center=false) |
An extruded general triangle specified by its three side lengths. More... | |
module | etriangle_ls (v, h, vr, centroid=false, incenter=false, center=false) |
An extruded general triangle specified by a list of its three side lengths. More... | |
module | etriangle_ls_c (vs, vc, h, co, cr=0, vr, vr1, vr2, centroid=false, incenter=false, center=false) |
A general triangle specified by its sides with a removed triangular core. More... | |
module | etriangle_sas (s1, a, s2, h, x=1, vr, v1r, v2r, v3r, centroid=false, incenter=false, center=false) |
An extruded general triangle specified by two sides and the included angle. More... | |
module | etriangle_asa (a1, s, a2, h, x=1, vr, v1r, v2r, v3r, centroid=false, incenter=false, center=false) |
An extruded general triangle specified by a side and two adjacent angles. More... | |
module | etriangle_aas (a1, a2, s, h, x=1, vr, v1r, v2r, v3r, centroid=false, incenter=false, center=false) |
An extruded general triangle specified by a side, one adjacent angle and the opposite angle. More... | |
module | etriangle_ss (x, y, h, vr, v1r, v2r, v3r, centroid=false, incenter=false, center=false) |
An extruded right-angled triangle specified by its opposite and adjacent side lengths. More... | |
module | etriangle_sa (x, y, aa, oa, h, vr, v1r, v2r, v3r, centroid=false, incenter=false, center=false) |
An extruded right-angled triangle specified by a side length and an angle. More... | |
module | engon (n, r, h, vr, center=false) |
An extruded n-sided equiangular/equilateral regular polygon. More... | |
module | eellipse (size, h, center=false) |
An extruded ellipse. More... | |
module | eellipse_c (size, core, h, t, co, cr=0, center=false) |
An extruded ellipse with a removed elliptical core. More... | |
module | eellipse_s (size, h, a1=0, a2=0, center=false) |
An extruded ellipse sector. More... | |
module | eellipse_cs (size, core, h, t, a1=0, a2=0, co, cr=0, center=false) |
An extruded sector of an ellipse with a removed elliptical core. More... | |
module | estar2d (size, h, n=5, vr, center=false) |
An extruded two-dimensional star. More... | |
Extruded two-dimensional geometric shapes.
module eellipse | ( | size | , |
h | , | ||
center | = false |
||
) |
An extruded ellipse.
size | <decimal-list-2|decimal> A list [rx, ry] of decimals or a single decimal for (rx=ry). |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
center | <boolean> Center about origin. |
h
.Example
Definition at line 777 of file shapes2de.scad.
module eellipse_c | ( | size | , |
core | , | ||
h | , | ||
t | , | ||
co | , | ||
cr | = 0 , |
||
center | = false |
||
) |
An extruded ellipse with a removed elliptical core.
size | <decimal-list-2|decimal> A list [rx, ry] of decimals or a single decimal for (rx=ry). |
core | <decimal-list-2|decimal> A list [rx, ry] of decimals or a single decimal for (rx=ry). |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
t | <decimal-list-2|decimal> A list [x, y] of decimals or a single decimal for (x=y). |
co | <decimal-list-2> Core offset. A list [x, y] of decimals. |
cr | <decimal> Core z-rotation. |
center | <boolean> Center about origin. |
h
.Thickness t
core = size - t
; when t
and size
are given. size = core + t
; when t
and core
are given.Example
Definition at line 817 of file shapes2de.scad.
module eellipse_cs | ( | size | , |
core | , | ||
h | , | ||
t | , | ||
a1 | = 0 , |
||
a2 | = 0 , |
||
co | , | ||
cr | = 0 , |
||
center | = false |
||
) |
An extruded sector of an ellipse with a removed elliptical core.
size | <decimal-list-2|decimal> A list [rx, ry] of decimals or a single decimal for (rx=ry). |
core | <decimal-list-2|decimal> A list [rx, ry] of decimals or a single decimal for (rx=ry). |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
t | <decimal-list-2|decimal> A list [x, y] of decimals or a single decimal for (x=y). |
a1 | <decimal> The start angle in degrees. |
a2 | <decimal> The stop angle in degrees. |
co | <decimal-list-2> Core offset. A list [x, y] of decimals. |
cr | <decimal> Core z-rotation. |
center | <boolean> Center about origin. |
h
.Thickness t
core = size - t
; when t
and size
are given. size = core + t
; when t
and core
are given.Example
Definition at line 897 of file shapes2de.scad.
module eellipse_s | ( | size | , |
h | , | ||
a1 | = 0 , |
||
a2 | = 0 , |
||
center | = false |
||
) |
An extruded ellipse sector.
size | <decimal-list-2|decimal> A list [rx, ry] of decimals or a single decimal for (rx=ry). |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
a1 | <decimal> The start angle in degrees. |
a2 | <decimal> The stop angle in degrees. |
center | <boolean> Center about origin. |
h
.Example
Definition at line 852 of file shapes2de.scad.
module engon | ( | n | , |
r | , | ||
h | , | ||
vr | , | ||
center | = false |
||
) |
An extruded n-sided equiangular/equilateral regular polygon.
n | <decimal> The number of sides. |
r | <decimal> The ngon vertex radius. |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
vr | <decimal> The vertex rounding radius. |
center | <boolean> Center about origin. |
h
.Example
See Wikipedia for more information.
Definition at line 747 of file shapes2de.scad.
module erectangle | ( | size | , |
h | , | ||
vr | , | ||
vrm | = 0 , |
||
center | = false |
||
) |
An extruded rectangle with edge, fillet, and/or chamfer corners.
size | <decimal-list-2|decimal> A list [x, y] of decimals or a single decimal for (x=y). |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
vr | <decimal-list-4|decimal> The corner rounding radius. A list [v1r, v2r, v3r, v4r] of decimals or a single decimal for (v1r=v2r=v3r=v4r). Unspecified corners are not rounded. |
vrm | <integer> The corner radius mode. A 4-bit encoded integer that indicates each corner finish. Use bit value 0 for fillet and 1 for chamfer. |
center | <boolean> Center about origin. |
h
.Example
Definition at line 114 of file shapes2de.scad.
module erectangle_c | ( | size | , |
core | , | ||
h | , | ||
t | , | ||
co | , | ||
cr | = 0 , |
||
vr | , | ||
vr1 | , | ||
vr2 | , | ||
vrm | = 0 , |
||
vrm1 | , | ||
vrm2 | , | ||
center | = false |
||
) |
An extruded rectangle with a removed rectangular core.
size | <decimal-list-2|decimal> A list [x, y] of decimals or a single decimal for (x=y). |
core | <decimal-list-2|decimal> A list [x, y] of decimals or a single decimal for (x=y). |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
t | <decimal-list-2|decimal> A list [x, y] of decimals or a single decimal for (x=y). |
co | <decimal-list-2> Core offset. A list [x, y] of decimals. |
cr | <decimal> Core z-rotation. |
vr | <decimal-list-4|decimal> The default corner rounding radius. A list [v1r, v2r, v3r, v4r] of decimals or a single decimal for (v1r=v2r=v3r=v4r). Unspecified corners are not rounded. |
vr1 | <decimal-list-4|decimal> The outer corner rounding radius. |
vr2 | <decimal-list-4|decimal> The core corner rounding radius. |
vrm | <integer> The default corner radius mode. A 4-bit encoded integer that indicates each corner finish. Use bit value 0 for fillet and 1 for chamfer. |
vrm1 | <integer> The outer corner radius mode. |
vrm2 | <integer> The core corner radius mode. |
center | <boolean> Center about origin. |
h
.Thickness t
core = size - t
; when t
and size
are given. size = core + t
; when t
and core
are given.Example
Definition at line 168 of file shapes2de.scad.
module erhombus | ( | size | , |
h | , | ||
vr | , | ||
center | = false |
||
) |
An extruded rhombus.
size | <decimal-list-2|decimal> A list [w, h] of decimals or a single decimal for (w=h). |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
vr | <decimal-list-4|decimal> The corner rounding radius. A list [v1r, v2r, v3r, v4r] of decimals or a single decimal for (v1r=v2r=v3r=v4r). Unspecified corners are not rounded. |
center | <boolean> Center about origin. |
h
.Example
Definition at line 217 of file shapes2de.scad.
module estar2d | ( | size | , |
h | , | ||
n | = 5 , |
||
vr | , | ||
center | = false |
||
) |
An extruded two-dimensional star.
size | <decimal-list-2|decimal> A list [l, w] of decimals or a single decimal for (size=l=2*w). |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
n | <decimal> The number of points. |
vr | <decimal-list-3|decimal> The vertex rounding radius. A list [v1r, v2r, v3r] of decimals or a single decimal for (v1r=v2r=v3r). |
center | <boolean> Center about origin. |
h
.Example
Definition at line 937 of file shapes2de.scad.
module etriangle_aas | ( | a1 | , |
a2 | , | ||
s | , | ||
h | , | ||
x | = 1 , |
||
vr | , | ||
v1r | , | ||
v2r | , | ||
v3r | , | ||
centroid | = false , |
||
incenter | = false , |
||
center | = false |
||
) |
An extruded general triangle specified by a side, one adjacent angle and the opposite angle.
a1 | <decimal> The opposite angle 1 in degrees. |
a2 | <decimal> The adjacent angle 2 in degrees. |
s | <decimal> The side length. |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
x | <decimal> The side to draw on the positive x-axis (x=1 for s ). |
vr | <decimal> The default vertex rounding radius. |
v1r | <decimal> Vertex 1 rounding radius. |
v2r | <decimal> Vertex 2 rounding radius. |
v3r | <decimal> Vertex 3 rounding radius. |
centroid | <boolean> Center centroid at origin. |
incenter | <boolean> Center incenter at origin. |
center | <boolean> Center about origin. |
h
.Example
Definition at line 599 of file shapes2de.scad.
module etriangle_asa | ( | a1 | , |
s | , | ||
a2 | , | ||
h | , | ||
x | = 1 , |
||
vr | , | ||
v1r | , | ||
v2r | , | ||
v3r | , | ||
centroid | = false , |
||
incenter | = false , |
||
center | = false |
||
) |
An extruded general triangle specified by a side and two adjacent angles.
a1 | <decimal> The adjacent angle 1 in degrees. |
s | <decimal> The side length adjacent to the angles. |
a2 | <decimal> The adjacent angle 2 in degrees. |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
x | <decimal> The side to draw on the positive x-axis (x=1 for s ). |
vr | <decimal> The default vertex rounding radius. |
v1r | <decimal> Vertex 1 rounding radius. |
v2r | <decimal> Vertex 2 rounding radius. |
v3r | <decimal> Vertex 3 rounding radius. |
centroid | <boolean> Center centroid at origin. |
incenter | <boolean> Center incenter at origin. |
center | <boolean> Center about origin. |
h
.Example
Definition at line 546 of file shapes2de.scad.
module etriangle_lp | ( | v | , |
h | , | ||
vr | , | ||
centroid | = false , |
||
incenter | = false , |
||
center | = false |
||
) |
An extruded general triangle specified by a list of its three vertices.
v | <point-2d-list-3> A list [v1, v2, v3] of points [x, y]. |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
vr | <decimal-list-3|decimal> The vertex rounding radius. A list [v1r, v2r, v3r] of decimals or a single decimal for (v1r=v2r=v3r). |
centroid | <boolean> Center centroid at origin. |
incenter | <boolean> Center incenter at origin. |
center | <boolean> Center about origin. |
h
.Example
Definition at line 304 of file shapes2de.scad.
module etriangle_ls | ( | v | , |
h | , | ||
vr | , | ||
centroid | = false , |
||
incenter | = false , |
||
center | = false |
||
) |
An extruded general triangle specified by a list of its three side lengths.
v | <decimal-list-3> A list [s1, s2, s3] of decimals. |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
vr | <decimal-list-3|decimal> The vertex rounding radius. A list [v1r, v2r, v3r] of decimals or a single decimal for (v1r=v2r=v3r). |
centroid | <boolean> Center centroid at origin. |
incenter | <boolean> Center incenter at origin. |
center | <boolean> Center about origin. |
h
.Example
Definition at line 393 of file shapes2de.scad.
module etriangle_ls_c | ( | vs | , |
vc | , | ||
h | , | ||
co | , | ||
cr | = 0 , |
||
vr | , | ||
vr1 | , | ||
vr2 | , | ||
centroid | = false , |
||
incenter | = false , |
||
center | = false |
||
) |
A general triangle specified by its sides with a removed triangular core.
vs | <decimal-list-3|decimal> The size. A list [s1, s2, s3] of decimals or a single decimal for (s1=s2=s3). |
vc | <decimal-list-3|decimal> The core. A list [s1, s2, s3] of decimals or a single decimal for (s1=s2=s3). |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
co | <decimal-list-2> Core offset. A list [x, y] of decimals. |
cr | <decimal> Core z-rotation. |
vr | <decimal-list-3|decimal> The default vertex rounding radius. A list [v1r, v2r, v3r] of decimals or a single decimal for (v1r=v2r=v3r). |
vr1 | <decimal-list-3|decimal> The outer vertex rounding radius. |
vr2 | <decimal-list-3|decimal> The core vertex rounding radius. |
centroid | <boolean> Center centroid at origin. |
incenter | <boolean> Center incenter at origin. |
center | <boolean> Center about origin. |
h
.Example
Definition at line 440 of file shapes2de.scad.
module etriangle_ppp | ( | v1 | , |
v2 | , | ||
v3 | , | ||
h | , | ||
vr | , | ||
v1r | , | ||
v2r | , | ||
v3r | , | ||
centroid | = false , |
||
incenter | = false , |
||
center | = false |
||
) |
An extruded general triangle specified by three vertices.
v1 | <point-2d> A point [x, y] for vertex 1. |
v2 | <point-2d> A point [x, y] for vertex 2. |
v3 | <point-2d> A point [x, y] for vertex 3. |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
vr | <decimal> The default vertex rounding radius. |
v1r | <decimal> Vertex 1 rounding radius. |
v2r | <decimal> Vertex 2 rounding radius. |
v3r | <decimal> Vertex 3 rounding radius. |
centroid | <boolean> Center centroid at origin. |
incenter | <boolean> Center incenter at origin. |
center | <boolean> Center about origin. |
h
.Example
Definition at line 254 of file shapes2de.scad.
module etriangle_sa | ( | x | , |
y | , | ||
aa | , | ||
oa | , | ||
h | , | ||
vr | , | ||
v1r | , | ||
v2r | , | ||
v3r | , | ||
centroid | = false , |
||
incenter | = false , |
||
center | = false |
||
) |
An extruded right-angled triangle specified by a side length and an angle.
x | <decimal> The length of the side along the x-axis. |
y | <decimal> The length of the side along the y-axis. |
aa | <decimal> The adjacent angle in degrees. |
oa | <decimal> The opposite angle in degrees. |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
vr | <decimal> The default vertex rounding radius. |
v1r | <decimal> Vertex 1 rounding radius. |
v2r | <decimal> Vertex 2 rounding radius. |
v3r | <decimal> Vertex 3 rounding radius. |
centroid | <boolean> Center centroid at origin. |
incenter | <boolean> Center incenter at origin. |
center | <boolean> Center about origin. |
h
.Example
x
and y
are given, both triangles are rendered. aa
and oa
are given, aa
is used. Definition at line 700 of file shapes2de.scad.
module etriangle_sas | ( | s1 | , |
a | , | ||
s2 | , | ||
h | , | ||
x | = 1 , |
||
vr | , | ||
v1r | , | ||
v2r | , | ||
v3r | , | ||
centroid | = false , |
||
incenter | = false , |
||
center | = false |
||
) |
An extruded general triangle specified by two sides and the included angle.
s1 | <decimal> The length of the side 1. |
a | <decimal> The included angle in degrees. |
s2 | <decimal> The length of the side 2. |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
x | <decimal> The side to draw on the positive x-axis (x=1 for s1 ). |
vr | <decimal> The default vertex rounding radius. |
v1r | <decimal> Vertex 1 rounding radius. |
v2r | <decimal> Vertex 2 rounding radius. |
v3r | <decimal> Vertex 3 rounding radius. |
centroid | <boolean> Center centroid at origin. |
incenter | <boolean> Center incenter at origin. |
center | <boolean> Center about origin. |
h
.Example
Definition at line 493 of file shapes2de.scad.
module etriangle_ss | ( | x | , |
y | , | ||
h | , | ||
vr | , | ||
v1r | , | ||
v2r | , | ||
v3r | , | ||
centroid | = false , |
||
incenter | = false , |
||
center | = false |
||
) |
An extruded right-angled triangle specified by its opposite and adjacent side lengths.
x | <decimal> The length of the side along the x-axis. |
y | <decimal> The length of the side along the y-axis. |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
vr | <decimal> The default vertex rounding radius. |
v1r | <decimal> Vertex 1 rounding radius. |
v2r | <decimal> Vertex 2 rounding radius. |
v3r | <decimal> Vertex 3 rounding radius. |
centroid | <boolean> Center centroid at origin. |
incenter | <boolean> Center incenter at origin. |
center | <boolean> Center about origin. |
h
.Example
Definition at line 648 of file shapes2de.scad.
module etriangle_sss | ( | s1 | , |
s2 | , | ||
s3 | , | ||
h | , | ||
vr | , | ||
v1r | , | ||
v2r | , | ||
v3r | , | ||
centroid | = false , |
||
incenter | = false , |
||
center | = false |
||
) |
An extruded general triangle specified by its three side lengths.
s1 | <decimal> The length of the side 1 (along the x-axis). |
s2 | <decimal> The length of the side 2. |
s3 | <decimal> The length of the side 3. |
h | <decimal-list-3:9|decimal> A list of decimals or a single decimal to specify simple extrusion height. |
vr | <decimal> The default vertex rounding radius. |
v1r | <decimal> Vertex 1 rounding radius. |
v2r | <decimal> Vertex 2 rounding radius. |
v3r | <decimal> Vertex 3 rounding radius. |
centroid | <boolean> Center centroid at origin. |
incenter | <boolean> Center incenter at origin. |
center | <boolean> Center about origin. |
h
.Example
Definition at line 343 of file shapes2de.scad.