mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-03-21 06:29:46 +01:00
added paths2sections
This commit is contained in:
parent
749b6c054b
commit
4b59e72d7e
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]
|
||||
]
|
||||
];
|
Loading…
x
Reference in New Issue
Block a user