PDA

View Full Version : objects sharing the same coords


nebille
11-08-2005, 08:26 AM
I cant seem to get my head around filtering objects with the same coords out of a selection. I no how to compare them but cant seem to filter them so that i select only the double objects ie.

if i have four boxes in the same place how do i only select one of the boxes.

regards

Nebille

j-man
11-08-2005, 09:24 AM
Ok,

Here is something I have lying around, will select all objects that have duplicate positions (not rotations!) it will leave the first one it finds but select all the others. you could replace pos with transform maybe for different results.


-- select all objects with duplicate positions in selection
o=#()
obj=selection as array
for i=1 to obj.count do
(
for j=i+1 to obj.count do
(
if obj[i].pos==obj[j].pos then
(
-- format "% % % %\n" i obj[i].pos j obj[j].pos
append o obj[j]
)
)
)
select o

Cheers,


nebille
11-08-2005, 12:46 PM
Thanks J , you have been a great help to me the last couple of weeks. Where do you work?

j-man
11-08-2005, 01:27 PM
Thanks J , you have been a great help to me the last couple of weeks. Where do you work?

Thanks < :

I work for an architect in London. Kepps me very busy!


CGTalk Moderation
11-08-2005, 01:27 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.