de

de deletes the elements inside a region of the open part.

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. 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 element is not an error. James warns that de selects no element, and the warning names the region. A face, an edge or a vertex holds no element.
  • 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.3.1.

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