built_in_help
来自「算断裂的」· 代码 · 共 223 行
TXT
223 行
gmapply:gmapply applies an affine transformation to a mesh or brep Matlab: obj2 = gmapply(mat, obj1); Tcl/Tk: gmset obj2 [gmapply $mat $obj1] Here, obj1 is a brep or simplicial complex, and mat is an affinetransformation of the correct dimension. The affine transformation isapplied to the object, and the transformed object is returned. Thisfunction, when applied to breps, assigns the same property-value liststo faces of the output brep that were assigned to the input brep. Themat argument is a matrix of size d-by-(d+1), where d is the embeddeddimension of the object. If we partition the matrix as [A,b] where Ais d-by-d and b is d-by-1, then the transformation applied is x -->A*x - b.gmboundary:gmboundary extracts the boundary from a simplicial complex Matlab: newsimpcomp = gmboundary(simpcomp); Tcl/Tk: gmset newsimpcomp [gmboundary $simpcomp] This routine applies the boundary operator to a simplicial complex,and returns the resulting simplicial complex. The resultingsimplicial complex has the same embedded dimension, an intrinsicdimension of one less, and a subset of the vertices. The global vertexnumbers are preserved.gmchecktri:gmchecktri checks whether a mesh is a valid triangulation for a brep Matlab: asp = gmchecktri(brep, mesh {, checko {, tol}} Tcl/Tk set asp [gmchecktri $brep $mesh {$checko {$tol}}]This function checks the output of the mesh generator. It returns theworst aspect ratio among simplicies in the triangulation, or anegative number if there is an error in a mesh. Because the meshgenerator is still experimental, it is recommended that you run thisutility after every single run of the mesh generator. The optionalargument checko indicates whether you want to check simplexorientation. If checko=0, then correct orientation of simplices isnot checked. The default is checko=1, which means simplices shouldhave normal orientation. If checko=2, then all simplices are expectedto have reverse orientation.gmdouble:gmdouble replicates internal boundary faces and mesh nodes on the boundary Matlab: [brep2 {, mesh2}] = ... gmdouble(brep, faceindexlist {,mesh}); Tcl/Tk: gmset {brep2 {mesh2}} \ [gmdouble $brep $faceindexlist { $mesh}]This routine doubles internal boundaries, i.e., replaces them with twocoincident child faces. This routine takes a brep whose regions haveinternal boundaries. Some subset of those internal boundaries isspecified by faceindexlist; this is a list of strings specifying thenames of the faces of dimension d-1 that are internal boundaries to bedoubled. If * is specified ({'*'} in matlab), then all internalboundaries are doubled. The routine replaces all the requestedinternal boundaries with two copies. It may also duplicate lowerdimensional faces that interconnect the specified internal boundaries.The resulting brep is the return argument brep2. The optional meshargument to this routine is a mesh generated for the original brep bygmmeshgen. The gmdouble routine duplicates nodes that sit on facesthat were duplicated. Then for each simplex it determines which ofthe duplicated nodes go with that simplex. The resulting mesh is thereturn argument mesh2. The simplices in mesh2 follow the samenumbering to simplices in mesh. The vertices in mesh2 have the sameglobal numbers as in mesh, except duplicates of vertex i are renumberedi+k*(n+1), where k is the copy number and n is the highest global numberoccurring in the original mesh. The global tolerance setting is used by this routine.gmset:gmset (Tcl/Tk only) sets a variable to a value Tcl/Tk: gmset varname value or gmset {var1 var2 ... varn} valuelistThis routine is similar to the built-in Tcl/Tk command set, exceptthat it does not produce a return value. This is useful in aninteractive setting, because QMG routines often return huge stringsthat the user does not want to see. In the second form, 'valuelist'must be a list with n entries, and gmset sets the ith variable to theith entry of valuelist.gm_objtype:gm_objtype (Tcl/Tk only) determines the type of an object. Tcl/Tk: set tp [gm_objtype $obj]This routine returns the type of an object, e.g., list, brep or simpcomp. It's not a foolproof way to determine the type since the Tcl/Tk internalrepresentation might be invalidated.gm_list2obj:gm_list2obj (Tcl/Tk only) converts a list to an object (mesh or brep) Tcl/Tk gmset obj [gm_list2obj $list]This routine converts a list to an object; it is the inverse of gm_obj2list. This conversion is useful so that Tcl routinescan create new objects as lists using list-building commandslike lappend, and then at the end convert the list to a brepor simpcomplex. gm_obj2list:gm_obj2list (Tcl/Tk only) converts an object (mesh or brep) to a list Tcl/Tk: gmset list [gm_obj2list $obj]This routine converts an object to a list; it is the inverse of gm_list2obj. This conversion is useful so that Tcl routinescan parse the object using list-parsing routines like lindex.The list that results is, roughly speaking, what would happenif all the parentheses in the Ascii format representation wereconverted to curly braces (list begin and end marks). gm_meshgen:gm_meshgen is the QMG mesh generator Tcl/Tk: gmset sc [gm_meshgen $brep $sizectl $curvctl $userdata \ $expa $aspdegrade $logfile $verbosity $showgui $tol] Matlab: sc = gm_meshgen(brep, sizectl, curvctl, userdata, expa,... aspdegrade, logfile, verbosity, showgui, tol);This is the low-level way to call the QMG mesh generator. Mostusers prefer using gmmeshgen instead.gmmeshsize:gmmeshize returns the size of a mesh. Tcl/Tk: gmset {numnodes, numelts} [gmmeshsize $mesh] Matlab: [numnodes,numelts] = gmmeshsize(mesh);This function computes the number of nodes and number of elementsin a mesh.gm_mcompo:gm_mcompo finds connected components of a mesh Tcl/Tk: gmset componum [gm_mcompo $msh] Matlab: componum = gm_mcompo(msh);This routine labels mesh nodes with their connected components(an integer starting with 0 for the first connected component).The return value is an array of integers whose entries are incorrespondence with nodes of the mesh. In the matlab case, thereturn value is a zba.gm_polytri:gm_polytri computes the constrained Delaunay triangulation of a polygon Tcl/Tk: gmset trilist [gm_polytri $coord $edgelist] Matlab: trilist = gm_polytri(coord, edgelist);This routine triangulates a planar polygon. The matrix coord holdsthe coordinates of the polygons vertices, one vertex per row. Thematrix edgelist has a row for each edge of the polygon. Each rowconsists of two integers which index the two vertices (i.e., rowsof the coord matrix) at either end of the edge. The return argumenttrilist is an matrix of triangles in the triangulation. Each row ofthis matrix is one triangle. A row consists of three integers whichindex the three vertices of the triangle. The triangulation computedby this routine is the constrained Delaunay triangulation. It usesan unpublished O(n^2 log n) algorithm which is fairly robust.gm_read:gm_read reads a mesh or brep from a file in Ascii format Tcl/Tk: gmset obj [gm_read $filename] Matlab: obj = gm_read(filename);The filename argument is a string; this routine reads an object (brepor simpcomp) from the file in Ascii format. Its inverse is gm_write.gm_vizp:gm_vizp converts a mesh or brep to a list of points and segments or polygons Tcl/Tk: gmset {coords simps colors} \ [gm_vizp $obj $defaultcolor $dim $bezsub] or gmset {coords simps colors} \ [gm_vizp $mesh $brep $defaultcolor $dim $bezsub] Matlab: [coords,simps,colors] = gm_vizp(obj, defaultcolor, dim, bezsub); or [coords,simps,colors] = gm_vizp(mesh, brep, defaultcolor, dim, bezsub);This routine is a low-level routine used by gmviz. It takes as inputa brep or simplicial complex and returns a matrix of coordinates,simplex indices and colors used for graphics. The argument defaultcoloris the color to use if no color is specified for breps; default coloris always used for meshes. The dim argument is the dimension offaces to plot, and bezsub is the amount of subdividing to do oncurves and patches. In the second form of invocation, the simplicialcomplex is plotted, but it inherits the color field from the brep.gm_write:gm_write writes a brep or mesh to a file in Ascii format Tcl/Tk: gm_write $obj $filename Matlab: gm_write(obj, filename);This routine writes an object (brep or mesh) to a file in ascii format.Its inverse is gm_read.gmxdr_write:gmxdr_write writes a brep or mesh to a file in XDR binary format Tcl/Tk: gmxdr_write $obj $filename {$prefix}This routine writes an object (brep or mesh) to a file in XDR format. Objectmust be 3D. Third optional argument is prefix to write in header.Its opposite is gmxdr_read. Not available in Matlab.gmxdr_read:gmxdr_read reads a brep or mesh from a file in XDR binary format Tcl/Tk: gmset obj [gmxdr_read $filename]This routine writes an object (brep or mesh) from a file in XDR format. Objectmust be 3D. Prefix in file is ignore. Opposite is gmxdr_write. Notavailable in matlab.gmchecknormals:gmchecknormals checks how much the brep faces deviate from being G^1. Tcl/Tk: gmset {maxvar facename pointnum} [gmchecknormals $b] Matlab: [maxvar facename pointnum] = gmchecknormals(b);This function returns three values. The first is the maximumdiscontinuity of the normal vector (using the QMG metric) at anycontrol point of any brep face. If all the brep faces are G^1, thisnumber should be very close to zero. If this number is nonzero, itgives a lower bound for the curvature setting of the QMG to be validon the brep. The second return variable is the name of the face (astring) in which the maximum is achieved. The third return variableis the index of the control point where the max is achieved.gmcoarsetopo:gmcoarsetopo tries to coarsen (reduce the number of) a brep's topological entities. Tcl/Tk: gmset b2 [gmcoarsetopo $b $allowable_g1_deviation] Matlab: b2 = gmcoarsetopo(b, allowable_g1_deviation);This function takes brep b as an argument. Suppose the dimension of bis d. Then it tries to merge together topological entities of b thatare dimension d-1. In the process, it may delete topological entitiesof dimension d-2 or lower. It merges entities provided the resultingbrep is still G^1 up to the allowable deviation. (This number is inthe same metric used to measure curvature.) The routine will mergeentities only if they have the same values for all properties. Lowerdimensional entities will not be deleted if they have anyproperty-value pairs. Fewer topological entities will generally resultin a coarser mesh.gm_whichcompiler:gm_whichcompiler returns which compiler was used to compile QMG. Tcl/Tk: gmset compiler_name [gm_whichcompiler] Matlab: compiler_name = gm_whichcompiler;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?