family
Import from bear/revit/family.
Interfaces
RevitAffine
Defined in: bear/revit/family.ts:50
c + Σ t[name]·value(name), feet.
Properties
RevitConnector
Defined in: bear/revit/family.ts:134
A connector's face: where it is, which way it faces, how big it is.
Properties
| Property | Type | Description |
|---|---|---|
description | string | - |
domain | string | Revit's domain and system, e.g. "DomainPiping" / "OtherPipe". |
height? | RevitAffine | - |
origin | RevitPoint | - |
radius? | RevitAffine | - |
ref | string | The ref this connector publishes. |
system | string | - |
width? | RevitAffine | - |
x | Vec3 | - |
z | Vec3 | Outward direction (Revit's basis z) and in-plane x. |
RevitFamilyOptions
Defined in: bear/revit/family.ts:419
Properties
| Property | Type | Description |
|---|---|---|
hosted? | RevitHosted | How a hosted family sits in its host. |
turn? | number | Degrees about z (a quarter turn's multiple) the family's frame turns about its origin, so a part's length runs along x the way Bear's do. |
RevitFamilyRecord
Defined in: bear/revit/family.ts:150
Properties
| Property | Type | Description |
|---|---|---|
connectors | RevitConnector[] | - |
division | string | - |
forms | RevitForm[] | - |
manufacturer | string | - |
material | MaterialDescriptor | Shades what no form's own material does: by-category forms, faces a cut opens. |
materials | Record<string, MaterialDescriptor> | The family's Revit materials its forms are drawn in, by Revit id. |
name | string | - |
url? | string | - |
validation? | object | The value that holds Revit's own configuration check, and what it says when it passes. |
validation.ok | string | - |
validation.value | string | - |
RevitForm
Defined in: bear/revit/family.ts:114
Properties
| Property | Type | Description |
|---|---|---|
cuts? | RevitSolidDef[] | Void forms cut from this one. |
id | number | Revit element id, for tracing a form back to the family. |
material? | string | Its Revit material, by id in the record's materials; none shades it in the record's material. |
name | string | - |
repeat? | object | A linear array's first member, the array moved to its last: count members in all, evenly between this one and one span away (whose own forms are the last member's); the ones between are copies of this. |
repeat.count | string | - |
repeat.span | RevitPoint | - |
solid | | RevitSolidDef | RevitSolvedTable | - |
visible? | string[] | The Yes/No values that must all be on to show it (its own, its nested instance's). |
RevitHosted
Defined in: bear/revit/family.ts:482
How a hosted family sits in its host: the host faces it reads and its
planes on them, from the family's values (see bear/revit/hosted.ts).
Properties
| Property | Type |
|---|---|
faces | Readonly<Record<string, readonly [(props) => unknown, string]>> |
mates | (values, host) => readonly (Omit<Mate, "on"> & object)[] |
RevitSolvedTable
Defined in: bear/revit/family.ts:106
A form whose sketch Revit solves non-linearly (a line that turns): one
solved definition per tuple of the options that turn it, each still
affine in the family's values. reason says which lines turn.
Properties
| Property | Type | Description |
|---|---|---|
entries | Record<string, RevitSolidDef> | By tupleKey of the keys' values. |
keys | string[] | - |
kind | "table" | - |
reason | string | - |
Type Aliases
RevitCurve
type RevitCurve =
| {
a: RevitPoint;
b: RevitPoint;
type: "line";
}
| {
a: RevitPoint | null;
b: RevitPoint | null;
center: RevitPoint;
normal: Vec3;
radius: RevitAffine;
type: "arc";
};Defined in: bear/revit/family.ts:57
RevitPoint
type RevitPoint = [RevitAffine, RevitAffine, RevitAffine];Defined in: bear/revit/family.ts:55
RevitSolidDef
type RevitSolidDef =
| {
end: RevitAffine;
kind: "extrusion";
loops: RevitCurve[][];
normal: Vec3;
start: RevitAffine;
}
| {
at: RevitPoint;
kind: "sweep";
path: RevitCurve[];
profile: RevitCurve[][];
}
| {
bottom: RevitCurve[];
bottomOffset: RevitAffine;
kind: "blend";
normal: Vec3;
top: RevitCurve[];
topOffset: RevitAffine;
}
| {
axis: Vec3;
end: number;
kind: "revolution";
loops: RevitCurve[][];
origin: RevitPoint;
start: number;
};Defined in: bear/revit/family.ts:68
Union Members
Type Literal
{
end: RevitAffine;
kind: "extrusion";
loops: RevitCurve[][];
normal: Vec3;
start: RevitAffine;
}Type Literal
{
at: RevitPoint;
kind: "sweep";
path: RevitCurve[];
profile: RevitCurve[][];
}| Name | Type | Description |
|---|---|---|
at | RevitPoint | The point on the path the profile is drawn at. |
kind | "sweep" | - |
path | RevitCurve[] | - |
profile | RevitCurve[][] | - |
Type Literal
{
bottom: RevitCurve[];
bottomOffset: RevitAffine;
kind: "blend";
normal: Vec3;
top: RevitCurve[];
topOffset: RevitAffine;
}Type Literal
{
axis: Vec3;
end: number;
kind: "revolution";
loops: RevitCurve[][];
origin: RevitPoint;
start: number;
}| Name | Type | Description |
|---|---|---|
axis | Vec3 | - |
end | number | - |
kind | "revolution" | - |
loops | RevitCurve[][] | - |
origin | RevitPoint | - |
start | number | Radians. |
RevitValue
type RevitValue = number | string | boolean;Defined in: bear/revit/family.ts:44
A computed parameter value: Yes/No as boolean, numbers in Revit internal units.
Functions
definitionAt()
function definitionAt(form, values): RevitSolidDef;Defined in: bear/revit/family.ts:176
A form's definition: its own, or Revit's for these values.
Parameters
| Parameter | Type |
|---|---|
form | RevitForm |
values | Values |
Returns
evaluateAffine()
function evaluateAffine(a, values): number;Defined in: bear/revit/family.ts:197
Parameters
| Parameter | Type |
|---|---|
a | RevitAffine |
values | Values |
Returns
number
formSolid()
function formSolid(form, values): Manifold;Defined in: bear/revit/family.ts:265
A form's solid, its voids cut out, with an array's copies between its first and last.
Parameters
| Parameter | Type |
|---|---|
form | RevitForm |
values | Values |
Returns
Manifold
revitFamily()
function revitFamily<P>(
record,
evaluate,
columns?,
options?
): PartDef<P, never, string>;Defined in: bear/revit/family.ts:317
The part for one family. evaluate returns the family's values by Revit
name; its props are the part's. columns names the options that make one
configuration a different product from another: the BOM consolidates
parts by kind and columns, so without them a 480 V and a 600 V set would
be one line.
Type Parameters
Parameters
| Parameter | Type |
|---|---|
record | RevitFamilyRecord |
evaluate | (props, host) => Values |
columns? | (props) => PartColumn[] |
options? | RevitFamilyOptions |
Returns
PartDef<P, never, string>
solidAt()
function solidAt(def, values): BrepSolid;Defined in: bear/revit/family.ts:227
A form's definition at these values, project units.
Parameters
| Parameter | Type |
|---|---|
def | RevitSolidDef |
values | Values |
Returns
tupleKey()
function tupleKey(values): string;Defined in: bear/revit/family.ts:171
The one spelling of a tuple of numbers (lengths in feet, Yes/No as 0/1), shared by the importer and the part: to a billionth of a foot, so two spellings of one formula agree.
Parameters
| Parameter | Type |
|---|---|
values | readonly number[] |
Returns
string