From 4027c0e66936a43721b0314cda28f8336474ad7d Mon Sep 17 00:00:00 2001 From: MichalO Date: Thu, 24 Mar 2022 15:16:31 +0100 Subject: [PATCH] removed default dictionary parameter uncommented few working tests removed few comments unit tests: 119 passed, 10 skipped in 132.23s --- Examples/Cantilever/Demo1.py | 1 - Examples/Hall/hall.py | 2 +- RFEM/BasicObjects/bracing.py | 12 +- RFEM/BasicObjects/frame.py | 4 +- RFEM/BasicObjects/line.py | 91 ++++++------ RFEM/BasicObjects/lineSet.py | 27 ++-- RFEM/BasicObjects/material.py | 9 +- RFEM/BasicObjects/member.py | 115 +++++++++------ RFEM/BasicObjects/memberSet.py | 27 ++-- RFEM/BasicObjects/node.py | 54 ++++--- RFEM/BasicObjects/opening.py | 9 +- RFEM/BasicObjects/section.py | 9 +- RFEM/BasicObjects/solid.py | 45 +++--- RFEM/BasicObjects/solidSet.py | 27 ++-- RFEM/BasicObjects/surface.py | 45 +++--- RFEM/BasicObjects/surfaceSet.py | 27 ++-- RFEM/BasicObjects/thickness.py | 83 ++++++----- RFEM/Calculate/meshSettings.py | 20 +-- .../ConcreteServiceabilityConfigurations.py | 9 +- .../ConcreteUltimateConfigurations.py | 9 +- RFEM/Imperfections/imperfectionCase.py | 9 +- .../designSituation.py | 9 +- RFEM/LoadCasesAndCombinations/loadCase.py | 18 ++- .../loadCombination.py | 7 +- .../modalAnalysisSettings.py | 9 +- .../resultCombination.py | 9 +- .../spectralAnalysisSettings.py | 9 +- .../stabilityAnalysisSettings.py | 34 +++-- .../staticAnalysisSettings.py | 28 ++-- RFEM/Loads/freeLoad.py | 45 +++--- RFEM/Loads/imposedLineDeformation.py | 5 +- RFEM/Loads/imposedNodalDeformation.py | 7 +- RFEM/Loads/lineLoad.py | 36 +++-- RFEM/Loads/memberLoad.py | 139 ++++++++++-------- RFEM/Loads/membersetload.py | 139 ++++++++++-------- RFEM/Loads/nodalLoad.py | 15 +- RFEM/Loads/solidLoad.py | 35 +++-- RFEM/Loads/solidSetLoad.py | 35 +++-- RFEM/Loads/surfaceLoad.py | 61 ++++---- RFEM/Loads/surfacesetload.py | 63 ++++---- RFEM/SpecialObjects/enlargedColumnHead.py | 7 +- RFEM/SpecialObjects/intersection.py | 7 +- RFEM/SpecialObjects/resultSection.py | 7 +- RFEM/SpecialObjects/rigidLink.py | 28 ++-- RFEM/SpecialObjects/structureModification.py | 7 +- RFEM/SpecialObjects/surfaceContact.py | 7 +- .../SpecialObjects/surfaceResultAdjustment.py | 7 +- RFEM/TypesForLines/lineHinge.py | 7 +- RFEM/TypesForLines/lineMeshRefinements.py | 28 ++-- RFEM/TypesForLines/lineSupport.py | 7 +- RFEM/TypesForLines/lineWeldedJoint.py | 7 +- .../memberDefinableStiffness.py | 7 +- RFEM/TypesForMembers/memberEccentricity.py | 7 +- RFEM/TypesForMembers/memberHinge.py | 7 +- RFEM/TypesForMembers/memberNonlinearity.py | 7 +- .../memberResultIntermediatePoints.py | 7 +- .../memberStiffnessModification.py | 7 +- RFEM/TypesForMembers/memberSupport.py | 7 +- RFEM/TypesForNodes/nodalMeshRefinement.py | 7 +- RFEM/TypesForNodes/nodalSupport.py | 7 +- RFEM/TypesForSolids/solidContact.py | 7 +- RFEM/TypesForSolids/solidGas.py | 7 +- RFEM/TypesForSolids/solidMeshRefinement.py | 7 +- .../surfaceContactType.py | 7 +- .../steelEffectiveLengths.py | 7 +- RFEM/TypesForSurfaces/surfaceEccentricity.py | 7 +- .../surfaceMeshRefinements.py | 7 +- .../surfaceStiffnessModification.py | 7 +- RFEM/TypesForSurfaces/surfaceSupport.py | 7 +- .../ConcreteDurability.py | 9 +- .../ConcreteEffectiveLength.py | 9 +- .../ConcreteReinforcementDirections.py | 9 +- .../ConcreteSurfaceReinforcements.py | 9 +- RFEM/enums.py | 13 -- RFEM/globalParameter.py | 17 ++- UnitTests/test_DesignSituations.py | 2 - UnitTests/test_GlobalParameters_Test.py | 54 ++++--- UnitTests/test_LineLoads_Test.py | 37 ++--- UnitTests/test_LoadCases_Test.py | 2 - UnitTests/test_Thickness_Test.py | 5 +- UnitTests/test_modalAnalysis_test.py | 4 +- UnitTests/test_stabilitysettings.py | 2 - UnitTests/test_staticAnalysisSetting.py | 8 +- UnitTests/test_steelEffectiveLengths.py | 1 - UnitTests/test_zCalculate.py | 8 +- 85 files changed, 964 insertions(+), 807 deletions(-) diff --git a/Examples/Cantilever/Demo1.py b/Examples/Cantilever/Demo1.py index 21ab8d6d..1a0d1cec 100644 --- a/Examples/Cantilever/Demo1.py +++ b/Examples/Cantilever/Demo1.py @@ -8,7 +8,6 @@ print('dirname: ', dirName) sys.path.append(dirName + r'/../..') -# Import der Bibliotheken from RFEM.enums import NodalSupportType, LoadDirectionType from RFEM.initModel import Model, Calculate_all from RFEM.BasicObjects.material import Material diff --git a/Examples/Hall/hall.py b/Examples/Hall/hall.py index 2a3c6a5b..60e71177 100644 --- a/Examples/Hall/hall.py +++ b/Examples/Hall/hall.py @@ -64,7 +64,7 @@ Member(4*n+i, j+2, j+7, 0.0, 2, 2) Member(4*n+i + n-1, j+4, j+9, 0.0, 2, 2) -# vertical bracing + # vertical bracing # add a question about repeating in every block, one yes one no, only beginning and end BracingV = input('Would you like to include vertical bracing? (Y/N)') diff --git a/RFEM/BasicObjects/bracing.py b/RFEM/BasicObjects/bracing.py index 737bf1df..3ef4327d 100644 --- a/RFEM/BasicObjects/bracing.py +++ b/RFEM/BasicObjects/bracing.py @@ -11,7 +11,7 @@ # start_section_no: int = 1, # end_section_no: int = 1, # comment: str = '', -# params: dict = {}): +# params: dict = None): # ''' # Args: @@ -23,7 +23,7 @@ # start_section_no (int): Tag of Start Section # end_section_no (int): End of End Section # comment (str, optional): Comment -# params (dict, optional): Parameters +# params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary # ''' # # Client model | Bracing @@ -80,7 +80,7 @@ # start_bracing_hinge_no: int = 0, # end_bracing_hinge_no: int = 0, # comment: str = '', -# params: dict = {}): +# params: dict = None): # ''' # Args: @@ -94,7 +94,7 @@ # start_bracing_hinge_no (int): Hinge at Bracing Start # end_bracing_hinge_no (int): Hinge at Bracing End # comment (str, optional): Comment -# params (dict, optional): Parameters +# params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary # ''' # # Client model | Bracing @@ -151,7 +151,7 @@ # start_bracing_hinge_no: int = 0, # end_bracing_hinge_no: int = 0, # comment: str = '', -# params: dict = {}): +# params: dict = None): # ''' # Args: @@ -165,7 +165,7 @@ # start_bracing_hinge_no (int): Hinge at Bracing Start # end_bracing_hinge_no (int): Hinge at Bracing End # comment (str, optional): Comment -# params (dict, optional): Parameters +# params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary # ''' # # Client model | Bracing diff --git a/RFEM/BasicObjects/frame.py b/RFEM/BasicObjects/frame.py index b5b13079..cbcb236e 100644 --- a/RFEM/BasicObjects/frame.py +++ b/RFEM/BasicObjects/frame.py @@ -14,7 +14,7 @@ # insertion_point_y: int = 4, # insertion_point_z: int = 3, # comment: str = '', -# params: dict = {}): +# params: dict = None): # ''' # Args: @@ -30,7 +30,7 @@ # insertion_point_y (int): Insertion Point y # insertion_point_z (int): Insertion Point z # comment (str, optional): Comment -# params (dict, optional): Parameters +# params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary # ''' # # Client model | Frame diff --git a/RFEM/BasicObjects/line.py b/RFEM/BasicObjects/line.py index 2ba18185..28bcaf0e 100644 --- a/RFEM/BasicObjects/line.py +++ b/RFEM/BasicObjects/line.py @@ -6,14 +6,14 @@ def __init__(self, no: int = 1, nodes_no: str = '1 2', comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Line Tag nodes_no (str): Nodes Defining Line comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Line @@ -32,8 +32,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line to client model Model.clientModel.service.set_line(clientObject) @@ -43,14 +44,14 @@ def Polyline( no: int = 1, nodes_no: str = '1 2', comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Line Tag nodes_no (str): Nodes Defining Polyline comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Line @@ -72,29 +73,30 @@ def Polyline( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line to client model Model.clientModel.service.set_line(clientObject) @staticmethod def Arc( - no: int = 1, - nodes_no: str = [1,2], - control_point: list = [10,0,0], # X,Y,Z + no: int, + nodes_no: list, + control_point: list, alpha_adjustment_target = LineArcAlphaAdjustmentTarget.ALPHA_ADJUSTMENT_TARGET_BEGINNING_OF_ARC, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Line Tag - nodes_no (list): Node Tags Defining Arc + nodes_no (list): Node Tags Defining Arc; [first_node, second_node] control_point (list): Control Point for Arc in [X, Y, Z] alpha_adjustment_target (enum): Line Arc Alpha Adjustment Target Enumeration comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Line @@ -122,8 +124,9 @@ def Arc( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line to client model Model.clientModel.service.set_line(clientObject) @@ -135,7 +138,7 @@ def Circle( circle_radius: float = 1.0, point_of_normal_to_circle_plane: list = [1,0,0], comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -145,7 +148,7 @@ def Circle( circle_radius (float): Magnitude of Circle Radius point_of_normal_to_circle_plane (list): Vector from Circle Centre to this Point [X, Y, Z] defines Vector Normal to Circle Plane comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Line @@ -176,8 +179,9 @@ def Circle( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line to client model Model.clientModel.service.set_line(clientObject) @@ -191,7 +195,7 @@ def EllipticalArc( arc_angle_alpha: float = 0, arc_angle_beta: float = 3.141592653589793, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -202,7 +206,7 @@ def EllipticalArc( arc_angle_alpha (float): Alpha Arc Angle (in Radians) arc_angle_beta (float): Beta Arc Angle (in Radians) comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Line @@ -237,8 +241,9 @@ def EllipticalArc( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line to client model Model.clientModel.service.set_line(clientObject) @@ -249,7 +254,7 @@ def Ellipse( nodes_no: list = [5,10], ellipse_control_point: list = [18,-4.8,0], comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -257,7 +262,7 @@ def Ellipse( nodes_no (list): Node Tags on Line of Ellipse ellipse_control_point (list): Ellipse Control Point [X, Y, Z] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Line @@ -286,8 +291,9 @@ def Ellipse( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line to client model Model.clientModel.service.set_line(clientObject) @@ -299,7 +305,7 @@ def Parabola( parabola_control_point: list = [10,-3,0], parabola_alpha: float = 0, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -308,7 +314,7 @@ def Parabola( parabola_control_point (list): Parabola Control Point [X, Y, Z] parabola_alpha (float): Alpha Angle (in Radians) comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Line @@ -339,8 +345,9 @@ def Parabola( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line to client model Model.clientModel.service.set_line(clientObject) @@ -350,14 +357,14 @@ def Spline( no: int = 1, nodes_no: str = '1 3 5', comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Line Tag nodes_no (str): Node Tags on Line of Spline comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Line @@ -379,8 +386,9 @@ def Spline( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line to client model Model.clientModel.service.set_line(clientObject) @@ -392,7 +400,7 @@ def NURBS( control_points: list = [[0,0,0],[2.33,0,-3,4],[10,0,-11],[17.66,0,-3.4],[20,0,0]], weights = [1,1,1,1,1], comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -401,7 +409,7 @@ def NURBS( control_points (list): Nested List of Respective Control Point's Cartesian Co-Ordinates weights (list): Weights of Control Points comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Line @@ -433,14 +441,15 @@ def NURBS( point.global_coordinate_z = control_points[i][2] point.weight = weights[i] nurbs_control_points.append(point) - #clientObject.nurbs_control_points_by_components = Model.clientModel.factory.create('ns0:line_nurbs_control_points_by_components') + clientObject.nurbs_control_points_by_components = Model.clientModel.factory.create('ns0:line_nurbs_control_points_by_components') ''' # Comment clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line to client model Model.clientModel.service.set_line(clientObject) diff --git a/RFEM/BasicObjects/lineSet.py b/RFEM/BasicObjects/lineSet.py index 73b997ae..ea3333e8 100644 --- a/RFEM/BasicObjects/lineSet.py +++ b/RFEM/BasicObjects/lineSet.py @@ -7,7 +7,7 @@ def __init__(self, lines_no: str = '33 36 39 42 45', line_set_type = SetType.SET_TYPE_CONTINUOUS, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -15,7 +15,7 @@ def __init__(self, lines_no (str): Tags of Lines Contained Within Line Set line_set_type (enum): Line Set Type Enumeration comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Line Set @@ -37,8 +37,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line Set to client model Model.clientModel.service.set_line_set(clientObject) @@ -48,14 +49,14 @@ def ContinuousLines( no: int = 1, lines_no: str = '33 36 39 42 45', comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Line Set Tag lines_no (str): Tags of Lines Contained Within Continuous Line Set comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Line Set @@ -77,8 +78,9 @@ def ContinuousLines( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line Set to client model Model.clientModel.service.set_line_set(clientObject) @@ -88,14 +90,14 @@ def GroupOfLines( no: int = 1, lines_no: str = '33 36 39 42 45', comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Line Set Tag lines_no (str): Tags of Lines Contained Within Group of Lines Line Set comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Line Set @@ -117,8 +119,9 @@ def GroupOfLines( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line Set to client model Model.clientModel.service.set_line_set(clientObject) diff --git a/RFEM/BasicObjects/material.py b/RFEM/BasicObjects/material.py index 57a90b56..1883d959 100644 --- a/RFEM/BasicObjects/material.py +++ b/RFEM/BasicObjects/material.py @@ -5,14 +5,14 @@ def __init__(self, no: int = 1, name: str = 'S235', comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Material Tag name (str): Name of Desired Material (As Named in RFEM Database) comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Material @@ -31,8 +31,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add material to client model Model.clientModel.service.set_material(clientObject) diff --git a/RFEM/BasicObjects/member.py b/RFEM/BasicObjects/member.py index 36c28d3b..6f3f1cf6 100644 --- a/RFEM/BasicObjects/member.py +++ b/RFEM/BasicObjects/member.py @@ -12,7 +12,7 @@ def __init__(self, start_member_hinge_no: int = 0, end_member_hinge_no: int = 0, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Member Tag @@ -24,7 +24,7 @@ def __init__(self, start_member_hinge_no (int): Tag of Start Member Hinge end_member_hinge_no (int): Tag of End Member Hinge comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member @@ -64,8 +64,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member to client model Model.clientModel.service.set_member(clientObject) @@ -133,7 +134,7 @@ def Beam( end_section_no (int): End of End Section distribution_parameters (list): Distribution Parameters comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member clientObject = Model.clientModel.factory.create('ns0:member') @@ -324,8 +325,9 @@ def Beam( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member to client model Model.clientModel.service.set_member(clientObject) @@ -359,7 +361,7 @@ def Rigid( for rotation_specification_type == MemberRotationSpecificationType.COORDINATE_SYSTEM_ROTATION_VIA_SURFACE: rotation_parameters = [rotation_surface, rotation_surface_plane_type] comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member clientObject = Model.clientModel.factory.create('ns0:member') @@ -425,8 +427,9 @@ def Rigid( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member to client model Model.clientModel.service.set_member(clientObject) @@ -466,7 +469,7 @@ def Rib( rib_alignment (enum): Rib Alignment Enumeration reference_width_type (enum): Reference Width Type Enumeration comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary for section_distribution_type == MemberSectionDistributionType.SECTION_DISTRIBUTION_TYPE_LINEAR: distribution_parameters[section_alignment] BJÖRN: Where is this parameter used? @@ -552,8 +555,9 @@ def Rib( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member to client model Model.clientModel.service.set_member(clientObject) @@ -593,7 +597,7 @@ def Truss( rotation_parameters = [rotation_surface, rotation_surface_plane_type] section_no (int): Section Tag comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member clientObject = Model.clientModel.factory.create('ns0:member') @@ -667,8 +671,9 @@ def Truss( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member to client model Model.clientModel.service.set_member(clientObject) @@ -708,7 +713,7 @@ def TrussOnlyN( rotation_parameters = [rotation_surface, rotation_surface_plane_type] section_no (int): Section Tag comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member clientObject = Model.clientModel.factory.create('ns0:member') @@ -782,8 +787,9 @@ def TrussOnlyN( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member to client model Model.clientModel.service.set_member(clientObject) @@ -823,7 +829,7 @@ def Tension( rotation_parameters = [rotation_surface, rotation_surface_plane_type] section_no (int): Section Tag comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member clientObject = Model.clientModel.factory.create('ns0:member') @@ -843,6 +849,7 @@ def Tension( # End Node No. clientObject.node_end = end_node_no + print(rotation_specification_type) # Member Rotation clientObject.rotation_specification_type = rotation_specification_type.name if rotation_specification_type == MemberRotationSpecificationType.COORDINATE_SYSTEM_ROTATION_VIA_ANGLE: @@ -897,8 +904,9 @@ def Tension( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member to client model Model.clientModel.service.set_member(clientObject) @@ -938,7 +946,7 @@ def Compression( rotation_parameters = [rotation_surface, rotation_surface_plane_type] section_no (int): Section Tag comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member clientObject = Model.clientModel.factory.create('ns0:member') @@ -1012,8 +1020,9 @@ def Compression( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member to client model Model.clientModel.service.set_member(clientObject) @@ -1053,7 +1062,7 @@ def Buckling( rotation_parameters = [rotation_surface, rotation_surface_plane_type] section_no (int): Section Tag comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member clientObject = Model.clientModel.factory.create('ns0:member') @@ -1127,8 +1136,9 @@ def Buckling( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member to client model Model.clientModel.service.set_member(clientObject) @@ -1166,7 +1176,7 @@ def Cable( rotation_parameters = [rotation_surface, rotation_surface_plane_type] section_no (int): Section Tag comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member clientObject = Model.clientModel.factory.create('ns0:member') @@ -1231,8 +1241,9 @@ def Cable( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member to client model Model.clientModel.service.set_member(clientObject) @@ -1305,7 +1316,7 @@ def ResultBeam( for result_beam_integrate_stresses_and_forces.name == "INTEGRATE_WITHIN_CYLINDER": integration_parameters = [result_beam_radius] comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member clientObject = Model.clientModel.factory.create('ns0:member') @@ -1486,8 +1497,9 @@ def ResultBeam( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member to client model Model.clientModel.service.set_member(clientObject) @@ -1523,7 +1535,7 @@ def DefinableStiffness( rotation_parameters = [rotation_surface, rotation_surface_plane_type] definable_stiffness (int): Definable Stiffness Tag comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member clientObject = Model.clientModel.factory.create('ns0:member') @@ -1592,8 +1604,9 @@ def DefinableStiffness( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member to client model Model.clientModel.service.set_member(clientObject) @@ -1623,7 +1636,7 @@ def CouplingRigidRigid( for rotation_specification_type == MemberRotationSpecificationType.COORDINATE_SYSTEM_ROTATION_VIA_SURFACE: rotation_parameters = [rotation_surface, rotation_surface_plane_type] comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member clientObject = Model.clientModel.factory.create('ns0:member') @@ -1668,8 +1681,9 @@ def CouplingRigidRigid( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member to client model Model.clientModel.service.set_member(clientObject) @@ -1699,7 +1713,7 @@ def CouplingRigidHinge( for rotation_specification_type == MemberRotationSpecificationType.COORDINATE_SYSTEM_ROTATION_VIA_SURFACE: rotation_parameters = [rotation_surface, rotation_surface_plane_type] comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member clientObject = Model.clientModel.factory.create('ns0:member') @@ -1744,8 +1758,9 @@ def CouplingRigidHinge( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member to client model Model.clientModel.service.set_member(clientObject) @@ -1775,7 +1790,7 @@ def CouplingHingeRigid( for rotation_specification_type == MemberRotationSpecificationType.COORDINATE_SYSTEM_ROTATION_VIA_SURFACE: rotation_parameters = [rotation_surface, rotation_surface_plane_type] comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member clientObject = Model.clientModel.factory.create('ns0:member') @@ -1820,8 +1835,9 @@ def CouplingHingeRigid( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member to client model Model.clientModel.service.set_member(clientObject) @@ -1851,7 +1867,7 @@ def CouplingHingeHinge( for rotation_specification_type == MemberRotationSpecificationType.COORDINATE_SYSTEM_ROTATION_VIA_SURFACE: rotation_parameters = [rotation_surface, rotation_surface_plane_type] comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member clientObject = Model.clientModel.factory.create('ns0:member') @@ -1896,8 +1912,9 @@ def CouplingHingeHinge( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member to client model Model.clientModel.service.set_member(clientObject) diff --git a/RFEM/BasicObjects/memberSet.py b/RFEM/BasicObjects/memberSet.py index 26e44f88..cd553d03 100644 --- a/RFEM/BasicObjects/memberSet.py +++ b/RFEM/BasicObjects/memberSet.py @@ -7,7 +7,7 @@ def __init__(self, members_no: str = '1 4 5 8 9 12 13 16 17 20 21 24', member_set_type = SetType.SET_TYPE_GROUP, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -15,7 +15,7 @@ def __init__(self, members_no (str): Tags of Members Contained Within Member Set member_set_type (enum): Member Set Type Enumeration comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Member Set @@ -37,8 +37,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member Set to client model Model.clientModel.service.set_member_set(clientObject) @@ -48,14 +49,14 @@ def ContinuousMembers( no: int = 1, members_no: str = '1 4 5 8 9 12 13 16 17 20 21 24', comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Member Set Tag members_no (str): Tags of Members Contained Within Continuous Member Set comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Member Set @@ -77,8 +78,9 @@ def ContinuousMembers( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member Set to client model Model.clientModel.service.set_member_set(clientObject) @@ -88,14 +90,14 @@ def GroupOfmembers( no: int = 1, members_no: str = '1 4 5 8 9 12 13 16 17 20 21 24', comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Member Set Tag members_no (str): Tags of Members Contained Within Group of Members Member Set comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Member Set @@ -117,8 +119,9 @@ def GroupOfmembers( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member Set to client model Model.clientModel.service.set_member_set(clientObject) diff --git a/RFEM/BasicObjects/node.py b/RFEM/BasicObjects/node.py index 8fb1ce4c..5534d946 100644 --- a/RFEM/BasicObjects/node.py +++ b/RFEM/BasicObjects/node.py @@ -11,7 +11,7 @@ def __init__(self, coordinate_Y: float = 0.0, coordinate_Z: float = 0.0, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -20,7 +20,7 @@ def __init__(self, coordinate_Y (float): Y-Coordinate coordinate_Z (float): Z-Coordinate comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Node clientObject = Model.clientModel.factory.create('ns0:node') @@ -40,8 +40,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Node to client model Model.clientModel.service.set_node(clientObject) @@ -52,7 +53,7 @@ def Standard( coordinate_system = [], coordinate_system_type = NodeCoordinateSystemType.COORDINATE_SYSTEM_CARTESIAN, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -70,7 +71,7 @@ def Standard( coordinate_system = [R, θ, φ] coordinate_system_type (enum): Coordinate System Type Enumeration comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Node @@ -129,8 +130,9 @@ def Standard( # Comment clientObject.comment = comment - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Node to client model Model.clientModel.service.set_node(clientObject) @@ -147,7 +149,7 @@ def BetweenTwoNodes( offset_y: int = 0, offset_z: int = 0, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -164,7 +166,7 @@ def BetweenTwoNodes( offset_y (int): Offset in Y-Direction offset_z (int): Offset in Z-Direction comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Node @@ -207,8 +209,9 @@ def BetweenTwoNodes( # Comment clientObject.comment = comment - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Node to client model Model.clientModel.service.set_node(clientObject) @@ -227,7 +230,7 @@ def BetweenTwoPoints( offset_y: float = 0.0, offset_z: float = 0.0, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -247,7 +250,7 @@ def BetweenTwoPoints( offset_y (int): Offset in Y-Direction offset_z (int): Offset in Z-Direction comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Node @@ -291,8 +294,9 @@ def BetweenTwoPoints( # Comment clientObject.comment = comment - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Node to client model Model.clientModel.service.set_node(clientObject) @@ -305,7 +309,7 @@ def OnLine( length_between_i_and_j: int = 1, parameters = [True, 0.5], comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -318,7 +322,7 @@ def OnLine( if distance_from_start_absolute: parameters = [False, magnitude] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Node @@ -352,8 +356,9 @@ def OnLine( # Comment clientObject.comment = comment - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Node to client model Model.clientModel.service.set_node(clientObject) @@ -366,7 +371,7 @@ def OnMember( length_between_i_and_j: int = 1, parameters = [True, 0.5], comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -380,7 +385,7 @@ def OnMember( if distance_from_start_absolute: parameters = [False, magnitude] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Node @@ -414,8 +419,9 @@ def OnMember( # Comment clientObject.comment = comment - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Node to client model Model.clientModel.service.set_node(clientObject) diff --git a/RFEM/BasicObjects/opening.py b/RFEM/BasicObjects/opening.py index 1c0f58ab..e804b3a2 100644 --- a/RFEM/BasicObjects/opening.py +++ b/RFEM/BasicObjects/opening.py @@ -5,14 +5,14 @@ def __init__(self, no: int = 1, lines_no: str = '1 2 3 4', comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Opening Tag lines_no (str): Tags of Lines defining Opening comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Opening @@ -31,8 +31,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Opening to client model Model.clientModel.service.set_opening(clientObject) diff --git a/RFEM/BasicObjects/section.py b/RFEM/BasicObjects/section.py index cafb895a..016b76eb 100644 --- a/RFEM/BasicObjects/section.py +++ b/RFEM/BasicObjects/section.py @@ -6,7 +6,7 @@ def __init__(self, name: str = 'IPE 300', material_no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -14,7 +14,7 @@ def __init__(self, name (str): Name of Desired Section (As Named in RFEM Database) material_no (int): Tag of Material assigned to Section comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Section @@ -36,8 +36,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Section to client model Model.clientModel.service.set_section(clientObject) diff --git a/RFEM/BasicObjects/solid.py b/RFEM/BasicObjects/solid.py index 65cedfa9..56edf3e3 100644 --- a/RFEM/BasicObjects/solid.py +++ b/RFEM/BasicObjects/solid.py @@ -7,7 +7,7 @@ def __init__(self, boundary_surfaces_no: str = '1 2', material_no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -15,7 +15,7 @@ def __init__(self, boundary_surfaces_no (str): Tags of Surfaces defining Solid material_no (int): Tag of Material assigned to Solid comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Solid @@ -37,8 +37,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface to client model Model.clientModel.service.set_solid(clientObject) @@ -49,7 +50,7 @@ def Standard( boundary_surfaces_no: str = '1 2', material_no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -57,7 +58,7 @@ def Standard( boundary_surfaces_no (str): Tags of Surfaces defining Solid material_no (int): Tag of Material assigned to Solid comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Solid @@ -82,8 +83,9 @@ def Standard( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface to client model Model.clientModel.service.set_solid(clientObject) @@ -94,7 +96,7 @@ def Gas( boundary_surfaces_no: str = '1 2', material_no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -102,7 +104,7 @@ def Gas( boundary_surfaces_no (str): Tags of Surfaces defining Gas material_no (int): Tag of Material assigned to Solid comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Solid @@ -127,8 +129,9 @@ def Gas( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface to client model Model.clientModel.service.set_solid(clientObject) @@ -139,7 +142,7 @@ def Contact( boundary_surfaces_no: str = '1 2', material_no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -147,7 +150,7 @@ def Contact( boundary_surfaces_no (str): Tags of Surfaces defining Contact material_no (int): Tag of Material assigned to Solid comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Solid @@ -172,8 +175,9 @@ def Contact( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface to client model Model.clientModel.service.set_solid(clientObject) @@ -184,7 +188,7 @@ def Soil( boundary_surfaces_no: str = '1 2', material_no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -192,7 +196,7 @@ def Soil( boundary_surfaces_no (str): Tags of Surfaces defining Soil material_no (int): Tag of Material assigned to Solid comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Solid @@ -217,8 +221,9 @@ def Soil( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface to client model Model.clientModel.service.set_solid(clientObject) \ No newline at end of file diff --git a/RFEM/BasicObjects/solidSet.py b/RFEM/BasicObjects/solidSet.py index ac221106..a35ab61b 100644 --- a/RFEM/BasicObjects/solidSet.py +++ b/RFEM/BasicObjects/solidSet.py @@ -7,7 +7,7 @@ def __init__(self, solids_no: str = '1 2', solid_set_type = SetType.SET_TYPE_GROUP, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -15,7 +15,7 @@ def __init__(self, solids_no (str): Tags of Solids Contained Within Solid Set solid_set_type (enum): Solid Set Type Enumeration comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Solid Set @@ -37,8 +37,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Solid Set to client model Model.clientModel.service.set_solid_set(clientObject) @@ -48,14 +49,14 @@ def ContinuousSolids( no: int = 1, solids_no: str = '1 2', comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Solid Set Tag solids_no (str): Tags of Solids Contained Within Continuous Solid Set comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Solid Set @@ -77,8 +78,9 @@ def ContinuousSolids( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Solid Set to client model Model.clientModel.service.set_solid_set(clientObject) @@ -88,14 +90,14 @@ def GroupOfSolids( no: int = 1, solids_no: str = '1 2', comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Solid Set Tag solids_no (str): Tags of Solids Contained Within Group of Solids Solid Set comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Solid Set @@ -117,8 +119,9 @@ def GroupOfSolids( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Solid Set to client model Model.clientModel.service.set_solid_set(clientObject) diff --git a/RFEM/BasicObjects/surface.py b/RFEM/BasicObjects/surface.py index f40ea995..936588ec 100644 --- a/RFEM/BasicObjects/surface.py +++ b/RFEM/BasicObjects/surface.py @@ -17,7 +17,7 @@ def CreateGeometryAndSetToModel(no, surface_type, boundary_lines_no, geometry_ty geometry_type_parameters = [quadrangle_corner_node_1, quadrangle_corner_node_2, quadrangle_corner_node_3, quadrangle_corner_node_4] thickness (int): Tag of Thickness assigned to Standard Surface comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Surface clientObject = Model.clientModel.factory.create('ns0:surface') @@ -65,8 +65,9 @@ def CreateGeometryAndSetToModel(no, surface_type, boundary_lines_no, geometry_ty clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface to client model Model.clientModel.service.set_surface(clientObject) @@ -77,7 +78,7 @@ def __init__(self, boundary_lines_no: str = '1 2 3 4', thickness: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -85,7 +86,7 @@ def __init__(self, boundary_lines_no (str): Tags of Lines defining Surface thickness (int): Tag of Thickness assigned to Surface comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Surface @@ -107,8 +108,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface to client model Model.clientModel.service.set_surface(clientObject) @@ -121,7 +123,7 @@ def Standard( boundary_lines_no: str = '1 2 3 4', thickness: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -137,7 +139,7 @@ def Standard( boundary_lines_no (str): Tags of Lines defining Standard Surface thickness (int): Tag of Thickness assigned to Standard Surface comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' CreateGeometryAndSetToModel(no, SurfaceType.TYPE_STANDARD, boundary_lines_no, geometry_type, geometry_type_parameters, thickness, comment, params) @@ -149,7 +151,7 @@ def WithoutThickness( geometry_type_parameters = None, boundary_lines_no: str = '1 2 3 4', comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -164,7 +166,7 @@ def WithoutThickness( geometry_type_parameters = [quadrangle_corner_node_1, quadrangle_corner_node_2, quadrangle_corner_node_3, quadrangle_corner_node_4] boundary_lines_no (str): Tags of Lines defining Without Thickness Surface comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' CreateGeometryAndSetToModel(no, SurfaceType.TYPE_WITHOUT_THICKNESS, boundary_lines_no, geometry_type, geometry_type_parameters, comment=comment, params=params) @@ -176,7 +178,7 @@ def Rigid( geometry_type_parameters = None, boundary_lines_no: str = '1 2 3 4', comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -191,7 +193,7 @@ def Rigid( geometry_type_parameters = [quadrangle_corner_node_1, quadrangle_corner_node_2, quadrangle_corner_node_3, quadrangle_corner_node_4] boundary_lines_no (str): Tags of Lines defining Rigid Surface comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' CreateGeometryAndSetToModel(no, SurfaceType.TYPE_RIGID, boundary_lines_no, geometry_type, geometry_type_parameters, comment=comment, params=params) @@ -204,7 +206,7 @@ def Membrane( boundary_lines_no: str = '1 2 3 4', thickness: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -220,7 +222,7 @@ def Membrane( boundary_lines_no (str): Tags of Lines defining Membrane Surface thickness (int): Tag of Thickness assigned to Membrane Surface comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' CreateGeometryAndSetToModel(no, SurfaceType.TYPE_WITHOUT_THICKNESS, boundary_lines_no, geometry_type, geometry_type_parameters, thickness, comment, params) @@ -233,7 +235,7 @@ def WithoutMemberaneTension( boundary_lines_no: str = '1 2 3 4', thickness: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -249,7 +251,7 @@ def WithoutMemberaneTension( boundary_lines_no (str): Tags of Lines defining Without Membrane Tension Surface thickness (int): Tag of Thickness assigned to Without Membrane Tension Surface comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' CreateGeometryAndSetToModel(no, SurfaceType.TYPE_WITHOUT_THICKNESS, boundary_lines_no, geometry_type, geometry_type_parameters, thickness, comment, params) @@ -268,7 +270,7 @@ def LoadDistribution( loaded_members = None, loaded_lines = None, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -284,7 +286,7 @@ def LoadDistribution( loaded_members (str): Tag of Loaded Members loaded_lines (str): Tag of Loaded Lines comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Surface @@ -332,8 +334,9 @@ def LoadDistribution( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface to client model Model.clientModel.service.set_surface(clientObject) diff --git a/RFEM/BasicObjects/surfaceSet.py b/RFEM/BasicObjects/surfaceSet.py index da5dcf83..25994250 100644 --- a/RFEM/BasicObjects/surfaceSet.py +++ b/RFEM/BasicObjects/surfaceSet.py @@ -7,7 +7,7 @@ def __init__(self, surfaces_no: str = '2 4 7', surface_set_type = SetType.SET_TYPE_GROUP, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -15,7 +15,7 @@ def __init__(self, surfaces_no (str): Tags of Surfaces Contained Within Surface Set surfaces_set_type (enum): Surface Set Type Enumeration comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Surface Set @@ -37,8 +37,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Set to client model Model.clientModel.service.set_surface_set(clientObject) @@ -48,7 +49,7 @@ def ContinuousSurfaces( no: int = 1, surfaces_no: str = '2 4 7', comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -56,7 +57,7 @@ def ContinuousSurfaces( surfaces_no (str): Tags of Surfaces Contained Within Continuous Surface Set surfaces_set_type (enum): Surface Set Type Enumeration comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Surface Set @@ -78,8 +79,9 @@ def ContinuousSurfaces( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Set to client model Model.clientModel.service.set_surface_set(clientObject) @@ -89,14 +91,14 @@ def GroupOfSurfaces( no: int = 1, surfaces_no: str = '2 4 7', comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Surfaces Set Tag surfaces_no (str): Tags of Surfaces Contained Within Group of Surfaces Surface Set comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Surface Set @@ -118,8 +120,9 @@ def GroupOfSurfaces( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Set to client model Model.clientModel.service.set_surface_set(clientObject) diff --git a/RFEM/BasicObjects/thickness.py b/RFEM/BasicObjects/thickness.py index 4413d93f..b5fc84d8 100644 --- a/RFEM/BasicObjects/thickness.py +++ b/RFEM/BasicObjects/thickness.py @@ -12,7 +12,7 @@ def __init__(self, material_no: int = 1, uniform_thickness_d: float = 0.20, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -21,7 +21,7 @@ def __init__(self, material_no (int): Tag of Material assigned to Thickness uniform_thickness_d (float): Magnitude of Thickness comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Thickness @@ -51,8 +51,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Thickness to client model Model.clientModel.service.set_thickness(clientObject) @@ -64,7 +65,7 @@ def Uniform( material_no: int = 1, properties = [0.2], comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -73,7 +74,7 @@ def Uniform( material_no (int): Tag of Material assigned to Thickness properties (list): Magnitude of Thickness [Thickness] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Thickness @@ -105,8 +106,9 @@ def Uniform( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Thickness to client model Model.clientModel.service.set_thickness(clientObject) @@ -118,7 +120,7 @@ def Variable_3Nodes( material_no: int = 1, properties = None, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -128,7 +130,7 @@ def Variable_3Nodes( properties (list): Properties for 3 Nodes Variable Thickness Definition properties = [thickness_d1, node_no_1, thickness_d2, node_no_2, thickness_d3, node_no_3] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Thickness @@ -167,8 +169,9 @@ def Variable_3Nodes( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Thickness to client model Model.clientModel.service.set_thickness(clientObject) @@ -180,7 +183,7 @@ def Variable_2NodesAndDirection( material_no: int = 1, properties = [0.18, 1, 0.18, 2, ThicknessDirection.THICKNESS_DIRECTION_IN_X], comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -190,7 +193,7 @@ def Variable_2NodesAndDirection( properties (list): Properties for 2 Nodes and Direction Variable Thickness Definition properties = [thickness_d1, node_no_1, thickness_d2, node_no_2, direction] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' @@ -227,8 +230,9 @@ def Variable_2NodesAndDirection( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Thickness to client model Model.clientModel.service.set_thickness(clientObject) @@ -240,7 +244,7 @@ def Variable_4SurfaceCorners( material_no: int = 1, properties = None, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -250,7 +254,7 @@ def Variable_4SurfaceCorners( properties (list): Properties for 4 Surface Corners Variable Definition properties = [thickness_d1, node_no_1, thickness_d2, node_no_2, thickness_d3, node_no_3, thickness_d4, node_no_4] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' @@ -292,8 +296,9 @@ def Variable_4SurfaceCorners( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Thickness to client model Model.clientModel.service.set_thickness(clientObject) @@ -305,7 +310,7 @@ def Variable_Circle( material_no: int = 1, properties = None, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -315,7 +320,7 @@ def Variable_Circle( properties (list): Properties for Circular Thickness Definition properties = [thickness_circle_center_dC, thickness_circle_line_dR] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Thickness @@ -350,8 +355,9 @@ def Variable_Circle( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Thickness to client model Model.clientModel.service.set_thickness(clientObject) @@ -360,9 +366,9 @@ def Variable_Circle( def Layers( no: int = 1, name: str = None, - layers = [[0, 1, 200, 0.0, '']], + layers = [[0, 1, 0.2, 0.0, '']], comment: str = '', - params: dict = {}): + params: dict = None): ''' NOTE: Available only for Special Solution Add-on Multilayer Surfaces. @@ -374,7 +380,7 @@ def Layers( properties (list): Nested List of Layer Properties properties: [[thickness_type, material, thickness, rotation, comment], ...] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Check if Multilayer Surfaces Add-on is ON. @@ -421,8 +427,9 @@ def Layers( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Thickness to client model Model.clientModel.service.set_thickness(clientObject) @@ -437,7 +444,7 @@ def ShapeOrthotropy( consideration_of_self_weight = [ThicknessShapeOrthotropySelfWeightDefinitionType.SELF_WEIGHT_COMPUTED_FROM_PARAMETERS, 0.18], parameters = [0.18, 0.18], comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -469,7 +476,7 @@ def ShapeOrthotropy( for orthotropy_type == ThicknessOrthotropyType.GRILLAGE: parameters = [slab_thickness, rib_spacing_x, rib_spacing_y, rib_width_x, rib_width_y] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Thickness @@ -563,8 +570,9 @@ def ShapeOrthotropy( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Thickness to client model Model.clientModel.service.set_thickness(clientObject) @@ -579,7 +587,7 @@ def StiffnessMatrix( coefficient_of_thermal_expansion: float = 0, stiffness_matrix = [[0, 0, 0, 0, 0, 0],[0, 0, 0],[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]], comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -605,7 +613,7 @@ def StiffnessMatrix( [D66, D67, D68, D77, D78, D88], [D16, D17, D18, D27, D28, D38]] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Thickness @@ -670,8 +678,9 @@ def StiffnessMatrix( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Thickness to client model Model.clientModel.service.set_thickness(clientObject) diff --git a/RFEM/Calculate/meshSettings.py b/RFEM/Calculate/meshSettings.py index 35b63e4f..c840d68f 100644 --- a/RFEM/Calculate/meshSettings.py +++ b/RFEM/Calculate/meshSettings.py @@ -32,7 +32,7 @@ class MeshSettings(): 'mesh_quality_color_indicator_ok_color': None, 'mesh_quality_color_indicator_warning_color': None, 'mesh_quality_color_indicator_failure_color': None, - 'QualityCriteriaConfig': { + 'QualityCriteriaConfigForSurfaces': { 'quality_criterion_check_aspect_ratio': None, 'quality_criterion_check_aspect_ratio_warning': None, 'quality_criterion_check_aspect_ratio_failure': None, @@ -58,7 +58,7 @@ class MeshSettings(): 'mesh_quality_color_indicator_ok_color': None, 'mesh_quality_color_indicator_warning_color': None, 'mesh_quality_color_indicator_failure_color': None, - 'QualityCriteriaConfig': { + 'QualityCriteriaConfigForSolids': { 'quality_criterion_check_aspect_ratio': None, 'quality_criterion_check_aspect_ratio_warning': None, 'quality_criterion_check_aspect_ratio_failure': None, @@ -131,17 +131,17 @@ def __init__(self, if commonConfig[key]: clientObject[key] = commonConfig[key] for key in surfaceConfig: - if key == 'QualityCriteriaConfig': - for key_ in surfaceConfig['QualityCriteriaConfig']: - if surfaceConfig['QualityCriteriaConfig'][key_]: - clientObject['SurfacesMeshQualityConfig']['QualityCriteriaConfig'][key_] = surfaceConfig['QualityCriteriaConfig'][key_] + if key == 'QualityCriteriaConfigForSurfaces': + for key_ in surfaceConfig['QualityCriteriaConfigForSurfaces']: + if surfaceConfig['QualityCriteriaConfigForSurfaces'][key_]: + clientObject['SurfacesMeshQualityConfig']['QualityCriteriaConfigForSurfaces'][key_] = surfaceConfig['QualityCriteriaConfigForSurfaces'][key_] elif surfaceConfig[key]: clientObject['SurfacesMeshQualityConfig'][key] = surfaceConfig[key] for key in solidConfig: - if key == 'QualityCriteriaConfig': - for key_ in solidConfig['QualityCriteriaConfig']: - if solidConfig['QualityCriteriaConfig'][key_]: - clientObject['SolidsMeshQualityConfig']['QualityCriteriaConfig'][key_] = solidConfig['QualityCriteriaConfig'][key_] + if key == 'QualityCriteriaConfigForSolids': + for key_ in solidConfig['QualityCriteriaConfigForSolids']: + if solidConfig['QualityCriteriaConfigForSolids'][key_]: + clientObject['SolidsMeshQualityConfig']['QualityCriteriaConfigForSolids'][key_] = solidConfig['QualityCriteriaConfigForSolids'][key_] elif solidConfig[key]: clientObject['SolidsMeshQualityConfig'][key] = solidConfig[key] if GetAddonStatus(Model.clientModel, AddOn.wind_simulation_active): diff --git a/RFEM/ConcreteDesign/ConcreteServiceabilityConfigurations.py b/RFEM/ConcreteDesign/ConcreteServiceabilityConfigurations.py index 1c822113..44bf39ab 100644 --- a/RFEM/ConcreteDesign/ConcreteServiceabilityConfigurations.py +++ b/RFEM/ConcreteDesign/ConcreteServiceabilityConfigurations.py @@ -12,7 +12,7 @@ def __init__(self, surface_sets = '', nodes = '', comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Configuration Tag @@ -23,7 +23,7 @@ def __init__(self, surface_sets (str): Assigned Surface Sets nodes (str): Assigned Nodes comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Concrete Durabilities @@ -58,8 +58,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Global Parameter to client model Model.clientModel.service.set_sls_configuration(clientObject) \ No newline at end of file diff --git a/RFEM/ConcreteDesign/ConcreteUltimateConfigurations.py b/RFEM/ConcreteDesign/ConcreteUltimateConfigurations.py index 7896e7c9..d80a5b73 100644 --- a/RFEM/ConcreteDesign/ConcreteUltimateConfigurations.py +++ b/RFEM/ConcreteDesign/ConcreteUltimateConfigurations.py @@ -12,7 +12,7 @@ def __init__(self, surface_sets = '', nodes = '', comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Configuration Tag @@ -23,7 +23,7 @@ def __init__(self, surface_sets (str): Assigned Surface Sets nodes (str): Assigned Nodes comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Concrete Durabilities @@ -58,8 +58,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Global Parameter to client model Model.clientModel.service.set_uls_configuration(clientObject) \ No newline at end of file diff --git a/RFEM/Imperfections/imperfectionCase.py b/RFEM/Imperfections/imperfectionCase.py index 1366d131..38ff6257 100644 --- a/RFEM/Imperfections/imperfectionCase.py +++ b/RFEM/Imperfections/imperfectionCase.py @@ -5,13 +5,13 @@ def __init__(self, no: int = 1, assigned_to_load_cases: str = '1', comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Imperfection Case Tag comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Imperfection Case @@ -30,8 +30,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Imperfection Case to client model Model.clientModel.service.set_imperfection_case(clientObject) diff --git a/RFEM/LoadCasesAndCombinations/designSituation.py b/RFEM/LoadCasesAndCombinations/designSituation.py index 626e0362..24638914 100644 --- a/RFEM/LoadCasesAndCombinations/designSituation.py +++ b/RFEM/LoadCasesAndCombinations/designSituation.py @@ -8,7 +8,7 @@ def __init__(self, active: bool = True, design_situation_type: int = 6122, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: @@ -47,7 +47,7 @@ def __init__(self, 6194 = SLS - Frequent, 6195 = SLS - Quasi-permanent. comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Design Situation @@ -76,8 +76,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Design Situation to client model Model.clientModel.service.set_design_situation(clientObject) diff --git a/RFEM/LoadCasesAndCombinations/loadCase.py b/RFEM/LoadCasesAndCombinations/loadCase.py index b0b1a923..66e28807 100644 --- a/RFEM/LoadCasesAndCombinations/loadCase.py +++ b/RFEM/LoadCasesAndCombinations/loadCase.py @@ -16,7 +16,7 @@ def __init__(self, name: str = 'Self-weight', self_weight: list = [True, 0.0, 0.0, 1.0], comment: str = 'Comment', - params: dict = {}): + params: dict = None): ''' Args: no (int): Load Case Tag @@ -24,7 +24,7 @@ def __init__(self, self_weight (list): Self-Weight Parameters self_weight = [self_weight_active, self_weight_factor_x, self_weight_factor_y, self_weight_factor_z] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Load Case @@ -67,8 +67,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Case to client model Model.clientModel.service.set_load_case(clientObject) @@ -82,7 +83,7 @@ def StaticAnalysis( action_category= DIN_Action_Category['1A'], self_weight = [True, 0.0, 0.0, 10.0], comment: str = 'Comment', - params: dict = {}): + params: dict = None): ''' Args: no (int): Load Case Tag @@ -118,7 +119,7 @@ def StaticAnalysis( for no self-weight considerations; self_weight = [False] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Load Case @@ -161,8 +162,9 @@ def StaticAnalysis( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Case to client model Model.clientModel.service.set_load_case(clientObject) diff --git a/RFEM/LoadCasesAndCombinations/loadCombination.py b/RFEM/LoadCasesAndCombinations/loadCombination.py index ab89d363..19a08cf3 100644 --- a/RFEM/LoadCasesAndCombinations/loadCombination.py +++ b/RFEM/LoadCasesAndCombinations/loadCombination.py @@ -14,7 +14,7 @@ def __init__(self, to_solve: bool = True, combination_items = [[1.5, 1, 0, False]], comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Load Combination clientObject = Model.clientModel.factory.create('ns0:load_combination') @@ -55,8 +55,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Items clientObject.items = Model.clientModel.factory.create('ns0:load_combination.items') diff --git a/RFEM/LoadCasesAndCombinations/modalAnalysisSettings.py b/RFEM/LoadCasesAndCombinations/modalAnalysisSettings.py index b3bbae34..2d90a469 100644 --- a/RFEM/LoadCasesAndCombinations/modalAnalysisSettings.py +++ b/RFEM/LoadCasesAndCombinations/modalAnalysisSettings.py @@ -12,7 +12,7 @@ def __init__(self, acting_masses = [], neglect_masses = ModalNeglectMasses.E_NEGLECT_MASSES_NO_NEGLECTION, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Setting Tag @@ -24,7 +24,7 @@ def __init__(self, acting_masses (list): Acting Masses Directions List neglect_masses (enum): Neglect Masses Enumeration comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Surface clientObject = Model.clientModel.factory.create('ns0:modal_analysis_settings') @@ -70,8 +70,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Static Analysis Settings to client model Model.clientModel.service.set_modal_analysis_settings(clientObject) diff --git a/RFEM/LoadCasesAndCombinations/resultCombination.py b/RFEM/LoadCasesAndCombinations/resultCombination.py index 4428fab8..3270be88 100644 --- a/RFEM/LoadCasesAndCombinations/resultCombination.py +++ b/RFEM/LoadCasesAndCombinations/resultCombination.py @@ -4,13 +4,13 @@ class ResultCombination(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Result Combination Tag comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Result Combination @@ -26,8 +26,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Result Combination to client model Model.clientModel.service.set_result_combination(clientObject) diff --git a/RFEM/LoadCasesAndCombinations/spectralAnalysisSettings.py b/RFEM/LoadCasesAndCombinations/spectralAnalysisSettings.py index 77102190..34ba2637 100644 --- a/RFEM/LoadCasesAndCombinations/spectralAnalysisSettings.py +++ b/RFEM/LoadCasesAndCombinations/spectralAnalysisSettings.py @@ -14,7 +14,7 @@ def __init__(self, damping_for_cqc_rule = CqsDampingRule.CONSTANT_FOR_EACH_MODE, constant_d_for_each_mode: float = 0.0, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -29,7 +29,7 @@ def __init__(self, damping_for_cqc_rule (enum): Cqs Damping Rule Enumeration constant_d_for_each_mode (float): Constant d for Each Mode comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Surface @@ -76,7 +76,8 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Static Analysis Settings to client model Model.clientModel.service.set_spectral_analysis_settings(clientObject) diff --git a/RFEM/LoadCasesAndCombinations/stabilityAnalysisSettings.py b/RFEM/LoadCasesAndCombinations/stabilityAnalysisSettings.py index dc965357..8c0f61fc 100644 --- a/RFEM/LoadCasesAndCombinations/stabilityAnalysisSettings.py +++ b/RFEM/LoadCasesAndCombinations/stabilityAnalysisSettings.py @@ -8,13 +8,13 @@ def __init__(self, no: int = 1, name: str = None, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Stability Analysis Setting Tag name (str): Stability Analysis Setting Name comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Stability Analysis Settings @@ -47,8 +47,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Stability Analysis Settings to client model Model.clientModel.service.set_stability_analysis_settings(clientObject) @@ -65,7 +66,7 @@ def EigenvalueMethod( eigenvalue_method = StabilityAnalysisSettingsEigenvalueMethod.EIGENVALUE_METHOD_LANCZOS, matrix_type = StabilityAnalysisSettingsMatrixType.MATRIX_TYPE_STANDARD, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Stability Analysis Setting Tag @@ -141,8 +142,9 @@ def EigenvalueMethod( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Stability Analysis Settings to client model Model.clientModel.service.set_stability_analysis_settings(clientObject) @@ -162,7 +164,7 @@ def IncrementalyMethodWithEigenvalue( eigenvalue_method = StabilityAnalysisSettingsEigenvalueMethod.EIGENVALUE_METHOD_LANCZOS, matrix_type = StabilityAnalysisSettingsMatrixType.MATRIX_TYPE_STANDARD, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Stability Analysis Setting Tag @@ -208,7 +210,7 @@ def IncrementalyMethodWithEigenvalue( eigenvalue_method (enum): Eigenvalue Method Enumeration matrix_type (enum): Matrix Type Enumeration comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Stability Analysis Settings clientObject = Model.clientModel.factory.create('ns0:stability_analysis_settings') @@ -282,8 +284,9 @@ def IncrementalyMethodWithEigenvalue( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Stability Analysis Settings to client model Model.clientModel.service.set_stability_analysis_settings(clientObject) @@ -298,7 +301,7 @@ def IncrementalyMethodWithoutEigenvalue( stopping_of_load_increasing = None, save_results_of_all_increments: bool = False, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Stability Analysis Setting Tag @@ -335,7 +338,7 @@ def IncrementalyMethodWithoutEigenvalue( stopping_of_load_increasing = [StabilityAnalysisSettingsStoppingOfLoadIncreasingResult.RESULT_TYPE_ROTATION_PHI_Z, limit_result_rotation, limit_node] save_results_of_all_increments (bool, optional): Save Results of All Increments comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Stability Analysis Settings clientObject = Model.clientModel.factory.create('ns0:stability_analysis_settings') @@ -392,8 +395,9 @@ def IncrementalyMethodWithoutEigenvalue( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Stability Analysis Settings to client model Model.clientModel.service.set_stability_analysis_settings(clientObject) diff --git a/RFEM/LoadCasesAndCombinations/staticAnalysisSettings.py b/RFEM/LoadCasesAndCombinations/staticAnalysisSettings.py index c9172111..eb261370 100644 --- a/RFEM/LoadCasesAndCombinations/staticAnalysisSettings.py +++ b/RFEM/LoadCasesAndCombinations/staticAnalysisSettings.py @@ -9,7 +9,7 @@ def __init__(self, name: str = None, analysis_type=StaticAnalysisType.GEOMETRICALLY_LINEAR, comment: str = '', - params: dict = {}): + params: dict = []): """ Args: no (int): Static Analysis Setting Tag @@ -38,8 +38,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Static Analysis Settings to client model Model.clientModel.service.set_static_analysis_settings(clientObject) @@ -55,7 +56,7 @@ def GeometricallyLinear( plate_bending_theory = StaticAnalysisSettingsPlateBendingTheory.PLATE_BENDING_THEORY_MINDLIN, mass_conversion = [False, 0, 0, 0], comment: str = '', - params: dict = {}): + params: dict = []): """ Args: @@ -123,8 +124,9 @@ def GeometricallyLinear( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Static Analysis Settings to client model Model.clientModel.service.set_static_analysis_settings(clientObject) @@ -167,7 +169,7 @@ def LargeDeformation( mass_conversion (list, optional): Mass Conversion Parameters mass_conversion = [mass_conversion_enabled, mass_conversion_factor_in_direction_x, mass_conversion_factor_in_direction_y, mass_conversion_factor_in_direction_z] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model @@ -245,8 +247,9 @@ def LargeDeformation( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Static Analysis Settings to client model Model.clientModel.service.set_static_analysis_settings(clientObject) @@ -267,7 +270,7 @@ def SecondOrderPDelta( plate_bending_theory = StaticAnalysisSettingsPlateBendingTheory.PLATE_BENDING_THEORY_MINDLIN, mass_conversion = [False, 0, 0, 1], comment: str = '', - params: dict = {}): + params: dict = []): """ Args: no (int): Static Analysis Setting Tag @@ -364,8 +367,9 @@ def SecondOrderPDelta( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Static Analysis Settings to client model Model.clientModel.service.set_static_analysis_settings(clientObject) diff --git a/RFEM/Loads/freeLoad.py b/RFEM/Loads/freeLoad.py index 5d409cb3..49fb7629 100644 --- a/RFEM/Loads/freeLoad.py +++ b/RFEM/Loads/freeLoad.py @@ -17,7 +17,7 @@ def ConcentratedLoad( load_direction = FreeConcentratedLoadLoadDirection.LOAD_DIRECTION_GLOBAL_Z, load_parameter = [1000, 0, 0], comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -35,7 +35,7 @@ def ConcentratedLoad( for load_projection == FreeLoadLoadProjection.LOAD_PROJECTION_XZ_OR_UW: load_parameter = [magnitude, X, Z] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Free Concentrated Load @@ -73,8 +73,9 @@ def ConcentratedLoad( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Free Concentrated Load to client model Model.clientModel.service.set_free_concentrated_load(load_case_no, clientObject) @@ -89,7 +90,7 @@ def LineLoad( load_direction = FreeLineLoadLoadDirection.LOAD_DIRECTION_LOCAL_Z, load_parameter = [], comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -105,7 +106,7 @@ def LineLoad( for load_distribution == FreeLineLoadLoadDistribution.LOAD_DISTRIBUTION_LINEAR: load_parameter = [magnitude_first, magnitude_second, load_location_first_x, load_location_first_y, load_location_second_x, load_location_second_y] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Free Concentrated Load @@ -155,8 +156,9 @@ def LineLoad( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Free Concentrated Load to client model Model.clientModel.service.set_free_line_load(load_case_no, clientObject) @@ -173,7 +175,7 @@ def RectangularLoad( load_location = FreeRectangularLoadLoadLocationRectangle.LOAD_LOCATION_RECTANGLE_CORNER_POINTS, load_location_parameter = [], comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -209,7 +211,7 @@ def RectangularLoad( for load_distribution == FreeRectangularLoadLoadDistribution.LOAD_DISTRIBUTION_VARYING_IN_Z_AND_ALONG_PERIMETER: load_location_parameter = [load_location_center_x, load_location_center_y, load_location_center_side_a, load_location_center_side_b, [[distance, factor], ...], [axis_definition_p1_x, axis_definition_p1_y, axis_definition_p1_z], [axis_definition_p2_x, axis_definition_p2_y, axis_definition_p2_z], axis_start_angle,[[alpha, factor], ...] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Free Concentrated Load @@ -427,8 +429,9 @@ def RectangularLoad( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Free Concentrated Load to client model Model.clientModel.service.set_free_rectangular_load(load_case_no, clientObject) @@ -443,7 +446,7 @@ def CircularLoad( load_direction = FreeCircularLoadLoadDirection.LOAD_DIRECTION_GLOBAL_Z_TRUE, load_parameter = [], comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -459,7 +462,7 @@ def CircularLoad( for load_distribution == FreeCircularLoadLoadDistribution.LOAD_DISTRIBUTION_LINEAR: load_parameter = [magnitude_center, magnitude_radius, load_location_x, load_location_y, load_location_radius] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Free Concentrated Load @@ -508,8 +511,9 @@ def CircularLoad( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Free Concentrated Load to client model Model.clientModel.service.set_free_circular_load(load_case_no, clientObject) @@ -525,7 +529,7 @@ def PolygonLoad( load_location = [], load_parameter = [], comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -550,7 +554,7 @@ def PolygonLoad( load_location = [[first_coordinate, second_coordinate], ...] load_parameter = [magnitude_linear_1, magnitude_linear_2, magnitude_linear_location_1, magnitude_linear_location_2] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Free Concentrated Load @@ -614,8 +618,9 @@ def PolygonLoad( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Free Concentrated Load to client model Model.clientModel.service.set_free_polygon_load(load_case_no, clientObject) diff --git a/RFEM/Loads/imposedLineDeformation.py b/RFEM/Loads/imposedLineDeformation.py index f7ea8567..a9daf468 100644 --- a/RFEM/Loads/imposedLineDeformation.py +++ b/RFEM/Loads/imposedLineDeformation.py @@ -37,8 +37,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Nodal Support to client model Model.clientModel.service.set_imposed_line_deformation(load_case_no, clientObject) diff --git a/RFEM/Loads/imposedNodalDeformation.py b/RFEM/Loads/imposedNodalDeformation.py index da5d7679..12453f3a 100644 --- a/RFEM/Loads/imposedNodalDeformation.py +++ b/RFEM/Loads/imposedNodalDeformation.py @@ -8,7 +8,7 @@ def __init__(self, node_no: str = '1', load_parameter = None, comment: str = '', - params: dict = {}): + params: dict = None): ''' load_parameter: load_parameter = [imposed_displacement_x, imposed_displacement_y, imposed_displacement_z, imposed_rotation_x, imposed_rotation_y imposed_rotation_z] @@ -42,8 +42,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Imposed Nodal Deformation to client model Model.clientModel.service.set_imposed_nodal_deformation(load_case_no, clientObject) diff --git a/RFEM/Loads/lineLoad.py b/RFEM/Loads/lineLoad.py index 6263cf8a..90728a74 100644 --- a/RFEM/Loads/lineLoad.py +++ b/RFEM/Loads/lineLoad.py @@ -10,7 +10,7 @@ def __init__(self, load_direction = LoadDirectionType.LOAD_DIRECTION_LOCAL_Z, magnitude: float = 0, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -20,7 +20,7 @@ def __init__(self, load_direction (enum): Load Direction Enumeration magnitude (float): Magnitude of Line Load comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Line Load @@ -56,8 +56,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Line Load to client model Model.clientModel.service.set_line_load(load_case_no, clientObject) @@ -72,7 +73,7 @@ def Force( load_parameter = None, list_reference: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -106,7 +107,7 @@ def Force( load_parameter = [[distance, delta_distance, magnitude], ...] list_reference (bool): List Reference Bool comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Line Load @@ -309,8 +310,9 @@ def Force( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Line Load to client model Model.clientModel.service.set_line_load(load_case_no, clientObject) @@ -325,7 +327,7 @@ def Moment( load_parameter = None, list_reference: bool = False, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -357,7 +359,7 @@ def Moment( load_parameter = [[distance, delta_distance, magnitude], ...] list_reference (bool): List Reference Bool comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Line Load @@ -560,8 +562,9 @@ def Moment( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Line Load to client model Model.clientModel.service.set_line_load(load_case_no, clientObject) @@ -574,7 +577,7 @@ def Mass( individual_mass_components: bool=True, mass_components = None, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: no (int): Load Tag @@ -587,7 +590,7 @@ def Mass( for individual_mass_components == True: mass_components = [mass_x, mass_y, mass_z] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Line Load @@ -634,8 +637,9 @@ def Mass( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Line Load to client model Model.clientModel.service.set_line_load(load_case_no, clientObject) diff --git a/RFEM/Loads/memberLoad.py b/RFEM/Loads/memberLoad.py index 4d5d91bd..e096d2e7 100644 --- a/RFEM/Loads/memberLoad.py +++ b/RFEM/Loads/memberLoad.py @@ -11,7 +11,7 @@ def __init__(self, load_direction = LoadDirectionType.LOAD_DIRECTION_LOCAL_Z, magnitude: float = 2000, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -20,7 +20,7 @@ def __init__(self, load_direction (enum): Load Directin Enumeration magnitude (float): Load Magnitude comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member Load clientObject = Model.clientModel.factory.create('ns0:member_load') @@ -55,8 +55,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_load(load_case_no, clientObject) @@ -72,7 +73,7 @@ def Force( force_eccentricity: bool= False, list_reference: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -108,7 +109,7 @@ def Force( force_eccentricity (bool): Enable/Disable Force Eccentricity Option list_reference (bool): Enable/Disable List Reference Option comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary for force_eccentricity == True: {'eccentricity_horizontal_alignment': MemberLoadEccentricityHorizontalAlignment.ALIGN_NONE, 'eccentricity_vertical_alignment': MemberLoadEccentricityVerticalAlignment.ALIGN_NONE, @@ -373,7 +374,7 @@ def Moment( load_parameter = [], list_reference: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -404,7 +405,7 @@ def Moment( load_parameter = [[distance, delta_distance, magnitude], ...] list_reference (bool): Enable/Disable List Reference Option comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member Load clientObject = Model.clientModel.factory.create('ns0:member_load') @@ -584,8 +585,9 @@ def Moment( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_load(load_case_no, clientObject) @@ -598,7 +600,7 @@ def Mass( individual_mass_components: bool=False, mass_components = [], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -611,7 +613,7 @@ def Mass( else: mass_components = [Mx, My, Mz, Ix, Iy, Iz] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member Load clientObject = Model.clientModel.factory.create('ns0:member_load') @@ -649,8 +651,9 @@ def Mass( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_load(load_case_no, clientObject) @@ -666,7 +669,7 @@ def Temperature( list_reference: bool= False, load_over_total_length: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -692,7 +695,7 @@ def Temperature( list_reference (bool): List Reference Boolean load_over_total_length (bool): Enable/Disable Load Over Total Length Option comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Member Load @@ -807,8 +810,9 @@ def Temperature( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_load(load_case_no, clientObject) @@ -824,7 +828,7 @@ def TemperatureChange( list_reference: bool= False, load_over_total_length: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -850,7 +854,7 @@ def TemperatureChange( list_reference (bool): Enable/Disable List Reference Option load_over_total_length (bool): Enable/Disable Load Over Total Length Option comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Member Load @@ -965,8 +969,9 @@ def TemperatureChange( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_load(load_case_no, clientObject) @@ -982,7 +987,7 @@ def AxialStrain( list_reference: bool= False, load_over_total_length: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -1005,7 +1010,7 @@ def AxialStrain( list_reference (bool): Enable/Disable List Reference Option load_over_total_length (bool): Enable/Disable Load Over Total Length Option comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Member Load @@ -1112,8 +1117,9 @@ def AxialStrain( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_load(load_case_no, clientObject) @@ -1126,7 +1132,7 @@ def AxialDisplacement( load_direction = MemberLoadDirection.LOAD_DIRECTION_LOCAL_X, magnitude : float = 0.0, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -1136,7 +1142,7 @@ def AxialDisplacement( load_direction (enum): Load Direction Enumeration magnitude (float): Load Magnitude comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Member Load @@ -1171,8 +1177,9 @@ def AxialDisplacement( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_load(load_case_no, clientObject) @@ -1188,7 +1195,7 @@ def Precamber( list_reference: bool= False, load_over_total_length: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -1211,7 +1218,7 @@ def Precamber( list_reference (bool): Enable/Disable List Reference Option load_over_total_length (bool): Enable/Disable Load Over Total Length Option comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Member Load @@ -1318,8 +1325,9 @@ def Precamber( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_load(load_case_no, clientObject) @@ -1332,7 +1340,7 @@ def InitialPrestress( load_direction = MemberLoadDirection.LOAD_DIRECTION_LOCAL_X, magnitude : float = 0.0, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -1342,7 +1350,7 @@ def InitialPrestress( load_direction (enum): Load Direction Enumeration magnitude (float): Load Magnitude comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Member Load @@ -1377,8 +1385,9 @@ def InitialPrestress( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_load(load_case_no, clientObject) @@ -1394,7 +1403,7 @@ def Displacement( list_reference: bool= False, load_over_total_length: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -1427,7 +1436,7 @@ def Displacement( list_reference (bool): Enable/Disable List Reference Option load_over_total_length (bool): Enable/Disable Load Over Total Length Option comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Member Load @@ -1613,8 +1622,9 @@ def Displacement( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_load(load_case_no, clientObject) @@ -1630,7 +1640,7 @@ def Rotation( list_reference: bool= False, load_over_total_length: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -1663,7 +1673,7 @@ def Rotation( list_reference (bool): Enable/Disable List Reference Option load_over_total_length (bool): Enable/Disable Load Over Total Length Option comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Member Load @@ -1849,8 +1859,9 @@ def Rotation( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_load(load_case_no, clientObject) @@ -1863,7 +1874,7 @@ def PipeContentFull( load_direction_orientation = MemberLoadDirectionOrientation.LOAD_DIRECTION_FORWARD, specific_weight : float = 0.0, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -1873,7 +1884,7 @@ def PipeContentFull( load_direction_orientation (enum): Load Direction Enumeration specific_weight (float): Specific Weight comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Member Load @@ -1911,8 +1922,9 @@ def PipeContentFull( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_load(load_case_no, clientObject) @@ -1926,7 +1938,7 @@ def PipeContentPartial( specific_weight : float = 0.0, filling_height : float = 0.0, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -1937,7 +1949,7 @@ def PipeContentPartial( specific_weight (float): Specific Weight filling_height (float): Filling Height comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Member Load @@ -1978,8 +1990,9 @@ def PipeContentPartial( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_load(load_case_no, clientObject) @@ -1991,7 +2004,7 @@ def PipeInternalPressure( members_no: str = '1', pressure : float = 0.0, comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -2000,7 +2013,7 @@ def PipeInternalPressure( members_no (str): Assigned Member(s) pressure (float): Pressure comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Member Load @@ -2035,8 +2048,9 @@ def PipeInternalPressure( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_load(load_case_no, clientObject) @@ -2054,7 +2068,7 @@ def RotaryMotion( axis_definition_p1 = [1,0,1], axis_definition_p2 = [0,1,0], comment: str = '', - params: dict = {}): + params: dict = None): ''' Args: @@ -2069,7 +2083,7 @@ def RotaryMotion( axis_definition_p1 (list): P1 List [X, Y, Z] axis_definition_p2 (list): P2 List [X, Y, Z] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary ''' # Client model | Member Load @@ -2122,8 +2136,9 @@ def RotaryMotion( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_load(load_case_no, clientObject) \ No newline at end of file diff --git a/RFEM/Loads/membersetload.py b/RFEM/Loads/membersetload.py index d9be1e0b..326f99bb 100644 --- a/RFEM/Loads/membersetload.py +++ b/RFEM/Loads/membersetload.py @@ -12,7 +12,7 @@ def __init__(self, load_direction = LoadDirectionType.LOAD_DIRECTION_LOCAL_Z, magnitude: float = 0, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -21,7 +21,7 @@ def __init__(self, load_direction (enum): Load Case Enumeration magnitude (float): Load Magnitude comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member Load @@ -57,8 +57,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_set_load(load_case_no, clientObject) @@ -73,7 +74,7 @@ def Force( load_parameter = [], force_eccentricity: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -84,7 +85,7 @@ def Force( load_parameter (list): Load Parameter force_eccentricity (bool): Force Eccentricity Option comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary for LOAD_DISTRIBUTION_UNIFORM: load_parameter = [magnitude] @@ -403,7 +404,7 @@ def Moment( load_direction= MemberSetLoadDirection.LOAD_DIRECTION_LOCAL_Z, load_parameter = [], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -413,7 +414,7 @@ def Moment( load_direction (enum): Load Direction Enumeration load_parameter (list): Load Parameters comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary for LOAD_DISTRIBUTION_UNIFORM: load_parameter = magnitude @@ -645,8 +646,9 @@ def Moment( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_set_load(load_case_no, clientObject) @@ -659,7 +661,7 @@ def Mass( individual_mass_components: bool=False, mass_components = [], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -668,7 +670,7 @@ def Mass( individual_mass_components (bool): Individiual Mass Components Option mass_components (list): Mass Components comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member Load clientObject = Model.clientModel.factory.create('ns0:member_set_load') @@ -708,8 +710,9 @@ def Mass( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_set_load(load_case_no, clientObject) @@ -724,7 +727,7 @@ def Temperature( load_parameter = [], load_over_total_length: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -735,7 +738,7 @@ def Temperature( load_parameter (list): Load Parameters load_over_total_length (bool): Load Over Total Length Option comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary for load_distribution = MemberSetLoadDistribution.LOAD_DISTRIBUTION_UNIFORM: load_parameter = [tt, tb] @@ -883,8 +886,9 @@ def Temperature( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_set_load(load_case_no, clientObject) @@ -899,7 +903,7 @@ def TemperatureChange( load_parameter = [], load_over_total_length: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -910,7 +914,7 @@ def TemperatureChange( load_parameter (list): Load Parameters load_over_total_length (bool): Load Over Total Length Option comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary for load_distribution = MemberSetLoadDistribution.LOAD_DISTRIBUTION_UNIFORM: load_parameter = [tc, delta_t] @@ -1052,8 +1056,9 @@ def TemperatureChange( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_set_load(load_case_no, clientObject) @@ -1068,7 +1073,7 @@ def AxialStrain( load_parameter = [], load_over_total_length: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -1079,7 +1084,7 @@ def AxialStrain( load_parameter (list): Load Parameters load_over_total_length (bool): Load Over Total Length Option comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary for load_distribution = MemberSetLoadDistribution.LOAD_DISTRIBUTION_UNIFORM: load_parameter = [epsilon] @@ -1210,8 +1215,9 @@ def AxialStrain( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_set_load(load_case_no, clientObject) @@ -1224,7 +1230,7 @@ def AxialDisplacement( load_direction = MemberSetLoadDirection.LOAD_DIRECTION_LOCAL_X, magnitude : float = 0.0, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -1233,7 +1239,7 @@ def AxialDisplacement( load_direction (enum): Load Direction Enumeration magnitude (float): Load Magnitude comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member Load clientObject = Model.clientModel.factory.create('ns0:member_set_load') @@ -1267,8 +1273,9 @@ def AxialDisplacement( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_set_load(load_case_no, clientObject) @@ -1283,7 +1290,7 @@ def Precamber( load_parameter = [], load_over_total_length: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -1294,7 +1301,7 @@ def Precamber( load_parameter (enum): Load Parameters load_over_total_length (bool): Load Over Total Lenth Option comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary for load_distribution = MemberSetLoadDistribution.LOAD_DISTRIBUTION_UNIFORM: load_parameter = [magnitude] @@ -1426,8 +1433,9 @@ def Precamber( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_set_load(load_case_no, clientObject) @@ -1440,7 +1448,7 @@ def InitialPrestress( load_direction = MemberSetLoadDirection.LOAD_DIRECTION_LOCAL_X, magnitude : float = 0.0, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -1449,7 +1457,7 @@ def InitialPrestress( load_direction (enum): Load Direction Enumeration magnitude (float): Load Magnitude comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member Load clientObject = Model.clientModel.factory.create('ns0:member_set_load') @@ -1483,8 +1491,9 @@ def InitialPrestress( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_set_load(load_case_no, clientObject) @@ -1499,7 +1508,7 @@ def Displacement( load_parameter = [], load_over_total_length: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -1510,7 +1519,7 @@ def Displacement( load_parameter (list): Load Parameters load_over_total_length (bool): Load Over Total Length Option comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary for load_distribution = MemberSetLoadDistribution.LOAD_DISTRIBUTION_UNIFORM: load_parameter = [magnitude] @@ -1748,8 +1757,9 @@ def Displacement( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_set_load(load_case_no, clientObject) @@ -1764,7 +1774,7 @@ def Rotation( load_parameter = [], load_over_total_length: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -1775,7 +1785,7 @@ def Rotation( load_parameter (list): Load Parameters load_over_total_length (bool): Load Over Total Length comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary for load_distribution = MemberSetLoadDistribution.LOAD_DISTRIBUTION_UNIFORM: load_parameter = [magnitude] @@ -2013,8 +2023,9 @@ def Rotation( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_set_load(load_case_no, clientObject) @@ -2027,7 +2038,7 @@ def PipeContentFull( load_direction_orientation = MemberSetLoadDirectionOrientation.LOAD_DIRECTION_FORWARD, specific_weight : float = 0.0, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -2036,7 +2047,7 @@ def PipeContentFull( load_direction_orientation (enum): Load Direction Orientation Enumeration specific_weight (float): Specific Weight comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member Load clientObject = Model.clientModel.factory.create('ns0:member_set_load') @@ -2073,8 +2084,9 @@ def PipeContentFull( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_set_load(load_case_no, clientObject) @@ -2088,7 +2100,7 @@ def PipeContentPartial( specific_weight : float = 0.0, filling_height : float = 0.0, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -2098,7 +2110,7 @@ def PipeContentPartial( specific_weight (float): Specific Weight filling_height (float): Filling Height comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member Load clientObject = Model.clientModel.factory.create('ns0:member_set_load') @@ -2138,8 +2150,9 @@ def PipeContentPartial( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_set_load(load_case_no, clientObject) @@ -2151,7 +2164,7 @@ def PipeInternalPressure( member_sets: str = '1', pressure : float = 0.0, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -2159,7 +2172,7 @@ def PipeInternalPressure( member_sets (str): Assigned Member Sets pressure (float): Pressure comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member Load clientObject = Model.clientModel.factory.create('ns0:member_set_load') @@ -2193,8 +2206,9 @@ def PipeInternalPressure( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_set_load(load_case_no, clientObject) @@ -2212,7 +2226,7 @@ def RotaryMotion( axis_definition_p1 = [], axis_definition_p2 = [], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -2226,7 +2240,7 @@ def RotaryMotion( axis_definition_p1 (list):Axis Definition First Point axis_definition_p2 (list): Axis Definition Second Point comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Member Load clientObject = Model.clientModel.factory.create('ns0:member_set_load') @@ -2278,8 +2292,9 @@ def RotaryMotion( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Load Member Load to client model Model.clientModel.service.set_member_set_load(load_case_no, clientObject) diff --git a/RFEM/Loads/nodalLoad.py b/RFEM/Loads/nodalLoad.py index 7bc5e2d6..b9d52fe3 100644 --- a/RFEM/Loads/nodalLoad.py +++ b/RFEM/Loads/nodalLoad.py @@ -19,7 +19,7 @@ def __init__(self, load_direction (enum): Load Direction Enumeration magnitude (float): Force Magnitude comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Nodal Force clientObject = Model.clientModel.factory.create('ns0:nodal_load') @@ -50,8 +50,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Nodal Force to client model Model.clientModel.service.set_nodal_load(load_case_no, clientObject) @@ -210,7 +211,7 @@ def Moment( specific_direction: bool= False, shifted_display: bool= False, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -466,7 +467,7 @@ def Mass( individual_mass_components : bool = False, mass = [], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -479,7 +480,7 @@ def Mass( elif individual_mass_components == True: mass = [Mx, My, Mz, Ix, Iy, Iz] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Nodal Force clientObject = Model.clientModel.factory.create('ns0:nodal_load') @@ -521,7 +522,7 @@ def Mass( clientObject.comment = comment # Adding optional parameters via dictionary - if 'individual_mass_components' not in params.keys(): + if params: for key in params: clientObject[key] = params[key] diff --git a/RFEM/Loads/solidLoad.py b/RFEM/Loads/solidLoad.py index ef7968a6..3c8be1d5 100644 --- a/RFEM/Loads/solidLoad.py +++ b/RFEM/Loads/solidLoad.py @@ -12,7 +12,7 @@ def __init__(self, load_direction = SolidLoadDirection.LOAD_DIRECTION_GLOBAL_Z_OR_USER_DEFINED_W_TRUE, magnitude: float = 0, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Solid Load clientObject = Model.clientModel.factory.create('ns0:solid_load') @@ -45,8 +45,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Solid Load to client model Model.clientModel.service.set_solid_load(load_case_no, clientObject) @@ -59,7 +60,7 @@ def Force( load_direction = SolidLoadDirection.LOAD_DIRECTION_GLOBAL_Z_OR_USER_DEFINED_W_TRUE, magnitude: float = 0, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Solid Load clientObject = Model.clientModel.factory.create('ns0:solid_load') @@ -92,8 +93,9 @@ def Force( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Solid Load to client model Model.clientModel.service.set_solid_load(load_case_no, clientObject) @@ -106,7 +108,7 @@ def Temperature( load_distribution = SolidLoadDistribution.LOAD_DISTRIBUTION_UNIFORM, load_parameter = None, comment: str = '', - params: dict = {}): + params: dict = None): ''' load_parameter: LOAD_DISTRIBUTION_UNIFORM: load_parameter = magnitude @@ -149,8 +151,9 @@ def Temperature( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Solid Load to client model Model.clientModel.service.set_solid_load(load_case_no, clientObject) @@ -163,7 +166,7 @@ def Strain( load_distribution = SolidLoadDistribution.LOAD_DISTRIBUTION_UNIFORM, load_parameter = None, comment: str = '', - params: dict = {}): + params: dict = None): ''' load_parameter: LOAD_DISTRIBUTION_UNIFORM: load_parameter = [strain_uniform_magnitude_x, strain_uniform_magnitude_y, strain_uniform_magnitude_z] @@ -212,8 +215,9 @@ def Strain( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Solid Load to client model Model.clientModel.service.set_solid_load(load_case_no, clientObject) @@ -225,7 +229,7 @@ def Motion( solids_no: str= '1', load_parameter = None, comment: str = '', - params: dict = {}): + params: dict = None): ''' load_parameter: load_parameter = [angular_velocity, angular_acceleration, axis_definition_p1_x, axis_definition_p1_y, axis_definition_p1_z, axis_definition_p2_x, axis_definition_p2_y, axis_definition_p2_z] @@ -268,8 +272,9 @@ def Motion( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Solid Load to client model Model.clientModel.service.set_solid_load(load_case_no, clientObject) diff --git a/RFEM/Loads/solidSetLoad.py b/RFEM/Loads/solidSetLoad.py index cf172eb6..99ea962c 100644 --- a/RFEM/Loads/solidSetLoad.py +++ b/RFEM/Loads/solidSetLoad.py @@ -12,7 +12,7 @@ def __init__(self, load_direction = SolidSetLoadDirection.LOAD_DIRECTION_GLOBAL_Z_OR_USER_DEFINED_W_TRUE, magnitude: float = 0, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Solid Load clientObject = Model.clientModel.factory.create('ns0:solid_set_load') @@ -45,8 +45,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Solid Load to client model Model.clientModel.service.set_solid_set_load(load_case_no, clientObject) @@ -60,7 +61,7 @@ def Force( load_direction = SolidSetLoadDirection.LOAD_DIRECTION_GLOBAL_Z_OR_USER_DEFINED_W_TRUE, magnitude: float = 0, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Solid Load clientObject = Model.clientModel.factory.create('ns0:solid_set_load') @@ -93,8 +94,9 @@ def Force( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Solid Load to client model Model.clientModel.service.set_solid_set_load(load_case_no, clientObject) @@ -107,7 +109,7 @@ def Temperature( load_distribution = SolidSetLoadDistribution.LOAD_DISTRIBUTION_UNIFORM, load_parameter = None, comment: str = '', - params: dict = {}): + params: dict = None): ''' load_parameter: LOAD_DISTRIBUTION_UNIFORM: load_parameter = magnitude @@ -150,8 +152,9 @@ def Temperature( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Solid Load to client model Model.clientModel.service.set_solid_set_load(load_case_no, clientObject) @@ -164,7 +167,7 @@ def Strain( load_distribution = SolidSetLoadDistribution.LOAD_DISTRIBUTION_UNIFORM, load_parameter = None, comment: str = '', - params: dict = {}): + params: dict = None): ''' load_parameter: LOAD_DISTRIBUTION_UNIFORM: load_parameter = [strain_uniform_magnitude_x, strain_uniform_magnitude_y, strain_uniform_magnitude_z] @@ -213,8 +216,9 @@ def Strain( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Solid Load to client model Model.clientModel.service.set_solid_set_load(load_case_no, clientObject) @@ -226,7 +230,7 @@ def Motion( solid_sets_no: str= '1', load_parameter = None, comment: str = '', - params: dict = {}): + params: dict = None): ''' load_parameter: load_parameter = [angular_velocity, angular_acceleration, axis_definition_p1_x, axis_definition_p1_y, axis_definition_p1_z, axis_definition_p2_x, axis_definition_p2_y, axis_definition_p2_z] @@ -269,8 +273,9 @@ def Motion( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Solid Load to client model Model.clientModel.service.set_solid_set_load(load_case_no, clientObject) diff --git a/RFEM/Loads/surfaceLoad.py b/RFEM/Loads/surfaceLoad.py index 6a3612ef..0deaf396 100644 --- a/RFEM/Loads/surfaceLoad.py +++ b/RFEM/Loads/surfaceLoad.py @@ -9,7 +9,7 @@ def __init__(self, surface_no: str = '1', magnitude: float = 1.0, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -17,7 +17,7 @@ def __init__(self, surface_no (str): Assigend Surfaces magnitude (float): Load Magnitude comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Surface Load clientObject = Model.clientModel.factory.create('ns0:surface_load') @@ -49,8 +49,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Load to client model Model.clientModel.service.set_surface_load(load_case_no, clientObject) @@ -64,7 +65,7 @@ def Force( load_distribution = SurfaceLoadDistribution.LOAD_DISTRIBUTION_UNIFORM, load_parameter = [], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -91,7 +92,7 @@ def Force( load_parameter = [[distance_1, delta_distance_1, magnitude_1], [distance_2, delta_distance_2, magnitude_2]...] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Surface Load clientObject = Model.clientModel.factory.create('ns0:surface_load') @@ -177,8 +178,9 @@ def Force( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Load to client model Model.clientModel.service.set_surface_load(load_case_no, clientObject) @@ -191,7 +193,7 @@ def Temperature( load_distribution = SurfaceLoadDistribution.LOAD_DISTRIBUTION_UNIFORM, load_parameter = [], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -215,7 +217,7 @@ def Temperature( load_parameter = [t_c_1, delta_t_1, t_c_2, delta_t_2, node_1, node_2, SurfaceLoadAxisDefinitionType, SurfaceLoadAxisDefinitionAxis, axis_definition_p1] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Surface Load clientObject = Model.clientModel.factory.create('ns0:surface_load') @@ -288,8 +290,9 @@ def Temperature( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Load to client model Model.clientModel.service.set_surface_load(load_case_no, clientObject) @@ -302,7 +305,7 @@ def AxialStrain( load_distribution = SurfaceLoadDistribution.LOAD_DISTRIBUTION_UNIFORM, load_parameter = [], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -321,7 +324,7 @@ def AxialStrain( load_parameter = [magnitude_axial_strain_1x, magnitude_axial_strain_1y, magnitude_axial_strain_2x, magnitude_axial_strain_2y, node_1, node_2] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Surface Load clientObject = Model.clientModel.factory.create('ns0:surface_load') @@ -374,8 +377,9 @@ def AxialStrain( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Load to client model Model.clientModel.service.set_surface_load(load_case_no, clientObject) @@ -387,7 +391,7 @@ def Precamber( surface_no: str = '1', uniform_magnitude : float = 0.0, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -395,7 +399,7 @@ def Precamber( surface_no (str): Assigned Surfaces uniform_magnitude (float): Magnitude comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Surface Load clientObject = Model.clientModel.factory.create('ns0:surface_load') @@ -427,8 +431,9 @@ def Precamber( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Load to client model Model.clientModel.service.set_surface_load(load_case_no, clientObject) @@ -440,7 +445,7 @@ def RotaryMotion( surface_no: str = '1', load_parameter = [], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -454,7 +459,7 @@ def RotaryMotion( load_parameter = [angular_velocity, angular_acceleration, SurfaceLoadAxisDefinitionType, SurfaceLoadAxisDefinitionAxis, SurfaceLoadAxisDirectionType; [x1, y1, z1]] comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Surface Load clientObject = Model.clientModel.factory.create('ns0:surface_load') @@ -497,8 +502,9 @@ def RotaryMotion( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Load to client model Model.clientModel.service.set_surface_load(load_case_no, clientObject) @@ -511,7 +517,7 @@ def Mass( individual_mass_components : bool = False, mass_parameter = [], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -566,8 +572,9 @@ def Mass( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Load to client model Model.clientModel.service.set_surface_load(load_case_no, clientObject) diff --git a/RFEM/Loads/surfacesetload.py b/RFEM/Loads/surfacesetload.py index 250a2684..f84fdc97 100644 --- a/RFEM/Loads/surfacesetload.py +++ b/RFEM/Loads/surfacesetload.py @@ -9,7 +9,7 @@ def __init__(self, surface_sets: str = '1', magnitude: float = 1.0, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -17,7 +17,7 @@ def __init__(self, surface_sets (str): Assigned Surface Sets magnitude (float): Load Magnitude comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Surface Load clientObject = Model.clientModel.factory.create('ns0:surface_set_load') @@ -49,8 +49,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Load to client model Model.clientModel.service.set_surface_set_load(load_case_no, clientObject) @@ -64,7 +65,7 @@ def Force( load_distribution = SurfaceSetLoadDistribution.LOAD_DISTRIBUTION_UNIFORM, load_parameter = [], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -74,7 +75,7 @@ def Force( load_distribution (enum): Load Distribution Enumeration load_parameter (list): Load Parameters comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary for load_distribution == SurfaceSetLoadDistribution.LOAD_DISTRIBUTION_UNIFORM: load_parameter = [magnitude] @@ -177,8 +178,9 @@ def Force( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Load to client model Model.clientModel.service.set_surface_set_load(load_case_no, clientObject) @@ -191,7 +193,7 @@ def Temperature( load_distribution = SurfaceSetLoadDistribution.LOAD_DISTRIBUTION_UNIFORM, load_parameter = None, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -200,7 +202,7 @@ def Temperature( load_distribution (enum): Load Distribution Enumeration load_parameter (enum): Load Parameter Enumeration comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary for load_distribution == SurfaceSetLoadDistribution.LOAD_DISTRIBUTION_UNIFORM: load_parameter = [t_c, delta_t] @@ -288,8 +290,9 @@ def Temperature( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Load to client model Model.clientModel.service.set_surface_set_load(load_case_no, clientObject) @@ -302,7 +305,7 @@ def AxialStrain( load_distribution = SurfaceSetLoadDistribution.LOAD_DISTRIBUTION_UNIFORM, load_parameter = [], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -311,7 +314,7 @@ def AxialStrain( load_distribution (enum): Load Distribution Enumeration load_parameter (list): Load Parameter comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary for load_distribution == SurfaceSetLoadDistribution.LOAD_DISTRIBUTION_UNIFORM: load_parameter = [axial_strain_x, axial_strain_y] @@ -376,8 +379,9 @@ def AxialStrain( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Load to client model Model.clientModel.service.set_surface_set_load(load_case_no, clientObject) @@ -389,7 +393,7 @@ def Precamber( surface_sets: str = '1', uniform_magnitude : float = 0.0, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -397,7 +401,7 @@ def Precamber( surface_sets (str): Assigned Surface Sets uniform_magnitude (float): Load Magnitude comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Surface Load clientObject = Model.clientModel.factory.create('ns0:surface_set_load') @@ -429,8 +433,9 @@ def Precamber( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Load to client model Model.clientModel.service.set_surface_set_load(load_case_no, clientObject) @@ -442,7 +447,7 @@ def RotaryMotion( surface_sets: str = '1', load_parameter = [], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -450,7 +455,7 @@ def RotaryMotion( surface_sets (str): Assigned Surface Sets load_parameter (list): Load Parameters comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary for axis_definition_type = SurfaceSetLoadAxisDefinitionType.AXIS_DEFINITION_TWO_POINTS: load_parameter = [angular_velocity, angular_acceleration, SurfaceLoadAxisDefinitionType, [x1, y1, z1], [x2, y2, z2]] @@ -498,8 +503,9 @@ def RotaryMotion( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Load to client model Model.clientModel.service.set_surface_set_load(load_case_no, clientObject) @@ -512,7 +518,7 @@ def Mass( individual_mass_components : bool = False, mass_parameter = [], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Load Tag @@ -521,7 +527,7 @@ def Mass( individual_mass_components (bool): Individiual Mass Components Option mass_parameter (list): Mass Parameters comment (str, optional): Comment - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary for individual_mass_components == True: mass_parameter = [mass_global] @@ -560,8 +566,9 @@ def Mass( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Load to client model Model.clientModel.service.set_surface_set_load(load_case_no, clientObject) diff --git a/RFEM/SpecialObjects/enlargedColumnHead.py b/RFEM/SpecialObjects/enlargedColumnHead.py index e12825ca..e559ebed 100644 --- a/RFEM/SpecialObjects/enlargedColumnHead.py +++ b/RFEM/SpecialObjects/enlargedColumnHead.py @@ -4,7 +4,7 @@ class EnlargedColumnHead(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Enlarged Column Head clientObject = Model.clientModel.factory.create('ns0:enlarged_column_head') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Enlarged Column Head to client model Model.clientModel.service.set_enlarged_column_head(clientObject) diff --git a/RFEM/SpecialObjects/intersection.py b/RFEM/SpecialObjects/intersection.py index a0ee9e8f..3e943f8e 100644 --- a/RFEM/SpecialObjects/intersection.py +++ b/RFEM/SpecialObjects/intersection.py @@ -6,7 +6,7 @@ def __init__(self, surface_1: int = 1, surface_2: int = 2, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Intersection clientObject = Model.clientModel.factory.create('ns0:intersection') @@ -25,8 +25,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Intersection to client model Model.clientModel.service.set_intersection(clientObject) diff --git a/RFEM/SpecialObjects/resultSection.py b/RFEM/SpecialObjects/resultSection.py index 80941e10..caa9e994 100644 --- a/RFEM/SpecialObjects/resultSection.py +++ b/RFEM/SpecialObjects/resultSection.py @@ -4,7 +4,7 @@ class ResultSection(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Result Section clientObject = Model.clientModel.factory.create('ns0:result_section') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Result Section to client model Model.clientModel.service.set_result_section(clientObject) diff --git a/RFEM/SpecialObjects/rigidLink.py b/RFEM/SpecialObjects/rigidLink.py index 50f7d3ff..8c46a16e 100644 --- a/RFEM/SpecialObjects/rigidLink.py +++ b/RFEM/SpecialObjects/rigidLink.py @@ -8,7 +8,7 @@ def __init__(self, line_2: int = 2, ignore_relative_position: bool = True, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Rigid Link clientObject = Model.clientModel.factory.create('ns0:rigid_link') @@ -33,8 +33,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add rigid link to client model Model.clientModel.service.set_rigid_link(clientObject) @@ -46,7 +47,7 @@ def LineToLine( line_2: int = 2, ignore_relative_position: bool = True, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Line To Line Rigid Link clientObject = Model.clientModel.factory.create('ns0:rigid_link') @@ -71,8 +72,9 @@ def LineToLine( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add rigid link to client model Model.clientModel.service.set_rigid_link(clientObject) @@ -84,7 +86,7 @@ def LineToSurface( surface: int = 1, ignore_relative_position: bool = True, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Line To Surface Rigid Link clientObject = Model.clientModel.factory.create('ns0:rigid_link') @@ -110,8 +112,9 @@ def LineToSurface( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add rigid link to client model Model.clientModel.service.set_rigid_link(clientObject) @@ -122,7 +125,7 @@ def Diapragm( nodes: str = '3 4', lines: str = '6 7', comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Diapragm Rigid Link clientObject = Model.clientModel.factory.create('ns0:rigid_link') @@ -146,8 +149,9 @@ def Diapragm( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add rigid link to client model Model.clientModel.service.set_rigid_link(clientObject) diff --git a/RFEM/SpecialObjects/structureModification.py b/RFEM/SpecialObjects/structureModification.py index 3166e50f..d12b976f 100644 --- a/RFEM/SpecialObjects/structureModification.py +++ b/RFEM/SpecialObjects/structureModification.py @@ -4,7 +4,7 @@ class StructureModification(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Structure Modification clientObject = Model.clientModel.factory.create('ns0:structure_modification') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Structure Modification to client model Model.clientModel.service.set_structure_modification(clientObject) diff --git a/RFEM/SpecialObjects/surfaceContact.py b/RFEM/SpecialObjects/surfaceContact.py index 33ef394f..43d7fb82 100644 --- a/RFEM/SpecialObjects/surfaceContact.py +++ b/RFEM/SpecialObjects/surfaceContact.py @@ -4,7 +4,7 @@ class SurfaceContact(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Surfaces Contact clientObject = Model.clientModel.factory.create('ns0:surfaces_contact') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surfaces Contact to client model Model.clientModel.service.set_surfaces_contact(clientObject) diff --git a/RFEM/SpecialObjects/surfaceResultAdjustment.py b/RFEM/SpecialObjects/surfaceResultAdjustment.py index bc486ee8..4e1d2e17 100644 --- a/RFEM/SpecialObjects/surfaceResultAdjustment.py +++ b/RFEM/SpecialObjects/surfaceResultAdjustment.py @@ -4,7 +4,7 @@ class SurfaceResultsAdjustment(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Surface Result Adjustment clientObject = Model.clientModel.factory.create('ns0:surface_results_adjustment') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Result Adjustmentto client model Model.clientModel.service.set_surface_results_adjustment(clientObject) diff --git a/RFEM/TypesForLines/lineHinge.py b/RFEM/TypesForLines/lineHinge.py index dfa445c7..ea3149fb 100644 --- a/RFEM/TypesForLines/lineHinge.py +++ b/RFEM/TypesForLines/lineHinge.py @@ -14,7 +14,7 @@ def __init__(self, translational_release: list = [800, inf, inf], rotational_release_phi: int = inf, comment: str = '', - params: dict = {}): + params: dict = None): """ assigned_to doesn't work. Can't figure why. @@ -46,8 +46,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line Hinge to client model Model.clientModel.service.set_line_hinge(clientObject) diff --git a/RFEM/TypesForLines/lineMeshRefinements.py b/RFEM/TypesForLines/lineMeshRefinements.py index f22afae1..ea8305f7 100644 --- a/RFEM/TypesForLines/lineMeshRefinements.py +++ b/RFEM/TypesForLines/lineMeshRefinements.py @@ -11,7 +11,7 @@ def __init__(self, type = LineMeshRefinementsType.TYPE_LENGTH, number_of_layers: int = 2, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Line Mesh Refinement clientObject = Model.clientModel.factory.create('ns0:line_mesh_refinement') @@ -35,8 +35,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line Mesh Refinement to client model Model.clientModel.service.set_line_mesh_refinement(clientObject) @@ -48,7 +49,7 @@ def TargetFELength( target_length: float = 0.1, number_of_layers: int = 2, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Line Mesh Refinement clientObject = Model.clientModel.factory.create('ns0:line_mesh_refinement') @@ -75,8 +76,9 @@ def TargetFELength( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line Mesh Refinement to client model Model.clientModel.service.set_line_mesh_refinement(clientObject) @@ -88,7 +90,7 @@ def NumberFiniteElements( elements_finite_elements: int = 10, number_of_layers: int = 2, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Line Mesh Refinement clientObject = Model.clientModel.factory.create('ns0:line_mesh_refinement') @@ -115,8 +117,9 @@ def NumberFiniteElements( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line Mesh Refinement to client model Model.clientModel.service.set_line_mesh_refinement(clientObject) @@ -128,7 +131,7 @@ def Gradually( gradual_rows: int = 10, number_of_layers: int = 2, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Line Mesh Refinement clientObject = Model.clientModel.factory.create('ns0:line_mesh_refinement') @@ -155,8 +158,9 @@ def Gradually( clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line Mesh Refinement to client model Model.clientModel.service.set_line_mesh_refinement(clientObject) diff --git a/RFEM/TypesForLines/lineSupport.py b/RFEM/TypesForLines/lineSupport.py index 504824c6..598e3eb7 100644 --- a/RFEM/TypesForLines/lineSupport.py +++ b/RFEM/TypesForLines/lineSupport.py @@ -38,7 +38,7 @@ def __init__(self, lines_no: str = '1 2', support_type = LineSupportType.HINGED, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Line Support clientObject = Model.clientModel.factory.create('ns0:line_support') @@ -85,8 +85,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line Support to client model Model.clientModel.service.set_line_support(clientObject) diff --git a/RFEM/TypesForLines/lineWeldedJoint.py b/RFEM/TypesForLines/lineWeldedJoint.py index 792ae196..0c6af073 100644 --- a/RFEM/TypesForLines/lineWeldedJoint.py +++ b/RFEM/TypesForLines/lineWeldedJoint.py @@ -11,7 +11,7 @@ def __init__(self, weld_size_a1: int = 0.005, longitudinal_arrangement = WeldLongitudalArrangement.CONTINUOUS, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Line Welded Joint clientObject = Model.clientModel.factory.create('ns0:line_welded_joint') @@ -38,8 +38,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line welded joint to client model Model.clientModel.service.set_line_welded_joint(clientObject) diff --git a/RFEM/TypesForMembers/memberDefinableStiffness.py b/RFEM/TypesForMembers/memberDefinableStiffness.py index 6f9d8fea..f158002a 100644 --- a/RFEM/TypesForMembers/memberDefinableStiffness.py +++ b/RFEM/TypesForMembers/memberDefinableStiffness.py @@ -4,7 +4,7 @@ class MemberDefinableStiffness(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Member Definable Stffness clientObject = Model.clientModel.factory.create('ns0:member_definable_stiffness') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member Definable Stffness to client model Model.clientModel.service.set_member_definable_stiffness(clientObject) diff --git a/RFEM/TypesForMembers/memberEccentricity.py b/RFEM/TypesForMembers/memberEccentricity.py index 235d1bb5..8ac28672 100644 --- a/RFEM/TypesForMembers/memberEccentricity.py +++ b/RFEM/TypesForMembers/memberEccentricity.py @@ -4,7 +4,7 @@ class MemberEccentricity(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Member Eccentricity clientObject = Model.clientModel.factory.create('ns0:member_eccentricity') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member Eccentricity to client model Model.clientModel.service.set_member_eccentricity(clientObject) diff --git a/RFEM/TypesForMembers/memberHinge.py b/RFEM/TypesForMembers/memberHinge.py index 34ff3e90..9629a5cb 100644 --- a/RFEM/TypesForMembers/memberHinge.py +++ b/RFEM/TypesForMembers/memberHinge.py @@ -12,7 +12,7 @@ def __init__(self, rotational_release_my: float = 0.0, rotational_release_mz: float = inf, comment: str = 'Rotational Release My', - params: dict = {}): + params: dict = None): # Client model | Member Hinge clientObject = Model.clientModel.factory.create('ns0:member_hinge') @@ -48,8 +48,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Line to client model Model.clientModel.service.set_member_hinge(clientObject) diff --git a/RFEM/TypesForMembers/memberNonlinearity.py b/RFEM/TypesForMembers/memberNonlinearity.py index 43065248..a1912dd7 100644 --- a/RFEM/TypesForMembers/memberNonlinearity.py +++ b/RFEM/TypesForMembers/memberNonlinearity.py @@ -4,7 +4,7 @@ class MemberNonlinearity(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Member Nonlinearity clientObject = Model.clientModel.factory.create('ns0:member_nonlinearity') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member Nonlinearity to client model Model.clientModel.service.set_member_nonlinearity(clientObject) diff --git a/RFEM/TypesForMembers/memberResultIntermediatePoints.py b/RFEM/TypesForMembers/memberResultIntermediatePoints.py index 5e9c3159..3d64b1cd 100644 --- a/RFEM/TypesForMembers/memberResultIntermediatePoints.py +++ b/RFEM/TypesForMembers/memberResultIntermediatePoints.py @@ -4,7 +4,7 @@ class MemberResultIntermediatePoint(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Member Result Intermediate Point clientObject = Model.clientModel.factory.create('ns0:member_result_intermediate_point') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member Result Intermediate Point to client model Model.clientModel.service.set_member_result_intermediate_point(clientObject) diff --git a/RFEM/TypesForMembers/memberStiffnessModification.py b/RFEM/TypesForMembers/memberStiffnessModification.py index e4e8f7c9..160d29f2 100644 --- a/RFEM/TypesForMembers/memberStiffnessModification.py +++ b/RFEM/TypesForMembers/memberStiffnessModification.py @@ -4,7 +4,7 @@ class MemberStiffnessModification(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Member Stiffness Modification clientObject = Model.clientModel.factory.create('ns0:smember_stiffness_modification') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member Stiffness Modification to client model Model.clientModel.service.set_member_stiffness_modification(clientObject) diff --git a/RFEM/TypesForMembers/memberSupport.py b/RFEM/TypesForMembers/memberSupport.py index b05af708..ce85c74b 100644 --- a/RFEM/TypesForMembers/memberSupport.py +++ b/RFEM/TypesForMembers/memberSupport.py @@ -4,7 +4,7 @@ class MemberSupport(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Member Support clientObject = Model.clientModel.factory.create('ns0:member_support') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Member Support to client model Model.clientModel.service.set_member_support(clientObject) diff --git a/RFEM/TypesForNodes/nodalMeshRefinement.py b/RFEM/TypesForNodes/nodalMeshRefinement.py index 544fd8c8..e504bb9e 100644 --- a/RFEM/TypesForNodes/nodalMeshRefinement.py +++ b/RFEM/TypesForNodes/nodalMeshRefinement.py @@ -4,7 +4,7 @@ class NodalMeshRefinement(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Nodal Mesh Refinement clientObject = Model.clientModel.factory.create('ns0:nodal_mesh_refinement') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Nodal Mesh Refinement to client model Model.clientModel.service.set_nodal_mesh_refinement(clientObject) diff --git a/RFEM/TypesForNodes/nodalSupport.py b/RFEM/TypesForNodes/nodalSupport.py index aeab27f8..1b285a73 100644 --- a/RFEM/TypesForNodes/nodalSupport.py +++ b/RFEM/TypesForNodes/nodalSupport.py @@ -38,7 +38,7 @@ def __init__(self, nodes_no: str = '1 2', support_type = NodalSupportType.HINGED, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Nodal Support clientObject = Model.clientModel.factory.create('ns0:nodal_support') @@ -85,8 +85,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Nodal Support to client model Model.clientModel.service.set_nodal_support(clientObject) diff --git a/RFEM/TypesForSolids/solidContact.py b/RFEM/TypesForSolids/solidContact.py index c2fef676..92aed1d8 100644 --- a/RFEM/TypesForSolids/solidContact.py +++ b/RFEM/TypesForSolids/solidContact.py @@ -4,7 +4,7 @@ class SolidContact(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Solid Contact clientObject = Model.clientModel.factory.create('ns0:solid_contacts') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Solid Contact to client model Model.clientModel.service.set_solid_contacts(clientObject) diff --git a/RFEM/TypesForSolids/solidGas.py b/RFEM/TypesForSolids/solidGas.py index 54d7e6bc..317c7f80 100644 --- a/RFEM/TypesForSolids/solidGas.py +++ b/RFEM/TypesForSolids/solidGas.py @@ -4,7 +4,7 @@ class SolidGas(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Solid Gas clientObject = Model.clientModel.factory.create('ns0:solid_gas') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Solid Gas to client model Model.clientModel.service.set_solid_gas(clientObject) diff --git a/RFEM/TypesForSolids/solidMeshRefinement.py b/RFEM/TypesForSolids/solidMeshRefinement.py index 80ec791e..ac85ce00 100644 --- a/RFEM/TypesForSolids/solidMeshRefinement.py +++ b/RFEM/TypesForSolids/solidMeshRefinement.py @@ -4,7 +4,7 @@ class SolidMeshRefinement(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Solid Mesh Refinement clientObject = Model.clientModel.factory.create('ns0:solid_mesh_refinement') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Solid Mesh Refinement to client model Model.clientModel.service.set_solid_mesh_refinement(clientObject) diff --git a/RFEM/TypesForSpecialObjects/surfaceContactType.py b/RFEM/TypesForSpecialObjects/surfaceContactType.py index ad118929..ffcc74ef 100644 --- a/RFEM/TypesForSpecialObjects/surfaceContactType.py +++ b/RFEM/TypesForSpecialObjects/surfaceContactType.py @@ -4,7 +4,7 @@ class SurfaceContactType(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Surface Contact Type clientObject = Model.clientModel.factory.create('ns0:surfaces_contact_type') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Contact Type to client model Model.clientModel.service.set_surfaces_contact_type(clientObject) diff --git a/RFEM/TypesForSteelDesign/steelEffectiveLengths.py b/RFEM/TypesForSteelDesign/steelEffectiveLengths.py index 68e2c98c..ec588f8c 100644 --- a/RFEM/TypesForSteelDesign/steelEffectiveLengths.py +++ b/RFEM/TypesForSteelDesign/steelEffectiveLengths.py @@ -30,7 +30,7 @@ def __init__(self, import_from_stability_analysis_enabled: bool = False, determination_of_mcr = SteelEffectiveLengthsDeterminationMcrEurope.DETERMINATION_EUROPE_EIGENVALUE, comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Effective Length Tag @@ -189,8 +189,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Steel Effective Lengths to client model Model.clientModel.service.set_steel_effective_lengths(clientObject) diff --git a/RFEM/TypesForSurfaces/surfaceEccentricity.py b/RFEM/TypesForSurfaces/surfaceEccentricity.py index 9f7b68dc..e564b056 100644 --- a/RFEM/TypesForSurfaces/surfaceEccentricity.py +++ b/RFEM/TypesForSurfaces/surfaceEccentricity.py @@ -4,7 +4,7 @@ class SurfaceEccentricity(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Surface Eccentricity clientObject = Model.clientModel.factory.create('ns0:surface_eccentricity') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Eccentricity to client model Model.clientModel.service.set_surface_eccentricity(clientObject) diff --git a/RFEM/TypesForSurfaces/surfaceMeshRefinements.py b/RFEM/TypesForSurfaces/surfaceMeshRefinements.py index d1576d5a..c1d460f6 100644 --- a/RFEM/TypesForSurfaces/surfaceMeshRefinements.py +++ b/RFEM/TypesForSurfaces/surfaceMeshRefinements.py @@ -4,7 +4,7 @@ class SurfaceMeshRefinement(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Surface Mesh Refinement clientObject = Model.clientModel.factory.create('ns0:surface_mesh_refinement') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Mesh Refinement to client model Model.clientModel.service.set_surface_mesh_refinement(clientObject) diff --git a/RFEM/TypesForSurfaces/surfaceStiffnessModification.py b/RFEM/TypesForSurfaces/surfaceStiffnessModification.py index fd23d871..199a7b4d 100644 --- a/RFEM/TypesForSurfaces/surfaceStiffnessModification.py +++ b/RFEM/TypesForSurfaces/surfaceStiffnessModification.py @@ -4,7 +4,7 @@ class SurfaceStiffnessModification(): def __init__(self, no: int = 1, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Surface Stifness Modification clientObject = Model.clientModel.factory.create('ns0:surface_stiffness_modification') @@ -19,8 +19,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Stifness Modification to client model Model.clientModel.service.set_surface_stiffness_modification(clientObject) diff --git a/RFEM/TypesForSurfaces/surfaceSupport.py b/RFEM/TypesForSurfaces/surfaceSupport.py index d0ac308b..ab090d64 100644 --- a/RFEM/TypesForSurfaces/surfaceSupport.py +++ b/RFEM/TypesForSurfaces/surfaceSupport.py @@ -10,7 +10,7 @@ def __init__(self, c_2_x: float = 0.0, c_2_y: float = 0.0, comment: str = '', - params: dict = {}): + params: dict = None): # Client model | Surface Support clientObject = Model.clientModel.factory.create('ns0:surface_support') @@ -35,8 +35,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Surface Support to client model Model.clientModel.service.set_surface_support(clientObject) diff --git a/RFEM/TypesforConcreteDesign/ConcreteDurability.py b/RFEM/TypesforConcreteDesign/ConcreteDurability.py index 9b6037d5..63a3dec8 100644 --- a/RFEM/TypesforConcreteDesign/ConcreteDurability.py +++ b/RFEM/TypesforConcreteDesign/ConcreteDurability.py @@ -17,7 +17,7 @@ def __init__(self, additional_protection_reduction = [False], allowance_deviation = [DurabilityAllowanceDeviationType.STANDARD, False], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Concrete Durability Tag @@ -34,7 +34,7 @@ def __init__(self, additional_protection_reduction (list): Additional Protection Reduction allowance_deviation (list): Allowance Deviation Parameters comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Concrete Durabilities @@ -158,8 +158,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Global Parameter to client model Model.clientModel.service.set_concrete_durability(clientObject) diff --git a/RFEM/TypesforConcreteDesign/ConcreteEffectiveLength.py b/RFEM/TypesforConcreteDesign/ConcreteEffectiveLength.py index 70402855..6da38398 100644 --- a/RFEM/TypesforConcreteDesign/ConcreteEffectiveLength.py +++ b/RFEM/TypesforConcreteDesign/ConcreteEffectiveLength.py @@ -19,7 +19,7 @@ def __init__(self, RestraintTypeAboutZ.SUPPORT_STATUS_NO, RestraintTypeWarping.SUPPORT_STATUS_NO, "2"]], factors = [[1, 1]], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Effective Length Tag @@ -31,7 +31,7 @@ def __init__(self, nodal_supports (list): Nodal Support Table factors (list): Factors Table comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary nodal_supports = [[support_type, support_in_z, support_spring_in_y, eccentricity_type, eccentricity_ez, restraint_spring_about_x, @@ -109,8 +109,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Global Parameter to client model Model.clientModel.service.set_concrete_effective_lengths(clientObject) diff --git a/RFEM/TypesforConcreteDesign/ConcreteReinforcementDirections.py b/RFEM/TypesforConcreteDesign/ConcreteReinforcementDirections.py index ee59d1eb..8f0ad088 100644 --- a/RFEM/TypesforConcreteDesign/ConcreteReinforcementDirections.py +++ b/RFEM/TypesforConcreteDesign/ConcreteReinforcementDirections.py @@ -10,7 +10,7 @@ def __init__(self, reinforcement_direction_type = ReinforcementDirectionType.REINFORCEMENT_DIRECTION_TYPE_FIRST_REINFORCEMENT_IN_X, rotation_parameters = [], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Reinforcement Direction Tag @@ -19,7 +19,7 @@ def __init__(self, reinforcement_direction_type (enum): Reinforcement Direction Enumeration rotation_parameters (list): Rotation Parameters comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary """ # Client model | Concrete Durabilities @@ -49,8 +49,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Global Parameter to client model Model.clientModel.service.set_reinforcement_direction(clientObject) diff --git a/RFEM/TypesforConcreteDesign/ConcreteSurfaceReinforcements.py b/RFEM/TypesforConcreteDesign/ConcreteSurfaceReinforcements.py index 626f7eed..880b50a4 100644 --- a/RFEM/TypesforConcreteDesign/ConcreteSurfaceReinforcements.py +++ b/RFEM/TypesforConcreteDesign/ConcreteSurfaceReinforcements.py @@ -17,7 +17,7 @@ def __init__(self, reinforcement_location = [], reinforcement_acting_region = [], comment: str = '', - params: dict = {}): + params: dict = None): """ Args: no (int): Surface Reinforcement Tag @@ -33,7 +33,7 @@ def __init__(self, reinforcement_location (list): Reinforcement Location Parameters reinforcement_acting_region (list): Reinforcement Acting Region Parameters comment (str, optional): Comments - params (dict, optional): Parameters + params (dict, optional): Any WS Parameter relevant to the object and its value in form of a dictionary for reinforcement_type = SurfaceReinforcementType.REINFORCEMENT_TYPE_REBARS: reinforcement_type_parameters = [rebar_diameter, rebar_spacing, additional_transverse_reinforcement_enabled] @@ -165,8 +165,9 @@ def __init__(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Global Parameter to client model Model.clientModel.service.set_surface_reinforcement(clientObject) diff --git a/RFEM/enums.py b/RFEM/enums.py index 25fa3f98..cb7cf389 100644 --- a/RFEM/enums.py +++ b/RFEM/enums.py @@ -352,19 +352,6 @@ class SurfaceLoadAxisDefinitionType(Enum): ''' AXIS_DEFINITION_POINT_AND_AXIS, AXIS_DEFINITION_TWO_POINTS = range(2) -class SurfaceLoadDirection(Enum): - ''' - Surface Load Load Direction - ''' - LOAD_DIRECTION_GLOBAL_X_OR_USER_DEFINED_U_PROJECTED, LOAD_DIRECTION_GLOBAL_X_OR_USER_DEFINED_U_TRUE, LOAD_DIRECTION_GLOBAL_Y_OR_USER_DEFINED_V_PROJECTED, LOAD_DIRECTION_GLOBAL_Y_OR_USER_DEFINED_V_TRUE,\ - LOAD_DIRECTION_GLOBAL_Z_OR_USER_DEFINED_W_PROJECTED, LOAD_DIRECTION_GLOBAL_Z_OR_USER_DEFINED_W_TRUE, LOAD_DIRECTION_LOCAL_X, LOAD_DIRECTION_LOCAL_Y, LOAD_DIRECTION_LOCAL_Z = range(9) - -class SurfaceLoadType(Enum): - ''' - Surface Load Type - ''' - LOAD_TYPE_AXIAL_STRAIN, LOAD_TYPE_FORCE, LOAD_TYPE_FORM_FINDING, LOAD_TYPE_MASS, LOAD_TYPE_PRECAMBER, LOAD_TYPE_ROTARY_MOTION, LOAD_TYPE_TEMPERATURE = range(7) - class NodeType(Enum): ''' Node Type | Enum diff --git a/RFEM/globalParameter.py b/RFEM/globalParameter.py index 6a12f26c..98ec3762 100644 --- a/RFEM/globalParameter.py +++ b/RFEM/globalParameter.py @@ -1,17 +1,18 @@ -from RFEM.initModel import Model, clearAtributes -from RFEM.enums import GlobalParameterUnitGroup, GlobalParameterDefinitionType +from RFEM.initModel import Model, clearAtributes, SetAddonStatus +from RFEM.enums import GlobalParameterUnitGroup, GlobalParameterDefinitionType, AddOn class GlobalParameter(): - def AddParameter(self, + @staticmethod + def AddParameter( no: int = 1, name: str = '', symbol: str = '', unit_group = GlobalParameterUnitGroup.LENGTH, definition_type = GlobalParameterDefinitionType.DEFINITION_TYPE_VALUE, - definition_parameter = [], + definition_parameter: list = None, comment: str = '', - params: dict = {}): + params: dict = None): ''' for definition_type = GlobalParameterDefinitionType.DEFINITION_TYPE_FORMULA: definition_parameter = [formula] @@ -56,6 +57,7 @@ def AddParameter(self, clientObject.formula = definition_parameter[0] elif definition_type.name == 'DEFINITION_TYPE_OPTIMIZATION' or definition_type.name == 'DEFINITION_TYPE_OPTIMIZATION_ASCENDING' or definition_type.name == 'DEFINITION_TYPE_OPTIMIZATION_DESCENDING': + SetAddonStatus(Model.clientModel, AddOn.cost_estimation_active) if len(definition_parameter) != 4: raise Exception('WARNING: The definition parameter needs to be of length 4. Kindly check list inputs for completeness and correctness.') clientObject.value = definition_parameter[0] @@ -72,8 +74,9 @@ def AddParameter(self, clientObject.comment = comment # Adding optional parameters via dictionary - for key in params: - clientObject[key] = params[key] + if params: + for key in params: + clientObject[key] = params[key] # Add Global Parameter to client model Model.clientModel.service.set_global_parameter(clientObject) diff --git a/UnitTests/test_DesignSituations.py b/UnitTests/test_DesignSituations.py index 88d0691e..ed452614 100644 --- a/UnitTests/test_DesignSituations.py +++ b/UnitTests/test_DesignSituations.py @@ -8,8 +8,6 @@ ) sys.path.append(PROJECT_ROOT) -# Import der Bibliotheken -from RFEM.enums import * from RFEM.initModel import Model from RFEM.LoadCasesAndCombinations.staticAnalysisSettings import StaticAnalysisSettings from RFEM.LoadCasesAndCombinations.designSituation import DesignSituation diff --git a/UnitTests/test_GlobalParameters_Test.py b/UnitTests/test_GlobalParameters_Test.py index 2b1b2561..3de2d104 100644 --- a/UnitTests/test_GlobalParameters_Test.py +++ b/UnitTests/test_GlobalParameters_Test.py @@ -9,7 +9,6 @@ ) sys.path.append(PROJECT_ROOT) -# Importing the relevant libraries from RFEM.enums import GlobalParameterUnitGroup, GlobalParameterDefinitionType from RFEM.globalParameter import GlobalParameter from RFEM.initModel import Model @@ -22,7 +21,7 @@ def test_global_parameters(): Model.clientModel.service.delete_all() Model.clientModel.service.begin_modification() - GlobalParameter.AddParameter(GlobalParameter, + GlobalParameter.AddParameter( no= 1, name= 'Test_1', symbol= 'Test_1', @@ -30,35 +29,34 @@ def test_global_parameters(): definition_type= GlobalParameterDefinitionType.DEFINITION_TYPE_FORMULA, definition_parameter= ['1+1'], comment= 'Comment_1') - # TODO: issue with optimization type - # GlobalParameter.AddParameter(GlobalParameter, - # no= 2, - # name= 'Test_2', - # symbol= 'Test_2', - # unit_group= GlobalParameterUnitGroup.LOADS_DENSITY, - # definition_type= GlobalParameterDefinitionType.DEFINITION_TYPE_OPTIMIZATION, - # definition_parameter= [50, 0, 100, 4], - # comment= 'Comment_2') + GlobalParameter.AddParameter( + no= 2, + name= 'Test_2', + symbol= 'Test_2', + unit_group= GlobalParameterUnitGroup.LOADS_DENSITY, + definition_type= GlobalParameterDefinitionType.DEFINITION_TYPE_OPTIMIZATION, + definition_parameter= [50, 0, 100, 4], + comment= 'Comment_2') - # GlobalParameter.AddParameter(GlobalParameter, - # no= 3, - # name= 'Test_3', - # symbol= 'Test_3', - # unit_group= GlobalParameterUnitGroup.AREA, - # definition_type= GlobalParameterDefinitionType.DEFINITION_TYPE_OPTIMIZATION_ASCENDING, - # definition_parameter= [50, 0, 100, 4], - # comment= 'Comment_3') + GlobalParameter.AddParameter( + no= 3, + name= 'Test_3', + symbol= 'Test_3', + unit_group= GlobalParameterUnitGroup.AREA, + definition_type= GlobalParameterDefinitionType.DEFINITION_TYPE_OPTIMIZATION_ASCENDING, + definition_parameter= [50, 0, 100, 4], + comment= 'Comment_3') - # GlobalParameter.AddParameter(GlobalParameter, - # no= 4, - # name= 'Test_4', - # symbol= 'Test_4', - # unit_group= GlobalParameterUnitGroup.MATERIAL_QUANTITY_INTEGER, - # definition_type= GlobalParameterDefinitionType.DEFINITION_TYPE_OPTIMIZATION_ASCENDING, - # definition_parameter= [50, 0, 100, 4], - # comment= 'Comment_4') + GlobalParameter.AddParameter( + no= 4, + name= 'Test_4', + symbol= 'Test_4', + unit_group= GlobalParameterUnitGroup.MATERIAL_QUANTITY_INTEGER, + definition_type= GlobalParameterDefinitionType.DEFINITION_TYPE_OPTIMIZATION_ASCENDING, + definition_parameter= [50, 0, 100, 4], + comment= 'Comment_4') - GlobalParameter.AddParameter(GlobalParameter, + GlobalParameter.AddParameter( no= 5, name= 'Test_5', symbol= 'Test_5', diff --git a/UnitTests/test_LineLoads_Test.py b/UnitTests/test_LineLoads_Test.py index 8ef1cac9..ae93688f 100644 --- a/UnitTests/test_LineLoads_Test.py +++ b/UnitTests/test_LineLoads_Test.py @@ -9,7 +9,7 @@ ) sys.path.append(PROJECT_ROOT) -# Import der Bibliotheken +import pytest from RFEM.Loads.lineLoad import LineLoad from RFEM.enums import LineLoadDistribution from RFEM.initModel import Model @@ -85,19 +85,17 @@ def test_line_loads(): load_distribution= LineLoadDistribution.LOAD_DISTRIBUTION_CONCENTRATED_VARYING, load_parameter=[[0.2, 0.1, 200], [0.5, 0.2, 200]]) - # TODO. THESE OFFSET PARAMETERS AREN'T WORKING. THE ERROR IS APPARENTLY A BUG IN BACK-END AND HAS BEEN REPORTED. NOT SURE HOW TO PROCEED (?) - # LineLoad.Force(LineLoad, 7, 2, '7', - # load_distribution= LineLoadDistribution.LOAD_DISTRIBUTION_TRAPEZOIDAL, - # load_parameter=[True, True, 2000, 2000, 0.2, 0.5]) + LineLoad.Force(7, 2, '7', + load_distribution= LineLoadDistribution.LOAD_DISTRIBUTION_TRAPEZOIDAL, + load_parameter=[True, True, 2000, 2000, 0.2, 0.5]) LineLoad.Force(8, 2, '8', load_distribution= LineLoadDistribution.LOAD_DISTRIBUTION_PARABOLIC, load_parameter=[750, 1000, 2500]) - # TODO. THESE OFFSET PARAMETERS AREN'T WORKING. THE ERROR IS APPARENTLY A BUG IN BACK-END AND HAS BEEN REPORTED. NOT SURE HOW TO PROCEED (?) - # LineLoad.Force(LineLoad, 9, 2, '9', - # load_distribution= LineLoadDistribution.LOAD_DISTRIBUTION_VARYING, - # load_parameter=[[1000, 500, 750], [250, 200, 600]]) + LineLoad.Force(9, 2, '9', + load_distribution= LineLoadDistribution.LOAD_DISTRIBUTION_VARYING, + load_parameter=[[1, 1, 75000], [2, 1, 60000]]) # Testing Moment Type Line Loads @@ -127,24 +125,21 @@ def test_line_loads(): load_distribution= LineLoadDistribution.LOAD_DISTRIBUTION_CONCENTRATED_VARYING, load_parameter=[[0.2, 0.1, 200], [0.5, 0.2, 200]]) - # TODO. THESE OFFSET PARAMETERS AREN'T WORKING. THE ERROR IS APPARENTLY A BUG IN BACK-END AND HAS BEEN REPORTED. NOT SURE HOW TO PROCEED (?) - # LineLoad.Moment(LineLoad, 7, 3, '7', - # load_distribution= LineLoadDistribution.LOAD_DISTRIBUTION_TRAPEZOIDAL, - # load_parameter=[True, True, 2000, 2000, 0.2, 0.5]) + LineLoad.Moment(7, 3, '7', + load_distribution= LineLoadDistribution.LOAD_DISTRIBUTION_TRAPEZOIDAL, + load_parameter=[True, True, 2000, 2000, 0.2, 0.5]) - # TODO. THESE OFFSET PARAMETERS AREN'T WORKING. THE ERROR IS APPARENTLY A BUG IN BACK-END AND HAS BEEN REPORTED. NOT SURE HOW TO PROCEED (?) - # LineLoad.Moment(LineLoad, 8, 3, '8', - # load_distribution= LineLoadDistribution.LOAD_DISTRIBUTION_TAPERED, - # load_parameter=[True, True, 2000, 2000, 0.2, 0.5]) + LineLoad.Moment(8, 3, '8', + load_distribution= LineLoadDistribution.LOAD_DISTRIBUTION_TAPERED, + load_parameter=[True, True, 2000, 2000, 0.2, 0.5]) LineLoad.Moment(9, 3, '9', load_distribution= LineLoadDistribution.LOAD_DISTRIBUTION_PARABOLIC, load_parameter=[750, 1000, 2500]) - # TODO. THESE OFFSET PARAMETERS AREN'T WORKING. THE ERROR IS APPARENTLY A BUG IN BACK-END AND HAS BEEN REPORTED. NOT SURE HOW TO PROCEED (?) - # LineLoad.Moment(LineLoad, 10, 3, '10', - # load_distribution= LineLoadDistribution.LOAD_DISTRIBUTION_VARYING, - # load_parameter=[[1000, 500, 750], [250, 200, 600]]) + LineLoad.Moment(10, 3, '10', + load_distribution= LineLoadDistribution.LOAD_DISTRIBUTION_VARYING, + load_parameter=[[1, 1, 75000], [2, 1, 60000]]) # Testing Mass Type Line Loads diff --git a/UnitTests/test_LoadCases_Test.py b/UnitTests/test_LoadCases_Test.py index f3850670..558c6035 100644 --- a/UnitTests/test_LoadCases_Test.py +++ b/UnitTests/test_LoadCases_Test.py @@ -6,9 +6,7 @@ ) sys.path.append(PROJECT_ROOT) -# Import der Bibliotheken import pytest -from RFEM.enums import * from RFEM.initModel import Model from RFEM.LoadCasesAndCombinations.staticAnalysisSettings import StaticAnalysisSettings from RFEM.LoadCasesAndCombinations.loadCase import LoadCase, DIN_Action_Category diff --git a/UnitTests/test_Thickness_Test.py b/UnitTests/test_Thickness_Test.py index ff8c2ae4..4e4e2b47 100644 --- a/UnitTests/test_Thickness_Test.py +++ b/UnitTests/test_Thickness_Test.py @@ -6,7 +6,6 @@ ) sys.path.append(PROJECT_ROOT) -# Import der Bibliotheken from RFEM.enums import ThicknessDirection, ThicknessOrthotropyType from RFEM.enums import ThicknessShapeOrthotropySelfWeightDefinitionType, ThicknessStiffnessMatrixSelfWeightDefinitionType from RFEM.initModel import Model @@ -73,14 +72,12 @@ def test_thickness(): comment= 'Comment') # Layers - """ skipped Thickness.Layers( no= 7, name= 'Layers', layers= [[1, 1, 0.123, 0, 'Schicht 1'], - [0, 1, 0.456, 90, 'Schicht 2']], + [0, 1, 0.456, 90, 'Schicht 2']], comment= 'Comment') - """ # Shape Orthotropy Thickness.ShapeOrthotropy( diff --git a/UnitTests/test_modalAnalysis_test.py b/UnitTests/test_modalAnalysis_test.py index 38ff51d2..18533c76 100644 --- a/UnitTests/test_modalAnalysis_test.py +++ b/UnitTests/test_modalAnalysis_test.py @@ -22,8 +22,6 @@ if Model.clientModel is None: Model() -# TODO: US-7698 -@pytest.mark.skipif(CheckIfMethodOrTypeExists(Model.clientModel,'set_modal_analysis_settings', True), reason="set_modal_analysis_settings not in RFEM yet") def test_modal_analysis_settings(): Model.clientModel.service.delete_all() @@ -53,7 +51,7 @@ def test_modal_analysis_settings(): ModalMassMatrixType.MASS_MATRIX_TYPE_DIAGONAL, 2, [False, False, False, False, True, True]) # Load Case Static - # LoadCase(1, 'DEAD', [True, 0, 0, 1]) + LoadCase(1, 'DEAD', [True, 0, 0, 1]) modalParams = { "analysis_type": AnalysisType.ANALYSIS_TYPE_MODAL.name, "modal_analysis_settings":1, diff --git a/UnitTests/test_stabilitysettings.py b/UnitTests/test_stabilitysettings.py index 5b3ea492..762bedef 100644 --- a/UnitTests/test_stabilitysettings.py +++ b/UnitTests/test_stabilitysettings.py @@ -13,8 +13,6 @@ if Model.clientModel is None: Model() -# TODO: US-7699 -pytestmark = pytest.mark.skipif(CheckIfMethodOrTypeExists(Model.clientModel,'get_stability_analysis_settings', True), reason="Type get_stability_analysis_settings not in RFEM yet") def test_stability_analysis_settings_init(): Model.clientModel.service.delete_all() diff --git a/UnitTests/test_staticAnalysisSetting.py b/UnitTests/test_staticAnalysisSetting.py index 92ef35d1..9b01db6e 100644 --- a/UnitTests/test_staticAnalysisSetting.py +++ b/UnitTests/test_staticAnalysisSetting.py @@ -30,12 +30,12 @@ def test_StaticAnalysisSettings(): linear = Model.clientModel.service.get_static_analysis_settings(2) assert linear['modify_loading_by_multiplier_factor'] == True - # TODO: these assigments are not working - # assert linear['loading_multiplier_factor'] == 1.5 - # assert linear['divide_results_by_loading_factor'] == True + # TODO: bug 26685 + #assert linear['loading_multiplier_factor'] == 1.5 + #assert linear['divide_results_by_loading_factor'] == True largeDef= Model.clientModel.service.get_static_analysis_settings(3) assert largeDef['standard_precision_and_tolerance_settings_enabled'] == True - # TODO: these assigments are not working + # TODO: bug 26685 # assert largeDef['precision_of_convergence_criteria_for_nonlinear_calculation'] == 0.02 # assert largeDef['instability_detection_tolerance'] == 0.02 # assert largeDef['iterative_calculation_robustness'] == 2.0 diff --git a/UnitTests/test_steelEffectiveLengths.py b/UnitTests/test_steelEffectiveLengths.py index 62084c32..7716f1f9 100644 --- a/UnitTests/test_steelEffectiveLengths.py +++ b/UnitTests/test_steelEffectiveLengths.py @@ -7,7 +7,6 @@ ) sys.path.append(PROJECT_ROOT) -# Import der Bibliotheken from RFEM.enums import * from RFEM.initModel import Model, SetAddonStatus, CheckIfMethodOrTypeExists from RFEM.TypesForSteelDesign.steelEffectiveLengths import SteelEffectiveLengths diff --git a/UnitTests/test_zCalculate.py b/UnitTests/test_zCalculate.py index 93cafe73..ef7711a2 100644 --- a/UnitTests/test_zCalculate.py +++ b/UnitTests/test_zCalculate.py @@ -22,9 +22,9 @@ def test_mesh_settings(): common['members_number_of_divisions_for_special_types'] = 12 common['surfaces_shape_of_finite_elements'] = SurfacesShapeOfFiniteElements.E_SHAPE_OF_FINITE_ELEMENTS_FOR_SURFACES__TRIANGLES_ONLY.name surf = MeshSettings.SurfacesMeshQualityConfig - surf['QualityCriteriaConfig']['quality_criterion_check_aspect_ratio_warning'] = 22 + surf['QualityCriteriaConfigForSurfaces']['quality_criterion_check_aspect_ratio_warning'] = 22 solid = dict(MeshSettings.SolidsMeshQualityConfig) - solid['QualityCriteriaConfig']['quality_criterion_parallel_deviations_warning'] = 1.7 + solid['QualityCriteriaConfigForSolids']['quality_criterion_parallel_deviations_warning'] = 1.7 wind = dict(MeshSettings.WindSimulationMeshConfig) mesh = MeshSettings(common, surf, solid, wind) @@ -33,8 +33,8 @@ def test_mesh_settings(): assert control_mesh['general_target_length_of_fe'] == 0.4321 assert control_mesh['members_number_of_divisions_for_special_types'] == 12 assert control_mesh['surfaces_shape_of_finite_elements'] == SurfacesShapeOfFiniteElements.E_SHAPE_OF_FINITE_ELEMENTS_FOR_SURFACES__TRIANGLES_ONLY.name - assert control_mesh['SurfacesMeshQualityConfig']['QualityCriteriaConfig']['quality_criterion_check_aspect_ratio_warning'] == 22 - assert control_mesh['SolidsMeshQualityConfig']['QualityCriteriaConfig']['quality_criterion_parallel_deviations_warning'] == 1.7 + assert control_mesh['SurfacesMeshQualityConfig']['QualityCriteriaConfigForSurfaces']['quality_criterion_check_aspect_ratio_warning'] == 22 + assert control_mesh['SolidsMeshQualityConfig']['QualityCriteriaConfigForSolids']['quality_criterion_parallel_deviations_warning'] == 1.7 control_mesh['general_maximum_distance_between_node_and_line'] = 0.003 mesh.set_mesh_settings(control_mesh)