Problems with exports to AI and DXF
All  1-6  7-13

Previous
Next
 From:  obscure (PLEONARD23)
5914.7 In reply to 5914.6 
Ok, I'm attaching a PNG with the export of what LibreCAD and Inkscape seem to come up with. I guess this is more in reference than anything else, since I downloaded a trial of CorelDraw which is what the laser cutter software uses to actually do the cuts and it looks fine there. In addition I opened up the DXF with a free viewer on my iPad and it looks fine there too. I tried FreeCAD and it had the same positioning problems as inkscape and LibreCAD but also had the additional problem of looking like someone drew the picture with a crayon. Go figure.

I would understand if things were squished or distorted, but the issue is a weird thing where it just moves circles around to where they shouldn't be.
Image Attachments:
Size: 16.6 KB, Downloaded: 47 times, Dimensions: 1024x600px
  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
5914.8 In reply to 5914.7 
Hi Paul, well that is pretty weird, it looks like multiple bugs in their importer. It looks like it's probably got the "weights are ignored" problem that I mentioned earlier, that's why the arc corners in some of your larger outline shapes are somewhat squished. The circles don't get squished like those other longer curve corners because the circles are written as special "Circle" entity types rather that as general spline entities.

That's really weird that some circles are just misplaced - the way circles are handled in DXF is kind of a little complex, you have to pay attention to making a coordinate system based around the z axis of the circle. My guess is that maybe some circles happen to have their z axis pointing downwards and there is a bug in those programs where they don't deal with generating the proper coordinate system for those circles with the downward pointing extrusion axis.

I wouldn't be very surprised if all 3 of those programs (LibreCAD, Inkscape and FreeCAD) were all using one same open source CAD library that has these bugs in it.

- 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:  Michael Gibson
5914.9 In reply to 5914.7 
I just did a quick debug test, and it does appear that the circles that are not placed properly are ones where the "extrusion direction" of the circle which defines its local coordinate system happens to be pointing in the downward z direction rather than the upward z direction as the rest of them.

So if you want to send in any bug reports for those programs, you could include that information - the "Object coordinate system" (OCS) is not being handled correctly in those programs for circles with a downward pointing extrusion direction vector.

I could probably adjust this in MoI so that it would automatically flip the extrusion vector in cases like this so that it would always be pointing towards the world z axis direction and that would then avoid running into that particular bug in these importers, I'll put that on my list.

- 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:  Michael Gibson
5914.10 In reply to 5914.9 
The ones that have "downward pointing" normals were probably created by mirroring other ones, when mirrored the kind of natural local z axis for a circle gets flipped around, that's probably why some happen to be pointing downwards. It's not supposed to make any difference, but these programs that are having problems most likely have a bug in their implementation of the DXF "arbitrary axis algorithm" where they're not generating the coordinate system for downward pointing extrusion vectors properly. The arbitrary axis algorithm needs special case handling when the extrusion direction is colinear in any way with the world z axis, and they're probably only handling the special case when it's in the same direction as world z.

- 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:  obscure (PLEONARD23)
5914.11 
Wow, that's a really bizarre and specific kind of problem. I will have to make sure that I keep an eye on that going forward, because I didn't know about that. Fortunately it appears that Corel Draw is smart enough to know how to open the file, so I am saved. However, I will probably try flipping around the parts that are wandering off just to see if I can make a difference.

Thanks again for all the help, I appreciate it!

Paul
  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
5914.12 In reply to 5914.11 
Hi Paul,

> However, I will probably try flipping around the parts that are wandering
> off just to see if I can make a difference.

If you copy one of the other circles that is not wandering around in place of the wandering ones it should then work ok with those buggy importers.

- 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:  Michael Gibson
5914.13 In reply to 5914.11 
I've updated MoI's DXF exporter for the next v3 beta release so that for circle and arc entities it will avoid writing an extrusion vector of straight downwards in z and instead flip those to upwards z instead. That should avoid running into the wandering circle bug in those importers with the next v3 beta.

- 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
 

Reply to All Reply to All

 

 
 
Show messages: All  1-6  7-13