Go Back   Global Mapper Forum > Features Discussion > Vector Data

Vector Data Topics about importing, exporting and using vector (shp, dxf, dgn, etc.) data

Reply
 
LinkBack Thread Tools Display Modes
Old 10-27-2009, 07:12 PM
Global Mapper User
 
Join Date: Aug 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default DXF Problem

Mike,

Anytime I export a dxf file(File Menu/Export Vector Data/Export Dxf...) from a TIN generated layer in GM, I get an import error in 3D Studio Max 2010.

Unable to open:

<path blah/file.dxf>

The error code reported is eBadDxfSequence

The only way I can get the Dxf load is by resaving the file with another application(Presagis Creator). At this point, the file will now load into 3D Studio Max 2010. Although, I realize this may be a GM problem I need a way to correct this without resaving via creator if possible. I can post or email the file if it helps you to compare the difference between the GM exported dxf and resaved dxf.

P.S. If I just export Dxf lines and not Dxf meshes then the files seem to be readable by 3D Studio Max without conversion.

Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-27-2009, 07:15 PM
Global Mapper User
 
Join Date: Aug 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default Re: Dxf Error

Need to attach file..
Attached Files
File Type: zip before_after_files.zip (10.40 MB, 1 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-27-2009, 08:10 PM
Administrator
 
Join Date: Jun 2007
Posts: 6,394
Thanks: 2
Thanked 521 Times in 507 Posts
Default

Mike,

I took a look and found that Global Mapper was exporting an extra SEQEND after the 3DFACE entity for each TIN face, which was likely the cause of the problem. I have placed a new build at http://www.globalmapper.com/global_mapper11.zip with this fixed for you to try. Simply download that file and extract the contents into your existing v11.xx installation folder to give it a try. If you are using the 64-bit version, there is a new build available at http://www.globalmapper.com/global_mapper11_64bit.zip .

Let me know if I can be of further assistance.

Thanks,

Mike
Global Mapper Support
support@globalmapper.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-28-2009, 05:55 PM
Global Mapper User
 
Join Date: Aug 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default Almost fixed!

Mike,

I appreciate your help! We are almost have a solution. I am getting another error now BUT, I was able to fix it via a hex editor(HxD). Once I did this it imports correctly.

New Error:

Unable to open:
<path blah>\temp.dxf
The error code reported is eDuplicateLayerName

Here are the details on how I corrected it using new build of GMv11 and hex editor:

1) Open the original temp.dxf(attached below) exported from GM v11 into Creator.
2) Exported it out to xtemp.dxf(attached below).

I after looking at the both of these files(temp.dxf and xtemp.dxf) side by side in wordpad or hex editor I notice a slight difference in the entries for 3DFACE.

Here is the GM version of the 3DFACE entry:

3DFACE
8
TIN_Face_Area
10
-7773.65
20
3221.98
30
460.562
11
-8307.97
21
2933.76
31
439.691
12
-8208.25
22
2933.77
32
443.889
13
-8208.25
23
2933.77
33
443.889
8
TIN_Face_Area
0

Here is a version of the entry for 3DFACE in the working file:

3DFACE
8
mg_to_dxf <-- layer name changed from "TIN_Face_Area"
62
7
10
61719.67
20
-53205.75
30
517.30
11
60977.57
21
-55729.84
31
490.30
12
61719.67
22
-55501.61
32
473.48
13
61719.67
23
-55501.61
33
473.48
0

3) Taking the original temp.dxf i did a find and replace of all:

8
TIN_Face_Area

Hex: 38 0D 0A 54 49 4E 5F 46 61 63 65 5F 41 72 65 61 0D 0A

occurences of entries and replaced them with nothing.

4) At this point each 3DFACE entry in temp.dxf looks like this:

3DFACE
10
-7773.65
20
3221.98
30
460.562
11
-8307.97
21
2933.76
31
439.691
12
-8208.25
22
2933.77
32
443.889
13
-8208.25
23
2933.77
33
443.889
0

5) Then using the 3DFACE header similar to the one from the working file xtemp.dxf I did a find and replace. I replaced this in temp.dxf:

3DFACE
10

Hex: 33 44 46 41 43 45 0D 0A 20 20 20 20 31 30 0D 0A

with this:

3DFACE
8
mg_to_dxf
62
7
10

Hex: 33 44 46 41 43 45 0D 0A 20 20 38 0D 0A 6D 67 5F 74 6F 5F 64 78 66 0D 0A 20 20 36 32 0D 0A 37 0D 0A 20 20 31 30 0D 0A

6) I then saved this modifed version of temp.dxf as working_temp.dxf.

Edit:
The first occurences of:

Hex: 33 44 46 41 43 45 0D 0A 20 20 20 20 31 30 0D 0A in temp.dxf is special

Hex: 33 44 46 41 43 45 0D 0A 20 20 31 30 0D 0A it has an extra 0x20 pair so you will need to find and replace it with:

Hex: 33 44 46 41 43 45 0D 0A 20 20 38 0D 0A 6D 67 5F 74 6F 5F 64 78 66 0D 0A 20 20 36 32 0D 0A 37 0D 0A 20 20 31 30 0D 0A

as we did above. (Note: If you dont do this it will give an error about missing group name or something like that.)

Done! 3D Studio Max 2010 will read this dxf without issue.

So is this possibly a DXF version specification difference or a bug?

I would be nice if we GM would do this for me but if it invalidates some DXF specification standard let me know.

Thanks for your support!
Mike
Adsync Technologies
Attached Files
File Type: zip test_case_dxfs.zip (10.38 MB, 0 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-28-2009, 05:59 PM
Global Mapper User
 
Join Date: Aug 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default final result file

Mike,

Here is the final file after i modified it using the steps in previous post.

Mike
Attached Files
File Type: zip working_temp.zip (5.18 MB, 0 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-28-2009, 06:27 PM
Administrator
 
Join Date: Jun 2007
Posts: 6,394
Thanks: 2
Thanked 521 Times in 507 Posts
Default

Mike,

Actually from the error I think the problem is that the layer name is duplicated at the start and end of the 3DFACE feature. I have fixed that so hopefully now all problems are fixed. I have placed a new build at http://www.globalmapper.com/global_mapper11.zip with the change for you to try. Simply download that file and extract the contents into your existing v11.xx installation folder to give it a try. If you are using the 64-bit version, there is a new build available at http://www.globalmapper.com/global_mapper11_64bit.zip .

Let me know if I can be of further assistance.

Thanks,

Mike
Global Mapper Support
support@globalmapper.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-29-2009, 04:00 PM
Global Mapper User
 
Join Date: Aug 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default Solution reached! Thanks!

Mike,

The problem has been fixed now. Thank you for you excellent support and "turn-around" time. The DXFs exported by GM's TIN layer now import into 3D Studio Max correctly.

I have a few other question/problems with DXF import/export that I will post soon as time allows. Maybe we can get these worked out as well so others can benefit from your powerful application!

Mike
Adsync Technologies
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 07:48 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright 2009 Globalmapperforum.com