Testing TechDraw: SVG export failing ?

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Testing TechDraw

Post by HoWil »

wandererfan wrote:
HoWil wrote:Try adding this to the TechDraw section of your "user.cfg" and let me know what results you get.

Code: Select all

            <FCParamGroup Name="Rez">
              <FCFloat Name="Resolution" Value="10.000000000000"/>
            </FCParamGroup>
It seems to fix the problem here :D , but I don't know why :cry:
wf
:D It resolves the problem :!:

Is it possible to put this in master?

Again, many thanks,
BR,
HoWil
User avatar
wandererfan
Veteran
Posts: 6315
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Testing TechDraw

Post by wandererfan »

HoWil wrote:Is it possible to put this in master?
On the way - github.com/FreeCAD/FreeCAD/pull/663
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Testing TechDraw

Post by HoWil »

wandererfan wrote:Try adding this to the TechDraw section of your "user.cfg" and let me know what results you get.

Code: Select all

            <FCParamGroup Name="Rez">
              <FCFloat Name="Resolution" Value="10.000000000000"/>
            </FCParamGroup>
It seems to fix the problem here :D , but I don't know why :cry:

wf
Dear wandererfan,
Looks like the above set Resolution (or the internally done modification) changes the values for internally scaling the svg. I see a scaling factor of 10 when I open an exported .svg in Inkscape.
Screenshot from 2017-04-07 11-02-34.jpg
Screenshot from 2017-04-07 11-02-34.jpg (112.88 KiB) Viewed 3546 times
This results in x10 scaled .dxf when export the svg with Inkscape.
This parameter is usually set to 1.! Is is possible to set it back?
BR,
HoWil
User avatar
wandererfan
Veteran
Posts: 6315
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Testing TechDraw

Post by wandererfan »

HoWil wrote:This results in x10 scaled .dxf when export the svg with Inkscape. This parameter is usually set to 1.! Is is possible to set it back?
The FC page is drawn at 10px/mm, that's why the viewbox is 2970x2100. There's nothing in the generated SVG code that says "Scale=10".

I don't have that "Scale" groupbox in my "Document Properties" (Inkscape 0.91), so I can't figure out what it means. What happens if you change it to 1 and then export?
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Testing TechDraw: SVG export failing ?

Post by HoWil »

If I change it to 1 the export works as expected... the dimensions in .dxf are the same as in FC and in the .svg.
This is my current workaround but I have to admit that each additional step in producing a final .dxf a source of error (i simply can forget it).

Is Resolution=1 no option? Is it the original setting?
BR
HoWil
jidoeuf
Posts: 43
Joined: Sun Mar 01, 2015 4:06 pm

Re: Testing TechDraw

Post by jidoeuf »

HoWil wrote:Is Resolution=1 no option? Is it the original setting?
I think so, look at the commit:
https://github.com/FreeCAD/FreeCAD/pull ... a77baad195
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Testing TechDraw

Post by HoWil »

wandererfan wrote: I don't have that "Scale" groupbox in my "Document Properties" (Inkscape 0.91), so I can't figure out what it means. What happens if you change it to 1 and then export?
The. dxf outputs should be scaled in/from 0.91 too.
jidoeuf wrote:
HoWil wrote:Is Resolution=1 no option? Is it the original setting?
I think so, look at the commit:
https://github.com/FreeCAD/FreeCAD/pull ... a77baad195
Thx.
wandererfan wrote:It seems to fix the problem here :D , but I don't know why :cry:
Any other suggestions?
Thanks in advance,
Howil
User avatar
wandererfan
Veteran
Posts: 6315
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Testing TechDraw

Post by wandererfan »

HoWil wrote:dxf outputs should be scaled in/from 0.91 too.
They are scaled on output but there is no option in the gui to select scale or alter viewbox
HoWil wrote:Is Resolution=1 no option? Is it the original setting?
Resolution=1 will bring back your size problem.
wandererfan wrote:It seems to fix the problem here :D , but I don't know why :cry:
The 12.04 machine already had a resolution=10 entry, the 16.04 did not.
HoWil wrote:Any other suggestions?
Not at the moment. Svg -> Dxf seems to be troublesome - google "inkscape dxf scale".

wf
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Testing TechDraw: SVG export failing ?

Post by HoWil »

wandererfan wrote:Svg -> Dxf seems to be troublesome - google "inkscape dxf scale".
Usually it is not, as long as you use px as unit for export (see also e.g. http://www.inkscapeforum.com/viewtopic. ... 24&p=53129)
BR,
HoWil

EDIT: Sorry for being so persistent. Previously I used drawing-wb where still all no scaling happens!
I really love techdraw and only want to make it a real 100% solid replacement for drawing.
User avatar
wandererfan
Veteran
Posts: 6315
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Testing TechDraw: SVG export failing ?

Post by wandererfan »

HoWil wrote: Sorry for being so persistent.
Don't be. Persistence is good. :)
Post Reply