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

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
SVG to OpenSCAD Bezier - InkScape extension 3D Printer File Image 1
SVG to OpenSCAD Bezier - InkScape extension 3D Printer File Image 2
SVG to OpenSCAD Bezier - InkScape extension 3D Printer File Image 3
SVG to OpenSCAD Bezier - InkScape extension 3D Printer File Image 4
SVG to OpenSCAD Bezier - InkScape extension 3D Printer File Image 5
SVG to OpenSCAD Bezier - InkScape extension 3D Printer File Image 6
SVG to OpenSCAD Bezier - InkScape extension 3D Printer File Thumbnail 1
SVG to OpenSCAD Bezier - InkScape extension 3D Printer File Thumbnail 2
SVG to OpenSCAD Bezier - InkScape extension 3D Printer File Thumbnail 3
SVG to OpenSCAD Bezier - InkScape extension 3D Printer File Thumbnail 4
SVG to OpenSCAD Bezier - InkScape extension 3D Printer File Thumbnail 5
SVG to OpenSCAD Bezier - InkScape extension 3D Printer File Thumbnail 6

SVG to OpenSCAD Bezier - InkScape extension

Gael Lafond avatarGael Lafond

August 22, 2022

printables-icon
DescriptionCommentsTags

Description

[UPDATE] OpenSCAD 2019-05 has added native SVG support. I will continue to maintain this extension, but it's now a very low priority. https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/SVG_Import

This InkScape extension (plugin) can be used to convert anySVG files to nativeOpenSCAD code, with fullBezier support. The global variable $fn can be used to tweak the resolution of the curves.

Generated OpenSCAD files contains a stripped down version of my OpenSCAD Bezier library: https://www.thingiverse.com/thing:2170645

The Cat SVG file used for the demonstration of the library is from: https://www.onlinewebfonts.com/icon/74146

[2018-02-25] Check if element is empty before adding it to the OpenSCAD file

[2018-03-01] Re-uploaded the ZIP file. Fixed issues with holes. Unfortunately, I can't use the polygon drawing direction to determine if the polygon is a hole or not because the simplepath library do not respect the drawing direction when converting paths. I had to use a logic of "Paths inside path are holes". There is still a possibility of some SVG files not converting well, but they are exception cases that are very unlikely to happen.

[2018-03-03] Fixed bug caused by polygons composed of a single point.

[2018-04-02] Added support for InkScape layers, as suggested by Warren Baird: https://www.thingiverse.com/thing:2805184/#comment-1837500

[2018-06-17] Fixed bug causing parts of multi-part polygon to be missing.

Fixed Python error caused by missing library when attempting to display warning messages.

Added "translate" to center the drawing, as suggested by Jon Briggs (spinvector) and Anton Moiseev (sadr0b0t)

[2018-06-29] Fixed bug with the "translate" function, when document is not in Pixel unit.

[2021-08-28] Added support for InkScape 1.0

  • Download openSCADbezier_v0.9.zip for InkScape 0.9
  • Download openSCADbezier_v1.0.zip for InkScape 1.0+

Issue 1: The function inkex.paths.CubicSuperPath crashes, so I have to use the deprecated cubicsuperpath.CubicSuperPath function instead. Please, ignore the deprecation warning. Issue 2: The InkScape 1.0 plugin is not as reliable as the 0.9. It often crashes while parsing SVG objects. Hopefully InkScape will fixes this in the next release. Issue 3: Sometime, InkScape outputs the whole SVG in the OpenSCAD document. That seems to be a bug with InkScape rather than with the extension. If your OpenSCAD document is invalid, look for ... block and delete it.

Instructions

Installation

  1. Download the included Zip file
  2. Extract its content Copy the 2 extracted files in InkScape extensions folder:

    Linux & Mac OSX:~/.config/inkscape/extensions/

    Windows:C:/Program Files/Inkscape/share/extensions

    Usage

    1. Open any SVG file in InkScape
    2. File > Save as Select file type "OpenSCAD Bezier (*.scad)" Open the scad file in OpenSCAD Set the $fn variable to change the precision if desired and extrude the 2D shape See included photos for more information

      Limitations

      • Colours are ignored. The purpose of this tool is to generate STL files which can be 3D printed. Colours are irrelevant for this purpose.
      • Text and strokes are ignored. The SVG document needs to be converted into Path to work with those.

        Converting SVG to Path

        If you found a SVG file that is not converting properly, try the following:

        1. Open the SVG in InkScape 2. Select everything (Ctrl + A) 3. Convert everything to Path using menu Path > Object to Path (Shift + Ctrl + C) 4. Save as "OpenSCAD Bezier (*.scad)"

        If your SVG file is still not converting properly, please send it to me so I can reproduce the issue and fix it in the library.

Category: Tools

License:

Creative Commons — Attribution

Related Models

Thor Mjolnir Hammer Bic Pen preview image

Thor Mjolnir Hammer Bic Pen

effektz profile image

effektz

9,080

Diverse Schilder / various labels  for hobby & makers preview image

Diverse Schilder / various labels for hobby & makers

RPK profile image

RPK

2

Cacciavite Portachiavi - Scewdriver keychain preview image

Cacciavite Portachiavi - Scewdriver keychain

Butti Maker Studio profile image

Butti Maker Studio

20

Vorpal The Hexapod Walking Robot preview image

Vorpal The Hexapod Walking Robot

vorpal profile image

vorpal

4,978

MakerZ – Open Source 1/28 RC Drift Chassis by Fails & Makes | Açık Kaynak 1/28 RC Drift Şasisi preview image

MakerZ – Open Source 1/28 RC Drift Chassis by Fails & Makes | Açık Kaynak 1/28 RC Drift Şasisi

Fails&Makes profile image

Fails&Makes

Cute Fluffy Puppy Figurine to Print preview image

Cute Fluffy Puppy Figurine to Print

bonowski. profile image

bonowski.

2

6