I have tried with no success to set the special type of hinge ‘Scissor Hinge’ using the api-grpc in Python. I was able to create the Member Hinge but not the scissor hinge.
My code is as follow:
my_hinge = rfem.types_for_members.MemberHinge(
no=5,
coordinate_system=common.CoordinateSystemRepresentation(no=1),
axial_release_n=0,
axial_release_vy=math.inf,
axial_release_vz=math.inf,
moment_release_mt=math.inf,
moment_release_my=math.inf,
moment_release_mz=math.inf,
comment="My hinge",
special_type_of_hinge_enabled=True,
special_type_of_hinge_direction_along_x=True,
)
self.app.create_object(my_hinge)
The hinge is created but the option Scissor is not set:
Not sure if it’s a bug in the API or if I am not creating the Member Hinge correctly.
Hi Pedro,
Welcome to the community!
It looks like the active_scissor_hinge attribute you're trying to access is currently not fully supported in the API for creating a "Scissor Hinge" specifically.
The good news is that this functionality should be available soon, as we're continuously updating the API. I'll be sure to let you know as soon as it's released.
Best regards,
Tomas
1 Like
Hello Tomas,
Thank you for the answer!
Hi Pedro,
The functionality for scissor hinges is already available.
Here is an updated version of your code with the necessary attributes to enable the scissor hinge type:
from dlubal.api import rfem, common
import math
with rfem.Application() as rfem_app:
my_hinge = rfem.types_for_members.MemberHinge(
no=5,
coordinate_system=common.CoordinateSystemRepresentation(no=1),
axial_release_n=0,
axial_release_vy=math.inf,
axial_release_vz=math.inf,
moment_release_mt=math.inf,
moment_release_my=math.inf,
moment_release_mz=math.inf,
comment="My hinge",
# Enable scissor hinge functionality
scissor_type_of_hinge_enabled=True,
# Set the direction for scissor hinge (along X-axis in this case)
scissor_type_of_hinge_direction_along_x=True,
)
rfem_app.create_object(my_hinge)
Please give this a try, and it should enable the scissor hinge as expected. Let me know if you encounter any further issues!
Best regards,
1 Like