mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 14:18:13 +01:00
updated docs
This commit is contained in:
parent
1e494b9542
commit
edbc934098
BIN
docs/images/lib-shape_ellipse-1.JPG
Normal file
BIN
docs/images/lib-shape_ellipse-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
docs/images/lib-shape_ellipse-2.JPG
Normal file
BIN
docs/images/lib-shape_ellipse-2.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
BIN
docs/images/lib-shape_pentagram-1.JPG
Normal file
BIN
docs/images/lib-shape_pentagram-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
BIN
docs/images/lib-shape_pentagram-2.JPG
Normal file
BIN
docs/images/lib-shape_pentagram-2.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
BIN
docs/images/lib-shape_square-1.JPG
Normal file
BIN
docs/images/lib-shape_square-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
docs/images/lib-shape_square-2.JPG
Normal file
BIN
docs/images/lib-shape_square-2.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
40
docs/lib-shape_ellipse.md
Normal file
40
docs/lib-shape_ellipse.md
Normal file
@ -0,0 +1,40 @@
|
||||
# shape_ellipse
|
||||
|
||||
Returns shape points and triangle indexes of an ellipse. They can be used with xxx_extrude modules of dotSCAD. The shape points can be also used with the built-in polygon module.
|
||||
|
||||
## Parameters
|
||||
|
||||
- `axes` : 2 element vector `[x, y]` where x is the semi-major axis and y is the semi-minor axis.
|
||||
- `$fa`, `$fs`, `$fn` : The shape created by this function can be viewd as `resize([x, y]) circle(r = x)` (but not the real implementation inside the module) so you can use these global variables to control it. Check [the circle module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#circle) for more details.
|
||||
|
||||
## Examples
|
||||
|
||||
include <shape_ellipse.scad>;
|
||||
|
||||
polygon(
|
||||
shape_ellipse([40, 20])[0]
|
||||
);
|
||||
|
||||
![shape_ellipse](images/lib-shape_ellipse-1.JPG)
|
||||
|
||||
include <shape_ellipse.scad>;
|
||||
include <circle_path.scad>;
|
||||
include <helix.scad>;
|
||||
include <rotate_p.scad>;
|
||||
include <cross_sections.scad>;
|
||||
include <polysections.scad>;
|
||||
include <helix_extrude.scad>;
|
||||
|
||||
$fn = 8;
|
||||
|
||||
shape_pts_tris = shape_ellipse([20, 10]);
|
||||
|
||||
helix_extrude(shape_pts_tris[0],
|
||||
radius = 40,
|
||||
levels = 5,
|
||||
level_dist = 20,
|
||||
triangles = shape_pts_tris[1]
|
||||
);
|
||||
|
||||
![shape_ellipse](images/lib-shape_ellipse-2.JPG)
|
||||
|
37
docs/lib-shape_pentagram.md
Normal file
37
docs/lib-shape_pentagram.md
Normal file
@ -0,0 +1,37 @@
|
||||
# shape_pentagram
|
||||
|
||||
Returns shape points and triangle indexes of a pentagram. They can be used with xxx_extrude modules of dotSCAD. The shape points can be also used with the built-in polygon module.
|
||||
|
||||
## Parameters
|
||||
|
||||
- `r` : The length between the center and a tip.
|
||||
|
||||
## Examples
|
||||
|
||||
include <shape_pentagram.scad>;
|
||||
|
||||
polygon(shape_pentagram(5)[0]);
|
||||
|
||||
![shape_pentagram](images/lib-shape_pentagram-1.JPG)
|
||||
|
||||
include <shape_pentagram.scad>;
|
||||
include <circle_path.scad>;
|
||||
include <rotate_p.scad>;
|
||||
include <golden_spiral.scad>;
|
||||
include <cross_sections.scad>;
|
||||
include <polysections.scad>;
|
||||
include <golden_spiral_extrude.scad>;
|
||||
|
||||
shape_pts_tris = shape_pentagram(2);
|
||||
|
||||
golden_spiral_extrude(
|
||||
shape_pts_tris[0],
|
||||
from = 5,
|
||||
to = 10,
|
||||
point_distance = 1,
|
||||
scale = 10,
|
||||
triangles = shape_pts_tris[1]
|
||||
);
|
||||
|
||||
![shape_pentagram](images/lib-shape_pentagram-2.JPG)
|
||||
|
40
docs/lib-shape_square.md
Normal file
40
docs/lib-shape_square.md
Normal file
@ -0,0 +1,40 @@
|
||||
# shape_square
|
||||
|
||||
Returns shape points and triangle indexes of a rounded square or rectangle. They can be used with xxx_extrude modules of dotSCAD. The shape points can be also used with the built-in polygon module.
|
||||
|
||||
## Parameters
|
||||
|
||||
- `size` : Accepts single value, square with both sides this length. It also accepts 2 value array `[x, y]`, rectangle with dimensions `x` and `y`.
|
||||
- `corner_r` : The corner is one-quarter of a circle (quadrant). The `corner_r` parameter determines the circle radius.
|
||||
- `$fa`, `$fs`, `$fn` : Used to control the four quadrants. Check [the circle module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#circle) for more details. The final fragments of a circle will be a multiple of 4 to fit edges.
|
||||
|
||||
## Examples
|
||||
|
||||
include <shape_square.scad>;
|
||||
|
||||
polygon(
|
||||
shape_square(size = 50, corner_r = 5)[0]
|
||||
);
|
||||
|
||||
![shape_square](images/lib-shape_square-1.JPG)
|
||||
|
||||
include <shape_square.scad>;
|
||||
include <rotate_p.scad>;
|
||||
include <cross_sections.scad>;
|
||||
include <polysections.scad>;
|
||||
include <ring_extrude.scad>;
|
||||
|
||||
$fn = 36;
|
||||
|
||||
shape_pts_angles = shape_square(
|
||||
size = [20, 10],
|
||||
corner_r = 2
|
||||
);
|
||||
|
||||
ring_extrude(
|
||||
shape_pts_angles[0],
|
||||
radius = 50, angle = 180, twist = 180, scale = 2,
|
||||
triangles = shape_pts_angles[1]
|
||||
);
|
||||
|
||||
![along_with](images/lib-shape_square-2.JPG)
|
@ -1,3 +1,17 @@
|
||||
/**
|
||||
* shape_ellipse.scad
|
||||
*
|
||||
* Returns shape points and triangle indexes of an ellipse.
|
||||
* They can be used with xxx_extrude modules of dotSCAD.
|
||||
* The shape points can be also used with the built-in polygon module.
|
||||
*
|
||||
* @copyright Justin Lin, 2017
|
||||
* @license https://opensource.org/licenses/lgpl-3.0.html
|
||||
*
|
||||
* @see https://openhome.cc/eGossip/OpenSCAD/lib-shape_ellipse.html
|
||||
*
|
||||
**/
|
||||
|
||||
function shape_ellipse(axes) =
|
||||
let(
|
||||
frags = $fn > 0 ?
|
||||
|
@ -1,3 +1,17 @@
|
||||
/**
|
||||
* shape_pentagram.scad
|
||||
*
|
||||
* Returns shape points and triangle indexes of a pentagram.
|
||||
* They can be used with xxx_extrude modules of dotSCAD.
|
||||
* The shape points can be also used with the built-in polygon module.
|
||||
*
|
||||
* @copyright Justin Lin, 2017
|
||||
* @license https://opensource.org/licenses/lgpl-3.0.html
|
||||
*
|
||||
* @see https://openhome.cc/eGossip/OpenSCAD/lib-shape_ellipse.html
|
||||
*
|
||||
**/
|
||||
|
||||
function shape_pentagram(r) =
|
||||
[
|
||||
// shape points
|
||||
|
@ -1,3 +1,17 @@
|
||||
/**
|
||||
* shape_square.scad
|
||||
*
|
||||
* Returns shape points and triangle indexes of a rounded square or rectangle.
|
||||
* They can be used with xxx_extrude modules of dotSCAD.
|
||||
* The shape points can be also used with the built-in polygon module.
|
||||
*
|
||||
* @copyright Justin Lin, 2017
|
||||
* @license https://opensource.org/licenses/lgpl-3.0.html
|
||||
*
|
||||
* @see https://openhome.cc/eGossip/OpenSCAD/lib-shape_square.html
|
||||
*
|
||||
**/
|
||||
|
||||
function shape_square(size, corner_r = 0) =
|
||||
let(
|
||||
frags = $fn > 0 ?
|
||||
|
Loading…
x
Reference in New Issue
Block a user