Skip to content

Commit dd885d8

Browse files
Update member.py
1 parent add1ef0 commit dd885d8

File tree

1 file changed

+72
-63
lines changed

1 file changed

+72
-63
lines changed

RFEM/BasicObjects/member.py

Lines changed: 72 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,15 @@ def Beam(
170170
# Member Type
171171
clientObject.type = MemberType.TYPE_BEAM.name
172172

173-
# Start Node No.
174-
clientObject.node_start = start_node_no
173+
# Assigned Line No.
174+
clientObject.line = line
175175

176-
# End Node No.
177-
clientObject.node_end = end_node_no
176+
if not line:
177+
# Start Node No.
178+
clientObject.node_start = start_node_no
179+
180+
# End Node No.
181+
clientObject.node_end = end_node_no
178182

179183
# Section Distribution
180184
clientObject.section_distribution_type = section_distribution_type.name
@@ -299,9 +303,6 @@ def Beam(
299303
# End Section No.
300304
clientObject.section_end = end_section_no
301305

302-
# Assigned Line No.
303-
clientObject.line = line
304-
305306
# Comment
306307
clientObject.comment = comment
307308

@@ -367,11 +368,15 @@ def Rigid(
367368
# Member Type
368369
clientObject.type = MemberType.TYPE_RIGID.name
369370

370-
# Start Node No.
371-
clientObject.node_start = start_node_no
371+
# Assigned Line No.
372+
clientObject.line = line
372373

373-
# End Node No.
374-
clientObject.node_end = end_node_no
374+
if not line:
375+
# Start Node No.
376+
clientObject.node_start = start_node_no
377+
378+
# End Node No.
379+
clientObject.node_end = end_node_no
375380

376381
# Member Rotation
377382
clientObject.rotation_specification_type = rotation_specification_type.name
@@ -386,9 +391,6 @@ def Rigid(
386391
clientObject.rotation_surface = rotation_parameters[0]
387392
clientObject.rotation_surface_plane_type = rotation_parameters[1].name
388393

389-
# Assigned Line No.
390-
clientObject.line = line
391-
392394
# Comment
393395
clientObject.comment = comment
394396

@@ -463,11 +465,15 @@ def Rib(
463465
# Member Type
464466
clientObject.type = MemberType.TYPE_RIB.name
465467

466-
# Start Node No.
467-
clientObject.node_start = start_node_no
468+
# Assigned Line No.
469+
clientObject.line = line
468470

469-
# End Node No.
470-
clientObject.node_end = end_node_no
471+
if not line:
472+
# Start Node No.
473+
clientObject.node_start = start_node_no
474+
475+
# End Node No.
476+
clientObject.node_end = end_node_no
471477

472478
# Section Distribution
473479
clientObject.section_distribution_type = section_distribution_type.name
@@ -489,9 +495,6 @@ def Rib(
489495
# Rib Alignment
490496
clientObject.member_type_rib_alignment = rib_alignment.name
491497

492-
# Assigned Line No.
493-
clientObject.line = line
494-
495498
# Comment
496499
clientObject.comment = comment
497500

@@ -565,11 +568,15 @@ def Truss(
565568
# Member Type
566569
clientObject.type = MemberType.TYPE_TRUSS.name
567570

568-
# Start Node No.
569-
clientObject.node_start = start_node_no
571+
# Assigned Line No.
572+
clientObject.line = line
570573

571-
# End Node No.
572-
clientObject.node_end = end_node_no
574+
if not line:
575+
# Start Node No.
576+
clientObject.node_start = start_node_no
577+
578+
# End Node No.
579+
clientObject.node_end = end_node_no
573580

574581
# Member Rotation
575582
clientObject.rotation_specification_type = rotation_specification_type.name
@@ -590,9 +597,6 @@ def Truss(
590597
# End Section No.
591598
clientObject.section_end = section_no
592599

593-
# Assigned Line No.
594-
clientObject.line = line
595-
596600
# Comment
597601
clientObject.comment = comment
598602

@@ -666,11 +670,15 @@ def TrussOnlyN(
666670
# Member Type
667671
clientObject.type = MemberType.TYPE_TRUSS_ONLY_N.name
668672

669-
# Start Node No.
670-
clientObject.node_start = start_node_no
673+
# Assigned Line No.
674+
clientObject.line = line
671675

672-
# End Node No.
673-
clientObject.node_end = end_node_no
676+
if not line:
677+
# Start Node No.
678+
clientObject.node_start = start_node_no
679+
680+
# End Node No.
681+
clientObject.node_end = end_node_no
674682

675683
# Member Rotation
676684
clientObject.rotation_specification_type = rotation_specification_type.name
@@ -691,9 +699,6 @@ def TrussOnlyN(
691699
# End Section No.
692700
clientObject.section_end = section_no
693701

694-
# Assigned Line No.
695-
clientObject.line = line
696-
697702
# Comment
698703
clientObject.comment = comment
699704

@@ -767,11 +772,15 @@ def Tension(
767772
# Member Type
768773
clientObject.type = MemberType.TYPE_TENSION.name
769774

770-
# Start Node No.
771-
clientObject.node_start = start_node_no
775+
# Assigned Line No.
776+
clientObject.line = line
772777

773-
# End Node No.
774-
clientObject.node_end = end_node_no
778+
if not line:
779+
# Start Node No.
780+
clientObject.node_start = start_node_no
781+
782+
# End Node No.
783+
clientObject.node_end = end_node_no
775784

776785
# Member Rotation
777786
clientObject.rotation_specification_type = rotation_specification_type.name
@@ -792,9 +801,6 @@ def Tension(
792801
# End Section No.
793802
clientObject.section_end = section_no
794803

795-
# Assigned Line No.
796-
clientObject.line = line
797-
798804
# Comment
799805
clientObject.comment = comment
800806

@@ -868,11 +874,15 @@ def Compression(
868874
# Member Type
869875
clientObject.type = MemberType.TYPE_COMPRESSION.name
870876

871-
# Start Node No.
872-
clientObject.node_start = start_node_no
877+
# Assigned Line No.
878+
clientObject.line = line
873879

874-
# End Node No.
875-
clientObject.node_end = end_node_no
880+
if not line:
881+
# Start Node No.
882+
clientObject.node_start = start_node_no
883+
884+
# End Node No.
885+
clientObject.node_end = end_node_no
876886

877887
# Member Rotation
878888
clientObject.rotation_specification_type = rotation_specification_type.name
@@ -893,9 +903,6 @@ def Compression(
893903
# End Section No.
894904
clientObject.section_end = section_no
895905

896-
# Assigned Line No.
897-
clientObject.line = line
898-
899906
# Comment
900907
clientObject.comment = comment
901908

@@ -969,11 +976,15 @@ def Buckling(
969976
# Member Type
970977
clientObject.type = MemberType.TYPE_BUCKLING.name
971978

972-
# Start Node No.
973-
clientObject.node_start = start_node_no
979+
# Assigned Line No.
980+
clientObject.line = line
974981

975-
# End Node No.
976-
clientObject.node_end = end_node_no
982+
if not line:
983+
# Start Node No.
984+
clientObject.node_start = start_node_no
985+
986+
# End Node No.
987+
clientObject.node_end = end_node_no
977988

978989
# Member Rotation
979990
clientObject.rotation_specification_type = rotation_specification_type.name
@@ -994,9 +1005,6 @@ def Buckling(
9941005
# End Section No.
9951006
clientObject.section_end = section_no
9961007

997-
# Assigned Line No.
998-
clientObject.line = line
999-
10001008
# Comment
10011009
clientObject.comment = comment
10021010

@@ -1067,11 +1075,15 @@ def Cable(
10671075
# Member Type
10681076
clientObject.type = MemberType.TYPE_CABLE.name
10691077

1070-
# Start Node No.
1071-
clientObject.node_start = start_node_no
1078+
# Assigned Line No.
1079+
clientObject.line = line
10721080

1073-
# End Node No.
1074-
clientObject.node_end = end_node_no
1081+
if not line:
1082+
# Start Node No.
1083+
clientObject.node_start = start_node_no
1084+
1085+
# End Node No.
1086+
clientObject.node_end = end_node_no
10751087

10761088
# Member Rotation
10771089
clientObject.rotation_specification_type = rotation_specification_type.name
@@ -1092,9 +1104,6 @@ def Cable(
10921104
# End Section No.
10931105
clientObject.section_end = section_no
10941106

1095-
# Assigned Line No.
1096-
clientObject.line = line
1097-
10981107
# Comment
10991108
clientObject.comment = comment
11001109

0 commit comments

Comments
 (0)