add_surface_net#

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

Add emitters (and thus more traces) to the current particle trace part(s) from the grid of a screen box pick.

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.
The number of additional emitter points will be the product of num_in_x * num_in_y.
Args:
p0:

‘num_in_x’ number of equally spaced points in the x direction of the plane tool

p1:

‘num_in_y’ number of equally spaced points in the y direction of the plane tool

p2:

‘x1’ screen x coordinate of the first point on the diagonal of the box (0.0 to 1.0)

p3:

‘y1’ screen y coordinate of the first point on the diagonal of the box (0.0 to 1.0)

p4:

‘x2 ‘ screen x coordinate of the second point on the diagonal of the box (0.0 to 1.0)

p5:

‘y2’ screen y coordinate of the second point on the diagonal of the box (0.0 to 1.0)

Examples:
#
# 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 35 surface restricted traces from
# the box selection (becomes part 2)
#
ensight.ptrace.create_surface_net(5,7)
#
# Selecting the surface restricted particle trace
# part to add to, and adding the 16 new emitters
# from which more traces are made
#
ensight.part.select_begin(2)
ensight.ptrace.create_surface_net(4,4,0.114734,0.424963,0.166667,0.362556)
Returns:

zero on success, non-zero on error