QuerySurfaceGroup
-
class
cee.ug.QuerySurfaceGroup() Query for retrieving triangulated geometry of surface groups.
Each surface group is a collection of element faces that originate from the same surface. The main source of surface groups is CAD files (e.g. HOOPS Exchange plugin), so they are sometimes referred to as CAD surface groups. Use this query to obtain the surface group IDs present in the model, and to obtain an indexed triangle mesh (vertices + triangle indices) for the surface group with a given surface group ID.
Constructors
-
cee.ug.QuerySurfaceGroup.constructor() - QuerySurfaceGroup(model:
RemoteModel):QuerySurfaceGroupParameters
model:RemoteModelReturns:
QuerySurfaceGroup
Methods
-
cee.ug.QuerySurfaceGroup.executeAvailableSurfaceGroupIdsQuery() - executeAvailableSurfaceGroupIdsQuery(frameIndex: number, callback:
QuerySurfaceGroupAvailableSurfaceGroupIdsCallback): voidExecutes a query that returns the surface group IDs that are present in the model.
Parameters
frameIndex: number
Returns: void
-
cee.ug.QuerySurfaceGroup.executeSurfaceGroupIdForElementQuery() - executeSurfaceGroupIdForElementQuery(frameIndex: number, geometryIndex: number, partId: number, elementIndex: number, elementFaceIndex: number, callback:
QuerySurfaceGroupIdForElementCallback): voidExecutes a query that returns the surface group ID of the surface group that a given element face belongs to.
This is typically used together with picking: pass the identifiers from a
ug.HitItemto find out which surface group was hit, and then useexecuteTriangulationQueryto retrieve and visualize the geometry of that group.The
callbackreceives the surface group ID of the surface group the element face belongs to, or -1 if the element face is not part of any surface group.Parameters
frameIndex: number
geometryIndex: number
partId: number
elementIndex: number
elementFaceIndex: number
callback:
QuerySurfaceGroupIdForElementCallbackReturns: void
-
cee.ug.QuerySurfaceGroup.executeTriangulationQuery() - executeTriangulationQuery(frameIndex: number, surfaceGroupId: number, callback:
QuerySurfaceGroupTriangulationCallback): voidExecutes a query that returns the triangulated geometry of the surface group with the given surface group ID.
The result is an indexed triangle mesh (deduplicated vertices + triangle indices). If no surface group with the given surface group ID exists, the callback is invoked with an error.
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
verticesarray, and triangles reference vertices via the indices intriangleIndices(three indices per triangle).Parameters
Returns: void