mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-14 10:44:48 +02:00
use built-in norm
This commit is contained in:
@@ -1,6 +0,0 @@
|
|||||||
function __length_between(p1, p2) =
|
|
||||||
let(
|
|
||||||
dx = p2[0] - p1[0],
|
|
||||||
dy = p2[1] - p1[1],
|
|
||||||
dz = p2[2] - p1[2]
|
|
||||||
) sqrt(pow(dx, 2) + pow(dy, 2) + pow(dz, 2));
|
|
@@ -9,7 +9,6 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
include <__private__/__to3d.scad>;
|
include <__private__/__to3d.scad>;
|
||||||
include <__private__/__length_between.scad>;
|
|
||||||
include <__private__/__polytransversals.scad>;
|
include <__private__/__polytransversals.scad>;
|
||||||
include <__private__/__reverse.scad>;
|
include <__private__/__reverse.scad>;
|
||||||
|
|
||||||
@@ -34,7 +33,7 @@ function _shape_path_first_stroke(stroke_pts, path_pts) =
|
|||||||
|
|
||||||
function _shape_path_extend_stroke(stroke_pts, p1, p2, scale_step, i) =
|
function _shape_path_extend_stroke(stroke_pts, p1, p2, scale_step, i) =
|
||||||
let(
|
let(
|
||||||
leng = __length_between(__to3d(p1), __to3d(p2)),
|
leng = norm(__to3d(p2) - __to3d(p1)),
|
||||||
a = _shape_path_extend_az(p1, p2)
|
a = _shape_path_extend_az(p1, p2)
|
||||||
)
|
)
|
||||||
[
|
[
|
||||||
|
Reference in New Issue
Block a user