rs3.results.SolidResults module#

class rs3.results.SolidResults.SolidResults(client: Client, projectId: str, stageNumber: int, srfResultIndex: int, requiredDataTypes: set[SolidsDataType] | None = None)#

Bases: _ProxyObject

Entry point to query solid nodal/element results for a given stage and SRF.

Parameters:
  • stageNumber (int) – 1-based stage index.

  • srfResultIndex (int) – 0-based SRF value index. 0 is to query SRF-None values.

Notes

  • entityName is trimmed; empty strings are ignored.

  • region=None leaves the proto field unset (service returns all).

  • Exceptions from the underlying service are propagated as-is by the client.

Examples

See Solid Result Script Example.

static createWithAvailabilityCheck(client: Client, projectId: str, stageNumber: int, srfResultIndex: int, requiredDataTypes: set[SolidsDataType] | None = None) SolidResults#

Check results availability and create a SolidResults instance if available.

This method first checks if results are available for the specified stage, SRF value, and data types. If results are not available, it raises an exception. Otherwise, it creates and returns a SolidResults instance.

Parameters:
  • client – Client The gRPC client instance.

  • projectId – str The project ID.

  • stageNumber – int 1-based stage index.

  • srfResultIndex – int 0-based SRF value index. 0 is to query SRF-None values.

  • requiredDataTypes – Optional[set[SolidsDataType]] A set of SolidsDataType enum values to check availability for. If None or empty, all data types are queried.

Returns:

A SolidResults instance if results are available.

Return type:

SolidResults

Raises:

Exception – If results are not available for the specified stage, SRF value, and data types.

getMeshNodeResults(entityName: str | None = None, region: Cube | Cylinder | Sphere | None = None, includeIntersecting: bool = True) list[SolidNodalResults]#

Query solid nodal results at a specific stage and SRF value. :param entityName: Optional[str]: If provided, only nodes belonging to the specified entity are queried. :param region: Optional[Union[Cube, Cylinder, Sphere]]: Sample region filter. When None, the field is not set in the request (proto3 unset), and the service returns all nodes. :param includeIntersecting: bool: If True, nodes that intersect the sample region are included. When False, only nodes fully contained are included. Ignored when region is None.

Raises:

Exception if

  • stageNumber is less than 1 - stageNumber is greater than the number of stages in the project - _srfResultIndex is less than 0 - _srfResultIndex is greater than the number of SRF values in the project

Returns:

A list of solid nodal results wrappers for the requested stage and SRF value.

Return type:

list[SolidNodalResults]

getMeshElementResults(entityName: str | None = None, region: Cube | Cylinder | Sphere | None = None, includeIntersecting: bool = True) list[SolidElementResults]#

Query solid element results at a specific stage and SRF value via streaming. :param entityName: Optional[str]: If provided, only elements belonging to the specified entity are queried. :param region: Optional[Union[Cube, Cylinder, Sphere]]: Sample region filter. When None, the field is not set in the request (proto3 unset), and the service returns all elements. :param includeIntersecting: bool: If True, elements that intersect the sample region are included. When False, only elements fully contained are included. Ignored when region is None.

Raises:

Exception if

  • stageNumber is less than 1 - stageNumber is greater than the number of stages in the project - _srfResultIndex is less than 0 - _srfResultIndex is greater than the number of SRF values in the project

Returns:

A list of solid element results wrappers for the requested stage and SRF value.

Return type:

list[SolidElementResults]