Jump to content
Sunsheku

Delete FIRST and LAST point of line geometry

Recommended Posts

Posted (edited)

Hello.

I'm trying to delete first point and last point of geometry made with line node.

Somebody have a solution for this?

Edited by Sunsheku

Share this post


Link to post
Share on other sites
Posted (edited)

Hi,

many ways to do that... here is one:

make a "group by range" node, choose points as a group type, and put 0 for start, 1 for end, and check inverse range. This will select the last point.

make another group, with point 0.

blast those 2 groups.

 

a shorter way would be a wrangler:

put down a point wrangler node.

and type this :

removepoint(0,0);
if(@ptnum == (@numpt-1))
    removepoint(0,@ptnum);

first line remove point 0 (the first point of the line). (0,0)means : (geometry entering slot number 0 of the node , point number 0)

second line reads : if the actual point number is equal to the number of points minus one (the last point of the line)

third line : remove that point

Edited by 6ril

Share this post


Link to post
Share on other sites
//set a wrangle to run over primitives
int primpts[] = primpoints(0,@primnum);
removepoint(0,primpts[0]);
removepoint(0,primpts[-1]);

 

  • Like 1

Share this post


Link to post
Share on other sites

Thanks!

I got what i want to do!

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

×