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: LoftOptions,
            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

    • Loft between this sketch and another sketch (or an array of them)

      You can also define a startPoint for the loft (that will be placed before this sketch) and an endPoint after the last one.

      You can also define if you want the loft to result in a ruled surface.

      Note that all sketches will be deleted by this operation

      Parameters

      Returns Shape3D