3
$\begingroup$

I was able to export a simple graph (involute) to dxf, but I've got the dimensions in inch (for example, circle with diameter of 1 has 25.4mm in CAD). I tried to use Scale but I get an error. Is there a simple way around to get this done?

db = 1;
aa = 1.7;
r = db/2; 
circle = ParametricPlot[r {Sin[x], Cos[x]}, {x, 0, 2 Pi}][[1]];
inv = {ParametricPlot[
       r {(Sin[w] - w Cos[w]), (Cos[w] + w Sin[w])}, {w, aa, 0}, 
       PlotStyle -> {Thick, RGBColor[0.2, 0.5, 0.2]}][[1]]};

Graphics[{inv, circle}, ImageSize -> {450, 400}, Axes -> True, 
          PlotRange -> Automatic]  

involute = Graphics[{inv, circle}];

Export[importFileName = SystemDialogInput["FileSave"], 
       Scaled[involute, 1/25.4], "DXF"]

Export::errelem: The Export element Graphics3D contains a malformed data structure and could not be exported to DXF format. >>

$\endgroup$
  • $\begingroup$ Most dxf editors let you rescale the object $\endgroup$ – Dr. belisarius Feb 26 '16 at 16:49
  • 1
    $\begingroup$ Most likely the inches are due to your import work flow. Often you can specify unit conversion during import. Potentially related /useful: mathematica.stackexchange.com/a/54529/131 $\endgroup$ – Yves Klett Feb 26 '16 at 17:05
  • $\begingroup$ Scaled is no use, unfortunately. Closely related: mathematica.stackexchange.com/q/19479/131 $\endgroup$ – Yves Klett Feb 26 '16 at 17:13
  • $\begingroup$ you can of course divide r by 25.4 .. Your CAD software has to have a provision to specify the default unit system to be used for interpretation though. $\endgroup$ – george2079 Feb 26 '16 at 18:45
4
$\begingroup$

With your information:

db=1;
aa=1.7;
r=db/2;
circle=ParametricPlot[r{Sin[x],Cos[x]},{x,0,2Pi}][[1]];
inv={ParametricPlot[
r{(Sin[w]-wCos[w]),(Cos[w]+wSin[w])},{w,aa,0},
PlotStyle->{Thick,RGBColor[0.2,0.5,0.2]}][[1]]};

Graphics[{inv,circle},ImageSize->{450,400},Axes->True,
PlotRange->Automatic]

enter image description here

involute=Graphics[{inv,circle}]

enter image description here

I exported information to my desktop:

Export["C:\\Users\\Leandro\\Desktop\\output.dxf",involute]

I opened the DXF file in SolidWorks CAD software. The detail to care in inch is in software importing the file. Below is an image of the file being imported by SolidWorks software:

enter image description here

Check your CAD software for the data import unit that should be set to inches.

I made the measurement and I could verify that it was one inch or 25.4 milimeters:

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.