# HG changeset patch
# User Andrey Novoseltsev <novoselt@gmail.com>
# Date 1282858213 21600
# Node ID fc8a3569c31f53fff533e1aace9980b103fbc3b3
# Parent dce01f81c6fed5a4d394d137f224df07d4c782a7
Trac 9810: Cone faces methods incorrectly sets facets for future use.
diff r dce01f81c6fe r fc8a3569c31f sage/geometry/cone.py
a

b


1606  1606  2d face of 3d cone in 4d lattice N, 
1607  1607  2d face of 3d cone in 4d lattice N), 
1608  1608  (3d cone in 4d lattice N,)) 
 1609  
 1610  We also ensure that a call to this function does not break 
 1611  :meth:`facets` method (see Trac #9780):: 
 1612  
 1613  sage: cone = toric_varieties.dP8().fan().generating_cone(0) 
 1614  sage: cone 
 1615  2d cone of Rational polyhedral fan in 2d lattice N 
 1616  sage: [f.rays() for f in cone.facets()] 
 1617  [(N(1, 1),), (N(0, 1),)] 
 1618  sage: len(cone.faces()) 
 1619  3 
 1620  sage: [f.rays() for f in cone.facets()] 
 1621  [(N(1, 1),), (N(0, 1),)] 
1609  1622  """ 
1610  1623  if dim is not None and codim is not None: 
1611  1624  raise ValueError( 
… 
… 

1619  1632  for level in self.face_lattice().level_sets()) 
1620  1633  # To avoid duplication and ensure order consistency 
1621  1634  if self.dim() > 0: 
1622   self._facets = self._faces[1] 
 1635  self._facets = self._faces[2] 
1623  1636  if dim is None: 
1624  1637  return self._faces 
1625  1638  else: 