dennisvolkerts Posted November 3, 2014 Share Posted November 3, 2014 Hi. Im trying to do a fracture and make some glue constraint but the problem im havin is that the glue adjunct pieces doesnt work inside my foreach. Please help! Thnx see attachment! ForEachConnectAdjunctPieces.hip Quote Link to comment Share on other sites More sharing options...
pbarua Posted November 3, 2014 Share Posted November 3, 2014 I'm not understanding why you need to glue pieces inside foreach. Pieces are already clustered by voronoifractutre sop. You can't connect pieces which have same name attribute. When you loop through by cluster attribute, all primitive inside have same name that's why it doesn't work. If you really need to connect it then add a point in the centre of piece inside foreach before connectadjacentpieces sop using add sop. Use centroid expression function for that. By the way, can you explain it, why you need so? Quote Link to comment Share on other sites More sharing options...
pbarua Posted November 3, 2014 Share Posted November 3, 2014 Can't upload file as on work, if you need I'll upload from home which explains it better. 1 Quote Link to comment Share on other sites More sharing options...
dennisvolkerts Posted November 3, 2014 Author Share Posted November 3, 2014 Hi, The reason i used the foreach is to create a glue by cluster atrribute. See attachment. I already found the answer.The for each doesnt always update untill you hit the green feedback checkerbox. Quote Link to comment Share on other sites More sharing options...
pbarua Posted November 3, 2014 Share Posted November 3, 2014 The for each doesnt always update untill you hit the green feedback checkerbox. That is for merging result or running loop over and over. It's linked to "Merge Results" at top lavel. You don't need that. Quote Link to comment Share on other sites More sharing options...
pbarua Posted November 3, 2014 Share Posted November 3, 2014 FYI if you turn on cluster in voronoifracture sop then all the pieces having same cluster value become single solid piece. No need to glue unless you want pieces to glue with neighbour chunks. 1 Quote Link to comment Share on other sites More sharing options...
3iart Posted November 3, 2014 Share Posted November 3, 2014 check out the glueCluster sop node. You might be able to skip the forEach all together. Quote Link to comment Share on other sites More sharing options...
dennisvolkerts Posted November 5, 2014 Author Share Posted November 5, 2014 FYI if you turn on cluster in voronoifracture sop then all the pieces having same cluster value become single solid piece. No need to glue unless you want pieces to glue with neighbour chunks. Hi Pradeep, Well. I didnt need single pieced clusters as one object... therefore i cant use te bullet sop. In the the voronoi sop inside the node its deleting the attribute __piece which i now bypassed by renaming. So i did made a glue constraint based on the attribute in the foreach which glued al my pieces that where showing the same clusters as in the voronoi fracture node. Quote Link to comment Share on other sites More sharing options...
rayman Posted November 5, 2014 Share Posted November 5, 2014 It`s much faster to perform connectadjacentpieces to all of the pieces and then just delete primitives that has different name for cluster on both ends. Quote Link to comment Share on other sites More sharing options...
dennisvolkerts Posted November 5, 2014 Author Share Posted November 5, 2014 It`s much faster to perform connectadjacentpieces to all of the pieces and then just delete primitives that has different name for cluster on both ends. Can you show me an easy example? Quote Link to comment Share on other sites More sharing options...
rayman Posted November 6, 2014 Share Posted November 6, 2014 (edited) Sure. Just create several glue clusters and set some string attribute on them to indicate their cluster value. Then use this vex on attribute wrangle set to operate on prims (its also better to use facet sop before that): int vt0 = vertexindex(0,@primnum,0); int vt1 = vertexindex(0,@primnum,1); int pt0 = vertexpoint(0,vt0); int pt1 = vertexpoint(0,vt1); string name0 = point(0,"clustername",pt0); string name1 = point(0,"clustername",pt1); if(name0!=name1){ removeprim(0,@primnum,1); //setprimgroup(0,"broken",@primnum,1); } Edited November 6, 2014 by rayman 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.