Opened 10 years ago

Closed 4 years ago

#11759 closed defect (fixed)

octahedron() and icosahedron() produce "non-enclosed" polyhedra

Reported by: kini Owned by: jason, was
Priority: major Milestone: sage-8.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:

Status badges

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/site-packages/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/site-packages/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/site-packages/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/site-packages/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)

trac_11759.patch (1009 bytes) - added by dimpase 10 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 10 years ago by kini

  • Summary changed from octahedron() and dodecahedron() produce "non-enclosed" polyhedra to octahedron() and icosahedron() produce "non-enclosed" polyhedra

whoops, wrong title

Changed 10 years ago by dimpase

comment:2 Changed 10 years ago by dimpase

  • Status changed from new to needs_review

I uploaded a trivial patch to fix this issue.

comment:3 Changed 10 years ago by kini

  • 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 non-enclosed IndexFaceSets. This may change in the future (?) since the exception thrown when you try to take the dual of a non-enclosed 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 kcrisman

  • Cc kcrisman added

comment:5 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:6 Changed 8 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:7 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:8 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:9 Changed 4 years ago by chapoton

  • Authors set to Frédéric Chapoton
  • 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:

e6b73d3trac 11759 adding enclosed keyword to octahedron etc

comment:10 Changed 4 years ago by chapoton

  • Milestone changed from sage-6.4 to sage-8.0

comment:11 Changed 4 years ago by dimpase

  • Authors changed from Frédéric Chapoton to Frédéric Chapoton, Dima Pasechnik
  • 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 vbraun

  • Branch changed from u/chapoton/11759 to e6b73d37e09fabae7f885ab700431704b51b5ec8
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.