Coder Social home page Coder Social logo

Comments (4)

martymcguire avatar martymcguire commented on May 29, 2024

This is an issue that crops up when using this (aging) plugin with recent versions of Inkscape when a document has no units. Try setting the units to px or mm in document settings.

from inkscape-openscad-poly.

bzamecnik avatar bzamecnik commented on May 29, 2024

When I set from mm to px, it finally produced a nice SCAD file! When I looked at the source the getLength() supports only 'px', '%' or '' (no units). Nice thing is that I can just modify the python script and it has an immediate effect, no need for building anything. :)

Thanks for help, Marty!

Maybe I could try to fix some other bugs:

  • the SCAD file contains some invalid lines at the beginning:
('UNITS:', 1541.312, 'px')
('UNITS:', 1203.1851, 'px')
  • when there's a more complex shape, multiple modules are created, instead of a single group
  • it should handle other units (such as mm) without a crash

I like more this approach of directly exporting to SCAD rather than to intermediate DXF. Then there's no need to import anything, just include an SCAD file.

from inkscape-openscad-poly.

martymcguire avatar martymcguire commented on May 29, 2024

Hmm. Not sure where the spurious lines in the OpenSCAD are coming from. Maybe some bad handling of (new?) metadata in the Inkscape SVG file?

Unfortunately, I haven't had time to play with this code in a long time. Any improvements are most welcome!!

from inkscape-openscad-poly.

baxerus avatar baxerus commented on May 29, 2024

See my pull request #5.
And please test it. I only tested it myself so far...

from inkscape-openscad-poly.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.