spp
spp is meant to project a region along rays onto a surface, through a template mesh. In this version of James it is read and checked, and then refused for want of tmplt.
Syntax
spp imin jmin kmin imax jmax kmax direction x y z template
The first six numbers are a region, as for lin. direction is one of i, j, k, id, jd and kd. x y z are three real numbers that give a point or a vector for the rays. template is the number of a template.
What it does
A template comes from the command tmplt, which James does not support, so no script can define one. James reads every argument of spp and reports a malformed one with its usual code. It then refuses the command, whatever the arguments are. The compatibility chapter lists spp and tmplt.
When James applies it
The IR does not store spp. A well-formed spp is refused while James builds the part. spp is legal only in the Part phase. James refuses it in the Control and Merge phases (E0412).
Rules James adds
- Every
sppis an error (E0804): the template it names is not defined. - A second error, E0805, is for a template whose node count does not match the region. No script can reach it in this version, because no template exists.
Diagnostics
- E0804: the template is not defined.
- E0102: a reduced index lies outside the part.
- E0106: a range of the region is written high to low.
Example
The script tests/corpus/070-spp-undefined-template-rejected/input.tg, which make test runs:
block 1 2 3;1 2 3;1 2 3; 0 1 2; 0 1 2; 0 1 2;
spp 1 1 1 2 2 2 k 0 0 0 1
endpart
James reads the region, the direction k, the three numbers and the template 1, and then refuses the template. It prints this and exits with 1, as tests/corpus/070-spp-undefined-template-rejected/expected.diag.txt holds:
input.tg:2:25: error [E0804]: spp template 1 is not defined
james: 1 error, 0 warnings
See also
- sf: projects a region onto a surface that James does have.
- Compatibility: the commands James refuses.