brepjs API Reference
    Preparing search index...

    Function complexExtrude

    • Extrude a wire along a normal with optional profile scaling.

      Builds a linear spine from center to center + normal and sweeps the profile wire. When profileShape is provided, a scaling law (s-curve or linear) modulates the cross-section size along the path.

      Parameters

      • wire: Wire

        The profile wire to sweep.

      • center: Vec3

        Start point of the extrusion spine.

      • normal: Vec3

        Direction and length of the extrusion. Must be non-zero.

      • OptionalprofileShape: ExtrusionProfile

        Optional scaling profile applied along the extrusion.

      • shellMode: boolean = false

        When true, return [shell, startWire, endWire] instead of a solid.

      Returns Result<Shape3D | [Shape3D, Wire, Wire]>

      Result containing the extruded shape or a shell tuple.

      const tapered = complexExtrude(wire, [0,0,0], [0,0,50], {
      profile: 'linear', endFactor: 0.5
      });

      extrude!complexExtrude | complexExtrude (OOP) for the class-based equivalent.