sfi

sfi is sf with an index progression in place of the region. The i means the command takes a progression. It does not mean inverse.

Syntax

sfi i_list ; j_list ; k_list ; sd surface
sfi i_list ; j_list ; k_list ; kind parameters

A progression is three lists, one for i, one for j and one for k, each ending in ;. An empty list means the whole range. Inside a progression a 0 separates unions and never means an extreme. A single negative number pins that index, so -1;;; selects the face at the lowest reduced i. The concepts chapter explains progressions.

The surface is a reference (sd and a number or name) or an inline definition. Both forms, and every kind that sd builds, are the same as for sf: the unbuilt kinds are E0801 and the others raise sd’s errors. A kind with a trans ; tail ends with the ;, even when the list is empty.

What it does

James expands the progression into regions and applies sf to each one. sf describes the projection.

When James applies it

As sf: steps 3, 6 and 9, chosen for each region by its shape. sfi is legal only in the Part phase.

Rules James adds

  • A progression that expands to no region warns (E0107) and the command is ignored.
  • A region that the progression expands to and that is a block is an error (E0807). A progression with no pinned index expands to blocks, so pin at least one index.
  • The rules of sf hold for each region: at most three surfaces per node, and an inline surface that you repeat is a second surface.

Diagnostics

  • E0800: the surface number or name is not defined.
  • E0801: the inline surface kind is not supported.
  • E1001 and E1014: a curve of an inline surface is not defined.
  • E0803: a node would carry more than three surfaces.
  • E0807: a region the progression expands to is a block.
  • E0101: a list holds one positive number, which selects nothing.
  • E0102: a reduced index lies outside the part.
  • E0103: an interval is written high to low.
  • E0107: the progression expands to no region.

Example

The script tests/golden/018-notched-plate/input.tg, which make test runs:

c A notched plate: a 3 by 3 grid of blocks, the top and bottom blocks of
c the middle column deleted by one progression with a union, and the
c outer faces of what remains projected onto a cylinder, so the square
c plate becomes a round one with two rectangular notches cut in from the
c rim.
sd 1 cyli 0 0 0 0 0 1 4
block 1 4 7 10;1 4 7 10;1 3;-3 -1 1 3;-3 -1 1 3;0 1;
dei 2 3;1 2 0 3 4;;
sfi -1 -4;;;sd 1
sfi ;-1 -4;;sd 1
endpart
merge
neutral
write

The plate is a 3 by 3 grid of blocks from -3 to 3, with the bottom and top blocks of the middle column deleted. sfi -1 -4;;; pins i to the reduced indices 1 and 4, which are the two outer faces in i, the regions [1 1 1 1 4 2] and [4 1 1 4 4 2] in the IR. sfi ;-1 -4;; does the same in j. All four faces go onto the cylinder sd 1, of radius 4, at steps 3, 6 and 9. The square plate becomes round, with two notches cut in from the rim. The neutral file holds 264 nodes and 126 elements, and 96 of the nodes lie on the cylinder.

A surface of a newer kind can be written inline too. The script tests/golden/066-cp-inline/input.tg, which make test runs:

c A 2D curve extended along the third dimension (cp): the square of the
c drill bit of the Examples manual, p. 81, extended along y then turned by
c rx 90 so that it runs along z, given inline to sfi; a block's face is
c projected onto the square prism's side x = 0.1 (the block starts clear of
c the prism's corners, so no node is equally near two sides).
ld 1 lp2 .1 .1 .1 -.1 -.1 -.1 -.1 .1 .1 .1;;
block 1 3;1 3;1 3;0.12 0.3 -0.05 0.05 0 1
sfi -1;;;cp 1 rx 90;
endpart
merge
neutral
write

The ld is a square of half-width 0.1 in the x-z plane. The inline cp 1 rx 90; extends it along y and turns it by 90 degrees about x, so the square prism runs along z. The block’s face at x = 0.12 lies just outside the prism’s side x = 0.1 and is projected onto it, so all nine of its nodes end on that side (a block starting at x = 0.05 would put the face’s corner nodes equally near two sides of the square, and either could take them). The tail rx 90; ends with its ;. The case writes 27 nodes and 8 elements.

See also

  • sf: the base command.
  • sd: defines the surface.
  • dei: deletes the two blocks that make the notches.
  • Concepts: progressions and the i suffix.

James 0.8.0.

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