bitbybit.dev v1.0.0-rc.1
    Preparing search index...

    Class DimensionRenderingService

    Service for creating shared 3D and GUI rendering elements used across all dimension types. Eliminates code duplication by providing common mesh and text creation functionality.

    Index

    Constructors

    Methods

    • Creates a line mesh using tube geometry with consistent styling

      Parameters

      • scene: Scene

        The Babylon scene

      • points: Vector3[]

        Array of Vector3 points defining the line path

      • name: string

        Name for the mesh

      • style: DimensionStyleDto

        Dimension style containing appearance settings

      • dimensionType: string

        Type of dimension for metadata

      Returns Mesh

      The created line mesh

    • Creates an arrow mesh (cone) with consistent styling

      Parameters

      • scene: Scene

        The Babylon scene

      • position: Vector3

        Position for the arrow

      • direction: Vector3

        Direction the arrow should point

      • name: string

        Name for the mesh

      • style: DimensionStyleDto

        Dimension style containing appearance settings

      • dimensionType: string

        Type of dimension for metadata

      Returns Mesh

      The created arrow mesh

    • Creates a 3D text mesh using DimensionText3D

      Parameters

      • scene: Scene

        The Babylon scene

      • text: string

        The text content

      • position: Vector3

        Position for the text

      • style: DimensionStyleDto

        Dimension style containing appearance settings

      Returns DimensionText3D

      The created DimensionText3D instance

    • Creates GUI text elements (anchor, container, text block) with consistent styling

      Parameters

      • scene: Scene

        The Babylon scene

      • adt: AdvancedDynamicTexture

        Advanced Dynamic Texture for GUI

      • text: string

        The text content

      • position: Vector3

        Position for the text anchor

      • style: DimensionStyleDto

        Dimension style containing appearance settings

      Returns GuiTextElements

      Object containing the created GUI elements

    • Creates a center mark (crossing lines) for radial/diametral dimensions

      Parameters

      • scene: Scene

        The Babylon scene

      • center: Vector3

        Center position for the mark

      • style: DimensionStyleDto

        Dimension style containing appearance settings

      • dimensionType: string

        Type of dimension for metadata

      Returns Mesh

      The merged center mark mesh