RAParticleAssemblyPart#

class ansys.rocky.app.ra_particle_assembly.RAParticleAssemblyPart(id: str, model_id: str | None = None)#

Bases: ansys.rocky.app.api_element_item.ApiElementItem

Rocky PrePost Scripting wrapper for a single entry in a single Particle Assembly’s part list.

Access this wrapper from a given RAParticleAssembly with:

assembly_parts = particle_assembly.GetAssemblyParts()
assembly_part_1 = assembly_parts.New()
assembly_part_1.SetParticle('Particle 1')
assembly_part_1.SetPositionX(0.75, 'm')

Overview#

GetAngle

Get the value of “Angle”.

SetAngle

Set the value of “Angle”.

GetPositionX

Get the value of “Position X”.

SetPositionX

Set the value of “Position X”.

GetPositionY

Get the value of “Position Y”.

SetPositionY

Set the value of “Position Y”.

GetPositionZ

Get the value of “Position Z”.

SetPositionZ

Set the value of “Position Z”.

GetRotationX

Get the value of “Rotation X”.

SetRotationX

Set the value of “Rotation X”.

GetRotationY

Get the value of “Rotation Y”.

SetRotationY

Set the value of “Rotation Y”.

GetRotationZ

Get the value of “Rotation Z”.

SetRotationZ

Set the value of “Rotation Z”.

GetScale

Get the value of “Scale”.

SetScale

Set the value of “Scale”.

GetParticle

Get the “Particle”.

SetParticle

Set the “Particle”.

GetAvailableParticles

Get all available Particles.

Import detail#

from ansys.rocky.app.ra_particle_assembly import RAParticleAssemblyPart

Method detail#

classmethod RAParticleAssemblyPart.GetWrappedClass() type[rocky30.models.particle.particle_assembly.ParticleAssemblyPart]#
classmethod RAParticleAssemblyPart.GetClassName()#
RAParticleAssemblyPart.GetAngle(unit: str | None = None) float#

Get the value of “Angle”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “dega”.

RAParticleAssemblyPart.SetAngle(value: str | float, unit: str | None = None) None#

Set the value of “Angle”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “dega”.

RAParticleAssemblyPart.GetPositionX(unit: str | None = None) float#

Get the value of “Position X”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “m”.

RAParticleAssemblyPart.SetPositionX(value: str | float, unit: str | None = None) None#

Set the value of “Position X”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “m”.

RAParticleAssemblyPart.GetPositionY(unit: str | None = None) float#

Get the value of “Position Y”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “m”.

RAParticleAssemblyPart.SetPositionY(value: str | float, unit: str | None = None) None#

Set the value of “Position Y”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “m”.

RAParticleAssemblyPart.GetPositionZ(unit: str | None = None) float#

Get the value of “Position Z”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “m”.

RAParticleAssemblyPart.SetPositionZ(value: str | float, unit: str | None = None) None#

Set the value of “Position Z”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “m”.

RAParticleAssemblyPart.GetRotationX(unit: str | None = None) float#

Get the value of “Rotation X”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “m”.

RAParticleAssemblyPart.SetRotationX(value: str | float, unit: str | None = None) None#

Set the value of “Rotation X”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “m”.

RAParticleAssemblyPart.GetRotationY(unit: str | None = None) float#

Get the value of “Rotation Y”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “m”.

RAParticleAssemblyPart.SetRotationY(value: str | float, unit: str | None = None) None#

Set the value of “Rotation Y”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “m”.

RAParticleAssemblyPart.GetRotationZ(unit: str | None = None) float#

Get the value of “Rotation Z”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “m”.

RAParticleAssemblyPart.SetRotationZ(value: str | float, unit: str | None = None) None#

Set the value of “Rotation Z”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “m”.

RAParticleAssemblyPart.GetScale(unit: str | None = None) float#

Get the value of “Scale”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “-“.

RAParticleAssemblyPart.SetScale(value: str | float, unit: str | None = None) None#

Set the value of “Scale”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “-“.

RAParticleAssemblyPart.GetParticle()#

Get the “Particle”.

Return type:

RAParticle

RAParticleAssemblyPart.SetParticle(value) None#

Set the “Particle”.

:param unicode, RAParticle value:

Either the API object wrapping the desired entity or its name.

RAParticleAssemblyPart.GetAvailableParticles()#

Get all available Particles.

Return type:

List[RAParticle] A list of RAParticle.