Hi All...i've got serious problem here.I try to create mirror data based on the vertex position. The problem is: why my script only works on simple geometry?when i run on the higher geometry (above 1000 vertex) it still running but the result is not like my expectation.Here is my script...its only work for mirror x in worldspace for now.there is 2 version,the one is working an another is not.yo can check manually that the position each vertex is exactly have a mirror.
thanks for all feedbacks...
---------working-------------
--Create box simple
mybox=box lengthsegs:1 widthsegs:1 heightsegs:1
convertto mybox editable_poly
select mybox
-- Collect position data
position=for i in $.Verts collect i.pos
-- Copy data for comparison
comparison= deepcopy position
-- Change each value of X in comparison
for i=1 to comparison.count do
(
comparison[i][1]=-comparison[i][1]
)
temp=#() --Create array to save mirror data
--compare
for i in position do
( c=finditem comparison i
append temp c
)
print Temp
---------working-------------
---------NOT working-------------
--"Notes:The difference is just the number of segments of the box"-------
--Create box simple
mybox=box lengthsegs:1 widthsegs:3 heightsegs:1
convertto mybox editable_poly
select mybox
-- Collect position data
position=for i in $.Verts collect i.pos
-- Copy data for comparison
comparison= deepcopy position
-- Change each value of X in comparison
for i=1 to comparison.count do
(
comparison[i][1]=-comparison[i][1]
)
temp=#() --Create array to save mirror data
--compare
for i in position do
( c=finditem comparison i
append temp c
)
print Temp
---------Not working-------------
Marco Brunetta · 2009-10-13
Anubis · 2009-09-24