Balancing a Human Foot Mesh

Hi

I am wondering if someone might know a way of stream lining a particular workflow in rhino.

I use Rhino to design custom foot orthotics. One of the first steps is to extract the target feet models from an STL scan (deleting all other surrounding scanned data), and then align the target foot models to a flat construction plane based on a 3 point system (1st metatarsal head, 5th metatarsal head, and center of calcaneus). After these steps, I would proceed to designing the insole on top of the feet.

At the moment, what I do is import the scanned data, use Meshsplit tools to cut out the feet, then manually rotate the feet using eyesight to the below construction plane. Are there any commands or scripts/technique that anyone can think of to simplify the steps between importing the mesh into Rhino and fullying balancing the foot to the construction plane?

I have seen other programs like LutraCad that runs over top of Rhino that seems to have an automatic function to balance the cast. They seem to just manually select the 3 target points on the STL mesh of the foot and the program would “pull” the entire cast to the construction plane, sort of like a _ProjectToClane command.

I have included a sample file to give more context to what I would like to do.

Thanks for all the help I have received so far on this forum.

Foot Balancing to Construction Plane.3dm (7.1 MB)

1 Like

Hello - Orient3Pt seems like it might come in handy, from your description, for the alignment part - maybe that is what you’re using. If you have three points you care about and the part is already in close to the right place, snap to the three points and then turn on Project in the OSnaps and snap to the same three points in the same order.

@dannytso123 - Here is a python that automates the process somewhat - see if that does anything useful.

Orient3PtsToCPlane.py (981 Bytes)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"

It asks for the object(s) to orient, and then for three points, it does the rest.

-Pascal

1 Like

I just made a script to do this for large scan data of landscapes where the entire mesh can be slightly off axis. Maybe I can tune that to fit your spesific need.

My script uses as many points as you like to define the plane, but it can easily be limited to three.

1 Like

Hi Holo,

I would much appreciate if I could try your script!

Danny

1 Like

Hello again Pascal!

Thank you for this. I tried it on my Rhino 5 on mac. It asked me to choose the object to orient. I chose the foot and then the 3 reference points but nothing happened. The foot stayed in the same place. Am I applying this script correctly?

1 Like

Hm - I did not actually try it in V5… but make sure Project is not on in the OSnaps when picking the points.

Here is what I get - is that what you intend?
Foot Balancing to Construction Plane_PG.3dm (925.5 KB)

-Pascal

1 Like

Hi Danny.
I will try to find time to do this tomorrow.
Here it’s 23:39 right now :slight_smile:

1 Like

Yes this is what I intend. I tried it again but still no go. I have included a video to show what I am doing.

The orient3pt command works well but I would prefer the orienttocplane so I don’t have to create a surface as a reference point.

Orient 3Pt Working|video

1 Like

Yeah… looks like it fails in V5… I’ll have a look.

@dannytso123 - I ran it in 5 Windows and it failed once - with a message that makes me think some wires are crossed someplace behind the scenes, but then worked after that. Hm.
I’ll have a look on V5 Mac shortly.

-Pascal

1 Like

Hey Pascal,

Thanks for looking into it. Orient3Pt works really well. One question I have for Orient3Pt is that I seem to get my result only when I have added the 3 target points directly on my mesh. If I don’t have the 3 points made and I just select the regions on the mesh, Rhino will move the foot but it stays suspended. It does not place the Mesh in contact with the surface. Any ideas?

1 Like

Sure I appreciate it! Have a good night’s rest!

1 Like

Hi Danny - using Orient3Pt, you need to hit the exact same points for each set (first three, second three) but the second set is picked with Project on the OSnaps and the first set not.

(works as expected in V5/mac, btw… make sure Project is not on in the OSnaps)

-Pascal

1 Like

So just to clarify, does that mean I must add 3 points on the mesh in order for this command (Orient3pt) to work properly?

1 Like

Oh nevermind Pascal. I re read your first response. I totally missed that part! I get how this command works now.

1 Like

I also got the construction plan command to work. Works great! Thank you!

1 Like

I wonder if Kangaroo could automatically–put your foot down. : )

It would seem that it does gravity. As long as the foot was placed so it was close to being righted, and not fall over, perhaps it could do the rest for you.

2 Likes

Wow I was not aware of a program like this! I am definitely looking into this. Thanks!

1 Like

I have experimented with an auto suspension in Kangaroo. I found that simulation, and I could just pick up the blocks and drop them : )

Though, don’t know the best components to use. I think they need a center gravity point, which I don’t have.

I believe there is a Kangaroo subforum, on this site.
Perhaps, here: https://discourse.mcneel.com/c/grasshopper/kangaroo/76

2 Likes

Could this program simulate what the patient’s foot may behave depending on what orthotic design is on the bottom of it?

I am currently trying to get into Grasshopper. Looking forward to the learning process!

1 Like

That might be a little much for it. I think to do it well, it likely would take finite element method to distort the flesh.

1 Like