brepjs API Reference
    Preparing search index...

    Function roof

    • Create a roof solid from a planar wire using the straight skeleton algorithm. Each polygon edge produces a sloped face rising toward the skeleton ridge.

      Parameters

      • w: ShapeHandle & { "[___brand]": "wire"; "[___dim]": Dimension } & {
            "[___closed]": true;
        } & { "[___planar]": true }

        A planar wire defining the roof footprint

      • Optionaloptions: RoofOptions

        Optional angle (degrees) for the roof slope

      Returns Result<ValidSolid>

      A Result containing the roof Solid, or an error