brepjs API Reference
    Preparing search index...

    Interface FaceFinderFn

    interface FaceFinderFn {
        _filters: readonly Predicate<Face>[];
        _topoKind: "vertex" | "edge" | "wire" | "face";
        atDistance: (distance: number, point?: Vec3) => FaceFinderFn;
        either: (
            fns: ((f: ShapeFinder<Face>) => ShapeFinder<Face>)[],
        ) => ShapeFinder<Face>;
        findAll: (shape: AnyShape) => Face[];
        findUnique: (shape: AnyShape) => Result<Face>;
        inDirection: (dir?: Vec3 | "X" | "Y" | "Z", angle?: number) => FaceFinderFn;
        inList: (elements: Face[]) => ShapeFinder<Face>;
        not: (
            builderFn: (f: ShapeFinder<Face>) => ShapeFinder<Face>,
        ) => ShapeFinder<Face>;
        ofArea: (area: number, tolerance?: number) => FaceFinderFn;
        ofSurfaceType: (surfaceType: SurfaceType) => FaceFinderFn;
        parallelTo: (dir?: Vec3 | "X" | "Y" | "Z") => FaceFinderFn;
        shouldKeep: (element: Face) => boolean;
        when: (predicate: Predicate<Face>) => ShapeFinder<Face>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    _filters: readonly Predicate<Face>[]
    _topoKind: "vertex" | "edge" | "wire" | "face"
    atDistance: (distance: number, point?: Vec3) => FaceFinderFn
    either: (
        fns: ((f: ShapeFinder<Face>) => ShapeFinder<Face>)[],
    ) => ShapeFinder<Face>

    Combine filters with OR. Returns new finder.

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

    Find all matching elements from a shape.

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

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

    inDirection: (dir?: Vec3 | "X" | "Y" | "Z", angle?: number) => FaceFinderFn
    inList: (elements: Face[]) => ShapeFinder<Face>

    Filter to elements in a list. Returns new finder.

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

    Invert a filter. Returns new finder.

    ofArea: (area: number, tolerance?: number) => FaceFinderFn
    ofSurfaceType: (surfaceType: SurfaceType) => FaceFinderFn
    parallelTo: (dir?: Vec3 | "X" | "Y" | "Z") => FaceFinderFn
    shouldKeep: (element: Face) => boolean

    Check if an element passes all filters.

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

    Add a custom predicate filter. Returns new finder.