endpart
endpart ends the open part and meshes it.
Syntax
endpart
The command takes no argument.
What it does
endpart closes the part that block or cylinder opened, applies the part’s commands in the order of the hierarchy and builds its nodes and elements. A cylinder part is converted to Cartesian coordinates at this point. The session then returns to the Control phase, where a new part, a surface or a curve may be defined.
When James applies it
When it is read. The part’s own commands run then, each at its step of the hierarchy, whatever order the script wrote them in. endpart is legal only in the Part phase.
Rules James adds
- A part that is still open when
endis read, or when the input ends, is closed asendpartwould close it and kept. James warns (E0416) so that a forgottenendpartshows. - A
block,cylinderormergeread inside a part also closes it, soendpartis often unnecessary between parts. It keeps a script easy to read.
Diagnostics
- E0411: no part is open.
- E0416: related. James raises it at
endor at the end of the input, not at this command, when a part is still open.
Example
The script examples/two-blocks.tg, which make test runs:
c Two blocks of 3 x 3 x 3 nodes sharing the face x = 1. The stp command
c merges the nine nodes of the shared face and reports what it merged:
c 54 nodes become 45.
c
c james two-blocks.tg --format exodus -o two-blocks.exo
block 1 3;1 3;1 3;0 1;0 1;0 1;
endpart
block 1 3;1 3;1 3;1 2;0 1;0 1;
endpart
merge
stp .001
write
Each endpart meshes one block of 27 nodes. After merge, stp merges the nine nodes of the shared face, and the mesh has 45 nodes and 16 elements.