Jump to content

Sign in to follow this  

Delete points based on distance

Recommended Posts



I was considering the scenario when I have the object and let say one single point/null next to it.

And base on the distance between the null and my mesh I would like to delete the mesh points gradually. I tried xpresso a bit today with point node but I cant figured out how to do it.

From my understanding I would need position attribute from my mesh points and the distance from my null to the mesh as a variables and then I can run if condition saying if the distance is less then something remove points from my geo. If you Guys can help my with that using python or coffee I would be delighted 🙂


Share this post

Link to post

Not in front of machine atm, but there is an example in sdk where edge selection is made. Here is selecting points from top of my head, hope someone will chip in...


import c4d

from c4d import utils

#Welcome to the world of Python


def main():    


count = obj.GetPointCount()   

selection = obj.GetPointS()     


for i in xrange(count): 


Share this post

Link to post

here's my take on it. You have two user data entries on the Python Generator. You need to input a null in the first one and the second entry defines the distance from the null, which the points will be deleted at. It's a bit slow, but I just made this up in a hurry so... 🙂

point remover.c4d

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...