niljub / pic2stl

pic2stl is a Python package that converts images to 3D STL models.
MIT License
2 stars 0 forks source link

additional extrusion on generated *.stl #2

Closed sugizo closed 5 months ago

sugizo commented 5 months ago

image image

code

file_name = 'batman
image_to_stl('%s_ori.png' % file_name, '%s_0.stl' % file_name, extrusion_height = 3, add_base = False)
image_to_stl('%s_ori.png' % file_name, '%s_1.stl' % file_name, extrusion_height = 3, add_base = True, base_thickness = 0)

result image

expected result no additional extrusion, for example above is seen on bottom left

p.s. try add_base (True and False), also have the additional extrusion on bottom left

best regards

niljub commented 5 months ago

The extra extrusion on the bottom left corner of the generated STL file is due to the "tm" watermark present in the lower right corner of the input image. Removing or cropping out this watermark from the image before processing it will resolve the issue.