Re: Plotting 'continents' in object graphics... [message #41344 is a reply to message #41254] |
Tue, 05 October 2004 17:17   |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
Randall Skelton wrote:
> While not explicitly listed, the dxf dlm does not seem to exist for OS
> X. It didn't work in 5.6 or 6.0 either. Rick, could you just dump the
> variables to continents.sav?
Hi Randall,
I modified RHTgrDXFModel to export/import data to/from IDL .sav files.
I have been kicking around ideas to store scene graphs so this gave me a
chance to test the simplest of ideas. Below is a link to the updated
RHTgrDXFModel object as well. You should be able to use it, or use the
code from it, to easily create a IDLgrPolygon object from the .sav file.
IDL> m=obj_new('rhtgrdxfmodel')
IDL> m->importfromsav, 'dxf_continents.sav'
IDL> xobjview, m
IDL> obj_destroy, m
I've implemented code to properly handle colors (as I understand them)
but it is untested since all of my .dxf files don't contain interesting
color data.
Also below is a link to a .sav file which contains the continents.dxf
data. The data is stored in a pointer array "dxfdata" (The
continents.dxf file contained only one entity so the pointer array is
one element in size.) Dereferencing the pointers will return a
structure with the following fields:
IDL> restore, 'dxf_continents.sav'
IDL> help, *dxfdata[0], /structure
** Structure <1b99c98>, 7 tags, len=370960, data len=370951, refs=1:
IDLTYPE STRING 'IDLGRPOLYGON'
DXFTYPE INT 9
DXFBLOCK STRING ''
DXFLAYER STRING 'earth'
DATA DOUBLE Array[3, 7572]
POLYS LONG Array[47296]
COLOR BYTE 0
http://acoustics.washington.edu/~towler/programs/rhtgrdxfmod el__define.pro
http://acoustics.washington.edu/~towler/programs/dxf_contine nts.sav
Cheers!
-Rick
|
|
|