br1 Posted May 22, 2013 Share Posted May 22, 2013 Hi, I'm trying to remember how to do this. I'm using a pattern to delete points on a curve, something like !*:10 but I want to exclude the first and the last point. Bruno Quote Link to comment Share on other sites More sharing options...
magneto Posted May 22, 2013 Share Posted May 22, 2013 (edited) I think there are many ways to do this. I would use this pattern: 0 $N and set it to "Delete Non-Selected". Edited May 22, 2013 by magneto Quote Link to comment Share on other sites More sharing options...
sanostol Posted May 22, 2013 Share Posted May 22, 2013 (edited) try this as a python expression in the pattern field inc = 10points2delete = range(1,len(hou.pwd().inputs()[0].geometry().points())-1,inc)return points2delete[/CODE] Edited May 22, 2013 by sanostol Quote Link to comment Share on other sites More sharing options...
br1 Posted May 22, 2013 Author Share Posted May 22, 2013 I think there are many ways to do this. I would use this pattern: 0 $N and set it to "Delete Non-Selected". Mmm, maybe I didn't state it correctly. I don' t want to delete all points between first and last, only a percentage based on the pattern !*:10 Quote Link to comment Share on other sites More sharing options...
br1 Posted May 22, 2013 Author Share Posted May 22, 2013 (edited) try this as a python expression in the pattern field inc = 10points2delete = range(1,len(hou.pwd().inputs()[0].geometry().points())-1,inc)return points2delete[/CODE]It gives me an error :Error: Unable to evaluate expression (Syntax error - extra tokens detected in expression (/obj/curve_object1/Br1_fence1/delete1/pattern)).My bad, it was not correctly set to python. Seems to work now Edited May 22, 2013 by br1 Quote Link to comment Share on other sites More sharing options...
anim Posted May 22, 2013 Share Posted May 22, 2013 you can as well just use this pattern !*:10 ^0 ^$N[/CODE] 2 Quote Link to comment Share on other sites More sharing options...
br1 Posted May 22, 2013 Author Share Posted May 22, 2013 you can as well just use this pattern !*:10 ^0 ^$N[/CODE]Exactly what I was looking for, Tomas !Looks so simply now , thanks ! Quote Link to comment Share on other sites More sharing options...
sanostol Posted May 22, 2013 Share Posted May 22, 2013 hahaha, short and simple 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.