fix: use [0,1]x[0,1] NURBS domain
CI / Build & Test (push) Failing after 1m33s
CI / Release Build (push) Failing after 31s

This commit is contained in:
茂之钳
2026-07-24 09:13:43 +00:00
parent d99c9f1dba
commit 600c7e6158
+3 -5
View File
@@ -301,13 +301,11 @@ bool write_brep_gltf(const std::string& filepath, const brep::BrepModel& model,
std::vector<core::Point3D> verts;
std::vector<std::array<int, 3>> tris;
auto [u_min, u_max] = surf.domain_u();
auto [v_min, v_max] = surf.domain_v();
// NURBS domain is [0,1]×[0,1]
for (int j = 0; j <= res; ++j) {
double v = v_min + (v_max - v_min) * static_cast<double>(j) / res;
double v = static_cast<double>(j) / res;
for (int i = 0; i <= res; ++i) {
double u = u_min + (u_max - u_min) * static_cast<double>(i) / res;
double u = static_cast<double>(i) / res;
verts.push_back(surf.evaluate(u, v));
}
}