add_pt#

ptrace.add_pt() int#

Adds emitters (and thus more traces) to the current particle trace part(s) from the current location of the cursor (a point).

Any existing particle trace part can have emitters added to them. These trace parts must be selected, and the cursor must be at the new location, before the addition.
Examples:
#
# Getting the cursor to the desired location
#
ensight.view_transf.cursor(-0.927830,1.474020,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 trace from a point (becomes part 2)
#
ensight.ptrace.create_pt()
#
# Moving the cursor to a new location
#
ensight.tools.cursor("ON")
ensight.view_transf.function("cursor")
ensight.view_transf.translate(-7.368053,-0.491341,0.000000)
ensight.view_transf.function("global")
#
# Selecting the particle trace part to add to
# and adding the new emitter from which another
# trace is made
#
ensight.part.select_begin(2)
ensight.ptrace.add_pt()
Returns:

zero on success, non-zero on error