On Mon, Jun 19, 2023 at 11:18 AM John Cremona <john.crem...@gmail.com> wrote:
>
> I have some quite small graphs which are polyhedral, each is the 1-skeleton 
> of a (connected convex) polyhedron such as a cube, tetrahedron, etc, 
> constructed from a list of edge pairs.
>
> I can get the faces of one of these, say G, via G.faces().  This returns a 
> list of lists of vertices, each one being a list of the vertices of one face 
> in some cyclic order.  So each face in the list has an implied orientation.  
> OK so far.
>
> What I want is for the orientations of the different faces to be coherent, 
> coming from a single orientation of the surface.  Expliticly that means that 
> each edge xy, which  will appear in exactly two faces, appears once in each 
> direction, i.e. x before y (cyclically) in one and the other way round in the 
> other.
>
> It is possible that G.faces() is already returning such a globally oriented 
> list of faces, as experimentation suggests, but I need to be certain -- 
> otherwise I can write code to check and if necessary reverse some faces.  I 
> would prefer not to have to though.
>
> The docstrong of G.faces() does not make this clear (at least not to me).

You can call G.strong_orientation()
to get an orientation of the edge of your graph, and use it.

HTH
Dima

>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/CAD0p0K5e9ch3tgrM2RAHxQieVOqG%2BEX37fyWj7BwF0ns-NTPpA%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAAWYfq1CD25svmrm-VxCXHS02oGrzPE5V%2BZPfxAdX1qwN2uMFA%40mail.gmail.com.

Reply via email to