Masoud Posted February 23, 2019 Share Posted February 23, 2019 (edited) Hello; Please take a look at image bellow (and attached hip file). I would like to expand boundary of a flat geometry (without adding any new points), so I tried to use Peak SOP. The problem is I can't align point normals to a right direction. Normals.hip Edited February 23, 2019 by Masoud Quote Link to comment Share on other sites More sharing options...
Atom Posted February 23, 2019 Share Posted February 23, 2019 (edited) Here is how I have handled that in the past. Use a tube or ring around the exterior and transfer the normals from the outer object to the inner one. After looking at the image, I guess that is not right either..? ap_Normals.hiplc Edited February 23, 2019 by Atom Quote Link to comment Share on other sites More sharing options...
Atom Posted February 23, 2019 Share Posted February 23, 2019 (edited) What about something like this? Use a polyextrude to generate vertex normals, then use a wrangle to throw away the newly extruded points? ap_Normals.hiplc Edited February 23, 2019 by Atom Quote Link to comment Share on other sites More sharing options...
Masoud Posted February 25, 2019 Author Share Posted February 25, 2019 On 2/23/2019 at 4:58 PM, Atom said: Here is how I have handled that in the past. Use a tube or ring around the exterior and transfer the normals from the outer object to the inner one. After looking at the image, I guess that is not right either..? ap_Normals.hiplc Hi "Atom"; normals are not correct. Quote Link to comment Share on other sites More sharing options...
Masoud Posted February 25, 2019 Author Share Posted February 25, 2019 On 2/23/2019 at 5:09 PM, Atom said: What about something like this? Use a polyextrude to generate vertex normals, then use a wrangle to throw away the newly extruded points? ap_Normals.hiplc I don't want to change geometry topology (I would like to keep point numbers intact). Quote Link to comment Share on other sites More sharing options...
Atom Posted February 25, 2019 Share Posted February 25, 2019 Eventually, you'll catch on to the workflow. All you have to do is promote the vertex normals, back to point and then attribute transfer them onto the original geometry, thus preserving it. Quote Link to comment Share on other sites More sharing options...
Skybar Posted February 25, 2019 Share Posted February 25, 2019 Put an Ends SOP before your polyframe and set 'close u' to "unroll", essentially converting your geo to a curve. Then put another Ends SOP after the polyframe and set 'close u' to "close" to close the polygon again. Quote Link to comment Share on other sites More sharing options...
Atom Posted February 25, 2019 Share Posted February 25, 2019 (edited) Yep, that works too. I had to add a wrangle to flip the normals back around and a reverse. Edited February 25, 2019 by Atom Quote Link to comment Share on other sites More sharing options...
berglte Posted March 1, 2019 Share Posted March 1, 2019 (edited) This seemed like an interesting VEX challenge and I wanted to give it a go Searched for a solution and found this https://stackoverflow.com/questions/14066933/direct-way-of-computing-clockwise-angle-between-2-vectors Used that in a wrangle node to determine if a corner is convex or concave and added some other stuff and so far it seems to work. For now, the solution works only for closed curves and treats them as 2D shapes on a XZ plane. compute_normals.hiplc Edited March 1, 2019 by berglte 4 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.