|
Usage: off_util [options] input_files Read one or more files in OFF format, combine them into a single file and process it. Operations take place in the order listed below. input_files is the list of files to process. Options -h,--help this help message (run 'off_util -H help' for general help) --version version information -M <elms> Sort and merge elements whose coordinates are the same to the number of decimal places given by option -l. elems 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 -b <opt> merge blend color. first=1, last=2, rgb=3, ryb=4 (default: 3) -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 for volume 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 -E turn edges into (non-planar) faces -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 also a face edge. -D <list> delete a list of elements, list starts with element letter (f,e, v, deleted in that order, only one list per element), 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) -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 -o file3.off file1.off file2.off
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