Bitbybit Docs
    Preparing search index...

    Class LoadSVGDto (Inputs.OCCT)

    SVG text and import options for svg.loadSVG and svg.loadSVGStructured: which elements to keep, whether to build faces, and how to scale and place the drawing.

    Index

    Constructors

    • Parameters

      • Optionalsvg: string
      • OptionalfaceStrategy: svgFaceStrategyEnum
      • OptionalmakeRibbons: boolean
      • OptionalincludeInvisible: boolean
      • OptionaljoinSegments: boolean
      • Optionaltolerance: number
      • Optionalscale: number
      • OptionalflipY: boolean
      • Optionalalignment: basicAlignmentEnum
      • Optionaldirection: Vector3
      • Optionalcenter: Point3

      Returns LoadSVGDto

    Properties

    svg: string

    The text of the SVG document.

    <svg width="19.125pt" height="19.125pt" viewBox="0 0 19.125 19.125" overflow="visible" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M11.122705,15.698935 L15.272235,15.698935 C15.57419,15.729545 15.91649,15.387245 15.88588,15.08529 L15.88588,4.039708 C15.91649,3.737754 15.57419,3.395453 15.272235,3.426065 L9.572815,3.426065 C9.27086,3.395453 8.92856,3.737754 8.95917,4.039708 L8.95917,6.945415 C8.95604,7.118435 9.042725,7.30507 9.17695,7.414295 C9.30713,7.528305 9.50566,7.58247 9.675705,7.55037 C10.575375,7.32287 11.76631,8.055895 11.96849,8.96159 C12.311025,9.824045 11.739055,11.10017 10.86733,11.418385 C10.660165,11.503245 10.50001,11.752675 10.509065,11.976365 L10.509065,15.08529 C10.47845,15.387245 10.82075,15.729545 11.122705,15.698935 z" stroke="#f0cebb" stroke-width="0.5" fill-opacity="0" /><path d="M8.913155,15.698935 L4.226653,15.698935 C3.924699,15.729545 3.582398,15.387245 3.613009,15.08529 L3.613009,4.039708 C3.582398,3.737754 3.924699,3.395453 4.226653,3.426065 L7.36326,3.426065 C7.665215,3.395453 8.00752,3.737754 7.976905,4.039708 L7.976905,9.5625 C7.9468,10.306505 8.479485,11.13613 9.16853,11.418385 C9.375695,11.503245 9.53585,11.752675 9.5268,11.976365 L9.5268,15.08529 C9.55741,15.387245 9.21511,15.729545 8.913155,15.698935 z" stroke="#f0cebb" stroke-width="0.5" fill-opacity="0" /></svg>
    
    faceStrategy: svgFaceStrategyEnum

    How filled shapes become faces: none keeps only wires, auto follows each element's fill rule, nonzero and evenOdd force a rule, perSubpath makes one face per closed subpath without holes.

    none
    
    makeRibbons: boolean

    Reserved for building ribbon faces from stroked paths; not supported yet, stroked paths stay wires.

    false
    
    includeInvisible: boolean

    When true, elements hidden by display: none or visibility: hidden are imported too.

    false
    
    joinSegments: boolean

    When true, consecutive segments of a subpath are merged into a single edge where they can be.

    true
    
    tolerance: number

    How far apart segment ends may be and still join, in model units.

    1e-7
    
    scale: number

    A factor applied to the SVG coordinates; 1 keeps the size.

    1
    
    flipY: boolean

    When true, Y is negated so the drawing comes out upright, since SVG has Y pointing down.

    true
    

    Which point of the drawing's bounding box sits on center; midMid centers it.

    midMid
    
    direction: Vector3

    The normal of the plane the drawing is laid on; the default lays it flat on the ground.

    [0, 1, 0]
    
    center: Point3

    The point the aligned drawing is placed at.

    [0, 0, 0]