flatsurf / sage-flatsurf

Flat surfaces in Sage
https://flatsurf.github.io/sage-flatsurf/
GNU General Public License v2.0
10 stars 10 forks source link

UnboundLocalError: local variable 'SaddleConnection' referenced before assignment #255

Open Julien-Boulanger opened 10 months ago

Julien-Boulanger commented 10 months ago
File ~/mambaforge/envs/flatsurf-ipyvue/lib/python3.9/site-packages/flatsurf/geometry/categories/similarity_surfaces.py:1943, in SimilaritySurfaces.Oriented.ParentMethods.saddle_connections(self, squared_length_bound, initial_label, initial_vertex, sc_list, check)
   1934 from flatsurf.geometry.euclidean import ccw
   1936 if (
   1937     ccw(wedge[0], vert_position) > 0
   1938     and ccw(vert_position, wedge[1]) > 0
   1939     and vert_position[0] ** 2 + vert_position[1] ** 2
   1940     <= squared_length_bound
   1941 ):
   1942     sc_list.append(
-> 1943         SaddleConnection(
   1944             self,
   1945             start_data,
   1946             vert_position,
   1947             end_data=(label, vert),
   1948             end_direction=~sim.derivative() * -vert_position,
   1949             holonomy=vert_position,
   1950             end_holonomy=~sim.derivative() * -vert_position,
   1951             check=check,
   1952         )
   1953     )
   1954 # Now check if we should develop across the edge
   1955 vert_position2 = sim(p.vertex((vert + 1) % len(p.vertices())))

UnboundLocalError: local variable 'SaddleConnection' referenced before assignment
saraedum commented 10 months ago

@Julien-Boulanger since you managed to fix this locally, would you mind creating a pull request?

saraedum commented 6 months ago

Fixed in #211.