View Full Version : Entering the distance for 2 points on a mesh
10-29-2006, 05:45 PM
does anyone know a handy way to enter the distance of 2 points (from one edge) in SI units.
Like: Selecting 2 points - and enter the value in SI units - done.
10-30-2006, 03:34 AM
There isn't any way as far as I know :shrug:
But I know of a work around that might do just what you're looking for. :)
Select one of the 2 points you want to move, then hold CTRL to spnap it to the other point, then enter the distance in SI units in the axis you want.
Hope this helps. :love:
10-30-2006, 09:13 AM
Thanks for you advice shadowedge!
Due to the changing axis of the points - its still not a smooth workflow.
Now I'll take a control object to moves more points at once & to snap - thats probably the only way of optimizing this whole process without scripting.
I even tried this 'spherize' (?) script from Helge M. - but it had a different approach - anyhow seeing from this script - I guess it could be scripted - just not by me ;)
Lets see who has some time & skillz ;) - just kidding.
10-30-2006, 10:12 AM
would you move both points or just the one. How would you decide which one to move if only one. Would the movement of the point(s) be along a line defined by their connecting vector?
If I find ten minutes or so I'll knock a script up for you.
10-30-2006, 10:20 AM
and script for show distance between two selected points :)
set v1 = xsimath.createvector3
set v2 = xsimath.createvector3
set v3 = xsimath.createvector3
set obj = selection(0).subcomponent.parent3dobject
set p1 = selection(0).subcomponent.componentcollection(0)
set p2 = selection(0).subcomponent.componentcollection(1)
set v1 = xsimath.mapobjectpositiontoworldspace (obj.kinematics.global.transform,p1.position)
set v2 = xsimath.mapobjectpositiontoworldspace (obj.kinematics.global.transform,p2.position)
10-30-2006, 02:34 PM
Thanks Kim & Depol,
I hope to make a better description of the problem with the attached image (a simplified version of the situation).
When I select points 1 & 2 - I would like to hit the 'script' button and have them on a certain distance apart - based on the connecting edge rotation. Than I would like to go on and correct points 2 & 3. Basically many points on this mesh have a slightly different distance - all I want it make them equally apart.
Thanks for your script - but to get the distance is not my full objective - like I said above - its more about getting those 2 selected points in a specified distance to each other - based on SI units.
Maybe - based on your sript I'm just missing a single line of code, something like: 'v3.SetLength = 0.45' - but thats not correct as it seems.
Like you can guess - it would be great help from you - to show me how it's done!
10-31-2006, 01:07 PM
but which of points one or two do you want to move? 1, 2 or both?
10-31-2006, 01:07 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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.