BRL-CAD
#include "common.h"
#include <string.h>
#include "bio.h"
#include "bn.h"
#include "vmath.h"
#include "raytrace.h"
Include dependency graph for nmg_junk.c:

Go to the source code of this file.

Functions

struct shell * nmg_polytonmg (FILE *fp, struct nmgregion *r, const struct bn_tol *tol)
 
void nmg_isect_face3p_shell_int (struct nmg_inter_struct *is, struct faceuse *fu1, struct shell *s2)
 

Detailed Description

This module is a resting place for unfinished subroutines that are NOT a part of the current NMG library, but which were sufficiently far along as to be worth saving.

THESE ROUTINES ARE ALL MARKED STATIC AS THEY ARE EXPERIMENTAL AND NOT YET INTENDED TO BE USED. ASK A BRL-CAD DEVELOPER IF YOU NEED SOMETHING IN HERE WHAT IT WILL TAKE TO ENABLE THE ROUTINE.

NOTE: THIS FILE SHOULD BE ENABLED FOR COMPILATION SO THAT IT CAN CONTINUE TO BE MAINTAINED UNTIL MIGRATION TO LIBNMG.

Definition in file nmg_junk.c.

Function Documentation

struct shell* nmg_polytonmg ( FILE *  fp,
struct nmgregion *  r,
const struct bn_tol tol 
)

Read a polygon file and convert it to an NMG shell

A polygon file consists of the following:

The first line consists of two integer numbers: the number of points (vertices) in the file, followed by the number of polygons in the file. This line is followed by lines for each of the vertices. Each vertex is listed on its own line, as the 3tuple "X Y Z". After the list of vertices comes the list of polygons. each polygon is represented by a line containing 1) the number of vertices in the polygon, followed by 2) the indices of the vertices that make up the polygon.

Implicitly returns r->s_p which is a new shell containing all the faces from the polygon file.

XXX This is a horrible way to do this. Lee violates his own rules about not creating fundamental structures on his own... :-) Retired in favor of more modern tessellation strategies.

Definition at line 71 of file nmg_junk.c.

References bn_mk_plane_3pts(), bu_bomb(), bu_calloc(), bu_free(), BU_LIST_FIRST, BU_LIST_IS_EMPTY, BU_LIST_PLAST, BU_LIST_PNEXT, bu_log(), bu_realloc(), lu, nmg_cface(), rt_g::NMG_debug, nmg_face_g(), nmg_kvu(), nmg_msv(), nmg_vertex_gv(), NMG_VERTEX_MAGIC, RTG, s, and OSL::Strings::v.

Here is the call graph for this function:

void nmg_isect_face3p_shell_int ( struct nmg_inter_struct is,
struct faceuse *  fu1,
struct shell *  s2 
)

Intersect all the edges in fu1 that don't lie on any of the faces of shell s2 with s2, i.e. "interior" edges, where the endpoints lie on s2, but the edge is not shared with a face of s2. Such edges wouldn't have been processed by the NEWLINE version of nmg_isect_two_generic_faces(), so intersections need to be looked for here. Fortunately, it's easy to reject everything except edges that need processing using only the topology structures.

The "_int" at the end of the name is to signify that this routine does only "interior" edges, and is not a general face/shell intersector.

Definition at line 180 of file nmg_junk.c.

References BU_LIST_FIRST_MAGIC, BU_LIST_FOR, bu_log(), eu1, eu2, NMG_CK_INTER_STRUCT, NMG_CK_LOOPUSE(), NMG_CK_SHELL(), rt_g::NMG_debug, nmg_find_matching_eu_in_s(), NMG_VERTEXUSE_MAGIC, and RTG.

Here is the call graph for this function: