Notifications
Clear all
[Closed] How to faster?
Sep 13, 2011 1:09 pm
This is my test.(i get from here)
spend time: 45.185
It’s too slow, is there other way to faster?
obj = convertToMesh (teapot segments:16)
fn FindSamePosVert obj tolerance:0.001 =
(
vList = #{}
theMesh = snapshotAsMesh obj
vCount = theMesh.numVerts
vList.count = vCount
t = timestamp()
progressStart ""
for v in 1 to vCount-1 do
(
if not vList[v] then
(
pv = getVert theMesh v
for n in v+1 to vCount do
(
pn = getVert theMesh n
if distance pv pn < tolerance then
(
vList[n] = true
vList[v] = true
)
)
)
progressUpdate (v*100.0/vCount-1)
)
progressEnd()
print ((timestamp() - t)/1000.0)
delete theMesh
vList
)
FindSamePosVert obj
1 Reply
Sep 13, 2011 1:09 pm
see this thread for ideas:
http://forums.cgsociety.org/showthread.php?f=98&t=807449