1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-03-14 11:10:01 +01:00

updated docs

This commit is contained in:
Justin Lin 2017-05-09 17:18:09 +08:00
parent 8d3418f248
commit c73e7641cb
4 changed files with 46 additions and 1 deletions

View File

@ -82,7 +82,8 @@ Too many dependencies? Because OpenSCAD doesn't provide namespace management, I
- [sphere_spiral_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-sphere_spiral_extrude.html)
- Shape
- [shape_pie](https://openhome.cc/eGossip/OpenSCAD/lib-shape_pie.html)
- [shape_arc](https://openhome.cc/eGossip/OpenSCAD/lib-shape_arc.html)
- [shape_pie](https://openhome.cc/eGossip/OpenSCAD/lib-shape_pie.html)
- [shape_ellipse](https://openhome.cc/eGossip/OpenSCAD/lib-shape_ellipse.html)
- [shape_square](https://openhome.cc/eGossip/OpenSCAD/lib-shape_square.html)
- [shape_pentagram](https://openhome.cc/eGossip/OpenSCAD/lib-shape_pentagram.html)

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

44
docs/lib-shape_arc.md Normal file
View File

@ -0,0 +1,44 @@
# shape_arc
Returns shape points and triangle indexes of an arc shape. They can be used with xxx_extrude modules of dotSCAD. The shape points can be also used with the built-in polygon module.
## Parameters
- `radius` : The radius of the circle.
- `angles` : A 2 element vector which defines the central angle. The first element of the vector is the beginning angle in degrees, and the second element is the ending angle.
- `width_mode` : The default value is `"LINE_CROSS"`. The arc line will move outward by `width / 2` and inward by `width / 2`. If it's `"LINE_OUTWARD"`, The arc line moves outward by `width`. The `"LINE_INWARD"` moves the arc line inward by `width`.
- `$fa`, `$fs`, `$fn` : Check [the circle module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#circle) for more details.
## Examples
include <shape_arc.scad>;
pts_tris = shape_arc(radius = 10, angles = [-90, 90], width = 5);
polygon(pts_tris[0]);
![shape_arc](images/lib-shape_arc-1.JPG)
include <shape_arc.scad>;
include <rotate_p.scad>;
include <polysections.scad>;
include <path_extrude.scad>;
include <bezier_curve.scad>;
t_step = 0.05;
width = 2;
pts_tris = shape_arc(radius = 10, angles = [-90, 90], width = 5);
p0 = [0, 0, 0];
p1 = [40, 60, 35];
p2 = [-50, 70, 45];
p3 = [20, 150, 55];
p4 = [80, 50, 60];
path_pts = bezier_curve(t_step,
[p0, p1, p2, p3, p4]
);
path_extrude(pts_tris[0], path_pts, pts_tris[1]);
![shape_arc](images/lib-shape_arc-2.JPG)