Construct a new model. If data is provided, the model will be populated with this data.
This method assumes that the object id is for a copied object. It populates attribute values for all attributes in the model.
This method assumes that the point id is for a copied point. It populates attribute values for all point attributes in the model.
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.
Add an attributes value.
The path to a geometric entity or topological component.
True if the path does not exist.
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.
Delete an attribute value.
The path to a geometric entity or topological component.
The attribute value.
Find all the wires in a polymesh
Object of type Polymesh
Loop through all the objects, and create paths for vertices and edges Used in geomGetTopoPaths() method
Used by _getVEPathsFromObjsData
Loop through all the objects, and create paths for wires or faces Used in geomGetTopoPaths() method
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.
This method assumes that the object id is for a newly created object. It creates null attribute values for all attributes in the model.
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.
Returns an array of TObjData. Removes empty slots.
to be completed
to be completed
to be completed
Swaps a point in all objs in the model.
Swaps one point in obj.
Swaps points in obj.
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.
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.
Deletes this topo from attributes and groups, it calls methods below
Deletes this face from all face attributes
Deletes this obj from all attributes
Delete this point from all point attribs
Deletes this vertex or edge from vertex and edge attributes
Deletes this wire from all wire attributes
Adds this face to all face attributes and sets the attrib value to null.
Adds this topo to attributes, it calls methods below
Adds this vertex or edge to vertex and edge attributes and sets the attrib value to null.
Adds this wire to all wire attributes and sets the attrib value to null.
Adds this vertex or edge to vertex and edge attributes and sets the attrib value to null.
Deletes this obj from all groups
Delete this point from all groups
Deletes this topo from all groups
Delete this point->vertex from all objs
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.
The numbe of attribute values.
to be completed
Get all the values for the attribute.
An array of values.
to be completed
Get the wire or face to which this edge belongs.
The wire or face.
Get the two vertices for this edge.
An array of two edges.
Find the next edge in the sequence of edges in the wire or face.
The next edge object.
Find the previous edge in the sequence of edges in the wire or face.
The previous edge object.
Inserts an extra point into an edge, thereby making two edges. This requires all edge attributes to be updated.
The path to the new vertex.
Get all the labels for the attribute.
A sparse array of values.
Get a single attribute value. The data type of the attribute value can be found using the getDataType() method.
The id of a geometric entity.
The value.
Set a single attribute value. The data type of the attribute value must match the getDataType() method.
The id of a geometric entity.
The new value.
The old value.
Adds a new ellipse to the model defined by origin and two vectors for the x and y axes, and two angles.
The origin point.
Three orthogonal axes as XYZ vectors
The angles, can be undefined, in which case a closed circle is generated.
ID of object.
Adds a new ellipse to the model defined by origin and two vectors for the x and y axes, and two angles.
The origin point.
Three orthogonal axes as XYZ vectors
The angles, can be undefined, in which case a ellipse is generated.
ID of object.
Adds a new point to the model at position xyz.
a instance of type Point is returned
Add a set of points to the model based on an array of xyz positions.
Adds a new polyline to the model that passes through a sequence of points.
Indicates whether the polyline is closed.
ID of object.
to be completed
ID of object.
Adds a new ray to the model that passes through a sequence of points.
ID of object.
Calculates the centroid of a set of points, as the average of all point positions.
Copy and object. If copy_attribs is true, then the copied object will have the same attributes as the original object.
Copy a list of objects. If copy_attribs is true, then the copied objects will have the same attributes as the original objects.
Array of new ids
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.
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.
to be completed
Array of new ids
to be completed
to be completed
to be completed
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.
An array containing the two sub-arrays of edges.
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.
An array containing the two sub-arrays of edges.
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.
An array containing the two sub-arrays of vertices.
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.
An array containing the two sub-arrays of vertices.
Creates a list of object IDs. Skips empty slots in spare array.
Creates a list if point IDs. The list does not include the empty slots.
to be completed
Returns true if an object with the specified ID exists.
Check if the geometry has this point
Returns true if a topo with the specified path exists.
Merge all points in the model.
Merge points, replaces these points with a new point.
Merge points.
Does not count empty slots in sparse arrays.
to be completed
to be completed
Get the Geom object
The Model object
Get the Model object
The Model object
to be completed
to be completed
Returns true if all obj IDs were added, false otherwise.
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
to be completed
Exports the model as json data.
to be completed
Get the points for this object as a flat list of unique points.
A flat array of point ids.
Get the edges for this object. If the edge_type is not specified, then edges for both wires and faces are returned.
The array of edges.
Get the faces for this object.
The array of faces.
Get all the groups for which this obj is a member.
The array of group names.
Gets one point for this object. This is udeful for entities that are deifned by a single point.
One point ID.
Get the parameters for this object.
The parameters array.
to be completed
Get the vertices for this object. If the vertex_type is not specified, then vertices for both wires and faces are returned.
The array of vertices.
Get the wires for this object.
The array of wires.
Get the number of faces for this object.
The number of faces.
Get the number of wires for this object.
The number of wires.
Get the parameters for this object.
The parameters array.
Transform all the points for this object.
Get all the groups for which this point is a member.
The array of group names.
to be completed
Gets all the vertices that have this point id.
to be completed
Transform the position of a point.
Transform the position of this point.
Add a vertex to this topo, either at start or end. Works for both wires and faces. Vertex and edge attributes are also updated.
A path to the new vertex
Get all the labels for the attribute.
A sparse array of values.
Get a single attribute value. The data type of the attribute value can be found using the getDataType() method.
The path to a topological component.
The value.
Set a single attribute value. The data type of the attribute value can be found using the getDataType() method.
The path to a topological component.
The new value.
The old value.
Delete a vertex to this topo. Works for both wires and faces.
True if successful.
Within the parent object, find all faces or wires that share at least n points.
An array of faces.
Get the edges for this wire or face.
An array of edges.
Get the group names for all the groups for which this topological component is a member.
The array of group names.
Get the vertices for this wire or face.
An array of vertices.
Return true if this wire is closed. For faces, the result is always true.
boolean
Get the number of edges in this wire or face.
The number of edges.
Get the number of vertices in this wire or face.
The number of vertices.
Set if this wire is closed. For faces, the result is always true.
boolean
Get the edge for which this is the start vertex.
The edge object.
Get the point associated with this vertex.
The point object.
Get the wire or face to which this vertex belongs.
The wire or face object.
Find the next vertex in the sequence of vertices in the wire or face.
The next vertex object.
Find the previous vertex in the sequence of vertices in the wire or face.
The previous vertex object.
Generated using TypeDoc
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.