Removing concave portions of a curve an reconnecting?

   999   3   2
User Avatar
Member
73 posts
Joined: April 2020
Online
Hello Experts,

I've been puzzling over this one for a while and not making progress. There is probably a simple solution, but I am not seeing it. (It is over 90 degrees Fahrenheit in my office, so I think I might be melting. A solution to this problem would surely reinvigorate me!)

I have a curve for which I'd like to remove the sections that head inward and end up with a curve with only straight or convex (or not too badly concave) curvature. For example, this curve has several concave portions, but I'm content to remove just the encircled one and reconnect it with a new straight segment. It would also be fine to remove all the concave sections and reconnect those too with straight segments.



If you have any ideas how to approach this, I'd be delighted to hear about them. I've attached my .hip file that looks at the curvature and attempts to remove the concave sections, but I'm really not getting anywhere toward my goal. Another question I have is whether there is a way to measure curvature on just the curve and not need to turn it into a surface?

Thank you so much for any help you can offer!

Mary

Attachments:
bad portion.png (787.6 KB)
reconnect portion.png (760.0 KB)
curve problem.zip (1.7 MB)

User Avatar
Member
209 posts
Joined: March 2018
Offline
Hello.
I hope you are doing well.
I just add a Shrinkwrap node and set its type to 2D to create a 2d convex shape for the input model.
Take a look at the attachment.
Hope it helps.

Attachments:
curve_problem_FIXED.hip (166.5 KB)

User Avatar
Member
73 posts
Joined: April 2020
Online
Thank you *so* much, N-G, that's perfect! I didn't even *know* about the shrinkwrap node -- very useful!

Best wishes to you,
Mary
User Avatar
Member
4516 posts
Joined: Feb. 2012
Offline
Shoutout to Cameron for adding 2d convex hull to the Shrinkwrap SOP based on my recent RFE. The guy is a legend!
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
  • Quick Links