newbie question about dictionnary ?
Sophie Alléon
alleon at club-internet.fr
Fri Sep 5 02:37:01 EDT 2003
Hi,
CONTEXT
I do numerical simulation for which I have to process mesh. A mesh is made
of
triangle which are made of points.
I want from this information to create edges and build triangle from edges
rather
than from points.
PROBLEM
An edge is shared by possibly more than one triangle.
ALGORITHM
have a triangle class (made of 3 edges)
have an edge class (made of 2 points and embeding a triangle list (those
connected to the edge)
for each triangle construct its edges but I have to check if the edge
already exists
for doing this I thought the dictionary was excellent but the key is a
string while I want it
to be the 2 points forming the edge ? How to do it ?
Have you a better idea ?
Thanks
Guillaume
More information about the Python-list
mailing list