ms
ms projects each face of a region, one face per reduced index along a direction, onto its own surface in a sequence.
Syntax
ms imin jmin kmin imax jmax kmax direction surface_1 surface_2 ...
ms imin jmin kmin imax jmax kmax direction shorthand parameters
The first six numbers are a region, as for lin. direction is i, j or k.
Each surface in the list is sd and a surface number or name, or an inline definition with the kinds and parameters of sf. James takes one surface for each reduced index that the region spans along the direction. The first face goes onto the first surface, the second onto the second, and so on.
A shorthand stands for a whole sequence. Each takes a list of numbers, one entry for each face:
ppx x_1 x_2 ... planes normal to x
ppy y_1 y_2 ... planes normal to y
ppz z_1 z_2 ... planes normal to z
cnsp x0 y0 z0 r_1 r_2 ... spheres with one centre
cncy x0 y0 z0 xn yn zn r_1 r_2 ... cylinders with one axis
pon x0 y0 z0 xn yn zn d_1 d_2 ... planes offset along the normal
pox x0 y0 z0 xn yn zn d_1 d_2 ... planes offset along x
poy x0 y0 z0 xn yn zn d_1 d_2 ... planes offset along y
poz x0 y0 z0 xn yn zn d_1 d_2 ... planes offset along z
A word that begins a line ends the list, so write the next command on a new line.
What it does
For each reduced index along the direction, the face at that index is projected onto the surface at the same position in the list. Each face is a region of its own, so the command is a set of sf commands, one for each face.
When James applies it
Steps 3, 6 and 9, as for sf. ms is legal only in the Part phase. James refuses it in the Control and Merge phases (E0412).
Rules James adds
- The number of surfaces, or of entries in a shorthand, must equal the number of faces (E0806). A region spanning reduced i from 1 to 3 holds three i faces.
- The region needs an extent in both directions across the one you name (E0808). A region that is flat in j has no face across i.
- A shorthand becomes ordinary inline surfaces before the engine sees it.
ppx,ppyandppzgive planes through the point on the named axis.ponoffsets each plane along the unit normal, whatever length you wrote.pox,poyandpozoffset along the plain x, y or z axis. - A radius in
cnsporcncymust be positive (E1005). - Each surface of the list counts toward the limit of three surfaces on a node (E0803).
Diagnostics
- E0800: a surface number or name is not defined.
- E0801: an inline surface kind is not supported.
- E0806: the number of surfaces does not match the number of faces.
- E0808: the region has no extent across the direction.
- E1005: a radius in
cnsporcncyis not positive. - E0803: a node would carry more than three surfaces.
- E0102: a reduced index lies outside the part.
- E0106: a range of the region is written high to low.
Example
The script tests/corpus/140-ms-shorthand-planes/input.tg, which make test runs:
block 1 2 3;1 2;1 2 3;0 1 2;0 1;0 1 2;
ms 1 1 1 3 2 3 i ppx 0 1 2
ms 1 1 1 3 2 3 k pon 0 0 0 0 0 2 0 1 2
endpart
The first ms spans three i faces, and ppx 0 1 2 gives them the planes x = 0, 1 and 2. The second spans three k faces. Its pon has the point (0, 0, 0) and the normal (0, 0, 2), and the offsets 0, 1 and 2 are measured along the unit normal, so the planes are z = 0, 1 and 2. The IR holds six inline plane surfaces and two ms rows, each with steps [3 6 9].
See also
- sf: the projection of one region onto one surface.
- sd: defines the surfaces by number.
- Shaping a part: how projection works.