mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-01-16 13:50:23 +01:00
improve polyhedron child alignment to face edge
This commit is contained in:
parent
6e2929ff9b
commit
13096a8874
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user