brepjs API Reference
    Preparing search index...

    Interface SketchInterface

    Common interface for sketch-like objects that can be extruded, revolved, or lofted.

    interface SketchInterface {
        extrude(
            extrusionDistance: number,
            extrusionConfig?: {
                extrusionDirection?: PointInput;
                extrusionProfile?: ExtrusionProfile;
                origin?: PointInput;
                twistAngle?: number;
            },
        ): Shape3D;
        face(): Face;
        loftWith(
            otherSketches: SketchInterface | SketchInterface[],
            loftConfig: CleanLoftOptions,
            returnShell?: boolean,
        ): Shape3D;
        revolve(
            revolutionAxis?: PointInput,
            config?: { origin?: PointInput },
        ): Shape3D;
    }

    Implemented by

    Index

    Methods

    • Extrudes the sketch to a certain distance (along the default direction and origin of the sketch).

      You can define another extrusion direction or origin,

      It is also possible to twist extrude with an angle (in degrees), or to give a profile to the extrusion (the endFactor will scale the face, and the profile will define how the scale is applied (either linearly or with a s-shape).

      Parameters

      • extrusionDistance: number
      • OptionalextrusionConfig: {
            extrusionDirection?: PointInput;
            extrusionProfile?: ExtrusionProfile;
            origin?: PointInput;
            twistAngle?: number;
        }

      Returns Shape3D