gcode-preview - v3.0.0-alpha.5
    Preparing search index...

    Axis-aligned wireframe box, used for the build volume outline and the bounding box around the rendered G-code model

    Only the 12 edges are drawn, no faces. The box spans from the origin to (x, y, -z): the depth is negated to match the scene's z-flip convention (see BuildVolume.createAxes), so callers pass their world-space depth as a positive number.

    Hierarchy

    • LineSegments
      • LineBox
    Index

    Constructors

    • Creates a new LineBox instance

      Parameters

      • x: number

        Width of the box

      • y: number

        Height of the box

      • z: number

        Depth of the box, drawn towards negative z

      • color: string | number | Color

        Color of the box edges

      • dashed: boolean = true

        Whether to draw dashed instead of solid lines (default: true)

      Returns LineBox

    Methods

    • Frees the GPU resources held by the box's geometry and material(s)

      Returns void

    • Creates the edge geometry of a box spanning (0, 0, 0) to (x, y, z)

      Parameters

      • x: number

        Width of the box

      • y: number

        Height of the box

      • z: number

        Depth of the box, unnegated

      Returns BufferGeometry

      BufferGeometry holding the box's 12 edges as line segment pairs