[OpenSCAD] Images on curved (cylindrical) surface

Parkinbot rudolf at parkinbot.com
Wed Jun 29 07:35:40 EDT 2016


And it would be so easy, once one could get (programmatically) hands on the
DXF representation in OpenSCAD ...  

But there is also a programmatic solution with current OpenSCAD using some
windowing technique for discretization. Not the fastest but viable:

<http://forum.openscad.org/file/n17832/geschafft1.png>  
<http://forum.openscad.org/file/n17832/geschafft2.png> 


> R = 45;  // radius 
> H = 2;   // height
> L = 130; // centering offset 
> step = 5; 
> 
> $fn=360/step; 
> 
> for (i=[0:step:360])
> {
>   radian = R*PI/180; 
>   rotate([0, i, 0])   translate([0,0,R-H/2]) // cylinder stuff
>   intersection()
>   {
>     translate([L-i*radian, 0, 0])  // shift dxf over the window
>     linear_extrude(height = H, center = true, convexity = 4) 
>     import("geschafft.dxf"); 
>     cube([radian*step, 100, H+1], center = true);  // window
>   }
> }
> 
> color("black", .7)
> rotate([90, 0, 0])
> cylinder(r=R-H, h = 100, center = true);





--
View this message in context: http://forum.openscad.org/Images-on-curved-cylindrical-surface-tp17823p17832.html
Sent from the OpenSCAD mailing list archive at Nabble.com.




More information about the Discuss mailing list