Jump to content
Sign in to follow this  
jwoelper

fuse between groups only

Recommended Posts

Hi everyone,

just came across a problem where I wanted to fuse points between two or more groups.

Suppose I have groups A and B. I do not want points from group A to fuse with other points within group A, just with ones in group B. That way points in A should only fuse to ones in group B and vice versa.

Is that possible? I tried to work around that by creating volumes from the geometry and intersecting them, but that method is not precise and cpu-intensive...

Any help is greatly appreciated!

Johann

Share this post


Link to post
Share on other sites

Hi!

Thank you very much for the help!

Unfortunately, this method does not work for me... my grouped points are closer together than their targets, so I'd strictly need a member of A snap to a member of B only.

I have included my problem next to your example in the file - sorry if I did not explain it properly.

fuseGroups.hipnc

hi!

take a look a t the file, basically i created a new group based on other two, nothing magical

Share this post


Link to post
Share on other sites

Sounds like a perfect job for point clouds.

When I get a chance I'll sketch an example, but in the meantime:

 for each point 'i' in A
    open B as a pointcloud with query_pos=A[i] and radius=snap_threshold
       if point 'j' found, move A[i] to B[j]
    close pcloud
 end foreach

Share this post


Link to post
Share on other sites

Here's a quick sketch using point clouds. I couldn't open your file Johann, so I modified Daniel's.

Just hit play to see it in action.

As an aside, while doing this I noticed that using pcfilter() (or using pcfarthest() as a determinant for whether a point was found, one or the other) failed in some cases (and shouldn't). No time to check right now, but it *may* be a bug. Anyway, you'll see that (much shorter/cleaner) approach commented out, and a hand-rolled pcfilter() used instead -- but still pretty straight forward.

fuseGroups_pcmethod.hip

HTH,

Cheers.

Share this post


Link to post
Share on other sites

Thanks a million for taking the time to assemble this example!

This was very very helpful!

Thanks again

Johann

Here's a quick sketch using point clouds. I couldn't open your file Johann, so I modified Daniel's.

Just hit play to see it in action.

As an aside, while doing this I noticed that using pcfilter() (or using pcfarthest() as a determinant for whether a point was found, one or the other) failed in some cases (and shouldn't). No time to check right now, but it *may* be a bug. Anyway, you'll see that (much shorter/cleaner) approach commented out, and a hand-rolled pcfilter() used instead -- but still pretty straight forward.

fuseGroups_pcmethod.hip

HTH,

Cheers.

Share this post


Link to post
Share on other sites

Hi,

 

I have pretty much the same problem as you but i'm using a sweep to instance multiple objects along a curve, I've grouped all the points in the positive and negative  Z space separate group but I can't figure how to implement them with your point cloud.Could someone give me a hint as to how to implement your solution in my context.

 

Thanks !

 

 

test.hipnc

post-15839-0-84541200-1459985943_thumb.p

post-15839-0-36176700-1459985944_thumb.p

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×