de

de deletes the elements inside a region of the open part: the bricks and the shells.

Syntax

de imin jmin kmin imax jmax kmax

The six arguments are a region of reduced indices. A 0 in a minimum means the first reduced index of its direction and a 0 in a maximum the last, so de 0 0 0 0 0 0 names the whole part. The concepts chapter explains regions.

What it does

de marks every element inside the region as undefined. A region removes the bricks inside it and the shells whose four corners lie in it, so a face on a shell partition removes those shells and a block across a shell partition removes the shells of its plane that lie in the block. The parts chapter explains shell partitions. An undefined element carries no conditions, appears in no output and takes no part in the merge. The nodes stay in the part. A node that no remaining element uses is not written.

When James applies it

de is not one of the 21 steps. James folds the deletion into the part’s element mask when it builds the part, so the elements are masked before any step of the hierarchy runs. de is legal only in the Part phase.

Rules James adds

  • A region that holds no active element of either kind, brick or shell, is not an error. James warns warning: de region <imin> <jmin> <kmin> <imax> <jmax> <kmax> selects no element, with the region named and no code. A face on a solid partition, an edge and a vertex hold no element; so does a block whose every element is already deleted, so a second identical de warns.
  • A part whose every element is deleted is meshed and kept. James warns, and writes none of its nodes unless you pass --write-unref-nodes.

Diagnostics

  • E0404: a reduced index lies outside the part.
  • E0106: a minimum is larger than its maximum.

The two warnings above have no code.

Example

The script tests/corpus/147-part-all-deleted-warns/input.tg, which make test runs:

block 1 2;1 2;1 2;0 1;0 1;0 1;
de 1 1 1 2 2 2
block 1 2;1 2;1 2;2 3;0 1;0 1;
merge
neutral
write

The first part is one element, and de deletes it. James prints the warning in tests/corpus/147-part-all-deleted-warns/expected.diag.txt:

input.tg:1:1: warning: part #0 has no active element, so its 8 nodes are not written; --write-unref-nodes writes them
james: 0 errors, 1 warning

See also

  • dei: deletes the elements of a progression.
  • block: the part whose elements de deletes.
  • insprt: splits a block so that de can delete part of it.
  • Parts: carving a part.

James 0.8.0.

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