16 KiB
dotSCAD 3.0 RC
Reduce the burden of mathematics/algorithm when playing OpenSCAD.
Introduction
This library requires OpenSCAD 2021.01 or later. Please see Release Notes.
Some of my 3D models require complex mathematics/algorithm. I extract them into dotSCAD. Hope it helps when you're playing OpenSCAD.
The idea of the name dotSCAD comes from the filename extension ".scad" of OpenSCAD.
Get Started
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 <voxel/vx_circle.scad>;
points = vx_circle(radius = 10);
for(pt = points) {
translate(pt) square(1);
}
Examples
These examples incubate dotSCAD and dotSCAD refactors these examples. See examples.
Documentation
2D Module
3D Module
- crystal_ball
- function_grapher
- hull_polyline3d
- line3d
- loft
- polyhedron_hull
- polyline3d
- rounded_cube
- rounded_cylinder
- starburst
- sweep
Transformation
2D Function
2D/3D Function
- angle_between
- bezier_surface
- bezier_smooth
- cross_sections
- in_polyline
- lines_intersection
- paths2sections
- path_scaling_sections
- midpt_smooth
Path
- arc_path
- archimedean_spiral
- bauer_spiral
- bezier_curve
- bspline_curve
- curve
- fibonacci_lattice
- golden_spiral
- helix
- sphere_spiral
- torus_knot
Extrusion
2D Shape
- shape_arc
- shape_circle
- shape_cyclicpolygon
- shape_ellipse
- shape_liquid_splitting
- shape_path_extend
- shape_pentagram
- shape_pie
- shape_square
- shape_starburst
- shape_superformula
- shape_taiwan
- shape_trapezium
2D Shape Extrusion
- archimedean_spiral_extrude
- golden_spiral_extrude
- helix_extrude
- path_extrude
- ring_extrude
- sphere_spiral_extrude
Util
- list
- random
- string
- math
- set
- map
Matrix
- matrix/m_determinant
- matrix/m_mirror
- matrix/m_rotation
- matrix/m_scaling
- matrix/m_shearing
- matrix/m_translation
Point Transformation
- ptf/ptf_bend
- ptf/ptf_circle
- ptf/ptf_ring
- ptf/ptf_rotate
- ptf/ptf_sphere
- ptf/ptf_torus
- ptf/ptf_x_twist
- ptf/ptf_y_twist
Turtle
Voxel
- voxel/vx_ascii
- voxel/vx_bezier
- voxel/vx_contour
- voxel/vx_circle
- voxel/vx_curve
- voxel/vx_cylinder
- voxel/vx_difference
- voxel/vx_from
- voxel/vx_gray
- voxel/vx_intersection
- voxel/vx_line
- voxel/vx_polygon
- voxel/vx_polyline
- voxel/vx_sphere
- voxel/vx_union
Part
Surface
- surface/sf_bend
- surface/sf_ring
- surface/sf_solidify
- surface/sf_sphere
- surface/sf_square
- surface/sf_torus
Noise
- noise/nz_cell
- 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
Voronoi
- voronoi/vrn2_cells_from
- voronoi/vrn2_cells_space
- voronoi/vrn2_from
- voronoi/vrn2_space
- voronoi/vrn3_from
- voronoi/vrn3_space