q

q copies the coordinates of one vertex onto another.

Syntax

q i1 j1 k1 i2 j2 k2
  • i1 j1 k1: the vertex that receives the coordinates.
  • i2 j2 k2: the vertex that is copied.

Each group is three reduced indices. The six numbers look like a region but are two vertices. A 0 is not an extreme here: it lies below the part’s range and is refused like any index outside the part.

What it does

q sets all three coordinates of the first vertex to those of the second. Use it to collapse an edge or to make two corners coincide, for example to turn a block into a wedge.

When James applies it

Step 1iii of the hierarchy, in input order within the step. q reads the second vertex as the earlier commands left it, so two q commands in a row pass a position along: the second one copies the first one’s result. q is legal only in the Part phase.

Rules James adds

  • q takes two vertices, six numbers in all. A seventh number on the same line is refused, because it would be a third vertex and q copies only one.

Diagnostics

  • E0505: the arguments are not two vertices.
  • E0500: a reduced index lies outside the part.

Example

The script tests/corpus/045-q-not-two-vertices-rejected/input.tg, which make test runs:

block 1 2;1 2;1 2;0 1;0 1;0 1;
q 1 1 1 2 2 2 3 3 3
endpart

The command has nine numbers where two vertices need six, so a seventh follows the second vertex on the same line. James prints the error in tests/corpus/045-q-not-two-vertices-rejected/expected.diag.txt:

input.tg:2:3: error [E0505]: q requires two vertices (i j k i j k), not a region
james: 1 error, 0 warnings

See also

  • pb: sets coordinates directly.
  • ilin: interpolates vertices.
  • Concepts: reduced indices.

James 0.3.1.

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