pdf interpretation in Moi3d : some straight lines get curved.

Next
 From:  Tib (THIBAUD)
3864.1 
Hi Michael.

I have found a little bug in the way pdf files are translated in Moi.
I use pdf prints to go from autocad dwg to moi.

I joined files that should show the problem.

Regards
Thibaud

  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
3864.2 In reply to 3864.1 
Hi Thibaud, thanks for reporting this bug.

So I think what's happening is that when MoI reads in a PDF file, it runs through the same code as importing an .AI file from illustrator and one of the things that happens is that the imported curves are processed so that curve segments that are pretty close to being tangent to one another (within 3 degrees) are tuned up to be exactly tangent.

But the case of your curve, this is not a good thing to do, because your curve is not actually made up of smooth curve pieces, the parts that look like arc corners are actually just a whole lot of little lines. I should make the importer not try to align the segment's tangents when the whole curve is only made up of line segments.

I can't seem to open your original DWG since I only have AutoCAD version 2008 over here - is your original drawing made up only of little line segments in it for those areas that look like curved corners, or is that something that happend during export to PDF ?

If you explode the longer curve into separate individual segments before exporting to PDF, that should avoid having the tangent alignment happen, does that seem to solve 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
 From:  Michael Gibson
3864.3 In reply to 3864.1 
Hi Thibaud, also if you send me an e-mail (moi@moi3d.com), I can send you an update patch that will avoid doing this tangent alignment in cases like this where there are 2 line segments adjacent to one another but close to being tangent with each other.

That's happening in your case since the curved looking areas are not really curves, but are instead a whole bunch of little lines.

If those curved areas were made up of longer actual curved spline pieces instead of little lines, that problem wouldn't actually happen because the tangent of the curved piece would be adjusted to be trued up, and not the line segment piece.

- 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