From 5cad15ce87da3c0f83877f666e72e89e056aa76b Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Tue, 14 Mar 2017 09:08:55 +0800 Subject: [PATCH] added headers --- src/circular_sector.scad | 13 +++++++++++++ src/line2d.scad | 12 ++++++++++++ src/polyline2d.scad | 12 ++++++++++++ 3 files changed, 37 insertions(+) diff --git a/src/circular_sector.scad b/src/circular_sector.scad index b7bd6ab8..2ab98180 100644 --- a/src/circular_sector.scad +++ b/src/circular_sector.scad @@ -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; diff --git a/src/line2d.scad b/src/line2d.scad index 0055d2c0..b8e83bb0 100644 --- a/src/line2d.scad +++ b/src/line2d.scad @@ -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; diff --git a/src/polyline2d.scad b/src/polyline2d.scad index b3b23084..2f17df03 100644 --- a/src/polyline2d.scad +++ b/src/polyline2d.scad @@ -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] : (