Bitbybit Docs
    Preparing search index...

    Class Dimensions

    Measurement annotations drawn in the 3D scene: linear, angular, radial, diametral and ordinate dimensions, each made of thin tube lines, cone arrowheads and a text label that shows the measured value. A dimension method returns an entity rather than drawing it; pass that entity to draw.drawAnyAsync to add it to the scene. dimensionStyle sets the colors and sizes every kind shares, and advanced.navigation holds the camera tools.

    Index

    Constructors

    dimensions

    • Describes a dimension that shows the straight-line distance between two points, ready to draw.

      The dimension line joins the two points shifted by direction, an extension line runs from each point past it, and the label sits at its middle. Pass the result to draw.drawAnyAsync to add it to the scene.

      Parameters

      • inputs: LinearDimensionDto

        The two points, the offset of the dimension line, how the label reads and the style

      Returns LinearDimensionEntity

      A linear dimension entity to draw

      const length = bitbybit.advanced.dimensions.linearDimension({
      startPoint: [0, 0, 0], endPoint: [5, 0, 0], direction: [0, 1, 0],
      });
    • Describes a dimension showing the angle between two directions from a center point, ready to draw.

      An arc of radius spans the smaller angle between them, with a line along each direction and the label beyond the arc's middle. The value is in radians whatever radians says, so use labelOverwrite to show degrees. Pass the result to draw.drawAnyAsync to draw it.

      Parameters

      • inputs: AngularDimensionDto

        The center point, the two directions, the arc radius, how the label reads and the style

      Returns AngularDimensionEntity

      An angular dimension entity to draw

      const angle = bitbybit.advanced.dimensions.angularDimension({
      centerPoint: [0, 0, 0], direction1: [1, 0, 0], direction2: [0, 1, 0], radius: 2,
      });
    • Describes a dimension showing the radius of a circle or arc from its center, ready to draw.

      A line runs from centerPoint to radiusPoint, arrowed at the rim, with the label beyond it prefixed with R, or with the diameter sign and twice the value when showDiameter is set. Pass the result to draw.drawAnyAsync to draw it.

      Parameters

      • inputs: RadialDimensionDto

        The center, a point on the rim, how the label reads, the center mark and the style

      Returns RadialDimensionEntity

      A radial dimension entity to draw

      const radius = bitbybit.advanced.dimensions.radialDimension({
      centerPoint: [0, 0, 0], radiusPoint: [2, 0, 0], showDiameter: false,
      });
    • Describes a dimension showing a circle's diameter as a line across its full width, ready to draw.

      A line of length diameter runs through centerPoint along direction, arrowed at both ends, with the label beside the center after a diameter sign. The value shown is diameter as given, not measured from any geometry. Pass the result to draw.drawAnyAsync to draw it.

      Parameters

      • inputs: DiametralDimensionDto

        The center, direction and length of the diameter line, how the label reads and the style

      Returns DiametralDimensionEntity

      A diametral dimension entity to draw

      const diameter = bitbybit.advanced.dimensions.diametralDimension({
      centerPoint: [0, 0, 0], direction: [1, 0, 0], diameter: 4,
      });
    • Describes a dimension showing a point's distance from a reference point along one axis, ready to draw.

      The label shows the measured point's coordinate minus the reference point's, prefixed with the axis letter, and a leader line joins it to the measured point. Pass the result to draw.drawAnyAsync to add it to the scene.

      Parameters

      • inputs: OrdinateDimensionDto

        The measured and reference points, the axis, how the label reads and the style

      Returns OrdinateDimensionEntity

      An ordinate dimension entity to draw

      const ordinate = bitbybit.advanced.dimensions.ordinateDimension({
      measurementPoint: [5, 3, 2], referencePoint: [0, 0, 0], axis: Bit.Advanced.Dimensions.ordinateAxisEnum.x,
      });

    style

    • Builds the look of a dimension: the colors and sizes of its lines, arrowheads and label.

      The inputs come back unchanged, ready to pass as style to any dimension of this class.

      Parameters

      • inputs: DimensionStyleDto

        Colors, sizes and label settings for dimension lines, arrowheads and text

      Returns DimensionStyleDto

      The same style