Jump to content
Trilec

Deleting outside primitives after boolean fracture

Recommended Posts

hi all,

This is a bread and butter problem, solved in many different ways....remove (cull) the outside piece primitives after a "Boolean Fracture".

Ive been looking for a simple and fast VEX solution (not... for-each loop nodes)

I found one that seems in the right direction as I love its simplicity. (was trying this in detail mode)

If anyone has other or a more elegant VEX solution I would love to explore it, cheers

int insides [] = expandprimgroup(0, "inside");
int outsides[] = expandprimgroup(0, "outside");

foreach(int inside; insides)
{
    int     success;
    string  insideName = primattrib(0, "name", inside, success);

    foreach(int outside; outsides)
    {
        string outsideName = primattrib(0, "name", outside, success);

        if(insideName == outsideName)
        {
            setprimgroup(0, "inside", inside, 0, "set");
            setprimgroup(0, "outside", inside, 1, "set");
            setprimattrib(0,"Cd",outside,set(1,0,0),"set"); //small test using the colour
            break;
        }
    }
}

as usual any help appreciated.

 

Edited by Trilec
hilighted booleans as this is the main issue,

Share this post


Link to post
Share on other sites

Take a look at this topics
not specifically VEX  though, but the last one is not for-each loop.

 

Edited by flcc

Share this post


Link to post
Share on other sites

Thanks Flcc,

Interesting, uses similar to above, by default if you turn the Material type from Concrete to Wood (boolean fracture) you need to change the group expand to "wood_cutoutside". 

im still investigating and will post any other VEX solutions I might find.

 

c

Edited by Trilec

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

×