dist2part#
- ens_calculator.dist2part(source_parts: List[ENS_PART] | List[int] | List[str] | ENS_PART | int | str, origin_part_number: int, optional_origin_part_normal: ENS_VAR | str | int, output_varname: str | None = None) ENS_VAR #
Computes a nodal scalar variable defined as the smallest Euclidean distance from the nodes of the origin part to the nodes of the parts specified. If a vector is given the result will be signed.
- Args:
- source_parts:
Select origin part and field part(s), or enter the origin part number and the field part number(s).
- origin_part_number:
Enter the origin part number. This part must also be in the previous part list.
- optional_origin_part_normal:
To select a signed distance, a nodal normal vector for the origin part or choose None to compute an unsigned distance.
- output_varname:
The name of the newly created variable
- Returns:
New ENS_VAR instance or None
- Note:
See Dist2Part() for function details.