Use exact topology points at parametric range bounds to guarantee welding #4487

This commit is contained in:
Thomas Krijnen
2025-04-18 10:08:57 +02:00
parent ad0f62f88f
commit 21d39d8a23
2 changed files with 31 additions and 2 deletions
+4 -1
View File
@@ -397,7 +397,10 @@ int IfcGeom::Representation::Triangulation::addVertex(int item_id, int material_
if (settings().get<ifcopenshell::geometry::settings::WeldVertices>().get()) {
const VertexKey key = std::make_tuple(item_id, material_index, X, Y, Z);
typename VertexKeyMap::const_iterator it = welds.find(key);
if (it != welds.end()) return it->second;
if (it != welds.end()) {
// Return index for previously encountered point
return it->second;
}
i = (int)(welds.size() + weld_offset_);
welds[key] = i;
}