Options
All
  • Public
  • Public/Protected
  • All
Menu

Kernel Class This class controls all acces to the data and ensures that the data remains consistent. No other class should have any direct access to this data.

Hierarchy

  • Kernel

Index

Constructors

Properties

Methods

Constructors

constructor

  • Construct a new model. If data is provided, the model will be populated with this data.

    Parameters

    Returns Kernel

Properties

Private _attribs

_attribs: Map<EGeomType, Map<string, IAttribData>>

Private _geom

_geom: IGeom

Private _groups

_groups: Map<string, IGroupData>

Private _metadata

_metadata: IMetadata

Private _model

_model: IModel

Private _objs

_objs: TObjData[]

Private _points

_points: TPointsData

Private _topos_trees

_topos_trees: Map<string, ITopoTree>

Methods

Private _copiedObjAddToAttribs

  • _copiedObjAddToAttribs(old_id: number, new_id: number, copy_attribs: boolean): void
  • This method assumes that the object id is for a copied object. It populates attribute values for all attributes in the model.

    Parameters

    • old_id: number
    • new_id: number
    • copy_attribs: boolean

    Returns void

Private _copiedPointAddToAttribs

  • _copiedPointAddToAttribs(new_id: number, old_id: number, copy_attribs: boolean): void
  • This method assumes that the point id is for a copied point. It populates attribute values for all point attributes in the model.

    Parameters

    • new_id: number
    • old_id: number
    • copy_attribs: boolean

    Returns void

Private _delVertexFromObj

  • When the vertex is deleted, all subsequent vertices get renumbered. Deleting a vertex also result in two edges being merged, and any subsequent edges being renumbered. Deleting the vertex may result in either a wire or face being deleted, or might even result in the whole object being deleted. This method also updates the attributes in the model.

    Parameters

    Returns void

Private _depreceated_addTopoAttribValue

  • Add an attributes value.

    Parameters

    • name: string
    • geom_type: EGeomType
    • path: ITopoPathData

      The path to a geometric entity or topological component.

    Returns boolean

    True if the path does not exist.

Private _depreceated_delPointFromObjs

  • _depreceated_delPointFromObjs(id: number): void
  • This method assumes that the id is for a point that is about to be deleted. It deletes the attributs values for all attributes in the model.

    Parameters

    • id: number

    Returns void

Private _depreceated_delTopoAttribValue

  • Delete an attribute value.

    Parameters

    • name: string
    • geom_type: EGeomType
    • path: ITopoPathData

      The path to a geometric entity or topological component.

    Returns any

    The attribute value.

Private _distanceSquared

  • _distanceSquared(i_pos: XYZ, j_pos: XYZ, tolerance: number): XYZ

Private _findPolymeshWires

  • _findPolymeshWires(face_ids: number[][]): number[][]
  • Find all the wires in a polymesh

    Parameters

    • face_ids: number[][]

    Returns number[][]

    Object of type Polymesh

Private _getVEPathsFromObjsData

  • _getVEPathsFromObjsData(objs_data: any[], v_or_e: 0 | 1): ITopoPathData[]
  • Loop through all the objects, and create paths for vertices and edges Used in geomGetTopoPaths() method

    Parameters

    • objs_data: any[]
    • v_or_e: 0 | 1

    Returns ITopoPathData[]

Private _getVEPathsFromWF

  • _getVEPathsFromWF(path_arr: ITopoPathData[], obj_id: number, wf_data: any[], wf_topos: 0 | 1, v_or_e: 0 | 1): void
  • Used by _getVEPathsFromObjsData

    Parameters

    • path_arr: ITopoPathData[]
    • obj_id: number
    • wf_data: any[]
    • wf_topos: 0 | 1
    • v_or_e: 0 | 1

    Returns void

Private _getWFPathsFromObjsData

  • _getWFPathsFromObjsData(objs_data: any[], wf_topos: 0 | 1): ITopoPathData[]
  • Loop through all the objects, and create paths for wires or faces Used in geomGetTopoPaths() method

    Parameters

    • objs_data: any[]
    • wf_topos: 0 | 1

    Returns ITopoPathData[]

Private _newAttribAddObjsAndPoints

  • _newAttribAddObjsAndPoints(name: string, geom_type: EGeomType): void
  • This method assumes that the attribute name is for a newly created attribute. For ell existing point or object in the model, it assigns null values. If the new attrib is a point attrib, then all points in the model will get a null value for this attrib. If the new attrib is any other type of attribute (obj, vertex, edge, wire, face), then also null values will be created for all those types. Care has to be taken with sparse arrays. Points and objects are stored in sparse arrays. The index into the array is the ID of the point or object. The values[0] array for any attribute needs to have the exact same structure as the point or object arrays. This means that empty slots need to be duplicated.

    Parameters

    Returns void

Private _newObjAddToAttribs

  • _newObjAddToAttribs(new_id: number): void
  • This method assumes that the object id is for a newly created object. It creates null attribute values for all attributes in the model.

    Parameters

    • new_id: number

    Returns void

Private _newPointAddToAttribs

  • _newPointAddToAttribs(id: number): void
  • This method assumes that the point id is for a newly created point. It creates null attribute values for all point attributes in the model.

    Parameters

    • id: number

    Returns void

Private _objsDense

Private _purgeDelSparsePoints

  • _purgeDelSparsePoints(): void

Private _purgeDelUnusedPointValues

  • _purgeDelUnusedPointValues(): void

Private _purgeDelUnusedPoints

  • _purgeDelUnusedPoints(): void

Private _swapAllObjsPoint

  • _swapAllObjsPoint(old_id: number, new_id: number): void
  • Swaps a point in all objs in the model.

    Parameters

    • old_id: number
    • new_id: number

    Returns void

Private _swapObjPoint

  • _swapObjPoint(obj_id: number, old_id: number, new_id: number): void
  • Swaps one point in obj.

    Parameters

    • obj_id: number
    • old_id: number
    • new_id: number

    Returns void

Private _swapObjPoints

  • _swapObjPoints(obj_id: number, old_ids: number[], new_ids: number[]): void
  • Swaps points in obj.

    Parameters

    • obj_id: number
    • old_ids: number[]
    • new_ids: number[]

    Returns void

Private _updateAttribsAndGroupsChangedTopo

  • _updateAttribsAndGroupsChangedTopo(id: number, new_topo: number[][][]): void
  • Compares the existing topo of an obj to this new topo. If there are any differences, then attribs and groups are all updated to relflect the changes. Finally, the topo for this obj is set to new topo.

    Parameters

    • id: number
    • new_topo: number[][][]

    Returns void

Private _updateAttribsAndGroupsChangedWiresOrFaces

  • _updateAttribsAndGroupsChangedWiresOrFaces(id: number, tt: 0 | 1, new_topo: number[][]): void
  • Compares the existing wires/faces of an obj to the new wires/faces. If there are any differences, then attribs and groups are all updated to relflect the new changes. Finally, the wires/faces for this obj is set to new wires/faces.

    Parameters

    • id: number
    • tt: 0 | 1
    • new_topo: number[][]

    Returns void

Private _updateAttribsAndGroupsForDelTopo

  • Deletes this topo from attributes and groups, it calls methods below

    Parameters

    Returns void

Private _updateAttribsForDelFace

Private _updateAttribsForDelObj

  • _updateAttribsForDelObj(obj_id: number): void
  • Deletes this obj from all attributes

    Parameters

    • obj_id: number

    Returns void

Private _updateAttribsForDelPoint

  • _updateAttribsForDelPoint(id: number): void
  • Delete this point from all point attribs

    Parameters

    • id: number

    Returns void

Private _updateAttribsForDelVertexOrEdge

Private _updateAttribsForDelWire

Private _updateAttribsForNewFace

  • Adds this face to all face attributes and sets the attrib value to null.

    Parameters

    Returns void

Private _updateAttribsForNewTopo

Private _updateAttribsForNewVertexOrEdge

  • Adds this vertex or edge to vertex and edge attributes and sets the attrib value to null.

    Parameters

    Returns void

Private _updateAttribsForNewWire

  • Adds this wire to all wire attributes and sets the attrib value to null.

    Parameters

    Returns void

Private _updateAttribsSetToNull

  • _updateAttribsSetToNull(value_indexes: any[], path: ITopoPathData): void
  • Adds this vertex or edge to vertex and edge attributes and sets the attrib value to null.

    Parameters

    Returns void

Private _updateGroupsForDelObj

  • _updateGroupsForDelObj(obj_id: number): void
  • Deletes this obj from all groups

    Parameters

    • obj_id: number

    Returns void

Private _updateGroupsForDelPoint

  • _updateGroupsForDelPoint(id: number): void
  • Delete this point from all groups

    Parameters

    • id: number

    Returns void

Private _updateGroupsForDelTopo

Private _updateObjsForDelPoint

  • _updateObjsForDelPoint(id: number): void
  • Delete this point->vertex from all objs

    Parameters

    • id: number

    Returns void

attribCount

  • attribCount(name: string, geom_type: EGeomType): number
  • Get the number of attribute values. If the attribis an entAttrib, then this is equal to the number of points or objects. If it is a topoAttrib, then this is equal to the number of topo entities in the model of that type.

    Parameters

    Returns number

    The numbe of attribute values.

attribGetDataType

attribGetNames

  • attribGetNames(geom_type: EGeomType): string[]

attribGetValues

  • attribGetValues(name: string, geom_type: EGeomType): any[]
  • Get all the values for the attribute.

    Parameters

    Returns any[]

    An array of values.

attribSetName

  • attribSetName(old_name: any, new_name: any, geom_type: EGeomType): boolean
  • to be completed

    Parameters

    • old_name: any
    • new_name: any
    • geom_type: EGeomType

    Returns boolean

edgeGetTopo

edgeGetVertices

edgeNext

edgePrevious

edgeSplit

  • Inserts an extra point into an edge, thereby making two edges. This requires all edge attributes to be updated.

    Parameters

    Returns ITopoPathData

    The path to the new vertex.

entAttribGetIDs

  • entAttribGetIDs(name: string, geom_type: EGeomType): number[]
  • Get all the labels for the attribute.

    Parameters

    Returns number[]

    A sparse array of values.

entAttribGetValue

  • entAttribGetValue(name: string, geom_type: EGeomType, id: number): any
  • Get a single attribute value. The data type of the attribute value can be found using the getDataType() method.

    Parameters

    • name: string
    • geom_type: EGeomType
    • id: number

      The id of a geometric entity.

    Returns any

    The value.

entAttribSetValue

  • entAttribSetValue(name: string, geom_type: EGeomType, id: number, value: any): any
  • Set a single attribute value. The data type of the attribute value must match the getDataType() method.

    Parameters

    • name: string
    • geom_type: EGeomType
    • id: number

      The id of a geometric entity.

    • value: any

      The new value.

    Returns any

    The old value.

geomAddCircle

  • geomAddCircle(origin_id: number, axes: [XYZ, XYZ, XYZ], angles?: [number, number]): number
  • Adds a new ellipse to the model defined by origin and two vectors for the x and y axes, and two angles.

    Parameters

    • origin_id: number

      The origin point.

    • axes: [XYZ, XYZ, XYZ]

      Three orthogonal axes as XYZ vectors

    • Optional angles: [number, number]

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

    Returns number

    ID of object.

geomAddEllipse

  • geomAddEllipse(origin_id: number, axes: [XYZ, XYZ, XYZ], angles?: [number, number]): number
  • Adds a new ellipse to the model defined by origin and two vectors for the x and y axes, and two angles.

    Parameters

    • origin_id: number

      The origin point.

    • axes: [XYZ, XYZ, XYZ]

      Three orthogonal axes as XYZ vectors

    • Optional angles: [number, number]

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

    Returns number

    ID of object.

geomAddPlane

  • geomAddPlane(origin_id: number, axes: [XYZ, XYZ, XYZ]): number
  • Adds a new plane to the model defined by an origin and two vectors.

    Parameters

    • origin_id: number

      The plane origin point.

    • axes: [XYZ, XYZ, XYZ]

      Three orthogonal aaxes as XYZ vectors

    Returns number

    ID of object.

geomAddPoint

  • geomAddPoint(xyz: XYZ): number
  • Adds a new point to the model at position xyz.

    Parameters

    Returns number

    a instance of type Point is returned

geomAddPoints

  • geomAddPoints(xyzs: XYZ[]): number[]
  • Add a set of points to the model based on an array of xyz positions.

    Parameters

    Returns number[]

geomAddPolyline

  • geomAddPolyline(point_ids: number[], is_closed: boolean): number
  • Adds a new polyline to the model that passes through a sequence of points.

    Parameters

    • point_ids: number[]
    • is_closed: boolean

      Indicates whether the polyline is closed.

    Returns number

    ID of object.

geomAddPolymesh

  • geomAddPolymesh(face_points_ids: number[][]): number
  • to be completed

    Parameters

    • face_points_ids: number[][]

    Returns number

    ID of object.

geomAddRay

  • geomAddRay(origin_id: number, ray_vec: XYZ): number
  • Adds a new ray to the model that passes through a sequence of points.

    Parameters

    • origin_id: number
    • ray_vec: XYZ

    Returns number

    ID of object.

geomCalcPointsCentroid

  • geomCalcPointsCentroid(ids: number[]): XYZ
  • Calculates the centroid of a set of points, as the average of all point positions.

    Parameters

    • ids: number[]

    Returns XYZ

geomCopyObj

  • geomCopyObj(id: number, copy_attribs?: boolean): number
  • Copy and object. If copy_attribs is true, then the copied object will have the same attributes as the original object.

    Parameters

    • id: number
    • Default value copy_attribs: boolean = true

    Returns number

geomCopyObjs

  • geomCopyObjs(ids: number[], copy_attribs?: boolean): number[]
  • Copy a list of objects. If copy_attribs is true, then the copied objects will have the same attributes as the original objects.

    Parameters

    • ids: number[]
    • Default value copy_attribs: boolean = true

    Returns number[]

    Array of new ids

geomCopyPoint

  • geomCopyPoint(id: number, copy_attribs?: boolean): number
  • Copy a point. The new point will have the same position as the original point. If copy_attribs is true, then the copied point will have the same attributes as the original point.

    Parameters

    • id: number
    • Default value copy_attribs: boolean = true

    Returns number

geomCopyPoints

  • geomCopyPoints(ids: number[], copy_attribs?: boolean): number[]
  • Copy a set of points. The new points will have the same positions as the original points. If copy_attribs is true, then the copied points will have the same attribute values as the original points.

    Parameters

    • ids: number[]
    • Default value copy_attribs: boolean = true

    Returns number[]

geomDelObj

  • geomDelObj(id: number, keep_unused_points?: boolean): boolean
  • to be completed

    Parameters

    • id: number
    • Default value keep_unused_points: boolean = true

    Returns boolean

    Array of new ids

geomDelObjs

  • geomDelObjs(ids: number[], keep_unused_points?: boolean): boolean
  • to be completed

    Parameters

    • ids: number[]
    • Default value keep_unused_points: boolean = true

    Returns boolean

geomDelPoint

  • geomDelPoint(id: number): boolean
  • to be completed

    Parameters

    • id: number

    Returns boolean

geomDelPoints

  • geomDelPoints(ids: number[]): boolean
  • to be completed

    Parameters

    • ids: number[]

    Returns boolean

geomFindEdgesSharedPoints

  • Within the parent object, find all edges with the same two points as this edge. The order of the points is ignored. Returns an array containing two sub-arrays. 1) The wire edges, and 2) the face edges.

    Parameters

    Returns ITopoPathData[][]

    An array containing the two sub-arrays of edges.

geomFindTopoSharedPoints

  • Within the parent object, find all faces or wires with shared points. The order of the points is ignored. Returns an array of topos. If the input path is a wire, it returns wires. If the input path is a face, it returns faces.

    Parameters

    Returns ITopoPathData[]

    An array containing the two sub-arrays of edges.

geomFindVerticesSamePosition

  • Within the parent object, find all vertices with the same point position. Returns an array containing two sub-arrays. 1) The wire vertices, and 2) the face vertices.

    Parameters

    Returns ITopoPathData[][]

    An array containing the two sub-arrays of vertices.

geomFindVerticesSharedPoint

  • Within the parent object, find all vertices with the same point. Returns an array containing two sub-arrays. 1) The wire vertices, and 2) the face vertices.

    Parameters

    Returns ITopoPathData[][]

    An array containing the two sub-arrays of vertices.

geomGetObjIDs

  • geomGetObjIDs(): number[]
  • Creates a list of object IDs. Skips empty slots in spare array.

    Returns number[]

geomGetPointIDs

  • geomGetPointIDs(): number[]
  • Creates a list if point IDs. The list does not include the empty slots.

    Returns number[]

geomGetTopoPaths

geomHasObj

  • geomHasObj(id: number): boolean
  • Returns true if an object with the specified ID exists.

    Parameters

    • id: number

    Returns boolean

geomHasPoint

  • geomHasPoint(id: number): boolean
  • Check if the geometry has this point

    Parameters

    • id: number

    Returns boolean

geomHasTopo

geomMergeAllPoints

  • geomMergeAllPoints(tolerance: number): number[]
  • Merge all points in the model.

    Parameters

    • tolerance: number

    Returns number[]

geomMergePoints

  • geomMergePoints(ids: number[]): number
  • Merge points, replaces these points with a new point.

    Parameters

    • ids: number[]

    Returns number

geomMergePointsByTol

  • geomMergePointsByTol(ids: number[], tolerance: number): number[]
  • Merge points.

    Parameters

    • ids: number[]
    • tolerance: number

    Returns number[]

geomNumObjs

  • geomNumObjs(): number
  • Does not count empty slots in sparse arrays.

    Returns number

geomNumPoints

  • geomNumPoints(): number

geomNumTopos

getGeom

getModel

groupAddObj

  • groupAddObj(name: string, id: number): boolean
  • to be completed

    Parameters

    • name: string
    • id: number

    Returns boolean

groupAddObjs

  • groupAddObjs(name: string, ids: number[]): boolean
  • to be completed

    Parameters

    • name: string
    • ids: number[]

    Returns boolean

    Returns true if all obj IDs were added, false otherwise.

groupAddPoint

  • groupAddPoint(name: string, id: number): boolean
  • to be completed

    Parameters

    • name: string
    • id: number

    Returns boolean

groupAddPoints

  • groupAddPoints(name: string, ids: number[]): boolean
  • to be completed

    Parameters

    • name: string
    • ids: number[]

    Returns boolean

groupAddTopo

groupAddTopos

groupGetChildren

  • groupGetChildren(name: string): string[]
  • to be completed

    Parameters

    • name: string

    Returns string[]

groupGetNumObjs

  • groupGetNumObjs(name: string, obj_type?: EObjType): number
  • to be completed

    Parameters

    • name: string
    • Optional obj_type: EObjType

    Returns number

groupGetNumPoints

  • groupGetNumPoints(name: string): number
  • to be completed

    Parameters

    • name: string

    Returns number

groupGetNumTopos

  • groupGetNumTopos(name: string, geom_type?: EGeomType): number

groupGetObjIDs

  • groupGetObjIDs(name: string, obj_type?: EObjType): number[]
  • to be completed

    Parameters

    • name: string
    • Optional obj_type: EObjType

    Returns number[]

groupGetParent

  • groupGetParent(name: string): string
  • to be completed

    Parameters

    • name: string

    Returns string

groupGetPointIDs

  • groupGetPointIDs(name: string): number[]
  • to be completed

    Parameters

    • name: string

    Returns number[]

groupGetProps

  • groupGetProps(name: string): Array<[string, any]>
  • to be completed

    Parameters

    • name: string

    Returns Array<[string, any]>

groupGetTopos

groupHasObj

  • groupHasObj(name: string, id: number): boolean
  • to be completed

    Parameters

    • name: string
    • id: number

    Returns boolean

groupHasPoint

  • groupHasPoint(name: string, id: number): boolean
  • to be completed

    Parameters

    • name: string
    • id: number

    Returns boolean

groupHasTopo

groupRemoveObj

  • groupRemoveObj(name: string, id: number): boolean
  • to be completed

    Parameters

    • name: string
    • id: number

    Returns boolean

groupRemoveObjs

  • groupRemoveObjs(name: string, ids: number[]): boolean
  • to be completed

    Parameters

    • name: string
    • ids: number[]

    Returns boolean

groupRemovePoint

  • groupRemovePoint(name: string, id: number): boolean
  • to be completed

    Parameters

    • name: string
    • id: number

    Returns boolean

groupRemovePoints

  • groupRemovePoints(name: string, ids: number[]): boolean
  • to be completed

    Parameters

    • name: string
    • ids: number[]

    Returns boolean

groupRemoveTopo

groupRemoveTopos

  • groupRemoveTopos(name: string, topos: ITopoPathData[]): boolean

groupSetName

  • groupSetName(old_name: any, new_name: any): boolean
  • to be completed

    Parameters

    • old_name: any
    • new_name: any

    Returns boolean

groupSetParent

  • groupSetParent(name: string, parent: string): string
  • to be completed

    Parameters

    • name: string
    • parent: string

    Returns string

groupSetProps

  • groupSetProps(name: string, new_map: Array<[string, any]>): Array<[string, any]>
  • to be completed

    Parameters

    • name: string
    • new_map: Array<[string, any]>

    Returns Array<[string, any]>

modelAddAttrib

modelAddGroup

  • modelAddGroup(name: string, parent?: string): IGroupData

modelDelAttrib

  • modelDelAttrib(name: string, geom_type: EGeomType): boolean

modelDelGroup

  • modelDelGroup(name: string): boolean
  • to be completed

    Parameters

    • name: string

    Returns boolean

modelFindAttribs

modelGetAllAttribs

modelGetAllAttribsExcPoints

modelGetAllEntAttribs

modelGetAllGroups

modelGetAllTopoAttribs

modelGetAttrib

modelGetGroup

modelHasAttrib

  • modelHasAttrib(name: string, geom_type: EGeomType): boolean

modelHasGroup

  • modelHasGroup(name: string): boolean
  • to be completed

    Parameters

    • name: string

    Returns boolean

modelPurge

  • modelPurge(): void

modelToJSON

  • modelToJSON(): string
  • Exports the model as json data.

    Returns string

modelValidate

  • modelValidate(): boolean

objGetAllPointIDs

  • objGetAllPointIDs(id: number): number[]
  • Get the points for this object as a flat list of unique points.

    Parameters

    • id: number

    Returns number[]

    A flat array of point ids.

objGetEdges

  • Get the edges for this object. If the edge_type is not specified, then edges for both wires and faces are returned.

    Parameters

    Returns ITopoPathData[][][]

    The array of edges.

objGetFaces

objGetGroups

  • objGetGroups(id: number): string[]
  • Get all the groups for which this obj is a member.

    Parameters

    • id: number

    Returns string[]

    The array of group names.

objGetOnePoint

  • objGetOnePoint(id: number): number
  • Gets one point for this object. This is udeful for entities that are deifned by a single point.

    Parameters

    • id: number

    Returns number

    One point ID.

objGetParams

  • objGetParams(id: number): any
  • Get the parameters for this object.

    Parameters

    • id: number

    Returns any

    The parameters array.

objGetPointIDs

  • objGetPointIDs(id: number, point_type?: wires | faces): number[][][]
  • Get the points for this object. If the point_type is not specified, then points for both wires and faces are returned.

    Parameters

    Returns number[][][]

    A nested array of point ids.

objGetType

  • objGetType(id: number): number
  • to be completed

    Parameters

    • id: number

    Returns number

objGetVertices

  • Get the vertices for this object. If the vertex_type is not specified, then vertices for both wires and faces are returned.

    Parameters

    Returns ITopoPathData[][][]

    The array of vertices.

objGetWires

objNumFaces

  • objNumFaces(id: number): number
  • Get the number of faces for this object.

    Parameters

    • id: number

    Returns number

    The number of faces.

objNumWires

  • objNumWires(id: number): number
  • Get the number of wires for this object.

    Parameters

    • id: number

    Returns number

    The number of wires.

objSetParams

  • objSetParams(id: number, params: any[]): any[]
  • Get the parameters for this object.

    Parameters

    • id: number
    • params: any[]

    Returns any[]

    The parameters array.

objXform

  • objXform(id: number, matrix: Matrix4): void
  • Transform all the points for this object.

    Parameters

    • id: number
    • matrix: Matrix4

    Returns void

pointGetGroups

  • pointGetGroups(id: number): string[]
  • Get all the groups for which this point is a member.

    Parameters

    • id: number

    Returns string[]

    The array of group names.

pointGetPosition

  • pointGetPosition(point_id: number): XYZ

pointGetVertices

pointIsUnused

  • pointIsUnused(point_id: number): boolean
  • to be completed

    Parameters

    • point_id: number

    Returns boolean

pointSetPosition

  • pointSetPosition(id: number, xyz: XYZ): XYZ

pointXform

  • pointXform(id: number, matrix: Matrix4): void
  • Transform the position of a point.

    Parameters

    • id: number
    • matrix: Matrix4

    Returns void

pointsXform

  • pointsXform(ids: number[], matrix: Matrix4): void
  • Transform the position of this point.

    Parameters

    • ids: number[]
    • matrix: Matrix4

    Returns void

topoAddVertex

  • Add a vertex to this topo, either at start or end. Works for both wires and faces. Vertex and edge attributes are also updated.

    Parameters

    Returns ITopoPathData

    A path to the new vertex

topoAttribGetPaths

topoAttribGetValue

  • Get a single attribute value. The data type of the attribute value can be found using the getDataType() method.

    Parameters

    Returns any

    The value.

topoAttribSetValue

  • Set a single attribute value. The data type of the attribute value can be found using the getDataType() method.

    Parameters

    • name: string
    • geom_type: EGeomType
    • path: ITopoPathData

      The path to a topological component.

    • value: any

      The new value.

    Returns any

    The old value.

topoDelVertex

topoFindSharedPoints

  • Within the parent object, find all faces or wires that share at least n points.

    Parameters

    Returns ITopoPathData[]

    An array of faces.

topoGetEdges

topoGetGroups

  • Get the group names for all the groups for which this topological component is a member.

    Parameters

    Returns string[]

    The array of group names.

topoGetVertices

topoIsClosed

  • Return true if this wire is closed. For faces, the result is always true.

    Parameters

    Returns boolean

    boolean

topoNumEdges

  • Get the number of edges in this wire or face.

    Parameters

    Returns number

    The number of edges.

topoNumVertices

  • Get the number of vertices in this wire or face.

    Parameters

    Returns number

    The number of vertices.

topoSetIsClosed

  • topoSetIsClosed(topo_path: ITopoPathData, is_closed: boolean): boolean
  • Set if this wire is closed. For faces, the result is always true.

    Parameters

    Returns boolean

    boolean

vertexGetEdge

vertexGetPoint

  • Get the point associated with this vertex.

    Parameters

    Returns number

    The point object.

vertexGetTopo

vertexNext

vertexPrevious

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