GM15: Bug on importing DXF files
TobWen
Global Mapper UserTrusted User
When importing a DXF file, which contains splines, GM15 creats something... different.
Try this example (a circle with 4 control points): dxf_splines.zip
It's a valid DXF file and can be imported by other applications (CorelDraw, Illustrator etc.).
Try this example (a circle with 4 control points): dxf_splines.zip
It's a valid DXF file and can be imported by other applications (CorelDraw, Illustrator etc.).
Comments
-
Hi TobWen,
When I import the .dxf I get a circle shape, what are you seeing. I have Global Mapper v15.1 installed. Can you please download and install the latest release version and re-import the .dxf file and let me know if you are seeing the results expected?
Global Mapper v15.1:Global Mapper
Regards,
Jasmine -
I am using latest beta version and I'm seeing this:
gm15_no-circle.png
Don't tell me, this is a circle shape -
That's definitely not right I have added a bug (#13155) for the DXF spline handling, there must be something wrong in the code that converts a DXF spline into the points around it. I will look at the sample and try and determine what is going on. It's hard to tell sometimes the proper way to get points as the DXF documentation can be a bit nebulous.
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
Mike and TobWen,
A few data points that may be relevant (or not):
There are four control points, one at the middle of each "flat" section.
When I create a circle in Illustrator, the "flat" sections are oriented vertical and horizontal.
Exporting the circle and importing as DXF into Global Mapper results in a similar shape, just rotated 45 degrees.
Exporting the circle and importing as DWG results in a circle as intended.
Hmmm.
Mykle -
I've fixed the spline import from DXF so you now get a circle for that file. I have placed a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper15.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v15.xx installation folder to give it a try. If you are using the 64-bit v15 version there is a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper15_64bit.zip .
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
Tested, working.
Same question as in OCAD-thread: Is there a way to increase the number of vertices when converting the curves to lines? -
Currently the number of points used to create line features from spline curves is the same number that GDAL uses when creating spline curves from DXF files. We can certainly increase this easily, but it would of course make the files require more memory, so there is a balance. Are you missing significant shape details?
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
global_mapper wrote: »Currently the number of points used to create line features from spline curves is the same number that GDAL uses when creating spline curves from DXF files. We can certainly increase this easily, but it would of course make the files require more memory, so there is a balance.
I don't care about memory, couldn't you make it a registry switch so only advanced users might access it?global_mapper wrote: »Are you missing significant shape details?
No, but I've written a script in Python, which recreates splines from polyline objects, which have been created from splines. So I need as many information are possible to make it similar to the original version. Bad work-around, I know. But many formats, like shapefile or even GM15 itself, can't work with splines, ESRI File Geodatabases and DXF can.
I can't test it, since I can't export from my GM15 demo -
I have added support for adding a DWORD value named 'SplineCurveMult' in 'HKEY_CURRENT_USER\Software\GlobalMapper' to specify the number to multiple the control point count by to get the stroked vertex count. The default is 8, so you might try 32 or something else to get as much detail as you need. I have placed a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper15.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v15.xx installation folder to give it a try. If you are using the 64-bit v15 version there is a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper15_64bit.zip .
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Global Mapper -
Thanks, I'll test it in the next days. One of my friends will provide me a bunch of DXF and DWG files for testing.
-
Sorry for the delay, here are the promised files: dwg_dxf_testfiles.zip
R12 ASCII.dxf R12 binary.dxf <-- non working R12.dwg R13 ASCII.dxf R13 binary.dxf R13.dwg R14 ASCII.dxf R14 binary.dxf R14.dwg R2000-2002 ASCII.dxf R2000-2002 binary.dxf R2000-2002.dwg R2004-2006 ASCII.dxf R2004-2006 binary.dxf R2004-2006.dwg R2007-2009 ASCII.dxf R2007-2009 binary.dxf R2007-2009.dwg R2010 ASCII.dxf R2010 binary.dxf R2010.dwg R2013 ASCII.dxf R2013 binary.dxf <-- non working R2013.dwg
Only R2013 binary.dxf and R12 binary.dxf are non working. -
Warning: Forget the previous post... I've found several bugs. Let me create new files please...
-
I've updated the files with curves, I've created simple forms in the first example only, that wasn't enough.
Updated file: dwg_dxf_testfiles_updated.zip
correct (working as expected)R12 ASCII.dxf R13.dwg R14.dwg R2000-2002.dwg R2004-2006.dwg R2007-2009.dwg R2010.dwg
incorrect (many parts are missing)R13 ASCII.dxf R14 ASCII.dxf R2000-2002 ASCII.dxf R2004-2006 ASCII.dxf R2007-2009 ASCII.dxf R2010 ASCII.dxf R2013 ASCII.dxf
non working (not loading at all)R12 binary.dxf R12.dwg R13 binary.dxf R14 binary.dxf R2000-2002 binary.dxf R2004-2006 binary.dxf R2007-2009 binary.dxf R2010 binary.dxf R2013 binary.dxf
-
I was able to get the binary DXF files loading. We are still working on the SPLINE curves as apparently what we did before doesn't work correctly on these. I think the 3rd-party library code I used to base the spline support on also isn't right, so we may need to just roll our own. I have improved it a little, but it's not right yet. I have placed a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper15.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v15.xx installation folder to give it a try. If you are using the 64-bit v15 version there is a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper15_64bit.zip .
The DWG file still fails. The library that we (and just about everyone else outside of Autodesk) uses for DWG files crashes immediately trying to load it. We have to pass the file on to them so that they can fix it.
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
AutoCAD tells me that R12.dwg has a problem with a Viewport definition, but it fixed the file for me. I have attached the fixed file to this post.
R12_fixed.zip
I also got some information about how we can modify Global Mapper to better handle this situation, so I will give that a try when I get a chance.
Cheers,
Bob -
We have a new build which should load the splines and ellipses from the DXF/DWG files. I have placed a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper15.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v15.xx installation folder to give it a try. If you are using the 64-bit v15 version there is a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper15_64bit.zip .
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website