add_surface_pt#

ptrace.add_surface_pt(p0: float, p1: float) int#

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

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

‘screen_x’ screen x coordinate (0.0 to 1.0)

p1:

‘screen_y’ screen y coordinate (0.0 to 1.0)

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
# (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 surface restricted trace from a
# screen location (becomes part 2)
#
ensight.ptrace.create_surface_pt(0.148551,0.484398)
#
# Selecting the particle trace part to add to
# and adding a couple of new emitters from which
# more traces are made
#
ensight.part.select_begin(2)
ensight.ptrace.add_surface_pt(0.136473,0.646360)
ensight.ptrace.add_surface_pt(0.193237,0.546805)
Returns:

zero on success, non-zero on error