Exporting drawings in DXF and AI formats

Next
 From:  mickelsen
3485.1 
Hi Michael,
Are you ever going to put a DXF output converter in MOI? Perhaps a better question would be: what would be the best/easiest way to get my drawings saved in DXF format?
I'm trying to import my drawing information into Cut2D and DXF seems to be the best format to use. Cut2D also accepts .AI format, but I can't see how to make MOI maintain correct size information when I save drawings in that format.
Any information you can give me would be very helpful.
Thanks,
Mark
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3485.2 In reply to 3485.1 
Hi Mark, I do want to look into adding in a DXF exporter in the future.


Right now the easiest way to get curves into DXF format is to use the converter from here:
http://moi3d.com/wiki/Resources#3dmCurves2DXF_converter

That's a small separate program I wrote that can extract the curves from a 3DM file and then generate a DXF file with spline entities in it.


For AI format to maintain the correct size make sure your model units in MoI are set to either millimeters, centimeters, or inches (and not just "no unit system"), and then when you export to AI make sure the "Fit to page" option is not checked.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mickelsen
3485.3 In reply to 3485.2 
Okay, so that program will convert curves to DXF. I'm a little hazy as to what that means. What will it convert and what won't it convert? And do you know of a good, free DXF viewer that I can use to check the output?
Thanks again.
BTW, I LOVE MOI. I can't wait for v2.0 to be released so I can get it and the documentation for it.
Mark
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3485.4 In reply to 3485.3 
Hi Mark,

> I'm a little hazy as to what that means. What will it
> convert and what won't it convert?

It will convert curve objects, like for example a line or a circle or a rectangle. Things that you draw with the "Draw curve" tools in MoI.

It won't convert solids like a sphere or a 3D box.


> And do you know of a good, free DXF viewer that I can
> use to check the output?

You could try DoubleCAD: http://www.doublecad.com/

But I thought you were trying to use the DXF with Cut2D?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mickelsen
3485.5 In reply to 3485.4 
I am, but the first time I tried it, it looked like nothing got converted. So I was looking for a viewer to see things from a different perspective. Then I realized that my drawing was oriented wrong and that everything coming into Cut2d was in a single line and I was looking at it edgewise on.
My drawing is all straight lines and square corners and your program converted it all into curvy curves, so I guess it won't do me much good. Thanks anyway. I think I can get things going with AI.
Mark
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3485.6 In reply to 3485.5 
Hi Mark,

> My drawing is all straight lines and square corners and
> your program converted it all into curvy curves, so I guess
> it won't do me much good.

Well, it's not supposed to do that. Do you have an example file you can send to me so I could see what is going on with the DXF converter?

It is also possible that Cut2d is not really set up to read in the particular kind of objects that the converter is using. There are a lot of different kinds of things that can be stored in a DXF file, and they might be focused on reading polyline or line objects and not "spline" entities which is what that converter makes.

If you can give me a simple example that does not seem to convert properly that would help me to narrow down what might be the problem.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mickelsen
3485.7 In reply to 3485.6 
Sure Michael, glad to help. I'm including the .3dm file and the .DFX file that your program generated. When I load it into Cut2D, it shows up as all curved lines with no straight lines and no corners!

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3485.8 In reply to 3485.7 
Hi Mark, thanks for posting those files.

As far as I can tell the generated DXF file is actually fine, see the tests below where I read it into several other applications.

You have probably run into a bug in Cut2D. From what you describe, my guess is that they make an assumption that a SPLINE entity in the DXF file is a curvy shape and they are only looking at the control points and not the other parts of the spline data (its "degree" and "knots") which for this case are set up to make sharp corners between the control points.

Here's what I did to test - loading your 3DM file into MoI it looks like this:




I loaded the DXF file you attached into DoubleCAD XT and it looks like this:




I also loaded the DXF into ViaCAD and it looks like this:




I also loaded it into Rhino and it looks like this:



So as you can see with all these other apps, the sharp corners are actually in the curve data in the DXF file.

That's a pretty simple example so maybe you can send that to the authors of Cut2D as a bug report.


- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  mickelsen
3485.9 In reply to 3485.8 
Thanks, Michael. Meanwhile, I guess I'll just have to use .AI conversion in order to get my work done.
Mark
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All