Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
trac #34306: small improvements in src/sage/geometry/polyhedron/
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoudert committed Aug 8, 2022
1 parent e351e42 commit b19f265
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/sage/geometry/polyhedron/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1816,9 +1816,10 @@ def _tikz_3d_in_3d(self, view, angle, scale, edge_color,

# Draw the facets in the front by going in cycles for every facet.
tikz_pic += '%%\n%%\n%% Drawing the facets\n%%\n'
vertex_to_index = {v: i for i, v in enumerate(vertices)}
for index_facet in front_facets:
cyclic_vert = cyclic_sort_vertices_2d(list(facets[index_facet].incident()))
cyclic_indices = [vertices.index(v) for v in cyclic_vert]
cyclic_indices = [vertex_to_index[v] for v in cyclic_vert]
tikz_pic += '\\fill[facet] '
for v in cyclic_indices:
if v in dict_drawing:
Expand Down
3 changes: 2 additions & 1 deletion src/sage/geometry/polyhedron/ppl_lattice_polytope.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,8 @@ def pointsets_mod_automorphism(self, pointsets):
points = tuple(sorted(points))
Aut = self.lattice_automorphism_group(points,
point_labels=tuple(range(len(points))))
indexsets = set(frozenset(points.index(p) for p in ps)
point_to_index = {p: i for i, p in enumerate(points)}
indexsets = set(frozenset(point_to_index[p] for p in ps)
for ps in pointsets)
orbits = []
while indexsets:
Expand Down

0 comments on commit b19f265

Please sign in to comment.