curf
curf puts the nodes of one mesh edge on a 3D curve, as cur does, and then freezes them.
Syntax
curf imin jmin kmin imax jmax kmax curve
The arguments are those of cur: a region that is an edge and the number of a 3D curve that a curd defines before the part ends. A 0 in a minimum means the first reduced index of its direction and a 0 in a maximum the last.
What it does
curf places the edge on the curve exactly as cur does. Step 3 projects none of the edge’s vertices: the two end vertices are frozen as soon as step 2 places them, and a vertex between them, on an edge that crosses several blocks, is held through step 3. The nodes between the ends are frozen once the edge’s placement is complete (after step 5). No later step moves a frozen node: not a projection, not an interpolation, not a smoother such as relax. Each skips a frozen node and uses its position as boundary data for the nodes around it.
When James applies it
Step 2 of the hierarchy, as cur. The end vertices are frozen at once. The nodes between them are frozen once the edge’s own placement is complete, so a spacing command on the edge is honoured along the curve first. curf is legal only in the Part phase.
Rules James adds
- The freeze holds against every later step: the projections of steps 6 and 9, all the interpolations and the smoothing steps, step 13 included.
- A vertex inside the span of an edge that crosses several blocks is not projected at step 3 either, though it is not frozen until the edge’s placement is complete: a spacing command over the whole edge still moves it along the curve.
- The region must be an edge and the curve must exist, as for
cur.
Diagnostics
- E0600: the region is not an edge.
- E0601: the curve number is not defined.
- E0102: a reduced index lies outside the part.
- E0106: a minimum is larger than its maximum.
Example
The script tests/corpus/173-curf-freezes-edge/input.tg, which make test runs:
c curf freezes the i edge on curve 1; the sfi that follows leaves its interior nodes alone.
curd 1 lp3 0 0 0 1 0.3 0 2 0 0;;
sd 1 plan 0 0 0.2 0 0 1
block 1 5 9;1 3;1 2;0 1 2;0 1;0 1;
curf 1 1 1 3 1 1 1
sfi ;;-1;sd 1
endpart
The curve is a polyline that rises from (0, 0, 0) through (1, 0.3, 0) to (2, 0, 0), and the plane is z = 0.2. The edge 1 1 1 3 1 1 runs along i, and the sfi projects the k = 1 face onto the plane. The IR holds the curve, the surface, a curf at step 2 and the sfi. The edge crosses two blocks, so it has three vertices, nodes 1, 5 and 9. Step 3 projects none of them, and all nine nodes of the edge stay on the polyline at z = 0: node 3 at (0.5, 0.15, 0), the middle vertex, node 5, at (1, 0.3, 0). The face’s other nodes go to the plane. Without the curf, every node of the edge lands at z = 0.2.