You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far, only single letters are supported at Polygon creation:
p = Polygon(*vertices, name='ABCD')
It's always possible to reset some of the names, like: p.vertices[1] = 'B_{1}', if desired, but it would be practical to be able to set them all at creation.
The idea, if not only letters are used, is to provide the name with pipes separating the points' names:
p = Polygon(*vertices, name='A|B_{1}|C|D')
At creation, check if at least a pipe is in the string, if yes, then split the string using | as sep, check it has as many names as len(vertices) and use them to set the Point's names.
Add the relevant tests and update the docstring of __init__() (of Polygon and other polygons like Rectangle).
The text was updated successfully, but these errors were encountered:
So far, only single letters are supported at Polygon creation:
p = Polygon(*vertices, name='ABCD')
It's always possible to reset some of the names, like:
p.vertices[1] = 'B_{1}'
, if desired, but it would be practical to be able to set them all at creation.The idea, if not only letters are used, is to provide the name with pipes separating the points' names:
p = Polygon(*vertices, name='A|B_{1}|C|D')
At creation, check if at least a pipe is in the string, if yes, then split the string using
|
as sep, check it has as many names aslen(vertices)
and use them to set the Point's names.Add the relevant tests and update the docstring of
__init__()
(of Polygon and other polygons like Rectangle).The text was updated successfully, but these errors were encountered: