The input geometry is often the result of a tessellation produced from an underlying geometry engine such as Parasolid or ACIS. The refinement of the tessellation may generally be controlled by a number of parameters. The parameters fall into two general categories; 1) angular tolerances and 2) size tolerances. It is advised that curve and surface angular tolerances be set to 2*PI/8 radians (45 degrees). This is the maximum angle spanned by a curve chord or surface plane in the tessellation. The size tolerances should be relative to the length of the diagonal of the bounding box of the geometry model. The maximum facet width should be between .25 and .5 (.4 recommended) of the diagonal length. The curve chord height and surface plane height tolerance should be between .0001 and .001 (.0005 recommended) of the diagonal length.
*vis_CurvMeshBegin - create an instance of a CurvMesh object vis_CurvMeshEnd - destroy an instance of a CurvMesh object vis_CurvMeshError - return CurvMesh object error flag
vis_CurvMeshDef - define number of curve points, lines. Inq - inquire number of curve points, lines vis_CurvMeshGenerate - generate finite element mesh vis_CurvMeshGetConnect - get internal Connect object vis_CurvMeshGetInteger - get integer mesh generation information vis_CurvMeshSetParami - set mesh generation parameters GetParami - get mesh generation parameters vis_CurvMeshSetParamd - set mesh generation parameters GetParamd - get mesh generation parameters vis_CurvMeshSetPoint - define a curve point vis_CurvMeshSetPointAssoc - define a point association vis_CurvMeshSetPointSizing - define a point sizing vis_CurvMeshSetLine - define a curve line segment vis_CurvMeshSetLineAssoc - define a line association vis_CurvMeshSetLineTang - define line segment tangents vis_CurvMeshWrite - write curve description to file vis_CurvMeshRead - read curve description from file
The function vis_CurvMeshSetParami is used to set integer parameters which affect the mesh generation process.
The function vis_CurvMeshSetParamd is used to set real double precision parameters which control the quality and size of the generated elements. A global target edge length for elements may be prescribed. Element size in areas of high curvature may be controlled by a user specified maximum spanning angle. The overall bound on the minimum edge length may also be input. Edge lengths may be specified at each input point using the function vis_CurvMeshSetPointSizing. This function is used to input sizing information for a mesh adaptation or regridding. If the input curves represent the boundary of a surface mesh, additional sizing information from the surface mesh due to proximity or curvature may be input in this way.
The user is able to define integer associations at points and lines which will be assigned to the node or nodes generated on the respective entity. These associations are useful for identifying nodes and elements in the output mesh for the application of boundary conditions. The function vis_CurvMeshSetPointAssoc is used to set associations at nodes generated at defined points, while the function vis_CurvMeshSetLineAssoc is used to set associations for nodes generated along the input lines. if a node is assigned associations from both point and line associations specified by the user, then point associations take precedence over line associations.
Finally the function vis_CurvMeshGenerate generates the nodes and finite elements and enters them into a Connect object. It is strongly suggested that the Connect object be set to store node coordinates in double precision using vis_ConnectPre. Use vis_CurvMeshGetInteger to query for detailed information concerning errors in the input lines, etc.
The function vis_CurvMeshWrite is provided to write a complete description of the defined input geometry and meshing parameters to a file. The primary use of this file is to encapsulate cases in which the CurvMesh module fails in some respect. This output file can then be made available to Visual Kinematics for failure diagnosis of CurvMesh meshing algorithms.
The following code fragment illustrates the basic framework of using the CurvMesh module to generate parabolic line elements on a curve defined by a set of line segments.
/* declare objects */ vis_CurvMesh *curvmesh; vis_Connect *connect; /* define curve data */ Vint numpnts, numlins; Vdouble xpnt[][3] = { ... }; Vint pres[] = { ... }; Vint ixlin[][3] = { ... }; /* create curvmesh object */ curvmesh = vis_CurvMeshBegin (); vis_CurvMeshDef (curvmesh,numpnts,numlins); /* input points and lines */ for (i = 0; i < numpnts; i++) { vis_CurvMeshSetPoint (curvmesh,i+1,xpnt[i],pres[i]); } for (i = 0; i < numlins; i++) { vis_CurvMeshSetLine (curvmesh,i+1,ixlin[i]); } /* create empty connect object to hold generated mesh */ connect = vis_ConnectBegin (); vis_ConnectPre (connect,SYS_DOUBLE); vis_ConnectDef (connect,0,0); /* ask for about 200 generated parabolic lines */ vis_CurvMeshSetParami (curvmesh,VIS_MESH_NUMELEMENTS,200); vis_CurvMeshSetParami (curvmesh,VIS_MESH_MAXI,3); /* generate mesh */ vis_CurvMeshGenerate (curvmesh,connect); /* access generated nodes and elements from Connect */ ... /* delete objects */ vis_ConnectEnd (connect); vis_CurvMeshEnd (curvmesh);Table of Contents
*vis_CurvMeshBegin - create an instance of a CurvMesh object
vis_CurvMesh *vis_CurvMeshBegin ()
None
Destroy an instance of a CurvMesh object using
void vis_CurvMeshEnd (vis_CurvMesh *curvmesh)
Return the current value of a CurvMesh object error flag using
Vint vis_CurvMeshError (vis_CurvMesh *curvmesh)
vis_CurvMeshDef - define number of curve points, lines
void vis_CurvMeshDef (vis_CurvMesh *curvmesh, Vint numpnts, Vint numlins)
curvmesh Pointer to CurvMesh object. numpnts Number of points on input curve mesh numlins Number of lines on input curve mesh
None
Inquire of defined numpnts and numlins as output arguments using
void vis_CurvMeshInq (vis_CurvMesh *curvmesh, Vint *numpnts, Vint *numlins)
vis_CurvMeshGenerate - generate finite element mesh
void vis_CurvMeshGenerate (vis_CurvMesh *curvmesh, vis_Connect *connect)
curvmesh Pointer to CurvMesh object. connect Pointer to Connect object to receive generated mesh
None
vis_CurvMeshGetConnect - get internal Connect object
void vis_CurvMeshGetConnect (vis_CurvMesh *curvmesh, vis_Connect **connect)
curvmesh Pointer to CurvMesh object.
connect Pointer to Connect object.
vis_CurvMeshGetInteger - get integer mesh generation information
void vis_CurvMeshGetInteger (vis_CurvMesh *curvmesh, Vint type, Vint iparam[])
curvmesh Pointer to CurvMesh object. type Type of integer information to query =CURVMESH_DEGENERATE Zero length input line edges
iparam Returned integer information
vis_CurvMeshSetParami - set mesh generation parameters
void vis_CurvMeshSetParami (vis_CurvMesh *curvmesh, Vint ptype, Vint iparam)
curvmesh Pointer to CurvMesh object. ptype Type of display parameter to set =VIS_MESH_MAXI Order of generated elements =VIS_MESH_NUMELEMENTS Target number of elements iparam Specifies the integer value that ptype will be set to.
None
The parameter VIS_MESH_MAXI sets the order of the generated elements by specifying the number of nodes to generate along an edge. A value of 2 generates linear elements, a value of 3 generates parabolic elements and a value of 4 generates cubic elements. By default VIS_MESH_MAXI is set to 2.
The parameter VIS_MESH_NUMELEMENTS sets the target number of elements to generate in the final grid. It implicitly defines a target edge length. The target edge length is determined as the minimum of this parameter and the VIS_MESH_EDGELENGTH parameter set using vis_CurvMeshSetParamd. By default VIS_MESH_NUMELEMENTS is set to one.
Inquire of defined integer parameters as output arguments using
void vis_CurvMeshGetParami (vis_CurvMesh *curvmesh, Vint ptype, Vint *iparam)
vis_CurvMeshSetParamd - set mesh generation parameters
void vis_CurvMeshSetParamd (vis_CurvMesh *curvmesh, Vint ptype, Vdouble dparam)
curvmesh Pointer to CurvMesh object. ptype Type of display parameter to set =VIS_MESH_EDGELENGTH Target edge length =VIS_MESH_MINEDGELENGTH Minimum edge length =VIS_MESH_MAXEDGELENGTH Maximum edge length =VIS_MESH_SPANANGLE Spanning angle =VIS_MESH_GROWTHRATE Growth rate dparam Specifies the value that ptype will be set to.
None
The parameter VIS_MESH_EDGELENGTH specifies a target edge length of generated elements. By default VIS_MESH_EDGELENGTH is set to 1.
The parameter VIS_MESH_SPANANGLE specifies a maximum spanning angle in degrees for generated elements. By default VIS_MESH_SPANANGLE is set to 20. degrees.
The parameter VIS_MESH_MINEDGELENGTH specifies a minimum edge length of generated elements. Use this parameter to limit refinement around small features such as small holes, sharp corners, etc. By default VIS_MESH_MINEDGELENGTH is set to 0.0 .
The parameter VIS_MESH_MAXEDGELENGTH specifies a maximum edge length of generated elements. The maximum edge length is strictly enforced. By default VIS_MESH_MAXEDGELENGTH is set to 0. and is ignored.
The parameter VIS_MESH_GROWTHRATE specifies a maximum growth rate. The growth rate governs the rate at which the size of adjacent elements can grow. The ratio of edge lengths of unconstrained adjacent elements will not exceed the specified growth rate. The growth rate must be greateer than 1.001. By default VIS_MESH_GROWTHRATE is set to 2.0
Inquire of defined double precision parameters as output arguments using
void vis_CurvMeshGetParamd (vis_CurvMesh *curvmesh, Vint ptype, Vdouble *dparam)
vis_CurvMeshSetPoint - define a curve point
void vis_CurvMeshSetPoint (vis_CurvMesh *curvmesh, Vint id, Vdouble x[3], Vint pres)
curvmesh Pointer to CurvMesh object. id Point id x Point coordinate location pres Preserve point flag
None
vis_CurvMeshSetPointAssoc - define a point association
void vis_CurvMeshSetPointAssoc (vis_CurvMesh *curvmesh, Vint type, Vint id, Vint aid)
curvmesh Pointer to CurvMesh object. type Type of association id Point id aid Point association value
None
vis_CurvMeshSetPointSizing - define a point sizing
void vis_CurvMeshSetPointSizing (vis_CurvMesh *curvmesh, Vint id, Vdouble h)
curvmesh Pointer to CurvMesh object. id Point id h Sizing, target edge length
None
vis_CurvMeshSetLine - define a curve line segment
void vis_CurvMeshSetLine (vis_CurvMesh *curvmesh, Vint id, Vint ix[])
curvmesh Pointer to CurvMesh object. id Line id ix Line connectivity
None
vis_CurvMeshSetLineAssoc - define a line association
void vis_CurvMeshSetLineAssoc (vis_CurvMesh *curvmesh, Vint type, Vint id, Vint aid)
curvmesh Pointer to CurvMesh object. type Type of association id Line id aid Line association
None
vis_CurvMeshSetLineTang - define line segment tangents
void vis_CurvMeshSetLineTang (vis_CurvMesh *curvmesh, Vint id, Vdouble v[2][3])
curvmesh Pointer to CurvMesh object. id Line id v line end point tangents
None
vis_CurvMeshRead - read curve description from file
void vis_CurvMeshRead (vis_CurvMesh *curvmesh, Vint type, const Vchar *path)
curvmesh Pointer to CurvMesh object. type File type =SYS_ASCII ASCII format =SYS_BINARY Binary format path File path
None
vis_CurvMeshWrite - write curve description to file
void vis_CurvMeshWrite (vis_CurvMesh *curvmesh, Vint type, const Vchar *path)
curvmesh Pointer to CurvMesh object. type File type =SYS_ASCII ASCII format =SYS_BINARY Binary format path File path
None
*vis_SurfMeshBegin - create an instance of a SurfMesh object vis_SurfMeshEnd - destroy an instance of a SurfMesh object vis_SurfMeshError - return SurfMesh object error flag
vis_SurfMeshAbort - set abort flag vis_SurfMeshDef - define number of surface points, tris. Inq - inquire number of surface points, tris. vis_SurfMeshComputeArea - compute area vis_SurfMeshGenerate - generate finite element mesh vis_SurfMeshGetConnect - get internal Connect object vis_SurfMeshGetInteger - get integer mesh generation information vis_SurfMeshRefine - refine a existing finite element mesh vis_SurfMeshSetConic - set conic sections vis_SurfMeshSetEdge - set edges to be recovered vis_SurfMeshSetFunction - set a call back function vis_SurfMeshSetGeomSizing - specify sizing within geometric shape vis_SurfMeshSetParami - set mesh generation parameters GetParami - get mesh generation parameters vis_SurfMeshSetParamd - set mesh generation parameters GetParamd - get mesh generation parameters vis_SurfMeshSetPoint - define a surface point GetPoint - get a surface point vis_SurfMeshSetPointAssoc - define a point association GetPointAssoc - query a point association vis_SurfMeshSetPointSizing - define a point sizing vis_SurfMeshSetTri - define a surface triangle GetTri - query a surface triangle vis_SurfMeshSetTriAssoc - define a triangle association GetTriAssoc - query a triangle association vis_SurfMeshSetTriBack - specify material boundedness vis_SurfMeshSetTriConic - specify conic associated with a triangle vis_SurfMeshSetTriFeat - define triangle edge feature vis_SurfMeshSetTriHint - specify topological location of point vis_SurfMeshSetTriPair - specify paired triangles on periodic faces vis_SurfMeshSetTriTang - define triangle edge vertex tangents GetTriTang - query triangle edge vertex tangents vis_SurfMeshSetTriSizing - define triangle face and edge sizing vis_SurfMeshSetTriDepthSizing - set sizing within a depth at a triangle vis_SurfMeshSetTriNorm - define triangle vertex normals GetTriNorm - query triangle vertex normals vis_SurfMeshWrite - write surface description to file vis_SurfMeshRead - read surface description from file
During the quadratic reconstruction of each triangle a continuous check is made for the maintenance of accurate normals by the triangle. It is possible that a quadratic triangle may distort sufficiently that its computed normals become inaccurate or even suffer a reversal of sense. In this case the midside point locations are successively relaxed to the original facetted geometry until the computed normals are accurate.
Any point which is defined using vis_SurfMeshSetPoint and is not referenced by a triangle connectivity is termed an "unconnected" point. Any unconnected point is entered into the geometry triangulation and is automatically preserved. The function vis_SurfMeshSetTriHint is used to guide the placement of unconnected points in the triangulation. If an unconnected point is inserted very close to a preserved edge, it is important to set the appropriate triangle edge hint for such a point, otherwise it will project to the triangle very near the edge. Since all user defined nodes are preserved this means that a very small triangle must be generated to connect the node somehow to the edge which is very close to it.
The function vis_SurfMeshSetParami is used to set integer parameters which affect the mesh generation process. Use this function to indicate such options as whether triangles or quadrilaterals are to be generated, the order of the generated elements (linear, parabolic or cubic), etc.
The function vis_SurfMeshSetParamd is used to set real double precision parameters which control the quality and size of the generated elements. A global target edge length for elements may be prescribed. Element size in areas of high curvature may be controlled by a user specified maximum spanning angle. The overall bound on the minimum edge length may also be input. The minimum small feature length and angle are specified using vis_SurfMeshSetParamd. These parameters are used for the deletion of small features from the input geometry. In addition to the global sizing parameters, specific size controls may be set on specific points using vis_SurfMeshSetPointSizing and triangle faces and edges using vis_SurfMeshSetTriSizing. Note that the size assigned to any location on the input geometry is subject to the minimum of all input sizes.
The user is able to define integer associations at points and triangles which will be assigned to the node or nodes and elements generated on the respective entity. These associations are useful for identifying nodes and elements in the output mesh for the application of loads, boundary conditions, material properties, etc. The function vis_SurfMeshSetPointAssoc is used to set associations at nodes generated at defined points. The function vis_SurfMeshSetTriAssoc is used to set associations which will be attached to nodes generated along triangle edges or on triangle faces. These associations will also be generated as element entity associations along the respective triangle edges and faces. It is also used to set element associations on elements generated on a triangle. In order to be used effectively, identical edge associations should be placed on every triangle edge bound by preserved input nodes. Similarly, identical face and element associations should be placed on every triangle bound by preserved input edges.
Finally the function vis_SurfMeshGenerate generates the nodes and elements and enters them into a Connect object. It is strongly suggested that the Connect object be set to store node coordinates in double precision using vis_ConnectPre. The user may query for non-manifold and inconsistent triangles detected in the input by calling vis_SurfMeshGetInteger after vis_SurfMeshGenerate is called. The function vis_SurfMeshWrite is provided to write a complete description of the defined input surface and meshing parameters to a file. The primary use of this file is to encapsulate cases in which the SurfMesh module fails in some respect. This output file can then be made available to Visual Kinematics for failure diagnosis of SurfMesh meshing algorithms.
An option is provided to compute normals at the generated element nodes. Enable this option using vis_SurfMeshSetParami with parameter VIS_MESH_COMPUTENORMAL. The computed normals are entered into an ElemDat object which must be registered with the Connect object used to receive the output mesh. Note that since this ElemDat object will manage element node data, a GridFun object must be registered with it which has been initialized with vis_ConnectGridFun on the output Connect object.
An existing element mesh may be refined using vis_SurfMeshRefine. Mesh refinement is performed on the mesh resulting from the call to vis_SurfMeshGenerate or the last previous call to vis_SurfMeshRefine. A State object of element edge length is input and the mesh is refined to satisfy the new element edge lengths. Only mesh refinement is performed, all previously existing nodes are retained in the refined mesh. Any element with a size of zero in the state object will not be refined.
The SurfMesh module provides for a monitor callback function to be specified which is called intermittently during the mesh generation process in vis_SurfMeshGenerate. The primary purpose of this function is to allow the user to interrupt or interrogate the on-going mesh generation process for any reason. If mesh generation is to be terminated, call vis_SurfMeshAbort. This call will set an internal flag which will cause vis_SurfMeshGenerate or vis_SurfMeshRefine to terminate the mesh generation process and return. In addition to a monitor function, user defined isotropic and anisotropic sizing callback functions and geometry projection callback functions may be set. Set callback functions using vis_SurfMeshSetFunction.
The following code fragment illustrates the basic framework of using the SurfMesh module to generate parabolic triangular finite elements on a surface defined by a set of linear triangular facets.
/* declare objects */ vis_SurfMesh *surfmesh; vis_Connect *connect; /* define surface triangle data */ Vint numpnts, numtris; Vdouble xpnt[][3] = { ... }; Vint pres[] = { ... }; Vint ixtri[][3] = { ... }; Vint eftri[][3] = { ... }; Vdouble vtri[][3] = { ... }; /* create surfmesh object */ surfmesh = vis_SurfMeshBegin (); vis_SurfMeshDef (surfmesh,numpnts,numtris); /* input points */ for (i = 0; i < numpnts; i++) { vis_SurfMeshSetPoint (surfmesh,i+1,xpnt[i],pres[i]); } /* input triangles and triangle normals */ for (i = 0; i < numtris; i++) { vis_SurfMeshSetTri (surfmesh,i+1,ixtri[i],eftri[i]); vis_SurfMeshSetTriNorm (surfmesh,i+1,vtri[i]); } /* create empty connect object to hold generated mesh */ connect = vis_ConnectBegin (); vis_ConnectPre (connect,SYS_DOUBLE); vis_ConnectDef (connect,0,0); /* set target edge length to .1 */ vis_SurfMeshSetParamd (surfmesh,VIS_MESH_EDGELENGTH,.1); /* generate parabolic elements */ vis_SurfMeshSetParami (surfmesh,VIS_MESH_MAXI,3); /* generate mesh */ vis_SurfMeshGenerate (surfmesh,connect); /* access generated nodes and elements from Connect */ ... /* delete objects */ vis_ConnectEnd (connect); vis_SurfMeshEnd (surfmesh);An example of an input surface triangulation and the output generated triangle mesh is shown in Figures 27-2a and 27-2b. In this case the input surface is a closed surface enclosing a solid body. The output triangle mesh is suitable as an input surface triangulation for a subsequent volume tetrahedralization mesh generation process as provided by a VisTools module such as TetMesh.
All conic sections are presented by a type and sense, an origin, an axis unit vector, a reference unit vector as well as a scalar constant representing a distance, radius or angle (in degrees) and a scalar parameter representing a major radius. The axis represents the local z axis of the coordinte system, and the reference direction represents the local x axis. The sense indicates the direction of the normals to the surface represented by the conic section.
If triangular elements are generated in map meshable regions, the elements will contain a nearly right angle. This is in contrast to the equilateral triangles which are generated in free meshed regions. If quadrilateral elements are to be generated, an option exists to quadrilateralize only map meshable regions and triangulate all other regions. Set this option with the parameter VIS_MESH_MAPRECTONLY using the function vis_SurfMeshSetParami.
If quadrilateral elements are to be generated, by default a quad "dominant" mesh is generated in which triangle elements are used in transitions, etc. where a quadrilateral is not strictly required due to topological or severe geometrical constraints. If an all quadrilateral mesh is meant to be generated then the quad dominant option must be disabled using the parameter SURFMESH_QUADDOM in the function vis_SurfMeshSetParami.
The SurfMesh module is often used to triangulate the boundaries of a solid region for subsequent tetrahedral mesh generation. In this case it is necessary to be able to distinguish whether a particular generated triangle is on an external boundary (including the boundary of a void) of the solid or an internal surface of the solid. Such internal surfaces would include non-manifold surfaces not on an external boundary and any surface of an inclusion. All generated triangles on internal surfaces may be flagged with an element association. Use the parameter SURFMESH_INTSURFFLAG in function vis_SurfMeshSetParami to specify the element association to be flagged.
Two procedures exist to facilitate generating triangulations on the boundaries of solids which are to be subsequently tetrahedralized by the TetMesh module. The TetMesh module requires the right-hand rule connectivity sense of all input triangles to point out of a material region. This means that all triangles on internal surfaces which bound two material regions must be "double backed", that is, there are two coincident triangles sharing nodes with opposite sense. The first procedure is an option to automatically detect all internal triangles and generate double-backed triangles on these internal surfaces. This option is enabled using the SURFMESH_INTSURFBACK parameter in function vis_SurfMeshSetParami. There are cases when this automatic detection will fail. For example if an inclusion is bound by input triangles which all point into the inclusion. The second procedure requires the user to explicitly flag each input triangle with its material boundedness with respect to its connectivity sense. The material boundedness is specified using vis_SurfMeshSetTriBack. This option is normally used when the SurfMesh input is being driven by a commercial geometry engine. The function vis_SurfMeshSetTriAssoc has options to set an element association for both the right and left sides of an input triangle. These element associations are ultimately propagated to TetMesh to specify the element associations to identify material regions of the generated tetrahedra.
If the periodic faces are planar and rotationally periodic, the function vis_SurfMeshComputeTriPair may be used to compute the triangle pairs for all geometry faces on the geometrically specified master and slave planes.
*vis_SurfMeshBegin - create an instance of a SurfMesh object
vis_SurfMesh *vis_SurfMeshBegin ()
None
Destroy an instance of a SurfMesh object using
void vis_SurfMeshEnd (vis_SurfMesh *surfmesh)
Return the current value of a SurfMesh object error flag using
Vint vis_SurfMeshError (vis_SurfMesh *surfmesh)
vis_SurfMeshDef - define number of surface points, tris.
void vis_SurfMeshDef (vis_SurfMesh *surfmesh, Vint numpnts, Vint numtris)
surfmesh Pointer to SurfMesh object. numpnts Number of points on input surface mesh numtris Number of triangles on input surface mesh
None
Inquire of defined numpnts and numtris as output arguments using
void vis_SurfMeshInq (vis_SurfMesh *surfmesh, Vint *numpnts, Vint *numtris)
vis_SurfMeshAbort - set abort flag
void vis_SurfMeshAbort (vis_SurfMesh *surfmesh)
surfmesh Pointer to SurfMesh object.
None
vis_SurfMeshComputeArea - compute area
void vis_SurfMeshComputeArea (vis_SurfMesh *surfmesh, Vdouble *area)
surfmesh Pointer to SurfMesh object.
area Computed area
vis_SurfMeshGenerate - generate finite element mesh
void vis_SurfMeshGenerate (vis_SurfMesh *surfmesh, vis_Connect *connect)
surfmesh Pointer to SurfMesh object. connect Pointer to Connect object to receive generated mesh
None
vis_SurfMeshGetConnect - get internal Connect object
void vis_SurfMeshGetConnect (vis_SurfMesh *surfmesh, vis_Connect **connect)
surfmesh Pointer to SurfMesh object.
connect Pointer to Connect object.
vis_SurfMeshGetInteger - get integer mesh generation information
void vis_SurfMeshGetInteger (vis_SurfMesh *surfmesh, Vint type, Vint iparam[])
surfmesh Pointer to SurfMesh object. type Type of integer information to query =SURFMESH_NUMNONMAN Number of non-manifold triangles =SURFMESH_NONMAN Non-manifold triangles =SURFMESH_NUMINCONS Number of inconsistent triangles =SURFMESH_INCONS Inconsistent triangles =SURFMESH_NUMFREEEDGE Number of free edge triangles =SURFMESH_FREEEDGE Free edge triangles =SURFMESH_NUMNEGJAC Number of negative Jacobians =SURFMESH_NUMINTERSECT Number of intersected triangles =SURFMESH_INTERSECT Intersected triangles =SURFMESH_NUMINTERSECTPAIR No. of intersecting triangle pairs =SURFMESH_INTERSECTPAIR Intersecting triangle pairs =SURFMESH_NUMUNPURGED Number of unpurged points =SURFMESH_UNPURGED Unpurged points =SURFMESH_NUMUNREC Number of unrecovered edges =SURFMESH_UNREC Endpoints of unrecovered edges =SURFMESH_NUMPENETRATE Number of penetrating triangles =SURFMESH_PENETRATE Penetrating triangles =SURFMESH_NUMUNCONNECT Number of unconnected points =SURFMESH_UNCONNECT Unconnected points =VIS_MESH_PROGRESS Current meshing progress
iparam Returned integer information
The query type SURFMESH_NUMNONMAN returns the number of non-manifold triangles detected in the input. The query SURFMESH_NONMAN will return the list of non-manifold triangles detected.
The query type SURFMESH_NUMINCONS returns the number of inconsistent triangles detected in the input. Inconsistent triangles are adjacent triangles, sharing an unpreserved edge, which have their triangle connectivity senses in opposite directions. The query SURFMESH_INCONS will return the list of inconsistent triangles detected.
The query type SURFMESH_NUMFREEEDGE returns the number of triangles with free edges detected in the input. The query SURFMESH_FREEEDGE will return the list of free edge triangles detected.
The query type SURFMESH_NUMNEGJAC returns the number of generated elements with negative corner Jacobians. This check is only performed if it is enabled using vis_SurfMeshSetParami.
The query type SURFMESH_NUMINTERSECT returns the number of triangles intersected by other triangles, ie. other triangle edges, detected in the input. The query SURFMESH_INTERSECT will return the list of intersected triangles.
The query type SURFMESH_NUMINTERSECTPAIR returns the number of pairs of intersecting triangles detected in the input. This is similar to the SURFMESH_NUMINTERSECT query except that pairs of intersecting triangles are returned. The query SURFMESH_INTERSECTPAIR will return the list of pairs of intersecting triangles. Note that the array of triangles returned needs large enough to hold 2 times the number of triangle pairs triangles.
The query type SURFMESH_NUMUNPURGED returns the number of unpurged points remaining. This query is only valid if a triangle edge has been flagged in vis_SurfMeshSetTri to be purged of unpreserved points. This purging is not always possible and this query returns the number of points which failed to be purged. The query SURFMESH_UNPURGED will return the list of unpurged points detected.
The query type SURFMESH_NUMUNREC returns the number of unrecovered edges remaining. This query is only valid if a n edge has been flagged in vis_SurfMeshSetEdge to be recovered in the final mesh. This edge recovery is not always possible and this query returns the number of edges which failed to be recovered. The query SURFMESH_UNREC will return the list of endpoints of the unrecovered edges. There are two endpoints returned for each unrecovered edge.
The query type SURFMESH_NUMPENTRATE returns the number of input triangles which penetrate one another if SURFMESH_MATE has been set to SURFMESH_MATE_WELD. Normally penetrating (a subset of intersecting) triangles are allowed, but when this type of mating is enabled and a penetration is detected, the meshing process will terminate. The query SURFMESH_PENETRATE will return the list of penetrating triangles.
The query type SURFMESH_NUMUNCONNECT returns the number of input points which are not connected to any input triangles. The query SURFMESH_UNCONNECT will return the list of unconnected points.
The query type VIS_MESH_PROGRESS returns information about the current state of the meshing process. This function is most useful when called from the monitor function. The following four integer values are returned.
iparam[0] Meshing phase Phase 1 - Geometry loading and verification Phase 2 - Geometry healing and defeaturing Phase 3 - Size map computation Phase 4 - Initial triangle mesh Phase 5 - Triangle mesh smoothing and cleanup Phase 6 - Quadrilateral morph of triangle mesh Phase 7 - Quadrilateral meshing smoothing and cleanup Phase 101 - Refine Pre-processing Phase 102 - Refine point insertion Phase 103 - Refine Mesh quality improvement iparam[1] Current number of nodes iparam[2] Current number of elements iparam[3] Estimate percent completion
vis_SurfMeshRefine - refine a existing finite element mesh
void vis_SurfMeshRefine (vis_SurfMesh *surfmesh, vis_State *state, vis_Connect *connect)
surfmesh Pointer to SurfMesh object. state Pointer to State object of element edge length connect Pointer to Connect object to receive refined mesh
None
The generated nodes and elements are appended to any existing nodes and elements in the input Connect object. Use vis_SurfMeshGetInteger is query for detailed information about the mesh generation process including errors.
vis_SurfMeshSetConic - set conic sections
void vis_SurfMeshSetConic (vis_SurfMesh *surfmesh, Vint conicid, Vint type, Vint sense, Vdouble xo[3], Vdouble axis[3], Vdouble ref[3], Vdouble c, Vdouble r)
surfmesh Pointer to SurfMesh object. conicid Conic section identifier type Conic section type =SURFMESH_CONIC_PLANE Plane =SURFMESH_CONIC_CONE Cone =SURFMESH_CONIC_CYLINDER Cylinder =SURFMESH_CONIC_TORUS Torus =SURFMESH_CONIC_SPHERE Sphere sense Surface normal sense =1 Positive direction =-1 Negative direction xo Origin axis Axis unit vector ref Reference direction unit vector c Surface constant r Surface parameter
None
vis_SurfMeshSetEdge - set edges to be recovered
void vis_SurfMeshSetEdge (vis_SurfMesh *surfmesh, Vint trimflag, Vint nix, Vint ix[], Vint msidflag, Vdouble x[][3])
surfmesh Pointer to SurfMesh object. trimflag Toggle trimming of surface outside of edge set nix Number of points on edge set, nix >= 2 ix Edge set connectivity msidflag Flag to specify midside node locations, x =SYS_OFF Midside node locations not specified =SYS_ON Midside node locations specified x Midside node locations
None
The midside node locations, x, may be optionally specified. If msidflag is enabled then nix-1 midside node locations must be entered in x. These midside node locations will be enforced exactly in the final mesh. If linear elements are being generated then the specified midside node locations are unused. If msidflag is not enabled, then x is ignored and may be entered as NULL.
It is possible that an edge between the two specified points may not be able to be recovered. This may occur if a preserved edge intersects the edge between two points or the curvature of the surface is very high between two points. In this case use vis_SurfMeshGetInteger to query for the number of unrecovered edges.
vis_SurfMeshSetFunction - set a call back function
void vis_SurfMeshSetFunction (vis_SurfMesh *surfmesh, Vint funtype, void (*function)(), Vobject *object)
surfmesh Pointer to SurfMesh object. funtype Type of callback function to set =SYS_FUNCTION_MONITOR Monitor callback =SYS_FUNCTION_SIZING Isotropic sizing callback =SYS_FUNCTION_ASIZING Anisotropic sizing callback =SYS_FUNCTION_GEOPROJ Geometry projection callback function Pointer to callback function object Pointer to the object to be returned as function argument
None
The monitor callback function prototype is
void function (vis_SurfMesh *surfmesh, Vobject *object)The first argument is the SurfMesh object, surfmesh, and the second is a user defined object, object.
The sizing callback function prototype is
void function (vis_SurfMesh *surfmesh, Vobject *object, Vdouble x[3], Vdouble *s)The first argument is the SurfMesh object, surfmesh, the second is a user defined object, object, the third is the coordinate location x and the fourth is the returned size s.
The anisotropic sizing callback function prototype is
void function (vis_SurfMesh *surfmesh, Vobject *object, Vdouble x[3], Vdouble s[3][3])The first argument is the SurfMesh object, surfmesh, the second is a user defined object, object, the third is the coordinate location x and the fourth is the returned anisotropic scaled orthogonal direction vectors. The first 3 components are the first size scaled direction, the next 3 components are the second size scaled direction, the next 3 components are the third size scaled direction.
The geometry projection callback function prototype is
void function (vis_SurfMesh *surfmesh, Vobject *object, Vint enttype, Vint entaid, Vdouble uh[], Vdouble xh[3], Vdouble ug[], Vdouble xg[3])The first argument is the SurfMesh object, surfmesh, the second is a user defined object, object. The third argument, enttype is SYS_EDGE or SYS_FACE depending upon whether the projection is to be to a specified geometry edge or face. The argument, entaid is a unique integer identifier for the geometry edge or face. This identifier is the node association for SYS_EDGE or SYS_FACE specified in the function vis_SurfMeshSetTriAssoc. The arguments, uh and xh are the initial parameter and global coordinate point locations. The arguments, ug and xg are the returned projected parameter and global coordinate point locations.
vis_SurfMeshSetGeomSizing - specify sizing within geometric shape
void vis_SurfMeshSetGeomSizing (vis_SurfMesh *surfmesh, Vint type, Vdouble xo[3], Vdouble xa[3], Vdouble xb[3], Vdouble d[3], Vdouble h)
surfmesh Pointer to SurfMesh object. type Geometry type =VIS_MESH_GEOMSPHERE Ellipsoid =VIS_MESH_GEOMCYLINDER Ellipsoidal cylinder =VIS_MESH_GEOMBOX Box xo Coordinates of geometry origin xa Coordinates of point along x' axis xb Coordinates of point in x'y' plane d Half length of geometric shape along each axis h Sizing
None
vis_SurfMeshSetParami - set mesh generation parameters
void vis_SurfMeshSetParami (vis_SurfMesh *surfmesh, Vint ptype, Vint iparam)
surfmesh Pointer to SurfMesh object. ptype Type of display parameter to set =VIS_MESH_MAXI Order of generated elements =VIS_MESH_SHAPE Shape of generated elements =VIS_MESH_COMPUTENORMAL Compute normals =VIS_MESH_INTERREFINE Interior refinement flag =SURFMESH_EDGETANGSIZE Enable spanning angle on edges =SURFMESH_GLOBALINTERSECT Repair surface intersection =SURFMESH_FUNSIZINGMIN Size is min'ed with sizing callback =SURFMESH_INTSURFBACK Identify internal surfaces =SURFMESH_INTSURFBACKNOHOLE Do not identify internal holes =SURFMESH_NONMANIFOLD Allow non manifold geometry =VIS_MESH_MAPDETECT Detect mapped mesh regions =VIS_MESH_MAPRECTONLY Quadrilateralize mapped meshes only =VIS_MESH_MIDSIDEPROJ Project midside nodes =VIS_MESH_MIDSIDEQUAL Quality midside node adjustment =VIS_MESH_REFINESMOOTH Smooth node locations during refine =SURFMESH_SINGDETECT Detect surface singularities =SURFMESH_MATE Enable mesh mating. =SURFMESH_QUADDOM Enable quad dominant mesh =SURFMESH_LOOPNOFRONT Specify edge loop front treatment =SURFMESH_LOOPWASHER Specify edge loop washer treatment iparam Specifies the integer value that ptype will be set to. =VIS_SHAPETRI Triangle shape =VIS_SHAPEQUAD Quadrilateral shape =VIS_OFF Turn parameter off =VIS_ON Turn parameter on =SURFMESH_MATE_NONE Disable mesh mating. =SURFMESH_MATE_WELD Enable mesh mating weld.
None
The parameter VIS_MESH_MAXI sets the order of the generated elements by specifying the number of nodes to generate along an edge. A value of 2 generates linear elements, a value of 3 generates parabolic elements and a value of 4 generates cubic elements. By default VIS_MESH_MAXI is set to 2.
The parameter VIS_MESH_SHAPE sets the shape of the generated elements. Either triangular, VIS_SHAPETRI, or quadrilateral, VIS_SHAPEQUAD, elements may be generated. If quadrilateral elements are to be generated it is not guaranteed that all generated elements will be quadrilateral shape, a few isolated triangular elements may be generated. By default VIS_MESH_SHAPE is set to VIS_SHAPETRI.
The parameter VIS_MESH_INTERREFINE enables the refinement of the surface edges and faces. By default VIS_MESH_INTERREFINE is set to SYS_ON.
The parameter VIS_MESH_MAPDETECT toggles the detection of map meshable regions. By default VIS_MESH_MAPDETECT is set to VIS_OFF.
The parameter VIS_MESH_MAPRECTONLY toggles the generation of quadrilateral elements in mapped mesh regions only. This option is useful when quadrilateral element generation is enabled but is to be restricted to mapped mesh regions only. All other regions will be triangulated. By default VIS_MESH_MAPRECTONLY is set to VIS_OFF.
The parameter VIS_MESH_MIDSIDEPROJ toggles the projection of midside nodes of parabolic and cubic elements. If this parameter is disabled, then all midside nodes will be placed at the midpoint between corner nodes. If the parameter is enabled then midside nodes will be projected to the underlying geometry and adjusted to satisfy possible quality constraints specified by the parameter VIS_MESH_MIDSIDEQUAL. By default VIS_MESH_MIDSIDEPROJ is set to VIS_ON.
The parameter VIS_MESH_MIDSIDEQUAL toggles the adjustment of midside nodes of parabolic and cubic elements to satisfy specified quality constraints. If this parameter is disabled, then midside nodes are projected to the geometry directly and are not adjusted for element quality constraints. If the parameter is enabled then the midside nodes are adjusted to ensure that all corner node Jacobians are positive and that the Jacobian ratio in any element is less than the specified upper Jacobian ratio bound. This bound is specified using vis_SurfMeshSetParamd. This parameter is ignored if VIS_MESH_MIDSIDEPROJ is disabled. By default VIS_MESH_MIDSIDEQUAL is set to VIS_ON.
The parameter VIS_MESH_COMPUTENORMAL toggles the computation of normals at the generated element nodes. The computed normals are entered into an ElemDat object which must be registered with the Connect object used to receive the output mesh. By default VIS_MESH_COMPUTENORMAL is set to VIS_OFF.
The parameter VIS_MESH_REFINESMOOTH toggles the use of node smoothing during mesh refinement using vis_SurfMeshRefine. By default VIS_MESH_REFINESMOOTH is set to VIS_OFF.
The parameter SURFMESH_EDGETANGSIZE toggles the use of the spanning angle sizing due to edge curvature. By default SURFMESH_EDGETANGSIZE is set to VIS_OFF.
The parameter SURFMESH_GLOBALINTERSECT toggles the checking and repair of surface intersections in the final mesh. This option is useful for thin walled structures which are to be subsequently volume meshed. By default SURFMESH_GLOBALINTERSECT is set to VIS_OFF.
The parameter SURFMESH_FUNSIZINGMIN is used to control the way final element sizing is computed when a sizing callback is installed. By default, the sizing returned by the sizing callback is used. If SURFMESH_FUNSIZINGMIN is enabled, then the sizing is the minimum of the sizing callback and normal sizing. By default SURFMESH_FUNSIZINGMIN is set to VIS_OFF.
The parameter SURFMESH_INTSURFBACK toggles the identification of internal faces in non-manifold geometry. If this parameter is enabled, then internal surfaces are detected and back to back triangles are generated on them. This is specifically designed for subsequent input to the TetMesh or VolMesh modules. By default internal regions bound by inward pointing triangles are identified as holes. The parameter SURFMESH_INTSURFBACKNOHOLE can be used to control hole identification. If the user flags all material boundedness with vis_SurfMeshSetTriBack these parameters should not be set. By default SURFMESH_INTSURFBACK and SURFMESH_INTSURFBACKNOHOLE are set to VIS_OFF.
The parameter SURFMESH_INTSURFBACKNOHOLE toggles the identification of internal faces in non-manifold geometry as possible holes. If this parameter is enabled, then internal regions with all bounding facets pointing inward are not detected as holes By default SURFMESH_INTSURFBACKNOHOLE is set to VIS_OFF.
The parameter SURFMESH_NONMANIFOLD toggles the checking for non-manifold geometry. If this parameter is enabled, then non-manifold geometry is allowed otherwise it is not allowed. By default SURFMESH_NONMANIFOLD is set to VIS_OFF.
The parameter SURFMESH_SINGDETECT toggles the checking and marking of surface singularities in the input geometry. This option is useful for detecting singularities such as the apex of conical geometry. The input points at such singularities may not be preserved and the triangle normals at the attached points may not reflect the normal discontinuity present at the point. If a singular point is found, the point is preserved, the triangle normals at the point are recomputed to represent surface normals slightly off the singularity. The mesh size at the point is set to the input minimum edge length. By default SURFMESH_SINGDETECT is set to VIS_OFF.
The parameter SURFMESH_MATE controls mesh mating. A value of SURFMESH_MATE_WELD merges coincident geometry in which no penetrations exist. Use the function vis_SurfMeshSetParamd to set the mating tolerance parameter SURFMESH_MATELENGTH. By default SURFMESH_MATE is set to SURFMESH_MATE_NONE.
The parameter SURFMESH_QUADDOM controls quad dominant meshing. By default SURFMESH_QUADDOM is set to VIS_ON.
The parameter SURFMESH_LOOPNOFRONT can be used to flag certain small edge loops to not be an advancing front source. If set to a non-zero value, any edge loop containing a number of element edges less than or equal to the specified value will not be a front source. Generally this will result in many fewer irregular nodes in a quadrilateral mesh. By default SURFMESH_LOOPNOFRONT is set to 0.
The parameter SURFMESH_LOOPWASHER can be used to flag certain small edge loops to have a very regular single layer of quadrilateral elements generated around them. If set to a non-zero value, any edge loop containing a number of element edges less than or equal to the specified value will have a single layer washer generated. By default SURFMESH_LOOPWASHER is set to 0.
Inquire of defined integer parameters as output arguments using
void vis_SurfMeshGetParami (vis_SurfMesh *surfmesh, Vint ptype, Vint *iparam)
vis_SurfMeshSetParamd - set mesh generation parameters
void vis_SurfMeshSetParamd (vis_SurfMesh *surfmesh, Vint ptype, Vdouble dparam)
surfmesh Pointer to SurfMesh object. ptype Type of display parameter to set =VIS_MESH_EDGELENGTH Target edge length =VIS_MESH_MINEDGELENGTH Minimum edge length =VIS_MESH_MAXEDGELENGTH Maximum edge length =VIS_MESH_MAXEDGEALT Maximum edge altitude ratio =VIS_MESH_MAXANGLE Maximum triangle angle =VIS_MESH_MINANGLE Minimum triangle angle =VIS_MESH_CHORDHEIGHT Chord height =VIS_MESH_SPANANGLE Spanning angle =VIS_MESH_GROWTHRATE Maximum growth rate =VIS_MESH_MAPANGLE Mapped mesh region angle tolerance =VIS_MESH_MAXQUADANGLE Maximum quad element angle =VIS_MESH_MAXWARPANGLE Maximum quad warp angle =VIS_MESH_MINFEATLENGTH Minimum feature length =VIS_MESH_MINFEATANGLE Minimum feature angle =VIS_MESH_MAXPROXRATIO Proximity sizing =SURFMESH_MATELENGTH Mesh mating length =SURFMESH_PRESEDGEANGLE Preserved edge feature angle =SURFMESH_PRESNODEANGLE Preserved node feature angle dparam Specifies the value that ptype will be set to.
None
The parameter VIS_MESH_EDGELENGTH specifies a target edge length of generated elements. The edge length constraint may not be satisfied for elements generated near preserved edges of the surface due to preserved edge sizing. By default VIS_MESH_EDGELENGTH is set to 1.
The parameter VIS_MESH_MINANGLE specifies a minimum triangle angle. In the absence of geometrical constraints, minimum angles of approximately 30. degrees may often be achieved in practice. However if there are small geometrical features or other geometry constrained regions, a minimum angle of just a few degrees may be difficult to achieve. The maximum possible minimum angle is, of course, 60. degrees. Use this option with caution, it may cause unwanted overrefinement. By default VIS_MESH_MINANGLE is set to 0. degrees.
The parameter VIS_MESH_GROWTHRATE specifies a maximum growth rate. The growth rate governs the rate at which the size of adjacent elements can grow. The ratio of edge lengths of unconstrained adjacent elements will not exceed the specified growth rate. The growth rate must be greateer than 1.001. By default VIS_MESH_GROWTHRATE is set to 2.0
The parameter VIS_MESH_MAXEDGELENGTH specifies a maximum edge length of generated elements. The maximum edge length is strictly enforced. By default VIS_MESH_MAXEDGELENGTH is set to 0. and is ignored.
The parameter VIS_MESH_CHORDHEIGHT specifies a maximum chord height tolerance for elements generated on curved surfaces. The chord height is defined as the distance from the midpoint of an element edge to the input geometry. A value of 0. turns off chord height sizing. The element sizing on curved surfaces is the minimum of the chord height and spanning angle sizings. By default VIS_MESH_CHORDHEIGHT is set to 0.
The parameter VIS_MESH_SPANANGLE specifies a maximum spanning angle in degrees for elements generated on curved surfaces. The element sizing on curved surfaces is the minimum of the chord height and spanning angle sizings. By default VIS_MESH_SPANANGLE is set to 30. degrees.
The parameter VIS_MESH_MAXEDGEALT specifies an upper bound on the edge-altitude ratio of an element. The edge-altitude ratio is defined as the maximum edge length over the smallest altitude. A series of operations are performed in an attempt to satisfy the edge-altitude ratio quality. By default VIS_MESH_MAXEDGEALT is set to 100.
The parameter VIS_MESH_MAXANGLE specifies a maximum triangle angle. By default VIS_MESH_MAXANGLE is set to 135. degrees.
The parameter VIS_MESH_MAPANGLE specifies an angular tolerance in degrees used to detect mapped mesh regions. The angle parameter is a deviation from 90 degrees for corner edges and a deviation from 180 degrees for side edges. By default VIS_MESH_MAPANGLE is set to 2. degrees.
The parameter VIS_MESH_MINEDGELENGTH specifies a minimum edge length of generated elements. Use this parameter to limit refinement around small features such as small holes, sharp corners, cone tips, etc. By default VIS_MESH_MINEDGELENGTH is set to .01 of the target edge length VIS_MESH_EDGELENGTH.
The parameter VIS_MESH_MAXQUADANGLE specifies a maximum angle allowed in a quadrilateral element. Any generated quadrilateral with an angle exceeding this value will be split into two triangle elements. Note that the maximum angle can not be less than 90. degrees. By default VIS_MESH_MAXQUADANGLE is set to 135. degrees.
The parameter VIS_MESH_MAXWARPANGLE specifies a maximum warp angle allowed in a quadrilateral element. The warp angle for a quadrilateral element is the maximum deviation from 180 degrees of the two dihedral angles between the two sets of triangles into which a quadrilateral element may be split. Any generated quadrilateral with an angle exceeding this value will be split into two triangle elements. By default VIS_MESH_MAXWARPANGLE is set to 15. degrees.
The parameters VIS_MESH_MINFEATLENGTH and VIS_MESH_MINFEATANGLE control the deletion of small features from the original input geometry. The parameter VIS_MESH_MINFEATLENGTH is a minimum small feature size. A recommended value for the minimum small feature size is about 5 percent of VIS_MESH_MINEDGELENGTH. The parameter VIS_MESH_MINFEATANGLE is a minimum small feature angle in degrees. If this parameter is set to a non zero value then the minimum small feature size should also be set. A recommended value for the minimum small feature angle is about 2 degrees. If these parameters are 0., then no small feature deletion is performed. By default VIS_MESH_MINFEATLENGTH and VIS_MESH_MINFEATANGLE are set to 0.
The parameter VIS_MESH_MAXPROXRATIO specifies proximity base sizing for closely spaced surfaces. The associated value is a desired aspect ratio of elements generated between surfaces. A ratio greater than one will typically result in one element with the given aspect ratio connecting the closely spaced surfaces. A ratio less than one will typically generate isotropic elements with the reciprocal of the given ratio number of elements between the closely spaced surfaces. By default VIS_MESH_MAXPROXRATIO is set to 0.
The parameter SURFMESH_MATELENGTH specifies a mesh mating length. This mating length is used only if SURFMESH_MATE as set by vis_SurfMeshSetParami is on. If the length is zero then a small fraction of the model extent is used. By default SURFMESH_MATELENGTH is set to 0.
The SURFMESH_PRESEDGEANGLE and SURFMESH_PRESNODEANGLE parameters specify feature angles in degrees which are used to internally preserve input triangle edges and nodes. The SURFMESH_PRESEDGEANGLE parameter is a dihedral angle tolerance. Any manifold edge between two adjacent triangles which form a dihedral angle which exceeds this parameter is preserved. The SURFMESH_PRESNODEANGLE parameter is an angle at a node lying on two preserved edges. Any node between two adjacent preserved edges which form an angle which exceeds this parameter is preserved.
By default SURFMESH_PRESEDGEANGLE and SURFMESH_PRESNODEANGLE are set to 0. which specifies that no feature edges are nodes will be preserved.
Inquire of defined double precision parameters as output arguments using
void vis_SurfMeshGetParamd (vis_SurfMesh *surfmesh, Vint ptype, Vdouble *dparam)
vis_SurfMeshSetPoint - define a surface point
void vis_SurfMeshSetPoint (vis_SurfMesh *surfmesh, Vint id, Vdouble x[3], Vint pres)
surfmesh Pointer to SurfMesh object. id Point id x Point coordinate location pres Preserve point flag
None
Inquire of defined surface point as output arguments using
void vis_SurfMeshGetPoint (vis_SurfMesh *surfmesh, Vint id, Vdouble x[3], Vint *pres)
vis_SurfMeshSetPointAssoc - define a point association
void vis_SurfMeshSetPointAssoc (vis_SurfMesh *surfmesh, Vint type, Vint id, Vint aid)
surfmesh Pointer to SurfMesh object. type Type of association id Point id aid Point association value
None
It is recommended that for all points coincident with an underlying geometry vertex that the specific association type, VIS_GEOVERT be used. The point association value should be a unique integer identifier for the underlying geometry vertex.
Inquire of defined surface point association as an output argument using
void vis_SurfMeshGetPointAssoc (vis_SurfMesh *surfmesh, Vint type, Vint id, Vint *aid)
vis_SurfMeshSetPointSizing - define a point sizing
void vis_SurfMeshSetPointSizing (vis_SurfMesh *surfmesh, Vint id, Vdouble h)
surfmesh Pointer to SurfMesh object. id Point id h Sizing, target edge length
None
vis_SurfMeshSetTri - define a surface triangle
void vis_SurfMeshSetTri (vis_SurfMesh *surfmesh, Vint id, Vint ix[3], Vint eflag[3])
surfmesh Pointer to SurfMesh object. id Triangle id ix Triangle connectivity eflag Triangle preserve edge flags =0 Edge not preserved =1 Edge preserved =2 Edge preserved and purged of all unpreserved nodes =3 Edge preserved and not defeatured
None
The edge flags, eflags, specify whether or not the edge of an input triangle is to be preserved in the final mesh. For edges which are connected to more than one triangle, the edge flag need only be set for one triangle to which the edge is connected. An edge shared by more than one triangle will be given the highest valued edge flag of all connected triangles. All free edges, connected to only one triangle, are implicitly preserved in the final mesh. Set optional triangle sizing using vis_SurfMeshSetTriSizing and triangle associations using vis_SurfMeshSetTriAssoc. Note that all triangles must be entered sequentially.
Inquire of defined triangle ix and eflag as output arguments using
void vis_SurfMeshGetTri (vis_SurfMesh *surfmesh, Vint id, Vint ix[3], Vint eflag[3])
vis_SurfMeshSetTriAssoc - define a triangle association
void vis_SurfMeshSetTriAssoc (vis_SurfMesh *surfmesh, Vint type, Vint id, Vint enttype, Vint no, Vint aid)
surfmesh Pointer to SurfMesh object. type Type of association id Triangle id enttype Entity type to which association is assigned =SYS_EDGE Triangle edge for node association =SYS_FACE Triangle face for node association =SYS_ELEM Triangle for element association no Triangle edge or face number >0 Triangle edge number =0 or 1 Triangle right face =-1 Triangle left face aid Triangle association
None
If enttype is SYS_EDGE, then node associations are assigned to all nodes generated on the specified triangle edge, no. This association will also be generated as element entity associations along the triangle edges generated on the specified triangle edge. The input triangle edge is marked as preserved. Since it is generally possible for a preserved edge to be collapsed during the mesh generation process, any connected set of preserved edges on which a particular node association is specified should be bound by preserved nodes. It is recommended that for all triangle edges coincident with an underlying geometry edge that the specific association type, VIS_GEOEDGE be used. The association value should be a unique integer identifier for the underlying geometry edge.
If enttype is SYS_FACE, then node associations are assigned to all nodes generated on the specified triangle. This association will also be generated as element entity associations along the element faces generated on the specified triangle. It is recommended that for all triangles lying on an underlying geometry face that the specific association type, VIS_GEOFACE be used as a face association. The association value should be a unique integer identifier for the underlying geometry face.
If enttype is SYS_ELEM, then element associations are assigned to all elements generated on the specified triangle. Since it is generally possible for the edges of adjacent triangles to be swapped during the mesh generation process, any connected set of triangles on which a particular node or element association is specified should be bound by preserved edges. It is recommended that for all triangles lying on an underlying geometry face that the specific association type, VIS_GEOFACE be used as an element association. The association value should be a unique integer identifier for the underlying geometry face.
In addition, the association type, VIS_GEOBODY should be used as an element association if the triangle is associated with a geometric body or bounds particular material regions.
Inquire of defined triangle association as an output argument using
void vis_SurfMeshGetTriAssoc (vis_SurfMesh *surfmesh, Vint type, Vint id, Vint enttype, Vint no, Vint *aid)
vis_SurfMeshSetTriBack - specify material boundedness
void vis_SurfMeshSetTriBack (vis_SurfMesh *surfmesh, Vint id, Vint right, Vint left)
surfmesh Pointer to SurfMesh object. id Triangle id right Material in back of right handed normal left Material in back of left handed normal
None
By default material is assumed to exist only on the back side of the right-handed normal to a triangle. All triangle normals which bound material on only one side (external triangles and internal triangles which bound voids) should point out of the material region. The default material boundedness is correct for this case and it is not required that this function be called for this type of triangle. If for any reason an input triangle facing a void does not have the proper orientation, then this function should be called to explicitly specify which side of the triangle faces the material region. All internal triangles which bound two material regions should have their material boundedness specified.
vis_SurfMeshSetTriConic - specify conic associated with a triangle
void vis_SurfMeshSetTriConic (vis_SurfMesh *surfmesh, Vint id, Vint conicid)
surfmesh Pointer to SurfMesh object. id Triangle id conicid Associated conic section identifier
None
vis_SurfMeshSetTriFeat - define triangle edge feature
void vis_SurfMeshSetTriFeat (vis_SurfMesh *surfmesh, Vint id, Vint no, Vint feat, Vint flag, Vint nlay, Vdouble rate)
surfmesh Pointer to SurfMesh object. id Triangle id no Triangle edge number feat Edge feature type =SURFMESH_FEAT_EDGEWASHER Generate constant size layers =SURFMESH_FEAT_EDGELAYER Generate variable size layers flat Front suppression flag =SYS_ON Suppress front source =SYS_OFF Do not suppress front source nlay Number of layers rate Layer size expansion rate -1. <= rate <= 1.
None
vis_SurfMeshSetTriHint - specify topological location of point
void vis_SurfMeshSetTriHint (vis_SurfMesh *surfmesh, Vint id, Vint enttype, Vint no, Vint nid)
surfmesh Pointer to SurfMesh object. id Triangle id enttype Entity type on which unconnected point is assumed to lie. =SYS_EDGE Triangle edge =SYS_FACE Triangle face no Triangle edge number nid Point id
None
If the entity type is SYS_FACE, then the point is inserted in the closest connected triangle face. The search region is bounded by preserved edges. If a hint is not given for an unconnected point, a global search is done over all triangle faces and the point is inserted in the closest triangle. Note that unconnected point coordinates are not changed, the geometry is modified to include the point coordinate.
vis_SurfMeshSetTriNorm - define a triangle vertex normals
void vis_SurfMeshSetTriNorm (vis_SurfMesh *surfmesh, Vint id, Vdouble v[3][3])
surfmesh Pointer to SurfMesh object. id Triangle id v Triangle vertex normals
None
Inquire of defined triangle normals as an output argument using
void vis_SurfMeshGetTriNorm (vis_SurfMesh *surfmesh, Vint id, Vdouble v[3][3])
vis_SurfMeshSetTriTang - define triangle edge vertex tangents
void vis_SurfMeshSetTriTang (vis_SurfMesh *surfmesh, Vint id, Vint no, Vdouble v[2][3])
surfmesh Pointer to SurfMesh object. id Triangle id no Triangle edge number v Triangle edge vertex tangents
None
Inquire of defined triangle tangents as an output argument using
void vis_SurfMeshGetTriTang (vis_SurfMesh *surfmesh, Vint id, Vint no, Vdouble v[2][3])
vis_SurfMeshSetTriSizing - define triangle face and edge sizing
void vis_SurfMeshSetTriSizing (vis_SurfMesh *surfmesh, Vint id, Vint enttype, Vint no, Vdouble h)
surfmesh Pointer to SurfMesh object. id Triangle id enttype Entity type =SYS_EDGE Triangle edge =SYS_FACE Triangle face no Triangle edge number h Sizing, target edge length
None
vis_SurfMeshSetTriDepthSizing - set sizing within a depth at a triangle
void vis_SurfMeshSetTriDepthSizing (vis_SurfMesh *surfmesh, Vint id, Vdouble d, Vdouble h)
surfmesh Pointer to SurfMesh object. id Triangle id d Depth h Sizing
None
vis_SurfMeshSetTriPair - specify paired triangles on periodic faces
void vis_SurfMeshSetTriPair (vis_SurfMesh *surfmesh, Vint enttype, Vint idm, Vint nom, Vint ids, Vint nos, Vint sense)
surfmesh Pointer to SurfMesh object. enttype Entity type =SYS_FACE Triangle face idm Triangle id on master face nom Triangle node number on preserved node of master face ids Triangle id on slave face nos Triangle node number on preserved node of slave face sense Sense =1 Faces not reflected =-1 Faces reflected
None
vis_SurfMeshRead - read surface description from file
void vis_SurfMeshRead (vis_SurfMesh *surfmesh, Vint type, const Vchar *path)
surfmesh Pointer to SurfMesh object. type File type =SYS_ASCII ASCII format =SYS_BINARY Binary format path File path
None
vis_SurfMeshWrite - write surface description to file
void vis_SurfMeshWrite (vis_SurfMesh *surfmesh, Vint type, const Vchar *path)
surfmesh Pointer to SurfMesh object. type File type =SYS_ASCII ASCII format =SYS_BINARY Binary format path File path
None