Soap dispenser - Extended
thingiverse
This is a remake of the Soap dispenser by advancedvb. The pump assembly I have is too long for this model, so I extended its height by 9.5mm. The extension is done by a script that just increases the Z height of vertexes higher than 70mm (arbitrary). Prior to execute the script on a .STL, you must save it as an ASCII STL instead of a binary STL (example: open with FreeCAD > Export > as .ast, then rename the .ast file to .stl). The script is provided to tune either the increase (I'm limited to 125mm by my printer) or the height at which the increase occurs (if you want a longer neck or a shallower sponge holder for example). Script is copy-pasted below: # -*- coding: utf-8 -*- STL_input_path = r"ZeepPomp_01.stl" STL_out_path = r"ZeepPomp_01_extended.stl" towrite = [] threshold = 70.0 # [mm] Z_increase = 9.5 # [mm] STL_input_file = open(STL_input_path) for line in STL_input_file: if line.find("vertex") < 0: # non-vertex line towrite.append(line) else: # vertex line Z_value = float(line.split(" ")[-1][:-1]) if Z_value < threshold: # vertex not affected towrite.append(line) else: # vertex to be extended Z_value += Z_increase newline = line.split(" ")[:-1] newline.append("{:0.6f}".format(Z_value)+"\n") towrite.append(" ".join(newline)) STL_input_file.close() towrite = "".join(towrite) STL_output_file = open(STL_out_path, "w+") STL_output_file.write(towrite) STL_output_file.close()
With this file you will be able to print Soap dispenser - Extended with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Soap dispenser - Extended.