mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-07-31 12:00:23 +02:00
added paths2sections
This commit is contained in:
24
src/paths2sections.scad
Normal file
24
src/paths2sections.scad
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/**
|
||||||
|
* paths2sections.scad
|
||||||
|
*
|
||||||
|
* Given a list of paths, this function will return all cross-sections described by those paths.
|
||||||
|
*
|
||||||
|
* @copyright Justin Lin, 2017
|
||||||
|
* @license https://opensource.org/licenses/lgpl-3.0.html
|
||||||
|
*
|
||||||
|
* @see https://openhome.cc/eGossip/OpenSCAD/lib-paths2sections.html
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
function paths2sections(paths) =
|
||||||
|
let(
|
||||||
|
leng_path = len(paths[0]),
|
||||||
|
leng_paths = len(paths)
|
||||||
|
)
|
||||||
|
[
|
||||||
|
for(i = [0:leng_path - 1])
|
||||||
|
[
|
||||||
|
for(j = [0:leng_paths - 1])
|
||||||
|
paths[j][i]
|
||||||
|
]
|
||||||
|
];
|
Reference in New Issue
Block a user