add_net#

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

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

Any existing particle trace parts can have emitters added to them. These trace parts must be selected, and the plane tool must be at the new position, 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

Examples:
#
# Getting the plane tool to the desired location
#
ensight.view_transf.plane(1,1.750000,2.700000,0.000000)
ensight.view_transf.plane(2,13.000000,2.700000,0.000000)
ensight.view_transf.plane(3,13.000000,9.500000,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 35 traces from the plane tool (becomes part 2)
#
ensight.ptrace.create_net(5,7)
#
# Moving the plane tool to a new location
#
ensight.tools.plane("ON")
ensight.view_transf.function("plane")
ensight.view_transf.scale(-0.522802,-1.195307,1.000000)
ensight.view_transf.translate(-10.588167,-0.218373,0.000000)
ensight.view_transf.function("global")
#
# Selecting the particle trace part to add to
# and adding the 9 new emitters from which
# more traces are made
#
ensight.part.select_begin(2)
ensight.ptrace.add_net(3,3)
Returns:

zero on success, non-zero on error