Compare commits

...

10 commits

Author SHA1 Message Date
adrianVmariano
a0f0fe0819
Merge cbe55c8514 into bbf4bc38c0 2024-11-28 18:17:50 +00:00
Adrian Mariano
cbe55c8514 attach_transform cleanup 2024-11-28 13:17:37 -05:00
Revar Desmera
bbf4bc38c0
Merge pull request #1509 from adrianVmariano/master
polyhedron fix
2024-11-19 16:27:11 -08:00
Revar Desmera
ab2d381034
Merge pull request #1507 from adrianVmariano/master
Will hirth fixes never cease?
2024-11-17 21:41:15 -08:00
Revar Desmera
606b6acde2
Merge pull request #1506 from adrianVmariano/master
Tube Rounding
2024-11-13 19:34:47 -08:00
Revar Desmera
94583da672
Merge pull request #1504 from adrianVmariano/master
doc fixes
2024-11-11 15:55:29 -08:00
Revar Desmera
802059f2cb
Merge pull request #1502 from adrianVmariano/master
hirth update
2024-11-08 22:17:41 -08:00
Revar Desmera
ccccd39160
Merge pull request #1501 from adrianVmariano/master
dox fixes
2024-11-05 19:51:34 -08:00
Revar Desmera
0f6a321568
Merge pull request #1500 from adrianVmariano/master
doc fix
2024-11-05 18:10:30 -08:00
Revar Desmera
73a8033316
Merge pull request #1498 from adrianVmariano/master
NURBS
2024-11-03 21:30:04 -08:00

View file

@ -3729,7 +3729,7 @@ function _attach_transform(anchor, spin, orient, geom, p) =
spin=default(spin,0),
orient=default(orient,UP),
two_d = _attach_geom_2d(geom),
m = ($attach_to != undef) ? // $attach_to is the attachment point on this object
m = is_def($attach_to) ? // $attach_to is the attachment point on this object
( // which will attach to the parent
let(
anch = _find_anchor($attach_to, geom),
@ -3739,7 +3739,6 @@ function _attach_transform(anchor, spin, orient, geom, p) =
: _find_anchor(_make_anchor_legal($anchor_override,geom),geom)[1]
)
two_d?
assert(is_num(spin))
affine3d_zrot(spin)
* rot(to=FWD, from=point3d(anch[2]))
* affine3d_translate(point3d(-pos))
@ -3756,17 +3755,14 @@ function _attach_transform(anchor, spin, orient, geom, p) =
: _make_anchor_legal(rot(spin, from=UP,to=orient,reverse=true,p=$attach_alignment),geom),
pos = _find_anchor(anchor, geom)[1]
)
two_d?
assert(is_num(spin))
affine3d_zrot(spin) * affine3d_translate(point3d(-pos))
two_d? affine3d_zrot(spin) * affine3d_translate(point3d(-pos))
:
let(
axis = vector_axis(UP,orient), // Returns BACK if orient is UP
ang = vector_angle(UP,orient)
)
affine3d_rot_by_axis(axis,ang)
* ( is_num(spin)? affine3d_zrot(spin)
: affine3d_zrot(spin.z) * affine3d_yrot(spin.y) * affine3d_xrot(spin.x))
* affine3d_zrot(spin)
* affine3d_translate(point3d(-pos))
)
is_undef(p)? m