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

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
Curved SVG images (OpenSCAD) 3D Printer File Image 1
Curved SVG images (OpenSCAD) 3D Printer File Image 2
Curved SVG images (OpenSCAD) 3D Printer File Thumbnail 1
Curved SVG images (OpenSCAD) 3D Printer File Thumbnail 2

Curved SVG images (OpenSCAD)

alidaf avataralidaf

May 17, 2024

printables-icon
DescriptionCommentsTags

Description

I produce a lot of customised products with embedded images and text from SVG and PNG files using OpenSCAD but I've been frustrated that it's not been as easy to do with curved surfaces.

Examples I've found in the past have focussed on PNG images and applied a geometric subtraction directly but I wanted to be able to choose whether to add, subtract or just create a standalone curved object. PNG images can produce some pretty ugly blocking artefacts unless high resolution images are used, which really impacts rendering, and often hits hardware limits.

I was finally badgered enough to try again and came up with some OpenSCAD code that works for SVG images. I made it work to an extent with PNG images as well but not for multiple greyscales with varying depth, as I have for flat planes. I think this will take some further work so I have removed the PNG functionality for now. SVG images render faster and don't suffer the scaling issues that PNG images do.

A lot of credit goes to Justin Lin for providing some theory and example code that helped me to understand the approach here. 

This code, without additional plugins can take, as a list, a number of images and wrap them around a curved, essentially cylindrical surface. Images can be independently scaled, rotated, flipped and positioned around a radius at an angular position and height. Spheres and other irregular surfaces will take a lot more effort but it's a step in the right direction for now.

The dimensions of the images need to be known (find them by using Inkscape or similar app) as they are required for the calculations. There are a couple of images included that I have no provenance for. Consider these as having no commercial license and are used purely for demonstrating the code. Do not use them in projects without checking their provenance. If you are the intellectual copyright owner to these images then please let me know and I will remove them.

A single image of a dragon.

Multiple images of a heart at different angular positions, heights and rotations. The top row are also flipped.

The code has 2 examples for embossing and ‘debossing’ (not a real word) a cylinder using OpenSCAD, but the stl of the images themselves could be used directly in a slicer as an additive or subtractive part.

A 'debossed" cylinder example.

An embossed cylinder example.

Note: It is recommended to use a nightly build of OpenSCAD and use the Manifold feature to speed up processing by orders of magnitude. Increasing the number of curve segments will have a significant impact on rendering time, particularly with multiple images.

I've moved the source to Github to track any changes here.

License:

GNU General Public License v2.0

Related Models

V29 preview image

V29

jzisa profile image

jzisa

81,232

Draw-A-Cat! Stencil for Feline Design preview image

Draw-A-Cat! Stencil for Feline Design

Studio Meshco profile image

Studio Meshco

105

STAND QRCODE/NFC CARD GOOGLE REVIEWS EDITABLE preview image

STAND QRCODE/NFC CARD GOOGLE REVIEWS EDITABLE

ARTIGIANO PAZZO profile image

ARTIGIANO PAZZO

1,623

Cute Mini Octopus preview image

Cute Mini Octopus

McGybeer profile image

McGybeer

75,622

Palestinian Map In Geometric Pattern Design - 2 Parts preview image

Palestinian Map In Geometric Pattern Design - 2 Parts

PALIprints3D profile image

PALIprints3D

20

Dual Text Illusion v2.0 preview image

Dual Text Illusion v2.0

neverland forge profile image

neverland forge

1,253

Modular Mounting System preview image

Modular Mounting System

HeyVye profile image

HeyVye

69,050

Design for a pipe in two pieces - UPDATED AGAIN preview image

Design for a pipe in two pieces - UPDATED AGAIN

Fergy7 profile image

Fergy7

1