From 13096a8874d937a2b7717660a6285318a9638e83 Mon Sep 17 00:00:00 2001 From: Adrian Mariano Date: Wed, 29 Dec 2021 18:21:12 -0500 Subject: [PATCH] improve polyhedron child alignment to face edge --- polyhedra.scad | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/polyhedra.scad b/polyhedra.scad index 937aa04..38fd491 100644 --- a/polyhedra.scad +++ b/polyhedra.scad @@ -344,12 +344,12 @@ module regular_polyhedron( $center = -mean(facepts); cfacepts = move($center, p=facepts); $face = rotate_children - ? path2d(rot(from=face_normals[i], to=[0,0,1], p=cfacepts)) + ? path2d(frame_map(z=face_normals[i], x=facepts[0]-facepts[1], reverse=true, p=cfacepts)) : cfacepts; $faceindex = i; translate(-$center) if (rotate_children) { - rot(from=[0,0,1], to=face_normals[i]) + frame_map(z=face_normals[i], x=facepts[0]-facepts[1]) children(i % $children); } else { children(i % $children);