From 08b89cab1225a2cc4fc2be5b5feb07af5849eae1 Mon Sep 17 00:00:00 2001 From: Stefan Helmert Date: Thu, 8 Aug 2024 21:46:19 +0200 Subject: [PATCH] reformated --- xyzcad/render.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/xyzcad/render.py b/xyzcad/render.py index 0d1be7d..1d854d5 100644 --- a/xyzcad/render.py +++ b/xyzcad/render.py @@ -365,6 +365,7 @@ tlt[127] = [[3, 4, 5]] tlt[128] = [[3, 5, 4]] + @njit(cache=True) def round(x): return np.floor(10000.0 * x + 0.5) / 10000.0 @@ -689,23 +690,23 @@ def precTrPnts(func, cutCedgeIdxArray, edge2ptIdxArray, ptCoordArray): @njit(cache=True) def calcTrianglesCor(corCircList, invertConvexness=False): - tr_arr = np.zeros((len(corCircList)*6,3,3)) + tr_arr = np.zeros((len(corCircList) * 6, 3, 3)) c = 0 if invertConvexness: for k in range(len(corCircList)): circ = corCircList[k] - for i in range(len(circ)-2): + for i in range(len(circ) - 2): tr_arr[c][0] = circ[0] - tr_arr[c][1] = circ[i+1] - tr_arr[c][2] = circ[i+2] + tr_arr[c][1] = circ[i + 1] + tr_arr[c][2] = circ[i + 2] c += 1 else: for k in range(len(corCircList)): circ = corCircList[k] - for i in range(len(circ)-2): + for i in range(len(circ) - 2): tr_arr[c][0] = circ[0] - tr_arr[c][1] = circ[i+2] - tr_arr[c][2] = circ[i+1] + tr_arr[c][1] = circ[i + 2] + tr_arr[c][2] = circ[i + 1] c += 1 return tr_arr[:c]