splint

splint turns the mesh edges of a region into cubic splines through their own vertices.

Syntax

splint imin jmin kmin imax jmax kmax direction flag [ vector ... ]
  • imin to kmax: a region of reduced indices. It may be an edge, a face or a block. A 0 in a minimum means the first reduced index of its direction and a 0 in a maximum the last.
  • direction: i, j or k. The splines run along it, so the region must extend in that direction.
  • flag: two digits that say how each end of a spline is held. 00 leaves both ends natural, with zero second derivative. 10 gives a derivative vector at the end with the smaller index, 01 at the end with the larger index and 11 at both.
  • vector: three reals dx dy dz for each 1 in the flag, in the order of the ends: none for 00, one for 10 or 01, two for 11.

What it does

For every edge of the region along direction, splint builds one cubic spline through the edge’s vertices as they stand, and places the nodes along it by arc length. The same derivative vectors apply to every edge. A region that is a face or a block therefore carries a spline on each edge it holds along direction.

When James applies it

Step 2 of the hierarchy, after the vertex commands of step 1iii: the splines pass through the vertices as pb, mb and the others left them. splint is legal only in the Part phase.

Rules James adds

  • splint has no curve number. It builds its spline from the vertices, so it needs no curd.
  • The region need not be an edge, and James does not apply E0600 to it. A region that has no extent along direction names no edge. James stops with an engine error, IR invariant I12 violated ... should have reported E0900, and exits with status 2. This is a known defect: a later version will give it a code of its own.
  • The flag and the vectors must agree. A flag of 10 needs one vector and 11 needs two.

Diagnostics

  • E0607: the flag is not one of the four, or the number of vectors does not fit it.
  • E0102: a reduced index lies outside the part.
  • E0106: a minimum is larger than its maximum.

Example

The script tests/corpus/177-splint-edge-no-derivatives/input.tg, which make test runs:

c splint with flag 00 fits a natural spline through one i edge's vertices.
block 1 3 5;1 3;1 2;0 1 2;0 1;0 1;
pb 2 1 1 2 1 1 y 0.4
splint 1 1 1 3 1 1 i 00
endpart

The pb lifts the middle vertex of the edge 1 1 1 3 1 1 to y = 0.4. The splint passes a natural spline through the three vertices. The mesh has node 2 at (0.4765, 0.2643, 0) and node 4 at (1.5235, 0.2643, 0), where straight segments would put them at about y = 0.2. The middle node stays at (1, 0.4, 0).

See also

  • cur: puts an edge on a curve that you define.
  • curd: defines a spline through points you give, with csp3.
  • pb: places the vertices the spline passes through.
  • Shaping: shaping edges.

James 0.3.1.

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