Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Chapter 12: Mastering Point Helpers — cp(), gp(), mp(), ep() & More

PART II · CHAPTER 12 Complete Guide to All 10 Point Helpers · Interactive Visual Examples in FSL & Lua

When you cut a gemstone at a physical faceting machine, you look through a 10× loupe and stop grinding the moment your new facet touches an existing corner or ridge on the stone.

Point helpers are how you express those exact visual landmarks in FSL and Lua. They inspect the live 3D polyhedron at the moment your cut executes, locate the exact 3D vertex or edge you asked for, and anchor your cutting plane to it.


1. Quick Selector: Which Point Helper Do I Need?

HelperFSL SyntaxLua SyntaxWhat Landmark It Finds
cp()cp()cp()Center Point: (0, 0, -1) for Pavilion/PF tiers, or (0, 0, +1) for Crown tiers.
gp()gp()gp()Girdle Point: The lowest Pavilion girdle vertex directly in front of the current tooth index.
mp(...)mp(P1, P2, !G1)mp("P1", "P2", "!G1")Meetpoint: The 3D vertex where the listed tiers (or specific facets like P1:0) intersect.
edge(...)edge(C1:0, C1:6)edge("C1:0", "C1:6")Edge Segment: Returns the [startPt, endPt] ridge line shared between two adjacent facets.
ep(...)ep(edge(F1, F2), 0.5)ep(edge("F1", "F2"), 0.5)Edge Interpolation: A point fractionally (0.0 to 1.0) along an edge or between two points.
prz(...)prz(pt) / prz(pt, P1:0)prz(pt) / prz(pt, "P1:0")Project Z: Drops a vertical plumb line from pt straight onto the stone's surface or a facet plane.
fred(...)fred(p1, p2, edge)fred(p1, p2, edge)Fred Point (2D Crossover): The 3D point on edge where line p1–p2 crosses it in top-down XY view.
grid(...)grid(cols, rows, x, y)grid(cols, rows, x, y)Flat XY Grid: Returns a 2D grid coordinate at z = 0 scaled to the stone's bounding box.
surface(...)surface(u, v)surface(u, v)3D Surface Projection: Projects fractional (u, v) coordinates (-1..+1 or 0..1) onto the 3D mesh surface!
Point(...)Point(x, y, z)Point(x, y, z)Literal 3D Point: Explicit (x, y, z) coordinates in space.

2. cp() — Center Point & gp() — Girdle Point

cp() (Center Point)

Brings angled facets together at a central apex along the dop axis:

  • On a Pavilion (P) or Preform (PF) tier, cp() returns Point(0, 0, -1).
  • On a Crown (C) tier, cp() returns Point(0, 0, +1) (useful when cutting a pointed dome or rose cut without a flat table!).

gp() (Girdle Point)

Finds the girdle corner aligned with the current cut's tooth index and angle:

  • On a Pavilion tier (P2 0 @ 43.0 : gp() x8 m 3 or P2 3 @ 43.0 : gp() xx8): Finds the intersection of the temporary CAM preform (PFk) and the 90° girdle (Gk) so your permanent pavilion facets meet the girdle line cleanly.
  • On a Crown tier (C1 0 @ 42.0 : gp() + girdle x8 m 3 or C1 3 @ 42.0 : gp() + girdle xx8): Finds the lowest point of the Pavilion girdle at that tooth index, and + girdle shifts that target upward by your girdle thickness!

3. mp(...) — Meetpoints & Exclusion Filters (!)

mp(...) searches the current 3D stone for vertices that touch all of the tiers or facets you list, and picks the best match for your current cutting plane:

  • Single-Tier Meetpoint (mp(C1)): Finds the corner where two adjacent facets of tier C1 meet each other (for example, the upper tip shared by C1:3 and C1:93).
  • Multi-Tier Meetpoint (mp(P1, G1)): Finds the vertex shared by both P1 and G1.
  • Specific Facet Targeting (mp(P1:0, P2:3)): By adding :tooth after a tier name, you restrict the search to that specific facet index!
  • Exclusion Filter (!Tier): What if two tiers P1 and P2 share two vertices—one at the bottom culet (PF1 or P3) and one up near the girdle (G1)? Prefixing a tier with ! (such as mp(P1, P2, !G1)) excludes any vertex that touches G1!

Try running and inspecting mp() with specific tiers and show() debug markers in the interactive playground below:

name  = "Meetpoint & Debug Marker Demo"
ri    = 1.76
gear  = 96
color = "#38bdf8"

P1 3 @ 43.0 : cp() xx8
G1 3 @ 90.0 : size xx8
P2 0 @ 41.5 : gp() x8

C1 3 @ 42.0 : mp(P1, P2) + girdle xx8
C2 0 @ 34.5 : gp() x8

// Highlight the upper apex of C1 in bright gold using show()!
show(mp(C1), "#ffd166")

C3 6 @ 22.0 : mp(C1) x8
T  0 @ 0.0  : mp(C2) x1
-- lua script
name("Meetpoint & Debug Marker Demo")
ri(1.76)
gear(96)
color("#38bdf8")

TierAP("P1", 3, 43.0, cp(), "xx8")
TierAD("G1", 3, 90.0, size, "xx8")
TierAP("P2", 0, 41.5, gp(), "x8")

TierAP("C1", 3, 42.0, mp("P1", "P2"):add(girdle), "xx8")
TierAP("C2", 0, 34.5, gp(), "x8")

-- Highlight the upper apex of C1 in bright gold using show()!
show(mp("C1"), "#ffd166")

TierAP("C3", 6, 22.0, mp("C1"), "x8")
TierAP("T",  0, 0.0,  mp("C2"), "x1")

4. edge(F1, F2) and ep(edge, ratio) — Walking Along a Ridge

Sometimes you want to place a cut partway along a ridge between two facets (0.0 = first endpoint, 0.5 = exact midpoint, 1.0 = second endpoint):

  1. edge(FacetA, FacetB) finds the 3D line segment shared by two facets (for example, edge(P1:0, P1:24) or edge(C1:3, C1:93)).
  2. ep(edge, ratio) (or ep(PointA, PointB, ratio)) linearly interpolates a 3D point at ratio (0.0 to 1.0) along that segment:
    P(t) = (1−t)Pstart + tPend

Try dragging/changing ratio = 0.55 to 0.35 or 0.75 in the playground below and clicking Run:

name  = "Edge Interpolation (ep) Demo"
ri    = 1.76
gear  = 96
color = "#a78bfa"

P1 0  @ 42.0 : cp() x4
G1 0  @ 90.0 : size x4
C1 0  @ 40.0 : mp(P1, G1) + girdle x4

// Pick a point 55% of the way up the ridge between C1:0 and C1:24
ratio = 0.55
ridge = edge(C1:0, C1:24)
targetPt = ep(ridge, ratio)
show(ridge[0], "#38bdf8")
show(ridge[1], "#38bdf8")
show(targetPt, "#f43f5e")

// Cut corner facets C2 at 32° passing right through targetPt!
C2 12 @ 32.0 : targetPt x4
T  0  @ 0.0  : mp(C2) x1
-- lua script
name("Edge Interpolation (ep) Demo")
ri(1.76)
gear(96)
color("#a78bfa")

TierAP("P1", 0, 42.0, cp(), "x4")
TierAD("G1", 0, 90.0, size, "x4")
TierAP("C1", 0, 40.0, mp("P1", "G1"):add(girdle), "x4")

local ratio = 0.55
local ridge = edge("C1:0", "C1:24")
local targetPt = ep(ridge, ratio)
show(ridge[1], "#38bdf8")
show(ridge[2], "#38bdf8")
show(targetPt, "#f43f5e")

TierAP("C2", 12, 32.0, targetPt, "x4")
TierAP("T",  0,  0.0,  mp("C2"), "x1")

5. prz(), fred(), grid(), and surface(u, v) — Advanced Construction Helpers

A. prz(point, [facet]) — Vertical Z-Projection

Drops a vertical line parallel to the Z-axis through (point.x, point.y) and returns the 3D point where it hits either a specific facet plane (prz(pt, C1:0)) or the top/bottom surface of the stone (prz(pt)).

B. fred(p1, p2, edge) — Top-Down Visual Crossover ("Fred Van Sant Point")

Named in honor of master cutter Fred Van Sant: when you draw an imaginary construction line from p1 to p2 looking straight down at the Crown (X-Y plane), fred(p1, p2, edge) returns the exact 3D point on edge where that construction line crosses over it!

C. grid(cols, rows, x, y) and surface(u, v) — Proportional Step & Checkerboard Cuts

How do you cut a Checkerboard, Pixel Cut, or Multi-Tier Step Cut where the facets are spaced in even proportional fractions across the stone's width and length—even when the stone's aspect ratio (L/W) changes?

  • surface(u, v) takes normalized coordinates (u, v) across the stone's horizontal bounding box and projects them vertically onto the current 3D crown or pavilion surface!
  • Pairing surface(u, v) with Style 3 (Point-Pair) or Style 2 (Angle + Point) lets you space step tiers or checkerboard squares with mathematical perfection.

Try editing the step fractions 5/6 and 3/4 in the surface() Asscher Step Cut playground below and clicking Run:

name  = "Proportional Surface() Asscher Step Cut"
ri    = 1.54
gear  = 96
color = "#34d399"
SquareTr(42, 0.30)

// Multi-tier step pavilion using surface() fractions
P1 0  @ 52.0 : cp() x4
P2 0  @ 44.0 : surface(5/6, 0.5) x4
P3 0  @ 36.0 : surface(4/6, 0.5) x4
P4 12 @ 52.0 : gp() x4
P5 12 @ 44.0 : mp(P4, P1) x4

// Crown steps anchored via surface() fractions!
C1 0  @ 42.0 : gp() + girdle x4
C2 0  @ 30.0 : surface(9/10, 0.5) x4
C3 0  @ 20.0 : surface(8/10, 0.5) x4
T  0  @ 0.0  : surface(3/4, 0.5) x1

C4 12 @ 42.0 : gp() + girdle x4
C5 12 @ 30.0 : mp(C1, C4) x4
C6 12 @ 20.0 : mp(C2, C5) x4
-- lua script
name("Proportional Surface() Asscher Step Cut")
ri(1.54)
gear(96)
color("#34d399")
SquareTr(42, 0.30)

TierAP("P1", 0,  52.0, cp(), "x4")
TierAP("P2", 0,  44.0, surface(5/6, 0.5), "x4")
TierAP("P3", 0,  36.0, surface(4/6, 0.5), "x4")
TierAP("P4", 12, 52.0, gp(), "x4")
TierAP("P5", 12, 44.0, mp("P4", "P1"), "x4")

TierAP("C1", 0,  42.0, gp():add(girdle), "x4")
TierAP("C2", 0,  30.0, surface(9/10, 0.5), "x4")
TierAP("C3", 0,  20.0, surface(8/10, 0.5), "x4")
TierAP("T",  0,  0.0,  surface(3/4, 0.5), "x1")

TierAP("C4", 12, 42.0, gp():add(girdle), "x4")
TierAP("C5", 12, 30.0, mp("C1", "C4"), "x4")
TierAP("C6", 12, 20.0, mp("C2", "C5"), "x4")

Next, let’s combine variables, trigonometry, 3D vectors/planes, and RI-driven optical formulas in Chapter 13: Math, Variables, Vectors, Planes & RI-Adaptive Optics.