brepjs API Reference
    Preparing search index...

    Interface Blueprints

    Hold a collection of disjoint 2D profiles (simple or compound).

    Unlike CompoundBlueprint, the child blueprints here are independent shapes -- none is treated as a hole in another. Blueprints is the typical result of boolean operations that produce multiple disconnected regions.

    interface Blueprints {
        _boundingBox: BoundingBox2d | null;
        blueprints: (Blueprint | CompoundBlueprint)[];
        get boundingBox(): BoundingBox2d;
        get repr(): string;
        clone(): Blueprints;
        mirror(
            centerOrDirection: Point2D,
            origin?: Point2D,
            mode?: "plane" | "center",
        ): Blueprints;
        punchHole(
            shape: AnyShape<Dimension>,
            face: SingleFace,
            options?: { draftAngle?: number; height?: number; origin?: PointInput },
        ): AnyShape<Dimension>;
        rotate(angle: number, center?: Point2D): Blueprints;
        scale(scaleFactor: number, center?: Point2D): Blueprints;
        sketchOnFace(
            face: Face,
            scaleMode?: ScaleMode,
        ): (SketchData | SketchData[])[];
        sketchOnPlane(
            plane?: Plane | PlaneName,
            origin?: number | PointInput,
        ): (SketchData | SketchData[])[];
        stretch(ratio: number, direction: Point2D, origin: Point2D): Blueprints;
        toSVG(margin?: number): string;
        toSVGPaths(): string[][];
        toSVGViewBox(margin?: number): string;
        translate(xDist: number, yDist: number): Blueprints;
        translate(translationVector: Point2D): Blueprints;
    }

    Implements

    Index

    Properties

    _boundingBox: BoundingBox2d | null
    blueprints: (Blueprint | CompoundBlueprint)[]

    The independent profiles in this collection.

    Accessors

    Methods

    • Render a complete SVG document string for all child blueprints.

      Parameters

      • margin: number = 1

      Returns string

    • Return nested SVG path d string arrays -- one sub-array per child.

      Returns string[][]

    • Compute the SVG viewBox attribute for this collection.

      Parameters

      • margin: number = 1

      Returns string