Skip to content

Commit fc8d95b

Browse files
update coordinateSystem.py
1 parent f24e7ac commit fc8d95b

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

RFEM/GuideObjects/coordinateSystem.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(self,
1818
origin_coordinate_x (float): X-Coordinate
1919
origin_coordinate_y (float): Y-Coordinate
2020
origin_coordinate_z (float): Z-Coordinate
21-
name (str): Name
21+
name (str, optional): User Defined Coordinate System Name
2222
comment (str, optional): Comments
2323
params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary
2424
model (RFEM Class, optional): Model to be edited
@@ -42,6 +42,7 @@ def __init__(self,
4242

4343
# Name
4444
if name:
45+
clientObject.user_defined_name_enabled = True
4546
clientObject.name = name
4647

4748
# Comment
@@ -74,7 +75,7 @@ def OffsetXYZ(no: int = 1,
7475
origin_coordinate_x (float): X-Coordinate
7576
origin_coordinate_y (float): Y-Coordinate
7677
origin_coordinate_z (float): Z-Coordinate
77-
name (str): Name
78+
name (str, optional): User Defined Coordinate System Name
7879
comment (str, optional): Comments
7980
params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary
8081
model (RFEM Class, optional): Model to be edited
@@ -98,6 +99,7 @@ def OffsetXYZ(no: int = 1,
9899

99100
# Name
100101
if name:
102+
clientObject.user_defined_name_enabled = True
101103
clientObject.name = name
102104

103105
# Comment
@@ -142,7 +144,7 @@ def ThreePoints(no: int = 1,
142144
uw_plane_point_coordinate_x (float): Point in +UW-Plane - 2nd Point X-Coordinate
143145
uw_plane_point_coordinate_y (float): Point in +UW-Plane - 2nd Point Y-Coordinate
144146
uw_plane_point_coordinate_z (float): Point in +UW-Plane - 2nd Point Z-Coordinate
145-
name (str): Name
147+
name (str, optional): User Defined Coordinate System Name
146148
comment (str, optional): Comments
147149
params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary
148150
model (RFEM Class, optional): Model to be edited
@@ -174,6 +176,7 @@ def ThreePoints(no: int = 1,
174176

175177
# Name
176178
if name:
179+
clientObject.user_defined_name_enabled = True
177180
clientObject.name = name
178181

179182
# Comment
@@ -214,7 +217,7 @@ def TwoPointsAndAngle(no: int = 1,
214217
u_axis_point_coordinate_y (float): Point on +U-Axis - 1st point Y-Coordinate
215218
u_axis_point_coordinate_z (float): Point on +U-Axis - 1st point Z-Coordinate
216219
uw_plane_angle (float): Rotation About U-Axis
217-
name (str): Name
220+
name (str, optional): Name
218221
comment (str, optional): Comments
219222
params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary
220223
model (RFEM Class, optional): Model to be edited
@@ -244,6 +247,7 @@ def TwoPointsAndAngle(no: int = 1,
244247

245248
# Name
246249
if name:
250+
clientObject.user_defined_name_enabled = True
247251
clientObject.name = name
248252

249253
# Comment
@@ -280,11 +284,11 @@ def PointAndThreeAngles(no: int = 1,
280284
origin_coordinate_x (float): Origin Point X-Coordinate
281285
origin_coordinate_y (float): Origin Point Y-Coordinate
282286
origin_coordinate_z (float): Origin Point Z-Coordinate
283-
rotation_angles_sequence (float): Rotation Angles Sequesce
287+
rotation_angles_sequence (enum): Coordinate System Rotation Angles Sequence Enumeration
284288
rotation_angle_1 (float): Rotation about X Axes
285289
rotation_angle_2 (float): Rotation about Y Axes
286290
rotation_angle_3 (float): Rotation about Z Axes
287-
name (str): Name
291+
name (str, optional): User Defined Coordinate System Name
288292
comment (str, optional): Comments
289293
params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary
290294
model (RFEM Class, optional): Model to be edited
@@ -298,7 +302,6 @@ def PointAndThreeAngles(no: int = 1,
298302
# Coordinate System No.
299303
clientObject.no = no
300304

301-
302305
# Coordinate System Type
303306
clientObject.type = CoordinateSystemType.TYPE_POINT_AND_3_ANGLES.name
304307

@@ -316,6 +319,7 @@ def PointAndThreeAngles(no: int = 1,
316319

317320
# Name
318321
if name:
322+
clientObject.user_defined_name_enabled = True
319323
clientObject.name = name
320324

321325
# Comment
@@ -337,7 +341,7 @@ def GetCoordinateSystem(object_index: int = 1, model = Model):
337341

338342
'''
339343
Args:
340-
obejct_index (int): Thickness Index
344+
obejct_index (int): Coordinate System Index
341345
model (RFEM Class, optional): Model to be edited
342346
'''
343347

UnitTests/test_guide_objects.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def test_coordinate_system():
8181
Node(1, 0, 0, 0)
8282

8383
CoordinateSystem()
84-
CoordinateSystem.OffsetXYZ(2, 1, 0, 0)
84+
CoordinateSystem.OffsetXYZ(2, 1, 0, 0, 'Offset')
8585
CoordinateSystem.ThreePoints(3, 2, 0, 0, 0, 1, 0, 0, 0, 3)
8686
CoordinateSystem.TwoPointsAndAngle(4, 1.5, 0, 0, 0, 0, 0, 5.5)
8787
CoordinateSystem.PointAndThreeAngles(5)
@@ -91,6 +91,7 @@ def test_coordinate_system():
9191
coord2 = Model.clientModel.service.get_coordinate_system(2)
9292

9393
assert coord2.type == 'TYPE_OFFSET_XYZ'
94+
assert coord2.name == 'Offset'
9495
assert coord2.origin_coordinate_x == 1
9596

9697
coord3 = Model.clientModel.service.get_coordinate_system(3)

0 commit comments

Comments
 (0)