Problem with fillets

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with fillets

Ed Richley

I think I can fix this one, but I wanted to understand something better:

When generating Postscript for fillets, I sometimes get an arc that goes
the wrong way; instead of smoothly joining the segments, it goes the
long way around and forms a large semicircle.

In looking at the code, I see that it doesn't pay attention to the order
of the angles (start and stop angles). This seems to be OK for imaging
on the screen, but Postscript requires an arc to go counterclockwise.
I think I can fix this by ensuring that end angle > start angle in
the PS arc command, but I wonder if that creates a new problem.

Any thoughts?


Ed




_______________________________________________
PythonCAD mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/pythoncad
Reply | Threaded
Open this post in threaded view
|

Re: Problem with fillets

Russ Nelson
Ed Richley writes:
 > I think I can fix this by ensuring that end angle > start angle in
 > the PS arc command, but I wonder if that creates a new problem.

No, that should be fine.

--
--my blog is at    http://blog.russnelson.com   | In my head, I'm
Crynwr sells support for free software  | PGPok | violating your
521 Pleasant Valley Rd. | +1 315-323-1241       | software patent.
Potsdam, NY 13676-3213  |     Sheepdog          | So sue me!
_______________________________________________
PythonCAD mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/pythoncad
Reply | Threaded
Open this post in threaded view
|

Re: Problem with fillets

Ed Richley

OK, then this seems to work (so far):

Change printing.py line 494 to:

           f.write("%g %g %g %g %g arc\n" % (_xt, _yt, _rt,
min(_sa,_ea),max(_sa,_ea)))



Ed


> Ed Richley writes:
>  > I think I can fix this by ensuring that end angle > start angle in
>  > the PS arc command, but I wonder if that creates a new problem.
>
> No, that should be fine.
>
> --

_______________________________________________
PythonCAD mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/pythoncad