BRL-CAD
#include "common.h"
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include "bio.h"
#include "vmath.h"
#include "nmg.h"
#include "raytrace.h"
#include "nurb.h"
#include "plot3.h"
Include dependency graph for nmg_plot.c:

Go to the source code of this file.

Macros

#define US_DELAY   10 /* Additional delay between frames */
 
#define LEE_DIVIDE_TOL   (1.0e-5) /* sloppy tolerance */
 
#define PICK_BROKEN_COLOR(p)
 

Functions

void nmg_vu_to_vlist (struct bu_list *vhead, const struct vertexuse *vu)
 
void nmg_eu_to_vlist (struct bu_list *vhead, const struct bu_list *eu_hd)
 
void nmg_lu_to_vlist (struct bu_list *vhead, const struct loopuse *lu, int poly_markers, const vectp_t normal)
 
void nmg_snurb_fu_to_vlist (struct bu_list *vhead, const struct faceuse *fu, int poly_markers)
 
void nmg_s_to_vlist (struct bu_list *vhead, const struct shell *s, int poly_markers)
 
void nmg_r_to_vlist (struct bu_list *vhead, const struct nmgregion *r, int poly_markers)
 
void nmg_m_to_vlist (struct bu_list *vhead, struct model *m, int poly_markers)
 
void nmg_offset_eu_vert (fastf_t *base, const struct edgeuse *eu, const fastf_t *face_normal, int tip)
 
void nmg_pl_v (FILE *fp, const struct vertex *v, long *b)
 
void nmg_pl_e (FILE *fp, const struct edge *e, long *b, int red, int green, int blue)
 
void nmg_pl_eu (FILE *fp, const struct edgeuse *eu, long *b, int red, int green, int blue)
 
void nmg_pl_lu (FILE *fp, const struct loopuse *lu, long *b, int red, int green, int blue)
 
void nmg_pl_fu (FILE *fp, const struct faceuse *fu, long *b, int red, int green, int blue)
 
void nmg_pl_s (FILE *fp, const struct shell *s)
 
void nmg_pl_shell (FILE *fp, const struct shell *s, int fancy)
 
void nmg_pl_r (FILE *fp, const struct nmgregion *r)
 
void nmg_pl_m (FILE *fp, const struct model *m)
 
void nmg_vlblock_v (struct bn_vlblock *vbp, const struct vertex *v, long *tab)
 
void nmg_vlblock_e (struct bn_vlblock *vbp, const struct edge *e, long *tab, int red, int green, int blue)
 
void nmg_vlblock_eu (struct bn_vlblock *vbp, const struct edgeuse *eu, long *tab, int red, int green, int blue, int fancy)
 
void nmg_vlblock_euleft (struct bu_list *vh, const struct edgeuse *eu, const fastf_t *center, const fastf_t *mat, const fastf_t *xvec, const fastf_t *yvec, double len, const struct bn_tol *tol)
 
void nmg_vlblock_around_eu (struct bn_vlblock *vbp, const struct edgeuse *arg_eu, long *tab, int fancy, const struct bn_tol *tol)
 
void nmg_vlblock_lu (struct bn_vlblock *vbp, const struct loopuse *lu, long *tab, int red, int green, int blue, int fancy)
 
void nmg_vlblock_fu (struct bn_vlblock *vbp, const struct faceuse *fu, long *tab, int fancy)
 
void nmg_vlblock_s (struct bn_vlblock *vbp, const struct shell *s, int fancy)
 
void nmg_vlblock_r (struct bn_vlblock *vbp, const struct nmgregion *r, int fancy)
 
void nmg_vlblock_m (struct bn_vlblock *vbp, const struct model *m, int fancy)
 
void nmg_pl_edges_in_2_shells (struct bn_vlblock *vbp, long *b, const struct edgeuse *eu, int fancy, const struct bn_tol *tol)
 
void nmg_pl_isect (const char *filename, const struct shell *s, const struct bn_tol *tol)
 
void nmg_pl_comb_fu (int num1, int num2, const struct faceuse *fu1)
 
void nmg_pl_2fu (const char *str, const struct faceuse *fu1, const struct faceuse *fu2, int show_mates)
 
HIDDEN void show_broken_vu (struct bn_vlblock *vbp, const struct vertexuse *vu)
 
HIDDEN void show_broken_e (struct bn_vlblock *vbp, const struct edgeuse *eu)
 
void nmg_plot_sigstepalong (int i)
 
void nmg_show_broken_classifier_stuff (uint32_t *p, char **classlist, int all_new, int fancy, const char *a_string)
 
void nmg_face_plot (const struct faceuse *fu)
 
void nmg_2face_plot (const struct faceuse *fu1, const struct faceuse *fu2)
 
void nmg_face_lu_plot (const struct loopuse *lu, const struct vertexuse *vu1, const struct vertexuse *vu2)
 
void nmg_plot_lu_ray (const struct loopuse *lu, const struct vertexuse *vu1, const struct vertexuse *vu2, const fastf_t *left)
 
void nmg_plot_ray_face (const char *fname, fastf_t *pt, const fastf_t *dir, const struct faceuse *fu)
 
void nmg_plot_lu_around_eu (const char *prefix, const struct edgeuse *eu, const struct bn_tol *tol)
 
int nmg_snurb_to_vlist (struct bu_list *vhead, const struct face_g_snurb *fg, int n_interior)
 
void nmg_cnurb_to_vlist (struct bu_list *vhead, const struct edgeuse *eu, int n_interior, int cmd)
 

Variables

int nmg_class_nothing_broken =1
 

Detailed Description

This file contains routines that create VLISTs and UNIX-plot files. Some routines are essential to the MGED interface, some are more for diagnostic and visualization purposes.

There are several distinct families:

nmg_ENTITY_to_vlist - Wireframes & polygons. For MGED "ev". nmg_pl_ENTITY - Fancy edgeuse drawing, to plot file. nmg_vlblock_ENTITY - Fancy edgeuse drawing, into vlblocks. show_broken_ENTITY - Graphical display of classifier results. ...as well as assorted wrappers for debugging use.

In the interest of having only a single way of creating the fancy drawings, the code is migrating to creating everything first as VLBLOCKS, and converting that to UNIX-plot files or other formats as appropriate.

Definition in file nmg_plot.c.

Macro Definition Documentation

#define US_DELAY   10 /* Additional delay between frames */

Definition at line 57 of file nmg_plot.c.

Referenced by nmg_pl_2fu(), nmg_pl_comb_fu(), and nmg_show_broken_classifier_stuff().

#define LEE_DIVIDE_TOL   (1.0e-5) /* sloppy tolerance */

Definition at line 436 of file nmg_plot.c.

#define PICK_BROKEN_COLOR (   p)
Value:
{ \
if (global_classlist == (char **)NULL) { \
broken_color = 5; \
} else if (NMG_INDEX_TEST(global_classlist[NMG_CLASS_AinB], (p))) \
broken_color = NMG_CLASS_AinB; \
else if (NMG_INDEX_TEST(global_classlist[NMG_CLASS_AonBshared], (p))) \
broken_color = NMG_CLASS_AonBshared; \
else if (NMG_INDEX_TEST(global_classlist[NMG_CLASS_AonBanti], (p))) \
broken_color = NMG_CLASS_AonBanti; \
else if (NMG_INDEX_TEST(global_classlist[NMG_CLASS_AoutB], (p))) \
broken_color = NMG_CLASS_AoutB; \
else \
broken_color = 4;}
if(share_geom)
Definition: nmg_mod.c:3829
else
Definition: nmg_mod.c:3872

Definition at line 1456 of file nmg_plot.c.

Referenced by show_broken_e(), and show_broken_vu().

Function Documentation

void nmg_vu_to_vlist ( struct bu_list vhead,
const struct vertexuse *  vu 
)

Plot a single vertexuse

Definition at line 71 of file nmg_plot.c.

References BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, BU_CK_LIST_HEAD, RT_ADD_VLIST, and OSL::Strings::v.

Referenced by nmg_lu_to_vlist(), and nmg_s_to_vlist().

void nmg_eu_to_vlist ( struct bu_list vhead,
const struct bu_list eu_hd 
)

Plot a list of edgeuses. The last edge is joined back to the first.

Definition at line 94 of file nmg_plot.c.

References BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, BU_CK_LIST_HEAD, BU_LIST_FOR, bu_log(), and RT_ADD_VLIST.

Referenced by nmg_s_to_vlist().

Here is the call graph for this function:

void nmg_lu_to_vlist ( struct bu_list vhead,
const struct loopuse *  lu,
int  poly_markers,
const vectp_t  normal 
)

Plot a single loopuse into a bn_vlist chain headed by vhead.

Needs to be able to handle both linear edges and cnurb edges.

Definition at line 140 of file nmg_plot.c.

References BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, BN_VLIST_POLY_DRAW, BN_VLIST_POLY_END, BN_VLIST_POLY_MOVE, BN_VLIST_POLY_START, BN_VLIST_POLY_VERTNORM, BU_CK_LIST_HEAD, BU_LIST_FIRST, BU_LIST_FIRST_MAGIC, BU_LIST_FOR, NMG_CK_LOOPUSE(), nmg_cnurb_to_vlist(), NMG_EDGE_G_CNURB_MAGIC, NMG_FACE_G_SNURB_MAGIC, NMG_FACEUSE_MAGIC, NMG_VERTEXUSE_A_PLANE_MAGIC, NMG_VERTEXUSE_MAGIC, nmg_vu_to_vlist(), RT_ADD_VLIST, OSL::Strings::v, and VSETALL.

Referenced by nmg_s_to_vlist().

Here is the call graph for this function:

void nmg_snurb_fu_to_vlist ( struct bu_list vhead,
const struct faceuse *  fu,
int  poly_markers 
)

Definition at line 297 of file nmg_plot.c.

References BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, BU_CK_LIST_HEAD, nmg_snurb_fu_eval(), nmg_snurb_fu_get_norm(), nmg_snurb_to_vlist(), and RT_ADD_VLIST.

Referenced by nmg_s_to_vlist().

Here is the call graph for this function:

void nmg_s_to_vlist ( struct bu_list vhead,
const struct shell *  s,
int  poly_markers 
)

Plot the entire contents of a shell.

poly_markers = 0 for vectors 1 for polygons 2 for polygons and surface normals drawn with vectors

Definition at line 347 of file nmg_plot.c.

References BU_CK_LIST_HEAD, BU_LIST_FOR, lu, NMG_CK_SHELL(), nmg_eu_to_vlist(), NMG_FACE_G_SNURB_MAGIC, nmg_lu_to_vlist(), nmg_snurb_fu_to_vlist(), nmg_vu_to_vlist(), VSET, and VSETALL.

Referenced by nmg_r_to_vlist().

Here is the call graph for this function:

void nmg_r_to_vlist ( struct bu_list vhead,
const struct nmgregion *  r,
int  poly_markers 
)

Definition at line 404 of file nmg_plot.c.

References BU_CK_LIST_HEAD, BU_LIST_FOR, nmg_s_to_vlist(), and s.

Referenced by nmg_m_to_vlist().

Here is the call graph for this function:

void nmg_m_to_vlist ( struct bu_list vhead,
struct model *  m,
int  poly_markers 
)

Definition at line 417 of file nmg_plot.c.

References BU_CK_LIST_HEAD, BU_LIST_FOR, and nmg_r_to_vlist().

Referenced by rt_nmg_plot().

Here is the call graph for this function:

void nmg_offset_eu_vert ( fastf_t base,
const struct edgeuse *  eu,
const fastf_t face_normal,
int  tip 
)

Given an edgeuse, find an offset for its vertexuse which will place it "above" and "inside" the area of the face.

The point will be offset inwards along the edge slightly, to avoid obscuring the vertex, and will be offset off the face (in the direction of the face normal) slightly, to avoid obscuring the edge itself.

Definition at line 449 of file nmg_plot.c.

References BU_LIST_PPREV_CIRC, memset(), and nmg_eue_dist.

Here is the call graph for this function:

void nmg_pl_v ( FILE *  fp,
const struct vertex *  v,
long *  b 
)

Definition at line 600 of file nmg_plot.c.

References OSL::Strings::label, rt_g::NMG_debug, pdv_3move(), pdv_3point(), pl_color(), pl_label(), and RTG.

Referenced by nmg_pl_e().

Here is the call graph for this function:

void nmg_pl_e ( FILE *  fp,
const struct edge *  e,
long *  b,
int  red,
int  green,
int  blue 
)

Definition at line 622 of file nmg_plot.c.

References nmg_pl_v(), pdv_3line(), pl_color(), and OSL::Strings::v.

Referenced by nmg_pl_eu().

Here is the call graph for this function:

void nmg_pl_eu ( FILE *  fp,
const struct edgeuse *  eu,
long *  b,
int  red,
int  green,
int  blue 
)

Definition at line 658 of file nmg_plot.c.

References NMG_FACEUSE_MAGIC, NMG_LOOPUSE_MAGIC, nmg_pl_e(), pdv_3line(), and pl_color().

Referenced by pleu().

Here is the call graph for this function:

void nmg_pl_lu ( FILE *  fp,
const struct loopuse *  lu,
long *  b,
int  red,
int  green,
int  blue 
)

Definition at line 710 of file nmg_plot.c.

References nmg_vlblock_lu(), rt_plot_vlblock(), rt_vlblock_free(), and rt_vlblock_init().

Referenced by nmg_face_lu_plot(), nmg_pl_lu_around_eu(), and nmg_plot_lu_ray().

Here is the call graph for this function:

void nmg_pl_fu ( FILE *  fp,
const struct faceuse *  fu,
long *  b,
int  red,
int  green,
int  blue 
)

Definition at line 722 of file nmg_plot.c.

References BU_LIST_FOR, lu, nmg_vlblock_lu(), rt_plot_vlblock(), rt_vlblock_free(), and rt_vlblock_init().

Referenced by nmg_cut_loop(), nmg_plot_ray_face(), and nmg_rt_isect_plfu().

Here is the call graph for this function:

void nmg_pl_s ( FILE *  fp,
const struct shell *  s 
)

Note that "b" should probably be defined a level higher, to reduce malloc/free calls when plotting multiple shells.

Definition at line 746 of file nmg_plot.c.

References nmg_vlblock_s(), rt_plot_vlblock(), rt_vlblock_free(), and rt_vlblock_init().

Referenced by nmg_eval_plot(), nmg_evaluate_boolean(), and nmg_isect_two_generic_faces().

Here is the call graph for this function:

void nmg_pl_shell ( FILE *  fp,
const struct shell *  s,
int  fancy 
)

Definition at line 758 of file nmg_plot.c.

References nmg_vlblock_s(), rt_plot_vlblock(), rt_vlblock_free(), and rt_vlblock_init().

Here is the call graph for this function:

void nmg_pl_r ( FILE *  fp,
const struct nmgregion *  r 
)

Definition at line 770 of file nmg_plot.c.

References nmg_vlblock_r(), rt_plot_vlblock(), rt_vlblock_free(), and rt_vlblock_init().

Here is the call graph for this function:

void nmg_pl_m ( FILE *  fp,
const struct model *  m 
)

Definition at line 782 of file nmg_plot.c.

References nmg_vlblock_m(), rt_plot_vlblock(), rt_vlblock_free(), and rt_vlblock_init().

Here is the call graph for this function:

void nmg_vlblock_v ( struct bn_vlblock vbp,
const struct vertex *  v,
long *  tab 
)

Definition at line 802 of file nmg_plot.c.

References BN_CK_VLBLOCK, BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, RT_ADD_VLIST, and rt_vlblock_find().

Referenced by nmg_vlblock_e(), nmg_vlblock_lu(), and nmg_vlblock_s().

Here is the call graph for this function:

void nmg_vlblock_e ( struct bn_vlblock vbp,
const struct edge *  e,
long *  tab,
int  red,
int  green,
int  blue 
)

Definition at line 821 of file nmg_plot.c.

References BN_CK_VLBLOCK, BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, nmg_vlblock_v(), RT_ADD_VLIST, rt_vlblock_find(), and OSL::Strings::v.

Referenced by nmg_vlblock_eu().

Here is the call graph for this function:

void nmg_vlblock_eu ( struct bn_vlblock vbp,
const struct edgeuse *  eu,
long *  tab,
int  red,
int  green,
int  blue,
int  fancy 
)

Definition at line 861 of file nmg_plot.c.

References BN_CK_VLBLOCK, BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, NMG_FACEUSE_MAGIC, NMG_LOOPUSE_MAGIC, nmg_vlblock_e(), RT_ADD_VLIST, and rt_vlblock_find().

Referenced by nmg_vlblock_around_eu(), nmg_vlblock_lu(), and nmg_vlblock_s().

Here is the call graph for this function:

void nmg_vlblock_euleft ( struct bu_list vh,
const struct edgeuse *  eu,
const fastf_t center,
const fastf_t mat,
const fastf_t xvec,
const fastf_t yvec,
double  len,
const struct bn_tol tol 
)

Draw the left vector for this edgeuse. At the tip, write the angle around the edgeuse, in degrees.

Color is determined by caller.

Definition at line 982 of file nmg_plot.c.

References bn_angle_measure(), BN_CK_TOL, bn_vlist_3string(), BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, nmg_find_eu_leftvec(), RT_ADD_VLIST, RTG, and rt_g::rtg_vlfree.

Referenced by nmg_vlblock_around_eu().

Here is the call graph for this function:

void nmg_vlblock_around_eu ( struct bn_vlblock vbp,
const struct edgeuse *  arg_eu,
long *  tab,
int  fancy,
const struct bn_tol tol 
)

Given an edgeuse, plot all the edgeuses around the common edge. A graphical parallel to nmg_pr_fu_around_eu_vecs().

If the "fancy" flag is set, draw an angle fan around the edge midpoint, using the same angular reference as nmg_pr_fu_around_eu_vecs(), so that the printed output can be cross-referenced to this display.

Definition at line 1022 of file nmg_plot.c.

References BN_CK_TOL, BN_CK_VLBLOCK, nmg_eu_2vecs_perp(), nmg_vlblock_eu(), nmg_vlblock_euleft(), rt_vlblock_find(), X, Y, and Z.

Referenced by nmg_pl_edges_in_2_shells(), and nmg_plot_lu_around_eu().

Here is the call graph for this function:

void nmg_vlblock_lu ( struct bn_vlblock vbp,
const struct loopuse *  lu,
long *  tab,
int  red,
int  green,
int  blue,
int  fancy 
)

Definition at line 1088 of file nmg_plot.c.

References BN_CK_VLBLOCK, BU_LIST_FIRST_MAGIC, BU_LIST_FOR, BU_LIST_PNEXT, NMG_CK_LOOPUSE(), NMG_EDGEUSE_MAGIC, NMG_VERTEXUSE_MAGIC, nmg_vlblock_eu(), and nmg_vlblock_v().

Referenced by nmg_pl_fu(), nmg_pl_lu(), nmg_plot_lu_around_eu(), nmg_vlblock_fu(), and nmg_vlblock_s().

Here is the call graph for this function:

void nmg_vlblock_fu ( struct bn_vlblock vbp,
const struct faceuse *  fu,
long *  tab,
int  fancy 
)

Definition at line 1113 of file nmg_plot.c.

References BN_CK_VLBLOCK, BU_LIST_FOR, lu, and nmg_vlblock_lu().

Referenced by nmg_2face_plot(), nmg_face_plot(), nmg_pl_2fu(), nmg_pl_comb_fu(), and nmg_vlblock_s().

Here is the call graph for this function:

void nmg_vlblock_s ( struct bn_vlblock vbp,
const struct shell *  s,
int  fancy 
)

Definition at line 1134 of file nmg_plot.c.

References BN_CK_VLBLOCK, bu_calloc(), bu_free(), BU_LIST_FOR, lu, NMG_CK_LOOPUSE(), NMG_CK_SHELL(), nmg_vlblock_eu(), nmg_vlblock_fu(), nmg_vlblock_lu(), and nmg_vlblock_v().

Referenced by nmg_eval_plot(), nmg_pl_s(), nmg_pl_shell(), and nmg_vlblock_r().

Here is the call graph for this function:

void nmg_vlblock_r ( struct bn_vlblock vbp,
const struct nmgregion *  r,
int  fancy 
)

Definition at line 1186 of file nmg_plot.c.

References BN_CK_VLBLOCK, BU_LIST_FOR, nmg_vlblock_s(), and s.

Referenced by nmg_pl_r(), and nmg_vlblock_m().

Here is the call graph for this function:

void nmg_vlblock_m ( struct bn_vlblock vbp,
const struct model *  m,
int  fancy 
)

Definition at line 1200 of file nmg_plot.c.

References BN_CK_VLBLOCK, BU_LIST_FOR, and nmg_vlblock_r().

Referenced by nmg_pl_m().

Here is the call graph for this function:

void nmg_pl_edges_in_2_shells ( struct bn_vlblock vbp,
long *  b,
const struct edgeuse *  eu,
int  fancy,
const struct bn_tol tol 
)

If another use of this edge is in another shell, plot all the uses around this edge.

Definition at line 1224 of file nmg_plot.c.

References BN_CK_TOL, NMG_CK_LOOPUSE(), NMG_CK_SHELL(), NMG_FACEUSE_MAGIC, NMG_LOOPUSE_MAGIC, nmg_vlblock_around_eu(), and s.

Referenced by nmg_pl_isect().

Here is the call graph for this function:

void nmg_pl_isect ( const char *  filename,
const struct shell *  s,
const struct bn_tol tol 
)

Called by nmg_bool.c

Definition at line 1256 of file nmg_plot.c.

References BN_CK_TOL, bu_bomb(), bu_calloc(), bu_free(), BU_LIST_FIRST_MAGIC, BU_LIST_FOR, bu_log(), lu, NMG_CK_LOOPUSE(), NMG_CK_SHELL(), NMG_EDGEUSE_MAGIC, nmg_pl_edges_in_2_shells(), NMG_VERTEXUSE_MAGIC, rt_plot_vlblock(), rt_vlblock_free(), and rt_vlblock_init().

Here is the call graph for this function:

void nmg_pl_comb_fu ( int  num1,
int  num2,
const struct faceuse *  fu1 
)

Called from nmg_bool.c/nmg_face_combine()

Definition at line 1316 of file nmg_plot.c.

References bu_calloc(), bu_free(), bu_log(), rt_g::NMG_debug, nmg_find_model(), nmg_vlblock_anim_upcall, nmg_vlblock_fu(), rt_plot_vlblock(), rt_vlblock_free(), rt_vlblock_init(), RTG, and US_DELAY.

Here is the call graph for this function:

void nmg_pl_2fu ( const char *  str,
const struct faceuse *  fu1,
const struct faceuse *  fu2,
int  show_mates 
)

Note that 'str' is expected to contain a d to place the frame number.

Called from nmg_isect_2faces and other places.

Definition at line 1380 of file nmg_plot.c.

References bu_calloc(), bu_free(), bu_log(), rt_g::NMG_debug, nmg_find_model(), nmg_vlblock_anim_upcall, nmg_vlblock_fu(), rt_plot_vlblock(), rt_vlblock_free(), rt_vlblock_init(), RTG, and US_DELAY.

Referenced by nmg_isect_two_generic_faces(), nmg_kill_snakes(), nmg_mesh_faces(), and nmg_simplify_loop().

Here is the call graph for this function:

HIDDEN void show_broken_vu ( struct bn_vlblock vbp,
const struct vertexuse *  vu 
)

Definition at line 1471 of file nmg_plot.c.

References BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, PICK_BROKEN_COLOR, RT_ADD_VLIST, rt_vlblock_find(), and OSL::Strings::v.

Referenced by nmg_show_broken_classifier_stuff(), and show_broken_e().

Here is the call graph for this function:

HIDDEN void show_broken_e ( struct bn_vlblock vbp,
const struct edgeuse *  eu 
)

Definition at line 1525 of file nmg_plot.c.

References BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, PICK_BROKEN_COLOR, RT_ADD_VLIST, rt_vlblock_find(), show_broken_vu(), and OSL::Strings::v.

Here is the call graph for this function:

void nmg_plot_sigstepalong ( int  i)

Definition at line 1722 of file nmg_plot.c.

Referenced by nmg_show_broken_classifier_stuff().

void nmg_show_broken_classifier_stuff ( uint32_t *  p,
char **  classlist,
int  all_new,
int  fancy,
const char *  a_string 
)

XXX Needs new name, with nmg_ prefix, and a stronger indication that this is a graphical display of classifier operation.

Definition at line 1733 of file nmg_plot.c.

References bu_calloc(), bu_free(), bu_log(), bu_realloc(), eu_p, memset(), rt_g::NMG_debug, NMG_EDGE_MAGIC, NMG_EDGEUSE_MAGIC, NMG_FACE_MAGIC, NMG_FACEUSE_MAGIC, nmg_find_model(), NMG_LOOPUSE_MAGIC, NMG_MODEL_MAGIC, nmg_plot_sigstepalong(), NMG_REGION_MAGIC, NMG_SHELL_MAGIC, NMG_VERTEXUSE_MAGIC, nmg_vlblock_anim_upcall, rt_plot_vlblock(), rt_vlblock_free(), rt_vlblock_init(), RTG, show_broken_vu(), and US_DELAY.

Referenced by nmg_show_each_loop().

Here is the call graph for this function:

void nmg_face_plot ( const struct faceuse *  fu)

Definition at line 1862 of file nmg_plot.c.

References bu_calloc(), bu_free(), bu_log(), rt_g::NMG_debug, nmg_find_model(), nmg_vlblock_anim_upcall, nmg_vlblock_fu(), rt_plot_vlblock(), rt_vlblock_free(), rt_vlblock_init(), and RTG.

Referenced by nmg_fcut_face(), and nmg_isect_two_generic_faces().

Here is the call graph for this function:

void nmg_2face_plot ( const struct faceuse *  fu1,
const struct faceuse *  fu2 
)

Just like nmg_face_plot, except it draws two faces each iteration.

Definition at line 1924 of file nmg_plot.c.

References bu_calloc(), bu_free(), bu_log(), rt_g::NMG_debug, nmg_find_model(), nmg_vlblock_anim_upcall, nmg_vlblock_fu(), rt_vlblock_free(), rt_vlblock_init(), and RTG.

Referenced by nmg_fcut_face().

Here is the call graph for this function:

void nmg_face_lu_plot ( const struct loopuse *  lu,
const struct vertexuse *  vu1,
const struct vertexuse *  vu2 
)

Plot the loop, and a ray from vu1 to vu2.

Definition at line 1971 of file nmg_plot.c.

References bu_calloc(), bu_free(), bu_log(), NMG_CK_LOOPUSE(), rt_g::NMG_debug, nmg_find_model(), nmg_pl_lu(), pdv_3line(), pl_color(), and RTG.

Referenced by nmg_check_radial().

Here is the call graph for this function:

void nmg_plot_lu_ray ( const struct loopuse *  lu,
const struct vertexuse *  vu1,
const struct vertexuse *  vu2,
const fastf_t left 
)

Plot the loop, a ray from vu1 to vu2, and the left vector.

Definition at line 2020 of file nmg_plot.c.

References bu_calloc(), bu_free(), bu_log(), NMG_CK_LOOPUSE(), rt_g::NMG_debug, nmg_find_model(), nmg_pl_lu(), pdv_3line(), pl_color(), and RTG.

Referenced by nmg_face_state_transition().

Here is the call graph for this function:

void nmg_plot_ray_face ( const char *  fname,
fastf_t pt,
const fastf_t dir,
const struct faceuse *  fu 
)

Definition at line 2072 of file nmg_plot.c.

References bu_bomb(), bu_calloc(), bu_free(), bu_log(), rt_g::NMG_debug, nmg_pl_fu(), pdv_3line(), and RTG.

Here is the call graph for this function:

void nmg_plot_lu_around_eu ( const char *  prefix,
const struct edgeuse *  eu,
const struct bn_tol tol 
)

Draw and label all the loopuses gathered around this edgeuse.

Called by nmg_radial_join_eu().

Definition at line 2111 of file nmg_plot.c.

References BN_CK_TOL, bu_calloc(), bu_free(), bu_log(), nmg_find_model(), NMG_LOOPUSE_MAGIC, nmg_vlblock_around_eu(), nmg_vlblock_lu(), rt_plot_vlblock(), rt_vlblock_free(), and rt_vlblock_init().

Referenced by cut_unimonotone(), and nmg_triangulate_rm_holes().

Here is the call graph for this function:

int nmg_snurb_to_vlist ( struct bu_list vhead,
const struct face_g_snurb *  fg,
int  n_interior 
)

A routine to draw the entire surface of a face_g_snurb. No handling of trimming curves is done.

nmg_hack_snurb(&n, fg); / XXX

Definition at line 2164 of file nmg_plot.c.

References BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, BU_CK_LIST_HEAD, bu_free(), RT_ADD_VLIST, rt_nurb_free_snurb(), rt_nurb_kvgen(), rt_nurb_kvmerge(), and rt_nurb_s_refine().

Referenced by nmg_snurb_fu_to_vlist().

Here is the call graph for this function:

void nmg_cnurb_to_vlist ( struct bu_list vhead,
const struct edgeuse *  eu,
int  n_interior,
int  cmd 
)

Draw interior points on a cnurb curve.

The endpoints are not drawn, as those points are (should) match the vertices at the end of the edgeuse, and are handled by the caller.

Special processing is performed for the order <= 0 (linear) cnurbs.

If the curve is on a snurb face, it is in parameter space. If the curve is on a planar face, it is in XYZ space.

Definition at line 2260 of file nmg_plot.c.

References BU_CK_LIST_HEAD, bu_free(), bu_log(), bu_malloc(), memset(), rt_g::NMG_debug, NMG_EDGE_G_CNURB_MAGIC, NMG_FACE_G_PLANE_MAGIC, nmg_find_fu_of_eu(), RT_ADD_VLIST, rt_nurb_c_eval(), rt_nurb_gen_knot_vector(), rt_nurb_s_eval(), RTG, s, and VSETALL.

Referenced by nmg_lu_to_vlist().

Here is the call graph for this function: