the script is thought about long time ago
There are some ways but not actually efficient.
First i toggle all green lines to form 1 surf only => project easily, don't need script
But sometimes mess up the mesh!
Then i loop with each surf to project nodes on them. Mesh is not mess up
But script very slow because large number of small surfs
Then loop with each node to find closest surface, faster as surf list as shorter (appliable because we can limit surfs in a comp)
A script like this
Createmark surfs 1 all (or $slist , example: surfs in a comp => faster)
Foreach node $nlist (
Createmark node 1 $node
Lassign [hm_measureshortestdistance surfs 1 0 0 nodes 1 0 0] => closestSurf x y z
Nodemodify $node $x $y $z
Then i ....
am thinking other ways because above one still too long (so usually, i let it run finally, overnight.
If you can divide a big model file to many files, each file has a few comps, above script will run much faster. And by dividing model you can run files on hm sessions simultenously.