7979from ansys .geometry .core .misc .checks import ensure_design_is_active , min_backend_version
8080from ansys .geometry .core .misc .measurements import DEFAULT_UNITS , Distance
8181from ansys .geometry .core .modeler import Modeler
82- from ansys .geometry .core .parameters import driving_dimensions
82+ from ansys .geometry .core .parameters . driving_dimensions import DrivingDimension as DrivingDimension
8383from ansys .geometry .core .typing import RealSequence
8484
8585
@@ -118,7 +118,7 @@ class Design(Component):
118118 _materials : list [Material ]
119119 _named_selections : dict [str , NamedSelection ]
120120 _beam_profiles : dict [str , BeamProfile ]
121- _driving_dimensions : list [driving_dimensions . DrivingDimension ]
121+ _driving_dimensions : list [DrivingDimension ]
122122
123123 @protect_grpc
124124 @check_input_types
@@ -132,7 +132,7 @@ def __init__(self, name: str, modeler: Modeler, read_existing_design: bool = Fal
132132 self ._materials_stub = MaterialsStub (self ._grpc_client .channel )
133133 self ._named_selections_stub = NamedSelectionsStub (self ._grpc_client .channel )
134134 self ._parts_stub = PartsStub (self ._grpc_client .channel )
135- self ._paremeters_stub = DrivingDimensionsStub (self ._grpc_client .channel )
135+ self ._parameters_stub = DrivingDimensionsStub (self ._grpc_client .channel )
136136
137137 # Initialize needed instance variables
138138 self ._materials = []
@@ -175,7 +175,7 @@ def beam_profiles(self) -> list[BeamProfile]:
175175 return list (self ._beam_profiles .values ())
176176
177177 @property
178- def driving_dimensions (self ) -> list [driving_dimensions . DrivingDimension ]:
178+ def driving_dimensions (self ) -> list [DrivingDimension ]:
179179 """List of driving dimensions available for the design."""
180180 return self .get_all_driving_dimensions ()
181181
@@ -680,25 +680,19 @@ def get_all_driving_dimensions(self):
680680 List[DrivingDimension]
681681 List of driving dimensions for the design.
682682 """
683- response = self ._paremeters_stub .GetAll (GetAllRequest ())
684- print (response )
683+ response = self ._parameters_stub .GetAll (GetAllRequest ())
685684 return [
686- driving_dimensions .DrivingDimension ._from_proto (dimension )
687- for dimension in response .driving_dimensions
685+ DrivingDimension ._from_proto (dimension ) for dimension in response .driving_dimensions
688686 ]
689687
690688 @protect_grpc
691689 @check_input_types
692690 @min_backend_version (25 , 1 , 0 )
693- def set_driving_dimensions (
694- self , driving_dimension : driving_dimensions .DrivingDimension
695- ) -> bool :
696- """Set driving dimensions for a body.
691+ def set_driving_dimensions (self , dimension : DrivingDimension ) -> bool :
692+ """Update a driving dimension of the design.
697693
698694 Parameters
699695 ----------
700- body : Body
701- Body to set driving dimensions.
702696 dimensions : List[DrivingDimension]
703697 List of driving dimensions to set.
704698
@@ -707,9 +701,9 @@ def set_driving_dimensions(
707701 bool
708702 True if driving dimensions were set successfully.
709703 """
710- request = UpdateRequest (driving_dimension = driving_dimension ._to_proto ())
711- response = self ._driving_dimensions_stub .Update (request )
712- return response . success
704+ request = UpdateRequest (driving_dimension = DrivingDimension ._to_proto (dimension ))
705+ dimension = self ._parameters_stub .Update (request )
706+ return dimension
713707
714708 @protect_grpc
715709 @check_input_types
0 commit comments