Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

I need an example of a DXF reading function

has anybody got a DXF reading function and a way to

simply display the drawn polygons on the screen?

I dont need them to move or anything.


//onion


Comments

  • : has anybody got a DXF reading function and a way to

    : simply display the drawn polygons on the screen?

    : I dont need them to move or anything.


    : //onion

    Actually its pretty easy to read DXF files if you know the file format. Basically its 4 XYZ coords that make up a triangle. The 4th coord is the same as the third coord?. This goes on and on until the whole object is built. The best way to figure them out is to open one up and look at it and experiment. I learned a DXF file of a box. Be sure to have a copy of all the codes of a DXF file handy.

    //This is an example of a sample DXF file

    //

    3DFACE //means a definition of a trianle follows

    8//read up on these code in a DXF file format DOC

    0__f10

    62

    0

    10 //the code means folling number is an X coord

    154.43199157

    20//folling is a Y coord

    39.62400054

    30//following is a Z coord

    1257.29992675

    11//another X coord (defining second vertex of triangle)

    145.28799438

    21

    2.03200006

    31

    1259.33203125

    12 //defining 3rd vertex

    148.33599853

    22

    35.55999755

    32

    1217.67602539

    13//defining 4th vertex (same as 3rd)

    148.33599853

    23

    35.55999755

    33

    1217.67602539

    0

    //goes on till file is finished




Sign In or Register to comment.