mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 00:09:41 +00:00
Add linear_sweep examples with disconnected texture ends and show fix
This commit is contained in:
parent
46b5bf2709
commit
84d2e3d417
1 changed files with 49 additions and 16 deletions
65
skin.scad
65
skin.scad
|
@ -625,28 +625,61 @@ function skin(profiles, slices, refine=1, method="direct", sampling, caps, close
|
|||
// ]
|
||||
// ];
|
||||
// linear_sweep(path, texture=tex, tex_size=[5,5], h=40);
|
||||
// Example: VNF tile that has no top/bottom edges and produces a disconnected result
|
||||
// shape = skin([
|
||||
// rect(2/5),
|
||||
// rect(2/3),
|
||||
// rect(2/5)
|
||||
// ],
|
||||
// z=[0,1/2,1],
|
||||
// slices=0,
|
||||
// caps=false);
|
||||
// tile = move([0,1/2,2/3],yrot(90,shape));
|
||||
// linear_sweep(
|
||||
// circle(20), texture=tile,
|
||||
// tex_size=[10,10],tex_scale=5,
|
||||
// h=40,convexity=4);
|
||||
|
||||
|
||||
// Example: As Function
|
||||
// path = glued_circles(r=15, spread=40, tangent=45);
|
||||
// vnf = linear_sweep(
|
||||
// path, h=40, texture="trunc_pyramids", tex_size=[5,5],
|
||||
// tex_scale=1, style="convex");
|
||||
// vnf_polyhedron(vnf, convexity=10);
|
||||
// Example: VNF tile that has no top/bottom edges and produces a disconnected result
|
||||
// shape = skin([rect(2/5),
|
||||
// rect(2/3),
|
||||
// rect(2/5)],
|
||||
// z=[0,1/2,1],
|
||||
// slices=0,
|
||||
// caps=false);
|
||||
// tile = move([0,1/2,2/3],yrot(90,shape));
|
||||
// linear_sweep(circle(20), texture=tile,
|
||||
// tex_size=[10,10],tex_scale=5,
|
||||
// h=40,convexity=4);
|
||||
// Example: The same tile from above, turned 90 degrees, creates problems at the ends, because the end cap is not a connected polygon. When the ends are disconnected you may find that some parts of the end cap are missing and spurious polygons included.
|
||||
// shape = skin([rect(2/5),
|
||||
// rect(2/3),
|
||||
// rect(2/5)],
|
||||
// z=[0,1/2,1],
|
||||
// slices=0,
|
||||
// caps=false);
|
||||
// tile = move([1/2,1,2/3],xrot(90,shape));
|
||||
// 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
|
||||
// shape = skin([rect(2/5),
|
||||
// rect(2/3),
|
||||
// rect(2/5)],
|
||||
// z=[0,1/2,1],
|
||||
// slices=0,
|
||||
// caps=false);
|
||||
// tile = xscale(.5,move([1/2,1,2/3],xrot(90,shape)));
|
||||
// doubletile = vnf_join([tile, right(.5,tile)]);
|
||||
// linear_sweep(circle(20), texture=doubletile,
|
||||
// tex_size=[45,45],tex_scale=15, h=40);
|
||||
// Example: You can fix ends for disconnected cases using {{top_half()}} and {{bottom_half()}}
|
||||
// shape = skin([rect(2/5),
|
||||
// rect(2/3),
|
||||
// rect(2/5)],
|
||||
// z=[0,1/2,1],
|
||||
// slices=0,
|
||||
// caps=false);
|
||||
// tile = move([1/2,1,2/3],xrot(90,shape));
|
||||
// vnf_polyhedron(
|
||||
// top_half(
|
||||
// bottom_half(
|
||||
// linear_sweep(circle(20), texture=tile,
|
||||
// tex_size=[30,20],tex_scale=15,
|
||||
// h=40.2,caps=false),
|
||||
// z=20),
|
||||
// z=-20));
|
||||
|
||||
module linear_sweep(
|
||||
region, height, center,
|
||||
|
|
Loading…
Reference in a new issue