Creating SVG Export for lasercutting

Discussions about the development of the TechDraw workbench
User avatar
christi
Posts: 197
Joined: Wed Oct 24, 2018 7:03 am
Location: Karlsruhe, Germany
Contact:

Creating SVG Export for lasercutting

Post by christi »

Hello FreeCAD fans,

we have a lasercutter that uses .svg files as input.
I would like to generate .svg files from my FreeCAD designs.
The laser beam width has to be considered, but I do not want to add it in my design.

I have created a script that is doing this task:
  • Select several parts in the FreeCAD design
  • Create 3D outline objects from all selected items
  • Rotate them into the XY-plane
  • Create views in a TechDraw page
  • Arrange the views to fit in the page with minimal gaps
Image
Last edited by christi on Sun Jul 28, 2019 8:05 am, edited 2 times in total.
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Creating SVG Export for lasercutting

Post by bitacovir »

Wow. This is cool. Well done. I think this could be useful for Arch Panel Tool.
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

Canal Youtube Grupo Telegram de FreeCAD Español

My personal web site
My GitHub repository
Mini Airflow Tunnel Project
chrisb
Veteran
Posts: 52149
Joined: Tue Mar 17, 2015 9:14 am

Re: Creating SVG Export for lasercutting

Post by chrisb »

Looks great. It should be documented and integrated into AddonManager.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Kunda1
Veteran
Posts: 13443
Joined: Thu Jan 05, 2017 9:03 pm

Re: Creating SVG Export for lasercutting

Post by Kunda1 »

Where should this be documented?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
chrisb
Veteran
Posts: 52149
Joined: Tue Mar 17, 2015 9:14 am

Re: Creating SVG Export for lasercutting

Post by chrisb »

Other addons have a documentation page on their Github home or on the Macros recipes page if they are integrated there.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
christi
Posts: 197
Joined: Wed Oct 24, 2018 7:03 am
Location: Karlsruhe, Germany
Contact:

Re: Creating SVG Export for lasercutting

Post by christi »

All right,
I have added some documentation here:
https://github.com/chbergmann/LasercutterSVGExport
chrisb
Veteran
Posts: 52149
Joined: Tue Mar 17, 2015 9:14 am

Re: Creating SVG Export for lasercutting

Post by chrisb »

Thanks! I'm not sure what has to be done to integrate it in the Addon manager.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Kunda1
Veteran
Posts: 13443
Joined: Thu Jan 05, 2017 9:03 pm

Re: Creating SVG Export for lasercutting

Post by Kunda1 »

chrisb wrote: Sun Oct 28, 2018 7:53 am Thanks! I'm not sure what has to be done to integrate it in the Addon manager.
I think it should automagically be available in the Addon Manager once it gets approved in to the FreeCAD-macros repo
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
wandererfan
Veteran
Posts: 5988
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Creating SVG Export for lasercutting

Post by wandererfan »

christi wrote: Sat Oct 27, 2018 6:13 pm I have created a script that is doing this task:
  • Select several parts in the FreeCAD design
  • Create 3D outline objects from all selected items
  • Rotate them into the XY-plane
  • Create views in a TechDraw page
  • Arrange the views to fit in the page with minimal gaps
Very awesome!

And using "Coarse" option for the projection, too! Did you have any issues with the number of Vertexes generated?

wf
User avatar
christi
Posts: 197
Joined: Wed Oct 24, 2018 7:03 am
Location: Karlsruhe, Germany
Contact:

Re: Creating SVG Export for lasercutting

Post by christi »

wandererfan wrote: Sun Oct 28, 2018 1:30 pm Did you have any issues with the number of Vertexes generated?
No, it is working quite good, but it may take some time to finish.
Post Reply