added modifier to partial extrusion to slightly change rake, slight changes to cat/dogears
This commit is contained in:
parent
dcef9ae8b9
commit
8296c5e867
4 changed files with 26 additions and 25 deletions
|
|
@ -15,7 +15,7 @@ module slice(points){
|
|||
polyhedron(points = points_new, faces = faces, convexity = 10);
|
||||
}
|
||||
|
||||
module bezier_extrude_partial(ctrl, shape, gap = 1, mod = function (t) 1, mod_x = function(t) 1, mod_y = function (t) 1, sections = 128){
|
||||
module bezier_extrude_partial(ctrl, shape, merlon = 1, gap = 1, mod = function (t) 1, mod_x = function(t) 1, mod_y = function (t) 1, sections = 128){
|
||||
B_0 = ctrl[0];
|
||||
B_1 = 3*(-ctrl[0] + ctrl[1]);
|
||||
B_2 = 3*(ctrl[0] - 2*ctrl[1] + ctrl[2]);
|
||||
|
|
@ -30,8 +30,8 @@ module bezier_extrude_partial(ctrl, shape, gap = 1, mod = function (t) 1, mod_x
|
|||
slices = [for (i = [0 : sections])
|
||||
let (t = i/sections, p = bezier(t), normal = normal(t), n = normal/norm(normal))
|
||||
[for (v = shape) [p.x+(mod(t) * mod_x(t) * n.x * v.x),p.y+(mod(t) * mod_x(t) * n.y * v.x), mod(t) * mod_y(t) * v.y]]];
|
||||
for(i = [0 : 1+gap : sections-1]){
|
||||
slice([slices[i],slices[i+1]]);
|
||||
for(i = [0 : 1+gap : sections-merlon]){
|
||||
slice([slices[i],slices[i+merlon]]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue