How can I read CAD files into my C program ?

Discussion in 'C Programming' started by johnnash, Feb 16, 2008.

  1. johnnash

    johnnash Guest

    Is there anyway to do this ? The objects are being modeled using
    NURBS. How do I go about building reader in C ? Are there any pre
    built libraries that I can refer to build one myself ?
     
    johnnash, Feb 16, 2008
    #1
    1. Advertising

  2. "johnnash" <> wrote in message news:
    > Is there anyway to do this ? The objects are being modeled using
    > NURBS. How do I go about building reader in C ? Are there any pre
    > built libraries that I can refer to build one myself ?
    >

    Try rooting about on the Internet. wotsit.org is a good place to start for
    the file, format. If your CAD format is not protected - most commerical
    companies give read permission but not permission to generate new files in
    the format - there will almost certainly be some code for it.

    C readers are built on top of primitive IO functions like fscanf(). Normally
    it is not particularly challenging to code a reader - the format has been
    designed for the purpose of being read, after all - but it is rather tedious
    because there are a lot of error cases.


    --
    Free games and programming goodies.
    http://www.personal.leeds.ac.uk/~bgy1mm
     
    Malcolm McLean, Feb 16, 2008
    #2
    1. Advertising

  3. johnnash

    Ian Collins Guest

    johnnash wrote:
    > Is there anyway to do this ? The objects are being modeled using
    > NURBS. How do I go about building reader in C ? Are there any pre
    > built libraries that I can refer to build one myself ?


    Check your documentation, most CAD products I've worked with provide an API.

    --
    Ian Collins.
     
    Ian Collins, Feb 16, 2008
    #3
  4. johnnash

    Bartc Guest

    "Malcolm McLean" <> wrote in message
    news:...
    > "johnnash" <> wrote in message news:
    >> Is there anyway to do this ? The objects are being modeled using
    >> NURBS. How do I go about building reader in C ? Are there any pre
    >> built libraries that I can refer to build one myself ?
    >>

    > Try rooting about on the Internet. wotsit.org is a good place to start for
    > the file, format. If your CAD format is not protected - most commerical
    > companies give read permission but not permission to generate new files in
    > the format - there will almost certainly be some code for it.
    >
    > C readers are built on top of primitive IO functions like fscanf().
    > Normally it is not particularly challenging to code a reader - the format
    > has been designed for the purpose of being read, after all - but it is
    > rather tedious because there are a lot of error cases.


    That's the opposite from what I've found, especially with Autodesk products
    (although opendwg.org provides useful tools). Or the format is complex and
    designed to be accessed via an API -- with a C++ interface.

    The OP posted the same question a couple weeks back; the code had to be in
    C, but did not give further details as to the specific format.

    --
    Bart
     
    Bartc, Feb 16, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Victor Bazarov
    Replies:
    0
    Views:
    552
    Victor Bazarov
    Jul 25, 2003
  2. sonicSpammersGoToHellSmooth

    Newbie question: Sub-interpreters for CAD program

    sonicSpammersGoToHellSmooth, Aug 24, 2005, in forum: Python
    Replies:
    11
    Views:
    471
    David MacQuigg
    Aug 29, 2005
  3. Harry George

    Using python for a CAD program

    Harry George, May 16, 2006, in forum: Python
    Replies:
    29
    Views:
    911
    Paddy
    May 24, 2006
  4. Dan Fabrizio

    Using python for a CAD program

    Dan Fabrizio, May 26, 2007, in forum: Python
    Replies:
    0
    Views:
    260
    Dan Fabrizio
    May 26, 2007
  5. chewie54

    python for EE CAD program

    chewie54, Jun 4, 2007, in forum: Python
    Replies:
    8
    Views:
    326
    chewie54
    Jun 4, 2007
Loading...

Share This Page