View Full Version : help,how to get the mirror point?
How to select the mirror point of one selected point?
for example,I select the point<<1,1,0>>,how can I select the mirror one <<-1,1,0>> in mel?Is there any command?
08-25-2004, 09:44 AM
I don't know of a single command for this. I imagine you'll have to write a script which iterates through all points on your geometry, and finds that which is closest to the required mirror-point (generally, there's no guarantee of an exact match).
Thank you for your replay first.But I used the method to select the mirror point.If there were too many points,it would be very slow.So I send this question.If there was no command,it would be terrible.:(
08-25-2004, 06:11 PM
Fist of all you can use paint selection tool with stroke reflection parameter turned on.
Actually there's another way, instead of using vertex coordinates you could use model topology. Calculate how many edjes you should walk from the initial selection to the vertex( or other component) which lies on a mirror plane. After that walk in a different direction from that vertex needed amount of times. It should work faster than iterating through all vertexies.
And speaking about coordinate method's speed. You can optimize it to work at least ten times faster. You can remember the initial selection's bounding box, mirror it. Then select vertexies that are in that mirrored bounding box. After that you can iterate between initial selected vertexies and in mirrored bounding box vertexies. And of cource you should delete the vertex from both arryas if there's match, so that each time the number of operations reduces.
08-25-2004, 09:12 PM
polySelectConstraint should do the trick nicely (assuming polys). be warey of tolerance/precision issues, eg. cases where exact probing wont find things even if you know they are exactly where your probing.. takes some experimentation.
08-25-2004, 09:23 PM
Hm, I've tried to use PolySelectConstraint, but for mirroring polygon selection it doesn't seem very helpfull. I can find a point which is at a certain distance from the plain, or axis, but still I have to write everything exept "if" line, where the distances are compared.
Can you give us more detailed description of how to set it up using seleciton constraints?
Maybe I haven't expressed what I mean clearly.I want to select the mirror point on just the same polyobject.
ps:If it's NURBs,it's easy.
08-26-2004, 04:03 AM
you want to spatially probe for a point you cant otherwise determine the id of? if so, im not sure how you are managing to do this with nurbs, and possibly risk going down the wrong path again, but, all i meant by using polySelectConstraint is to use the point distance function, w a tiny radius..or whatever threshold you want to search w/i ... you get the point position to probe around by doing a little maths to resolve where that point would lie when mirrored about your desired plane (if world axes are your mirror planes, then you can just negate the appropriate axis, like in your first example). the one sweaty lump of poo about this command is that it works with frigging selections, ...if only it had a mode that just returned the component ids that match the criteria w/o having to excute nasty, slow, scene selections, which are rather annoying when your iterating chunks :(.
09-04-2004, 04:41 PM
Yep, good way to select mirror component using polygon selection constraint instead of using iteration through the whole mesh. Tried it out, and it works much faster, you only have to read corrdinates of each of selected vertexies and give it to polySelectConstraint command, after that read the selected vertex, remember it in some sort of select array. After that repeat that for every component selected adding constrained vertex to the array. In the end you just select this array, and whoala:) Hope it helps:)
Thx.I knew the paint selection tool,and I can use it to select the mirror point in working.But I didnt knew how to use it in MEL cause no command was done in history.Maybe what you said got it and I'll try it.
01-19-2006, 02:00 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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.