# Taking geometrical measurements

Hi! I am looking to obtain geometrical measurements from the anatomical models. For eg. Distance of artery and arm surface. Could anyone please suggest on how I can do this. Thank you @bryn @suchitkumar @Habib

in the upcoming release there is a python command XCoreModeling.GetEntityPointDistance and GetEntityEntityDistance. These functions already exist before S4L 6.0, but don't work for TriangleMesh entities (like ViP models). Starting in V6.0 they also work for TriangleMesh entities.

GetEntityEntityDistance always returns the shortest distance between two entities. You could create some vertices along the artery and query the distance to the skin with GetEntityPointDistance.

In the meantime (until you have the new S4L 6.0), you could use the measure tool to measure distance. Since the skin encloses the artery, I would propose following workflow:

• One way is to slice the arm at different levels (select e.g. Skin -> start Modify / Planar Cut tool), select different positions/elevations and press Slice.
• You can then measure the distance between the Artery and the slice contour lines.

Hi, could this be used to measure the distance of an antenna from the bone?
Else, what would be the best method?

@VigneshYork yes, this could give you the distance and points where the distance is minimal

Hi, thanks. Would you happen to have an example using the python command to do this? I have multiple antenna on the leg (on the skin surface) and would like to get their shortest distance to the bone. I am assuming each one would have different distances.

Thanks

Hi, sorry, I am not able to find GetEntityEntityDistance in the API brower. Do I need some special libraries?

``````import XCoreModeling

sel = XCoreModeling.GetActiveModel().SelectedEntities

r = XCoreModeling.GetEntityEntityDistance(sel[0], sel[1])

p1 = XCoreModeling.CreatePoint(r[0].ClosestPosition)
p1.Name = "Point 1"

p2 = XCoreModeling.CreatePoint(r[1].ClosestPosition)
p2.Name = "Point 2"
``````

It looks like GetEntityEntityDistance was not added to the "clean" api under s4l_v1. You can show other python modules by activating Show Experimental Modules in the preferences.

Thanks a lot. I shall try that now.
Regards,
Vignesh