API Function Examples

Use the API functions to get parameter values from other geometry elements.

To see examples of API functions, open the following Sample PKT file:

API Function Examples.pkt

The following table explains each of the API functions that are used in this example.

Element API Function Description
Cut or Fill Decision AP10.Y < P1.Y Checks whether the Y value of AP10 is less than the Y value of P1:
  • If True, the Fill case is used
  • If False, the Cut case is used
Fill Decision P1.DistanceToSurface(Surface) > 2 Checks whether the distance between P1 and the Surface is greater than 2:
  • If True, the High Fill case (slope to the surface at -200%) is used
  • If False, the Low Fill case (slope the surface at -100%) is used
Cut Decision P1.DistanceToSurface(Surface) > -2 Checks whether the distance between P1 and the Surface is greater than -2:
  • If True, the Deep Cut case (slope to the surface at 100%) is used
  • If False, the Shallow Cut case (slope the surface at 200%) is used
P4 Slope L1.Slope Apply the slope that is calculated for L1.
P4 Delta Y P2.Y - P3.Y Apply a Y value that is relative to the vertical distance from the previous point (P3).