Skip to content

Commit f98afd4

Browse files
change file names
1 parent cf07838 commit f98afd4

File tree

4 files changed

+23
-25
lines changed

4 files changed

+23
-25
lines changed

doc/changelog.d/1340.added.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
driving dimensions
1+
parameters

src/ansys/geometry/core/designer/design.py

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
from ansys.geometry.core.misc.checks import ensure_design_is_active, min_backend_version
7777
from ansys.geometry.core.misc.measurements import DEFAULT_UNITS, Distance
7878
from ansys.geometry.core.modeler import Modeler
79-
from ansys.geometry.core.parameters.driving_dimensions import DrivingDimension as DrivingDimension
79+
from ansys.geometry.core.parameters import Parameter
8080
from ansys.geometry.core.typing import RealSequence
8181

8282

@@ -115,7 +115,7 @@ class Design(Component):
115115
_materials: list[Material]
116116
_named_selections: dict[str, NamedSelection]
117117
_beam_profiles: dict[str, BeamProfile]
118-
_driving_dimensions: list[DrivingDimension]
118+
_driving_dimensions: list[Parameter]
119119

120120
@protect_grpc
121121
@check_input_types
@@ -138,7 +138,7 @@ def __init__(self, name: str, modeler: Modeler, read_existing_design: bool = Fal
138138
self._design_id = ""
139139
self._is_active = False
140140
self._modeler = modeler
141-
self._driving_dimensions = []
141+
self._parameters = []
142142

143143
# Check whether we want to process an existing design or create a new one.
144144
if read_existing_design:
@@ -172,9 +172,9 @@ def beam_profiles(self) -> list[BeamProfile]:
172172
return list(self._beam_profiles.values())
173173

174174
@property
175-
def driving_dimensions(self) -> list[DrivingDimension]:
176-
"""List of driving dimensions available for the design."""
177-
return self.get_all_driving_dimensions()
175+
def parameters(self) -> list[Parameter]:
176+
"""List of parameters available for the design."""
177+
return self.get_all_parameters()
178178

179179
@property
180180
def is_active(self) -> bool:
@@ -669,36 +669,34 @@ def add_beam_circular_profile(
669669

670670
@protect_grpc
671671
@min_backend_version(25, 1, 0)
672-
def get_all_driving_dimensions(self):
673-
"""Get driving dimensions for the design.
672+
def get_all_parameters(self):
673+
"""Get parameters for the design.
674674
675675
Returns
676676
-------
677677
List[DrivingDimension]
678-
List of driving dimensions for the design.
678+
List of parameters for the design.
679679
"""
680680
response = self._parameters_stub.GetAll(GetAllRequest())
681-
return [
682-
DrivingDimension._from_proto(dimension) for dimension in response.driving_dimensions
683-
]
681+
return [Parameter._from_proto(dimension) for dimension in response.driving_dimensions]
684682

685683
@protect_grpc
686684
@check_input_types
687685
@min_backend_version(25, 1, 0)
688-
def set_driving_dimensions(self, dimension: DrivingDimension) -> bool:
689-
"""Update a driving dimension of the design.
686+
def set_parameters(self, dimension: Parameter) -> bool:
687+
"""Update a parameter of the design.
690688
691689
Parameters
692690
----------
693691
dimensions : List[DrivingDimension]
694-
List of driving dimensions to set.
692+
List of parameters to set.
695693
696694
Returns
697695
-------
698696
bool
699-
True if driving dimensions were set successfully.
697+
True if parameters were set successfully.
700698
"""
701-
request = UpdateRequest(driving_dimension=DrivingDimension._to_proto(dimension))
699+
request = UpdateRequest(driving_dimension=Parameter._to_proto(dimension))
702700
dimension = self._parameters_stub.Update(request)
703701
return dimension
704702

src/ansys/geometry/core/parameters/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
# SOFTWARE.
2222
"""PyAnsys Geometry parameters subpackage."""
2323

24-
from ansys.geometry.core.parameters.driving_dimensions import DrivingDimension
24+
from ansys.geometry.core.parameters.parameters import Parameter, ParameterType

src/ansys/geometry/core/parameters/parameters.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
22-
"""Provides get and set methods for driving dimensions."""
22+
"""Provides get and set methods for parameters."""
2323

2424
from enum import Enum, unique
2525

@@ -28,7 +28,7 @@
2828

2929
@unique
3030
class ParameterType(Enum):
31-
"""Provides values for driving dimension types supported."""
31+
"""Provides values for parameter types supported."""
3232

3333
DIMENSIONTYPE_UNKNOWN = 0
3434
DIMENSIONTYPE_LINEAR = 1
@@ -65,22 +65,22 @@ def _from_proto(cls, proto):
6565

6666
@property
6767
def name(self):
68-
"""Set the name of the driving dimension."""
68+
"""Set the name of the parameter."""
6969
return self._name
7070

7171
@name.setter
7272
def name(self, value):
73-
"""Set the name of the driving dimension."""
73+
"""Set the name of the parameter."""
7474
self._name = value
7575

7676
@property
7777
def dimension_value(self):
78-
"""Get the value of the driving dimension."""
78+
"""Get the value of the parameter."""
7979
return self._dimension_value
8080

8181
@dimension_value.setter
8282
def dimension_value(self, value):
83-
"""Set the value of the driving dimension."""
83+
"""Set the value of the parameter."""
8484
self._dimension_value = value
8585

8686
def _to_proto(self):

0 commit comments

Comments
 (0)