MathGroup Archive 2008

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

Search the Archive

3D import/export format problems/bugs

  • To: mathgroup at
  • Subject: [mg86849] 3D import/export format problems/bugs
  • From: Szabolcs Horvát <szhorvat at>
  • Date: Sun, 23 Mar 2008 01:03:04 -0500 (EST)
  • Organization: University of Bergen

The following function gives errors with the "DXF" and "3DS" formats in 
Mathematica 6.0.2:

impexp[gr_Graphics3D, fmt_String] :=
  ImportString[ExportString[gr, fmt], fmt]

The graphic that gives errors is an example from the documentation:

gr2 = Graphics3D[
   Table[With[{p = {i, j, k}/5}, {RGBColor[p], Opacity[.75],
      Cuboid[p, p + .15]}], {i, 5}, {j, 5}, {k, 5}]]

impexp[gr2,"DXF"] gives errors because of problems with ExportString[#, 
"DXF"] while impexp[gr2,"3DS"] generates an incorrect output.

The reason why I was experimenting with the impexp[] function was that 
the PolygonIntersections option is not available any more in v6 (it is 
suggested to use options for Export instead), and I wanted to see how 
much of the formatting is preserved when 3D objects are transferred 
through different output formats.

  • Prev by Date: Re: Viewpoint selector for Mac in 6.0?
  • Next by Date: Re: Mathematica hangs...
  • Previous by thread: Re: Writing variables in strings (opened from text files)
  • Next by thread: Funny behaviour of ClipboardNotebook[] (Q: How to copy programmatically?)