Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed ellipse radial angle error | Added DxfHatch #13

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

APOSWE
Copy link
Contributor

@APOSWE APOSWE commented Dec 19, 2023

  • Fixed ellipse radial angle error. Now the ellipse is approximated with a defined resolution of 10 degrees.
    image
  • Added DxfHatch

APOSWE and others added 4 commits December 18, 2023 07:08
When you haven't "en-US" the test will fail
…ed with a defined resolution of 10 degrees.

Added UnitTest RenderEllipse2Test
@brettfo
Copy link
Member

brettfo commented Jan 20, 2024

I'm not sure I understand why an ellipse is better represented as a series of line segments instead of an actual arc segment. If you need line segments in your case, that might be better handled by a post-processing step with a proper SVG editor, and that would allow you to do the same with circles as well, and not just ellipses.

Is there a specific bug with ellipse rendering that needs to be fixed? I'd rather have a targeted fix for a specific issue, rather than a wholesale replacement of the ellipse rendering code.

@APOSWE
Copy link
Contributor Author

APOSWE commented Jan 20, 2024

No, it's actually not better because the SVG is larger overall. But like you said, I had situations where I failed. And after trying for 5 hours I decided to take a different approach!

If you have an x-rotation on the arc and the main axis of the ellipse is not parallel to the coordinate system, then the arc is not correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants