mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Merge branch 'revarbat_dev' of github.com:BelfrySCAD/BOSL2 into revarbat_dev
This commit is contained in:
commit
add0e22901
2 changed files with 28 additions and 9 deletions
17
gears.scad
17
gears.scad
|
@ -311,8 +311,19 @@ function _inherit_gear_thickness(thickness) =
|
|||
// Subsection: Ring Gears (Internal Gears)
|
||||
// A ring gear (or internal gear) is a gear where the teeth are on the inside of a circle. Such gears must be mated
|
||||
// to a regular (external) gear, which rotates around the inside.
|
||||
// Figure(3D,Med,NoAxes,VPT=[10.3822,-19.892,16.1929],VPR=[55.7,0,30.6],VPD=401.516): A interior or ring gear
|
||||
// ring_gear(mod=5, teeth=35,thickness=25,$fn=128);
|
||||
// Figure(2D,Med,NoAxes,VPT=[0.491171,1.07815,0.495977],VPR=[0,0,0],VPD=292.705): A interior or ring gear (yellow) with a mating spur gear (blue)
|
||||
// teeth1=18;
|
||||
// teeth2=30;
|
||||
// ps1=undef;
|
||||
// ps2=auto_profile_shift(teeth=teeth1);
|
||||
// mod=3;
|
||||
// d = gear_dist(mod=mod, teeth1=teeth1, teeth2=teeth2,profile_shift1=ps1, profile_shift2=ps2,helical=0, internal2=true);
|
||||
// ang = 0;
|
||||
// ring_gear2d(mod=mod, teeth=teeth2,profile_shift=ps2,helical=0,backing=4);
|
||||
// zrot(ang*360/teeth2)
|
||||
// color("lightblue")
|
||||
// fwd(d)
|
||||
// spur_gear2d(mod=mod, teeth=teeth1, profile_shift=ps1,gear_spin=-ang*360/teeth1,helical=0);
|
||||
// Continues:
|
||||
// Ring gears are subject to all the usual mesh requirements: the teeth must be the same size, the pressure angles must
|
||||
// match and they must have opposite helical angles. The {{gear_dist()}} function can give the center separation of
|
||||
|
@ -320,7 +331,7 @@ function _inherit_gear_thickness(thickness) =
|
|||
// teeth is small or the teeth counts of the ring gear and spur gear are too close together. The mating spur gear must
|
||||
// have few enough teeth so that the teeth don't interfere on the other side of the ring. Very small spur gears can interfere
|
||||
// on the tips of the ring gear's teeth.
|
||||
// Figure(2D,Med,NoAxes,VPR=[0,0,0],VPT=[-1.16111,0.0525612,0.495977],VPD=213.382): The red regions show interference between the two gears: the 18 tooth spur gear does not fit inside the 20 tooth ring gear.
|
||||
// Figure(2D,Med,NoAxes,VPT=[-1.16111,0.0525612,0.495977],VPR=[0,0,0],VPD=213.382): The red regions show interference between the two gears: the 18 tooth spur gear does not fit inside the 20 tooth ring gear.
|
||||
// teeth1=18;
|
||||
// teeth2=20;
|
||||
// ps1=undef;
|
||||
|
|
20
skin.scad
20
skin.scad
|
@ -636,6 +636,11 @@ function skin(profiles, slices, refine=1, method="direct", sampling, caps, close
|
|||
// ]
|
||||
// ];
|
||||
// linear_sweep(path, texture=tex, tex_size=[5,5], h=40);
|
||||
// Example: Textured with twist and scale.
|
||||
// linear_sweep(regular_ngon(n=3, d=50),
|
||||
// texture="rough", h=100, tex_scale=2,
|
||||
// tex_size=[20,20], style="min_edge",
|
||||
// convexity=10, scale=0.2, twist=120);
|
||||
// Example: As Function
|
||||
// path = glued_circles(r=15, spread=40, tangent=45);
|
||||
// vnf = linear_sweep(
|
||||
|
@ -664,7 +669,7 @@ function skin(profiles, slices, refine=1, method="direct", sampling, caps, close
|
|||
// linear_sweep(circle(20), texture=tile,
|
||||
// tex_size=[30,20],tex_scale=15,
|
||||
// h=40,convexity=4);
|
||||
// Example: This example shoes some endcap polygons missing and a spurious triangle
|
||||
// Example: This example shows some endcap polygons missing and a spurious triangle
|
||||
// shape = skin([rect(2/5),
|
||||
// rect(2/3),
|
||||
// rect(2/5)],
|
||||
|
@ -3634,14 +3639,15 @@ function _textured_linear_sweep(
|
|||
let(
|
||||
v = (i + (ti/texcnt.y)) / counts.y,
|
||||
sc = lerp([1, 1, 1], scale, v),
|
||||
mat = down((v-0.5)*h) *
|
||||
mat = up((v-0.5)*h) *
|
||||
scale(sc) *
|
||||
zrot(twist*v)
|
||||
) apply(mat, tile_rows[ti])
|
||||
) apply(mat, tile_rows[texcnt.y-ti-1])
|
||||
]
|
||||
) vnf_vertex_array(
|
||||
tiles, caps=false, style=style,
|
||||
col_wrap=true, row_wrap=false
|
||||
col_wrap=true, row_wrap=false,
|
||||
reverse=true
|
||||
)
|
||||
) vnf
|
||||
]),
|
||||
|
@ -3670,8 +3676,10 @@ function _textured_linear_sweep(
|
|||
]
|
||||
) nupath
|
||||
],
|
||||
bot_vnf = !caps[0] || brgn==[[]] ? EMPTY_VNF:vnf_from_region(brgn, down(h/2), reverse=true),
|
||||
top_vnf = !caps[1] || brgn==[[]] ? EMPTY_VNF:vnf_from_region(brgn, tmat, reverse=false)
|
||||
bot_vnf = !caps[0] || brgn==[[]] ? EMPTY_VNF
|
||||
: vnf_from_region(brgn, down(h/2), reverse=true),
|
||||
top_vnf = !caps[1] || brgn==[[]] ? EMPTY_VNF
|
||||
: vnf_from_region(brgn, tmat, reverse=false)
|
||||
) vnf_join([walls_vnf, bot_vnf, top_vnf])
|
||||
]),
|
||||
skmat = down(h/2) * skew(sxz=shift.x/h, syz=shift.y/h) * up(h/2),
|
||||
|
|
Loading…
Reference in a new issue