Geometry > Measurements > Measuring Geometric Entities in Objects

Measuring Geometric Entities in Objects
To select entities you want to measure, enter
model.geom(<tag>).measure().selection().init(entDim);
model.geom(<tag>).measure().selection().set(<objname>,entities);
where entDim is the dimension of the entities, <objname> is the object name, and entities is an integer array containing the entity numbers.
To get the volume/area/length of the selected entities, enter
double vol = model.geom(<tag>).measure().getVolume();
To get the area/length of the boundary of the selected entities, enter
double bndVol = model.geom(<tag>).measure().getBoundaryVolume();
If you have selected two vertices, you can get their distance by entering
double[] d = model.geom(<tag>).measure().getVtxDistance();
d[0] is the distance, and d[i] is the distance in the ith coordinate (i = 123).
If you have selected one vertex, you can get its coordinates by entering
double[] coord = model.geom(<tag>).measure().getVtxCoord();