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

Snapping with splines is incorrect #32

Open
Willem3141 opened this Issue Dec 3, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@Willem3141
Copy link

Willem3141 commented Dec 3, 2015

It seems that there is a precision issue / bug with the snap-to-intersection mode if splines are involved.

To reproduce, draw two splines, or a line segment and a spline, that intersect each other. Enter the snap-to-intersection mode and hover above the intersection point. In many cases, the intersection point indicated by Fifi will be displaced slightly from the actual intersection.

A test case is here; I placed orange marks on the intersection points that Ipe indicates. Here is a screenshot of the worst case I could find:
schermafdruk3

I'm using Ipe 7.1.10 on Kubuntu (Linux).

@Willem3141

This comment has been minimized.

Copy link
Author

Willem3141 commented Dec 3, 2015

This is also reproducible with Ipe 7.1.10 on Windows 8, and Ipe 7.1.4 on Kubuntu. Unfortunately, I can't find older versions to test with.

@otfried

This comment has been minimized.

Copy link
Owner

otfried commented Dec 3, 2015

This has always been the case in Ipe. The spline intersection code was contributed years ago, it just approximates the splines by polygonal curves and then computes the intersections points.

I need to look at this again some time.

@derekwolfson

This comment has been minimized.

Copy link

derekwolfson commented Oct 11, 2016

This is extremely annoying behavior. I'd like to spline to respect the intersections at the grid points that I tell it to.

This makes it next to impossible to draw horizontal and vertical lines to the axes at various points (unless I'm just a noob and there is some way to force lines to be horizontal and vertical!).

@otfried

This comment has been minimized.

Copy link
Owner

otfried commented Oct 11, 2016

@derekwolfson I'm sorry, but I have no idea what you are trying to say. What does "I'd like to spline to respect the intersections at the grid points that I tell it to." mean?

To force horizontal and vertical lines, set the angular grid to 90 degrees, and turn on angular snapping (F8) or automatic snapping (F9), depending on your needs.

I don't understand what horizontal/vertical lines have to do with intersections of splines.

@derekwolfson

This comment has been minimized.

Copy link

derekwolfson commented Oct 11, 2016

@otfried -- it is the same behavior that is mentioned above. Using this picture

Image of Yaktocat

I want the spline to respect that I want it to intersect at the grid point underneath the orange circle, even as I add more points to the spline.

However, the work-around you gave re: the horizontal and vertical lines allows me to have intersections of a spline and a line with webbing back to the axes, even when the intersection of the spline and the line are not on a grid-point:

capture

Thanks for dealing with my n00bness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment