Results 1 to 5 of 5

Thread: How to save graphics as dxf format

  1. #1
    Join Date
    Jul 2009
    Posts
    49
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default How to save graphics as dxf format

    Hi All,

    I have done some graphics on qframe and i need to save it as dxf format how can i do it



    Regards,
    Soumya

  2. #2
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: How to save graphics as dxf format

    I think there is a free on-line book in the progecad web site that explain's dxf format. If you cant find it I can email it to you, since it's free. This is the hard aproach. You should also check QCad, google it, I dont remember if it his opensource, but I remember something about some lib's that coulb be helpful for writing dxf files.
    Last edited by john_god; 24th December 2009 at 15:57.
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

  3. #3
    Join Date
    Nov 2007
    Posts
    26
    Thanks
    2
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to save graphics as dxf format

    Hi,

    I used dxflib to do this for items in a qgraphicsviews:

    http://www.ribbonsoft.com/dxflib.html

    I just iterated through all the items and creating corresponding dxf lines
    arcs, text etc entities.

  4. #4
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: How to save graphics as dxf format

    Does it work with GLQWidget (opengl) ???
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

  5. #5
    Join Date
    Nov 2007
    Posts
    26
    Thanks
    2
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to save graphics as dxf format

    All it does is provide an easyish way to read / write dxf files. You would still have to add all the autocad entities yourself e.g to add a line:

    Qt Code:
    1. dxf->writeLine(*dw,DL_LineData(p1x, p1y, p2x, p2y, lwidth), DL_Attributes(layer, color, -1, "BYLAYER");
    To copy to clipboard, switch view to plain text mode 

    Unfortunately it doesnt provide any magical conversions... But its definetly easier than creating a dxf from scratch.

    RealDWG by Autodesk or DirectDWG by the Open Design Alliance are others. Also I think there are some other librarys which directly convert wmf's and SVG files to dxf files. I think Cadsoft make one.

Similar Threads

  1. QDateEdit Resize for Changed Display Format?
    By ChrisW67 in forum Newbie
    Replies: 5
    Last Post: 5th June 2009, 10:02
  2. Is there a known problem with QMimeData on Mac OS X?
    By Wurgl in forum Qt Programming
    Replies: 8
    Last Post: 27th February 2008, 22:21
  3. Some very weird compilation warnings
    By MarkoSan in forum Qt Programming
    Replies: 21
    Last Post: 23rd January 2008, 16:48
  4. Save images to database
    By jnk5y in forum Qt Programming
    Replies: 4
    Last Post: 8th May 2006, 19:56
  5. What does "Save All" actually save?
    By Mariane in forum Newbie
    Replies: 7
    Last Post: 31st January 2006, 13:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.