diff --git a/src/foundation/io_gltf.cpp b/src/foundation/io_gltf.cpp index e9fa81c..218315e 100644 --- a/src/foundation/io_gltf.cpp +++ b/src/foundation/io_gltf.cpp @@ -301,13 +301,11 @@ bool write_brep_gltf(const std::string& filepath, const brep::BrepModel& model, std::vector verts; std::vector> 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(j) / res; + double v = static_cast(j) / res; for (int i = 0; i <= res; ++i) { - double u = u_min + (u_max - u_min) * static_cast(i) / res; + double u = static_cast(i) / res; verts.push_back(surf.evaluate(u, v)); } }