PDA

View Full Version : How to preserve SO selections after mesh change??


rsf
09-12-2005, 02:52 AM
Hello. I'm working on a script that would (well..wish it would) divide faces near selected edges.
Well...big problem...how can I retain references to edges (or vertices) after geometry change??? Is there any way??
Thanks?

j-man
09-13-2005, 12:22 PM
The problem is, once you change the topology, there are a different number of edges / vertices / faces so any indexing becomes useless.

One thing you might try is storing the positions of the faces (or whatever) and then cross referencing them after changes have been made, but this is going to be very slow.

One way around this is to use volume selections but I don't think this is going to help you.

Maybe if you detach the faces to a new object, and then divide the topology and add it back it might work, but even then you are going to have to juggle some large bitarrays to get the desired reults.

J.

rsf
09-15-2005, 12:08 AM
Thanks J.
Maybe when adding sub elements, which is the case when subdividing, new element indexes are appended to the end...I'll verify that..
Well...maybe not faces or edges because they actually change but vertices might mantain their indexes...
Thanks anyway

Moosley
09-15-2005, 01:14 AM
Thanks J.
Maybe when adding sub elements, which is the case when subdividing, new element indexes are appended to the end...I'll verify that..
Well...maybe not faces or edges because they actually change but vertices might mantain their indexes...
Thanks anyway

This is true, verts that are added start at the highest index. I wrote a little door cutting script which used this method. For some reason though the cuts sometimes went a little weird, zooming to the object extents seemed to help in these instances, don't know why though...

rsf
09-15-2005, 01:32 AM
Thanks :-)

111
09-17-2005, 09:54 AM
is it possible to use flags for your purposes?

CGTalk Moderation
09-17-2005, 09:54 AM
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.