Read the y,z coordinates of stress points in cross-section

Situatoin : I use the legacy C# API to read the model data from RFEM 6.

My Need : I need to read the local y,z coordinates of the stress points inside the cross-section, as marked in the image below.

Problems:

  1. No information is found in the metadata of the public class section.
  2. No information is found in the Python export of the model.

Question: How to read the local y,z coordinates of the stress points inside the cross-section?

Hi PSA001,

:construction: Stress-Strain Analysis Results
Unfortunately the results for the Stress-Strain Analysis are not yet available.

Since this feature is part of a design add-on, we need to implement the design first before we will can take care of the results ;-)

However, I’ve added your request to our feature wishlist :memo: so it can be considered for a future update (RUS 4952).

Best regards
Robert Milrath

Hi Robert,

Thank you for your reply.

I need the coordinates of the location of the stress points for geometrical calculations,
so the stress-strain values themselves are not needed.

The hard (a.k.a. fun) way is of course to read the profile name and build own geometry coordinate database from scratch, but that is weeks of work.

Is there another way to access the location of the stress points? or get the geometry
of the outerline of the cross-section?

Hi PSA001,

Currently, RFEM seems to not provide a direct way to access the local Y, Z coordinates of stress points inside the cross-section via the legacy or new C# API. However, we have a possible workaround using the new Dlubal API via gRPC, specifically utilizing RSECTION to fetch the required data.

Below is a code snippet demonstrating how to access these coordinates for stress points using the RSECTION API:

using Rsection = Dlubal.Api.Rsection;
using Google.Protobuf;

ApplicationRsection? RsectionApp = null;

try
{
   // Initialize and connect the Rsection client
   RsectionApp = new ApplicationRsection(apiKeyValue: "your_api_key_value");

   // Create a new model
   await RsectionApp.create_model(name: "stress_points");

    // Create model object
    await RsectionApp.create_object(
       new Rsection.StructureCore.Section
       {
           Name = "HEA 160", // Replace with your section name
       }
    );
   
    // Fetch the list of specific object type = StressPoint
    var stressPointList = await RsectionApp.get_object_list(
        new List<IMessage> { new Rsection.StructureCore.StressPoint{} }
    );

    // Iterate over each item in the list
    foreach (var stressPointObj in stressPointList)
    {
        if (stressPointObj is Rsection.StructureCore.StressPoint stressPoint)
        {
            // Get the Y and Z coordinates
            double yCoord = stressPoint.Coordinate1;
            double zCoord = stressPoint.Coordinate2;

            // Print formatted output
            Console.WriteLine($"StressPoint No: {stressPoint.No,3} | " +
                            $"Y: {yCoord,8:F3} | Z: {zCoord,8:F3}");
        }
    }
}
catch (Exception ex)
{
   Console.WriteLine($"Error: {ex.Message}");
}
finally
{
   if (RsectionApp != null) await RsectionApp.close_connection();
}

This method should give you the coordinates you need without manually building a coordinate database, which could be time-consuming. Let me know if you need further assistance with this and it’s good enough for now!

Best regards,

2 Likes