JustinSDK / dotSCAD

Reduce the burden of mathematics when playing OpenSCAD
https://openhome.cc/zh-tw/openscad/
GNU Lesser General Public License v3.0
784 stars 107 forks source link

Docs needs a table of contents page #16

Closed 68267a closed 3 years ago

68267a commented 3 years ago

I've found myself digging through the docs folder for the markdown file relevant to the module I'm trying to use, and opening the preview manually. It would be great if dotSCAD had a cheat sheet or table of contents with links to each file, a quick syntax example, and a short description like the OpenSCAD cheat sheet. It could even be updated dynamically in pretty much any language.

Currently it looks like every line has the function name on line 1 and the description on line 3.

Syntax would be a bit more difficult, but I think it's a necessary addition. Examples are great but any man page or powershell help also has syntax laid out.

A super rough example would be something like this:

Module Description Syntax
arc Creates an arc. You can pass a 2 element vector to define the central angle. Its $fa, $fs and $fn parameters are consistent with the circle module. arc(radius, angle[x,y], width);
archimedean_spiral Gets all points and angles on the path of an archimedean spiral. The distance between two points is almost constant. archimedean_spiral(arm_distance, init_angle, point_of_distance, num_of_points);
bend Bends a 3D object into an arc shape. bend(size = [x, y, z], angle) object();

Also, markdown supports triple-backtick code fencing which allows you to specify a language. With a proper language file, you can turn this image

into this image

by replacing the four-space with these: ```openscad

JustinSDK commented 3 years ago

A cheat sheet is great and I might come up one when I have time.