How to pick out the geometry which makes up the entities and highlight them and not the whole entity itself?

  1. FAQ
  2. »
  3. Vectorization and Visualization in Visualize

For highlighting the geometry inside the entity it is need to fill the OdTvSubItemPath item. Let's see simplest sample. You have entity with 'OdTvEntityId entId0' and you want to highlight geometry 'OdTvGeometryId geomId0'. Certainly this geometry should be part of the entity entId0. The 'OdTvSubItemPath' item should be constructed in this case as follows:

OdTvEntityIdsArray entityIdsArr;
entityIdsArr.append(entId0);
OdTvGeometryDataIdsArray geoDataIds;
geoDataIds.append(geomId0);
OdTvSubGeometryId subGeoDataId;
OdTvSubItemPath subItemPath(entityIdsArr, geoDataIds, subGeoDataId);

But there is one more thing. For performing selection/highlighting of the geometries or subgeometries (faces of shells for example) it is need to setup the appropriate selectability level for the concreate entity or whole model. The default selectability level assumes the selection and highlighting only for entities. Here is a sample how to set selectability for the whole model:

OdTvModelPtr pModel = modelId.openObject(OdTv::kForWrite);
OdTvSelectabilityDef selectability;
selectability.setGeometries(true);
pModel->setSelectability(selectability);