Do not apply accurate calculation by default

This commit is contained in:
WQY\qiong
2023-06-17 11:23:02 +08:00
parent 6a35a41f51
commit daa6ecc82f

View File

@@ -236,14 +236,15 @@ def _collect_new_links(in_links: dict[str, list[str]], t_nodes: dict[str, Any],
return (new_nodes, new_links)
def calculate_boundary(name: str, nodes: list[str]) -> list[tuple[float, float]]:
def calculate_boundary(name: str, nodes: list[str], accurate = False) -> list[tuple[float, float]]:
topology = Topology(name, nodes)
t_nodes = topology.nodes()
t_links = topology.links()
vertices, path, boundary = _calculate_boundary(topology.max_x_node(), t_nodes, t_links)
#return boundary
if not accurate:
return boundary
api = 'calculate_boundary'
write(name, f"delete from temp_region where id = '{api}'")