Fast way to get loop end edges/verts?


#21

there is the better one (!) taking into account the mxs specifics:

fn searchEndEdges3 ep =
(	
	getEdgeVert = ep.GetEdgeVertex
	
	ee = ep.GetSelection #edge
	
	vx = #{}
	vy = #{}
	for e in ee do
	(
		v = getEdgeVert e 1
		append (if vx[v] then vy else vx) v
		v = getEdgeVert e 2
		append (if vx[v] then vy else vx) v
	)
	verts = vx - vy

	edges = #{}
	ep.getedgesusingvert edges verts
	return #(verts, edges * ee)
)

generally it’s two times faster

Jorge, i suggest to split the first place as usually :wink:


#22

Yes, you got it. Don’t even need to test it.
This was a smart move: :+1:

ep.getedgesusingvert edges verts