typemytype / drawbot

http://www.drawbot.com
Other
391 stars 61 forks source link

Support DXF format #374

Open GitBruno opened 4 years ago

GitBruno commented 4 years ago

To send files to either 3D software or Lasercutter it would be good to be able to export to DXF. Converting to DXF from other formats is impossible as DXF is the only format that I am aware of that saves a circle as location and diameter?

I am trying ezdxf atm. But let me know if there is a better way! Implementation would mean adding another pip package.

Thanks!

typemytype commented 4 years ago

3D support would be very cool!!!

I guess this is not so hard by adding a DXF context.

You should subclass a BaseContext and implement a few callbacks (only the one your needs) The BaseContext does all the work, only context specific actions are required

see a print context https://github.com/typemytype/drawbot/blob/master/drawBot/context/printContext.py

or a glyph context where drawBot draws to a glyph like object: https://github.com/typemytype/drawBotRoboFontExtension/blob/master/DrawBot.roboFontExt/lib/glyphContext.py