I have a design that I've produced in Mathematica, consisting of two sets of Rectangle objects. The second set is a mirror image of the first and was produced with array2 = Scale[#, -1, {0, 0}] & /@ array1.
I'm experiencing two issues when I Export the Graphics object to DXF:
- The second set of
Rectangles doesn't get exported. - Each
Rectanglegets exported as a pair of triangles.
Mathematica's Graphics output:

What AutoCAD displays:

Importing the DXF file back into Mathematica also shows that the bottom half is missing. I'm at a loss here - what am I doing wrong? Are either of these weird behaviours deliberate?
Edit: Here is a snippet of my code. It generates the design for a surface acoustic wave resonator. This consists of two transducers next to two gratings, each made up of metal strips, separated by a certain number of wavelengths.
l = 2; (* wavelength in \[Mu]m *)
d = 25.5; (* cavity length in wavelengths *)
(* NB this is the distance between the fronts of the transducers *)
vRatio = 1; (* how much faster the speed of sound is in the centre \
section *)
nTransducer = 25; (* number of finger pairs in the transducers *)
nGrating = 370; (* number of fingers in the grating *)
(* NB 2 fingers == 1 wavelength *)
fingerLength = 25; (* finger length in wavelengths *)
(* NB finger length is measured from inside edge of the bus-bar *)
SetDirectory[NotebookDirectory[]];
filePath = "2um.dxf";
fingersT = Table[
Rectangle[
{-(fingerLength/2 - 1/2) l, y},
{(fingerLength/2 - 1/2) l, y + l/4}],
{y, (d*vRatio/2) l, (d*vRatio/2 + nTransducer -
1/2) l, l/2}];
(* -- the rest of the transducer is produced in a similar way -- *)
transducer =
Join[fingersT, lSquaresTOut, rSquaresTOut, lSquaresTIn,
rSquaresTIn] ~Append~ lBarT ~Append~ rBarT;
(* -- a grating is produced above the transducer in the same fashion -- *)
(* This line originally read: array1 = transducer ~Join~ grating; *)
array1 = fingersT;
array2 = Scale[#, -1, {0, 0}] & /@ array1;
diagram = Graphics[array1 ~Join~ array2]
Export[filePath, diagram, "DXF"];
Rectangles to generate. I'll update the question with an abbreviated version of what I have. – poorsod Feb 12 at 12:01Exportpart) - what I can tell you right away is that polygons will be triangulated byExportas DXF. – Yves Klett Feb 12 at 12:04