Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > How can I read CAD files into my C program ?

Reply
Thread Tools

How can I read CAD files into my C program ?

 
 
johnnash
Guest
Posts: n/a
 
      02-16-2008
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 ?
 
Reply With Quote
 
 
 
 
Malcolm McLean
Guest
Posts: n/a
 
      02-16-2008
"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

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      02-16-2008
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.
 
Reply With Quote
 
Bartc
Guest
Posts: n/a
 
      02-16-2008

"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


 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
2006/September/25 new CAD programs, CAD CAM CNC software solutions T.E.L. NZ Computing 0 09-26-2006 06:21 AM
Newbie question: Sub-interpreters for CAD program sonicSpammersGoToHellSmooth Python 11 08-29-2005 06:00 PM
Text files read multiple files into single file, and then recreate the multiple files googlinggoogler@hotmail.com Python 4 02-13-2005 05:44 PM
Re: Trying to learn how to write a cad program Victor Bazarov C++ 0 07-25-2003 01:41 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57