Remove old inp in routine
This commit is contained in:
@@ -80,25 +80,9 @@ def delete_vertex(name: str, cs: ChangeSet) -> ChangeSet:
|
||||
# id x y
|
||||
# [EPA3][NOT SUPPORT]
|
||||
#--------------------------------------------------------------
|
||||
def inp_in_vertex(section: list[str]) -> ChangeSet:
|
||||
vertices: dict[str, list[dict[str, float]]] = {}
|
||||
|
||||
for s in section:
|
||||
if s.startswith(';'):
|
||||
continue
|
||||
|
||||
tokens = s.split()
|
||||
if tokens[0] not in vertices:
|
||||
vertices[tokens[0]] = []
|
||||
vertices[tokens[0]].append({'x': float(tokens[1]), 'y': float(tokens[2])})
|
||||
|
||||
cs = ChangeSet()
|
||||
for link, coords in vertices.items():
|
||||
cs.append(g_add_prefix | {'type': 'vertex', 'link' : link, 'coords' : coords})
|
||||
return cs
|
||||
|
||||
|
||||
def inp_in_vertex_new(line: str) -> str:
|
||||
def inp_in_vertex(line: str) -> str:
|
||||
tokens = line.split()
|
||||
link = tokens[0]
|
||||
x = float(tokens[1])
|
||||
|
||||
Reference in New Issue
Block a user