Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit 50cbd58

Browse files
committed
do not initiate unused options
1 parent 92681e5 commit 50cbd58

File tree

1 file changed

+6
-12
lines changed
  • src/sage/geometry/polyhedron

1 file changed

+6
-12
lines changed

src/sage/geometry/polyhedron/plot.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ def adjacent_vertices(i):
758758
coords.append(a() + v())
759759

760760
if polyhedron.n_lines() == 0:
761-
self.polygons.append( self.coord_indices_of(coords) )
761+
self.polygons.append(self.coord_indices_of(coords))
762762
return
763763

764764
polygons = []
@@ -776,9 +776,9 @@ def adjacent_vertices(i):
776776
v = coords[0]
777777
l1 = line1()
778778
l2 = line2()
779-
polygons = [ [v-l1-l2, v+l1-l2, v+l1+l2, v-l1+l2] ]
779+
polygons = [[v-l1-l2, v+l1-l2, v+l1+l2, v-l1+l2]]
780780

781-
polygons = [ self.coord_indices_of(p) for p in polygons ]
781+
polygons = [self.coord_indices_of(p) for p in polygons]
782782
self.polygons.extend(polygons)
783783

784784
def _init_solid_3d(self, polyhedron):
@@ -851,8 +851,8 @@ def adjacent_vertices(i):
851851
for shift in [aline(), -aline()]:
852852
for coords in faces:
853853
assert len(coords) == 2, "There must be two points."
854-
polygons.append( [ coords[0],coords[1],
855-
coords[1]+shift, coords[0]+shift ] )
854+
polygons.append([coords[0], coords[1],
855+
coords[1] + shift, coords[0] + shift])
856856

857857
if polyhedron.n_lines() == 2:
858858
[line1, line2] = [l for l in polyhedron.line_generator()]
@@ -1037,10 +1037,6 @@ def render_0d(self, point_opts=None, line_opts=None, polygon_opts=None):
10371037
"""
10381038
if point_opts is None:
10391039
point_opts = {}
1040-
if line_opts is None:
1041-
line_opts = {}
1042-
if polygon_opts is None:
1043-
polygon_opts = {}
10441040
if isinstance(point_opts, dict):
10451041
point_opts.setdefault('zorder', 2)
10461042
point_opts.setdefault('pointsize', 10)
@@ -1073,8 +1069,6 @@ def render_1d(self, point_opts=None, line_opts=None, polygon_opts=None):
10731069
point_opts = {}
10741070
if line_opts is None:
10751071
line_opts = {}
1076-
if polygon_opts is None:
1077-
polygon_opts = {}
10781072
if isinstance(point_opts, dict):
10791073
point_opts.setdefault('zorder', 2)
10801074
point_opts.setdefault('pointsize', 10)
@@ -1680,7 +1674,7 @@ def _tikz_3d_in_3d(self, view, angle, scale, edge_color,
16801674
A = facets[index_facet].vector()[1:]
16811675
B = facets[index_facet].vector()[0]
16821676
for v in self.points:
1683-
if A*self.coords[v]+B < 0.0005 and v not in back_vertices:
1677+
if A * self.coords[v] + B < 0.0005 and v not in back_vertices:
16841678
back_vertices += [v]
16851679

16861680
# Creates the nodes, coordinate and tag for every vertex of the polytope.

0 commit comments

Comments
 (0)