Bitbybit Docs
    Preparing search index...

    Class DrawOcctShapeOptions (Inputs.Draw)

    Feeds draw.optionsOcctShape: everything about how an OCCT shape is drawn, from meshing precision to face, edge and vertex colors, index labels, arrows and the triangulation cache.

    Index

    Constructors

    • Provide options without default values

      Parameters

      • OptionalfaceOpacity: number
      • OptionaledgeOpacity: number
      • OptionaledgeColour: string
      • OptionalfaceMaterial: any
      • OptionalfaceColour: string
      • OptionaledgeWidth: number
      • OptionaldrawEdges: boolean
      • OptionaldrawFaces: boolean
      • OptionaldrawVertices: boolean
      • OptionalvertexColour: string
      • OptionalvertexSize: number
      • Optionalprecision: number
      • OptionaldrawEdgeIndexes: boolean
      • OptionaledgeIndexHeight: number
      • OptionaledgeIndexColour: string
      • OptionaldrawFaceIndexes: boolean
      • OptionalfaceIndexHeight: number
      • OptionalfaceIndexColour: string
      • OptionaldrawTwoSided: boolean
      • OptionalbackFaceColour: string
      • OptionalbackFaceOpacity: number
      • OptionaledgeArrowSize: number
      • OptionaledgeArrowAngle: number
      • OptionalkeepMeshData: boolean
      • OptionalallowQualityDecrease: boolean
      • OptionalforceFaceDeflection: boolean
      • OptionaldrawIsoCurves: boolean
      • OptionalisoCurvesU: number
      • OptionalisoCurvesV: number
      • OptionalisoCurvesColour: string
      • OptionalsurfaceAnalysis: surfaceAnalysisEnum
      • OptionaldraftDirection: Vector3
      • OptionalanalysisMin: number
      • OptionalanalysisMax: number

      Returns DrawOcctShapeOptions

    Properties

    faceOpacity?: number

    Face opacity value between 0 and 1

    1
    

    0

    1

    0.1

    edgeOpacity?: number

    Edge opacity value between 0 and 1

    1
    

    0

    1

    0.1

    edgeColour?: string

    Hex color string for the edges

    #ffffff
    
    faceColour?: string

    Hex color string for face color

    #ff0000
    
    vertexColour?: string

    Color of the vertices that will be drawn

    #ff00ff
    
    faceMaterial?: any

    An engine material for the faces, used instead of faceColour when given

    undefined
    

    true

    edgeWidth?: number

    Thickness of the drawn edge lines

    2
    

    0

    Infinity

    0.1

    vertexSize?: number

    The size of a vertices that will be drawn

    0.03
    

    0

    Infinity

    0.01

    drawEdges?: boolean

    You can turn off drawing of edges via this property

    true
    
    drawFaces?: boolean

    You can turn off drawing of faces via this property

    true
    
    drawVertices?: boolean

    You can turn off drawing of vertexes via this property

    false
    
    precision?: number

    Precision of the mesh that will be generated for the shape, lower number will mean more triangles

    0.01
    

    0

    Infinity

    0.01

    drawEdgeIndexes?: boolean

    Draw index of edges in space

    false
    
    edgeIndexHeight?: number

    Indicates the edge index height if they are drawn

    0.06
    

    0

    Infinity

    0.01

    edgeIndexColour?: string

    Edge index color if the edges are drawn

    #ff00ff
    
    drawFaceIndexes?: boolean

    Draw indexes of faces in space

    false
    
    faceIndexHeight?: number

    Indicates the edge index height if they are drawn

    0.06
    

    0

    Infinity

    0.01

    faceIndexColour?: string

    Edge index color if the edges are drawn

    #0000ff
    
    drawTwoSided?: boolean

    Draw two-sided faces with different colors for front and back. This helps visualize face orientation.

    true
    
    backFaceColour?: string

    Hex color string for back face color (negative side of the face). Only used when drawTwoSided is true.

    #0000ff
    
    backFaceOpacity?: number

    Back face opacity value between 0 and 1. Only used when drawTwoSided is true.

    1
    

    0

    1

    0.1

    edgeArrowSize?: number

    Size of arrow heads at the end of edges to indicate edge/wire orientation. Set to 0 to disable arrows.

    0
    

    0

    Infinity

    0.01

    edgeArrowAngle?: number

    Angle of the arrow head in degrees. Controls how wide the arrow head spreads.

    15
    

    0

    90

    1

    keepMeshData?: boolean

    Keep the cached triangulation on the shape after meshing. When false (default) the mesh data is flushed so it does not accumulate in memory across draws.

    false
    
    allowQualityDecrease?: boolean

    Allow re-meshing to a lower resolution triangulation than one already cached on the shape.

    true
    
    forceFaceDeflection?: boolean

    Force every face to be re-meshed to the requested precision regardless of cached triangulation.

    false
    
    drawIsoCurves?: boolean

    When true, each face's iso curves are drawn with the shape, as its edges are: at edgeWidth and edgeOpacity, in isoCurvesColour.

    false
    
    isoCurvesU?: number

    How many iso curves of constant u each face gets with drawIsoCurves, at values spread evenly inside its u range and trimmed to the face.

    5
    

    0

    1000

    1

    isoCurvesV?: number

    How many iso curves of constant v each face gets with drawIsoCurves, at values spread evenly inside its v range and trimmed to the face.

    5
    

    0

    1000

    1

    isoCurvesColour?: string

    The color of the iso curves as a hex string.

    #808080
    
    surfaceAnalysis?: surfaceAnalysisEnum

    The surface analysis coloring the faces instead of faceColour and faceMaterial, from blue at analysisMin through green to red at analysisMax; vertices without a value keep faceColour.

    none
    
    draftDirection?: Vector3

    The pull direction the draft angles are measured against; read only by draftAngle.

    [0, 1, 0]
    
    analysisMin?: number

    The analysis value drawn blue, and anything below it; left out, the lowest finite value found.

    undefined
    

    true

    analysisMax?: number

    The analysis value drawn red, and anything above it; left out, the highest finite value found.

    undefined
    

    true