+ Reply to Thread
Results 1 to 7 of 7

Thread: DXF Problem

  1. #1
    GeminiMind is offline Global Mapper User
    Join Date
    Aug 2009
    Posts
    15
    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

  2. #2
    GeminiMind is offline Global Mapper User
    Join Date
    Aug 2009
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Dxf Error

    Need to attach file..
    Attached Files

  3. #3
    global_mapper is offline Administrator
    Join Date
    Jun 2007
    Posts
    7,236
    Thanks
    2
    Thanked 611 Times in 594 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

  4. #4
    GeminiMind is offline Global Mapper User
    Join Date
    Aug 2009
    Posts
    15
    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

  5. #5
    GeminiMind is offline Global Mapper User
    Join Date
    Aug 2009
    Posts
    15
    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

  6. #6
    global_mapper is offline Administrator
    Join Date
    Jun 2007
    Posts
    7,236
    Thanks
    2
    Thanked 611 Times in 594 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

  7. #7
    GeminiMind is offline Global Mapper User
    Join Date
    Aug 2009
    Posts
    15
    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

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts