omdl
v0.9.5
OpenSCAD Mechanical Design Library
|
Select 2D shapes revolved about the z-axis. More...
Files | |
file | revolved.scad |
Select 2D shapes revolved about the z-axis. | |
Functions | |
module | torus_rectangle_c (r, pa=0, ra=360, l, m=255, size, core, t, co, cr=0, vr, vr1, vr2, vrm=0, vrm1, vrm2, center=false) |
A rectangular cross-sectional profile revolved about the z-axis. More... | |
module | torus_ellipse_cs (r, pa=0, ra=360, l, m=255, size, core, t, a1=0, a2=0, co, cr=0) |
An elliptical cross-sectional profile revolved about the z-axis. More... | |
module | torus_pg_trapezoid (r, pa=0, ra=360, l, m=255, b=1, h, sl=1, a=90, vr, vrm=1, vfn, center=false) |
A trapezoidal cross-sectional profile revolved about the z-axis. More... | |
Select 2D shapes revolved about the z-axis.
Requires: |
---|
include <omdl-base.scad>; |
include <shapes/revolved.scad>; |
I | II | III |
---|---|---|
module torus_ellipse_cs | ( | r | , |
pa | = 0 , |
||
ra | = 360 , |
||
l | , | ||
m | = 255 , |
||
size | , | ||
core | , | ||
t | , | ||
a1 | = 0 , |
||
a2 | = 0 , |
||
co | , | ||
cr | = 0 |
||
) |
An elliptical cross-sectional profile revolved about the z-axis.
Translate, rotate, and revolve a 2d shape about the z-axis with linear elongation.
r | <decimal> The rotation radius. |
pa | <decimal> The profile pitch angle in degrees. |
ra | <decimal> The rotation sweep angle in degrees. |
Object example
l | <decimal-list-2 | decimal> The elongation length. A list [x, y] of decimals or a single decimal for (x=y) |
m | <integer> The section render mode. An 8-bit encoded integer that indicates the revolution sections to render. Bit values 1 enables the corresponding section and bit values 0 are disabled. Sections are assigned to the bit position in counter-clockwise order. |
When the parameter l
is not specified, the shape profile is revolved using extrude_rotate_tr(). When the parameter l
is specified, the shape profile may be linearly extruded along the the x-axis and y-axis, with the linear extrusion lengths specified by l
, and is revolved 90 degrees to transition between the axes. In this mode, the parameter ra
is defined to be 90 for all corners and the parameter m
controls which of the eight path sections to render during the 360 degree revolution.
Object example
A 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). |
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. |
Thickness t
core = size - t
; when t
and size
are given. size = core + t
; when t
and core
are given.Object example
Object example
Definition at line 505 of file revolved.scad.
module torus_pg_trapezoid | ( | r | , |
pa | = 0 , |
||
ra | = 360 , |
||
l | , | ||
m | = 255 , |
||
b | = 1 , |
||
h | , | ||
sl | = 1 , |
||
a | = 90 , |
||
vr | , | ||
vrm | = 1 , |
||
vfn | , | ||
center | = false |
||
) |
A trapezoidal cross-sectional profile revolved about the z-axis.
Translate, rotate, and revolve a 2d shape about the z-axis with linear elongation.
r | <decimal> The rotation radius. |
pa | <decimal> The profile pitch angle in degrees. |
ra | <decimal> The rotation sweep angle in degrees. |
Object example
l | <decimal-list-2 | decimal> The elongation length. A list [x, y] of decimals or a single decimal for (x=y) |
m | <integer> The section render mode. An 8-bit encoded integer that indicates the revolution sections to render. Bit values 1 enables the corresponding section and bit values 0 are disabled. Sections are assigned to the bit position in counter-clockwise order. |
When the parameter l
is not specified, the shape profile is revolved using extrude_rotate_tr(). When the parameter l
is specified, the shape profile may be linearly extruded along the the x-axis and y-axis, with the linear extrusion lengths specified by l
, and is revolved 90 degrees to transition between the axes. In this mode, the parameter ra
is defined to be 90 for all corners and the parameter m
controls which of the eight path sections to render during the 360 degree revolution.
Object example
A polygon trapezoid with individual vertex rounding and arc facets.
b | <decimal-list-2 | decimal> The base lengths. A list [b1, b2] of 2 decimals or a single decimal for (b1=b2). |
h | <decimal> The perpendicular height between bases. |
l | <decimal> The left side leg length. |
a | <decimal> The angle between the lower base and left leg. |
o | <point-2d> The origin offset coordinate [x, y]. |
cw | <boolean> Polygon vertex ordering. |
When both h
and l
are specified, h
has precedence. The function generates parallelograms, rectangles, and squares with the appropriate parameter assignments. See Wikipedia for more general information on trapezoids.
vr | <decimal-list-4 | decimal> The vertices rounding radius. |
vrm | <integer-list-4 | integer> The vertices rounding mode. |
vfn | <integer-list-4> The vertices arc fragment number. |
center | <boolean> Center origin at trapezoid centroid. |
Each vertex may be assigned an individual rounding radius, rounding mode, and facet number as described in polygon_round_eve_all_p by using the parameters: vr
, vrm
, and vfn
. When vr
is undefined, no rounding is performed on the polygon vertices.
Object example
sl | <decimal> The left side leg length of the trapezoid polygon l . |
Object example
Definition at line 549 of file revolved.scad.
module torus_rectangle_c | ( | r | , |
pa | = 0 , |
||
ra | = 360 , |
||
l | , | ||
m | = 255 , |
||
size | , | ||
core | , | ||
t | , | ||
co | , | ||
cr | = 0 , |
||
vr | , | ||
vr1 | , | ||
vr2 | , | ||
vrm | = 0 , |
||
vrm1 | , | ||
vrm2 | , | ||
center | = false |
||
) |
A rectangular cross-sectional profile revolved about the z-axis.
Translate, rotate, and revolve a 2d shape about the z-axis with linear elongation.
r | <decimal> The rotation radius. |
pa | <decimal> The profile pitch angle in degrees. |
ra | <decimal> The rotation sweep angle in degrees. |
Object example
l | <decimal-list-2 | decimal> The elongation length. A list [x, y] of decimals or a single decimal for (x=y) |
m | <integer> The section render mode. An 8-bit encoded integer that indicates the revolution sections to render. Bit values 1 enables the corresponding section and bit values 0 are disabled. Sections are assigned to the bit position in counter-clockwise order. |
When the parameter l
is not specified, the shape profile is revolved using extrude_rotate_tr(). When the parameter l
is specified, the shape profile may be linearly extruded along the the x-axis and y-axis, with the linear extrusion lengths specified by l
, and is revolved 90 degrees to transition between the axes. In this mode, the parameter ra
is defined to be 90 for all corners and the parameter m
controls which of the eight path sections to render during the 360 degree revolution.
Object example
A 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). |
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 round and 1 for chamfer. |
vrm1 | <integer> The outer corner radius mode. |
vrm2 | <integer> The core corner radius mode. |
center | <boolean> Center about origin. |
Thickness t
core = size - t
; when t
and size
are given. size = core + t
; when t
and core
are given.Object example
Object example
Definition at line 457 of file revolved.scad.