Closed RosaWagner closed 2 years ago
Sorry Rosalie, I'm struggling a bit to understand this issue, by unjoined you really mean two paths which intersect or nearly intersect, right?
No, you should not expect that "unjoined" result should be the same, especially if the end points of the "unjoined" paths are not exactly equal. Because, MFEKstroke will draw a cap, not a join.
I recommend pre-processing to forcably join all "near joins" at path terminals.
By unjointed I mean the two points share the exact same coordinates, but the path is open, not closed. So intersect may be the right term then.
If it is a single path, then why do you have two points where you could have one?
I am very unfamiliar with Glyphsapp so I don't know that I quite understand what the images show, to me it looks like there are two paths meeting almost at the same point.
As far as I know a closed path and an open path should be treated identically regarding joining behavior, however if you have two points at the same location that will definitely lead to weird joining behavior and you should try to clean that up as much as possible.
I suppose that MFEKstroke could do some preprocessing and attempt to eliminate such cases (i.e. if you have two corner points on the same location make them a single corner point) but I believe that this was not done on purpose so that it would be easier to interpolate different outputs from MFEKstroke, where sometimes one Master will have the points at different locations and another Master will have them at the same.
I made a video to show the entire path, tell me if it is clearer this way :) First the path is closed, then I open it by "breaking" a corner point, so then they are two different points at the same location, from the same path.
I don't exactly know the motivation behind it, but the path are optimised for CNC machine, and I kind of guess that it gives instructions to the machine to where it should go up and down in more complex outlines.
As far as I know a closed path and an open path should be treated identically regarding joining behavior, however if you have two points at the same location that will definitely lead to weird joining behavior and you should try to clean that up as much as possible.
So your advice would be to separate the two points of one unit for example? I can try and see. The idea is to avoid having two sources (like one for the CNC and one for the fake stroked version), so i can't tell the author to join all the corner points.
Thanks a lot for your help on this 🙏 I personally struggle to find the correct term in english to describe the issue.
No problem, I'm sorry that I don't have more experience with Glyphs, I've only worked with FontForge and my own font editing software (and of course the various APIs written by Google, Simon and others)
I'm going to add a mode for caps and joins that just outputs circles for CWS and this should fix this problem.
That should work if the points exactly overlap, I'm not sure that this can be guaranteed, I would still recommend some cleanup and I don't really understand why a milling router would find it more efficient to lift up the stylus then come back down and draw another path, but I will leave it to your experience.
Just make sure that the points exactly overlap or I believe you will still get quite strange output.
Now that I'm maintainer, I make the following observations:
--segmentwise
I propose in #16 will fix this.Therefore, closing as duplicate of #16 soon to be itself closed by --segmentwise
.
I'd like to request reopening this issue; @RosaWagner chatted with me today about releasing "Relief" (https://github.com/google/fonts/issues/3271) and currently this stroker still isn't useful for that release :) I'd like to offer to host a call so we 3 can discuss it.
@davelab6 I'm only seeing this now for some reason—sorry—that I'm looking into #27. Is your comment different than the issue at https://github.com/MFEK/math.rlib/issues/27#issuecomment-1104605712 ?
"Joined" is yellow in the screenshots
By joined and unjoined in source I mean:
And these are different results after export:
joined looks better
unjoined looks better
In any case, whatever the points are joined are not, it should be the same result, right?