Newby - how to export to .svg (solved)

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
Vinito
Posts: 4
Joined: Sat Jun 19, 2021 3:37 am

Newby - how to export to .svg (solved)

Post by Vinito »

Sorry I even have to ask, but I looked at the help files and searched the forum. I think my problem is so basic that it just doesn't get covered, but try as I might, I just can't get past step 1 I think.

I'm just trying to export a simple 2D sketch in either .svg or .dxf (I would prefer .svg if I can) so I can then import it into some CAM software for a plasma cutter. I can draw a sketch fine - it's just simple shapes for now. But when I try to export, I select the lines in a selection box, or select the body from the tree, and it gives me the same error no matter what I do.
Image

Can anybody walk me through the process? I figured this should be about as dead simple as it could be, but I'm stumped. Been a brick wall for a couple days believe it or not.
I'm using - Version .19 - build #24291 (I had .18 installed for a while and just replaced it with this freshly downloaded and installed version - should be darn current)

Thanks for any help.
Last edited by Vinito on Sat Jun 19, 2021 2:41 pm, edited 1 time in total.
chrisb
Veteran
Posts: 54288
Joined: Tue Mar 17, 2015 9:14 am

Re: Newby - how to export to .svg

Post by chrisb »

Drawing workbench is deprecated. Use TechDraw instead.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Vinito
Posts: 4
Joined: Sat Jun 19, 2021 3:37 am

Re: Newby - how to export to .svg

Post by Vinito »

Excuse my ignorance.
I didn't mention Drawing workbench because I wasn't using that at all. It looks like TechDraw is for printing a drawing on paper with title bars and such. Am I mistaken?

All I was trying to do is sketch the shape I need to manufacture (just 2D line drawing) and export it as .svg file so I can import that into other software later. I just opened up Part Design as usual - create body - create sketch, close and save, then I tried to select the lines I drew and export. That generates the error window posted above.
User avatar
Willem
Veteran
Posts: 1854
Joined: Fri Aug 12, 2016 3:27 pm
Location: Lisse, The Netherlands

Re: Newby - how to export to .svg

Post by Willem »

Welcome to the forum.
Do not select the lines but select in the treeview the sketch
heda
Veteran
Posts: 1348
Joined: Sat Dec 12, 2015 5:49 pm

Re: Newby - how to export to .svg

Post by heda »

could it be like this...

you mark your sketch or draft object that you want to export (also in the treeview)
you are using menu "file/export" and then in the drop-down for formats
you are choosing "Drawing (*.svg, *.svgz, *.dxf)"
and you get the error message you posted

if want to export a sketch or draft object directly to svg or dxf.
you need to choose those specific "native" formats "Flattened SVG (*.svg)" or "Autodesk DXF 2D (*.dxf)".

why is it like this...
the hint is in the name of the option you tried with, sure it says "drawing",
but it is not "drawing" in the sense of the spoken word drawing, and the hint is that it actually list 3 different file formats.
so drawing in this context really means that you have to have a "drawing object", more specifically a
"freecad drawing object/page" which is created by the workbench "drawing".

with this in mind, the error dialogue you get probably makes sense also to you.

now wb drawing is depreciated, and "techdraw" should be used instead, it is analogue though if you look at export options.
if you in export dropdown choose "Technical Drawing (*.svg, *.svgz, *.dxf)" you in the treeview have to choose an object/page created by techdraw wb.

I totally understand that this trips new users. I actually answered the exact same question less than a week ago, but then formulated differently, and if you search you will probably find 100's of those questions in different posts over time.

can't help but smile a bit on the inside every time I am exporting to plain svg,
who would have thought that the correct place to look for that option orders under the character "F" :-).
Vinito
Posts: 4
Joined: Sat Jun 19, 2021 3:37 am

Re: Newby - how to export to .svg

Post by Vinito »

Thanks.
You tripped me up when you talked about needing to use "techdraw" and needing to choose an object/page created by techdraw wb. I poked around in that for a while but soon it was going off the rails. Then I dropped back and eventually figured out what I needed.

Your important help was when you said I simply needed to choose "flattened SVG" or Autodesk dxf 2d" of course. I didn't need to use any special workbenches (necessarily). I only needed to select a body and choose the proper format (flattened svg or autodesk dxf 2d). I could do that from even the part design workbench.

What worked even better is using the "Draft" workbench to select the body then create a "Shape 2D view", then export that object rather than the 3D body. Exporting the 3D body created overlapping outlines. My CAM software will delete those when it can. But by exporting the object created with "Shape 2D view" instead, my CAM software imports that with none of those overlapping line rubbishes.

Thanks for pointing me in the right direction. It is pretty dead simple after all, just as I expected it should be.

Solved! (for me)
heda
Veteran
Posts: 1348
Joined: Sat Dec 12, 2015 5:49 pm

Re: Newby - how to export to .svg (solved)

Post by heda »

glad to hear you are over that specific hurdle :-)

maybe you can share more specifically where you tried to find your answer (like where on the wiki, which words you were looking for etc),
and hopefully that can lead to some updates of docs that improves discoverability of how to export directly to svg/dxf.

a random thought is that it should not be overly had to have supporting crutches in the code to make things easier,
like instead of the error message currently given, have something like "did you mean plain svg" as option in the dialogue and a button for that.
Vinito
Posts: 4
Joined: Sat Jun 19, 2021 3:37 am

Re: Newby - how to export to .svg (solved)

Post by Vinito »

Sure.
I think on any help document regarding exporting, it would be helpful to new idiots like myself to note on the first paragraph not only that there are several formats to choose from, but that it's common for newcomers to NOT know about what I didn't know about, namely that common formats that tons of folks will certainly be using shall likely be mistaken in assuming they simply look for .dxf format will instead need to look for "flattened SVG" and/or "AutoCAD dxf 2D".

With 3D printing being so popular, it might be a tendency for devs to gloss over the OTHER common newby use for FreeCAD, namely everything else like laser cutters, plasma cutters, even CNC machining and routers. It's common, inexpensive, and easy to use the typical code-generating software that either comes packaged with these devices or is ubiquitous in those "communities". Thus the only thing most of these people will typically need from FreeCAD is a better way to draw precise shapes so it can be exported to a format that can easily be imported into those softwares (i.e. rather than generating the g-code with FreeCAD which, although it's likely doable, isn't tailored to be task-specific and drop-in easy to generate in other 3rd party CAM software). This will be a very common task lots of beginners will want to accomplish - again, just needing to use FreeCAD to precisely create the shapes to then export as SVG or the like.

Had I noticed or been able to easier find the "flattened SVG" and/or "AutoCAD dxf 2D" options, I would have spent tons less time figuring it out. I did a lot of searching for "exporting" and the like, and though I found several sources of information, I didn't run across anywhere but this thread that 'dxf doesn't mean what you think it does and that I should instead go to "Flattened SVG" and/or "AutoCAD dxf 2d".

The other thing that folks should know is it will be a good idea to convert bodies into flat 2D objects via "Shape 2D view". I don't know technicals, but what I'm imagining in my head is this operation is essentially using a projection of the sketched shapes onto a plane as an object which can then be easily exported as described above. That's probably an extremely important step to be done by the types of users I'm speaking of.

Honestly, doing this kind of thing is common enough that I feel it could warrant a specific video laying out the recipe of steps to get from one end to the other so folks can find it and pick it up quickly. After I figured it out, it IS dead easy. I just couldn't flush out my mistake. Basically it took me a couple days off & on to figure out what I needed to and could have learned in about 10 minutes had I been able to access the correct applicable process.

In summary - 1) make clear the common error folks like me will make, i.e. thinking I need to look for (for instance) SVG rather than flattened SVG (as heda pointed out for me)
In my opinion, this operation is so common it should eventually be something folks bump into often in tutorials and such so that it will penetrate dense skulls like mine. "Rule of three" or whatever.
2) the process of "Shape 2D view" from the "Draft" workbench might be a very important preliminary step to take to assure a clean usable export. (maybe not always, but good insurance)
heda
Veteran
Posts: 1348
Joined: Sat Dec 12, 2015 5:49 pm

Re: Newby - how to export to .svg (solved)

Post by heda »

did you come across pages like this in your search for an answer?
FreeCAD_Howto_Import_Export
Drawing
DXF
SVG
[wiki]Manual:Preparing_models_for_3D_printing[/wiki] (interesting, obviously not possible to wiki-link to manual...)

not that any of those pages would have helped in current state, just wondering if you did find them or not.
Post Reply