brepjs API Reference
    Preparing search index...

    Interface FaceFinderFn

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

    Hierarchy (View Summary)

    Index

    Properties

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

    Intersect: element must match both this finder AND other.

    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<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[]) => ShapeFinder<Face>

    Filter to elements in a list. Returns new finder.

    negate: () => ShapeFinder<Face>

    Negate: invert all filters on this 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
    or: (other: ShapeFinder<Face>) => ShapeFinder<Face>

    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>) => ShapeFinder<Face>

    Add a custom predicate filter. Returns new finder.