Does anyone have experience with IGES geometry formats?

6 visualizzazioni (ultimi 30 giorni)
In some Matlab code I have, I generate airway trees for lung geometry. I want to be able to bring these into Autocad for some fine-tuning before I bring these into COMSOL, but I am having trouble transforming it into a IGES Geometry format.
I understand there is a igesout matlab function, but the geometry I have is not composed of curves; its composed of cylindrical segments that add up to a binary tree. I looked at it for a few days, but I'm not entirely sure if it's usable with my application.
Does anyone have any advice? I'm by no means a MATLAB expert, and I would appreciate any input you can offer.
Also, I made a quick visualization of the binary tree I am talking about (you can find the pictures here: http://imgur.com/wt6WV,awCbn#0)
For the geometry I export it to a quasi-.msh format. It consists of all the point coordinates, and the point connectivity in a geometry file (point connectivity meanine 1 connected to 2, etc) and a parameter file that contains the cylindrical radius for each segment.
  2 Commenti
Sven
Sven il 13 Dic 2011
I've had a little experience trying something similar that needed to adjust the matlab2iges tool to account for a new geometry type. I remember it was tricky, but there might be things we can try.
I assume you're using the MATLAB2IGES file exchange entry?
I would start by ignoring your full network of cylinders and just start with one test case. Can you put the code for how you store this cylinder definition in MATLAB?
Brian
Brian il 13 Dic 2011
I am not familiar with the matlab2iges tool, actually. I was looking at the igesout.m file, and the other one I found was iges2matlab. Can you show me where to get the matlab2iges tool?
And, how I store the cylinder information looks something like this:
I use:
* A point coordinate matrix (3 by N points),
* A Face matrix (2 by N segments), and
* A radius array (1 by N segments)
Basically how this works is I have the coordinate matrix as the x, y and z coordinates for each point. I then take my Face matrix, and mention in that category the connection of the points. It always starts with 1 2, meaning point 1 from the coordinate matrix is connected to 2, and it usually then diverges to 2 3 and 2 4, meaning point 2 connects to points 3 and 4. Once the file is read, I then take the radius array and tell Matlab to draw each cylinder as thick as the radius specified in the array.
So, a typical file usually looks like (ignore the header information):
(0 "Geometry Information File for Airway Generation")
(0 "Dimension:")
(2 2)
(10 (0 1 8 1 3))
(10 (0 1 8 1 3)(
0.000000E+000 0.000000E+000 0.000000E+000
0.000000E+000 0.000000E+000 3.000000E+000
0.000000E+000 1.422527E+000 4.865867E+000
0.000000E+000 -1.426915E+000 4.852017E+000
1.112550E+000 2.307275E+000 6.026353E+000
-1.115982E+000 2.300708E+000 6.017739E+000
1.108603E+000 -2.314392E+000 6.003890E+000
-1.112023E+000 -2.307805E+000 5.995340E+000
))
(0 "Faces:")
(13(0 1 7 0))
(13(3 1 7 3 0)(
2 1 2 0 0
2 2 3 0 0
2 2 4 0 0
2 3 5 0 0
2 3 6 0 0
2 4 7 0 0
2 4 8 0 0
))

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Lighting, Transparency, and Shading in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by