3.66667

3.7 | 3 ratings Rate this file 67 Downloads (last 30 days) File Size: 101.94 KB File ID: #7118
image thumbnail

read_dxf -- read in an ASCII dxf file

by Steven Michael

 

11 Mar 2005 (Updated 19 Sep 2005)

read_dxf will load an ASCII dxf file into MATLAB.

| Watch this File

File Information
Description

Note: this project has been made obsolete. See the "model3d" project also on the file exchange for a more comprehensive 3D import package.

read_dxf loads facet information from an ASCII DXF file into MATLAB. It does not currently load color or texture information.

Usage:
dxf = read_dxf('dxf_filename');

The output is a Nx3x3 variable. The first index, N, references the facet number. The second index references the three vertices of each facet. The final index is the (x,y,z) location of the vertex.

I have also included a function "surfdxf" as an example of displaying the file.

The code uses a C++ class for DXF processing and is a compiled MATLAB function. The source and executables for Windows and Linux are included. For other platforms, the Makefile can be easily modified. I've also included the MS Visual Studio solution for compiling in Windows.

MATLAB release MATLAB 7.0.1 (R14SP1)
Other requirements compiled MATLAB functions are included for Windows and Linux only.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
19 Apr 2005 hu jin

i hope to see your full text in the file read_dxf.m . That could be more helpful.

17 Sep 2005 Gareth Swarbrick

Using this on a Mac I used to mex to successfully create a mex library. However, read_dxf returns a blank on all the DXFs I have tried...Next stop - source code.

28 Sep 2005 Andrea Thirchi

There is progecti in Visual C++ 6.0 ??

09 Feb 2011 C Shen

I have an error to run the program
>> filename='a.dxf';
>> dxf = read_dxf(filename);
??? Attempt to execute SCRIPT read_dxf as a function:
D:\matlab\read_dxf.m

Please login to add a comment or rating.
Updates
19 Sep 2005

update the description

Tag Activity for this File
Tag Applied By Date/Time
graphics import Steven Michael 22 Oct 2008 07:43:09
graphics export Steven Michael 22 Oct 2008 07:43:09
dxf Steven Michael 22 Oct 2008 07:43:09
import Steven Michael 22 Oct 2008 07:43:09
utilities Steven Michael 22 Oct 2008 07:43:09
cad Steven Michael 22 Oct 2008 07:43:09
dxf jon david 12 Oct 2010 04:52:20
dxf Stefano Pieri 04 Jul 2011 05:08:51
dxf Brian Bak 15 Dec 2011 05:26:09

Contact us at files@mathworks.com