Back to Blog
Age in a Group
Simulation Tip
⏱️ Counts for how long a point has been in a group.
1. Concept
💡 Increment a counter to track how long a point has been in a group
2. Execution
🔧 1. Create a point group 2. Append a Solver 3. Initialize a count value
if (@Frame ==1 ) {
if (@group_toMesh == 1) i@count = 1;
else @count = 0;
}
🔧 3. Increment count
int value = point(1, 'count', @ptnum);
if (value > 0) @group_toMesh = 1;
if (@group_toMesh == 0) @count = 0;
else i@count = 1 + value;
🎁 Bonus: Points will never leave the group once added.
