14 KiB
dotSCAD 2.3
Reduce the burden of mathematics when playing OpenSCAD.
Introduction
Based on OpenSCAD 2019.05.
OpenSCAD uses three library locations, the installation library, built-in library, and user defined libraries. It's convenient to set OPENSCADPATH
. Check Setting OPENSCADPATH in OpenSCAD User Manual/Libraries for details.
I set OPENSCADPATH
to the src
folder of dotSCAD so all examples here start searching modules or functions from src
.
Every module or function is located in the file which has the same name as the module or the function. For example, if you want to use the line2d
module to draw a line, use <line2d.scad>;
first.
use <line2d.scad>;
line2d(p1 = [0, 0], p2 = [5, 0], width = 1);
Some module files are organized in a directory. For example, px_circle.scad exists in pixel
directory. You have to prefix the directory name when including px_circle
.
use <pixel/px_circle.scad>;
points = px_circle(radius = 10);
for(pt = points) {
translate(pt) square(1);
}
Examples
See examples.
Documentation
2D Module
- arc
- pie
- rounded_square
- line2d
- polyline2d
- hull_polyline2d
- hexagons
- polytransversals
- multi_line_text
- voronoi2d
3D Module
- rounded_cube
- rounded_cylinder
- crystal_ball
- line3d
- polyline3d
- hull_polyline3d
- function_grapher
- sweep
- loft
- starburst
- voronoi3d
Transformation
2D Function
2D/3D Function
- cross_sections
- paths2sections
- path_scaling_sections
- bezier_surface
- bezier_smooth
- midpt_smooth
- in_polyline
Path
Extrusion
2D Shape
- shape_taiwan
- shape_arc
- shape_pie
- shape_circle
- shape_ellipse
- shape_square
- shape_trapezium
- shape_cyclicpolygon
- shape_pentagram
- shape_starburst
- shape_superformula
- shape_glued2circles
- shape_path_extend
2D Shape Extrusion
- path_extrude
- ring_extrude
- helix_extrude
- golden_spiral_extrude
- archimedean_spiral_extrude
- sphere_spiral_extrude
Util
- util/sub_str
- util/split_str
- util/parse_number
- util/reverse
- util/slice
- util/sort
- util/rand
- util/fibseq
- util/bsearch
- util/has
- util/dedup
- util/flat
Matrix
- matrix/m_cumulate
- matrix/m_translation
- matrix/m_rotation
- matrix/m_scaling
- matrix/m_mirror
- matrix/m_shearing
Point Transformation
- ptf/ptf_rotate
- ptf/ptf_x_twist
- ptf/ptf_y_twist
- ptf/ptf_circle
- ptf/ptf_bend
- ptf/ptf_ring
- ptf/ptf_sphere
- ptf/ptf_torus
Turtle
Pixel
- pixel/px_line
- pixel/px_polyline
- pixel/px_circle
- pixel/px_cylinder
- pixel/px_sphere
- pixel/px_polygon
- pixel/px_from
- pixel/px_ascii
- pixel/px_gray
Part
Surface
- surface/sf_square
- surface/sf_bend
- surface/sf_ring
- surface/sf_sphere
- surface/sf_torus
- surface/sf_solidify
Noise
- noise/nz_perlin1
- noise/nz_perlin1s
- noise/nz_perlin2
- noise/nz_perlin2s
- noise/nz_perlin3
- noise/nz_perlin3s
- noise/nz_worley2
- noise/nz_worley2s
- noise/nz_worley3
- noise/nz_worley3s
- noise/nz_cell
2.4 Preview
2D Function
Util
Turtle
Voxel (Renamed from Pixel. Yes, Pixel will be deprecated in the next release.)
- voxel/vx_line
- voxel/vx_polyline
- voxel/vx_circle
- voxel/vx_cylinder
- voxel/vx_sphere
- voxel/vx_polygon
- voxel/vx_from
- voxel/vx_ascii
- voxel/vx_gray
- voxel/vx_union
- voxel/vx_intersection
- voxel/vx_difference
Matrix
Voronoi
- voronoi/vrn2_from
- voronoi/vrn2_space
- voronoi/vrn2_cells_from
- voronoi/vrn2_cells_space
- voronoi/vrn3_from
- voronoi/vrn3_space
Bugs and Feedback
For bugs, questions and discussions please use the Github Issues.
About dotSCAD
I've been using OpenSCAD for years. Some of my works include reusable implementations so I elaborate them into this library.
The idea of the name dotSCAD comes from the filename extension ".scad" of OpenSCAD.