chiark
/
gitweb
/
~ianmdlvl
/
reprap-play.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wardrobe-hook: wip T version
[reprap-play.git]
/
wardrobe-hook.scad
diff --git
a/wardrobe-hook.scad
b/wardrobe-hook.scad
index 69f95b557fa29de32bcd5eb32985cb78ad7e88fc..17885e27698619efa23c51b0d853bc84f421820f 100644
(file)
--- a/
wardrobe-hook.scad
+++ b/
wardrobe-hook.scad
@@
-149,19
+149,27
@@
module SHookL(){ ///toplevel
// straight-on version, reversed, everything prefixed with t or T
// straight-on version, reversed, everything prefixed with t or T
+tjoinrad = 5;
+tjoinoutrad = tjoinrad + mainthick;
+
thookcy = shookcy;
tstem0leny = tuberad;
thookcy = shookcy;
tstem0leny = tuberad;
-tbend_raw = tangents_intersect_beta([0,shookcy], hookinrad,
- [0,-tstem0leny], -tuberad);
+
+tjoin0c = [tuberad - tjoinrad, -tstem0leny];
+tjoin1c = [0, thookcy];
+
+tbend_raw = tangents_intersect_beta(tjoin0c, tjoinrad,
+ tjoin1c, -hookoutrad);
echo(tbend_raw);
echo(tbend_raw);
-tbend = angle_map_range(90-tbend_raw, -180);
+tbend0 = angle_map_range(tbend_raw, 0);
+tbend1 = angle_map_range(tbend_raw + 180, -180);
module TPlan(){
ClipPlan(0, tstem0leny);
module TPlan(){
ClipPlan(0, tstem0leny);
- FArcSegment(
0,-tstem0leny, tuberad,ma
inoutrad,
- tbend
, 1
0);
+ FArcSegment(
tjoin0c[0],tjoin0c[1], tjoinrad,tjo
inoutrad,
+ tbend
0, 360-tbend
0);
FArcSegment(0,shookcy, hookinrad,hookoutrad,
FArcSegment(0,shookcy, hookinrad,hookoutrad,
- tbend
_raw, 270-tbend_raw + hookcurl
);
+ tbend
1, 270+hookcurl - tbend1
);
}
// other toplevels etc.
}
// other toplevels etc.