From 4fea7de85a3ccf602f2bb3a366ccec4aee377e1c Mon Sep 17 00:00:00 2001 From: Stefan Helmert Date: Sun, 4 Aug 2024 23:43:03 +0200 Subject: [PATCH] reformated --- xyzcad/render.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/xyzcad/render.py b/xyzcad/render.py index 89a08d9..a00b848 100644 --- a/xyzcad/render.py +++ b/xyzcad/render.py @@ -545,12 +545,9 @@ def convert_corners2cubes(cubes_coord2cornersval_dict): ) - @njit(cache=True) def convert_corners2pts(cubeCornerValsDict, r): - #ptsResDict = Dict() - with objmode(time1="f8"): time1 = time.perf_counter() pts_res_list = [] @@ -575,7 +572,6 @@ def convert_corners2pts(cubeCornerValsDict, r): with objmode(): print("ptsResDict time: {}".format(time.perf_counter() - time1)) - with objmode(time1="f8"): time1 = time.perf_counter() ptCoordDictKeys = np.asarray(list(ptsResDict.keys())) @@ -747,9 +743,10 @@ def build_repair_polygons(single_edge_dict): def repair_surface(poly_list): with objmode(time1="f8"): time1 = time.perf_counter() - poly_edge_list = [(0,0)]*(len(poly_list)*6) - poly_edge_list = [(e[(i + 1) % len(e)], e[i]) for e in poly_list \ - for i, f in enumerate(e)] + poly_edge_list = [(0, 0)] * (len(poly_list) * 6) + poly_edge_list = [ + (e[(i + 1) % len(e)], e[i]) for e in poly_list for i, f in enumerate(e) + ] s1 = set(poly_edge_list) s2 = set([(e[1], e[0]) for e in poly_edge_list]) singleEdgeSet = s1.difference(s2)