Issue #8064 - Letter missing when V-carving a string in Path WB

In the attached file, the letter “e” in Kitchen is not being v-carved, while the rest of the string is.
Kitchen.FCStd (59.6 KB)
kitchen.jpg

OS: Fedora Linux 35 (Workstation Edition) (KDE/plasmax11)
Word size of FreeCAD: 64-bit
Version: 0.20.1.Unknown
Build type: Unknown
Python 3.10.6, Qt 5.15.2, Coin 4.0.0, Vtk 9.0.3, OCC 7.5.0
Locale: English/United States (en_US)
Installed mods: 
  * Pyramids-and-Polyhedrons
  * fasteners 0.4.25
  * GDML 2.0.0
  * Manipulator 1.4.9
  * BIM 2021.12.0
  * Assembly4 0.12.4

I submitted this as bug report 8064 on github; I was asked to x-post this here as well.

The “e” is also the only letter there with an “island”. Not sure if that has any thing to do with it, but it might be an interesting test to modify the e so the loop didn’t fully close, or try other letters in its place, like p, a, d, b.

Obviously you don’t want a sign that says Kitchbn, but the test might reveal something.

Thanks for the suggestion. That had occured to me, but I had another word that had an “a” in it, same font, same size, and that rendered fine (I also replaced the “e” with an “a”, as you suggested, and that did create a path for it). That other word also contained a “B” and that also rendered OK, but the same word, in a slightly different font did not create a path, though the other letters did. I tried other fonts and they seemed to work. I do believe this is a bug.

Can you use a program like FontForge to check if the font has a problem? There are many fonts out there having issues. I rather assume a problem from that side.

I played with this for a while. It seems that the problem is the “e” is too close to the “h”. If I added a space before the “e” the V-carve worked fine.

It also works if the font is bigger.

I do not know if this is a bug or some basic limitation.

(I had to find and download the font to do this test. It would be useful to include the font in the posting when ShapeString problems occur.)

Gene

When I replace in the e the B-splines with arcs, i get some sort of a result. Alas, at the right upper corner I see very fancy paths. I tried increasing the tool diameter, but didn’t succeed.
SnipScreenshot-11d251.png
Kitchen_cb.FCStd (33 KB)

I have opened the font with FontForge; I don’t see any indication of a problem. I have also tried a different program for V-carving, F-Engrave; It has no problem generating a V-carve path, but the inter-character spacing it generates is quite a bit larger than what FreeCAD generates.

I am attaching a zip file with the font + font-metrics.

chrisb : This is a stock font tha came with my Fedora 35 installation, not something I downloaded myself.
Z003-MediumItalic.zip (274 KB)

Hmmm. I tried adding a space before the “e”, but still does not work for me.
Screenshot_20221220_170448.png

Interestingly when I try it the ‘e’ gets carved but the ‘h’ is missing. From what I can tell is somehow the voronoi algorithm discards all edges as being “exterior”, which means infinite in length.

Once an issue is added to the tracker, let’s try to keep the discussion over there. It’s easier to relate the discussion to specific code and eventually a PR for a fix.

This issue is here:
https://github.com/FreeCAD/FreeCAD/issues/8064

mlampert
Thanks for the pointer to the Voronoi algorithm. Will look into it in the FreeCAD source, but I assume the developers will make a fix before I do.

Agreed. I posted the issue to the forum on the request of luzpaz in an email:
" @mhindi2 can you please zip the .FCStd file and attach it to the ticket. Can you x-post this to the Path forum.freecadweb.org to make sure this isn’t a 3rd party dependency or user-error ?"

The problem is that many tickets are being opened that are PEBKAC,and users are using the tracker as a helpdesk.

That’s how it used to be: discuss in the forum first, add a ticket then. I thought that to be beneficial for the developers, because user errors could be filtered.
But shouldn’t we accept if the developers find something different to be better for them? That’s the new process, where the whole discussion takes place on Github.