Skip to content

Commit

Permalink
reformated
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTesla committed Aug 8, 2024
1 parent a0cc1ab commit 08b89ca
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions xyzcad/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]

Expand Down

0 comments on commit 08b89ca

Please sign in to comment.