brepjs API Reference
    Preparing search index...

    Class Sketches

    Batch wrapper around multiple Sketch or CompoundSketch instances.

    Applies the same operation (extrude, revolve, etc.) to every contained sketch and returns the results combined into a single compound shape.

    Implements SketchInterface so it is interchangeable with a single Sketch in the chained Drawing.sketchOnPlane(...).extrude() style. Operations with no per-profile batch meaning (face, loftWith, sweepSketch) require a single contained profile and otherwise throw.

    Implements

    Index
    sketches: (Sketch | CompoundSketch)[]
    • 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
      • extrusionConfig: {
            extrusionDirection?: PointInput;
            extrusionProfile?: ExtrusionProfile;
            origin?: PointInput;
            twistAngle?: number;
        } = {}

      Returns Compound

    • All contour wires combined into a single compound shape.

      Returns Compound

      Allocates a fresh compound on every call — the result is a caller-owned kernel resource. Dispose it (using/Symbol.dispose) or it leaks an arena slot on arena kernels.