Previously I made a module that you could use to perforate different shaped holes in a tube to make an interesting design, these used dxf files or an stl file:
3d part design with Inkscape and Openscad #43: Revisiting the perforate module
A revisit to the tube perforate module to modify it so I can use an stl file in addition to a dxf file.
![](https://infinityplays.com/content/images/2023/03/Tutorial43-13.png)
3d Part design with Inkscape and OpenScad part 17: tube module
The tube perforate module from the last example needs a tube module to be complete so I will make one: As usual I will set up the customizer: Then add a new module called tube: Now I can make a tube for the perforate module: I can also make any
![](https://infinityplays.com/content/images/2021/04/Tutorial17-9.png)
3d Part design with Inkscape and Openscad part 16
In part 16 I make a new module to use a dxf imported from Inkscape to make repeating designs on objects
![](https://infinityplays.com/content/images/2021/04/tutorial16-2.png)
Since it's so easy to use Inkscape to make an svg file for this I made a few simple changes to my existing code so I could use an svg also.
Here is the updated code:
/* [Svg Perforate] */
Show_Perforate = true;
Path_to_SVG_File ="";
Svg_layer_name="layer1";
Columns = 4; //[1:100]
Rows = 4; //[1:100]
Extrude = 1; //[0:.1:200]
diameter = 10; //[1:.1:200]
Verticle_spacing = 10; //[1:.1:200]
Horizontal_spacing = 10; //[1:.1:200]
Verticle_rotate = 90; //[0:.1:360]
Rotate_X = 0; //[0:.1:360]
Rotate_Y = 90; //[0:.1:360]
Rotate_Z = 90; //[0:.1:360]
Rotate_All_X = 0; //[0:.1:360]
Rotate_All_Y = 0; //[0:.1:360]
Rotate_All_Z = 0; //[0:.1:360]87.7
Move_X = 0; //[-200:.1:200]
Move_Y = 0; //[-200:.1:200]
Move_Z = 0; //[-200:.1:200]
scale_perf_x=1;//[.1:.01:100]
scale_perf_y=1;//[.1:.01:100]
scale_perf_z=1;//[.1:.01:100]
/* [Tube] */
Tube_height=20;//[.1:.01:400]
Inside_diameter=10;//[.1:.01:200]
Inside_shape=100;//[3:1:100]
Outside_diameter=10;//[.1:.01:200]
Outside_shape=100;//[3:1:100]
Tube_scale=1;//[.25:.01:20]
module SVG_Perforate(){
for(v=[1:Columns]){
rotate([Rotate_All_X,Rotate_All_Y,Rotate_All_Z])
translate([Move_X,Move_Y,Move_Z])
translate([0,0,v*Verticle_spacing])
for(h=[1:Rows])
rotate([0,Verticle_rotate,h*Horizontal_spacing,])
translate([0,diameter,0])
rotate([Rotate_X ,Rotate_Y,Rotate_Z])
{
scale([scale_perf_x,scale_perf_y,scale_perf_z])
linear_extrude(Extrude)
import(Path_to_SVG_File, layer= Svg_layer_name);
}}}
module Tube(){
linear_extrude(Tube_height,scale=Tube_scale){
difference(){
circle(Outside_diameter/2,$fn=Outside_shape);
circle(Inside_diameter/2,$fn=Inside_shape);
}}}
render()
difference(){
Tube();
SVG_Perforate();
}
if(Show_Perforate)
#SVG_Perforate();
![](https://infinityplays.com/content/images/2024/06/104-1.png)
![](https://infinityplays.com/content/images/2024/06/104-2-1.png)
![](https://infinityplays.com/content/images/2024/06/104-3.png)
I also added a check box so you can see where the holes line up on the tube if you want to make it have different shapes:
![](https://infinityplays.com/content/images/2024/06/104-4.png)
![](https://infinityplays.com/content/images/2024/06/104-6.png)
![](https://infinityplays.com/content/images/2024/06/104-7.png)
![](https://infinityplays.com/content/images/2024/06/104-8.png)
![](https://infinityplays.com/content/images/2024/06/104-9.png)
![](https://infinityplays.com/content/images/2024/06/104-10.png)