Author Topic: DXF-Import  (Read 2846 times)

0 Members and 1 Guest are viewing this topic.

Offline RitchieF

  • Paid Subscriber
  • Full Member
  • *****
  • Posts: 181
DXF-Import
« on: April 12, 2009, 09:09:28 AM »
Hi all,

is Emergence Basic able to import/export 2d-DXF files - perhaps with an additional dll or so ?

Does someone of you know of such a dll ?

Thanks,

Richard

Offline REDEBOLT

  • Paid Subscriber
  • Full Member
  • *****
  • Posts: 244
Re: DXF-Import
« Reply #1 on: April 12, 2009, 11:12:38 AM »
Google on 2d-DXF .
Regards,
Bob

Offline RitchieF

  • Paid Subscriber
  • Full Member
  • *****
  • Posts: 181
Re: DXF-Import
« Reply #2 on: April 13, 2009, 01:07:02 AM »
I did of course before I asked the experts here !

Thanks anyway,

Richard

Offline Ionic Wind Support Team

  • Team Member
  • Hero Member
  • *****
  • Posts: 5759
    • Ionic Wind Software
Re: DXF-Import
« Reply #3 on: April 13, 2009, 01:17:56 AM »
Richard,
Do you mean AutoCad files?  Then no, there is no built in support in DirectX to load DXF files. You would either need to convert them into a format that the 2D or 3D engines understand or write a loader for them.

Paul.
Ionic Wind Support Team

Offline RitchieF

  • Paid Subscriber
  • Full Member
  • *****
  • Posts: 181
Re: DXF-Import
« Reply #4 on: April 13, 2009, 03:05:51 AM »
Paul,
yes I mean AutoCad files. I think I found enough informations about the DXF format and some examples in C++ and for Visual Studio. So I will study those infos and try to write my own loader (perhaps  ;D ) .

Thanks,

Richard

Offline barry

  • Paid Subscriber
  • Sr. Member
  • *****
  • Posts: 325
Re: DXF-Import
« Reply #5 on: April 15, 2009, 10:21:29 PM »
About 15 years ago I had to write a DXF decoder in C for the company I worked for.  We only needed to be able to decode a subset of it's features and that made it a much easier job but even so it was a fair sized task.  The problem is that there are just so many possibilities to consider.

My guess is that it's far more sophisticated by now, with many new possibilities.  In those days 3D wasn't part of it.  I think now it is.

Anyway, I did get it working okay.  It wasn't that it was hard to write, it was just a lot of detail work and it took a fair amount of time.

By the way, the reason I had to write this was to be able to import Microsoft Project DXF output into Autocad.  Since MS Project could output  DXF and Autocad could read DXF you wouldn't expect that to be necessary but it was because every line in the DXF file MS Project wrote was actually a huge number of zig-zag lines.  That's how they controlled the thickness.  Importing that into Autocad bogged everything down too much on the slower computers of those days.

A typical line might actually be made up of several thousand zigs and zags.  My program had to convert those into a single line with thickness, as I remember it.  There were other changes as well but that was the biggest part of it.

Barry

Offline RitchieF

  • Paid Subscriber
  • Full Member
  • *****
  • Posts: 181
Re: DXF-Import
« Reply #6 on: April 16, 2009, 10:03:40 AM »
Barry,

I'm working by profession with a huge cnc- machine. But I wanted to do a bit more than just drilling holes or cutting threads. So I got interested in engraving and 3d-milling.

Whenever I have the time and the permission of my boss I'm trying to do something in this direction. It's unfortunately only 3 or 4 times a year.

I have a lot of software ( free and licensed ) which is able to read dxf-files and export G-code. Coz I have  Emergence BASIC I just had the idea of trying to write a dxf-loader to learn programming .

There is no specific problem I want to solve it's just interest.

Thanks anyway for your reply,

Richard