brepjs API Reference
    Preparing search index...

    Interface BoundingBox2d

    Axis-aligned 2D bounding box backed by an kernel Bnd_Box2d.

    Provides bounds queries, containment tests, and union operations for spatial indexing of 2D geometry.

    interface BoundingBox2d {
        get bounds(): [Point2D, Point2D];
        get center(): Point2D;
        get height(): number;
        get repr(): string;
        get width(): number;
        get wrapped(): any;
        "[dispose]"(): void;
        add(other: BoundingBox2d): void;
        containsPoint(other: Point2D): boolean;
        delete(): void;
        isOut(other: BoundingBox2d): boolean;
        outsidePoint(paddingPercent?: number): Point2D;
    }
    Index

    Accessors

    Methods

    • Return a point guaranteed to lie outside the bounding box.

      Parameters

      • paddingPercent: number = 1

        Extra padding as a percentage of the box dimensions.

      Returns Point2D