omdl  v1.0
OpenSCAD Mechanical Design Library
Common 3d

Common 3D shapes. More...

+ Collaboration diagram for Common 3d:

Files

file  common_3d.scad
 Common 3D shapes.
 

Functions and/or Modules

module cone (size=1, vr, center=false)
 A cone. More...
 
module cuboid (size=1, vr, vrm=0, center=false)
 A cuboid with edge, round, or chamfer corners. More...
 
module ellipsoid (size=1, center=false)
 An ellipsoid. More...
 
module ellipsoid_s (size=1, a1=0, a2=0, center=false)
 A sector of an ellipsoid. More...
 
module pyramid_t (size=1, center=false)
 A pyramid with trilateral base formed by four equilateral triangles. More...
 
module pyramid_q (size=1, center=false)
 A pyramid with quadrilateral base. More...
 
module star3d (size=1, n=5, half=false, center=false)
 A three-dimensional star. More...
 

Usage Details

Common 3D shapes.

Requires:
include <omdl-base.scad>;
Common 3d
IIIIII
cone()
cuboid()
ellipsoid()
IVVVI
ellipsoid_s()
pyramid_q()
pyramid_t()
VII
star3d()

Function and/or Module Documentation

◆ cone()

module cone ( size  = 1,
vr  ,
center  = false 
)

A cone.

Parameters
size<decimal-list-2 | decimal> A list [r, h] of decimals or a single decimal for (r=h).
vr<decimal-list-2 | decimal> A list [rb, rp] of decimals or a single decimal for (rb=rp]. The corner rounding radius.
center<boolean> Center about origin.

Object example

cone( [10, 25], vr=2, center=true );
module cone(size=1, vr, center=false)
A cone.
Definition: common_3d.scad:461
cone

Definition at line 460 of file common_3d.scad.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cuboid()

module cuboid ( size  = 1,
vr  ,
vrm  = 0,
center  = false 
)

A cuboid with edge, round, or chamfer corners.

Parameters
size<decimal-list-3 | decimal> A list [x, y, z] of decimals or a single decimal for (x=y=z).
vr<decimal> The corner rounding radius.
vrm<integer> The radius mode. A 2-bit encoded integer that indicates edge and vertex finish. B0 controls edge and B1 controls vertex.
center<boolean> Center about origin.

Object example

cuboid( size=[25,40,20], vr=5, center=true );
module cuboid(size=1, vr, vrm=0, center=false)
A cuboid with edge, round, or chamfer corners.
Definition: common_3d.scad:531
cuboid
vrm Description
0 round edges with round vertexes
1 chamfer edges with sphere vertexes
2 round edges with chamfer vertexes
3 chamfer edges with chamfer vertexes
Note
Using round replaces all edges with a quarter circle of radius vr, inset [vr, vr] from the each edge.
Using chamfer replaces all edges with isosceles right triangles with side lengths equal to the corner rounding radius vr. Therefore the chamfer length will be vr * sqrt(2) at 45 degree angles.

Definition at line 530 of file common_3d.scad.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ellipsoid()

module ellipsoid ( size  = 1,
center  = false 
)

An ellipsoid.

Parameters
size<decimal-list-2 | decimal> A list [r, h] of decimals or a single decimal for (2r=h).
center<boolean> Center about origin.

Object example

ellipsoid( size=[40,25], center=true );
module ellipsoid(size=1, center=false)
An ellipsoid.
Definition: common_3d.scad:622
ellipsoid

Definition at line 621 of file common_3d.scad.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ellipsoid_s()

module ellipsoid_s ( size  = 1,
a1  = 0,
a2  = 0,
center  = false 
)

A sector of an ellipsoid.

Parameters
size<decimal-list-2 | decimal> A list [r, h] of decimals or a single decimal for (2r=h).
a1<decimal> The start angle in degrees.
a2<decimal> The stop angle in degrees.
center<boolean> Center about origin.

Object example

ellipsoid_s( size=[60,15], a1=0, a2=270, center=true );
module ellipsoid_s(size=1, a1=0, a2=0, center=false)
A sector of an ellipsoid.
Definition: common_3d.scad:663
ellipsoid_s

Definition at line 662 of file common_3d.scad.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pyramid_t()

module pyramid_t ( size  = 1,
center  = false 
)

A pyramid with trilateral base formed by four equilateral triangles.

Parameters
size<decimal> The face radius.
center<boolean> Center about origin.

Object example

pyramid_t( size=20, center=true );
module pyramid_t(size=1, center=false)
A pyramid with trilateral base formed by four equilateral triangles.
Definition: common_3d.scad:725
pyramid_t

Definition at line 724 of file common_3d.scad.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pyramid_q()

module pyramid_q ( size  = 1,
center  = false 
)

A pyramid with quadrilateral base.

Parameters
size<decimal-list-3 | decimal> A list [x, y, z] of decimals or a single decimal for (x=y=z).
center<boolean> Center about origin.

Object example

pyramid_q( size=[35,20,5], center=true );
module pyramid_q(size=1, center=false)
A pyramid with quadrilateral base.
Definition: common_3d.scad:772
pyramid_q

Definition at line 771 of file common_3d.scad.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ star3d()

module star3d ( size  = 1,
= 5,
half  = false,
center  = false 
)

A three-dimensional star.

Parameters
size<decimal-list-3 | decimal> A list [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.
center<boolean> Center about origin.

Object example

star3d( size=40, n=5, half=true, center=true );
module star3d(size=1, n=5, half=false, center=false)
A three-dimensional star.
Definition: common_3d.scad:824
star3d

Definition at line 823 of file common_3d.scad.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: