If you're using Geometry.GetClosestLocations(), you should be initializing 
it with a call to Geometry.SetupPointLocatorQueries() which creates an 
acceleration cache and allows you to specify how the search should be 
performed.  In your case, you pass siClosestVertexOrKnot as the first 
argument.

This is one area you'll have more flexibility in the SDK than through ICE.

Matt




Date: Fri, 15 Jul 2016 20:05:23 +0900
From: Martin Yara <furik...@gmail.com>
Subject: Re: Get Closest Point in another geometry
To: "softimage@listproc.autodesk.com"
<softimage@listproc.autodesk.com>

Thanks for your answers!

I already coded it with my original idea, and so far it works fine.

Since I guess an ICE alternative would faster for high poly objects, I'll
try that later.

Martin


On Fri, Jul 15, 2016 at 8:01 PM, Tom Kleinenberg <zagan...@gmail.com> wrote:

> Hi Martin
>
> Paul's answered how to copy weight values from one object to another. He's
> got an old video where he showed how to write to a weight map, which may 
> be
> useful : https://vimeo.com/19031487 . It's uses a distance test rather
> than copying values but the set up for how to write a weight map may be of
> interest.
>
> There are a number of really good videos in that channel on geometry
> manipulation, if you have the time it's probably worth going through them.
>
>
>
>
>
> On 15 July 2016 at 09:22, <p...@bustykelp.com> wrote:
>
>> Its very easy in ICE. but you will have to have a map existing to write
>> to as ICE cant generate Maps.
>>
>> There is a get closest points node. Which returns an array of locations.
>> If you just want one point, then the nearest will be the first in the 
>> array
>>
>> so in ICE its a bit like this
>>
>> OTHER OBJECT------GETCLOSESTPOINTS--------SELECT IN ARRAY (select the
>> first, which is 0)--------GETDATA(weightmap.weights)--------SETDATA(this
>> object?s weightmap that you have made to write it to)
>>
>> If you freeze the ICE tree, its now permanent.
>>
>> *From:* Martin Yara <furik...@gmail.com>
>> *Sent:* Friday, July 15, 2016 8:06 AM
>> *To:* softimage@listproc.autodesk.com
>> *Subject:* Get Closest Point in another geometry
>>
>> Hi list,
>>
>> I'm trying to write a tool to snap to the closest points and copy their
>> weights, so these points would have the same position and the same 
>> weights.
>> But I can't find a method or property besides 
>> Geometry.GetClosestLocation,
>> which gives me the location in the geometry, not the closest point.
>>
>> My only idea would be to use the GetClosestLocation and then get the
>> points from the polygon in that location and iterate between those 
>> points.
>>
>> Is there any easier or direct way to do this?
>>
>> I would try ICE but I'm don't know how to copy the weights with ICE, or
>> if this is possible, or how to get the ICE information to use it to copy
>> weights through scripting.
>>
>> Thanks
>>
>> Martin 

------
Softimage Mailing List.
To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with 
"unsubscribe" in the subject, and reply to confirm.

Reply via email to