Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Help needed for exporting graphplot3d to dxf

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104019] Help needed for exporting graphplot3d to dxf
  • From: Jonas Aarsø Larsen <jaarsoe at gmail.com>
  • Date: Fri, 16 Oct 2009 07:17:19 -0400 (EDT)

Hi,

I have a notebook that uses an parsing algorithm to generate a network
surface based on cellular automata rules. The problem I am having is
when using graphplot3d I cant seem to be able to export it to a dxf
file, which is what I need.

Here is the lines of codes producing the graph:

ca = 23; init = 1; size = Large; i = 1;
g = GraphPlot3D[treerules[CellularAutomaton[ca, inits[size][[init]],
size /. {Small -> 10, Medium -> 15, Large -> 20}], i]]

This gives me the graph (treerules refers to the parsing algorithm).

I then try to use the following code for exporting since this has been
succesful with other notebooks I have used:

<< GraphUtilities`

F = Flatten[g]

Thread[VertexList[F] -> GraphCoordinates3D[F]];
EdgeList[F] /. %;
Graphics3D[Line[#] & /@ %]
Export["Network1.dxf", %]

when I run this it tells me:

Flatten::normal: Nonatomic expression expected at position 1 in Flatten
[g].

and i produces a dxf file with no geometry in it.

Can anyone help me understand what I need to change?
Thanks,
Jonas


  • Prev by Date: Generic Mapping Tools and Mathematica
  • Next by Date: Re: Animations on mathematica
  • Previous by thread: Re: Generic Mapping Tools and Mathematica
  • Next by thread: Subscript[x,1] value do not get cleared using Clear["Global`*"] but get removed using Remove["Global`*]