|
Usage: off_util [options] input_files Read one or more files in OFF format, combine them into a single file and process it. Most operations manipulate elements, such as adding, deleting, and combining elements, triangulating and orientimg faces, making an edge skeleton, and rounding the precision of coordinates. Other miscellaneous operations include projection onto a sphere, creating a net, truncating vertices, and converting edges to quadrilaterals. Operations are performeded in the order they are given on the command line. input_files is the list of files to process, which may include 'null' as an empty geometry, or if not given the program reads from standard input. Options -h,--help this help message (run 'off_util -H help' for general help) --version version information -M <args> Sort and merge elements whose coordinates are the same to the number of decimal places given by option -l. args is 1 or 2 comma separated parts. The first part is the elements to merge, which can include: v - vertices, e - edges, f - faces, a - all (vef), b - bond (merge 've' and delete any face coincident with another), s - sort without merging. The second part (default 3) is the merge blend color: first=1, last=2, rgb=3, ryb=4 -l <lim> minimum distance for unique vertex locations as negative exponent (default: 12 giving 1e-12) -O <opt> orient the faces first (if possible) then adjust for signed volume, value may be: positive, negative, reverse, or flip (which reverses the orientation of the model as it was input) -T <rat> truncate vertices by cutting edges at a ratio from each vertex, can also be 'rat,num' to truncate only vertices of order num -s skeleton, write the face edges and remove the faces -t <disp> triangulate, include face parts according to winding number from: odd, nonzero, positive, negative, triangulate (synonym for nonzero) -g geometry only, remove all colours, remove all two-vertex faces (edges) that are also a face edge -x <elms> remove OFF face elements. The element string is processed in order and can include v, e, f to remove OFF faces with one vertex (vertices), two-vertices (edges) and three or more vertices (faces), V to remove vertices that are not part of any face or edge, E to remove two-vertex faces (edges) that are not part of any face, D to remove two-vertex faces (edges) that are also a face edge (decorators), F to remove faces that do not share a vertex with another face -e Fill in missing explicit edges -D <list> delete a list of elements, list starts with element letter, followed by an index number list, given as index ranges separated by commas. range can be one number or two numbers separated by a hyphen (default range numbers: 0 and largest index). Element letters may also be F or E to delete compound parts by part number. Index number list may be preceded by f, e, v, E or F to find elements based on connectivity to another element type or part. Compound parts may also be found by element number. Only elements specifically specified are deleted. list can have a suffix '%' to invert results. e or E only act on explicit edges. If some explicit edges are missing, use -e to fill them in special connectivity selectors: o - vertices by vertex order s - faces by number of sides, or to select by a color... x - vertex color, y - edge color, z - face color -K <list> keep a list of elements using the same parameters as -D. Only elements specifically specified are kept along with their vertex and edge decorators if present. Implicit edges which are kept are converted to explicit edges -A <elem> add element, elem is element letter (v, e, f), followed by element data, optionally followed by ':' and a colour. Data is v: three comma separated coordinates e: a comma separated list of index numbers, joined as a ring f: a comma separated list of index numbers negative index numbers are relative to the end of the vertex list, last vertex is -1 (useful to refer to added vertices.) -c <col> close polyhedron, each hole converted to a face with colour col, holes having a vertex with more than two open edges are not filled -S project onto unit sphere centred at origin -u <args> unfold a polyhedron into a net, takes up to three comma separated values for base face index, dihedral fraction (normally 1.0 to -1.0, default: 0.0 flat), and final option letters: 'f' centre on centroid of face centres, 'z' align base face normal to z_axis. -d <dgts> number of significant digits (default 16) or if negative then the number of digits after the decimal point -o <file> write output to file (default: write to standard output)
off_util cube oct > cube_and_oct.off
off_color -f red cube > red_cube.off off_color -f yellow cube > yellow_cube.off off_util -M a red_cube.off yellow_cube.off | antiview off_util -M a,first red_cube.off yellow_cube.off | antiview
off_util -M v std_cube std_cube | antiview -n vf
off_util -A v0,0,1:blue -A f8,0,2:yellow -A e8,4,6:green cube | antiview
off_util -A v0,0,1:blue null | poly_kscope -s O | conv_hull | antiview
off_util -D v0 cube | antiview off_util -D f1 cube | antiview off_util -D f1,5 cube | antiview off_util -D f1-3 cube | antiview off_util -D f-2,4- cube | antiview off_util -D f0,1% cube | antiview
off_util -D E0 uc4 | antiview off_util -D F0 uc4 | antiview
off_util -D fv0 cube | antiview off_util -D Fv1 uc4 | antiview off_util -D vf3 uc4 | antiview off_util -D vF0 uc4 | antiview
off_util -e -D fv0 cube | antiview pol_recip -a cube | off_util -e -D F0 | antiview
off_util -K f0 uc4 | antiview off_util -K ev1 uc4 | antiview off_util -K fv1 uc4 | antiview off_util -K Ev1 uc4 | antiview off_util -K Fv1 uc4 | antiview
off_util -K E0% uc4 | antiview off_util -K F0% uc4 | antiview
off_util -O p cube | off_report
off_util -t tri tr_cube | antiview -n f off_util -t tri -g tr_cube | antiview -n f
off_util -t tri -g tr_cube | antiview -n f
off_util -s ico -x e | antiview
off_util -s ico | antiview
off_util -D v0 -c red cube | antiview off_util -D f0,1 -c none cube | antiview -t no_tri off_util -D f0,2 -c none oct | antiview -t no_tri
off_util -T 1/3 rd | antiview off_util -T 1/3,4 rd | antiview
off_util -S rd | antiview
off_util -d 3 tet
off_util -u 0,0,z ico | antiview
Delete, -D
Keep, -K
The face sorting performed by option -M orients faces in a particular way. Option -O will generally reorient some of the sorted faces, and this will always be true if the input is a polyhedron.
The coordinates of a file can be tidied up by running off_util -d
twice, the first time with a negative number to truncate the coordinate
at a number of decimals, the second time with a positive number to
truncate the trailing zeros. For example, to tidy
pol_recip cubo | off_trans -s r
pol_recip cubo | off_trans -s r | off_util -d -1 | off_util -d 1
Up:
Programs and Documentation
Next:
planar - convert overlapping coplanar polygons to tiles