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 ... ]
imintokmax: a region of reduced indices. It may be an edge, a face or a block. A0in a minimum means the first reduced index of its direction and a0in a maximum the last.direction:i,jork. 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.00leaves both ends natural, with zero second derivative.10gives a derivative vector at the end with the smaller index,01at the end with the larger index and11at both.vector: three realsdx dy dzfor each1in the flag, in the order of the ends: none for00, one for10or01, two for11.
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
splinthas no curve number. It builds its spline from the vertices, so it needs nocurd.- The region need not be an edge, and James does not apply E0600 to it. A region that has no extent along
directionnames 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
10needs one vector and11needs 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).