add_surface_rake#

ptrace.add_surface_rake(p0: float, p1: float, p2: float, p3: float, p4: float) int#

Add emitters (and thus more traces) to the current surface restricted particle trace part(s) from a screen pick rake location.

The “ptrace: surface_restricted” command must be ON prior to this command. Any existing particle trace parts can have emitters added to them. These trace parts must be selected before the addition.
Args:
p0:

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

p1:

‘x1’ screen x coordinate of the first end of the rake (0.0 to 1.0)

p2:

‘y1’ screen y coordinate of the first end of the rake (0.0 to 1.0)

p3:

‘x2’ screen x coordinate of the second end of the rake (0.0 to 1.0)

p4:

‘y2’ screen y coordinate of the second end of the rake (0.0 to1.0)

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
# (surface_restricted must be on)
#
ensight.ptrace.begin()
ensight.ptrace.surface_restricted("ON")
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 surface restricted traces from
# a rake pick location (becomes part 2)
#
ensight.ptrace.create_surface_rake(10,0.117150,0.540862,0.117150,0.442793)
#
# Selecting the particle trace part to add to
# and adding 6 new emitters from which more
# traces are made
#
ensight.part.select_begin(2)
ensight.ptrace.add_surface_rake(6,0.129227,0.594354,0.188406,0.592868)
Returns:

zero on success, non-zero on error