brepjs API Reference
    Preparing search index...

    Class CompoundSketch

    Represent a face with holes as a group of sketches (one outer + zero or more inner).

    All contained sketches must share the same base surface. The first sketch is treated as the outer boundary; subsequent sketches define holes.

    Typically produced from a CompoundBlueprint via sketchOnPlane.

    The class methods are thin delegations to the canonical functions in sketchFns.ts (compoundSketchExtrude, compoundSketchRevolve, etc.).

    Sketch for single-wire profiles without holes.

    Implements

    Index
    sketches: Sketch[]
    • get wires(): Compound

      All wires (outer + holes) combined into a compound shape.

      Returns Compound

      Allocates a fresh compound on every access (via makeCompound) — it is a caller-owned kernel resource, not a cheap accessor. Dispose the returned compound (using/.delete()Symbol.dispose) or it leaks an arena slot on arena kernels. The sub-sketch wires themselves belong to this CompoundSketch and are freed with it.

    • Extrude the compound face (with holes) along the default or given direction.

      Supports twist and profile extrusions. For twist/profile modes each sub-sketch is extruded as a shell, then capped into a solid.

      Parameters

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

      Returns Shape3D