brepjs API Reference
    Preparing search index...

    Interface KernelTopologyOps

    interface KernelTopologyOps {
        adjacentFaces(shape: any, face: any): any[];
        copyShape(shape: any): any;
        downcast(shape: any, type?: ShapeType): any;
        edgeToFaceMap(shape: any): string;
        hashCode(shape: any, upperBound: number): number;
        isEqual(a: any, b: any): boolean;
        isNull(shape: any): boolean;
        isSame(a: any, b: any): boolean;
        iterShapeList(list: any, callback: (item: any) => void): void;
        iterShapes(shape: any, type: ShapeType): any[];
        sew(shapes: any[], tolerance?: number): any;
        shapeOrientation(shape: any): ShapeOrientation;
        shapeType(shape: any): ShapeType;
        sharedEdges(faceA: any, faceB: any): any[];
    }
    Index

    Methods

    • Return an independently-disposable duplicate of a shape.

      downcast is a cast, not a copy: on the occt-wasm arena kernel a same-type downcast returns the very same handle id, so disposing the "copy" would free the source. copyShape guarantees a handle that can be disposed without affecting the source — a real geometric copy where a primitive exists (occt-wasm k.copy), or the safe existing duplicate on kernels that never free handles individually (brepkit/manifold) or share refcounted geometry (occt Embind).

      Parameters

      • shape: any

      Returns any

    • Compute a hash code for a shape (used for face tracking).

      Parameters

      • shape: any
      • upperBound: number

      Returns number

    • Iterate a TopTools_ListOfShape, calling a callback for each item.

      Parameters

      • list: any
      • callback: (item: any) => void

      Returns void