Close

Experimental:Line Metrics POP

Summary

You can add metrics attributes to Line Strips. They can be created as point attribute or the vertex attributes.

This gives good information about the points and the context they are in. For each point you can get the direction to the next and previous points, or the distance back to the start of the line strip, or the line strip number it is in… things useful for Math POPs or Lookup POPs.

A convenience of the Line Metrics POP is to give nice values to awkward situations like co-incident points (two or more consecutive points in the same location), especially direction vectors. That’s what the Continuous Direction parameter does. It would work with Direction to Next, Direction to Previous, and do nice things to the Tangent vectors by keeping them in line.

PythonIcon.pnglinemetricsPOP_Class


Parameters - Neighbor Page

Attribute Class attrclass - -
  • Point point -
  • Vertex vertex -

Displacement to Next dispnext -

Displacement to Next Attrib Name dispnextname -

Displacement to Previous dispprev -

Displacement to Previous Attrib Name dispprevname -

Distance to Next distnext -

Distance to Next Attrib Name distnextname -

Distance to Previous distprev -

Distance to Previous Attrib Name distprevname -

Direction to Next dirnext -

Direction to Next Attrib Name dirnextname -

Direction to Previous dirprev -

Direction to Previous Attrib Name dirprevname -

Tangent tangent -

Tangent Attrib Name tangentname -

Curvature curvature -

Curvature Attrib Name curvaturename -

Angle per Distance angleperdist -

Angle per Distance Attrib Name angleperdistname -

Continuous Direction continuousdir -

Max Neighbors maxneighbors -


Parameters - Line Strip Page

Distance from Start diststart -

Distance from Start Attrib Name diststartname -

Distance from End distend -

Distance from End Attrib Name distendname -

Distance from Start Normalized diststartnorm -

Distance from Start Normalized Attrib Name diststartnormname -

Distance from End Normalized distendnorm -

Distance from End Normalized Attrib Name distendnormname -

Line Strip Length primlen -

Line Strip Length Attrib Name primlenname -

Length Attrib Primitive Attribute primlenprim -


Parameters - Index Page

Vert Index in Line Strip pointindex -

Vert Index Attrib Name pointindexname -

Number of Verts in Line Strip numverts -

Number of Verts Attrib Name numvertsname -

Vert Index in Line Strip Normalized vertindexnorm -

Vert Index Normalized Attrib Name vertindexnormname -

Line Strip Index linestripindex -

Line Strip Index Attrib Name linestripindexname -

Line Strip Index Normalized lsindexnorm -

Line Strip Index Normalized Attrib Name lsindexnormname -


Parameters - Common Page

Bypass bypass -

Delete Input Attributes delinputattrs -


Operator Inputs

  • Input 0: -


Info CHOP Channels

Extra Information for the Line Metrics POP can be accessed via an Info CHOP.

Common POP Info Channels

Common Operator Info Channels

  • total_cooks - Number of times the operator has cooked since the process started.
  • cook_time - Duration of the last cook in milliseconds.
  • cook_frame - Frame number when this operator was last cooked relative to the component timeline.
  • cook_abs_frame - Frame number when this operator was last cooked relative to the absolute time.
  • cook_start_time - Time in milliseconds at which the operator started cooking in the frame it was cooked.
  • cook_end_time - Time in milliseconds at which the operator finished cooking in the frame it was cooked.
  • cooked_this_frame - 1 if operator was cooked this frame.
  • warnings - Number of warnings in this operator if any.
  • errors - Number of errors in this operator if any.


TouchDesigner Build: