DXF Import Scaling

Bug #1388851 reported by mnohr
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Alvin Penner

Bug Description

I've imported a dxf and it is coming in very small. I've created the DXF in Solidworks and have imported it into MS Visio without any problems so I'm fairly certain the DXF content is accurate. I've exprted using R13 DXF format.

The attached DXF includes circles that are in groups of 4 with a diameter 0.25" with 0.75" spacing. The groups of 4 have a 3" spacing between them.

Is there some setting I need to adjust?

Tags: dxf importing
Revision history for this message
mnohr (mark-nohr) wrote :
su_v (suv-lp)
tags: added: dxf importing
Revision history for this message
su_v (suv-lp) wrote :

Please add information about OS/Platform and Inkscape version (see Inkscape menu 'Help > About Inkscape').

Changed in inkscape:
status: New → Incomplete
Revision history for this message
su_v (suv-lp) wrote :

Related earlier report:
- Bug #506538 “dxf import: possibility to choose the drawing units, not only mm”
  <https://bugs.launchpad.net/inkscape/+bug/506538>

Revision history for this message
mnohr (mark-nohr) wrote :

OS: Windows 7 SP1
Inkscape 0.48.5 r10040

Revision history for this message
Alvin Penner (apenner) wrote :

I would suggest the following procedure:
- when you first load the document, use the setting for Automatic Scaling to size A4
- this will do a preliminary fit to fit the width of the page exactly.
- now interrogate the Edit->XML editor
- there should be an entry there that says svg:desc.
- this will tell you that the automatic scale was : scale = 27.590990
- since 27 was too large, now try a new import using manual scaling (uncheck the box) and a scale factor of 10 . This will give you a reasonably sized image.

Revision history for this message
mnohr (mark-nohr) wrote : Re: [Bug 1388851] Re: DXF Import Scaling

OK Thanks Alvin.
In another program (Silhouette) I found the same behavior and discovered
they were assuming units of 1mm instead of reading the units from the
header information in the DXF. I re-exported from Solidworks using m as the
unit base and it imported accurately into that software. Unfortunately this
trick came close but things were still slightly off in Inkscape.

I have a path now to get from CAD + Graphics sw to the cutter but I'm more
inspired to use Inkscape given its superior capabilities. I would really
like to cut Visio out of the tool chain for the graphic entry.

These really seems like an Inkscape bug. Is there a way I can be notified
when the bug is fixed?

Thank you for your time and efforts looking into this.

Sincerely,
Mark Nohr

On Wed, Nov 5, 2014 at 4:29 AM, Alvin Penner <email address hidden> wrote:

> I would suggest the following procedure:
> - when you first load the document, use the setting for Automatic Scaling
> to size A4
> - this will do a preliminary fit to fit the width of the page exactly.
> - now interrogate the Edit->XML editor
> - there should be an entry there that says svg:desc.
> - this will tell you that the automatic scale was : scale = 27.590990
> - since 27 was too large, now try a new import using manual scaling
> (uncheck the box) and a scale factor of 10 . This will give you a
> reasonably sized image.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1388851
>
> Title:
> DXF Import Scaling
>
> Status in Inkscape: A Vector Drawing Tool:
> Incomplete
>
> Bug description:
> I've imported a dxf and it is coming in very small. I've created the
> DXF in Solidworks and have imported it into MS Visio without any
> problems so I'm fairly certain the DXF content is accurate. I've
> exprted using R13 DXF format.
>
> The attached DXF includes circles that are in groups of 4 with a
> diameter 0.25" with 0.75" spacing. The groups of 4 have a 3" spacing
> between them.
>
> Is there some setting I need to adjust?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/1388851/+subscriptions
>

Revision history for this message
Alvin Penner (apenner) wrote :

However, I am still somewhat unclear as to what the problem is. When I load this dxf file into QCad and view it relative to the size of an A4 page size, then it appears to be identical to what I am getting in Inkscape when I use the default manual scale factor of 1. The two programs are totally compatible as far as I can see.
    Can you indicate what it is that you were expecting to see, in terms of size of the object?

Revision history for this message
mnohr (mark-nohr) wrote :

 The attached DXF includes circles that are in groups of 4 with a
  diameter 0.25" with 0.75" spacing. The groups of 4 have a 3" spacing
  between them.

I'm no expert in DXF files but I think there is a definition of units of
measure in the header block.
http://www.autodesk.com/techpubs/autocad/acad2000/dxf/header_section_group_codes_dxf_02.htm

http://www.cocreateusers.org/forum/showthread.php?t=4761

On Wed, Nov 5, 2014 at 12:53 PM, Alvin Penner <email address hidden> wrote:

> However, I am still somewhat unclear as to what the problem is. When I
> load this dxf file into QCad and view it relative to the size of an A4 page
> size, then it appears to be identical to what I am getting in Inkscape when
> I use the default manual scale factor of 1. The two programs are totally
> compatible as far as I can see.
> Can you indicate what it is that you were expecting to see, in terms
> of size of the object?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1388851
>
> Title:
> DXF Import Scaling
>
> Status in Inkscape: A Vector Drawing Tool:
> Incomplete
>
> Bug description:
> I've imported a dxf and it is coming in very small. I've created the
> DXF in Solidworks and have imported it into MS Visio without any
> problems so I'm fairly certain the DXF content is accurate. I've
> exprted using R13 DXF format.
>
> The attached DXF includes circles that are in groups of 4 with a
> diameter 0.25" with 0.75" spacing. The groups of 4 have a 3" spacing
> between them.
>
> Is there some setting I need to adjust?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/1388851/+subscriptions
>

Revision history for this message
mnohr (mark-nohr) wrote :

 From my original bug post "
The attached DXF includes circles that are in groups of 4 with a
  diameter 0.25" with 0.75" spacing. The groups of 4 have a 3" spacing
  between them."

I'm no expert in DXF files but I think there is a definition of units of
measure in the header block.
http://www.autodesk.com/techpubs/autocad/acad2000/dxf/header_section_group_codes_dxf_02.htm

http://www.cocreateusers.org/forum/showthread.php?t=4761

On Wed, Nov 5, 2014 at 12:53 PM, Alvin Penner <email address hidden> wrote:

> However, I am still somewhat unclear as to what the problem is. When I
> load this dxf file into QCad and view it relative to the size of an A4 page
> size, then it appears to be identical to what I am getting in Inkscape when
> I use the default manual scale factor of 1. The two programs are totally
> compatible as far as I can see.
> Can you indicate what it is that you were expecting to see, in terms
> of size of the object?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1388851
>
> Title:
> DXF Import Scaling
>
> Status in Inkscape: A Vector Drawing Tool:
> Incomplete
>
> Bug description:
> I've imported a dxf and it is coming in very small. I've created the
> DXF in Solidworks and have imported it into MS Visio without any
> problems so I'm fairly certain the DXF content is accurate. I've
> exprted using R13 DXF format.
>
> The attached DXF includes circles that are in groups of 4 with a
> diameter 0.25" with 0.75" spacing. The groups of 4 have a 3" spacing
> between them.
>
> Is there some setting I need to adjust?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/1388851/+subscriptions
>

Revision history for this message
mnohr (mark-nohr) wrote :

Sorry for the email chatter. Here is another DXF

On Wed, Nov 5, 2014 at 3:58 PM, Mark Nohr <email address hidden> wrote:

> From my original bug post "
> The attached DXF includes circles that are in groups of 4 with a
> diameter 0.25" with 0.75" spacing. The groups of 4 have a 3" spacing
> between them."
>
> I'm no expert in DXF files but I think there is a definition of units of
> measure in the header block.
>
> http://www.autodesk.com/techpubs/autocad/acad2000/dxf/header_section_group_codes_dxf_02.htm
>
> http://www.cocreateusers.org/forum/showthread.php?t=4761
>
>
> On Wed, Nov 5, 2014 at 12:53 PM, Alvin Penner <email address hidden> wrote:
>
>> However, I am still somewhat unclear as to what the problem is. When I
>> load this dxf file into QCad and view it relative to the size of an A4 page
>> size, then it appears to be identical to what I am getting in Inkscape when
>> I use the default manual scale factor of 1. The two programs are totally
>> compatible as far as I can see.
>> Can you indicate what it is that you were expecting to see, in terms
>> of size of the object?
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1388851
>>
>> Title:
>> DXF Import Scaling
>>
>> Status in Inkscape: A Vector Drawing Tool:
>> Incomplete
>>
>> Bug description:
>> I've imported a dxf and it is coming in very small. I've created the
>> DXF in Solidworks and have imported it into MS Visio without any
>> problems so I'm fairly certain the DXF content is accurate. I've
>> exprted using R13 DXF format.
>>
>> The attached DXF includes circles that are in groups of 4 with a
>> diameter 0.25" with 0.75" spacing. The groups of 4 have a 3" spacing
>> between them.
>>
>> Is there some setting I need to adjust?
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/inkscape/+bug/1388851/+subscriptions
>>
>
>

Revision history for this message
Alvin Penner (apenner) wrote :

sorry about that, I did not read the original post carefully. So this looks like a deficiency in both QCad and Inkscape.
If I read the QCad data correctly, this means that the document units are actually inches, not mm.
I will take a look at the dxf file over the next week or so, to see if this can be detected automatically.

su_v (suv-lp)
Changed in inkscape:
importance: Undecided → Medium
status: Incomplete → Confirmed
Revision history for this message
Alvin Penner (apenner) wrote :

attached is a modified version of this extension to deal with the scaling issue

Revision history for this message
Alvin Penner (apenner) wrote :

    it adds a new option 'read from file' to the input scaling options. This new option uses the variable $MEASUREMENT to determine whether the input scale is inches or mm.
    to use this new version you'll need to copy both files to the \Inkscape\share\extensions\ directory.
    this version is designed to run in recent trunk, with a Inkscape resolution of 96 dpi, not the previous 90 dpi. It will run in Inksc ape 0.48.5 if desired, but the resolution will still be 96 not 90, and you will also need to update the file inkex.py from the Inkscape repository, at:
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/files/head:/share/extensions/

Revision history for this message
Alvin Penner (apenner) wrote :

fix committed to rev 13692

Changed in inkscape:
status: Confirmed → Fix Committed
assignee: nobody → Alvin Penner (apenner)
su_v (suv-lp)
Changed in inkscape:
milestone: none → 0.92
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.