mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
improve polyhedron child alignment to face edge
This commit is contained in:
parent
6e2929ff9b
commit
13096a8874
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue