Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace measure

Index

Functions

augment

  • 增强测量 - 添加更多属性,如中心点、高度和宽度.

    Parameters

    • measureToAugment: IMeasure

      The measurement to augment.

    Returns IMeasureWithCenter

    Measurement object with augmented properties.

boundingHexagon

  • 测量模型周围的最小边界六边形。六边形的方向使得左右两侧垂直,顶部和底部是尖的.

    Parameters

    • modelToMeasure: IModel

      The model to measure.

    Returns IBoundingHex

    IBoundingHex object which is a hexagon model, with an additional radius property.

increase

  • 在原有测量值上面增加一个新的测量值.

    Parameters

    • baseMeasure: IMeasure

      原有测量值.

    • addMeasure: IMeasure

      新的测量值.

    • Optional augmentBaseMeasure: boolean

      用于调用测量的可选标志。.

    Returns IMeasure

    增加的原始测量值(用于级联).

isAngleEqual

  • isAngleEqual(angleA: number, angleB: number, accuracy?: number): boolean
  • 确定两个角度是否相等.

    Parameters

    • angleA: number

      First angle.

    • angleB: number

      Second angle.

    • Default value accuracy: number = 0.0001

    Returns boolean

    true if angles are the same, false if they are not

isArcConcaveTowardsPoint

  • isArcConcaveTowardsPoint(arc: IPathArc, towardsPoint: IPoint): boolean
  • 检查弧是否朝向给定点凹陷或凸起.

    Parameters

    • arc: IPathArc

      The arc to test.

    • towardsPoint: IPoint

      The point to test.

    Returns boolean

    Boolean true if arc is concave towards point.

isArcSpanOverlapping

  • isArcSpanOverlapping(arcA: IPathArc, arcB: IPathArc, excludeTangents: boolean): boolean
  • 检查弧是否与另一个弧重叠.

    Parameters

    • arcA: IPathArc

      The arc to test.

    • arcB: IPathArc

      The arc to check for overlap.

    • excludeTangents: boolean

      布尔值以排除确切的端点并仅查找深度重叠.

    Returns boolean

    Boolean true if arcA is overlapped with arcB.

isBetween

  • isBetween(valueInQuestion: number, limitA: number, limitB: number, exclusive: boolean): boolean
  • 检查给定的数字是否在两个给定限制之间.

    Parameters

    • valueInQuestion: number

      The number to test.

    • limitA: number

      First limit.

    • limitB: number

      Second limit.

    • exclusive: boolean

      要排除等于限制的标志.

    Returns boolean

    Boolean true if value is between (or equal to) the limits.

isBetweenArcAngles

  • isBetweenArcAngles(angleInQuestion: number, arc: IPathArc, exclusive: boolean): boolean
  • 检查给定的角度是否介于弧的起始角和结束角之间.

    Parameters

    • angleInQuestion: number

      The angle to test.

    • arc: IPathArc

      Arc to test against.

    • exclusive: boolean

      要排除的标志等于开始或结束角度.

    Returns boolean

    如果角度介于(或等于)弧的起始角和结束角之间,则布尔值为 true.

isBetweenPoints

  • isBetweenPoints(pointInQuestion: IPoint, line: IPathLine, exclusive: boolean): boolean
  • 检查给定点是否位于线的端点之间.

    Parameters

    • pointInQuestion: IPoint

      The point to test.

    • line: IPathLine

      Line to test against.

    • exclusive: boolean

      要排除等于原点或终点的标志.

    Returns boolean

    Boolean true if point is between (or equal to) the line's origin and end points.

isBezierSeedLinear

  • 检查给定的贝塞尔种子是否具有同一斜率上的所有点.

    Parameters

    • seed: IPathBezierSeed

      The bezier seed to test.

    • Optional exclusive: boolean

      可选布尔值,仅在终结点边界内进行测试.

    Returns boolean

    如果贝塞尔种子在线斜率上和线端点之间具有控制点,则布尔值为 true.

isChainClockwise

  • isChainClockwise(chainContext: IChain, out_result?: { hullPoints?: IPoint[]; keyPoints?: IPoint[] }): boolean
  • 检查链中的路径流是否顺时针.

    Parameters

    • chainContext: IChain

      The chain to test.

    • Optional out_result: { hullPoints?: IPoint[]; keyPoints?: IPoint[] }

      可选输出对象(如果提供)将使用凸包结果填充.

      • Optional hullPoints?: IPoint[]
      • Optional keyPoints?: IPoint[]

    Returns boolean

    Boolean true if paths in the chain flow clockwise.

isLineOverlapping

  • isLineOverlapping(lineA: IPathLine, lineB: IPathLine, excludeTangents: boolean): boolean
  • 检查另一行是否重叠.

    Parameters

    • lineA: IPathLine

      The line to test.

    • lineB: IPathLine

      The line to check for overlap.

    • excludeTangents: boolean

      布尔值以排除确切的端点并仅查找深度重叠.

    Returns boolean

    Boolean true if lineA is overlapped with lineB.

isMeasurementOverlapping

  • 检查测量是否与另一个测量重叠.

    Parameters

    • measureA: IMeasure

      The measurement to test.

    • measureB: IMeasure

      The measurement to check for overlap.

    Returns boolean

    Boolean true if measureA is overlapped with measureB.

isPathEqual

  • isPathEqual(pathA: IPath, pathB: IPath, withinPointDistance?: number, pathAOffset?: IPoint, pathBOffset?: IPoint): boolean
  • 判断两条路径是否相等.

    Parameters

    • pathA: IPath

      First path.

    • pathB: IPath

      Second path.

    • Optional withinPointDistance: number
    • Optional pathAOffset: IPoint
    • Optional pathBOffset: IPoint

    Returns boolean

    true if paths are the same, false if they are not

isPointArrayClockwise

  • isPointArrayClockwise(points: IPoint[], out_result?: { hullPoints?: IPoint[]; keyPoints?: IPoint[] }): boolean
  • 检查点数组是否顺时针.

    Parameters

    • points: IPoint[]

      The array of points to test.

    • Optional out_result: { hullPoints?: IPoint[]; keyPoints?: IPoint[] }

      可选输出对象(如果提供)将使用凸包结果填充.

      • Optional hullPoints?: IPoint[]
      • Optional keyPoints?: IPoint[]

    Returns boolean

    Boolean true if points flow clockwise.

isPointDistinct

  • isPointDistinct(pointToCheck: IPoint, pointArray: IPoint[], withinDistance?: number): boolean
  • 确定点在点数组中是否不同.

    Parameters

    • pointToCheck: IPoint

      point to check.

    • pointArray: IPoint[]

      array of points.

    • Optional withinDistance: number

      将点视为相等的可选距离.

    Returns boolean

    false if point is equal to any point in the array.

isPointEqual

  • isPointEqual(a: IPoint, b: IPoint, withinDistance?: number): boolean
  • 判断两个点是否相等.

    Parameters

    • a: IPoint

      First point.

    • b: IPoint

      Second point.

    • Optional withinDistance: number

      将点视为相等的可选距离.

    Returns boolean

    true if points are the same, false if they are not

isPointInsideModel

  • 检查点是否在模型内部.

    Parameters

    • pointToCheck: IPoint

      The point to check.

    • modelContext: IModel

      The model to check against.

    • Default value options: IMeasurePointInsideOptions = {}

      可选的 IMeasurePointInsideOptions 对象。

    Returns boolean

    Boolean true if the path is inside of the modelContext.

isPointOnCircle

  • 确定点是否在圆上.

    Parameters

    • p: IPoint

      Point to check.

    • circle: IPathCircle

      Circle.

    • Default value withinDistance: number = 0

      可选公差距离.

    Returns boolean

    true if point is on the circle

isPointOnPath

  • 确定点是否位于路径上.

    Parameters

    • pointToCheck: IPoint

      point to check.

    • onPath: IPath

      path to check against.

    • Default value withinDistance: number = 0

      要考虑路径上点的可选距离.

    • Optional pathOffset: IPoint

      Optional offset of path from [0, 0].

    • Optional options: IIsPointOnPathOptions

      Optional IIsPointOnPathOptions to cache computation.

    Returns boolean

isPointOnSlope

  • isPointOnSlope(p: IPoint, slope: ISlope, withinDistance?: number): boolean
  • 确定点是否在斜坡上.

    Parameters

    • p: IPoint

      Point to check.

    • slope: ISlope
    • Default value withinDistance: number = 0

      可选公差距离.

    Returns boolean

    true if point is on the slope

isSlopeEqual

  • 判断坡度是否相等.

    Parameters

    • slopeA: ISlope

      The ISlope to test.

    • slopeB: ISlope

      The ISlope to check for equality.

    Returns boolean

    Boolean true if slopes are equal.

isSlopeParallel

  • 判断平行斜率.

    Parameters

    • slopeA: ISlope

      The ISlope to test.

    • slopeB: ISlope

      The ISlope to check for parallel.

    Returns boolean

    Boolean true if slopes are parallel.

lineSlope

modelExtents

  • 测量包含模型的最小矩形.

    Parameters

    • modelToMeasure: IModel

      The model to measure.

    • Optional atlas: Atlas

      Optional atlas to save measurements.

    Returns IMeasureWithCenter

    object with low and high points.

modelPathLength

  • modelPathLength(modelToMeasure: IModel): number
  • 测量模型中所有路径的长度.

    Parameters

    • modelToMeasure: IModel

      The model containing paths to measure.

    Returns number

    Length of all paths in the model.

pathExtents

  • 计算包含路径的最小矩形.

    Parameters

    • pathToMeasure: IPath

      The path to measure.

    • Optional addOffset: IPoint

    Returns IMeasure

    object with low and high points.

pathLength

  • pathLength(pathToMeasure: IPath): number
  • 测量路径的长度.

    Parameters

    • pathToMeasure: IPath

      The path to measure.

    Returns number

    Length of the path.

pointDistance

  • 计算两点之间的距离.

    Parameters

    Returns number

    Distance between points.

Generated using TypeDoc