ben Posted May 6, 2010 Share Posted May 6, 2010 (edited) Hi, I have several curves intersecting and I want to get the intersection points. It sounds easy and I'm quitte sure there's something to do with curvesect and foreach SOP, but I can't get it to work. I'm really stuck with this and any help would be really appreciated. Thanks Edited May 6, 2010 by ben Quote Link to comment Share on other sites More sharing options...
homeless3d Posted September 18, 2012 Share Posted September 18, 2012 (edited) Hi, I have several curves intersecting and I want to get the intersection points. It sounds easy and I'm quitte sure there's something to do with curvesect and foreach SOP, but I can't get it to work. I'm really stuck with this and any help would be really appreciated. Thanks I have the same problem. Any suggestions? Thanks in advance. Pablo. Edited September 18, 2012 by homeless3d Quote Link to comment Share on other sites More sharing options...
eetu Posted September 18, 2012 Share Posted September 18, 2012 If your curves share points, then you could do pointneighbours() and see if there are more than 2 neighbors. If there are no points in the intersection points it'll be more hairy. Maybe extrude the curves a bit, and then intersect with something, maybe inside a foreach if needed? Quote Link to comment Share on other sites More sharing options...
zarti Posted September 18, 2012 Share Posted September 18, 2012 a bit late for the first poster .. -- -- forEachCurveZecting.hipnc .cheers Quote Link to comment Share on other sites More sharing options...
old school Posted September 18, 2012 Share Posted September 18, 2012 Straightforward task if you know the Curvesect SOP and the ins and outs of the Foreach SOP. Curvesect SOP takes two inputs. Left input is the curves to cut and the right is the cutter. See the first Curvesect SOP set-up in the attached file. Once you get that, it's time to bring that in to a ForEach SOP. The tricky bit is culling the recycled cut curves from the previous step from the lot prior to cutting with the next original curve in the network. This is easily done by adding a "parent" primitive attribute to the original curves based on $PR then loop through by iteration number of primitives and cut away. This all happens inside the ForEach SOP in the attached file and is a good example of when you would use iteration by number and Merge Results off which isn't too frequently done. This being Houdini, you can mix and match the curve primitive types as Curvesect SOP doesn't care: polys, beziers, NURBs curves are all fair game. cut_m_by_n_curve_network.hip Quote Link to comment Share on other sites More sharing options...
homeless3d Posted September 21, 2012 Share Posted September 21, 2012 Wow that's amazing! Thank you so much to everyone. The key for me was how to concatenate the two foreach nodes crossing the imputs. -P. Quote Link to comment Share on other sites More sharing options...
zarti Posted September 21, 2012 Share Posted September 21, 2012 be aware that points are overlapping . you can merge those if you need just intersection points or elaborate more if something 'special' needs to happen to each one of those . .cheers 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.