Fix cone seam pcurve selection in OCCT (#17720)

Since the OCCT 8.0.1 update, some STEP files imported with cone faces missing. OCCT told the two seam pcurves of a cone apart with a 1e-7 threshold, which fails when the neighboring pcurves end slightly past the seam. The OCCT patch now picks the closer pcurve. The #16290 fix is kept.

Also stops admesh from merging unrelated edges of open meshes from STEP and SVG import on ARM64. A mesh built in memory reaches the nearby check with a tolerance of 0, and dividing by it was undefined. The check now returns early, which is what x86-64 already did.
This commit is contained in:
Rodrigo Faselli authored and GitHub committed 2026-11-20 16:05:58 -06:00
1 parent 0d7bea5763
commit cdd695117f
6 files changed
+471 -31

No files matched your search

+6
View File
@@ -488,6 +488,12 @@ void stl_check_facets_nearby(stl_file *stl, float tolerance)
// No need to check any further. All facets are connected.
return;
// A mesh built in memory has no shortest edge, so the tolerance arrives as 0, and load_nearby() would divide by it.
// Converting the infinities and NaNs to int is undefined: x86-64 makes them all INT_MIN, so no edge was ever
// matched, while ARM64 saturates them by sign and merged unrelated edges. Keep the x86-64 result everywhere.
if (!(tolerance > 0.f))
return;
HashTableEdges hash_table(stl->stats.number_of_facets);
for (uint32_t i = 0; i < stl->stats.number_of_facets; ++ i) {
//FIXME is the copy necessary?