mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-14 10:44:48 +02:00
refactor
This commit is contained in:
@@ -8,12 +8,7 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
function _bijection_edges_from(pts) =
|
include <__private__/__edges_from.scad>;
|
||||||
let(leng = len(pts))
|
|
||||||
concat(
|
|
||||||
[for(i = [0:leng - 2]) [pts[i], pts[i + 1]]],
|
|
||||||
[[pts[len(pts) - 1], pts[0]]]
|
|
||||||
);
|
|
||||||
|
|
||||||
function _bijection_inward_edge_normal(edge) =
|
function _bijection_inward_edge_normal(edge) =
|
||||||
let(
|
let(
|
||||||
@@ -65,7 +60,7 @@ function _bijection_offset__bijection__bijection__bijection_offset_edges_interse
|
|||||||
|
|
||||||
function bijection_offset(pts, d) =
|
function bijection_offset(pts, d) =
|
||||||
let(
|
let(
|
||||||
es = _bijection_edges_from(pts),
|
es = __edges_from(pts),
|
||||||
offset_es = _bijection__bijection_offset_edges(es, d),
|
offset_es = _bijection__bijection_offset_edges(es, d),
|
||||||
leng = len(offset_es),
|
leng = len(offset_es),
|
||||||
last_p = _bijection__bijection__bijection_offset_edges_intersection(offset_es[leng - 1], offset_es[0])
|
last_p = _bijection__bijection__bijection_offset_edges_intersection(offset_es[leng - 1], offset_es[0])
|
||||||
|
Reference in New Issue
Block a user