No BSD License  

4.0

4.0 | 8 ratings Rate this file 71 Downloads (last 30 days) File Size: 18.1 KB File ID: #14470
image thumbnail

igesout

by

 

29 Mar 2007 (Updated )

Convert surfaces, curves and lines to IGES file

| 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

Nurbs2 Iges inspired this file.

MATLAB release MATLAB 7.3 (R2006b)
Other requirements http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=312&objectType=file
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (23)
01 Sep 2014 Fa

Sridhar,
I had this problem, check the G section.
There is something wrong.

30 Aug 2014 Sridhar

Hi,

I tried running an example. The IGS file is created but Autocad says it is invalid/cannot be read.
Any solution?

14 Aug 2014 Fa

Am I the only one having problem with circular shapes ?
When I use democirc.m then nrbplot.m I have a good result but if I try to export it int the iges format it does not look the same.

Thank you !

18 Sep 2012 TCH

!!!!!!!!!!!---------BUG REPORT--------!!!!!!!!!!!!!!!

for anyone who would download this code please revise the code in function wrapmat:
@code revision start:
387 nsrt = nchar-size(str,2);
388 if nsrt
389 % str(:,end+nsrt) = ' '; // comment this phrase
389 +str(:,end+1:end+nsrt)=' ';
390 end
@code revision end
the original code directly assign a space to the end+nsrt position of current line, the jumped spaces will be left to the null characters which is a fatal error according to the IGES file standard.
Hope you a nice use!

TCH

11 Jun 2012 Mahdi Damghani

I need to get lots of cylinders into Iges format for Ansys meshing. Unfortunately this does not work for me.

24 Apr 2012 Lee byan

seemed to run fine, but the output iges file seemed to be wrong and can not be read in ug,
i just used the example in the code as following,
pline = [0,0,1.1112;0,1.3333,2.1082;0,2.6667,1.6397;0,4,1.3346;];
lin = pline(1,:)*3;
pt = pline(1,:);
igesout({pline lin pt},'TestIGES')

the TestIGES.igs is as following:

Matlab to IGES converter. Written by Daniel Claxton S0000001
1H,,1H;,7HMatlab ,11HReceiver ID,12HTestIGES.igs,5HPCWIN, G0000001
14HMatlab -> IGES,16,6,15,13,15,1,3,2HIN,8,0.016000, G0000002
20H24-Apr-2012 19:54:21,0.000100,4, G0000003
27HD. Claxton dclaxton@ufl.edu,21HUniversity of Florida,11,3, G0000004
20H24-Apr-2012 19:54:21; G0000005
106 1 0 1 0 0 0 1D0000001
106 1 0 3 12 0D0000002
116 4 0 1 0 0 0 3D0000003
116 1 0 1 0 0D0000004
116 5 0 1 0 0 0 5D0000005
116 1 0 1 0 0D0000006
106,2,4,0.000000,0.000000,1.111200,0.000000,1.333300,2.108200,
0.000000,2.666700,1.639700,0.000000,4.000000,1.334600,0., 1.,
0., 1.;
116,0.000000,0.000000,3.333600,0., 1., 0., 1.;
116,0.000000,0.000000,1.111200,0., 1., 0., 1.;
S0000001G0000005D0000006P0000005 T0000001

19 Jan 2012 Brendan

Seemed to run just fine, but ANSYS can't read it. NrbsSrf2IGES produces IGES that can be read.

19 Jan 2012 Brendan  
11 Jan 2012 Mark Gordon

I'm trying to convert point cloud data (from a Kinect) to iges to import into Rhino (and then to Solidworks).

I put my data in to X, Y, and Z columns and the function appears to run successfully. However, when I try to import this file into Rhino it says: "Rhino found nothing to import from this IGES file.
This happens when an IGES file has no valid independent geometry."

Any thoughts on what is going wrong?

10 Jan 2012 Jessica

Could you add a simple example of surf (or mesh) to iges conversion?

24 Dec 2011 Ahmad Rafsanjani

Thank you for this excelent job!
Is it possible to create two curve separately?
Because by default it will connect the 2nd curve to end of the 1st one.

Thanks,
Ahmad

21 Nov 2011 Brian

Hey, thanks a LOT for posting this, you saved me days of work.

I was wondering: I have a binary tube structure geometry (so just a series of connected cylinders), and I was wondering if this can be used with your tool to export it into a IGES format. Would you expect there to be any conflicts?

10 May 2011 Frank Gommer

Probably I'm just not good enough with the "igesout" code but I'm wondering how a bit more complex structure, e.g. surface with holes, could be exported? For example, I tried to export the 2D geometry from the demos of the nurbs toolbox "demogeom.m". This one consist out of multiple nurb curves... I just can't get it running :( Any suggestions? Thanks!

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.

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

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

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.

19 Sep 2007 Michael Fassbind

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

23 Aug 2007 Johannes Korsawe

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

05 Jul 2007 Wenbin Chen

thanks,it works well in UG!

21 Jun 2007 johnny chen

good

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'.

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!

Updates
08 Mar 2009

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

Contact us