June 19, 2019, 01:25:57 pm

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


DXF-Import

Started by RitchieF, April 12, 2009, 09:09:28 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RitchieF

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

REDEBOLT

Regards,
Bob

RitchieF

I did of course before I asked the experts here !

Thanks anyway,

Richard

Ionic Wind Support Team

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

RitchieF

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

barry

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

RitchieF

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