Parameter#

class ansys.geometry.core.parameters.parameter.Parameter(id: int, name: str, dimension_type: ParameterType, dimension_value: pint.Quantity | ansys.geometry.core.typing.Real)#

Represents a parameter.

Parameters:
idint

Unique ID for the parameter.

namestr

Name of the parameter.

dimension_typeParameterType

Type of the parameter.

dimension_valueQuantity | Real

Value of the parameter. If a Real, it will be assigned default units based on the dimension_type.

Overview#

name

Get the name of the parameter.

dimension_value

Get the value of the parameter.

dimension_type

Get the type of the parameter.

id

convert_quantity_to_server_units

Convert a Quantity to a Real value using appropriate units.

Import detail#

from ansys.geometry.core.parameters.parameter import Parameter

Property detail#

property Parameter.name: str#

Get the name of the parameter.

property Parameter.dimension_value: pint.Quantity#

Get the value of the parameter.

property Parameter.dimension_type: ParameterType#

Get the type of the parameter.

Attribute detail#

Parameter.id#

Method detail#

static Parameter.convert_quantity_to_server_units(value: pint.Quantity, dimension_type: ParameterType) ansys.geometry.core.typing.Real#

Convert a Quantity to a Real value using appropriate units.

Parameters:
valueQuantity

The value to convert.

dimension_typeParameterType

The dimension type to determine the appropriate unit.

Returns:
Real

The value in default server units.