Components, parameters & pins
A design is a set of component definitions, one of which is the root — the definition the file designates and the one that exports. Everything you draw lands in the body of some definition, so a chip authored as a single flat drawing is one definition whose body holds all of its channels, points and regions.
Definitions and placements
A definition is a template. Placing it inside another definition’s body creates a child that refers back to it, so editing the definition updates every placement of it at once.
Two placements of one definition are independent children. Position (pos), rotation
(rot) and layer belong to the placement; the shape belongs to the definition. Beside them
sit the args — one row per parameter — where you set what this placement passes in. An
argument you leave unset falls back to the parameter’s default.
Composition runs one way: a component cannot place itself, directly or through a chain of others. The app declines to author a placement that would close such a loop rather than letting you build one and meet it later.
Deleting a definition is refused while it is the root, and while another definition places it.
Parameters
A parameter is an input to the definition — what someone placing it can set. It has a name, a type, and usually a default.
There are four types. Number is a plain real value; where one is a length it is
micrometres, and where one is an angle it is radians. Int is a whole number, for counts
such as the turns in a meander. Vec2 is a pair, read with .x and .y. Bool is
true or false.
A parameter with no default reads (required), and every placement of the definition must supply an argument for it.
Computed values
A computed value is a name bound to an expression over the component’s parameters and its other computed values. Use one to state a relationship once — a chamber’s area from its width and length, a meander’s total length from its pitch and turn count — instead of repeating the arithmetic at every child that needs it.
Its type follows from the expression rather than being declared, which is why the inspector shows it in parentheses and does not let you edit it.
The expression language
Expressions are small and pure. There is nothing to assign, no loops, and no functions of your own.
Numbers carry units. 250um, 0.5mm, 2cm, 800nm, 45deg and 1.2rad are all
literals; the suffix folds to micrometres or radians, so 0.5mm and 500um are the same
value. pi, tau and e are constants.
Operators are arithmetic (+, -, *, /, %), comparison (==, !=, <, <=,
>, >=) and boolean (&&, ||, !). Division always produces a Number, so 3 / 2 is
1.5.
Conditionals are written if cond then a else b, and both arms must have the same type.
Functions are a fixed set: vec2, min, max, abs, clamp, sqrt, pow, floor,
ceil, round, sin, cos, tan, atan2. A name counts as a function only when a (
follows it, so a parameter may be called min without shadowing anything.
An expression sees the parameters and computed values of the component it is written in, and nothing else — not a child, not a sibling, not the component that placed this one. Values travel downward, through arguments.
An expression that does not parse never takes effect. One that parses but does not type-check leaves the component unresolvable: the reason appears under the inspector header, and the viewport goes on showing the last version that built.
Pins
A pin is a connection point a component exposes to whoever places it, and pins are its whole public surface. A channel in the parent attaches to a pin; everything behind the pin stays private, and is regenerated freely when the definition changes.
You create a pin by exposing a terminal, not by adding a row to a list. Right-click a point in the body and choose Expose as pin, or use the Expose button in its detail block. Right-click a placed component’s pin — or use the Expose button beside it — and that pin is forwarded outward under the same name. Unexpose removes one.
A pin’s name is separate from the label of the point behind it. The two start equal and the inspector shows one name while they are, so they diverge only when you rename the pin deliberately. Renaming or deleting a pin is refused while another component refers to it, and the tooltip lists what refers to it — the name is the contract other designs are written against.
World ports
The world checkbox marks a pin as a port open to the outside: an inlet, an outlet, a well you punch. Every other pin is an interior connection, sealed inside the assembled chip.
The built-in components leave world off. Whether a given inlet reaches the outside is
decided by the design that places them, so it is a setting you make on your own root
component.
Connections between components
Two pins never merge into one point. To join two placed components you draw a channel between their pins, however short — the connection is a channel, and there is always something between two things that are joined.
A pin named by two or more channel ends is a shared junction, so a fan-in is made by reusing one terminal rather than by merging several.
Built-in components
The Libraries tab lists components you did not author. The Built-ins group ships with the app:
- Serpentine — a square meander for mixing or delay, with
inletandoutletpins and a computedlength. - FlowFocusing — a droplet-forming junction:
dispersed,sheath_a,sheath_bandoutletarms meeting at a narrowed orifice. - Chamber — a rounded reservoir whose
corner_radiustakes it from a sharp rectangle through a stadium to a circle, withinletandoutlettaps on its wall.
Any .exw file that declares a library identity and sits beside the design you opened is
listed under a group of its own. A library component is read-only: opening one shows its
parameters, computed values and pins with no edit controls, and you set its arguments at
each placement as for any other component.
See also
- Inspector — the Params, Computed, Pins and Body tabs that edit everything on this page.
- Channels & points — the terminals a pin is exposed from.
- Components & Libraries — the browser the built-ins and library components are placed from.