![]() |
omdl
v0.9.5
OpenSCAD Mechanical Design Library
|
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... | |
Basic 3D shapes.
| Requires: |
|---|
| include <omdl-base.scad>; |
| I | II | III |
|---|---|---|
![]() | ![]() | ![]() |
| IV | V | VI |
![]() | ![]() | ![]() |
| VII | ||
![]() |
| module cone | ( | r | , |
| h | , | ||
| d | , | ||
| vr | , | ||
| vr1 | , | ||
| vr2 | |||
| ) |
A cone.
| 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
Definition at line 461 of file basic_3d.scad.
Here is the call graph for this function:| module cuboid | ( | size | , |
| 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 | 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 |
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 532 of file basic_3d.scad.
Here is the call graph for this function:| module ellipsoid | ( | size | ) |
An ellipsoid.
| size | <decimal-list-2 | decimal> A list [w, h] of decimals or a single decimal for (w=h). |
Object example
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:| module ellipsoid_s | ( | size | , |
| a1 | = 0, |
||
| a2 | = 0 |
||
| ) |
A sector of an ellipsoid.
| 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
Definition at line 657 of file basic_3d.scad.
Here is the call graph for this function:| module pyramid_q | ( | size | , |
| 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 762 of file basic_3d.scad.
Here is the call graph for this function:
Here is the caller graph for this function:| module pyramid_t | ( | size | , |
| 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 717 of file basic_3d.scad.
| module star3d | ( | size | , |
| n | = 5, |
||
| half | = 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. |
Object example
Definition at line 812 of file basic_3d.scad.
Here is the call graph for this function: