Bitbybit Docs
    Preparing search index...

    Class DrawOcctShapeOptions (Inputs.Draw)

    Built by draw.optionsOcctShape for OCCT shapes: meshing, which faces, edges, vertices and labels show in what colors, iso curves, surface analysis and caching. Shapes with an appearance and design builds skip vertices, labels, arrows, iso curves, analysis and faceMaterial.

    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
      • OptionaledgeContrast: number
      • OptionalangularDeflection: number
      • OptionalrelativeDeflection: boolean

      Returns DrawOcctShapeOptions

    Properties

    faceOpacity?: number

    How opaque the faces are, from 0 for invisible to 1 for opaque, multiplied into each look's own opacity. A faceMaterial replaces it.

    1
    

    0

    1

    0.1

    edgeOpacity?: number

    How opaque the edge and iso curve lines are, from 0 for invisible to 1 for opaque.

    1
    

    0

    1

    0.1

    edgeColour?: string

    The color of the edges, as a hex string, unless edgeContrast derives it from the faces; the edge colors of an appearance win over both.

    #ffffff
    
    edgeContrast?: number

    Edges take their faces' color moved toward black, or toward white on dark faces, by this amount from 0 to 1, instead of edgeColour. Appearance edge colors still win.

    undefined
    

    true

    0

    1

    0.05

    faceColour?: string

    The color of the faces, as a hex string. A faceMaterial or a surfaceAnalysis takes its place, and the colors of an appearance win over it.

    #ff0000
    
    vertexColour?: string

    The color of the vertex markers, as a hex string; used with drawVertices.

    #ff00ff
    
    faceMaterial?: any

    An engine material for the faces, such as draw.createPBRMaterial makes; it replaces faceColour and faceOpacity, and a surfaceAnalysis replaces it in turn.

    undefined
    

    true

    edgeWidth?: number

    The width of the edge and iso curve lines, a hundredth of it in model units.

    2
    

    0

    Infinity

    0.1

    vertexSize?: number

    The diameter of the vertex markers, in model units; used with drawVertices.

    0.03
    

    0

    Infinity

    0.01

    drawEdges?: boolean

    When false, the edges are not drawn. Drawn edges or iso curves push the faces back slightly in depth so the lines show on top.

    true
    
    drawFaces?: boolean

    When false, the faces and their backs are not drawn and no surfaceAnalysis is computed; the face index labels still are.

    true
    
    drawVertices?: boolean

    When true, each vertex of the shape is drawn as a small sphere in vertexColour, vertexSize across.

    false
    
    precision?: number

    The largest distance, in model units, the triangles and edge lines may stray from the curved shape; smaller is finer and heavier.

    0.01
    

    0

    Infinity

    0.01

    angularDeflection?: number

    The largest angle, in radians, a curved face may turn between neighboring triangles; smaller follows curvature more closely with more triangles.

    0.5
    

    0.001

    3.14159

    0.05

    relativeDeflection?: boolean

    When true, precision is a fraction of each edge's and face's size instead of model units, so small and large parts get triangles in proportion to their size.

    false
    
    drawEdgeIndexes?: boolean

    When true, each edge's index is written beside the middle of the edge, handy for picking edges to fillet.

    false
    
    edgeIndexHeight?: number

    The height of the edge index labels, in model units; they are drawn as lines in a plane parallel to XY.

    0.06
    

    0

    Infinity

    0.01

    edgeIndexColour?: string

    The color of the edge index labels, as a hex string.

    #ff00ff
    
    drawFaceIndexes?: boolean

    When true, each face's index is written near the middle of the face, handy for picking faces.

    false
    
    faceIndexHeight?: number

    The height of the face index labels, in model units; they are drawn as lines in a plane parallel to XY.

    0.06
    

    0

    Infinity

    0.01

    faceIndexColour?: string

    The color of the face index labels, as a hex string.

    #0000ff
    
    drawTwoSided?: boolean

    When true, the back of each face is drawn in backFaceColour, which shows which way faces point. A design build draws no backs.

    true
    
    backFaceColour?: string

    The color of the back of the faces, as a hex string; used with drawTwoSided.

    #0000ff
    
    backFaceOpacity?: number

    How opaque the back of the faces is, from 0 for invisible to 1 for opaque; used with drawTwoSided.

    1
    

    0

    1

    0.1

    edgeArrowSize?: number

    The length of an arrow head at the end of each edge, showing its direction, in model units; 0 draws none.

    0
    

    0

    Infinity

    0.01

    edgeArrowAngle?: number

    The angle, in degrees, between each line of an arrow head and its edge; larger spreads the head wider.

    15
    

    0

    90

    1

    keepMeshData?: boolean

    When true, the triangulation stays cached on each shape after drawing; when false it is cleared so memory does not grow across draws.

    false
    
    allowQualityDecrease?: boolean

    When true, a shape already meshed more finely may be remeshed at the coarser precision asked for.

    true
    
    forceFaceDeflection?: boolean

    When true, every face is remeshed at the requested precision even when a triangulation is cached.

    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, in degrees, are measured against; read only when surfaceAnalysis is 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