edge

edge asks to put the nodes of one mesh edge on a boundary edge of a surface. In this version of James the engine refuses it for every surface James has.

Syntax

edge imin jmin kmin imax jmax kmax s.e
  • imin to kmax: a region of reduced indices that must be an edge: two of the three pairs are equal. A 0 in a minimum means the first reduced index of its direction and a 0 in a maximum the last.
  • s.e: one word, a surface number s, a dot and an edge number e from 1 to 4. The surface is one that sd defined.

What it does

The command names a boundary edge of a bounded surface and asks for the edge’s nodes to follow it. James does not place any node yet, for the reason under Rules below.

When James applies it

Step 2 of the hierarchy, with the other edge commands, after every vertex has been placed. edge is legal only in the Part phase. The engine refuses it when it reaches the step.

Rules James adds

  • The engine returns an error for every surface of this version, and the message names the surface and its kind. A plane, a cylinder, a cone and a sphere have no boundary edge. A composite has none of its own. A surface of revolution built on an open curve has two rims, but placing nodes along a rim needs a circle that the curve modules cannot represent.
  • The surface kinds that will give edge something to attach to are bounded surfaces, which come with a later version. Their rims become edges 1 and 2. The compatibility chapter says when.
  • The edge number is checked as soon as James reads it. A number outside 1 to 4 is E0604 at that point. A surface number that names no surface is also E0604, which James reports when the part ends, because an sd after the edge may still define it.
  • The message counts surfaces from 0 in the order of definition, so the first sd is surface #0 whatever number it carries.

Diagnostics

  • E0600: the region is not an edge.
  • E0604: the surface or the edge number does not exist.
  • E0102: a reduced index lies outside the part.
  • E0106: a minimum is larger than its maximum.

The refusal itself has no code. The run ends with exit status 2, the status of an engine error.

Example

The script tests/corpus/176-edge-refused-no-surface-edge/input.tg, which make test runs:

c edge asks for edge 1 of surface 1; a plane has no edge, so the engine refuses.
sd 1 plan 0 0 0 0 0 1
block 1 3;1 3;1 2;0 1;0 1;0 1;
edge 1 1 1 2 1 1 1.1
endpart

The sd defines surface 1 as a plane. The edge asks for its edge 1. James prints the engine’s error in tests/corpus/176-edge-refused-no-surface-edge/expected.diag.txt and exits with status 2:

input.tg:4:1: error: edge 1.1 names surface #0, a plane, which has no boundary edge in this version of James
james: 1 error, 0 warnings

See also

  • cur: attaches an edge to a 3D curve, which works today.
  • splint: builds a spline through an edge’s vertices.
  • Geometry: surfaces.
  • Shaping: shaping edges.

James 0.3.1.

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