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

Increase precision of arrows #172

Closed
DarwinNE opened this issue Apr 19, 2020 · 5 comments
Closed

Increase precision of arrows #172

DarwinNE opened this issue Apr 19, 2020 · 5 comments
Assignees
Labels
2D graphics All that concerns the graphic rendering of drawings enhancement A suggestion about how to improve the project

Comments

@DarwinNE
Copy link
Owner

The rendering of arrows is not very precise as the segment is superposed to the tip.
With relatively large segment widths, this yields an ugly result, as follows:

wrong_arrows

This should be corrected.

@DarwinNE DarwinNE added enhancement A suggestion about how to improve the project 2D graphics All that concerns the graphic rendering of drawings labels Apr 19, 2020
@DarwinNE DarwinNE added this to the FidoCadJ 0.24.8 milestone Apr 19, 2020
@DarwinNE DarwinNE self-assigned this Apr 19, 2020
@DarwinNE DarwinNE reopened this Apr 19, 2020
@DarwinNE
Copy link
Owner Author

It should work for Bézier courbes, too!

@DarwinNE
Copy link
Owner Author

Of course, one must not forgot about splines (curves)... :-)

@DarwinNE DarwinNE reopened this Apr 19, 2020
@DarwinNE
Copy link
Owner Author

DarwinNE commented Apr 20, 2020

I changed a little the style of the arrows from the version 0.24.7 so that they fit more what were my original intentions. This will change a little how the drawings are rendered, but in the vast majority of the situations, it will improve the drawings.

This code contains some (rather extreme) example of arrows:

[FIDOCAD]
FJC A 3.0
FJC B 3.0
LI 30 40 60 5 0
FCJ 3 2 14 8 0 0
CV 0 70 15 65 45 95 20 85 55 110 55 0
FCJ 3 3 14 8 0
BE 40 45 40 70 65 60 120 80 0
FCJ 3 2 14 4 0 0

This is the NEW result, with version 0.24.8:
arrows_vers_0_24_8

Whereas this is the result with the version 0.24.7:
arrows_vers_0_24_7

The changes are more evident with the empty arrows, but the geometry is the same for filled arrows, too. This means that the Bézier and spline curves change slightly of shape when they are traced with and without arrows.

DarwinNE added a commit that referenced this issue Apr 20, 2020
…ith spline curves, segments and Bézier curves (issue #172).
@DarwinNE
Copy link
Owner Author

Now it remains to check the export towards all vector files supporting arrows: SVG, PDF, PGF, EPS 😭

@DarwinNE
Copy link
Owner Author

The implementation should be complete. Let's close this issue that required much more work than expected at a first sight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2D graphics All that concerns the graphic rendering of drawings enhancement A suggestion about how to improve the project
Projects
None yet
Development

No branches or pull requests

1 participant