tile was slower than modulo division
This commit is contained in:
parent
7df4d93cf2
commit
47d6d9e978
2 changed files with 2 additions and 2 deletions
|
|
@ -49,7 +49,7 @@ def split(poly, plane, left_only: bool = False):
|
||||||
|
|
||||||
right_inds = numpy.where(right)[0]
|
right_inds = numpy.where(right)[0]
|
||||||
right_inds3 = numpy.repeat(right_inds, 3)
|
right_inds3 = numpy.repeat(right_inds, 3)
|
||||||
pnbr_inds = numpy.tile(numpy.arange(3), num_right)
|
pnbr_inds = numpy.arange(3 * num_right) % 3
|
||||||
|
|
||||||
# array of [[clipped vertex (cv0), connected vertex pv00], [cv0, pv01], [cv0, pv02], [cv1, pv10], ...]
|
# array of [[clipped vertex (cv0), connected vertex pv00], [cv0, pv01], [cv0, pv02], [cv1, pv10], ...]
|
||||||
# which is effectively a list of all edges which touch the right half-plane
|
# which is effectively a list of all edges which touch the right half-plane
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ def find_faces(neighbors):
|
||||||
num_verts = neighbors.shape[0]
|
num_verts = neighbors.shape[0]
|
||||||
|
|
||||||
edge_id = numpy.arange(3 * num_verts)
|
edge_id = numpy.arange(3 * num_verts)
|
||||||
nxt_edge = numpy.tile(numpy.arange(3), num_verts)
|
nxt_edge = numpy.arange(num_verts * 3) % 3
|
||||||
vstart = edge_id // 3
|
vstart = edge_id // 3
|
||||||
vcur = vstart.copy()
|
vcur = vstart.copy()
|
||||||
vnext = neighbors[vcur, nxt_edge]
|
vnext = neighbors[vcur, nxt_edge]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue