From 704bf8caa40fb82732456cda79ca7690d76ba42b Mon Sep 17 00:00:00 2001 From: "Ilya V. Portnov" Date: Sun, 10 Nov 2024 13:35:56 +0500 Subject: [PATCH] small changes in geodesic api. --- utils/geodesic.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/utils/geodesic.py b/utils/geodesic.py index 4ef8ed41da..e36d44acd7 100644 --- a/utils/geodesic.py +++ b/utils/geodesic.py @@ -452,9 +452,9 @@ def exponential_map(surface, uv_center, radius, radius_steps=10, angle_steps=8, BY_LENGTH = 'L' def curve_exponential_map(surface, uv_curve, v_radius, u_steps, v_steps, u_mode=BY_PARAMETER, length_resolution=50, closed_u=False, closed_v=False): u_min, u_max = uv_curve.get_u_bounds() - center_us = np.linspace(u_min, u_max, num=u_steps) if u_mode == BY_PARAMETER: orig_us = center_us + center_us = np.linspace(u_min, u_max, num=u_steps) else: curve_3d = SvCurveOnSurface(uv_curve, surface, axis=2) calculator = SvCurveLengthSolver(curve_3d) @@ -462,14 +462,10 @@ def curve_exponential_map(surface, uv_curve, v_radius, u_steps, v_steps, u_mode= length = calculator.get_total_length() lengths = np.linspace(0, length, num=u_steps) orig_us = calculator.solve(lengths) - orig_vs = np.linspace(0, v_radius, num=v_steps) + center_us = lengths orig_centers = np.zeros((u_steps, 3)) orig_centers[:,0] = center_us - grid_us, grid_vs = np.meshgrid(orig_us, orig_vs) - grid_us = grid_us.flatten() - grid_vs = grid_vs.flatten() - uv_starts = uv_curve.evaluate_array(orig_us) uv_tangents = uv_curve.tangent_array(orig_us)