Opened 10 years ago
Closed 4 years ago
#11759 closed defect (fixed)
octahedron() and icosahedron() produce "nonenclosed" polyhedra
Reported by:  kini  Owned by:  jason, was 

Priority:  major  Milestone:  sage8.0 
Component:  graphics  Keywords:  platonic octahedron icosahedron enclosed edges 
Cc:  kcrisman, mkoeppe, vdelecroix, jplabbe  Merged in:  
Authors:  Frédéric Chapoton, Dima Pasechnik  Reviewers:  Dima Pasechnik 
Report Upstream:  N/A  Work issues:  
Branch:  e6b73d3 (Commits, GitHub, GitLab)  Commit:  e6b73d37e09fabae7f885ab700431704b51b5ec8 
Dependencies:  Stopgaps: 
Description
sage: tetrahedron().edges() <sage.plot.plot3d.index_face_set.EdgeIter object at 0x6187af0> sage: cube().edges() <sage.plot.plot3d.index_face_set.EdgeIter object at 0x618c4b0> sage: octahedron().edges()  TypeError Traceback (most recent call last) /home/fs/<ipython console> in <module>() /opt/sage/local/lib/python2.6/sitepackages/sage/plot/plot3d/index_face_set.so in sage.plot.plot3d.index_face_set.IndexFaceSet.edges (sage/plot/plot3d/index_face_set.c:5359)() /opt/sage/local/lib/python2.6/sitepackages/sage/plot/plot3d/index_face_set.so in sage.plot.plot3d.index_face_set.EdgeIter.__init__ (sage/plot/plot3d/index_face_set.c:9605)() TypeError: Must be closed to use the simple iterator. sage: dodecahedron().edges() <sage.plot.plot3d.index_face_set.EdgeIter object at 0x6178370> sage: icosahedron().edges()  TypeError Traceback (most recent call last) /home/fs/<ipython console> in <module>() /opt/sage/local/lib/python2.6/sitepackages/sage/plot/plot3d/index_face_set.so in sage.plot.plot3d.index_face_set.IndexFaceSet.edges (sage/plot/plot3d/index_face_set.c:5359)() /opt/sage/local/lib/python2.6/sitepackages/sage/plot/plot3d/index_face_set.so in sage.plot.plot3d.index_face_set.EdgeIter.__init__ (sage/plot/plot3d/index_face_set.c:9605)() TypeError: Must be closed to use the simple iterator.
The octahedron and the icosahedron are of course (closed) polyhedra. The problem is, I guess, that the dual()
function which creates them is not checking enclosedness and passing it on when generating the dual object.
Marking this ticket as "graphics" since it involves stuff in $SAGE_ROOT/devel/sage/sage/plot/plot3d/
.
Attachments (1)
Change History (13)
comment:1 Changed 10 years ago by
 Summary changed from octahedron() and dodecahedron() produce "nonenclosed" polyhedra to octahedron() and icosahedron() produce "nonenclosed" polyhedra
Changed 10 years ago by
comment:2 Changed 10 years ago by
 Status changed from new to needs_review
I uploaded a trivial patch to fix this issue.
comment:3 Changed 10 years ago by
 Status changed from needs_review to needs_info
This should ideally be fixed at the source (i.e. when duals are created). Currently we don't allow the creation of dual objects from nonenclosed IndexFaceSet
s. This may change in the future (?) since the exception thrown when you try to take the dual of a nonenclosed IndexFaceSet
is a NotImplementedError
exception. Will this change in the future, or can we just cause the dual()
function to always set the object it returns to be an enclosed object? Needs info.
comment:4 Changed 10 years ago by
 Cc kcrisman added
comment:5 Changed 8 years ago by
 Milestone changed from sage5.11 to sage5.12
comment:6 Changed 8 years ago by
 Milestone changed from sage6.1 to sage6.2
comment:7 Changed 7 years ago by
 Milestone changed from sage6.2 to sage6.3
comment:8 Changed 7 years ago by
 Milestone changed from sage6.3 to sage6.4
comment:9 Changed 4 years ago by
 Branch set to u/chapoton/11759
 Cc mkoeppe vdelecroix jplabbe added
 Commit set to e6b73d37e09fabae7f885ab700431704b51b5ec8
 Status changed from needs_info to needs_review
trivial ticket for a small improvement
New commits:
e6b73d3  trac 11759 adding enclosed keyword to octahedron etc

comment:10 Changed 4 years ago by
 Milestone changed from sage6.4 to sage8.0
comment:11 Changed 4 years ago by
 Reviewers set to Dima Pasechnik
 Status changed from needs_review to positive_review
thanks for digging up my old patch!
comment:12 Changed 4 years ago by
 Branch changed from u/chapoton/11759 to e6b73d37e09fabae7f885ab700431704b51b5ec8
 Resolution set to fixed
 Status changed from positive_review to closed
whoops, wrong title