![]() |
omdl
v1.0
OpenSCAD Mechanical Design Library
|
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... | |
Common 3D shapes.
| Requires: |
|---|
| include <omdl-base.scad>; |
| I | II | III |
|---|---|---|
![]() | ![]() | ![]() |
| IV | V | VI |
![]() | ![]() | ![]() |
| VII | ||
![]() |
| module cone | ( | size | = 1, |
| vr | , | ||
| center | = false |
||
| ) |
A cone.
| 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
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:| module cuboid | ( | size | = 1, |
| vr | , | ||
| vrm | = 0, |
||
| center | = false |
||
| ) |
A cuboid with edge, round, or chamfer corners.
| 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
| 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 |
vr, inset [vr, vr] from the each edge. 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:| module ellipsoid | ( | size | = 1, |
| center | = false |
||
| ) |
An ellipsoid.
| 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
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:| module ellipsoid_s | ( | size | = 1, |
| a1 | = 0, |
||
| a2 | = 0, |
||
| center | = false |
||
| ) |
A sector of an ellipsoid.
| 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
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:| module pyramid_t | ( | size | = 1, |
| center | = false |
||
| ) |
A pyramid with trilateral base formed by four equilateral triangles.
| size | <decimal> The face radius. |
| center | <boolean> Center about origin. |
Object example
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:| module pyramid_q | ( | size | = 1, |
| center | = false |
||
| ) |
A pyramid with quadrilateral base.
| 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
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:| module star3d | ( | size | = 1, |
| n | = 5, |
||
| half | = false, |
||
| center | = false |
||
| ) |
A three-dimensional star.
| 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
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: