3D part design with Openscad #46-A revised STL Cutter

A revised version of the stl cutter I made in part #35 that is easier to see the cutting plane.

1 min read
By Bob
3D part design with Openscad #46-A revised STL Cutter

I made a module to cut an STL file in half in #35, but there was no good way to visualize where the cutting plane was compared to the object so I modified it, here is the code:

/*[Slice]*/
Path_to_STL_File ="/home/none3/Desktop/YourFileName.stl";
show_cut_plane = true;
Width = 100; //[0:.1:200]
Height = 100; //[0:.1:200]
Thickness = 0.5; //[0:.1:100]
Rotate_x = 0; //[-360:.01:360]
Rotate_y = 0; //[-360:.01:360]
Rotate_z = 0; //[-360:.01:360]
Move_x = 0; //[-360:.01:360]
Move_y = 0; //[-360:.01:360]
Move_z = 0; //[-360:.01:360]


if (show_cut_plane)
translate([0,0,Height/2])
rotate([Rotate_x,Rotate_y,Rotate_z])
translate([Move_x,Move_y,Move_z])
%cube([Width,Thickness,Height],center = true);

difference(){
import(Path_to_STL_File,convexity=11);
translate([0,0,Height/2])
rotate([Rotate_x,Rotate_y,Rotate_z])
translate([Move_x,Move_y,Move_z])
cube([Width,Thickness,Height],center = true);
}

Now it's much easier to see where the cutter is at.