omdl  v0.9.5
OpenSCAD Mechanical Design Library
Revolutions

Select 2D shapes revolved about the z-axis. More...

+ Collaboration diagram for Revolutions:

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...
 

Detailed Description

Select 2D shapes revolved about the z-axis.

Requires:
include <omdl-base.scad>;
include <shapes/revolved.scad>;
Revolutions
IIIIII
torus_ellipse_cs()
torus_pg_trapezoid()
torus_rectangle_c()

Function Documentation

◆ torus_ellipse_cs()

module torus_ellipse_cs ( ,
pa  = 0,
ra  = 360,
,
= 255,
size  ,
core  ,
,
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.

Parameters
r<decimal> The rotation radius.
pa<decimal> The profile pitch angle in degrees.
ra<decimal> The rotation sweep angle in degrees.

Object example

extrude_rotate_tr( r=50, pa=45, ra=270 ) square( [10,5], center=true );
module extrude_rotate_tr(r, pa=0, ra=360)
Translate, rotate, and revolve a 2d shape about the z-axis.
Definition: extrude.scad:457
extrude_rotate_tr
Parameters
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

extrude_rotate_trl( r=25, l=[5, 50], pa=45, m=31 ) square( [10,5], center=true );
module extrude_rotate_trl(r, pa=0, ra=360, l, m=255)
Translate, rotate, and revolve a 2d shape about the z-axis with linear elongation.
Definition: extrude.scad:562
extrude_rotate_trl

A sector of an ellipse with a removed elliptical core.

Parameters
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

ellipse_cs( size=[25,40], t=[10,5], a1=90, a2=180, co=[10,0], cr=45);
module ellipse_cs(size, core, t, a1=0, a2=0, co, cr=0)
A sector of an ellipse with a removed elliptical core.
Definition: basic_2d.scad:961
ellipse_cs

Object example

torus_ellipse_cs( size=[20,15], t=[2,4], r=50, a1=0, a2=180, pa=90, ra=270, co=[0,2] );
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.
Definition: revolved.scad:506
torus_ellipse_cs

Definition at line 505 of file revolved.scad.

+ Here is the call graph for this function:

◆ torus_pg_trapezoid()

module torus_pg_trapezoid ( ,
pa  = 0,
ra  = 360,
,
= 255,
= 1,
,
sl  = 1,
= 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.

Parameters
r<decimal> The rotation radius.
pa<decimal> The profile pitch angle in degrees.
ra<decimal> The rotation sweep angle in degrees.

Object example

extrude_rotate_tr( r=50, pa=45, ra=270 ) square( [10,5], center=true );
extrude_rotate_tr
Parameters
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

extrude_rotate_trl( r=25, l=[5, 50], pa=45, m=31 ) square( [10,5], center=true );
extrude_rotate_trl

A polygon trapezoid with individual vertex rounding and arc facets.

Parameters
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.
Returns
<coords-2d> A list of coordinates points [[x, y], ...].

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.

Parameters
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

pg_trapezoid( b=[50,20], l=25, a=45, vr=2, center=true);
module pg_trapezoid(b=1, h, l=1, a=90, o=origin2d, vr, vrm=1, vfn, center=false)
A polygon trapezoid with individual vertex rounding and arc facets.
Definition: polygon.scad:710
pg_trapezoid
Parameters
sl<decimal> The left side leg length of the trapezoid polygon l.

Object example

torus_pg_trapezoid( b=[20,30], sl=30, a=45, vr=[5,5,5,5], vrm=[3,2,1,4], r=40, l=[90,60], m=63, center=true );
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.
Definition: revolved.scad:550
torus_pg_trapezoid

Definition at line 549 of file revolved.scad.

+ Here is the call graph for this function:

◆ torus_rectangle_c()

module torus_rectangle_c ( ,
pa  = 0,
ra  = 360,
,
= 255,
size  ,
core  ,
,
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.

Parameters
r<decimal> The rotation radius.
pa<decimal> The profile pitch angle in degrees.
ra<decimal> The rotation sweep angle in degrees.

Object example

extrude_rotate_tr( r=50, pa=45, ra=270 ) square( [10,5], center=true );
extrude_rotate_tr
Parameters
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

extrude_rotate_trl( r=25, l=[5, 50], pa=45, m=31 ) square( [10,5], center=true );
extrude_rotate_trl

A rectangle with a removed rectangular core.

Parameters
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

rectangle_c( size=[40,25], t=[15,5], vr1=[0,0,10,10], vr2=2.5, vrm2=3, co=[0,5], center=true );
module rectangle_c(size, core, t, co, cr=0, vr, vr1, vr2, vrm=0, vrm1, vrm2, center=false)
A rectangle with a removed rectangular core.
Definition: basic_2d.scad:595
rectangle_c

Object example

torus_rectangle_c( size=[40,20], core=[35,20], r=40, l=[90,60], co=[0,2.5], vr=4, vrm=15, m=63, center=true );
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.
Definition: revolved.scad:458
torus_rectangle_c

Definition at line 457 of file revolved.scad.

+ Here is the call graph for this function: