-
Notifications
You must be signed in to change notification settings - Fork 7
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
Replace JavaFX text with AWT #63
base: development
Are you sure you want to change the base?
Conversation
I'll look into why those tests are failing. |
Also added unit tests as a part of release script
One of the external checks that i do is to run the StlExportTest and put TextStl2.stl through PrusaSlicer or Bamboo Slicer. they are very poor quality slicing algorithms and acts as a worst case scenario mesh integrity test. I use MeshLab to look at TextStl2.stl for any non manifold points or edges, and for any boundary edges. There should be 0 of all of those. |
In the StlExporrtTest there is a line commented out at the top, set it to
1e-11 and see if the errors go away entirely. It indicates issues with the
initial point data having duplicate points or near-duplicate points. It
could also indicate a polygon with backtracking or even crossing polygons.
I had to do a ton of data correction on the javafx text and it has always
been a source of bad polygons into the csg opperations. If you run the
slice in Prusa see if there are missing layers. This is the "good enough"
test, if prusa can slice it. I use text as the stress test since the
polygons are generated and often full of errors.
…On Sat, Dec 14, 2024, 2:05 AM Joacim Breiler ***@***.***> wrote:
Thanks
Here is a screenshot from Prusa Slicer, the top is from this branch and
the bottom is from the development branch:
image.png (view on web)
<https://github.com/user-attachments/assets/8e309fd2-f5da-4285-966f-3615f4bc356e>
Here is the new version in meshlab:
image.png (view on web)
<https://github.com/user-attachments/assets/6df94778-274c-43ec-a1cd-9c5dd54ff6b7>
And here is the development version:
image.png (view on web)
<https://github.com/user-attachments/assets/a0da1b79-c661-4e8d-80f2-4ab093c22584>
My version is obviously worse, but what is the metric I that I should be
looking for? Should it look as nice as possible or attempt to count the
number of errors?
—
Reply to this email directly, view it on GitHub
<#63 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJSKRVNIVXKHMTBNHLVGVL2FPKB5AVCNFSM6AAAAABTQNX2VOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBSHEYTMMRTGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
So I adjusted the 2 epsilon parameters and was able to get down to 4 boundary faces in the development branch. The issue is related to how the CSG stack decides 2 points are coincident vs how other mesh manipulating stacks assume points are coincident. Text seems to be a source of difficult polygons, which is why i use it as the stress test for repairing damaged meshes. I have been addressing this recently in order to support Prusa and Bamboo slicers. |
How are you measuring this? From just looking at it in Prusa with the default settings and in Meshlab I can clearly see polygons missing when uncommenting both those lines in the development branch: Plane.setEPSILON(1.0e-11);
Vector3d.setEXPORTEPSILON(10); What OS are you using? For instance I saw a big difference in how fonts are vectorized on Linux/Windows vs MacOSX. |
|
One other thing to look at is to see if the triangles are missing, or are just backwards, IE wound clockwise instead of Counter-clockwise. The CW wound trinagles come into MeshLab as a dark grey instead of light grey. When a polygon gets removed from the CSG its because the triangulation algorithm failed to find a convex corner after tracing over the polygon. This could be because of a backtrack, a portion of the polygon that juts out, then backtracks over the same line forming a 0 area section, or it can be 2 points that are coincident, or an edge of the polygon that crosses another edge of the polygon. I have seen all 3 of these types of polygon irregularities when generating shapes using fonts. |
You can also look at TextStl.stl only for the moment, the second one test loading back in the first STL and performing operations on it. If you can make just the text stl with no non-manifold features and no boundary edges, then we can call that a Win and merge this PR. |
This PR aims to replace JavaFX font with AWT for extruding texts