omdl  v0.9.5
OpenSCAD Mechanical Design Library
Basic 3d

Basic 3D shapes. More...

+ Collaboration diagram for Basic 3d:

Files

file  basic_3d.scad
 Basic 3D shapes.
 

Functions

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

Detailed Description

Basic 3D shapes.

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

Function Documentation

◆ cone()

module cone ( ,
,
,
vr  ,
vr1  ,
vr2   
)

A cone.

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

Object example

cone( h=25, r=10, vr=2 );
module cone(r, h, d, vr, vr1, vr2)
A cone.
Definition: basic_3d.scad:462
cone

Definition at line 461 of file basic_3d.scad.

+ Here is the call graph for this function:

◆ cuboid()

module cuboid ( size  ,
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, vr, vrm=0, center=false)
A cuboid with edge, round, or chamfer corners.
Definition: basic_3d.scad:533
cuboid
vrm B1 B0 Description
0 0 0 round edges with round vertexes
1 0 1 chamfer edges with sphere vertexes
2 1 0 round edges with chamfer vertexes
3 1 1 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 532 of file basic_3d.scad.

+ Here is the call graph for this function:

◆ ellipsoid()

module ellipsoid ( size  )

An ellipsoid.

Parameters
size<decimal-list-2 | decimal> A list [w, h] of decimals or a single decimal for (w=h).

Object example

ellipsoid( size=[40,25] );
module ellipsoid(size)
An ellipsoid.
Definition: basic_3d.scad:622
ellipsoid

Definition at line 621 of file basic_3d.scad.

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

◆ ellipsoid_s()

module ellipsoid_s ( size  ,
a1  = 0,
a2  = 0 
)

A sector of an ellipsoid.

Parameters
size<decimal-list-2 | decimal> A list [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.

Object example

ellipsoid_s( size=[60,15], a1=0, a2=270 );
module ellipsoid_s(size, a1=0, a2=0)
A sector of an ellipsoid.
Definition: basic_3d.scad:658
ellipsoid_s

Definition at line 657 of file basic_3d.scad.

+ Here is the call graph for this function:

◆ pyramid_q()

module pyramid_q ( size  ,
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, center=false)
A pyramid with quadrilateral base.
Definition: basic_3d.scad:763
pyramid_q

Definition at line 762 of file basic_3d.scad.

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

◆ pyramid_t()

module pyramid_t ( size  ,
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, center=false)
A pyramid with trilateral base formed by four equilateral triangles.
Definition: basic_3d.scad:718
pyramid_t

Definition at line 717 of file basic_3d.scad.

◆ star3d()

module star3d ( size  ,
= 5,
half  = 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.

Object example

star3d( size=40, n=5, half=true );
module star3d(size, n=5, half=false)
A three-dimensional star.
Definition: basic_3d.scad:813
star3d

Definition at line 812 of file basic_3d.scad.

+ Here is the call graph for this function: