1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 06:08:31 +01:00

added headers

This commit is contained in:
Justin Lin 2017-03-14 09:08:55 +08:00
parent c2e4b24548
commit 5cad15ce87
3 changed files with 37 additions and 0 deletions

View File

@ -1,3 +1,16 @@
/**
* circular_sector.scad
*
* Create a circular sector. You can pass a 2 element vector to define the central angle. It provides a fn parameter consistent with the $fn parameter of the circle module.
*
* @copyright Justin Lin, 2017
* @license https://opensource.org/licenses/lgpl-3.0.html
*
* @see https://openhome.cc/eGossip/OpenSCAD/lib-circular_sector.html
*
**/
module circular_sector(radius, angles, fn = 24) {
r = radius / cos(180 / fn);
step = -360 / fn;

View File

@ -1,3 +1,15 @@
/**
* line2d.scad
*
* Creates a line from two points.
*
* @copyright Justin Lin, 2017
* @license https://opensource.org/licenses/lgpl-3.0.html
*
* @see https://openhome.cc/eGossip/OpenSCAD/lib-line2d.html
*
**/
// The end-cap style
CAP_BUTT = 0;
CAP_SQUARE = 1;

View File

@ -1,3 +1,15 @@
/**
* polyline2d.scad
*
* Creates a polyline from a list of x, y coordinates. It depends on the line2d module so you have to include line2d.scad.
*
* @copyright Justin Lin, 2017
* @license https://opensource.org/licenses/lgpl-3.0.html
*
* @see https://openhome.cc/eGossip/OpenSCAD/lib-polyline2d.html
*
**/
module polyline2d(points, width, startingStyle = CAP_SQUARE, endingStyle = CAP_SQUARE, round_fn = 24) {
module line_segment(index) {
styles = index == 1 ? [startingStyle, CAP_ROUND] : (