pb
pb sets coordinates of the vertices in a region of the open part.
Syntax
pb imin jmin kmin imax jmax kmax component value [ value ... ]
imintokmax: a region of reduced indices. A0in a minimum means the first reduced index of its direction and a0in a maximum the last. The concepts chapter explains regions.component: one ofx,y,z,xy,xz,yzorxyz. It names the coordinates to set.value: one real for each letter ofcomponent: one forx,yorz, two forxy,xzoryz, three forxyz. The values are in the order of the letters.
What it does
pb sets the named coordinates of every vertex in the region. The coordinates that component does not name keep their values. Vertices are the control points of the part, reached by reduced indices. The nodes between them follow in later steps. In a cylinder part the three coordinates are radius, angle in degrees and height.
When James applies it
Step 1iii of the hierarchy: James places vertices before any edge is attached to a curve and before any face is projected. Within the step, James applies the vertex commands in the order the script wrote them, each on top of what the earlier ones left, so a later pb on the same vertex wins. pb is legal only in the Part phase.
Rules James adds
- Several commands that reach the same vertex are applied in input order. A later command’s effect on a coordinate replaces an earlier one’s.
- A vertex that a later step projects away from its
pbposition is not held there.pbis a starting position, not a constraint.
Diagnostics
- E0500: a reduced index lies outside the part.
- E0501:
componentis not one of the seven words. - E0502: the number of values does not fit
component. - E0106: a minimum is larger than its maximum.
Example
The script tests/corpus/041-pb-two-same-vertex/input.tg, which make test runs:
block 1 2;1 2;1 2;0 1;0 1;0 1;
pb 1 1 1 1 1 1 x 1.0
pb 1 1 1 1 1 1 x 2.0
endpart
Both commands name vertex (1, 1, 1). James keeps both in input order in the IR, so the vertex ends at x = 2. That is past the vertex at x = 1 beside it, and James warns that one element has a negative Jacobian. James prints the warning in tests/corpus/041-pb-two-same-vertex/expected.diag.txt:
input.tg:1:1: warning: part #0 has 1 element with a negative Jacobian
james: 0 errors, 1 warning