svg export issues
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 11
- Joined: Thu Feb 09, 2012 5:41 am
Re: svg export issues
Thanks for the pull Shoogen, and thanks for the guidance Yorik!
Tonight I'll try to make some parts again and see what else I run into
Tonight I'll try to make some parts again and see what else I run into
Re: svg export issues
Hi guys,
I admit to not understanding everything that's been said. The matter of svg units (mm vs. pixels) is a good one, and I wish we wouldn't settle on status quo (as it's been the case ?).
There is one important problem that has not been addressed yet in FreeCAD, printing in real scale. Due to exactly what seb_kuzminsky said, it is currently impossible to print out an svg produced by the Drawing module in real scale.
I've looked into Inkscape too, and I have found no way to get an svg produced by FreeCAD' Drawing module to be converted to real scale without having to scale all objects manually. But even then, having to go to Inkscape for that is a hassle. It would really be useful if we could get a way to print out a page in the scale it's supposed to directly from FreeCAD.
I'm talking about this because I'm about to work on a home project in FreeCAD, and wish to print drawing views to scale...
I admit to not understanding everything that's been said. The matter of svg units (mm vs. pixels) is a good one, and I wish we wouldn't settle on status quo (as it's been the case ?).
There is one important problem that has not been addressed yet in FreeCAD, printing in real scale. Due to exactly what seb_kuzminsky said, it is currently impossible to print out an svg produced by the Drawing module in real scale.
I've looked into Inkscape too, and I have found no way to get an svg produced by FreeCAD' Drawing module to be converted to real scale without having to scale all objects manually. But even then, having to go to Inkscape for that is a hassle. It would really be useful if we could get a way to print out a page in the scale it's supposed to directly from FreeCAD.
I'm talking about this because I'm about to work on a home project in FreeCAD, and wish to print drawing views to scale...
Re: svg export issues
https://blueprints.launchpad.net/inksca ... real-units
https://bugs.launchpad.net/inkscape/+bug/170738
Maybe we need a third option 'scale to 90dpi (for inkscape)' as long as the viewbox support doesn't respect real world units.
EDIT
The bugs mentioned above only consider the automatic conversion of units in inkscape. So inkscape shouldn't make any problems here.
in the long run printing from FreeCAD is a disireable feature. But someone has to choose a svg renderer.
cairo, webkit??
https://bugs.launchpad.net/inkscape/+bug/170738
Maybe we need a third option 'scale to 90dpi (for inkscape)' as long as the viewbox support doesn't respect real world units.
EDIT
The bugs mentioned above only consider the automatic conversion of units in inkscape. So inkscape shouldn't make any problems here.
in the long run printing from FreeCAD is a disireable feature. But someone has to choose a svg renderer.
cairo, webkit??
Last edited by shoogen on Sat Feb 11, 2012 10:15 pm, edited 2 times in total.
Re: svg export issues
Ouch, second bug is almost 7 years old and still no change.
But anyway, I still think we shouldn't need to open another program (Inkscape) to print something generated by FreeCAD, or what's the use of the Drawing module?
But anyway, I still think we shouldn't need to open another program (Inkscape) to print something generated by FreeCAD, or what's the use of the Drawing module?
Re: svg export issues
I don't totally understand the problem... When inkscape opens a drawing that is in another unit, it scales it to 90dpi, okay. But what is wrong when you export from the Drawing page? I think if you put things there at 1:1 scale, they should be in the SVG doc at 1:1 too, no?
Re: svg export issues
Do the results differ in any way when you compare CAM output and drawing (old style) output?normandc wrote:There is one important problem that has not been addressed yet in FreeCAD, printing in real scale. Due to exactly what seb_kuzminsky said, it is currently impossible to print out an svg produced by the Drawing module in real scale.
Re: svg export issues
Take a look. Attached zipped svg was exported from the Drawing workbench.yorikvanhavre wrote:I don't totally understand the problem... When inkscape opens a drawing that is in another unit, it scales it to 90dpi, okay. But what is wrong when you export from the Drawing page? I think if you put things there at 1:1 scale, they should be in the SVG doc at 1:1 too, no?
I still think that users should not be forced to install another software so they can print their drawings to the scale they want. The Drawing module should allow that, like in any other software. Here's a screen capture of a Drawing page in A format (US letter which is similar to A4) along with the Print Preview. You can clearly see that it won't print to the correct scale, it's not even worth trying. And there is nothing I can do to correct this within FreeCAD.
As for Inkscape, no it's not 1:1. Here's the original svg opened in Inkscape:
It looks fine, but look at the Document Properties window: its size is 279,40 x 215,9 pixels. But it should be 279,4 x 215,9 millimeters to print to scale.
How the heck do I do that??? Because if I select "US Letter" as page size, look at the size of the template in the page now:
So I have to scale everything on the page manually, and calculate by how much so it prints right.
Now, if I attempt to print the document as is, here's what the Printing dialog tells me:
It considers the page to be 60,9 x 79,9mm! ANd I have no way to set a page format. The Paper size field is greyed out showing "custom".
- Attachments
-
- Index_Arm_v4.svg.zip
- (8.66 KiB) Downloaded 45 times
Last edited by NormandC on Sun Feb 12, 2012 4:25 am, edited 1 time in total.
Re: svg export issues
Sorry but I have no idea what you mean in either case.shoogen wrote:Do the results differ in any way when you compare CAM output and drawing (old style) output?
Re: svg export issues
I added absolute units and the viewbox to the drawing templates.
https://github.com/5263/free-cad/tree/s ... /Templates
https://github.com/5263/free-cad/commit ... a33bde6022
https://github.com/5263/free-cad/tree/s ... /Templates
https://github.com/5263/free-cad/commit ... a33bde6022
- Attachments
-
- a3-land-pdfoutput.zip
- PDF Output from QT and from Inkscape for the a3-landscape template
- (67.72 KiB) Downloaded 39 times
Re: svg export issues
Okay, now I understand.
I think shoogen's changes should solve the problem. I'll give it a bit of testing
I think shoogen's changes should solve the problem. I'll give it a bit of testing