expose()
Publishes a named piece of the part's geometry — the part's geometry
interface, the outbound counterpart of param() (values in) and
connector() (mate frames out). Declared inside a part(...) block,
the exposure registers on the part and other parts consume the SOURCE
through def.features.<name>:
export const p1 = part('Part1', () => {
const s = sketch('xz', () => { ... }).reusable();
expose('profile', s);
});
// consumer part:
extrude(15, p1.features.profile);
Accepts any scene object — a sketch, a face/edge selection, a plane, an axis, or a feature. Raw values are not allowed: an exposure must be tied to real geometry so it re-derives correctly on every render.
Returns: SceneObject
See the guide for detailed usage examples.
Signatures
expose(name: string, source: SceneObject): SceneObject
Publishes a named piece of the part's geometry — the part's geometry
interface, the outbound counterpart of param() (values in) and
connector() (mate frames out). Declared inside a part(...) block,
the exposure registers on the part and other parts consume the SOURCE
through def.features.<name>:
export const p1 = part('Part1', () => {
const s = sketch('xz', () => { ... }).reusable();
expose('profile', s);
});
// consumer part:
extrude(15, p1.features.profile);
Accepts any scene object — a sketch, a face/edge selection, a plane, an axis, or a feature. Raw values are not allowed: an exposure must be tied to real geometry so it re-derives correctly on every render.
| Parameter | Type | Description |
|---|---|---|
name | string | Identifier the exposure is registered under. |
source | SceneObject | The scene object published under def.features.<name>. |