Ultimaker / CuraEngine

Powerful, fast and robust engine for converting 3D models into g-code instructions for 3D printers. It is part of the larger open source project Cura.
https://ultimaker.com/en/products/cura-software
GNU Affero General Public License v3.0
1.66k stars 871 forks source link

[CURA-11974] better non vertex seams #2100

Closed rburema closed 1 week ago

rburema commented 1 week ago

Split off from: https://github.com/Ultimaker/CuraEngine/pull/2087

For user defined seam locations, the last ticket left us in a situation where it was calculated to be the closest point on the polygon. While this is technically correct in a sense, this would not make the newly made vertices (made for the seam) line up 'correclty'. Instead specify a line from the origin of the model and intersect.

Also, while a new vertex was made, the rest of the algorithm would still occasionally pick other vertices. Probably for very defensible reason(s) when dealing with arbitrary vertices, but not wanted when we explicitly make a vertex at the specified location.

wawanbreton commented 1 week ago

I took the liberty of making a last small modification, that IMHO makes the code more readable, and agree with our own standards. Sorry that I didn't see that during the first review...