Skip to Content
Bear documentation

brep

Import from bear/revit/brep.

Type Aliases

BrepCurve

type BrepCurve = 
  | {
  a: Vec3;
  b: Vec3;
  type: "line";
}
  | {
  a: Vec3 | null;
  b: Vec3 | null;
  center: Vec3;
  normal: Vec3;
  radius: number;
  type: "arc";
};

Defined in: bear/revit/brep.ts:20

An arc runs counterclockwise about its normal from a to b; with no ends it is a circle.


BrepSolid

type BrepSolid = 
  | {
  end: number;
  kind: "extrusion";
  loops: BrepCurve[][];
  normal: Vec3;
  start: number;
}
  | {
  at: Vec3;
  kind: "sweep";
  path: BrepCurve[];
  profile: BrepCurve[][];
}
  | {
  bottom: BrepCurve[];
  bottomOffset: number;
  kind: "blend";
  normal: Vec3;
  top: BrepCurve[];
  topOffset: number;
}
  | {
  axis: Vec3;
  end: number;
  kind: "revolution";
  loops: BrepCurve[][];
  origin: Vec3;
  start: number;
};

Defined in: bear/revit/brep.ts:31

Union Members

Type Literal
{
  end: number;
  kind: "extrusion";
  loops: BrepCurve[][];
  normal: Vec3;
  start: number;
}
NameTypeDescription
endnumber-
kind"extrusion"-
loopsBrepCurve[][]Closed loops on one plane.
normalVec3-
startnumberOffsets of the two caps from the loops' plane, along normal.

Type Literal
{
  at: Vec3;
  kind: "sweep";
  path: BrepCurve[];
  profile: BrepCurve[][];
}
NameTypeDescription
atVec3The point on the path the profile is drawn at, square to the path.
kind"sweep"-
pathBrepCurve[]-
profileBrepCurve[][]-

Type Literal
{
  bottom: BrepCurve[];
  bottomOffset: number;
  kind: "blend";
  normal: Vec3;
  top: BrepCurve[];
  topOffset: number;
}
NameTypeDescription
bottomBrepCurve[]-
bottomOffsetnumberOffsets of the two loops from their sketch planes, along normal.
kind"blend"A loft from one closed loop to another, on parallel planes: convex only.
normalVec3-
topBrepCurve[]-
topOffsetnumber-

Type Literal
{
  axis: Vec3;
  end: number;
  kind: "revolution";
  loops: BrepCurve[][];
  origin: Vec3;
  start: number;
}
NameTypeDescription
axisVec3-
endnumber-
kind"revolution"-
loopsBrepCurve[][]Closed loops on a plane through the axis, to one side of it.
originVec3The axis: a point on it and its direction.
startnumberAngles, radians, counterclockwise about the axis from the loops' plane.

Vec3

type Vec3 = [number, number, number];

Defined in: bear/revit/brep.ts:17

Functions

brepSolid()

function brepSolid(s, tol): Manifold;

Defined in: bear/revit/brep.ts:561

The solid, in the same units as its definition. tol is how close two ends must be to join.

Parameters

ParameterType
sBrepSolid
tolnumber

Returns

Manifold

On this page