Loads a file of either Wavefront OBJ (.obj) or DLFL (.dlfl) into the scene. The file data becomes the current object. The filetype is recognized by the extension. Filename is given as a string (e.g., "myfile.obj"). In the TopMod interface this replaces any current object loaded. In stand-alone, this pushes any current object onto the stack.
Saves a file of either Wavefront OBJ (.obj) or DLFL (.dlfl) from the current object. The filetype is recognized by the extension. Filename is given as a string (e.g., "myfile.obj").
Kills or destroys the object represented by objectid. This is disabled when using the TopMod interface! It serves only when working in python standalone.
Switches the current object to the object represented by objectid. This is disabled when using the TopMod interface!. Since the interface currently only allows one object to be open at a time.
Creates an isolated vertex with it's point-sphere at a position specified by a 3-tuple. No edge is created. An object can be created this way. This is one of the minimal operators.
Removes/Deletes an isolated vertex and it's point-sphere. This is one of the minimal operators.
Inserts an edge connecting two corners. Each corner is represented by a tuple: (faceid,vertexid). When the new edge is created the input vertices become members of the same face. Since integers are immutable in Python, we must return these also.
Deletes the edge represented by edgeid. When the edge is deleted then one face remains. If the deleted edge's sides belonged to two separate faces then the second one is deleted. A list (of size 1) with remaining face's ID is returned. Otherwise, if the deleted edge's sides belonged to the same face, then one new face is created. A list (of size 2) with the 2 face IDs is returned.
Subdivides the edge represented by edgeid. By default it just subdivides it in half, but when given the optional argument divisions it subdivides the edge by that number. Then it returns a list of all the newly created vertices.
Extrudes a face with the type of extrusions specified by a string. Valid types include:
Subdivides the current object with the specified scheme. Each scheme has a different set of optional arguments. Valid scheme names are:
Subdivide a face into n faces (where n is the number of edges of the face). By default the new faces are quadralaterals, but if specified with False, then the new faces will be triangular.
Subdivide faces in the list into n faces (where n is the number of edges of the face). By default the new faces are quadralaterals, but if specified with False, then the new faces will be triangular. If you want to do all faces you can also Use subdivide("linear-vertex")
Connect two half-edges with a face. If loopCheck is True then only connect if the edges are not adjacent to their corresponding faces.
Connect two faces given a corner from each face. Uses repeated insertEdge operations
Connect two faces with multiple segments. Intermediate points are calculated by linear interpolation based on number of segments. Maximum connections should be set to -1 when connecting all is desired
Create an interpolated handle. The option interp should be set to either "hermite" or "bezier" depending on the desired interpolation method. Setting the number of segments and playing with the weights and number of twists will yield different results.
Create a rind model - create a crust then punch the specified faces. The percentage is a thickness parameter when useScaling is false, otherwise it is a scaling parameter.
Returns a tuple containing the ids of the faces. If selected is True, then only those faces selected are returned (this is the default in the TopMod interface), otherwise all the faces. Since selection is impossible in stand-alone, the default is all the faces.
Returns a tuple containing the ids of the edges. If selected is True, then only those edges selected are returned (this is the default in the TopMod interface), otherwise all the edges. Since selection is impossible in stand-alone, the default is all the edges.
Returns a tuple containing the ids of the vertices. If selected is True, then only those vertices selected are returned (this is the default in the TopMod interface), otherwise all the vertices. Since selection is impossible in stand-alone, the default is all the vertices.
Returns a tuple containing 2-tuples with the ids of the faces and the ids of the vertices. If selected is True, then only those corners selected are returned (this is the default in the TopMod interface), otherwise all the corners. Since selection is impossible in stand-alone, the default is all the corners.
This does a boundary walk around a face. The format looks like this:
It continues until it walks through each side of the face.
Performs the boundary walk as specified by the walk above, but instead of grabbing the vertices and edges walked, it returns the corners walked. This means the result will contain the tuples with the input faceid and each vertex.
Print out object information to standard out. For example, a cube:
Number of vertices : 8 Number of faces : 6 Number of edges : 12 Number of materials : 1 Genus : 0
Store information about the vertex in a dictionary. The options can be accessed by there keys like this vertexInfo(vertexid)['coords']. Valid keys are:
Store information about the edge in a dictionary. The options can be accessed by there keys like this edgeInfo(edgeid)['midpoint']. Valid keys are:
Store information about the face in a dictionary. The options can be accessed by there keys like this faceInfo(faceid)['centroid']. Valid keys are:
Store information about the corner in a dictionary. The options can be accessed by there keys like this cornerInfo((faceid,vertexid))['type']. Valid keys are:
Translate the current object to <x y z> if relative is False, otherwise translate by x, y & z units. Relative is true by default.
Takes a tuple containing every vertexid that is to be moved. Then translates either to <x y z> (absolute) or by x, y, & z (relative). The default is relative.