5.0

5.0 | 4 ratings Rate this file 265 downloads (last 30 days) File Size: 18.06 KB File ID: #14470

igesout

by Daniel Claxton

 

29 Mar 2007 (Updated 08 Mar 2009)

No BSD License  

Convert surfaces, curves and lines to IGES file

Download Now | Watch this File

File Information
Description

IGESOUT converts nurbs surfaces, curves and polylines to a single compact IGES format file.

Vectorizing was implemented wherever possible, so the code should run quickly.

It was verified by ProE and MasterCam.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Nurbs2IGES

MATLAB release MATLAB 7.3 (R2006b)
Other requirements http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=312&objectType=file
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (10)
23 Apr 2007 c m

Really fast.
I used it to get a surface model from a coordinate measuring machine.
Now if only I could get it into Solidworks properly!

24 May 2007 Daniel Lopes

Works brilliantly! Thanks a lot!
CUBIT (http://cubit.sandia.gov/) is also capable to import the *.igs file created by igesout(.).

Just one remark:
At line 136,
"G.date = datestr(today); ",
I had to change 'today' -> 'date', since MATLAB apparently doesn't recognize 'today'.

21 Jun 2007 johnny chen

good

05 Jul 2007 Wenbin Chen

thanks,it works well in UG!

23 Aug 2007 Johannes Korsawe

This is perfect! Thank you a lot for doing the ugly work of going through the syntax of IGES.

19 Sep 2007 Michael Fassbind

A very good and useful improvement to my initial offering. I use your code now.

05 Jun 2008 Kian Chai

Are you able to do vice versa? I am sure you understand the IGES code before you create this program. I am trying to understand the IGES structure. Can your code write out the boundary points to represent a surface? It would be great to import this point into Excel to show the figure. Generally I would like to import IGES data as the data points in the array then I can plot it into Matlab figure.

02 Oct 2008 Daniel Claxton

I have received several questions asking about the reverse process iges conversion ie read an iges file into Matlab. Someone has already submitted a handy toolbox that does just that. You can find it here: http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=13253&objectType=file

09 Feb 2009 Liang

It is really an excellent code. However, when I try to create a large geometry, it is still time consuming. The function 'swap' excutes too many string copy in the 'while' loop and it cost much time when there are a mount of data points. I rewrote the function as follow and the it only needs 1/3 time.

function s = wrap(str,delim,n)
    tmp = blanks(n);
    strlength = length(str);
    i = 1;
    index=1;
    while (strlength-index+1>n)
        tmp = str(index:index+n-1);
        d = strfind(tmp,delim);
        d = d(end);
        index = index + d;
        s(i,:) = [tmp(1:d) blanks(n-d)];
        i = i+1;
    end
    if (strlength-index+1>0)
        s(i,:) = [str(index:strlength) blanks(n-(strlength-index+1))];
    end

15 Apr 2009 Matt

I had trouble with changing the units from 'IN' to 'MM'. I had to remove {:} after vargin in the call to setParams. Also, inside of setParams, I moved G to be outside of the 'lower' function. I'm using V7.7, so maybe it used to work this way in a previous version.

Please login to add a comment or rating.
Updates
08 Mar 2009

- Major improvements in write speed for large files
- Minor enhancements to version number

Tag Activity for this File
Tag Applied By Date/Time
data import Daniel Claxton 22 Oct 2008 09:06:18
data export Daniel Claxton 22 Oct 2008 09:06:18
spline Cristina McIntire 09 Mar 2009 13:49:18
cad Cristina McIntire 09 Mar 2009 13:49:18
nurbs Cristina McIntire 09 Mar 2009 13:49:18
iges Cristina McIntire 09 Mar 2009 13:49:18
export Cristina McIntire 09 Mar 2009 13:49:18
convert Cristina McIntire 09 Mar 2009 13:49:18
surface Cristina McIntire 09 Mar 2009 13:49:18
curve Cristina McIntire 09 Mar 2009 13:49:18
line Cristina McIntire 09 Mar 2009 13:49:18
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com