g_pipe.c File Reference

#include "common.h"
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include "tcl.h"
#include "machine.h"
#include "vmath.h"
#include "bu.h"
#include "bn.h"
#include "db.h"
#include "nmg.h"
#include "raytrace.h"
#include "wdb.h"
#include "rtgeom.h"
#include "./debug.h"

Include dependency graph for g_pipe.c:

Go to the source code of this file.

Data Structures

struct  id_pipe
struct  lin_pipe
struct  bend_pipe
struct  hit_list

Defines

#define PIPE_MM(_v)   VMINMAX( stp->st_min, stp->st_max, _v );
#define ARC_SEGS   16
#define PIPE_LINEAR_OUTER_BODY   1
#define PIPE_LINEAR_INNER_BODY   2
#define PIPE_LINEAR_TOP   3
#define PIPE_LINEAR_BASE   4
#define PIPE_BEND_OUTER_BODY   5
#define PIPE_BEND_INNER_BODY   6
#define PIPE_BEND_BASE   7
#define PIPE_BEND_TOP   8
#define SEG_MISS(SEG)   (SEG).seg_stp=(struct soltab *) 0;

Functions

void rt_pipe_ifree (struct rt_db_internal *ip)
HIDDEN int rt_bend_pipe_prep (struct soltab *stp, struct bu_list *head, fastf_t *bend_center, fastf_t *bend_start, fastf_t *bend_end, fastf_t bend_radius, fastf_t bend_angle, fastf_t *v1, fastf_t *v2, fastf_t od, fastf_t id)
HIDDEN void rt_linear_pipe_prep (struct soltab *stp, struct bu_list *head, fastf_t *pt1, fastf_t id1, fastf_t od1, fastf_t *pt2, fastf_t id2, fastf_t od2)
int rt_pipe_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
void rt_pipe_print (register const struct soltab *stp)
void rt_pipept_print (const struct wdb_pipept *pipe, double mm2local)
void rt_vls_pipept (struct bu_vls *vp, int seg_no, const struct rt_db_internal *ip, double mm2local)
HIDDEN void bend_pipe_shot (struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead, struct bend_pipe *pipe, struct hit_list *hit_headp, int *hit_count, int seg_no)
HIDDEN void linear_pipe_shot (struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead, struct lin_pipe *pipe, struct hit_list *hit_headp, int *hit_count, int seg_no)
HIDDEN void pipe_start_shot (struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead, struct id_pipe *pipe, struct hit_list *hit_headp, int *hit_count, int seg_no)
HIDDEN void pipe_end_shot (struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead, struct id_pipe *pipe, struct hit_list *hit_headp, int *hit_count, int seg_no)
HIDDEN void rt_pipe_hitsort (struct hit_list *h, int *nh, register struct xray *rp, struct soltab *stp)
void rt_pipe_norm (register struct hit *hitp, struct soltab *stp, register struct xray *rp)
int rt_pipe_shot (struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead)
void rt_pipe_vshot (struct soltab **stp, struct xray **rp, struct seg *segp, int n, struct application *ap)
void rt_pipe_curve (register struct curvature *cvp, register struct hit *hitp, struct soltab *stp)
void rt_pipe_uv (struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp)
void rt_pipe_free (register struct soltab *stp)
int rt_pipe_class (void)
HIDDEN void draw_pipe_arc (struct bu_list *vhead, fastf_t radius, fastf_t *center, const fastf_t *v1, const fastf_t *v2, fastf_t *end, int seg_count, int full_circle)
HIDDEN void draw_linear_seg (struct bu_list *vhead, const fastf_t *p1, const fastf_t or1, const fastf_t ir1, const fastf_t *p2, const fastf_t or2, const fastf_t ir2, const fastf_t *v1, const fastf_t *v2)
HIDDEN void draw_pipe_bend (struct bu_list *vhead, const fastf_t *center, const fastf_t *end, const fastf_t radius, const fastf_t angle, const fastf_t *v1, const fastf_t *v2, const fastf_t *norm, const fastf_t or, const fastf_t ir, fastf_t *f1, fastf_t *f2, const int seg_count)
int rt_pipe_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol)
HIDDEN void tesselate_pipe_start (struct wdb_pipept *pipe, int arc_segs, double sin_del, double cos_del, struct vertex ***outer_loop, struct vertex ***inner_loop, fastf_t *r1, fastf_t *r2, struct shell *s, const struct bn_tol *tol)
HIDDEN void tesselate_pipe_linear (fastf_t *start_pt, fastf_t or, fastf_t ir, fastf_t *end_pt, fastf_t end_or, fastf_t end_ir, int arc_segs, double sin_del, double cos_del, struct vertex ***outer_loop, struct vertex ***inner_loop, fastf_t *r1, fastf_t *r2, struct shell *s, const struct bn_tol *tol)
HIDDEN void tesselate_pipe_bend (fastf_t *bend_start, fastf_t *bend_end, fastf_t *bend_center, fastf_t or, fastf_t ir, int arc_segs, double sin_del, double cos_del, struct vertex ***outer_loop, struct vertex ***inner_loop, fastf_t *start_r1, fastf_t *start_r2, struct shell *s, const struct bn_tol *tol, const struct rt_tess_tol *ttol)
HIDDEN void tesselate_pipe_end (struct wdb_pipept *pipe, int arc_segs, double sin_del, double cos_del, struct vertex ***outer_loop, struct vertex ***inner_loop, struct shell *s, const struct bn_tol *tol)
int rt_pipe_tess (struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol)
int rt_pipe_import (struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip)
int rt_pipe_export (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
int rt_pipe_import5 (struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip)
int rt_pipe_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
int rt_pipe_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
int rt_pipe_ck (const struct bu_list *headp)
int rt_pipe_tclget (Tcl_Interp *interp, const struct rt_db_internal *intern, const char *attr)
int rt_pipe_tcladjust (Tcl_Interp *interp, struct rt_db_internal *intern, int argc, char **argv, struct resource *resp)


Detailed Description

Intersect a ray with a pipe solid.

Authors -

Source - SECAD/VLD Computing Consortium, Bldg 394 The U. S. Army Ballistic Research Laboratory Aberdeen Proving Ground, Maryland 21005-5066

Definition in file g_pipe.c.


Define Documentation

#define PIPE_MM _v   )     VMINMAX( stp->st_min, stp->st_max, _v );
 

Definition at line 125 of file g_pipe.c.

Referenced by rt_bend_pipe_prep(), and rt_linear_pipe_prep().

#define ARC_SEGS   16
 

Definition at line 127 of file g_pipe.c.

Referenced by rt_pipe_plot().

#define PIPE_LINEAR_OUTER_BODY   1
 

Definition at line 129 of file g_pipe.c.

Referenced by linear_pipe_shot(), and rt_pipe_norm().

#define PIPE_LINEAR_INNER_BODY   2
 

Definition at line 130 of file g_pipe.c.

Referenced by linear_pipe_shot(), and rt_pipe_norm().

#define PIPE_LINEAR_TOP   3
 

Definition at line 131 of file g_pipe.c.

Referenced by pipe_end_shot(), and rt_pipe_norm().

#define PIPE_LINEAR_BASE   4
 

Definition at line 132 of file g_pipe.c.

Referenced by pipe_start_shot(), and rt_pipe_norm().

#define PIPE_BEND_OUTER_BODY   5
 

Definition at line 133 of file g_pipe.c.

Referenced by bend_pipe_shot(), and rt_pipe_norm().

#define PIPE_BEND_INNER_BODY   6
 

Definition at line 134 of file g_pipe.c.

Referenced by rt_pipe_norm().

#define PIPE_BEND_BASE   7
 

Definition at line 135 of file g_pipe.c.

Referenced by pipe_start_shot(), and rt_pipe_norm().

#define PIPE_BEND_TOP   8
 

Definition at line 136 of file g_pipe.c.

Referenced by pipe_end_shot(), and rt_pipe_norm().

#define SEG_MISS SEG   )     (SEG).seg_stp=(struct soltab *) 0;
 

Definition at line 1388 of file g_pipe.c.


Function Documentation

void rt_pipe_ifree struct rt_db_internal ip  ) 
 

R T _ P I P E _ I F R E E

Free the storage associated with the rt_db_internal version of this solid.

Definition at line 3652 of file g_pipe.c.

References bu_free(), BU_LIST_DEQUEUE, BU_LIST_WHILE, GENPTR_NULL, rt_db_internal::idb_ptr, wdb_pipept::l, bu_list::magic, rt_pipe_internal::pipe_segs_head, RT_CK_DB_INTERNAL, and RT_PIPE_CK_MAGIC.

Here is the call graph for this function:

HIDDEN int rt_bend_pipe_prep struct soltab stp,
struct bu_list head,
fastf_t bend_center,
fastf_t bend_start,
fastf_t bend_end,
fastf_t  bend_radius,
fastf_t  bend_angle,
fastf_t v1,
fastf_t v2,
fastf_t  od,
fastf_t  id
 

Definition at line 142 of file g_pipe.c.

References bend_pipe::bend_alpha_i, bend_pipe::bend_alpha_o, bend_pipe::bend_angle, bend_pipe::bend_end, bend_pipe::bend_invR, bend_pipe::bend_ir, bend_pipe::bend_max, bend_pipe::bend_min, bend_pipe::bend_N, bend_pipe::bend_or, bend_pipe::bend_R_SQ, bend_pipe::bend_ra, bend_pipe::bend_radius, bend_pipe::bend_rb, bend_pipe::bend_SoR, bend_pipe::bend_start, bend_pipe::bend_V, bn_mat_inverse(), bn_pi, bu_free(), BU_LIST_INSERT, bu_log(), bu_malloc(), head, bend_pipe::l, LOCAL, MAGNITUDE, MAT_COPY, MAT_IDN, bend_pipe::pipe_is_bend, PIPE_MM, R, VCROSS, VMOVE, VSCALE, VSET, VSUB2, VUNITIZE, X, Y, and Z.

Referenced by rt_pipe_prep().

Here is the call graph for this function:

HIDDEN void rt_linear_pipe_prep struct soltab stp,
struct bu_list head,
fastf_t pt1,
fastf_t  id1,
fastf_t  od1,
fastf_t pt2,
fastf_t  id2,
fastf_t  od2
 

Definition at line 229 of file g_pipe.c.

References bn_mat_mul(), bn_mat_trn(), bn_vec_ortho(), BU_LIST_INSERT, bu_malloc(), head, lin_pipe::l, LOCAL, MAGNITUDE, MAT_IDN, lin_pipe::pipe_H, lin_pipe::pipe_invRoS, lin_pipe::pipe_is_bend, lin_pipe::pipe_len, PIPE_MM, lin_pipe::pipe_ribase, lin_pipe::pipe_ribase_sq, lin_pipe::pipe_ridiff, lin_pipe::pipe_ridiff_sq, lin_pipe::pipe_ritop, lin_pipe::pipe_ritop_sq, lin_pipe::pipe_robase, lin_pipe::pipe_robase_sq, lin_pipe::pipe_rodiff, lin_pipe::pipe_rodiff_sq, lin_pipe::pipe_rotop, lin_pipe::pipe_rotop_sq, lin_pipe::pipe_SoR, lin_pipe::pipe_V, R, VCROSS, VJOIN2, VMOVE, VSCALE, and VSUB2.

Referenced by rt_pipe_prep().

Here is the call graph for this function:

int rt_pipe_prep struct soltab stp,
struct rt_db_internal ip,
struct rt_i rtip
 

R T _ P I P E _ P R E P

Given a pointer to a GED database record, and a transformation matrix, determine if this is a valid pipe solid, and if so, precompute various terms of the formula.

Returns - 0 pipe solid is OK !0 Error in description

Implicit return - A struct bu_list is created, and it's address is stored in stp->st_specific for use by pipe_shot().

Definition at line 321 of file g_pipe.c.

References bn_pi, BU_LIST_FIRST, BU_LIST_INIT, BU_LIST_IS_EMPTY, BU_LIST_IS_HEAD, BU_LIST_NEXT, bu_malloc(), head, rt_db_internal::idb_ptr, wdb_pipept::l, NEAR_ZERO, NULL, rt_pipe_internal::pipe_segs_head, wdb_pipept::pp_bendradius, wdb_pipept::pp_coord, wdb_pipept::pp_id, wdb_pipept::pp_od, rt_bend_pipe_prep(), RT_CK_DB_INTERNAL, rt_linear_pipe_prep(), RT_PIPE_CK_MAGIC, SQRT_SMALL_FASTF, soltab::st_aradius, soltab::st_bradius, soltab::st_center, soltab::st_max, soltab::st_min, soltab::st_specific, VCROSS, VDOT, VJOIN1, VMOVE, VNEAR_ZERO, VSET, VSUB2, VUNITIZE, X, Y, and Z.

Here is the call graph for this function:

void rt_pipe_print register const struct soltab stp  ) 
 

R T _ P I P E _ P R I N T

Definition at line 439 of file g_pipe.c.

void rt_pipept_print const struct wdb_pipept pipe,
double  mm2local
 

R T _ P I P E P T _ P R I N T

Definition at line 449 of file g_pipe.c.

References bu_log(), wdb_pipept::pp_bendradius, wdb_pipept::pp_coord, wdb_pipept::pp_id, wdb_pipept::pp_od, V3ARGS, and VSCALE.

Here is the call graph for this function:

HIDDEN void bend_pipe_shot struct soltab stp,
register struct xray rp,
struct application ap,
struct seg seghead,
struct bend_pipe pipe,
struct hit_list hit_headp,
int *  hit_count,
int  seg_no
 

Definition at line 506 of file g_pipe.c.

References A, application::a_inv_dir, bend_pipe::bend_alpha_o, bend_pipe::bend_max, bend_pipe::bend_min, bend_pipe::bend_ra, bend_pipe::bend_radius, bend_pipe::bend_rb, bend_pipe::bend_SoR, bend_pipe::bend_V, bn_pi, bn_pr_roots(), BU_GETSTRUCT, BU_LIST_INSERT, bu_log(), directory::d_namep, hit_list::l, LOCAL, MAT4X3VEC, NEAR_ZERO, PIPE_BEND_OUTER_BODY, RT_HIT_MAGIC, rt_in_rpp(), rt_poly_roots(), soltab::st_dp, val, VDOT, VJOIN1, VPRINT, VSCALE, VSUB2, VUNITIZE, X, Y, and Z.

Referenced by rt_pipe_shot().

Here is the call graph for this function:

HIDDEN void linear_pipe_shot struct soltab stp,
register struct xray rp,
struct application ap,
struct seg seghead,
struct lin_pipe pipe,
struct hit_list hit_headp,
int *  hit_count,
int  seg_no
 

Definition at line 744 of file g_pipe.c.

References BU_GETSTRUCT, BU_LIST_INSERT, bu_log(), hit::hit_dist, hit::hit_magic, hit::hit_surfno, hit::hit_vpriv, hit_list::hitp, hit_list::l, LOCAL, MAT4X3VEC, lin_pipe::pipe_is_bend, PIPE_LINEAR_INNER_BODY, PIPE_LINEAR_OUTER_BODY, lin_pipe::pipe_ribase, lin_pipe::pipe_ridiff, lin_pipe::pipe_ridiff_sq, lin_pipe::pipe_ritop, lin_pipe::pipe_robase, lin_pipe::pipe_rodiff, lin_pipe::pipe_rodiff_sq, lin_pipe::pipe_SoR, lin_pipe::pipe_V, rt_bomb(), RT_HIT_MAGIC, VJOIN1, VMOVE, VSUB2, X, Y, and Z.

Referenced by rt_pipe_shot().

Here is the call graph for this function:

HIDDEN void pipe_start_shot struct soltab stp,
register struct xray rp,
struct application ap,
struct seg seghead,
struct id_pipe pipe,
struct hit_list hit_headp,
int *  hit_count,
int  seg_no
 

Definition at line 888 of file g_pipe.c.

References bend_pipe::bend_ir, bend_pipe::bend_or, bend_pipe::bend_rb, bend_pipe::bend_start, BU_GETSTRUCT, BU_LIST_INSERT, hit::hit_dist, hit::hit_magic, hit::hit_surfno, hit_list::hitp, hit_list::l, id_pipe::l, MAGSQ, NEAR_ZERO, PIPE_BEND_BASE, lin_pipe::pipe_H, id_pipe::pipe_is_bend, PIPE_LINEAR_BASE, lin_pipe::pipe_ribase_sq, lin_pipe::pipe_robase_sq, lin_pipe::pipe_V, RT_HIT_MAGIC, SMALL_FASTF, VDOT, VJOIN1, and VSUB2.

Referenced by rt_pipe_shot().

HIDDEN void pipe_end_shot struct soltab stp,
register struct xray rp,
struct application ap,
struct seg seghead,
struct id_pipe pipe,
struct hit_list hit_headp,
int *  hit_count,
int  seg_no
 

Definition at line 961 of file g_pipe.c.

References bend_pipe::bend_end, bend_pipe::bend_ir, bend_pipe::bend_N, bend_pipe::bend_or, bend_pipe::bend_V, BU_GETSTRUCT, BU_LIST_INSERT, hit::hit_dist, hit::hit_magic, hit::hit_surfno, hit_list::hitp, hit_list::l, id_pipe::l, MAGSQ, NEAR_ZERO, PIPE_BEND_TOP, lin_pipe::pipe_H, id_pipe::pipe_is_bend, lin_pipe::pipe_len, PIPE_LINEAR_TOP, lin_pipe::pipe_ritop_sq, lin_pipe::pipe_rotop_sq, lin_pipe::pipe_V, RT_HIT_MAGIC, SMALL_FASTF, top(), VCROSS, VDOT, VJOIN1, VSUB2, and VUNITIZE.

Referenced by rt_pipe_shot().

Here is the call graph for this function:

HIDDEN void rt_pipe_hitsort struct hit_list h,
int *  nh,
register struct xray rp,
struct soltab stp
 

Definition at line 1042 of file g_pipe.c.

References bu_free(), BU_LIST_DEQUEUE, BU_LIST_FIRST, BU_LIST_INSERT, BU_LIST_IS_HEAD, BU_LIST_NEXT, BU_LIST_NEXT_NOT_HEAD, BU_LIST_NOT_HEAD, BU_LIST_PREV, BU_LIST_WHILE, bu_log(), directory::d_namep, hit::hit_dist, hit::hit_normal, hit::hit_point, hit::hit_surfno, hit_list::hitp, hit_list::l, NEAR_ZERO, NULL, soltab::st_dp, V3ARGS, and VDOT.

Referenced by rt_pipe_shot().

Here is the call graph for this function:

void rt_pipe_norm register struct hit hitp,
struct soltab stp,
register struct xray rp
 

R T _ P I P E _ N O R M

Given ONE ray distance, return the normal and entry/exit point.

Definition at line 1187 of file g_pipe.c.

References BU_LIST_FIRST, BU_LIST_NEXT, bu_log(), LOCAL, MAT3X3VEC, MAT4X3VEC, PIPE_BEND_BASE, PIPE_BEND_INNER_BODY, PIPE_BEND_OUTER_BODY, PIPE_BEND_TOP, PIPE_LINEAR_BASE, PIPE_LINEAR_INNER_BODY, PIPE_LINEAR_OUTER_BODY, PIPE_LINEAR_TOP, soltab::st_specific, VCROSS, VJOIN1, VMOVE, VREVERSE, VSET, VSUB2, VUNITIZE, X, Y, and Z.

Referenced by rt_pipe_shot().

Here is the call graph for this function:

int rt_pipe_shot struct soltab stp,
register struct xray rp,
struct application ap,
struct seg seghead
 

R T _ P I P E _ S H O T

Intersect a ray with a pipe. If an intersection occurs, a struct seg will be acquired and filled in.

Returns - 0 MISS >0 HIT

Definition at line 1278 of file g_pipe.c.

References application::a_resource, bend_pipe_shot(), bu_free(), BU_LIST_DEQUEUE, BU_LIST_FIRST, BU_LIST_FOR, BU_LIST_INIT, BU_LIST_INSERT, BU_LIST_LAST, BU_LIST_NEXT, BU_LIST_NOT_HEAD, BU_LIST_WHILE, bu_log(), directory::d_namep, head, hit_list::hitp, hit_list::l, seg::l, linear_pipe_shot(), LOCAL, pipe_end_shot(), pipe_start_shot(), RT_GET_SEG, rt_pipe_hitsort(), rt_pipe_norm(), soltab::st_dp, soltab::st_specific, V3ARGS, and VJOIN1.

Here is the call graph for this function:

void rt_pipe_vshot struct soltab **  stp,
struct xray **  rp,
struct seg segp,
int  n,
struct application ap
 

R T_ P I P E _ V S H O T

Vectorized version.

Definition at line 1396 of file g_pipe.c.

References rt_vstub().

Here is the call graph for this function:

void rt_pipe_curve register struct curvature cvp,
register struct hit hitp,
struct soltab stp
 

R T _ P I P E _ C U R V E

Return the curvature of the pipe.

Definition at line 1412 of file g_pipe.c.

References bn_vec_ortho().

Here is the call graph for this function:

void rt_pipe_uv struct application ap,
struct soltab stp,
register struct hit hitp,
register struct uvcoord uvp
 

R T _ P I P E _ U V

For a hit on the surface of an pipe, return the (u,v) coordinates of the hit point, 0 <= u,v <= 1. u = azimuth v = elevation

Definition at line 1432 of file g_pipe.c.

void rt_pipe_free register struct soltab stp  ) 
 

R T _ P I P E _ F R E E

Definition at line 1442 of file g_pipe.c.

References bu_free(), BU_LIST_NON_EMPTY, and bu_list::forw.

Here is the call graph for this function:

int rt_pipe_class void   ) 
 

R T _ P I P E _ C L A S S

Definition at line 1466 of file g_pipe.c.

HIDDEN void draw_pipe_arc struct bu_list vhead,
fastf_t  radius,
fastf_t center,
const fastf_t v1,
const fastf_t v2,
fastf_t end,
int  seg_count,
int  full_circle
 

D R A W _ P I P E _ A R C

v1 and v2 must be unit vectors normal to each other in plane of circle v1 must be in direction from center to start point (unless a full circle is requested). "End" is the endpoint of arc. "Seg_count" is how many straight line segements to use to draw the arc. "Full_circle" is a flag to indicate that a complete circle is desired.

Definition at line 1481 of file g_pipe.c.

References bn_pi, BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, RT_ADD_VLIST, VDOT, VJOIN2, and VSUB2.

Referenced by draw_pipe_bend(), and rt_pipe_plot().

HIDDEN void draw_linear_seg struct bu_list vhead,
const fastf_t p1,
const fastf_t  or1,
const fastf_t  ir1,
const fastf_t p2,
const fastf_t  or2,
const fastf_t  ir2,
const fastf_t v1,
const fastf_t v2
 

Definition at line 1519 of file g_pipe.c.

References BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, RT_ADD_VLIST, and VJOIN1.

Referenced by rt_pipe_plot().

HIDDEN void draw_pipe_bend struct bu_list vhead,
const fastf_t center,
const fastf_t end,
const fastf_t  radius,
const fastf_t  angle,
const fastf_t v1,
const fastf_t v2,
const fastf_t norm,
const fastf_t  or,
const fastf_t  ir,
fastf_t f1,
fastf_t f2,
const int  seg_count
 

Definition at line 1562 of file g_pipe.c.

References bn_mat_arb_rot(), draw_pipe_arc(), MAGNITUDE, MAT4X3VEC, VDOT, VJOIN1, VJOIN2, VMOVE, VREVERSE, and VSUB2.

Referenced by rt_pipe_plot().

Here is the call graph for this function:

int rt_pipe_plot struct bu_list vhead,
struct rt_db_internal ip,
const struct rt_tess_tol ttol,
const struct bn_tol tol
 

R T _ P I P E _ P L O T

Definition at line 1650 of file g_pipe.c.

References ARC_SEGS, bn_pi, bn_vec_ortho(), BU_LIST_FIRST, BU_LIST_IS_EMPTY, BU_LIST_IS_HEAD, BU_LIST_NEXT, draw_linear_seg(), draw_pipe_arc(), draw_pipe_bend(), rt_db_internal::idb_ptr, wdb_pipept::l, LOCAL, NEAR_ZERO, rt_pipe_internal::pipe_segs_head, wdb_pipept::pp_bendradius, wdb_pipept::pp_coord, wdb_pipept::pp_id, wdb_pipept::pp_od, RT_CK_DB_INTERNAL, RT_PIPE_CK_MAGIC, SQRT_SMALL_FASTF, VCROSS, VDOT, VJOIN1, VMOVE, VNEAR_ZERO, VSUB2, and VUNITIZE.

Here is the call graph for this function:

HIDDEN void tesselate_pipe_start struct wdb_pipept pipe,
int  arc_segs,
double  sin_del,
double  cos_del,
struct vertex ***  outer_loop,
struct vertex ***  inner_loop,
fastf_t r1,
fastf_t r2,
struct shell s,
const struct bn_tol tol
 

Definition at line 1757 of file g_pipe.c.

References BN_CK_TOL, bn_vec_ortho(), BU_LIST_FIRST, BU_LIST_FOR, BU_LIST_NEXT, bu_log(), bn_tol::dist, loopuse::down_hd, faceuse::l, wdb_pipept::l, faceuse::lu_hd, bu_list::magic, NEAR_ZERO, nmg_cface(), NMG_CK_SHELL, nmg_eusplit(), nmg_meonvu(), nmg_mlv(), nmg_vertex_gv(), NULL, or, OT_OPPOSITE, wdb_pipept::pp_coord, wdb_pipept::pp_id, wdb_pipept::pp_od, vertexuse::v_p, VCROSS, VJOIN2, VSUB2, edgeuse::vu_p, and VUNITIZE.

Referenced by rt_pipe_tess().

Here is the call graph for this function:

HIDDEN void tesselate_pipe_linear fastf_t start_pt,
fastf_t  or,
fastf_t  ir,
fastf_t end_pt,
fastf_t  end_or,
fastf_t  end_ir,
int  arc_segs,
double  sin_del,
double  cos_del,
struct vertex ***  outer_loop,
struct vertex ***  inner_loop,
fastf_t r1,
fastf_t r2,
struct shell s,
const struct bn_tol tol
 

Definition at line 1873 of file g_pipe.c.

References BN_CK_TOL, bu_calloc(), bu_free(), BU_LIST_FIRST, BU_LIST_FOR, BU_LIST_PNEXT_CIRC, bu_log(), vertex_g::coord, bn_tol::dist, loopuse::down_hd, edgeuse::eumate_p, faceuse::fumate_p, edgeuse::l, faceuse::lu_hd, MAGNITUDE, nmg_calc_face_g(), NMG_CK_FACEUSE, NMG_CK_SHELL, nmg_cmface(), nmg_kfu(), nmg_vertex_gv(), nmg_vertexuse_nv(), NULL, faceuse::orientation, OT_SAME, slope(), V3ARGS, vertexuse::v_p, VCOMB2, vertex::vg_p, VJOIN1, VJOIN2, VREVERSE, VSCALE, VSUB2, edgeuse::vu_p, and VUNITIZE.

Referenced by rt_pipe_tess().

Here is the call graph for this function:

HIDDEN void tesselate_pipe_bend fastf_t bend_start,
fastf_t bend_end,
fastf_t bend_center,
fastf_t  or,
fastf_t  ir,
int  arc_segs,
double  sin_del,
double  cos_del,
struct vertex ***  outer_loop,
struct vertex ***  inner_loop,
fastf_t start_r1,
fastf_t start_r2,
struct shell s,
const struct bn_tol tol,
const struct rt_tess_tol ttol
 

Definition at line 2666 of file g_pipe.c.

References rt_tess_tol::abs, BN_CK_TOL, bn_mat_arb_rot(), bn_pi, bu_calloc(), bu_log(), MAGNITUDE, MAT4X3PNT, MAT4X3VEC, NMG_CK_SHELL, nmg_cmface(), rt_tess_tol::norm, NULL, rt_tess_tol::rel, rt_bomb(), RT_CK_TESS_TOL, VADD2, VCROSS, VDOT, VMOVE, VSCALE, VSETALL, VSUB2, and VUNITIZE.

Referenced by rt_pipe_tess().

Here is the call graph for this function:

HIDDEN void tesselate_pipe_end struct wdb_pipept pipe,
int  arc_segs,
double  sin_del,
double  cos_del,
struct vertex ***  outer_loop,
struct vertex ***  inner_loop,
struct shell s,
const struct bn_tol tol
 

Definition at line 3096 of file g_pipe.c.

References BN_CK_TOL, bu_calloc(), bu_free(), BU_LIST_FIRST, BU_LIST_FIRST_MAGIC, BU_LIST_FOR, BU_LIST_PREV, bu_log(), loopuse::down_hd, edgeuse::e_p, faceuse::fumate_p, edge::is_real, faceuse::l, faceuse::lu_hd, bu_list::magic, NEAR_ZERO, nmg_add_loop_to_face(), nmg_calc_face_g(), nmg_cface(), NMG_CK_EDGEUSE, NMG_CK_LOOPUSE, NMG_CK_SHELL, NMG_EDGEUSE_MAGIC, nmg_kfu(), nmg_mlv(), nmg_vertex_gv(), NULL, OT_OPPOSITE, wdb_pipept::pp_id, and vertexuse::v_p.

Referenced by rt_pipe_tess().

Here is the call graph for this function:

int rt_pipe_tess struct nmgregion **  r,
struct model m,
struct rt_db_internal ip,
const struct rt_tess_tol ttol,
const struct bn_tol tol
 

R T _ P I P E _ T E S S

XXXX Still needs vertexuse normals!

Definition at line 3175 of file g_pipe.c.

References rt_tess_tol::abs, BN_CK_TOL, bn_pi, bu_calloc(), bu_free(), BU_LIST_FIRST, BU_LIST_FOR, BU_LIST_IS_EMPTY, BU_LIST_IS_HEAD, BU_LIST_NEXT, rt_db_internal::idb_ptr, wdb_pipept::l, MAGNITUDE, NMG_CK_MODEL, nmg_mrsv(), nmg_rebound(), rt_tess_tol::norm, NULL, rt_pipe_internal::pipe_segs_head, wdb_pipept::pp_bendradius, wdb_pipept::pp_coord, wdb_pipept::pp_id, wdb_pipept::pp_od, rt_tess_tol::rel, RT_CK_DB_INTERNAL, RT_CK_TESS_TOL, RT_PIPE_CK_MAGIC, SQRT_SMALL_FASTF, tesselate_pipe_bend(), tesselate_pipe_end(), tesselate_pipe_linear(), tesselate_pipe_start(), VCROSS, VDOT, VJOIN1, VMINMAX, VMOVE, VNEAR_ZERO, VSUB2, and VUNITIZE.

Here is the call graph for this function:

int rt_pipe_import struct rt_db_internal ip,
const struct bu_external ep,
register const fastf_t mat,
const struct db_i dbip
 

R T _ P I P E _ I M P O R T

Definition at line 3362 of file g_pipe.c.

References BU_CK_EXTERNAL, BU_GETSTRUCT, bu_glong(), BU_LIST_APPEND, BU_LIST_INIT, bu_log(), bu_malloc(), DB5_MAJORTYPE_BRLCAD, DBID_PIPE, bu_external::ext_buf, ID_PIPE, rt_db_internal::idb_major_type, rt_db_internal::idb_meth, rt_db_internal::idb_ptr, wdb_pipept::l, bu_list::magic, MAT4X3PNT, ntohd(), rt_pipe_internal::pipe_count, rt_pipe_internal::pipe_magic, rt_pipe_internal::pipe_segs_head, wdb_pipept::pp_bendradius, wdb_pipept::pp_coord, wdb_pipept::pp_id, wdb_pipept::pp_od, record::pwr, record::pipewire_rec::pwr_data, record::pipewire_rec::pwr_pt_count, RT_CK_DB_INTERNAL, RT_PIPE_INTERNAL_MAGIC, record::u_id, and WDB_PIPESEG_MAGIC.

Here is the call graph for this function:

int rt_pipe_export struct bu_external ep,
const struct rt_db_internal ip,
double  local2mm,
const struct db_i dbip
 

R T _ P I P E _ E X P O R T

Definition at line 3416 of file g_pipe.c.

References bu_calloc(), BU_CK_EXTERNAL, BU_LIST_FOR, bu_plong(), DBID_PIPE, bu_external::ext_buf, bu_external::ext_nbytes, htond(), ID_PIPE, rt_db_internal::idb_ptr, bu_list::magic, rt_pipe_internal::pipe_segs_head, wdb_pipept::pp_bendradius, wdb_pipept::pp_coord, wdb_pipept::pp_id, wdb_pipept::pp_od, record::pwr, record::pipewire_rec::pwr_count, record::pipewire_rec::pwr_data, record::pipewire_rec::pwr_id, record::pipewire_rec::pwr_pt_count, RT_CK_DB_INTERNAL, RT_PIPE_CK_MAGIC, and VSCALE.

Here is the call graph for this function:

int rt_pipe_import5 struct rt_db_internal ip,
const struct bu_external ep,
register const fastf_t mat,
const struct db_i dbip
 

R T _ P I P E _ I M P O R T 5

Definition at line 3481 of file g_pipe.c.

References BU_ASSERT_LONG, BU_CK_EXTERNAL, BU_GETSTRUCT, bu_glong(), BU_LIST_INIT, BU_LIST_INSERT, bu_malloc(), DB5_MAJORTYPE_BRLCAD, bu_external::ext_buf, bu_external::ext_nbytes, ID_PIPE, rt_db_internal::idb_major_type, rt_db_internal::idb_meth, rt_db_internal::idb_ptr, wdb_pipept::l, bu_list::magic, MAT4X3PNT, ntohd(), rt_pipe_internal::pipe_count, rt_pipe_internal::pipe_magic, rt_pipe_internal::pipe_segs_head, wdb_pipept::pp_bendradius, wdb_pipept::pp_coord, wdb_pipept::pp_id, wdb_pipept::pp_od, RT_CK_DB_INTERNAL, RT_PIPE_INTERNAL_MAGIC, SIZEOF_NETWORK_DOUBLE, and WDB_PIPESEG_MAGIC.

Here is the call graph for this function:

int rt_pipe_export5 struct bu_external ep,
const struct rt_db_internal ip,
double  local2mm,
const struct db_i dbip
 

R T _ P I P E _ E X P O R T 5

Definition at line 3539 of file g_pipe.c.

References BU_CK_EXTERNAL, bu_free(), BU_LIST_FOR, bu_malloc(), bu_plong(), bu_external::ext_buf, bu_external::ext_nbytes, htond(), ID_PIPE, rt_db_internal::idb_ptr, bu_list::magic, rt_pipe_internal::pipe_segs_head, wdb_pipept::pp_bendradius, wdb_pipept::pp_coord, wdb_pipept::pp_id, wdb_pipept::pp_od, RT_CK_DB_INTERNAL, RT_PIPE_CK_MAGIC, SIZEOF_NETWORK_DOUBLE, void(), and VSCALE.

Here is the call graph for this function:

int rt_pipe_describe struct bu_vls str,
const struct rt_db_internal ip,
int  verbose,
double  mm2local
 

R T _ P I P E _ D E S C R I B E

Make human-readable formatted presentation of this solid. First line describes type of solid. Additional lines are indented one tab, and give parameter values.

Definition at line 3604 of file g_pipe.c.

References BU_LIST_FOR, bu_vls_strcat(), rt_db_internal::idb_ptr, INTCLAMP, rt_pipe_internal::pipe_count, rt_pipe_internal::pipe_segs_head, wdb_pipept::pp_bendradius, wdb_pipept::pp_coord, wdb_pipept::pp_id, wdb_pipept::pp_od, RT_CK_DB_INTERNAL, RT_PIPE_CK_MAGIC, X, Y, and Z.

Here is the call graph for this function:

int rt_pipe_tclget Tcl_Interp interp,
const struct rt_db_internal intern,
const char *  attr
 

R T _ P I P E _ T C L _ G E T

Examples - db get name V# get coordinates for vertex # db get name I# get inner radius for vertex # db get name O# get outer radius for vertex # db get name R# get bendradius for vertex # db get name P# get all data for vertex # db get name N get number of vertices

Definition at line 3785 of file g_pipe.c.

References BU_LIST_FOR, bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), bu_vls_strcat(), rt_db_internal::idb_ptr, interp, NULL, rt_pipe_internal::pipe_segs_head, RT_PIPE_CK_MAGIC, status, TCL_ERROR, TCL_OK, and V3ARGS.

Here is the call graph for this function:

int rt_pipe_tcladjust Tcl_Interp interp,
struct rt_db_internal intern,
int  argc,
char **  argv,
struct resource resp
 

Definition at line 3878 of file g_pipe.c.

References atof(), bu_calloc(), BU_LIST_FOR, BU_LIST_INIT, BU_LIST_INSERT, BU_LIST_LAST, bu_next_token(), bu_list::forw, rt_db_internal::idb_ptr, interp, wdb_pipept::l, NULL, rt_pipe_internal::pipe_segs_head, wdb_pipept::pp_bendradius, wdb_pipept::pp_coord, wdb_pipept::pp_id, wdb_pipept::pp_od, RT_CK_DB_INTERNAL, RT_PIPE_CK_MAGIC, Tcl_DecrRefCount, TCL_ERROR, TCL_OK, TCL_STATIC, and VSETALL.

Here is the call graph for this function:


Generated on Mon Sep 18 01:25:06 2006 for BRL-CAD by  doxygen 1.4.6