Wire a finish to the customer's choices — gull system handbook

Three patterns covering colour, texture and material — one choice, an entry carrying two things, or two inputs. And what an empty value means.

Wire a finish to the customer's choices

One rule drives one target. Every case — colour, texture, material, one choice or two — fits one of three patterns.

A part can carry a captured appearance (`appearance@Kryt kol`) and a captured material (`material@Kryt kol`). Each is its own target with its own rule in step 5. One input, though, can drive both rules — which is what the second pattern rests on.

Three patterns, and everything fits one

  1. One list, one choice. A List input points at a list in the library, and the rule on the target is simply that input's name: `[Barva]`, `[Textura]` or `[Materiál]`. Colour and texture are a rule on the appearance; material is a rule on the material — and with the material the mass and the cut list move too. A colour can also be written straight into the formula: `"#C92A2A"`. A material cannot — see the last section.
  2. One entry carries two things and the customer picks once. A tinted texture: the texture entry has its optional colour filled in ("Dub, mořený na tmavo"). The rule is still just `[Textura]`, and the customer gets the image tinted with that shade. A material with a colour: the material entry has its colour filled in ("Nerez červená" = AISI 304 + #FF0000). Both rules then point at the same input — `[Povrch]` on the material and `[Povrch]` on the appearance — and the customer picks once. ⚠ A material with a colour has one thing to watch: the appearance rule must point at the input that holds the material. Leave `VZHLED([Textura]; [Barva])` there and the colour comes from the Barva field while the shade stored on the material is never used. Both are legitimate setups — just choose which one you want.
  3. Two inputs, two choices. Texture and colour independently: two inputs joined in the appearance's formula, `VZHLED([Textura]; [Barva])`. The first argument is always the texture and the second the colour; swap them and gull system refuses and says which. Material and colour independently: two rules and two inputs — `[Materiál]` on the material and `[Barva]` on the appearance. This is the arrangement for painted steel, where one material carries twenty colours.

Texture size and rotation

  1. `VZHLED` takes two more optional arguments: `VZHLED([Textura]; [Barva]; 80; 45)`.
  2. The third is the scale in per cent — 100 % is the image's own size, and 25 % shrinks it to a quarter, making the pattern denser.
  3. The fourth is the rotation in degrees.
  4. Both can come from an input, so the customer can pick the grain size too: `VZHLED([Textura]; ""; [Velikost vzoru])`.

⚠ Scale and rotation apply to a texture only. They have nothing to act on in a plain colour, so gull system refuses them there rather than dropping them quietly.

Empty means skip

When a colour, texture or material rule produces no value, gull system sends nothing to the CAD. Specifically:

An empty value used to be refused as an error so that it would be noticed. In practice that meant every order where a customer left an optional finish blank came out as failed — which is why it changed.

How to make a finish genuinely optional

  1. Open step 4 and find the input in question — Barva, say.
  2. Delete its default. While it is there, an empty field in the form means the default, not "no colour".
  3. Try an order with the field left empty: the log should show Not set and the part should keep the finish it already had.

`VZHLED` is happy with one half. `VZHLED([Textura]; [Barva])` with an empty texture applies the colour alone, and the other way round. Both empty means skip.

Two things to finish with