mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-19 19:09:36 +00:00
Fixed matrix form of rot(from,to,a)
This commit is contained in:
parent
c6ec9c8820
commit
8a29e9e86b
2 changed files with 8 additions and 2 deletions
|
@ -376,7 +376,13 @@ function rot(a=0, v=undef, cp=undef, from=undef, to=undef, reverse=false, p=unde
|
||||||
is_undef(from)? affine2d_zrot(a*rev) :
|
is_undef(from)? affine2d_zrot(a*rev) :
|
||||||
affine2d_zrot(vector_angle(from,to)*sign(vector_axis(from,to)[2])*rev)
|
affine2d_zrot(vector_angle(from,to)*sign(vector_axis(from,to)[2])*rev)
|
||||||
) : (
|
) : (
|
||||||
!is_undef(from)? affine3d_rot_by_axis(vector_axis(from,to),vector_angle(from,to)*rev) :
|
!is_undef(from)? affine3d_chain([
|
||||||
|
affine3d_zrot(a*rev),
|
||||||
|
affine3d_rot_by_axis(
|
||||||
|
vector_axis(from,to),
|
||||||
|
vector_angle(from,to)*rev
|
||||||
|
)
|
||||||
|
]) :
|
||||||
!is_undef(v)? affine3d_rot_by_axis(v,a*rev) :
|
!is_undef(v)? affine3d_rot_by_axis(v,a*rev) :
|
||||||
is_num(a)? affine3d_zrot(a*rev) :
|
is_num(a)? affine3d_zrot(a*rev) :
|
||||||
reverse? affine3d_chain([affine3d_zrot(-a.z),affine3d_yrot(-a.y),affine3d_xrot(-a.x)]) :
|
reverse? affine3d_chain([affine3d_zrot(-a.z),affine3d_yrot(-a.y),affine3d_xrot(-a.x)]) :
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
BOSL_VERSION = [2,0,142];
|
BOSL_VERSION = [2,0,143];
|
||||||
|
|
||||||
|
|
||||||
// Section: BOSL Library Version Functions
|
// Section: BOSL Library Version Functions
|
||||||
|
|
Loading…
Reference in a new issue