optimization.variable.nurbs
This module contains variable classes for NURBS geometries.
This module contains the NurbsPointsVariable and NurbsWeightsVariable classes, which represent variables for the control points and weights of a NurbsGeometry, respectively. These classes inherit from the VariableBehavior class.
Kramer Harrison, 2024
Classes
|
Represents a variable for a NURBS control point. |
|
Represents a variable for a NURBS weight. |
- class NurbsPointsVariable(optic, surface_number, coeff_index, apply_scaling=True, **kwargs)[source]
Represents a variable for a NURBS control point.
- Parameters:
optic – The optic object associated with the variable.
surface_number – The index of the surface in the optical system.
coeff_index – The indices of the control point.
apply_scaling – Whether to apply scaling to the variable.
- get_value()[source]
Gets the current value of the control point.
- Returns:
The current value of the control point.
- inverse_scale(scaled_value)[source]
Inverse scales the value of the variable.
- Parameters:
scaled_value – The scaled value to inverse scale.
- Returns:
The inverse-scaled value.
- class NurbsWeightsVariable(optic, surface_number, coeff_index, apply_scaling=True, **kwargs)[source]
Represents a variable for a NURBS weight.
- Parameters:
optic – The optic object associated with the variable.
surface_number – The index of the surface in the optical system.
coeff_index – The indices of the weight.
apply_scaling – Whether to apply scaling to the variable.
- get_value()[source]
Gets the current value of the weight.
- Returns:
The current value of the weight.
- inverse_scale(scaled_value)[source]
Inverse scales the value of the variable.
- Parameters:
scaled_value – The scaled value to inverse scale.
- Returns:
The inverse-scaled value.