add_vehicle#
- Modeler3D.add_vehicle(input_dir, speed=0, global_offset=[0, 0, 0], yaw=0, pitch=0, roll=0, coordinate_system=None, name=None)[source]#
Add a Moving Vehicle Multipart from 3D Components.
It requires a json file in the folder containing vehicle infos. An example json file follows:
{ "name": "vehicle3", "version": 1, "type":"mustang", "class":"vehicle", "xlim":["-1.94","2.8"], "ylim":["-.91",".91"], "parts": { "wheels_front": { "comp_name": "wheels_front.a3dcomp", "rotation_cs":["1.8970271810532" ,"0" ,"0.34809664860487"], "tire_radius":"0.349", "rotation_axis":"Y" }, "wheels_rear": { "comp_name": "wheels_rear.a3dcomp", "rotation_cs":["-0.82228746728897" ,"0","0.34809664860487"], "tire_radius":"0.349", "rotation_axis":"Y" }, "body": { "comp_name": "body.a3dcomp", "rotation_cs":null, "tire_radius":null, "rotation_axis":null } } }
- Parameters:
- input_dir
str
Path to the actor directory. It must contain a json settings file and a 3dcomponent (
.a3dcomp
file).- speed
float
,optional
Object movement speed with time (m_per_sec).
- global_offset
list
,optional
Offset from Global Coordinate System [x,y,z] in meters.
- yaw
float
,optional
Yaw Rotation from Global Coordinate System in deg.
- pitch
float
,optional
Pitch Rotation from Global Coordinate System in deg.
- roll
float
,optional
Roll Rotation from Global Coordinate System in deg.
- coordinate_system
str
Relative CS Name of the actor.
None
for Global CS.
- input_dir
- Returns:
ansys.aedt.core.modeler.actors.Vehicle
References
>>> oEditor.Insert3DComponent