mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-09 00:06:42 +02:00
added headers
This commit is contained in:
@@ -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) {
|
module circular_sector(radius, angles, fn = 24) {
|
||||||
r = radius / cos(180 / fn);
|
r = radius / cos(180 / fn);
|
||||||
step = -360 / fn;
|
step = -360 / fn;
|
||||||
|
@@ -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
|
// The end-cap style
|
||||||
CAP_BUTT = 0;
|
CAP_BUTT = 0;
|
||||||
CAP_SQUARE = 1;
|
CAP_SQUARE = 1;
|
||||||
|
@@ -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 polyline2d(points, width, startingStyle = CAP_SQUARE, endingStyle = CAP_SQUARE, round_fn = 24) {
|
||||||
module line_segment(index) {
|
module line_segment(index) {
|
||||||
styles = index == 1 ? [startingStyle, CAP_ROUND] : (
|
styles = index == 1 ? [startingStyle, CAP_ROUND] : (
|
||||||
|
Reference in New Issue
Block a user