dlubal-software / RFEM_Python_Client

Python client (or high-level functions) for RFEM 6 using Web Services, SOAP and WSDL
https://dlubal-software.github.io/.github/
MIT License
71 stars 28 forks source link

REQUEST: Possibility to edit timber design fire configuration #322

Closed Lulatsch39 closed 7 months ago

Lulatsch39 commented 11 months ago

Hi there, I'm looking for the possiblity to create and edit a fire configuration for timber design. With using Model.clientModel.service.set_timber_design_fr_configuration(...) I can create a configuration. Unfortunately, I can't find a way to access the important parameters marked in the screenshot below. I tried Model.clientModel.service.get_timber_design_fr_configuration(...) to get an idea of the structure of the parameters but that doesn't provide any information on the marked values either.

Thanks in advance.

OndraMichal commented 10 months ago

Hi @Lulatsch39, thank you for notifying us. Bug #163296 was created.

heetrojivadiya commented 7 months ago

Hi there, I'm looking for the possiblity to create and edit a fire configuration for timber design. With using Model.clientModel.service.set_timber_design_fr_configuration(...) I can create a configuration. Unfortunately, I can't find a way to access the important parameters marked in the screenshot below. I tried Model.clientModel.service.get_timber_design_fr_configuration(...) to get an idea of the structure of the parameters but that doesn't provide any information on the marked values either.

Thanks in advance.

Hello @Lulatsch39,

Currently, there is no direct access to fire configuration possible with Webservice. Although, you can access those parameters with the help of javascript and then there is a function in the webservice called run_script() to run that javascript. Below you can find the demo example for how to access those parameters. You may copy the function FireDesignSettings() and place it in your script to edit timber design fire configuration. Let us know if it works for you or not.

import os
baseName = os.path.basename(__file__)
dirName = os.path.dirname(__file__)
print('basename:    ', baseName)
print('dirname:     ', dirName)

from RFEM.enums import *
from RFEM.initModel import Model, SetAddonStatus
from RFEM.BasicObjects.material import Material
from RFEM.BasicObjects.member import Member
from RFEM.BasicObjects.section import Section
from RFEM.BasicObjects.node import Node

def FireDesignSettings(no: int = 1, minute = 30, top=True, left=True, right=True, bottom=True):

    with open(dirName+r"./fr_char.js", "w") as std:

        std.write("TIMBER_DESIGN.timber_design_fr_configurations[{}].settings_ec5.property_required_time_of_fire_resistance = {};".format(no, minute*60))

        if top == False:
            std.write("TIMBER_DESIGN.timber_design_fr_configurations[{}].settings_ec5.property_fire_exposure_top = false;".format(no))
        else:
            std.write("TIMBER_DESIGN.timber_design_fr_configurations[{}].settings_ec5.property_fire_exposure_top = true;".format(no))

        if left == False:
            std.write("TIMBER_DESIGN.timber_design_fr_configurations[{}].settings_ec5.property_fire_exposure_left = false;".format(no))
        else:
            std.write("TIMBER_DESIGN.timber_design_fr_configurations[{}].settings_ec5.property_fire_exposure_left = true;".format(no))

        if right == False:
            std.write("TIMBER_DESIGN.timber_design_fr_configurations[{}].settings_ec5.property_fire_exposure_right = false;".format(no))
        else:
            std.write("TIMBER_DESIGN.timber_design_fr_configurations[{}].settings_ec5.property_fire_exposure_right = true;".format(no))

        if bottom == False:
            std.write("TIMBER_DESIGN.timber_design_fr_configurations[{}].settings_ec5.property_fire_exposure_bottom = false;".format(no))
        else:
            std.write("TIMBER_DESIGN.timber_design_fr_configurations[{}].settings_ec5.property_fire_exposure_bottom = true;".format(no))

    Model.clientModel.service.run_script(dirName+r"./fr_char.js")

    os.remove(dirName+r"./fr_char.js")

Model(True, 'Timber')
SetAddonStatus(Model.clientModel, AddOn.timber_design_active)
Node(1)
Node(2, 10,0,0)
Material(1, 'GL32c')
Section(1, 'Batten 40/60')
Member(1, 1, 2)
Model.clientModel.service.set_timber_design_fr_configuration({'no': 1, 'user_defined_name_enabled': True, 'name': 'fr1'})
Model.clientModel.service.set_timber_design_fr_configuration({'no': 2, 'user_defined_name_enabled': True, 'name': 'fr2'})
FireDesignSettings(1, 11, False, True, True, False)
FireDesignSettings(2, 60, True, False, False, True)

image

Additionally, HLF for timber design fire configuration is not available at the moment. We will try to implement it as soon as possible.