doc tweak for affine

change path_spread to use affine3d_frame_map and fix bug when using n= option
This commit is contained in:
Adrian Mariano 2021-01-20 19:30:09 -05:00
parent d98cd52f2f
commit 61db695210
2 changed files with 3 additions and 3 deletions

View File

@ -266,10 +266,10 @@ function affine3d_rot_from_to(from, to) =
// Function: affine3d_frame_map()
// Usage:
// map = affine3d_frame_map(v1, v2, v3);
// map = affine3d_frame_map(v1, v2, v3, <reverse>);
// map = affine3d_frame_map(x=VECTOR1, y=VECTOR2, <reverse>);
// map = affine3d_frame_map(x=VECTOR1, z=VECTOR2, <reverse>);
// map = affine3d_frame_map(y=VECTOR1, y=VECTOR2, <reverse>);
// map = affine3d_frame_map(y=VECTOR1, z=VECTOR2, <reverse>);
// Description:
// Returns a transformation that maps one coordinate frame to another. You must specify two or
// three of `x`, `y`, and `z`. The specified axes are mapped to the vectors you supplied. If you

View File

@ -1186,7 +1186,7 @@ module path_spread(path, n, spacing, sp=undef, rotate_children=true, closed=fals
if(planar) {
rot(from=[0,1],to=cutlist[i][3]) children();
} else {
multmatrix(affine2d_to_3d(transpose([cutlist[i][2],cross(cutlist[i][3],cutlist[i][2]), cutlist[i][3]])))
multmatrix(affine3d_frame_map(x=cutlist[i][2], z=cutlist[i][3]))
children();
}
} else {