create_bypartname#
- ptrace.create_bypartname(p0: str, p1: str, p2: str) int #
Create a particle trace from the nodes of a part, where the part is referred to by name.
The default attributes and/or any “ptrace:” attribute commands between “ptrace: begin” and “ptrace: end” commands are used for the trace creation. A parent part or parts (containing the flow field) must be selected prior to this command. The number of emitter points will be the number of nodes in the part multiplied by the “ptrace: emit_density” value.- Args:
- p0:
‘part_name’ name of the part whose nodes will be used as an emitter
- p1:
‘numemitpoints’ number of emitters to use. The minimum of this value and the number of nodes in the part will be used.
- Examples:
# # Selecting the parent part(s) # ensight.part.select_begin(1,3,4) # # 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") # WARNING: following line includes OBSOLETE call (ensight.ptrace.emit_density). ensight.ptrace.emit_density(1.0000e+00) ensight.ptrace.end() # # Creating traces from all the nodes of the part # entitled "(CASE:Case 1)Clip_line" # ensight.ptrace.create_bypartname("(CASE:Case","1)Clip_line","100")
- Returns:
zero on success, non-zero on error