Remove old inp in routine

This commit is contained in:
WQY\qiong
2023-03-21 21:18:53 +08:00
parent 8681a56ed7
commit 9f9d3227b9
28 changed files with 83 additions and 642 deletions

View File

@@ -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])