brepjs API Reference
    Preparing search index...

    Interface FaceFinderFn

    interface FaceFinderFn {
        _filters: readonly Predicate<Face>[];
        _topoKind: TopoKind;
        and: (other: ShapeFinder<Face>) => this;
        atDistance: (distance: number, point?: Vec3) => FaceFinderFn;
        either: (fns: ((f: this) => ShapeFinder<Face>)[]) => this;
        findAll: (shape: AnyShape<Dimension>) => Face[];
        findUnique: (shape: AnyShape<Dimension>) => Result<Face>;
        inDirection: (dir?: DirectionInput, angle?: number) => FaceFinderFn;
        inList: (elements: Face[]) => this;
        negate: () => this;
        not: (builderFn: (f: this) => ShapeFinder<Face>) => this;
        ofArea: (area: number, tolerance?: number) => FaceFinderFn;
        ofSurfaceType: (surfaceType: SurfaceType) => FaceFinderFn;
        or: (other: ShapeFinder<Face>) => this;
        parallelTo: (dir?: DirectionInput) => FaceFinderFn;
        shouldKeep: (element: Face) => boolean;
        when: (predicate: Predicate<Face>) => this;
    }

    Hierarchy (View Summary)

    Index
    _filters: readonly Predicate<Face>[]
    _topoKind: TopoKind
    and: (other: ShapeFinder<Face>) => this

    Intersect: element must match both this finder AND other.

    atDistance: (distance: number, point?: Vec3) => FaceFinderFn
    either: (fns: ((f: this) => ShapeFinder<Face>)[]) => this

    Combine filters with OR. Returns new finder.

    findAll: (shape: AnyShape<Dimension>) => Face[]

    Find all matching elements from a shape.

    findUnique: (shape: AnyShape<Dimension>) => Result<Face>

    Find exactly one matching element. Returns error if 0 or more than 1 match.

    inDirection: (dir?: DirectionInput, angle?: number) => FaceFinderFn
    inList: (elements: Face[]) => this

    Filter to elements in a list. Returns new finder.

    negate: () => this

    Negate: invert all filters on this finder.

    not: (builderFn: (f: this) => ShapeFinder<Face>) => this

    Invert a filter. Returns new finder.

    ofArea: (area: number, tolerance?: number) => FaceFinderFn
    ofSurfaceType: (surfaceType: SurfaceType) => FaceFinderFn
    or: (other: ShapeFinder<Face>) => this

    Union: element must match this finder OR other.

    parallelTo: (dir?: DirectionInput) => FaceFinderFn
    shouldKeep: (element: Face) => boolean

    Check if an element passes all filters.

    when: (predicate: Predicate<Face>) => this

    Add a custom predicate filter. Returns new finder.