Jump to content

For-loop for in place modification and testing against the remaining primitives

Recommended Posts

How can I do this:

Say I have n  non overlapping primitives, and I want to try to scale up the ones that can, i.e without intersecting other ones.

The idea is:

For each primitive

if the larger version doesnt intersect the other ones, then scale it ...


The trick is " the other ones" is both the already processed ones, and the ones to be processed, excluding current one.

Problem I'm trying to solve: I have a set of primitives, and I want to expand them a little so they become closer together.

I can't find the right combination of merge / feedback / fetch feedback /  using a for-loop.

Edited by AntoineSfx

Share this post

Link to post
Share on other sites

Take a look at the for-loop in the Grain Source SOP, it does the opposite (moves intersecting points away from eachother) but it might give you some ideas.

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