add_bird

Primitives3D.add_bird(actor_folder, speed=0, global_offset=[0, 0, 0], yaw=0, pitch=0, roll=0, flapping_rate=50, relative_cs_name=None, actor_name=None)[source]

Add a Bird Multipart from 3D Components.

It requires a json file in the folder containing bird infos. An example json file is showed here.

{
    "name": "bird1",
    "version": 1,
    "class":"bird",
    "xlim":["-.7","2.75"],
    "ylim":["-1.2","1.2"],
    "parts": {
        "body": {
            "comp_name": "body.a3dcomp",
            "rotation_cs":null,
            "rotation":null,
            "rotation_axis":null
        },
            "wing_right": {
            "comp_name": "wing_left.a3dcomp",
            "rotation_cs":[".001778" ,".00508" ,".00762"],
            "rotation":"-45deg",
            "rotation_axis":"X"
        },
            "wing_left": {
            "comp_name": "wing_right.a3dcomp",
            "rotation_cs":[".001778" ,"-.00508" ,".00762"],
            "rotation":"45deg",
            "rotation_axis":"X"
        },
            "tail": {
            "comp_name": "tail.a3dcomp",
            "rotation_cs":null,
            "rotation":null,
            "rotation_axis":null
        },
            "beak": {
            "comp_name": "beak.a3dcomp",
            "rotation_cs":null,
            "rotation":null,
            "rotation_axis":null
        }
    }
}
Parameters
actor_folderstr

Path to the actor directory. It must contain a json settings file and a 3dcomponent (.a3dcomp file)

speedfloat, optional

Object movement speed with time (m_per_sec).

global_offsetlist, optional

Offset from Global Coordinate System [x,y,z] in meters.

yawfloat, optional

Yaw Rotation from Global Coordinate System in deg.

pitchfloat, optional

Pitch Rotation from Global Coordinate System in deg.

rollfloat, optional

Roll Rotation from Global Coordinate System in deg.

flapping_ratefloat, optional

Motion flapping rate in Hz.

relative_cs_namestr

Relative CS Name of the actor. None for Global CS.

Returns
pyaedt.modeler.actors.Bird

References

>>> oEditor.Insert3DComponent

Examples

>>> from pyaedt import Hfss
>>> app = Hfss()
>>> bird_dir = "path/to/bird/directory"
>>> bird1 = app.modeler.primitives.add_bird(bird_dir, 1.0, [19, 4, 3], 120, -5, flapping_rate=30)