Surface supports in grpc client arnt being added correctly

surface supports in grpc client arnt being added correctly

the begin situation

using Dlubal.Api.Common;
using Dlubal.Api.RFEM;
using Dlubal.Api.RFEM.StructureCore;
using Dlubal.Api.RFEM.TypesForSurfaces;
using Google.Protobuf;

namespace ConsoleApp6
{

public static class Program
{
    public static async Task Main(string[] Args)
    {
        ApplicationRfem app = null;
        app = new ApplicationRfem("API KEY HERE");

        var s = new SurfaceSupport()
        {
            TranslationX = 3,
            TranslationY = 3,
            TranslationZ = 3,
            ShearXz = 3,
            ShearYz = 3,
            
        };
        s.Surfaces.Add(1);

        await app.create_object(s); 



        await app.close_connection();
    }
}

}

my code

what gets added when i run it after adding the surface support

To Reproduce
Steps to reproduce the behavior:

  1. Add 4 nodes on the canvas
  2. make lines between the notes
  3. add a surace to the lines
  4. in the c# grpc client add a surface support with the values not 0
  5. run the code
  6. surface support in RFEM shows 0 in the ui
  • OS: e.g. Windows 11 24H2
  • 6.12.6

Hi LuckyLuc,

you need to set the translation of the support depending on your belongings. Please have a look in the documentation for more details.

SurfaceSupport — Dlubal API documentation

Here is a code snippet in Python that demonstrates how it is used.

Surface Supports

    rfem.types_for_surfaces.SurfaceSupport(
        no=1,
        surfaces=[1],
        translation=common.Vector3d(x=inf, y=50000, z=inf),
    ),

This information should be sufficient for you to achieve the desired result.

Best regards
Robert Milrath

hi robert thank you for your answer

i totaly forgot to do the *1000 in my code to make it back to the input number
now it works both with filling in the values seperately

TranslationX = 3 * 1000,
TranslationY = 3 * 1000,
TranslationZ = 3 * 100,

and your method of doing them all at ones

translation= new Vector3d(x=3 * 1000, y=3* 1000, z=3* 1000)

thank you for your time
Best regards
LuckyLuc

2 Likes