1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
dotSCAD/README.md

169 lines
9.9 KiB
Markdown
Raw Normal View History

2020-01-28 17:58:03 +08:00
# dotSCAD 2.2 (Preview)
2017-03-11 17:49:46 +08:00
2019-07-17 08:45:07 +08:00
> **Reduce the burden of 3D modeling in mathematics.**
2017-03-11 17:49:46 +08:00
2019-09-21 19:20:04 +08:00
![dotSCAD](featured_img/LeopardCatTaiwan.JPG)
2017-05-08 17:18:56 +08:00
2019-08-31 17:21:32 +08:00
[![license/LGPL](LICENSE.svg)](https://github.com/JustinSDK/lib-openscad/blob/master/LICENSE)
2017-03-15 15:30:24 +08:00
2017-03-27 17:36:32 +08:00
## Introduction
2019-08-29 08:47:40 +08:00
**Based on OpenSCAD 2019.05.** For old OpenSCAD versions, please use dotSCAD 1.3. You can download all versions from the [releases](https://github.com/JustinSDK/dotSCAD/releases).
2019-07-17 08:45:07 +08:00
2017-04-23 08:47:39 +08:00
OpenSCAD uses three library locations, the installation library, built-in library, and user defined libraries. It's convenient to set `OPENSCADPATH`. Check [Setting OPENSCADPATH](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries#Setting_OPENSCADPATH) in [OpenSCAD User Manual/Libraries](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries) for details.
2020-01-28 17:52:30 +08:00
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.
2017-03-27 17:34:32 +08:00
2020-01-28 17:52:30 +08:00
use <line2d.scad>;
2017-03-27 17:35:13 +08:00
2017-03-27 17:34:32 +08:00
line2d(p1 = [0, 0], p2 = [5, 0], width = 1);
2019-06-20 14:35:53 +08:00
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`.
2020-01-28 17:52:30 +08:00
use <pixel/px_circle.scad>;
2019-06-21 17:47:00 +08:00
points = px_circle(radius = 10);
2019-06-20 14:35:53 +08:00
for(pt = points) {
2019-06-20 18:33:22 +08:00
translate(pt) square(1);
2019-06-20 14:35:53 +08:00
}
2019-12-14 21:25:40 +08:00
## Examples
See [examples](examples).
![examples](examples/images/gallery.JPG)
2017-03-17 08:37:19 +08:00
## Documentation
- 2D
2020-01-28 17:51:20 +08:00
- [arc](https://openhome.cc/eGossip/OpenSCAD/lib2x-arc.html)
- [pie](https://openhome.cc/eGossip/OpenSCAD/lib2x-pie.html)
- [rounded_square](https://openhome.cc/eGossip/OpenSCAD/lib2x-rounded_square.html)
- [line2d](https://openhome.cc/eGossip/OpenSCAD/lib2x-line2d.html)
- [polyline2d](https://openhome.cc/eGossip/OpenSCAD/lib2x-polyline2d.html)
- [hull_polyline2d](https://openhome.cc/eGossip/OpenSCAD/lib2x-hull_polyline2d.html)
- [hexagons](https://openhome.cc/eGossip/OpenSCAD/lib2x-hexagons.html)
- [polytransversals](https://openhome.cc/eGossip/OpenSCAD/lib2x-polytransversals.html)
- [multi_line_text](https://openhome.cc/eGossip/OpenSCAD/lib2x-multi_line_text.html)
- [voronoi2d](https://openhome.cc/eGossip/OpenSCAD/lib2x-voronoi2d.html)
2017-03-17 08:37:19 +08:00
- 3D
2020-01-28 17:51:20 +08:00
- [rounded_cube](https://openhome.cc/eGossip/OpenSCAD/lib2x-rounded_cube.html)
- [rounded_cylinder](https://openhome.cc/eGossip/OpenSCAD/lib2x-rounded_cylinder.html)
- [crystal_ball](https://openhome.cc/eGossip/OpenSCAD/lib2x-crystal_ball.html)
- [line3d](https://openhome.cc/eGossip/OpenSCAD/lib2x-line3d.html)
- [polyline3d](https://openhome.cc/eGossip/OpenSCAD/lib2x-polyline3d.html)
- [hull_polyline3d](https://openhome.cc/eGossip/OpenSCAD/lib2x-hull_polyline3d.html)
- [function_grapher](https://openhome.cc/eGossip/OpenSCAD/lib2x-function_grapher.html)
- [polysections](https://openhome.cc/eGossip/OpenSCAD/lib2x-polysections.html)
- [starburst](https://openhome.cc/eGossip/OpenSCAD/lib2x-starburst.html)
- [voronoi3d](https://openhome.cc/eGossip/OpenSCAD/lib2x-voronoi3d.html)
2017-04-05 11:25:08 +08:00
2017-03-23 08:23:33 +08:00
- Transformation
2020-01-28 17:51:20 +08:00
- [along_with](https://openhome.cc/eGossip/OpenSCAD/lib2x-along_with.html)
- [hollow_out](https://openhome.cc/eGossip/OpenSCAD/lib2x-hollow_out.html)
- [bend](https://openhome.cc/eGossip/OpenSCAD/lib2x-bend.html)
- [shear](https://openhome.cc/eGossip/OpenSCAD/lib2x-shear.html)
2017-03-15 15:30:24 +08:00
2017-03-28 20:56:13 +08:00
- Functon
2020-01-28 17:51:20 +08:00
- [rotate_p](https://openhome.cc/eGossip/OpenSCAD/lib2x-rotate_p.html)
- [cross_sections](https://openhome.cc/eGossip/OpenSCAD/lib2x-cross_sections.html)
- [paths2sections](https://openhome.cc/eGossip/OpenSCAD/lib2x-paths2sections.html)
- [path_scaling_sections](https://openhome.cc/eGossip/OpenSCAD/lib2x-path_scaling_sections.html)
- [bijection_offset](https://openhome.cc/eGossip/OpenSCAD/lib2x-bijection_offset.html)
- [in_polyline](https://openhome.cc/eGossip/OpenSCAD/lib2x-in_polyline.html)
- [in_shape](https://openhome.cc/eGossip/OpenSCAD/lib2x-in_shape.html)
- [midpt_smooth](https://openhome.cc/eGossip/OpenSCAD/lib2x-midpt_smooth.html)
- [trim_shape](https://openhome.cc/eGossip/OpenSCAD/lib2x-trim_shape.html)
- [triangulate](https://openhome.cc/eGossip/OpenSCAD/lib2x-triangulate.html)
2017-03-29 11:35:41 +08:00
2017-03-23 08:23:33 +08:00
- Path
2020-01-28 17:51:20 +08:00
- [arc_path](https://openhome.cc/eGossip/OpenSCAD/lib2x-arc_path.html)
- [circle_path](https://openhome.cc/eGossip/OpenSCAD/lib2x-circle_path.html)
- [bspline_curve](https://openhome.cc/eGossip/OpenSCAD/lib2x-bspline_curve.html)
- [bezier_curve](https://openhome.cc/eGossip/OpenSCAD/lib2x-bezier_curve.html)
- [bezier_surface](https://openhome.cc/eGossip/OpenSCAD/lib2x-bezier_surface.html)
- [bezier_smooth](https://openhome.cc/eGossip/OpenSCAD/lib2x-bezier_smooth.html)
- [helix](https://openhome.cc/eGossip/OpenSCAD/lib2x-helix.html)
- [golden_spiral](https://openhome.cc/eGossip/OpenSCAD/lib2x-golden_spiral.html)
- [archimedean_spiral](https://openhome.cc/eGossip/OpenSCAD/lib2x-archimedean_spiral.html)
- [sphere_spiral](https://openhome.cc/eGossip/OpenSCAD/lib2x-sphere_spiral.html)
- [torus_knot](https://openhome.cc/eGossip/OpenSCAD/lib2x-torus_knot.html)
2017-03-26 16:51:41 +08:00
2017-05-04 15:39:04 +08:00
- Extrusion
2020-01-28 17:51:20 +08:00
- [box_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-box_extrude.html)
- [ellipse_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-ellipse_extrude.html)
- [stereographic_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-stereographic_extrude.html)
- [rounded_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-rounded_extrude.html)
2017-05-06 14:03:17 +08:00
2017-05-14 17:07:52 +08:00
- 2D Shape
2020-01-28 17:51:20 +08:00
- [shape_taiwan](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_taiwan.html)
- [shape_arc](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_arc.html)
- [shape_pie](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_pie.html)
- [shape_ellipse](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_ellipse.html)
- [shape_square](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_square.html)
- [shape_trapezium](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_trapezium.html)
- [shape_cyclicpolygon](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_cyclicpolygon.html)
- [shape_pentagram](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_pentagram.html)
- [shape_starburst](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_starburst.html)
- [shape_superformula](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_superformula.html)
- [shape_glued2circles](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_glued2circles.html)
- [shape_path_extend](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_path_extend.html)
2017-05-14 17:07:52 +08:00
- 2D Shape Extrusion
2020-01-28 17:51:20 +08:00
- [bend_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-bend_extrude.html)
- [path_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-path_extrude.html)
- [ring_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-ring_extrude.html)
- [helix_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-helix_extrude.html)
- [golden_spiral_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-golden_spiral_extrude.html)
- [archimedean_spiral_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-archimedean_spiral_extrude.html)
- [sphere_spiral_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-sphere_spiral_extrude.html)
2017-05-14 17:07:52 +08:00
2019-06-23 09:51:18 +08:00
- Utilities
2020-01-28 17:51:20 +08:00
- [util/sub_str](https://openhome.cc/eGossip/OpenSCAD/lib2x-sub_str.html)
- [util/split_str](https://openhome.cc/eGossip/OpenSCAD/lib2x-split_str.html)
- [util/parse_number](https://openhome.cc/eGossip/OpenSCAD/lib2x-parse_number.html)
- [util/reverse](https://openhome.cc/eGossip/OpenSCAD/lib2x-reverse.html)
- [util/slice](https://openhome.cc/eGossip/OpenSCAD/lib2x-slice.html)
- [util/sort](https://openhome.cc/eGossip/OpenSCAD/lib2x-sort.html)
- [util/rand](https://openhome.cc/eGossip/OpenSCAD/lib2x-rand.html)
- [util/fibseq](https://openhome.cc/eGossip/OpenSCAD/lib2x-fibseq.html)
2019-06-23 09:51:18 +08:00
2019-05-02 11:10:57 +08:00
- Matrix
2020-01-28 17:51:20 +08:00
- [matrix/m_cumulate](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_cumulate.html)
- [matrix/m_translation](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_translation.html)
- [matrix/m_rotation](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_rotation.html)
- [matrix/m_scaling](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_scaling.html)
- [matrix/m_mirror](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_mirror.html)
- [matrix/m_shearing](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_shearing.html)
2019-05-02 11:10:57 +08:00
2019-06-20 09:21:10 +08:00
- Turtle
2020-01-28 17:51:20 +08:00
- [turtle/turtle2d](https://openhome.cc/eGossip/OpenSCAD/lib2x-turtle2d.html)
- [turtle/turtle3d](https://openhome.cc/eGossip/OpenSCAD/lib2x-turtle3d.html)
- [turtle/t2d](https://openhome.cc/eGossip/OpenSCAD/lib2x-t2d.html)
- [turtle/t3d](https://openhome.cc/eGossip/OpenSCAD/lib2x-t3d.html)
2017-03-27 17:34:32 +08:00
2019-06-20 09:27:55 +08:00
- Pixel
2020-01-28 17:51:20 +08:00
- [pixel/px_line](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_line.html)
- [pixel/px_polyline](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_polyline.html)
- [pixel/px_circle](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_circle.html)
- [pixel/px_cylinder](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_cylinder.html)
- [pixel/px_sphere](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_sphere.html)
- [pixel/px_polygon](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_polygon.html)
- [pixel/px_from](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_from.html)
- [pixel/px_ascii](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_ascii.html)
- [pixel/px_gray](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_gray.html)
2019-09-21 19:20:04 +08:00
- Part
2020-01-28 17:51:20 +08:00
- [part/connector_peg](https://openhome.cc/eGossip/OpenSCAD/lib2x-connector_peg.html)
- [part/cone](https://openhome.cc/eGossip/OpenSCAD/lib2x-cone.html)
2019-10-18 09:18:33 +08:00
- [part/joint_T](https://openhome.cc/eGossip/OpenSCAD/lib2-joint_T.html)
2017-03-29 11:52:52 +08:00
## Bugs and Feedback
For bugs, questions and discussions please use the [Github Issues](https://github.com/JustinSDK/dotSCAD/issues).
2017-03-27 17:34:32 +08:00
## About dotSCAD
2017-03-30 14:46:10 +08:00
I've been using OpenSCAD for years and created some funny things. Some of them include several important ideas and details. To prevent forgetfulness, I decided to [write them down](https://openhome.cc/eGossip/OpenSCAD/). Some examples developed in the documentation are useful so I elaborate them into this library.
The idea of the name dotSCAD comes from the filename extension ".scad" of OpenSCAD.