|
carputils
Doxygen code documentation for the python framework controlling openCARP
|
Functions | |
| def | suppress_stdout () |
| Context manager to redirect stdout. More... | |
| def | execute (job, cmd, msg=None, outdir=None, silent=False, stdout=None, stderr=None) |
| Execute pre-assembled MeshTool command. More... | |
| def | generate_splitsurf (job, msh, surfs, split_ofile, silent=False, stdout=None, stderr=None) |
| MESHTOOL generate a split file from a given surface. More... | |
| def | generate_split (job, msh, ops, split_ofile, silent=False, stdout=None, stderr=None) |
| MESHTOOL generate a split file from a given surface. More... | |
| def | convert (job, imsh, ifmt, omsh, ofmt, silent=False, stdout=None, stderr=None) |
| Python wrapper for MeshTool 'convert'. More... | |
| def | UVC_localize (job, msh, pts2find, scale_thr=1, ofile=None, silent=False, stdout=None, stderr=None, uvc_file=None, extra=None) |
| Python wrapper for MeshTool's query idxlist_uvc. More... | |
| def | insert (job, cmode, submsh=None, msh=None, outmsh=None, ofmt=None, ifmt=None, idat=None, mode=None, silent=False, stdout=None, stderr=None) |
| MESHTOOL. More... | |
| def | extract_mesh (job, msh, submsh, tags, tag_file=None, ifmt=None, ofmt=None, silent=False, stdout=None, stderr=None) |
| Python wrapper for MeshTool 'extract mesh'. More... | |
| def | interpolate (job, cmode, omsh=None, idat=None, odat=None, imsh=None, dynpts=None, pts=None, mode=None, silent=False, stdout=None, stderr=None) |
| Python wrapper for MeshTool's 'interpolate nodedata' 'interpolate elemdata' 'interpolate clouddata' 'interpolate elem2node' 'interpolate node2elem' function. More... | |
| def | itk (job, cmode, msh=None, min=None, max=None, size=None, surf=None, tags=None, outmsh=None, silent=False, stdout=None, stderr=None) |
| Python wrapper for MeshTool's 'itk sample' 'itk <to be implemented>' function. More... | |
| def | extract (job, cmode, msh, surf=None, submsh=None, op=None, tags=None, tag_file=None, odat=None, mode=None, ifmt=None, ofmt=None, edge=None, ang_thr=None, coord=None, size=None, lower=None, hybrid=0, silent=False, stdout=None, stderr=None) |
| def | extract_surface (job, msh, surf, op=None, tag_file=None, ifmt=None, ofmt=None, edge=None, ang_thr=None, coord=None, size=None, lower=None, hybrid=0, silent=False, stdout=None, stderr=None) |
| Python wrapper for MeshTool's 'extract surface'. More... | |
| def | generate_mesh (job, surf, outmsh, ins_tag=None, holes=None, scale=None, bdry_layers=None, bdry_step=None, bdry_inc=None, bdry_symm=None, mode=None, prsv_bdry=None, ifmt=None, ofmt=None, silent=False, stdout=None, stderr=None) |
| Python wrapper for MeshTool's 'generate mesh'. More... | |
| def | query (job, cmode, msh, tags=None, op=None, ifmt=None, ofmt=None, edge=None, mode=None, coord=None, uvc=None, thr=None, surf=None, silent=False, stdout=None, stderr=None) |
| Python wrapper for MeshTool's 'query' function. More... | |
| def | smooth (job, mode, msh, outmsh=None, surf=None, thr=None, lvl=None, iter=None, smth=None, edge=None, ifmt=None, ofmt=None, tags=None, idat=None, nodal=None, odat=None, norm=None, silent=False, stdout=None, stderr=None) |
| smooth Smooth one or multiple surfaces of a mesh. More... | |
| def | resample (job, mode, msh, outmsh, min=None, max=None, avrg=None, surf_corr=None, fix_bnd=None, postsmth=None, uniform=None, ifmt=None, ofmt=None, tags=None, silent=False, stdout=None, stderr=None) |
| MESHTOOL resample volumetric or surface mesh: refine or coarsen a surface triangle mesh to fit a given edge size range parameters: -msh=<path> ... More... | |
| def | map (job, submsh, files, outdir, mode='m2s', info=None, mapName=None, silent=False, stdout=None, stderr=None) |
| Python wrapper for MeshTool's 'map' function. More... | |
| def | clean_quality (job, imsh, thr=0.98, surfs=None, smth=0, iter=100, edge=0, sigma=0.05, ifmt=None, ofmt=None, outmsh=None, silent=False, stdout=None, stderr=None) |
| Python wrapper for MeshTool's 'clean quality'. More... | |
| def carputils.carpio.meshtool.clean_quality | ( | job, | |
| imsh, | |||
thr = 0.98, |
|||
surfs = None, |
|||
smth = 0, |
|||
iter = 100, |
|||
edge = 0, |
|||
sigma = 0.05, |
|||
ifmt = None, |
|||
ofmt = None, |
|||
outmsh = None, |
|||
silent = False, |
|||
stdout = None, |
|||
stderr = None |
|||
| ) |
Python wrapper for MeshTool's 'clean quality'.
Deform mesh elements to reach a certain quality threshold value. Provided surfaces will be preserved.
| job | job.job.Job object |
| imsh | (input) path to basename of the mesh |
| thr | (input) threshold for mesh quality |
| surf | (optional) comma separated list of surfaces (without extension) which must be preserved |
| smth | (optional) Smoothing coefficient (default 0.00). If set to 0, mesh smoothing is turned off. |
| iter | (optional) Number of smoothing iterations (default 100). |
| edge | (optional) Edge detection threshold angle in degrees (default 0.00). If set to 0, edge detection is turned off. |
| sigma | (optional) Relative vertex translation step size (default 0.05). |
| ifmt | (optional) mesh output format. |
| ofmt | (optional) mesh output format. |
| outmsh | (optional) output meshname. If not specified, overwrites imsh. |
| silent | (optional) set True to silence terminal messages |
| def carputils.carpio.meshtool.convert | ( | job, | |
| imsh, | |||
| ifmt, | |||
| omsh, | |||
| ofmt, | |||
silent = False, |
|||
stdout = None, |
|||
stderr = None |
|||
| ) |
Python wrapper for MeshTool 'convert'.
Converts a mesh between different formats.
| job | job.job.Job object |
| imsh | (input) path to basename of the input mesh |
| ifmt | (input) format of the input mesh |
| omsh | (output) path to basename of the output mesh |
| ofmt | (input) format of the output mesh |
| silent | (optional) set True to silence terminal messages |
| def carputils.carpio.meshtool.execute | ( | job, | |
| cmd, | |||
msg = None, |
|||
outdir = None, |
|||
silent = False, |
|||
stdout = None, |
|||
stderr = None |
|||
| ) |
Execute pre-assembled MeshTool command.
| job | job.job.Job object. |
| cmd | MeshTool command to be executed. |
| msg | User defined terminal message. |
| outdir | Dedicated data output directory. |
| silent | Set true to silence commandline messages. |
| def carputils.carpio.meshtool.extract | ( | job, | |
| cmode, | |||
| msh, | |||
surf = None, |
|||
submsh = None, |
|||
op = None, |
|||
tags = None, |
|||
tag_file = None, |
|||
odat = None, |
|||
mode = None, |
|||
ifmt = None, |
|||
ofmt = None, |
|||
edge = None, |
|||
ang_thr = None, |
|||
coord = None, |
|||
size = None, |
|||
lower = None, |
|||
hybrid = 0, |
|||
silent = False, |
|||
stdout = None, |
|||
stderr = None |
|||
| ) |
| def carputils.carpio.meshtool.extract_mesh | ( | job, | |
| msh, | |||
| submsh, | |||
| tags, | |||
tag_file = None, |
|||
ifmt = None, |
|||
ofmt = None, |
|||
silent = False, |
|||
stdout = None, |
|||
stderr = None |
|||
| ) |
Python wrapper for MeshTool 'extract mesh'.
A submesh is extracted from a given mesh based on given element tags.
| job | job.job.Job object |
| msh | (input) path to basename of the mesh to extract from |
| tags | (input) ","-seperated list of tags, e.g. tag1,tag2 |
| tag_file | (optional input) path to an alternative tag file, e.g. *.tags, *.btags |
| submsh | (output) path to basename of the submesh to extract to |
| ifmt | (optional) mesh input format |
| ofmt | (optional) mesh output format |
| silent | (optional) set True to silence terminal messages |
| def carputils.carpio.meshtool.extract_surface | ( | job, | |
| msh, | |||
| surf, | |||
op = None, |
|||
tag_file = None, |
|||
ifmt = None, |
|||
ofmt = None, |
|||
edge = None, |
|||
ang_thr = None, |
|||
coord = None, |
|||
size = None, |
|||
lower = None, |
|||
hybrid = 0, |
|||
silent = False, |
|||
stdout = None, |
|||
stderr = None |
|||
| ) |
Python wrapper for MeshTool's 'extract surface'.
Extract a sequence of surfaces defined by set operations on element tags.
| job | job.job.Job object |
| msh | (input) path to basename of the mesh |
| surf | (output) list of names associated to the given operations |
| op | (optional) list of operations to perform. By default, the surface of the full mesh is computed. |
| tag_file | (optional) path to an alternative tag file {*.tags, *.btags} |
| edge | (optional) <deg. angle> surface elements connected to sharp edges will be removed. A sharp edge is defined by the nodes which connect elements with normal vectors at angles above the given threshold. |
| ang_thr | (optional) if set, surface traversal stops when angle between current and starting normal vectors exceeds threshold |
| coord | (optional) <xyz>:<xyz>:.. restrict surfaces to those elements reachable by surface edge-traversal from the surface vertices closest to the given coordinates. If -edge= is also provided, sharp edges will block traversal, thus limit what is reachable. |
| size | (optional) surface edge-traversal is limited to the given radius from the initial index. |
| lower | (optional) surface edge-traversal limitation lower size (for extracting bands). |
| hybrid | (optional) Write hybrid quad + tri surfaces. 1 == on, 0 == off. 0 is default. |
| ifmt | (optional) mesh input format |
| ofmt | (optional) mesh output format. If set, the surfaces will also be written as surface meshes. |
| silent | (optional) set True to silence terminal messages |
| def carputils.carpio.meshtool.generate_mesh | ( | job, | |
| surf, | |||
| outmsh, | |||
ins_tag = None, |
|||
holes = None, |
|||
scale = None, |
|||
bdry_layers = None, |
|||
bdry_step = None, |
|||
bdry_inc = None, |
|||
bdry_symm = None, |
|||
mode = None, |
|||
prsv_bdry = None, |
|||
ifmt = None, |
|||
ofmt = None, |
|||
silent = False, |
|||
stdout = None, |
|||
stderr = None |
|||
| ) |
Python wrapper for MeshTool's 'generate mesh'.
Generate a tetrahedral mesh from a list of nested triangle surfaces.
| job | job.job.Job object |
| surf | (input) list of paths to triangle meshes of closed surfaces |
| outmsh | (output) path to the basename of the output mesh |
| ins_tag | (optional) tag indices for meshed regions. Should match order of surfaces. |
| holes | (optional) Specify coordinates of hole seed points. |
| scale | (optional) Global edge length scaling (one value provided) OR regional edge length scaling (one value per surface provided). |
| bdry_layers | (optional) Number of boundary element layers to include in mesh. If negative, only the boundary mesh part will be generated. |
| bdry_step | (optional) Size of a boundary layer step, relative to the average edge length. Default is 0.10. |
| bdry_inc | (optional) Relative boundary layer step increment. Default is 1.25 |
| bdry_symm | (optional) if 1, the boundary layer will be applied symmetrically (inward and outward) to the input surface. default is 0. |
| mode | (optional) Volumetric element sizing mode. 0 = uniform, 1 = based on surface element size. Default is 1. |
| prsv_bdry | (optional) 0 = remesh surface, 1 = preserve surface. Default is 1. |
| ifmt | (optional) mesh input format. (carp_txt, carp_bin, vtk, vtk_bin, mmg, neu, purk, obj, off, gmsh, stellar, vcflow) ofmt (optional) mesh output format. (carp_txt, carp_bin, vtk, vtk_bin, vtk_polydata, mmg, neu, obj, off, stellar, vcflow, ensight_txt) |
| silent | (optional) set True to silence terminal messages |
| def carputils.carpio.meshtool.generate_split | ( | job, | |
| msh, | |||
| ops, | |||
| split_ofile, | |||
silent = False, |
|||
stdout = None, |
|||
stderr = None |
|||
| ) |
MESHTOOL generate a split file from a given surface.
parameters: msh (input) path to basename of the input mesh op (input) sequence of split operations. ifmt (optional) input format. (carp_txt, carp_bin, vtk, vtk_bin, mmg, neu, purk, obj, stellar, vcflow) split (output) path to the split list file
The supported input formats are:
carp_txt carp_bin vtk vtk_bin mmg purk stellar
| def carputils.carpio.meshtool.generate_splitsurf | ( | job, | |
| msh, | |||
| surfs, | |||
| split_ofile, | |||
silent = False, |
|||
stdout = None, |
|||
stderr = None |
|||
| ) |
MESHTOOL generate a split file from a given surface.
parameters: msh (input) path to basename of the input mesh surf (input) list of surfaces seperated with a comma ifmt (optional) input format. (carp_txt, carp_bin, vtk, vtk_bin, mmg, neu, purk, obj, stellar, vcflow) split (output) path to the split list file
The supported input formats are:
carp_txt carp_bin vtk vtk_bin mmg purk stellar
| def carputils.carpio.meshtool.insert | ( | job, | |
| cmode, | |||
submsh = None, |
|||
msh = None, |
|||
outmsh = None, |
|||
ofmt = None, |
|||
ifmt = None, |
|||
idat = None, |
|||
mode = None, |
|||
silent = False, |
|||
stdout = None, |
|||
stderr = None |
|||
| ) |
MESHTOOL.
insert submesh: a given submesh is inserted back into a mesh and written to an output mesh parameters: -submsh=<path> ... (input) path to basename of the submesh to insert from -msh=<path> ... (input) path to basename of the mesh to insert into -ofmt=<format> ... (optional) mesh output format. may be: carp_txt, carp_bin, vtk, vtk_bin, vtk_polydata, mmg, stellar -outmsh=<path> ... (output) path to basename of the output mesh
Note that the files defining the submesh must include a *.eidx and a *.nod file. This files define how elements and nodes of the submesh map back into the original mesh. The *.eidx and *.nod files are generated when using the "extract mesh" mode.
insert meshdata: the fiber and tag data of a mesh is inserted into another mesh based on vertex locations. parameters: -imsh=<path> ... (input) path to basename of the mesh to insert from -msh=<path> ... (input) path to basename of the mesh to insert into -op=<path> ... (input) Operation index: 0 = only tags, 1 = only fibers, 2 = both -ifmt=<format> ... (optional) mesh input format. may be: carp_txt, carp_bin, vtk, vtk_bin, mmg, purk, stellar -ofmt=<format> ... (optional) mesh output format. may be: carp_txt, carp_bin, vtk, vtk_bin, vtk_polydata, mmg, stellar -trsp=<vec-file> ... (optional) element-based transport gradient -trsp_dist=<float> ... (optional) transport distance threshold -grad_thr=<float> ... (optional) gradient correlation threshold. Must be in (0, 1). Default is 0.99. -corr_thr=<float> ... (optional) correspondance linear search fallback threshold. Default is 1000. -con_thr=<float> ... (optional) Connectivity threshold. Required number of nodes an element of mesh1 needs to share with an element of mesh2 in order for the data to be inserted. Default is 1. -outmsh=<path> ... (output) path to basename of the output mesh
insert data: data defined on a submesh is inserted back into a mesh parameters: -msh=<path> ... (input) path to basename of the mesh -submsh=<path> ... (input) path to basename of the submesh -submsh_data=<path> ... (input) path to submesh data -msh_data=<path> ... (input) path to mesh data -odat=<path> ... (output) path to output data
Note that the files defining the submesh must include a *.nod file. This file defines how the nodes of the submesh map back into the original mesh. The *.nod file is generated when using the "extract mesh" mode.
insert points: points of a submesh are inserted back into a mesh and written to an output file parameters: -submsh=<path> ... (input) path to basename of the submesh to insert from -msh=<path> ... (input) path to basename of the mesh to insert into -outmsh=<path> ... (output) path to basename of the output mesh
Note that the files defining the submesh must include a *.nod file. This file defines how the nodes of the submesh map back into the original mesh. The *.nod file is generated when using the "extract mesh" mode.
insert tags: insert an element data vector as new mesh element tags. parameters: -msh=<path> (input) path to basename of the mesh. -idat=<path> (input) .dat file the tags are inserted from. -outmsh=<path> (output) path to basename of the output mesh -ifmt=<format> (optional) mesh input format. -ofmt=<format> (optional) mesh output format.
insert fibers: insert element fibers. parameters: -msh=<path> (input) path to basename of the mesh. -idat=<fiber>,<sheets> (input) fibers or sheets, or list of fibers followed by sheets. Files are .vec files. -mode=<int> (optional) insert mode. 0 == fibers and sheets, 1 == only fibers, 2 == only sheets. 0 is default. -outmsh=<path> (output) path to basename of the output mesh -ifmt=<format> (optional) mesh input format. -ofmt=<format> (optional) mesh output format.
| def carputils.carpio.meshtool.interpolate | ( | job, | |
| cmode, | |||
omsh = None, |
|||
idat = None, |
|||
odat = None, |
|||
imsh = None, |
|||
dynpts = None, |
|||
pts = None, |
|||
mode = None, |
|||
silent = False, |
|||
stdout = None, |
|||
stderr = None |
|||
| ) |
Python wrapper for MeshTool's 'interpolate nodedata' 'interpolate elemdata' 'interpolate clouddata' 'interpolate elem2node' 'interpolate node2elem' function.
Examples
meshtool.interpolate(job, 'nodedata', omsh, imsh, idat, odat, dynpts=)
| job | job.job.Job object |
| cmode | choose 'nodedata' |
| omsh | (input) path to basename of the mesh we interpolate to |
| imsh | (input) path to basename of the mesh we interpolate from |
| idat | (input) path to input data. |
| odat | (output) path to output data |
| dynpts | (optional) dynpts describing point cloud movement |
| silent | (optional) set True to silence terminal messages |
Examples
meshtool.interpolate(job, 'elemdata', omsh, imsh, idat, odat, dynpts=None, silent=False)
| job | job.job.Job object |
| cmode | choose 'elemdata' |
| omsh | (input) path to basename of the mesh we interpolate to |
| imsh | (input) path to basename of the mesh we interpolate from |
| idat | (input) path to input data. |
| odat | (output) path to output data |
| dynpts | (optional) dynpts describing point cloud movement |
| silent | (optional) set True to silence terminal messages |
Examples
| job | job.job.Job object |
| cmode | choose 'clouddata' |
| omsh | (input) path to basename of the mesh we interpolate to |
| pts | (input) path to the coordinates of the point cloud |
| idat | (input) path to input data. |
| odat | (output) path to output data. |
| mode | (optional) Choose between localized Shepard (=0), global Shepard (=1), and RBF interpolation (=2). Default is 2. |
| dynpts | (optional) dynpts describing point cloud movement. |
Examples
meshtool.interpolate(job, 'elemdata', omsh, imsh, idat, odat, dynpts=None, silent=False)
| job | job.job.Job object |
| cmode | choose 'elemdata' |
| omsh | (input) path to basename of the mesh we interpolate to |
| imsh | (input) path to basename of the mesh we interpolate from |
| idat | (input) path to input data. |
| odat | (output) path to output data |
| dynpts | (optional) dynpts describing point cloud movement |
| silent | (optional) set True to silence terminal messages |
Examples
meshtool.interpolate(job, 'elem2node', omsh, idat, odat, silent=False)
| job | job.job.Job object |
| cmode | choose 'elem2node' |
| omsh | (input) path to basename of the mesh we interpolate to |
| idat | (input) path to input data. |
| odat | (output) path to output data |
| silent | (optional) set True to silence terminal messages |
Examples
meshtool.interpolate(job, 'node2elem', omsh, idat, odat, silent=False)
| job | job.job.Job object |
| cmode | choose 'node2elem' |
| omsh | (input) path to basename of the mesh we interpolate to |
| idat | (input) path to input data. |
| odat | (output) path to output data |
| silent | (optional) set True to silence terminal messages |
| def carputils.carpio.meshtool.itk | ( | job, | |
| cmode, | |||
msh = None, |
|||
min = None, |
|||
max = None, |
|||
size = None, |
|||
surf = None, |
|||
tags = None, |
|||
outmsh = None, |
|||
silent = False, |
|||
stdout = None, |
|||
stderr = None |
|||
| ) |
Python wrapper for MeshTool's 'itk sample' 'itk <to be implemented>' function.
Examples
meshtool.itk(job, 'sample', msh, min, max, size, surf, outmsh, tags=,)
| job | job.job.Job object |
| cmode | choose 'sample' |
| min | (input) Path of the image stack to sample on |
| max | (input) path to basename of the mesh we interpolate from |
| size | (input) path to input data. |
| surf | (output) path to output data |
| outmsh | (output) path to output data |
| tags | (optional) tag indices for inserted regions. Should match order of surfaces. |
| silent | (optional) set True to silence terminal messages |
| def carputils.carpio.meshtool.map | ( | job, | |
| submsh, | |||
| files, | |||
| outdir, | |||
mode = 'm2s', |
|||
info = None, |
|||
mapName = None, |
|||
silent = False, |
|||
stdout = None, |
|||
stderr = None |
|||
| ) |
Python wrapper for MeshTool's 'map' function.
map .vtx, .surf and .neubc files to the indexing of a submesh (obtained from 'meshtool extract mesh')
| job | job.job.Job object |
| submsh | (input) path to basename of the submesh |
| files | (input) files to map to submesh. Can include patterns using * |
| outdir | (output) directory to place mapped files |
| mode | (optional) Map mesh-to-submesh (m2s) or vice-versa (s2m). Default is: m2s |
| info | (optional) path to the information file mapName (optional) change the basename of the files mapped (Default: basename of the submsh) |
| def carputils.carpio.meshtool.query | ( | job, | |
| cmode, | |||
| msh, | |||
tags = None, |
|||
op = None, |
|||
ifmt = None, |
|||
ofmt = None, |
|||
edge = None, |
|||
mode = None, |
|||
coord = None, |
|||
uvc = None, |
|||
thr = None, |
|||
surf = None, |
|||
silent = False, |
|||
stdout = None, |
|||
stderr = None |
|||
| ) |
Python wrapper for MeshTool's 'query' function.
Examples
meshtool.query(job, 'bbox', msh, ifmt=)
| job | job.job.Job object |
| cmode | choose 'bbox' |
| msh | (input) path to basename of the mesh to query |
| ifmt | (optional) mesh input format. |
| silence | (optional) set True to silence terminal messages |
Examples
meshtool.query(job, 'edges', msh, ifmt=, tags=, odat=, silent=False)
| job | job.job.Job object |
| cmode | choose 'edges' |
| msh | (input) path to basename of the mesh to query |
| ifmt | (optional) mesh input format |
| tags | tag1,tag2 (optional) list of region tags to compute the edge statistics on. |
| silent | (optional) set True to silence terminal messages |
Examples
meshtool.query(job, 'graph', msh, ifmt=, silent=False)
| job | job.job.Job object |
| cmode | choose 'graph' |
| msh | (input) path to basename of the mesh to query |
| ifmt | (optional) mesh input format. |
| silent | (optional) set True to silence terminal messages |
Examples
meshtool.query(job, 'idx', msh, coord, ifmt=, surf=, thr=, silent=False)
| job | job.job.Job object |
| cmode | choose 'idx' |
| msh | (input) path to basename of the mesh to query |
| coord | (input) triple of x,y,z coordinates |
| ifmt | (optional) mesh input format |
| surf | (optional) index query is restricted to this surface |
| thr | (optional input) threshold defining the proximity to the coordinate |
| silent | (optional) set True to silence terminal messages |
Examples
meshtool.query(job, 'idxlist', msh, coord, ifmt=, surf=, silent=False)
| job | job.job.Job object |
| cmode | choose 'idxlist' |
| msh | (input) path to basename of the mesh to query |
| coord | (input) the coordinates file |
| ifmt | (optional) mesh input format |
| surf | (optional) index query is restricted to this surface |
| silent | (optional) set True to silence terminal messages |
| query | apply 'query idx' for all coordinates in a file based on uvc coordinates parameters: -msh=<path> ... (input) path to basename of the uvc points file to perform query on (must be .uvc_pts) -coord=<file> ... (input) the uvc coordinates file holding the query points in uvc -uvc=<file> ... (optional input) path to the ucv points file (default basename.uvc_pts) |
| query | get the XYZ coordinates for all UVC coordinates provided in a file parameters: -msh=<path> ... (input) path to basename of the mesh to perform query on -coord=<file> ... (input) the uvc coordinates file holding the query points in uvc -uvc=<file> ... (optional input) path to the ucv points file (default basename.uvc_pts) |
Examples
meshtool.query(job, 'quality', msh, ifmt=, thr=, mode=0, odat=, silent=False)
| job | job.job.Job object |
| cmode | choose 'quality' |
| msh | (input) path to basename of the mesh to query |
| ifmt | (optional) mesh input format |
| thr | (optional) output exact number of elements with quality above this threshold |
| mode | (optional) 0 = query only quality, 1 = query also self-intersection. Default is 0. |
| odat | (optional) filename to store query data onto disk |
Examples
meshtool.query(job, 'tags', msh, ifmt=, silent=False)
| job | job.job.Job object |
| cmode | choose 'tags' |
| msh | (input) path to basename of the mesh to query |
| ifmt | (optional) mesh input format |
| silent | (optional) set True to silence terminal messages |
| query | compute the nodal smoothness parameters: -msh=<path> ... (input) path to basename of the mesh to query -ifmt=<format> ... (optional) mesh input format. may be: carp_txt, carp_bin, vtk, vtk_bin, mmg, purk, stellar |
| def carputils.carpio.meshtool.resample | ( | job, | |
| mode, | |||
| msh, | |||
| outmsh, | |||
min = None, |
|||
max = None, |
|||
avrg = None, |
|||
surf_corr = None, |
|||
fix_bnd = None, |
|||
postsmth = None, |
|||
uniform = None, |
|||
ifmt = None, |
|||
ofmt = None, |
|||
tags = None, |
|||
silent = False, |
|||
stdout = None, |
|||
stderr = None |
|||
| ) |
MESHTOOL resample volumetric or surface mesh: refine or coarsen a surface triangle mesh to fit a given edge size range parameters: -msh=<path> ...
(input) path to basename of the input mesh -outmsh=<path> ... (output) path to basename of the output mesh -min=<float> ... (input) min edge size -max=<float> ... (input) max edge size -avrg=<float> ... (optional) average edge size. (min, max) are derived from it. -surf_corr=<float> ... (optional) surface correlation parameter (default 0.85). Edges connecting surface nodes with surface normals correlating greater than the specified amount can be collapsed. -fix_bnd=<int> ... (optional) Fix boundary of non-closed surfaces. 0 = no, 1 = yes. Default is 1. -postsmth=<int> ... (optional) Apply conservative smoothing between resampling iterations. 0 = no, 1 = yes. Default is 1. -uniform=<int> ... (optional) Edge-refinement is applied uniformly on selected tags. 0 = no, 1 = yes. Default is 0. -ifmt=<format> ... (optional) format of the input mesh -ofmt=<format> ... (optional) format of the output mesh -tags=<tag lists> ... (optional) element tag lists specifying the regions to perform refinement on
The supported input formats are: carp_txt carp_bin vtk vtk_bin mmg purk stellar The supported output formats are: carp_txt carp_bin vtk vtk_bin vtk_polydata mmg stellar
The tag lists have the following syntax: multiple lists are seperated by a "/", while the tags in one list are seperated by a "," character. The surface smoothness of the submesh formed by one tag list will be preserved.
| def carputils.carpio.meshtool.smooth | ( | job, | |
| mode, | |||
| msh, | |||
outmsh = None, |
|||
surf = None, |
|||
thr = None, |
|||
lvl = None, |
|||
iter = None, |
|||
smth = None, |
|||
edge = None, |
|||
ifmt = None, |
|||
ofmt = None, |
|||
tags = None, |
|||
idat = None, |
|||
nodal = None, |
|||
odat = None, |
|||
norm = None, |
|||
silent = False, |
|||
stdout = None, |
|||
stderr = None |
|||
| ) |
smooth Smooth one or multiple surfaces of a mesh.
parameters: -msh=<path> ... (input) path to basename of the mesh -surf=<path1>,<path2> ... (input) list of surfaces to smooth. -thr=<float> ... (optional) Maximum allowed element quality metric. default is 0.9. Set to 0 to disable quality checking. -lvl=<int> ... (optional) Number of volumetric element layers to to use when smoothing surfaces. Default is 2. -iter=<int> ... (optional) Number of smoothing iter (default 100). -smth=<float> ... (optional) Smoothing coefficient (default 0.15). -edge=<float> ... (optional) Normal-vector angle difference (in degrees, default 0) defining a sharp edge. If set to 0, edge detection is turned off. -ifmt=<format> ... (optional) mesh input format. (carp_txt, carp_bin, vtk, vtk_bin, mmg, purk, stellar) -ofmt=<format> ... (optional) mesh output format. (carp_txt, carp_bin, vtk, vtk_bin, vtk_polydata, mmg, stellar) -outmsh=<path> ... (output) path to basename of the output mesh
smooth Smooth a mesh (surfaces and volume). parameters: -msh=<path> ... (input) path to basename of the mesh -tags=ta1,ta2/tb1,tb2 ... (input) List of tag sets. The tags in one set have a common surface. Surfaces between different tag sets will be smoothed. Use * to include all tags, one tag per set. Use + to include all tags into one set. -thr=<float> ... (optional) Maximum allowed element quality. default is 0.9. Set to 0 to disable quality checking. -iter=<int> ... (optional) Number of smoothing iter (default 100). -smth=<float> ... (optional) Smoothing coefficient (default 0.15). -edge=<float> ... (optional) Normal-vector angle difference (in degrees, default 0) defining a sharp edge. If set to 0, edge detection is turned off. -ifmt=<format> ... (optional) mesh input format. (carp_txt, carp_bin, vtk, vtk_bin, mmg, purk, stellar) -ofmt=<format> ... (optional) mesh output format. (carp_txt, carp_bin, vtk, vtk_bin, vtk_polydata, mmg, stellar) -outmsh=<path> ... (output) path to basename of the output mesh
smooth Smooth data. parameters: -msh=<path> ... (input) path to basename of the mesh -idat=<path> ... (input) path to the input data file -iter=<int> ... (optional) Number of smoothing iter (default 100). -smth=<float> ... (optional) Smoothing coefficient (default 0.15). -nodal=<0|1> ... (optional) Set data representation: 0 = element data, 1 = nodal data. (default is 1). -ifmt=<format> ... (optional) mesh input format. may be: carp_txt, carp_bin, vtk, vtk_bin, mmg, purk, stellar -odat=<path> ... (output) path to the output data file
| def carputils.carpio.meshtool.suppress_stdout | ( | ) |
Context manager to redirect stdout.
| def carputils.carpio.meshtool.UVC_localize | ( | job, | |
| msh, | |||
| pts2find, | |||
scale_thr = 1, |
|||
ofile = None, |
|||
silent = False, |
|||
stdout = None, |
|||
stderr = None, |
|||
uvc_file = None, |
|||
extra = None |
|||
| ) |
Python wrapper for MeshTool's query idxlist_uvc.
| msh | (input) path to basename of the input mesh. Mesh must contain +'.pts_t' file describing the UVC Combined Coordinates. |
| pts2find | (input) list of uvcpts to localize with included thresholds. Format = {z,rho,phi,ven,thr_rho,thr_ep} |
| scale_thr | (output) scaling the sizing of the stimulus sites. |
| ofile | (optional) format of the output mesh |
| silent | (optional) set True to silence terminal messages |