Bitbybit Docs
    Preparing search index...

    Class DimensionStyleDto (Advanced.Dimensions)

    Colors, sizes and label settings shared by every dimension kind, built by advanced.dimensions.dimensionStyle and passed as style. Lengths are in model units; label background measures are in pixels of the label's texture.

    Index

    Constructors

    • Parameters

      • OptionallineColor: string
      • OptionallineThickness: number
      • OptionalextensionLineLength: number
      • OptionalarrowTailLength: number
      • OptionaltextColor: string
      • OptionaltextSize: number
      • OptionaltextFontWeight: number
      • OptionaltextBackgroundColor: string
      • OptionaltextBackgroundOpacity: number
      • OptionaltextBackgroundStroke: boolean
      • OptionaltextBackgroundStrokeThickness: number
      • OptionaltextBackgroundRadius: number
      • OptionaltextStableSize: boolean
      • OptionalarrowSize: number
      • OptionalarrowColor: string
      • OptionalshowArrows: boolean
      • OptionaltextBillboard: boolean
      • OptionalocclusionCheckInterval: number
      • OptionalalwaysOnTop: boolean

      Returns DimensionStyleDto

    Properties

    lineColor: string

    Color of the dimension, extension and leader lines and of the center mark, drawn unlit so it reads the same under any lighting.

    #ffffff
    
    lineThickness: number

    Diameter of the tubes the lines are drawn as, in model units.

    0.01
    

    0.01

    0.5

    0.01

    extensionLineLength: number

    How far extension lines run past the dimension line, in model units. Linear dimensions scale it by the length of their direction; radial, diametral and ordinate ones draw no extension lines.

    0.2
    

    0

    Infinity

    0.1

    arrowTailLength: number

    Length in model units of the short line that continues past each arrowhead; 0 draws none. Only linear and angular dimensions draw it.

    0.2
    

    0

    Infinity

    0.1

    textColor: string

    Color of the label text, and of the outline around its background when textBackgroundStroke is set.

    #ffffff
    
    textSize: number

    Label size: 16 makes the label plane 0.3 model units tall, and the plane scales in proportion.

    16
    

    0

    Infinity

    2

    textFontWeight: number

    Weight of the label's Arial font, as in CSS: 400 is regular and 700 bold.

    400
    

    100

    900

    100

    textBackgroundColor: string

    Fill color behind the label; it shows only when textBackgroundOpacity is above 0.

    #000000
    
    textBackgroundOpacity: number

    Opacity of the label background, from 0 for none to 1 for solid. The default 0 shows no background.

    0.0
    

    0

    1

    0.1

    textBackgroundStroke: boolean

    Draws an outline in the text color around the label background, whatever its opacity.

    false
    
    textBackgroundStrokeThickness: number

    Width of the background outline in pixels of the label's texture, on which the text is eight times textSize pixels tall.

    8
    

    1

    20

    1

    textBackgroundRadius: number

    Corner radius of the label background in pixels of the label's texture, on which the text is eight times textSize pixels tall.

    40
    

    0

    100

    5

    textStableSize: boolean

    Rescales the label every frame by its camera distance divided by 10, so it keeps the size it has 10 model units from the camera.

    false
    
    arrowSize: number

    Arrowhead size in model units: each cone is twice this long and 1.5 times this wide. Center marks span four times this.

    0.05
    

    0

    Infinity

    0.01

    arrowColor: string

    Color of the arrowheads, drawn unlit like the lines.

    #ffffff
    
    showArrows: boolean

    Draws the cone arrowheads; when false the lines end bare.

    true
    
    textBillboard: boolean

    Turns the label to face the camera every frame; when false it stays a flat plane parallel to the XY plane.

    true
    
    occlusionCheckInterval: number

    Has no effect: labels are planes in the scene, hidden behind other geometry by depth unless alwaysOnTop is set.

    100
    

    50

    1000

    50

    alwaysOnTop: boolean

    Draws the label over other geometry instead of letting it be hidden. Lines and arrowheads are not affected.

    false