add_rake#

ptrace.add_rake(p0: float) int#

Add emitters (and thus more traces) to the current particle trace part(s) from the current line tool.

Any existing particle trace part can have emitters added to them. These trace parts must be selected, and the line tool must be at the new position, before the addition.
Args:
p0:

‘num_points’ number of equally spaced points on the line to use as emitters

Examples:
#
# Getting the line tool to the desired location
#
ensight.view_transf.line(1,9.000000,6.000000,0.000000)
ensight.view_transf.line(2,30.000000,6.000000,0.000000)
#
# Selecting the parent part(s)
#
ensight.part.select_begin(1)
#
# Setting some attributes before creation
# (others are the current defaults)
#
ensight.ptrace.begin()
ensight.ptrace.variable("VITESSE")
ensight.ptrace.type("streamline")
ensight.ptrace.component(1.0000e+00,1.0000e+00,1.0000e+00)
ensight.ptrace.representation("line")
ensight.ptrace.emit_at_current_time("ON")
ensight.ptrace.end()
#
# Creating 10 traces from a line tool (becomes part 2)
#
ensight.ptrace.create_rake(10)
#
# Moving the line tool to a new location
#
ensight.tools.line("ON")
ensight.view_transf.function("line")
ensight.view_transf.translate(-4.202520,4.531246,0.000000)
ensight.view_transf.function("global")
#
# Selecting the particle trace part to add to
# and adding the 6 new emitters from which more
# traces are made
#
ensight.part.select_begin(2)
ensight.ptrace.add_rake(6)
Returns:

zero on success, non-zero on error