Luca,
That's a great solution - it works just the way I had hoped.
Thanks,
Ben Berkowitz
________________________________
From: Luca Antiga [[email protected]]
Sent: Friday, March 02, 2012 1:39 AM
To: Berkowitz, Benjamin M
Cc: [email protected]
Subject: Re: [vmtk-users] vmtksurfacedistance for volume meshes
Hi Ben,
I'll give it a shot:
- first turn your mesh into a surface data type without throwing out data (i.e.
all the nodes of the mesh will be preserved)
vmtkmeshtosurface -ifile mesh.vtu -ofile mesh_s.vtp -cleanoutput 0
- then compute the distance
vmtksurfacedistance -ifile mesh_s.vtp -rfile ref_surface.vtp -distancearray
Distance -ofile mesh_sd.vtp
- then turn your surface back to a mesh data type
vmtksurfacetomesh -ifile mesh_sd.vtp -ofile mesh_sdm.vtu
- last project your distance values onto your original mesh
vmtkmeshprojection -ifile mesh.vtu -rfile mesh_sdm.vtu -ofile mesh_d.vtu
At this point mesh_d.vtu should contain an array named Distance with the
desired values.
Hope this works for you
Luca
On Mar 1, 2012, at 10:40 PM, Berkowitz, Benjamin M wrote:
Luca,
I was hoping to perform an operation similar to what vmtksurfacedistance does
for two surfaces. However, I need to calculate the minimum pointwise distances
at each cell of a volume mesh to a reference surface. Will vmtksurfacedistance
take a volume mesh as an input, or do you know of any simple solution to this
problem?
Thanks,
Ben Berkowitz
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/_______________________________________________
vmtk-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/vmtk-users
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
vmtk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vmtk-users