cur

cur puts the nodes of one mesh edge on a 3D curve.

Syntax

cur imin jmin kmin imax jmax kmax curve
  • imin to kmax: a region of reduced indices that must be an edge: two of the three pairs are equal. A 0 in a minimum means the first reduced index of its direction and a 0 in a maximum the last. The concepts chapter explains regions.
  • curve: the number of a 3D curve that a curd defines before the part ends.

What it does

cur moves the two end vertices of the edge to the points of the curve closest to them, and places the nodes between them along the curve, spread by arc length. On a closed curve the edge takes the shorter arc between its ends, and the forward direction wins a tie. A later spacing command on the edge spreads its nodes along the same stretch of the curve.

When James applies it

Step 2 of the hierarchy: James attaches edges to curves after every vertex has been placed and before any vertex is projected onto a surface. cur is legal only in the Part phase.

Rules James adds

  • The region must be an edge. A vertex, a face or a block is refused, because the command acts on one row of nodes.
  • The curve must exist when the part ends. A curd may come after the cur in the same part. James refuses a number that no curd defined by then.
  • James always spreads the nodes by arc length. On a straight curve this is the same as spreading them by chord length. On a bent curve it differs by the ratio of arc to chord.
  • A vertex that a later step projects off the curve is not held there. cur is a starting position. curf is the command that holds an edge.

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/119-cur-index-outside-part-rejected/input.tg, which make test runs:

block 1 3 5;1 3;1 2;
0 1 2;0 1;0 1;
curd 1 lp3 0 0 0 1 1 1;;
cur 1 1 1 9 1 1 1

The part has three reduced indices in i, and the cur names 9. James prints the error in tests/corpus/119-cur-index-outside-part-rejected/expected.diag.txt, and the warning that the script ended with the part still open:

input.tg:4:11: error [E0102]: reduced index 9 is outside the part's i range 1-3
input.tg:4:17: warning [E0416]: part 1 was still open at end of input; closed as if by endpart
james: 1 error, 1 warning

See also

  • curd: defines the curve.
  • curf: cur and freezes the edge.
  • cure: spreads the edge over the whole curve.
  • curs: an edge that spans several partitions.
  • Geometry: 3D curves.
  • Shaping: attaching edges to curves.

James 0.3.1.

This site uses Just the Docs, a documentation theme for Jekyll.