@@ -2263,10 +2263,10 @@ function _cyl_path(
2263
2263
)
2264
2264
assert(is_finite(round1), "rounding1 must be a number if given." )
2265
2265
assert(is_finite(round2), "rounding2 must be a number if given." )
2266
- assert(chamf1r <= r1, "chamfer1 is larger than the r1 radius of the cylinder." )
2267
- assert(chamf2r <= r2, "chamfer2 is larger than the r2 radius of the cylinder." )
2268
- assert(roundlen1 <= r1, "size of rounding1 is larger than the r1 radius of the cylinder." )
2269
- assert(roundlen2 <= r2, "size of rounding2 is larger than the r2 radius of the cylinder." )
2266
+ assert(chamf1r/ scale <= r1, "chamfer1 is larger than the r1 radius of the cylinder." )
2267
+ assert(chamf2r/ scale <= r2, "chamfer2 is larger than the r2 radius of the cylinder." )
2268
+ assert(roundlen1* unscale/ scale <= r1, "size of rounding1 is larger than the r1 radius of the cylinder." )
2269
+ assert(roundlen2* unscale/ scale <= r2, "size of rounding2 is larger than the r2 radius of the cylinder." )
2270
2270
assert(dy1+ dy2 <= facelen, "Chamfers/roundings don't fit on the cylinder/cone. They exceed the length of the cylinder/cone face." )
2271
2271
assert(td_ang== 90 || clip_ang== 90 , "teardrop= and clip_angle= are mutually exclusive options." )
2272
2272
[
@@ -2276,11 +2276,11 @@ function _cyl_path(
2276
2276
[r1, - l/2 ] + xscale(1 /scale ,polar_to_xy(chamf1l,90 + vang)),
2277
2277
]
2278
2278
else if (! approx(round1,0 ) && td_ang < 90 )
2279
- each xscale(1 /scale ,_teardrop_corner(r= round1* unscale, corner= [[max ( 0 , r1* scale - 2 * roundlen1) ,- l/2 ],[r1* scale ,- l/2 ],[r2* scale ,l/2 ]], ang= td_ang))
2279
+ each xscale(1 /scale ,_teardrop_corner(r= round1* unscale, corner= [[r1* scale - 2 * roundlen1,- l/2 ],[r1* scale ,- l/2 ],[r2* scale ,l/2 ]], ang= td_ang))
2280
2280
else if (! approx(round1,0 ) && clip_ang < 90 )
2281
- each xscale(1 /scale ,_clipped_corner(r= round1* unscale, corner= [[max ( 0 , r1* scale - 2 * roundlen1) ,- l/2 ],[r1* scale ,- l/2 ],[r2* scale ,l/2 ]], ang= clip_ang))
2281
+ each xscale(1 /scale ,_clipped_corner(r= round1* unscale, corner= [[r1* scale - 2 * roundlen1,- l/2 ],[r1* scale ,- l/2 ],[r2* scale ,l/2 ]], ang= clip_ang))
2282
2282
else if (! approx(round1,0 ) && td_ang >= 90 )
2283
- each xscale(1 /scale ,arc(r= abs (round1* unscale), corner= [[max ( 0 , r1* scale - 2 * roundlen1) ,- l/2 ],[r1* scale ,- l/2 ],[r2* scale ,l/2 ]]))
2283
+ each xscale(1 /scale ,arc(r= abs (round1* unscale), corner= [[r1* scale - 2 * roundlen1,- l/2 ],[r1* scale ,- l/2 ],[r2* scale ,l/2 ]]))
2284
2284
else [r1,- l/2 ],
2285
2285
2286
2286
if (is_finite(chamf2r) && ! approx(chamf2r,0 ))
@@ -2289,7 +2289,7 @@ function _cyl_path(
2289
2289
[r2- chamf2r/scale , l/2 ]
2290
2290
]
2291
2291
else if (is_finite(round2) && ! approx(round2,0 ))
2292
- each xscale(1 /scale ,arc(r= abs (round2), corner= [[r1* scale ,- l/2 ],[r2* scale ,l/2 ],[max ( 0 , r2* scale - 2 * roundlen2) ,l/2 ]]))
2292
+ each xscale(1 /scale ,arc(r= abs (round2* unscale ), corner= [[r1* scale ,- l/2 ],[r2* scale ,l/2 ],[r2* scale - 2 * roundlen2,l/2 ]]))
2293
2293
else [r2,l/2 ],
2294
2294
];
2295
2295
@@ -2455,7 +2455,7 @@ module cyl(
2455
2455
cylinder (h= l, r1= r1, r2= r2, center= true , $ fn= sides);
2456
2456
} else {
2457
2457
vnf = cyl(
2458
- l= l, r1= r1 , r2= r2 , center= true ,
2458
+ l= l, r1= _r1 , r2= _r2 , center= true , circum = circum,
2459
2459
chamfer= chamfer, chamfer1= chamfer1, chamfer2= chamfer2,
2460
2460
chamfang= chamfang, chamfang1= chamfang1, chamfang2= chamfang2,
2461
2461
rounding= rounding, rounding1= rounding1, rounding2= rounding2,
0 commit comments