/* Loop closure tools. */ /* Last edited on 2015-10-01 20:19:13 by stolfilocal */ #ifndef salamic_closer_H #define salamic_closer_H #define _GNU_SOURCE #include #include #include #include void salamic_closer_close ( salamic_mesh_t *mesh, int32_t pZ, int32_t mf, int32_t ixFace[], char *closer, char *outPrefix, salamic_stats_t *st ); /* Given a list {ixFace[0..mf-1]} of indiced of faces (triangles) of the {mesh} that are intercepted by a slicing plane at quantized {Z}-coordinate {pZ}, computes the corresponding face-plane intersections, joins the resulting segments into one or more paths or closed loops, and writes them to a disk file. Uses the algorithm specified by {closer}. Allowed values of {closer} are | "TRIVIAL" - Trivial closure: exhastve look for matching endpoints. | "MINETTO" - Minetto's hashtable-based closure algorithm. ??? Maybe add "BENTLEY". ??? The procedure assumes that no vertex of the given rtiangles lies on the slicing plane, and that every face in {ixFace} has three distinct vertices (even if they are collinear). ??? Assumes circular sorting of faces ??? ??? Loop orientation ??? See {salamic_closer_output_file_name_INFO} below for the names of the output files, and {salamic_section_format_INFO} for their format. Gathers runtime statistics in {st}. */ #define salamic_closer_output_file_name_INFO \ "A separate file is written out for each slicing plane." \ " The output files are called \"{OUTPREFIX}{ZZZ}.txt\" where" \ " {OUTPREFIX} is the speficied output filename prefix, and {ZZZ} is " \ " the quantized {Z}-coordinate of the slicing plane," \ " with explicit sign plus ten digits, zero-padded." #endif