Bitbybit Docs
    Preparing search index...

    Class ShapeToMeshDto<T> (Inputs.OCCT)

    A shape and meshing settings for shapeToMesh, which triangulates the shape for drawing, and can add each face's iso curves and a surface analysis value at every vertex.

    Type Parameters

    • T
    Index

    Constructors

    • Type Parameters

      • T

      Parameters

      • Optionalshape: T
      • Optionalprecision: number
      • OptionaladjustYtoZ: boolean
      • OptionalcomputeMetadata: boolean
      • OptionalkeepMeshData: boolean
      • OptionalallowQualityDecrease: boolean
      • OptionalforceFaceDeflection: boolean
      • OptionalisoCurvesU: number
      • OptionalisoCurvesV: number
      • OptionalsurfaceAnalysis: surfaceAnalysisEnum
      • OptionaldraftDirection: Vector3
      • OptionalangularDeflection: number
      • OptionalrelativeDeflection: boolean

      Returns ShapeToMeshDto<T>

    Properties

    shape: T

    The shape to triangulate.

    undefined
    
    precision?: number

    The meshing tolerance in model units; a smaller value follows curved surfaces more closely with more triangles.

    0.01
    

    0

    true

    Infinity

    0.001

    angularDeflection?: number

    The largest angle, in radians, a curved face may turn between neighbouring 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
    
    adjustYtoZ?: boolean

    When true, the mesh is turned so this library's Y-up becomes Z-up, for tools that treat Z as up.

    false
    
    computeMetadata?: boolean

    When true, each face and edge entry also carries its area or length, center of mass, surface or curve type, tolerance and neighbors, at extra cost.

    false
    
    keepMeshData?: boolean

    When true, the triangulation stays on the shape for the next mesh with the same settings to reuse; when false it is cleared. A mesh retention budget keeps every mesh.

    false
    
    allowQualityDecrease?: boolean

    When true, a face whose triangulation is not within 10% of the precision it needs is meshed again; when false, a finer one is kept.

    true
    
    forceFaceDeflection?: boolean

    When true, every face is meshed at exactly the requested precision; when false, a face's precision is raised to the average of its edges' and to twice its tolerance.

    false
    
    isoCurvesU?: number

    How many iso curves of constant u each face gets in isoCurveList, spread evenly inside its u range and trimmed to the face; 0 gives none.

    0
    

    0

    1000

    1

    isoCurvesV?: number

    How many iso curves of constant v each face gets in isoCurveList, spread evenly inside its v range and trimmed to the face; 0 gives none.

    0
    

    0

    1000

    1

    surfaceAnalysis?: surfaceAnalysisEnum

    What each face's analysisValues hold, one value per vertex: a curvature, the smallest bending radius, or the draft angle in degrees. none leaves them out.

    none
    
    draftDirection?: Vector3

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

    [0, 1, 0]