KiCAD unit issues with DXF files exported from FreeCAD
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
KiCAD unit issues with DXF files exported from FreeCAD
I've no experience in this topic but I came across this in the KiCAD forum.
They are having issues with DXF files exported from FreeCAD.
It seems FreeCAD DXF export does not add $LUNITS and $INSUNITS both of which are needed for correct importing into KiCAD.
https://forum.kicad.info/t/units-once-m ... e/10844/20
Should I create a bug report?
They are having issues with DXF files exported from FreeCAD.
It seems FreeCAD DXF export does not add $LUNITS and $INSUNITS both of which are needed for correct importing into KiCAD.
https://forum.kicad.info/t/units-once-m ... e/10844/20
Should I create a bug report?
- wandererfan
- Veteran
- Posts: 5988
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: KiCAD unit issues with DXF files exported from FreeCAD
I can't tell from this post which Dxf exporter is being used in FC. There are 2 - "legacy" and "new". I know the new one does not have support for units yet. Not sure about the old one.
Any chance we can find out from KiCAD which one was used?
(Note the legacy "importer" also handles exports)
Re: KiCAD unit issues with DXF files exported from FreeCAD
I'm not sure if the exporter depends on the 'legacy' setting...wandererfan wrote: ↑Fri May 25, 2018 2:14 pmI can't tell from this post which Dxf exporter is being used in FC. There are 2 - "legacy" and "new". I know the new one does not have support for units yet. Not sure about the old one.
Any chance we can find out from KiCAD which one was used?
(Note the legacy "importer" also handles exports)
here what I get from the python console:
Code: Select all
import importDXF
importDXF.export(__objs__,u"C:/Temp/step-cadexchanger/internal.dxf")
__objs__.append(FreeCAD.getDocument("Unnamed").getObject("Shape2DView"))
...
import importDXF
importDXF.export(__objs__,u"C:/Temp/step-cadexchanger/legacy.dxf")
- wandererfan
- Veteran
- Posts: 5988
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: KiCAD unit issues with DXF files exported from FreeCAD
I took a quick look through Draft/importDXF.py and I didn't see anything obvious related to units.
Looks like we need an issue report.
Looks like we need an issue report.
Re: KiCAD unit issues with DXF files exported from FreeCAD
done here:wandererfan wrote: ↑Fri May 25, 2018 6:54 pm I took a quick look through Draft/importDXF.py and I didn't see anything obvious related to units.
Looks like we need an issue report.
https://www.freecadweb.org/tracker/view.php?id=3494
Re: KiCAD unit issues with DXF files exported from FreeCAD
following the KiCad forum:wandererfan wrote: ↑Fri May 25, 2018 6:54 pm I took a quick look through Draft/importDXF.py and I didn't see anything obvious related to units.
Looks like we need an issue report.
The fun you find while digging into obscure specifications
$INSUNITS was introduced in the “Autocad 2000” specification for DXF.
This means any export methods set to AC1006 = R10, AC1009 = R11 and R12, AC1012 = R13 or AC1014 = R14. Will not have that tag present if the tool is respecting the export option,
Freecads export is for AC1009 / R12, so it will never include that tag so long as they are following the specification, and to include it would involve them remaking the exporter to support whatever the Autocad 2000 version is.
Before this, It was simply that DXF files where unitless, Most tools like solidworks and Autocad assumed this to be in inches if not specified on import,
Re: KiCAD unit issues with DXF files exported from FreeCAD
I had this issue once too. Back than it turned out the DXF version freecad exports does not use units, it is not in this versions standart. You can check the version by the DXF file header, there is a identifier which you can than relate to the spec version.
The conclusion back than was, that the error is on the importing software site: it needs to check the specification version of the DXF and use units only when supportet by it.
Don't know if this is still valid though it if freecad has upgraded the DXF version.
The conclusion back than was, that the error is on the importing software site: it needs to check the specification version of the DXF and use units only when supportet by it.
Don't know if this is still valid though it if freecad has upgraded the DXF version.
-
- Posts: 9
- Joined: Mon Sep 10, 2018 7:50 pm
Re: KiCAD unit issues with DXF files exported from FreeCAD
I am willing to offer a reward to whoever fixes this issue and the related 3594 issue tracker id.
Re: KiCAD unit issues with DXF files exported from FreeCAD
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
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
Re: KiCAD unit issues with DXF files exported from FreeCAD
https://github.com/FreeCAD/FreeCAD/pull/6830 adds the unit block to header14.rub file
When I create a sketch and export it as .dxf then e.g. VariCAD viewer no longer prints a warning about the missing units.
When I create a sketch and export it as .dxf then e.g. VariCAD viewer no longer prints a warning about the missing units.