Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace exporter

Index

Functions

Const getCirclePolygonCoordinates

  • getCirclePolygonCoordinates(center: { x: number; y: number }, radius: number, points?: number, startAngle?: number, endAngle?: number, includeCenterWhenArc?: boolean): number[][]
  • 得到圆或圆弧的离散化的多边形的点

    Parameters

    • center: { x: number; y: number }

      中心点

      • x: number
      • y: number
    • radius: number

      半径

    • Default value points: number = 360

      离散化的个数

    • Default value startAngle: number = 0

      开始角度

    • Default value endAngle: number = 360

      结束角度

    • Default value includeCenterWhenArc: boolean = false

      如果是圆弧时,最后一个点加上中心点

    Returns number[][]

getDwgColorByIndex

  • getDwgColorByIndex(index: number, isHtmlColor?: boolean): string | number[]
  • 通过颜色索引获取dwg的颜色.

    Parameters

    • index: number

      颜色索引.

    • Optional isHtmlColor: boolean

      是否转成html格式的颜色.

    Returns string | number[]

    颜色值.

toDWG

  • 导出为DWG格式,返回结果为dwg格式的json数据或geojson数据.

    Parameters

    Returns string

    String of json content.

  • 导出为DWG格式,返回结果为dwg格式的json数据或geojson数据.

    Parameters

    Returns string

    String of json content.

  • 导出为DWG格式,返回结果为dwg格式的json数据或geojson数据.

    Parameters

    Returns string

    String of json content.

toJson

  • 导出为JSON格式.

    Parameters

    • itemToExport: any

      要导出的项:可以是路径、路径数组或模型对象.

    • Default value options: IJsonExportOptions = {}

      Rendering options object.

    Returns string

    String of content.

Const wrap

  • wrap(n: number, min: number, max: number, isMin?: boolean): number
  • Parameters

    • n: number
    • min: number
    • max: number
    • Default value isMin: boolean = false

    Returns number

Object literals

colors

colors: object

Named colors, safe for CSS and DXF

aqua

aqua: number = 4

black

black: number = 0

blue

blue: number = 5

fuchsia

fuchsia: number = 6

gray

gray: number = 9

green

green: number = 94

lime

lime: number = 3

maroon

maroon: number = 14

navy

navy: number = 174

olive

olive: number = 58

orange

orange: number = 30

purple

purple: number = 214

red

red: number = 1

silver

silver: number = 254

teal

teal: number = 134

white

white: number = 7

yellow

yellow: number = 2

Generated using TypeDoc