Skip to content

Commit d2bf835

Browse files
authored
Merge pull request #351 from Dlubal-Software/heet-memberUpdate
Update member.py
2 parents 9fdf4e8 + 2d69d23 commit d2bf835

File tree

1 file changed

+40
-67
lines changed

1 file changed

+40
-67
lines changed

RFEM/BasicObjects/member.py

Lines changed: 40 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,12 @@ def __init__(self,
4343
# Member Type
4444
clientObject.type = MemberType.TYPE_BEAM.name
4545

46-
# Assigned Line No.
47-
clientObject.line = line
48-
49-
if not line:
50-
# Start Node No.
46+
# Assigned Line number or Node numbers
47+
if line is None:
5148
clientObject.node_start = start_node_no
52-
53-
# End Node No.
5449
clientObject.node_end = end_node_no
50+
else:
51+
clientObject.line = line
5552

5653
# Member Rotation Angle beta
5754
clientObject.rotation_angle = rotation_angle
@@ -173,12 +170,12 @@ def Beam(
173170
# Assigned Line No.
174171
clientObject.line = line
175172

176-
if not line:
177-
# Start Node No.
173+
# Assigned Line number or Node numbers
174+
if line is None:
178175
clientObject.node_start = start_node_no
179-
180-
# End Node No.
181176
clientObject.node_end = end_node_no
177+
else:
178+
clientObject.line = line
182179

183180
# Section Distribution
184181
clientObject.section_distribution_type = section_distribution_type.name
@@ -368,15 +365,12 @@ def Rigid(
368365
# Member Type
369366
clientObject.type = MemberType.TYPE_RIGID.name
370367

371-
# Assigned Line No.
372-
clientObject.line = line
373-
374-
if not line:
375-
# Start Node No.
368+
# Assigned Line number or Node numbers
369+
if line is None:
376370
clientObject.node_start = start_node_no
377-
378-
# End Node No.
379371
clientObject.node_end = end_node_no
372+
else:
373+
clientObject.line = line
380374

381375
# Member Rotation
382376
clientObject.rotation_specification_type = rotation_specification_type.name
@@ -465,15 +459,12 @@ def Rib(
465459
# Member Type
466460
clientObject.type = MemberType.TYPE_RIB.name
467461

468-
# Assigned Line No.
469-
clientObject.line = line
470-
471-
if not line:
472-
# Start Node No.
462+
# Assigned Line number or Node numbers
463+
if line is None:
473464
clientObject.node_start = start_node_no
474-
475-
# End Node No.
476465
clientObject.node_end = end_node_no
466+
else:
467+
clientObject.line = line
477468

478469
# Section Distribution
479470
clientObject.section_distribution_type = section_distribution_type.name
@@ -568,15 +559,12 @@ def Truss(
568559
# Member Type
569560
clientObject.type = MemberType.TYPE_TRUSS.name
570561

571-
# Assigned Line No.
572-
clientObject.line = line
573-
574-
if not line:
575-
# Start Node No.
562+
# Assigned Line number or Node numbers
563+
if line is None:
576564
clientObject.node_start = start_node_no
577-
578-
# End Node No.
579565
clientObject.node_end = end_node_no
566+
else:
567+
clientObject.line = line
580568

581569
# Member Rotation
582570
clientObject.rotation_specification_type = rotation_specification_type.name
@@ -670,15 +658,12 @@ def TrussOnlyN(
670658
# Member Type
671659
clientObject.type = MemberType.TYPE_TRUSS_ONLY_N.name
672660

673-
# Assigned Line No.
674-
clientObject.line = line
675-
676-
if not line:
677-
# Start Node No.
661+
# Assigned Line number or Node numbers
662+
if line is None:
678663
clientObject.node_start = start_node_no
679-
680-
# End Node No.
681664
clientObject.node_end = end_node_no
665+
else:
666+
clientObject.line = line
682667

683668
# Member Rotation
684669
clientObject.rotation_specification_type = rotation_specification_type.name
@@ -772,15 +757,12 @@ def Tension(
772757
# Member Type
773758
clientObject.type = MemberType.TYPE_TENSION.name
774759

775-
# Assigned Line No.
776-
clientObject.line = line
777-
778-
if not line:
779-
# Start Node No.
760+
# Assigned Line number or Node numbers
761+
if line is None:
780762
clientObject.node_start = start_node_no
781-
782-
# End Node No.
783763
clientObject.node_end = end_node_no
764+
else:
765+
clientObject.line = line
784766

785767
# Member Rotation
786768
clientObject.rotation_specification_type = rotation_specification_type.name
@@ -874,15 +856,12 @@ def Compression(
874856
# Member Type
875857
clientObject.type = MemberType.TYPE_COMPRESSION.name
876858

877-
# Assigned Line No.
878-
clientObject.line = line
879-
880-
if not line:
881-
# Start Node No.
859+
# Assigned Line number or Node numbers
860+
if line is None:
882861
clientObject.node_start = start_node_no
883-
884-
# End Node No.
885862
clientObject.node_end = end_node_no
863+
else:
864+
clientObject.line = line
886865

887866
# Member Rotation
888867
clientObject.rotation_specification_type = rotation_specification_type.name
@@ -976,15 +955,12 @@ def Buckling(
976955
# Member Type
977956
clientObject.type = MemberType.TYPE_BUCKLING.name
978957

979-
# Assigned Line No.
980-
clientObject.line = line
981-
982-
if not line:
983-
# Start Node No.
958+
# Assigned Line number or Node numbers
959+
if line is None:
984960
clientObject.node_start = start_node_no
985-
986-
# End Node No.
987961
clientObject.node_end = end_node_no
962+
else:
963+
clientObject.line = line
988964

989965
# Member Rotation
990966
clientObject.rotation_specification_type = rotation_specification_type.name
@@ -1075,15 +1051,12 @@ def Cable(
10751051
# Member Type
10761052
clientObject.type = MemberType.TYPE_CABLE.name
10771053

1078-
# Assigned Line No.
1079-
clientObject.line = line
1080-
1081-
if not line:
1082-
# Start Node No.
1054+
# Assigned Line number or Node numbers
1055+
if line is None:
10831056
clientObject.node_start = start_node_no
1084-
1085-
# End Node No.
10861057
clientObject.node_end = end_node_no
1058+
else:
1059+
clientObject.line = line
10871060

10881061
# Member Rotation
10891062
clientObject.rotation_specification_type = rotation_specification_type.name

0 commit comments

Comments
 (0)