bamfbamf Posted April 3, 2019 Share Posted April 3, 2019 (edited) It seems that all point consolidation methods pre H17.5 are deprecated and we should switch to using GU_Snap instead. Problem is, there is no GU_Snap in H17.5 or at least I couldn't find it. It's not a separate file in $HFS/toolkit/include/GU directory and it's not embedded inside any header file in whole $HFS/toolkit/include directory. Is it not included yet in builds? Any help? Edited April 4, 2019 by bamfbamf Quote Link to comment Share on other sites More sharing options...
bamfbamf Posted April 5, 2019 Author Share Posted April 5, 2019 So I'm assuming this is still not added to builds since my topic is the only one where it's mentioned, beside one SideFX documentation link which states what the title of this topic says Quote Link to comment Share on other sites More sharing options...
forever_kk Posted January 4, 2023 Share Posted January 4, 2023 Now, Houdini19.5, "toolkit\include\GU\GU_Snap.h" Fuse SOP "GU_Snap.h" I used "snapGrid" successfully like this void CeshiVerb::cook(const SOP_NodeVerb::CookParms& cookparms) const { auto&& sopparms = cookparms.parms<CeshiParms>(); GU_Detail* detail = cookparms.gdh().gdpNC(); GU_Detail qgdp; qgdp.copy(*detail); GA_RWHandleV3 Phandleq(qgdp.findAttribute(GA_ATTRIB_POINT, "P")); GU_Snap::GridSnapParms parms; parms.myGridSnapType = 0; parms.myXLines = 1; parms.myYLines = 1; parms.myZLines = 1; parms.myXOff = 0; parms.myYOff = 0; parms.myZOff = 0; parms.myTol = 10; parms.myPosH = Phandleq; GU_Snap::snapGrid(qgdp, parms); detail->copy(qgdp); } But "snapPoints" has something wrong GU_Detail qgdp; qgdp.copy(*detail); detail->clearAndDestroy(); GU_Snap::PointSnapParms parms; parms.myDistance = 0.1; parms.myAlgorithm = GU_Snap::PointSnapParms::SnapAlgorithm::ALGORITHM_LOWEST_POINT; parms.myQPosH = qgdp.getP(); parms.myTPosH = qgdp.findAttribute(GA_ATTRIB_POINT, "P"); GU_Snap::snapPoints(qgdp, NULL, parms); detail->copy(qgdp); 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.