cee::ug::SurfaceGroupQuery

class SurfaceGroupQuery

Helper class for retrieving triangulated geometry of CAD surface groups.

Each CAD surface group is a collection of element faces that originate from the same CAD surface. Use this class to obtain an indexed triangle mesh (vertices + triangle indices) for the surface with a given CAD surface ID. The result can be used for highlighting the surface in the markup model or for any other custom visualization purpose.

Vertices are returned in world coordinates using the currently active node positions of the part (i.e. including displacements when applicable). Vertices are deduplicated, so each shared mesh node appears only once in the output vertices array, and triangles reference vertices via the indices in triangleIndices (three indices per triangle).

Public Functions

SurfaceGroupQuery(UnstructGridModel *model, size_t frameIndex)

Creates a SurfaceGroupQuery object for the given model and frame.

std::vector<int> availableCadSurfaceIds() const

Returns the CAD surface IDs that are present in the underlying model.

bool getTriangulation(int cadSurfaceId, std::vector<Vec3d> *vertices, std::vector<unsigned int> *triangleIndices) const

Builds an indexed triangle mesh for the surface group with the given cadSurfaceId.

On success, vertices is filled with the deduplicated vertex positions and triangleIndices with three vertex indices per triangle. Returns false if no surface group with the given CAD ID exists.