Igor Posted August 18, 2016 Share Posted August 18, 2016 I have 3D scanned Model and need to measure distance between two points on Mesh. In Documentation I found suflen function but it is only for Nurbs. What ist best method to do same on polygon mesh? Thanks! Quote Link to comment Share on other sites More sharing options...
dimovfx Posted August 18, 2016 Share Posted August 18, 2016 http://www.sidefx.com/docs/houdini15.0/vex/functions/distance Quote Link to comment Share on other sites More sharing options...
Igor Posted August 18, 2016 Author Share Posted August 18, 2016 Thanks Alexander! I know this function but it does calculate straight distance between Points not distance on Mesh. Quote Link to comment Share on other sites More sharing options...
eetu Posted August 18, 2016 Share Posted August 18, 2016 http://www.sidefx.com/docs/houdini/nodes/sop/findshortestpath 1 Quote Link to comment Share on other sites More sharing options...
Igor Posted August 18, 2016 Author Share Posted August 18, 2016 Thank Eetu! This is great SOP! Is there way to get length of the "smooth" and not "triangulated" path? I tried with Smooth-SOP and Ray-SOP but Curve gets shorter because endpoints are not fixed. Thanks Quote Link to comment Share on other sites More sharing options...
petz Posted August 19, 2016 Share Posted August 19, 2016 do a search for "geodesic distance" in the forum. you´ll find a thread with some example files. are you looking for the actual geodesic path between the two points or just the geodesic distance? 1 Quote Link to comment Share on other sites More sharing options...
Igor Posted August 19, 2016 Author Share Posted August 19, 2016 Thanks Petz! I will do search. I need only distance between Points. The geometry is 3D scanned model and I must scale it to match other parts. For this I need exact distance on Mesh. Quote Link to comment Share on other sites More sharing options...
eetu Posted August 19, 2016 Share Posted August 19, 2016 I was pondering whether one could use the Volume Arrival Time SOP for this, but the thread petz alluded to seems to already have an example of that. By me. I need a new head Quote Link to comment Share on other sites More sharing options...
Igor Posted August 19, 2016 Author Share Posted August 19, 2016 Quote Thanks Eetu! I´m trying to use your file and the file from Petz to see if it does what I need. Quote Link to comment Share on other sites More sharing options...
petz Posted August 19, 2016 Share Posted August 19, 2016 if your mesh doesn´t have holes in it and you need just the distance betwen two points, it´s fairly easy to calculate. take a look at the attached file. it basically uses the fact that a real geodesic path unfolds into a straight line in the plane. so, all you have to do is to unfold the curve comming from the shortestPathSop and measure the euclidian distance between both endpoints... hth. petz geodesic_distance.hipnc 5 Quote Link to comment Share on other sites More sharing options...
Igor Posted August 19, 2016 Author Share Posted August 19, 2016 Thanks Petz! Your method works perfect! Quote Link to comment Share on other sites More sharing options...
Zybrand Posted August 19, 2016 Share Posted August 19, 2016 Great example Petz thanks. What is the outerproduct function and matrix multiplication for it the first wrangle node? It does not seem to change any of the attributes when I remove it. Quote Link to comment Share on other sites More sharing options...
petz Posted August 19, 2016 Share Posted August 19, 2016 18 minutes ago, Zybrand said: Great example Petz thanks. What is the outerproduct function and matrix multiplication for it the first wrangle node? It does not seem to change any of the attributes when I remove it. it doe´s project the vector onto the plane defined by the point normal. it´s there to make sure that the points of the 1-ring are correctly sorted even on distorted meshes. to see the difference, visualize the local frame (vec_u and vec_v) as attributes. hth. petz Quote Link to comment Share on other sites More sharing options...
Zybrand Posted August 19, 2016 Share Posted August 19, 2016 I still don't see a difference in vec_v with or without the * mat so does that mean vec_v is already on the plane defined by the normal? But I can see the difference it makes further down where you are calculating sort_val so I can see the results but I don't fully understand it :). What is the matrix you get from outerpoduct of a vector and itself? Is it the normal direction in matrix form and subtracting that from the ident() gives you the plane you want to project the vector too? thanks, Zybrand Quote Link to comment Share on other sites More sharing options...
petz Posted August 19, 2016 Share Posted August 19, 2016 51 minutes ago, Zybrand said: I still don't see a difference in vec_v with or without the * mat so does that mean vec_v is already on the plane defined by the normal? But I can see the difference it makes further down where you are calculating sort_val so I can see the results but I don't fully understand it :). What is the matrix you get from outerpoduct of a vector and itself? Is it the normal direction in matrix form and subtracting that from the ident() gives you the plane you want to project the vector too? thanks, Zybrand take a look at the file project_vec.hipnc 2 Quote Link to comment Share on other sites More sharing options...
Zybrand Posted August 19, 2016 Share Posted August 19, 2016 Awesome thanks Petz! I get it now Quote Link to comment Share on other sites More sharing options...
Popular Post satoru Posted November 9, 2017 Popular Post Share Posted November 9, 2017 (edited) It is now possible to get surface distance from the softselection with the new function of H16.5! geodesic_distance_softsel.hiplc Edited November 9, 2017 by satoru 13 Quote Link to comment Share on other sites More sharing options...
vinyvince Posted November 22, 2021 Share Posted November 22, 2021 https://doc.cgal.org/latest/Surface_mesh_shortest_path/index.html#Chapter_Surface_mesh_shortest_path 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.