Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1993
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1993

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

Search the Archive

Re: DXF & imp3D

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Re: DXF & imp3D
  • From: Roberto Sierra <73557.2101 at compuserve.com>
  • Date: 24 Jun 93 03:31:22 EDT

Regarding Mitja Lakner's problems with WriteDXF:

>   I have problems with WriteDXF (only with ImplicitPlot3D).
>
>   g = ImplicitPlot3D[E^z Cos[x] == Cos[y],
>                {x,-6,6}, {y,-6,6}, {z,-6,6},
>                PlotPoints->{16,16,12},
>                Passes->4]
>   g = Graphics3D[g];
>   WriteDXF["g.dxf",g,PolygonsOnly->True]
>
>   I get file, but there are (at least) mistakes:
>   empty polygons and unevaluated fractions.


You can fix DXF.m by making the following changes:

(1) EMPTY POLYGONS
    In the definition of WriteDXF, change

        parts = Cases[pic,(Polygon[_?(Length[#] <= 4 &)] | 
                                     _Line | _Point),

    to

        parts = Cases[pic,(Polygon[_?(0 < Length[#] <= 4 &)] | 
                                     _Line | _Point),

(2) UNEVALUATED FRACTIONS
    In the definition of writegroup, change

        WriteString[stream,rightjustifynum[code],cr,
                      ToString[CForm[it]],cr]

    to

        WriteString[stream,rightjustifynum[code],cr,
                      ToString[CForm[N[it]]],cr]


This seems to fix the specific problems you encountered, though
I don't have AutoCAD to fully test the DXF output.  Hope this
helps.


P.S.
In your original message, the line
        g = Graphics3D[g];
will cause problems, since the output from ImplicitPlot3D is
already a Graphics3D object.  There is no need to coerce it.


\\|//
 - -
 o o
  J   roberto sierra
  O   tempered microdesigns
 \_/  73557.2101 at compuserve.com






  • Prev by Date: Indexing Output Files
  • Next by Date: Re: 2D Integration
  • Previous by thread: DXF & imp3D
  • Next by thread: ploting problem