Re: [svgwg] Rect decomposition is invalid (#753)

Yeah, the rectangle mid-points without the start/end point is not what I would expect. Draw a rectangle and on each mid-point add a picture of a clown. And it'll dutifully give you clowns on the upper-right, lower-right, lower-right corners and nothing on the upper-left. According to the spec that's what I asked for.

But, that doesn't seem like what I wanted. What I want is a path that isn't given any special considerations to where it "starts" for mere implementation reasons. An ellipse doesn't really have a start position, when I want marker points attached to points on it, it shouldn't merely omit the rightmost point because, from an implementation perspective, that's a start point and an end point but not a midpoint. It seems to me they are all midpoints and the paths don't actually start or end. SVG 1.1 spec just happened to give us that result because it constantly shoved in a 0-length line in there and thus that spot was coincident with the start point, end point, and a midpoint. Which makes for a good undocumented feature, but zero length lines are actually in there which causes other problems.

I think the general belief @dalboris and I share, is that the closed path point is not merely coincident with the move point destination, but is the same point. And when you close a path the start/end point is a midpoint and not merely coincident start point and end point.

There is some clear utility in not including 0 length lines but also in the SCZ, being seen as being the same point, not merely a point that is coincident with the start point that sets a close flag, but actually being the same point, even if implementations would fake this and things like animations obviously need to start somewhere.

If we're dealing with a closed path there should technically no start or end point. Only a start/end point and that's really just a midpoint. I could cycle this path, and make it start at the second path segment rather than the first. There would be no issue or changes outside forced moves like animations need to start somewhere.

---

Currently I'm implemented some of this stuff in Python in order to have SVG drive a laser cutter. There's clearly some utility in being able to say closed paths start/end is whatever I say it does, because functionally reducing the distances between the last point on the previous subpath and the current point on the current subpath actually matters (since it reduces time the laserhead needs to move). So cycling paths is something I'll be doing.  And so conceptually they all seem like midpoints to me, since I can start and end anywhere in order to make a Eulerian path. If you say start and end are special and not a start/end midpoint it seems kinda wrong. Much like animation, the driving the laser needs to break the shapes down into the requisite paths. I spun off some of my svg work into it's own project ( https://github.com/meerk40t/svg.elements ), and I wanted to get the Rect decomposition consistent and noticed the documented decomposition was incomplete and didn't even close for the non-rounded version. Hence the issue.

---

I don't generally think of closed paths having a start except for the sake of implementation. If I want markers on all the midpoints of a closed path where I arbitrarily chose (or SVG editors chose) to start shouldn't change anything about the results. If the path is closed it shouldn't give special preference to this choice, either by saying it's the official start or end point or by omitting it as a midpoint. I think calling the start and end points a single point and saying it is only another a midpoint is the most consistent way of doing that.

-- 
GitHub Notification of comment by tatarize
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/753#issuecomment-560225886 using your GitHub account

Received on Monday, 2 December 2019 04:37:23 UTC