Commit 2b2543ea authored by Sean Fitzgibbon's avatar Sean Fitzgibbon
Browse files

accomodate more point style

parent 2fcd1b9a
......@@ -199,8 +199,8 @@ def is_number(s):
def is_point(p):
'''Test if section looks like a point section'''
result = True
if len(p) != 5: result = False
if not all([is_number(n) for n in p[:-1]]): result = False
if len(p) not in [4, 5]: result = False
if not all([is_number(n) for n in p[:4]]): result = False
return result
def parse_point(p):
......@@ -265,7 +265,7 @@ def to_data(sections):
else:
contour.append(parse_contour(section))
cells = np.asarray(cells)
if len(cells)>0: cells = np.asarray(cells)
return contour, cells
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment