• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
Soap dispenser - Extended 3D Printer File Image 1
Soap dispenser - Extended 3D Printer File Image 2
Soap dispenser - Extended 3D Printer File Thumbnail 1
Soap dispenser - Extended 3D Printer File Thumbnail 2

Soap dispenser - Extended

Delan_ avatarDelan_

September 10, 2019

thingiverse-icon
DescriptionCommentsTags

Description

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 (excuse my "dirty-but-works" coding ;) ):

-- 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()

License:

Creative Commons - Attribution - Non-Commercial - Share Alike

Related Models

Soap holder preview image

Soap holder

piuLAB profile image

piuLAB

41,242

Ratchet toothpaste tube squeezer preview image

Ratchet toothpaste tube squeezer

Luke's 3D profile image

Luke's 3D

24,761

Rose  preview image

Rose

3D Drucker profile image

3D Drucker

1,689

Simple Toothpaste Squeezer preview image

Simple Toothpaste Squeezer

ChatterComa profile image

ChatterComa

22,466

Wall Hook, Wall Hook, Wall Hook, Wall Hook, Wall Hook preview image

Wall Hook, Wall Hook, Wall Hook, Wall Hook, Wall Hook

MaxT profile image

MaxT

4,529

Bathroom door corner sign for guest preview image

Bathroom door corner sign for guest

Beton_377751593 profile image

Beton_377751593

928

Handle - All Purpose, Four Sizes preview image

Handle - All Purpose, Four Sizes

guppyk profile image

guppyk

13,949

Toothbrush Travel Case print in place preview image

Toothbrush Travel Case print in place

codewarriorr profile image

codewarriorr

6,339