Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Geom

Hierarchy

  • Geom

Implements

Index

Constructors

constructor

  • Create a new Geom object from the Kernel.

    Parameters

    Returns Geom

Properties

Private _kernel

_kernel: Kernel

Methods

addCircle

  • Adds a new circle to the model.

    Parameters

    • origin_point: IPoint
    • x_vec: XYZ

      A vector in the local x direction, also defines the raidus.

    • vec: XYZ

      A vector in the plane

    • Optional angles: [number, number]

      The angles, can be undefined, in which case a closed conic is generated.

    Returns ICircle

    Object of type Circle

addEllipse

  • Adds a new ellipse to the model.

    Parameters

    • origin_point: IPoint
    • x_vec: XYZ

      A vector defining the radius in the local x direction.

    • vec: XYZ
    • Optional angles: [number, number]

      The angles, can be undefined, in which case a closed conic is generated.

    Returns IEllipse

    Object of type Ellipse

addPlane

  • Adds a new plane to the model.

    Parameters

    • origin_point: IPoint

      The plane origin point.

    • x_vec: XYZ

      A vector defining the x axis.

    • vec: XYZ

      A vector in the plane.

    Returns IPlane

    Object of type Plane

addPoint

  • Adds a new point to the model at position xyz.

    Parameters

    • xyz: XYZ

      xyz coordinates are required to create a point

    Returns IPoint

    A point instance.

addPoints

  • Adds a set of new points to the model, from an array of xyz coordinates.

    Parameters

    • xyz_arr: XYZ[]

    Returns IPoint[]

    An array Point instances.

addPolyline

  • Adds a new polyline to the model.

    Parameters

    • points: IPoint[]

      A collection of Points.

    • is_closed: boolean

      True if the polyline is closed.

    Returns IPolyline

    Object of type Polyline

addPolymesh

addRay

  • Adds a new ray to the model.

    Parameters

    • origin_point: IPoint

      The ray origin point.

    • ray_vec: XYZ

      A vector defining the direction of the ray.

    Returns IRay

    Object of type Ray

copyCircleFromModel

copyObjFromModel

copyObjsFromModel

  • copyObjsFromModel(objs: IObj[]): IObj[]

copyPlaneFromModel

copyPlineFromModel

copyPmeshFromModel

copyPointFromModel

  • Copies a point from another model to thid model.

    Parameters

    • point: IPoint

      The point to copy

    Returns IPoint

    A new point.

copyPointsFromModel

  • Copies a set of new points to the model, from an array of xyz coordinates.

    Parameters

    • points: IPoint[]

      An array of points to copy.

    Returns IPoint[]

    An array of new points.

copyRayFromModel

delObj

  • delObj(obj: IObj, keep_points?: boolean): boolean
  • Delete a single object.

    Parameters

    • obj: IObj
    • Default value keep_points: boolean = true

    Returns boolean

delObjs

  • delObjs(objs: IObj[], keep_points?: boolean): boolean
  • Delete an array of objects.

    Parameters

    • objs: IObj[]
    • Default value keep_points: boolean = true

    Returns boolean

delPoint

  • delPoint(point: IPoint): boolean

delPoints

  • delPoints(points: IPoint[]): boolean

findObjs

getAllObjs

  • getAllObjs(): IObj[]

getAllPoints

getObj

  • getObj(id: number): IObj

getObjs

  • getObjs(ids: number[]): IObj[]
  • Get an array of objects from an array of IDs.

    Parameters

    • ids: number[]

    Returns IObj[]

getPoint

  • getPoint(id: number): IPoint

getPoints

  • getPoints(ids: number[]): IPoint[]

getTopo

getTopoFromLabel

getTopos

mergeAllPoints

  • mergeAllPoints(tolerance: number): IPoint[]

mergePoints

  • mergePoints(points: IPoint[], tolerance?: number): IPoint[]

numObjs

  • numObjs(): number
  • Get the total number of objects in the model.

    Returns number

numPoints

  • numPoints(): number

numTopos

  • Get the number of topos in the model for a specific geom type. (Vertices, Edges, Wires, Faces.)

    Parameters

    Returns number

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc