Rotation of a FEM model with C# [SOLVED]

Hi,
As I understand it, it is only possible to rotate FEM design models in the XY plane (with the rotate tool). I have a case where I want to rotate big models with only beam elements around the Y-axis, mostly the rotation of 90degrees. This is to analyze the lifting of the assemblies.

Suggested a code in C# to solve this issue, see the pictures below.
I am new to the C# api for FEM design. Is this the right way to solve a problem like this? And if so, what do I need to change to include all beams in the rotation?

This code resulted in some beam elements disappearing with the error message “Can’t import this iteam, because it has bad local-y”. However, the beams that remained in the model were rotated correctly.

Regards

Ola

Hi @OlaB :waving_hand:

The FEM-Design rotate tool supports rotation in all three directions. If you select Rotate around axis, you can define the rotation axis in any direction. Using the command window, you can then specify the angle of the rotation.

If you want to rotate with copy, turn off the erase.

I’ve attached a short video about how to use this functionality.

FD-rotation-sample.zip (4.8 MB)

Use the Filter if you only want to rotate specific objects.

Bearing this in mind, I’m not sure whether you need the API to rotate the model. However, if you still want to do it using the API, could you please share your C# script and its project files, or provide more details about the code? For example, what do the TransformGroup, Rotation and Transform do? FEM-Design API doesn’t have a built-in rotate function.

Thanks, good answear. This solved my question!

1 Like