BRL-CAD
#include "common.h"
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include "bnetwork.h"
#include "tcl.h"
#include "bu/cv.h"
#include "vmath.h"
#include "bn.h"
#include "db.h"
#include "nmg.h"
#include "rtgeom.h"
#include "raytrace.h"
#include "wdb.h"
#include "../../librt_private.h"
Include dependency graph for pipe.c:

Go to the source code of this file.

Data Structures

struct  id_pipe
 
struct  lin_pipe
 
struct  bend_pipe
 
struct  pipe_orientation
 
struct  pipe_circle
 
struct  pipe_segment
 
struct  pipe_bend
 

Macros

#define PIPE_CONNECTING_ARCS   4 /* number of connecting arcs to draw between points */
 
#define PIPE_CIRCLE_SEGS   16 /* number of segments used to plot a circle */
 
#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 PIPE_RADIUS_CHANGE   9
 
#define RT_PIPE_MAXHITS   128
 

Functions

HIDDEN int rt_bend_pipe_prep (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 od, fastf_t id, fastf_t prev_od, fastf_t next_od, point_t *min, point_t *max)
 
HIDDEN void rt_linear_pipe_prep (struct bu_list *head, fastf_t *pt1, fastf_t id1, fastf_t od1, fastf_t *pt2, fastf_t id2, fastf_t od2, point_t *min, point_t *max)
 
HIDDEN void pipe_elements_calculate (struct bu_list *elements_head, struct rt_db_internal *ip, point_t *min, point_t *max)
 
HIDDEN void pipe_elements_free (struct bu_list *head)
 
int rt_pipe_bbox (struct rt_db_internal *ip, point_t *min, point_t *max, const struct bn_tol *tol)
 
int rt_pipe_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_pipe_print (const struct soltab *stp)
 
void rt_pipept_print (const struct wdb_pipept *pipept, double mm2local)
 
void rt_vls_pipept (struct bu_vls *vp, int seg_no, const struct rt_db_internal *ip, double mm2local)
 
HIDDEN void discont_radius_shot (struct xray *rp, point_t center, vect_t norm, fastf_t or1_sq, fastf_t ir1_sq, fastf_t or2_sq, fastf_t ir2_sq, struct hit *hits, int *hit_count, int seg_no, struct soltab *stp)
 
int rt_in_sph (struct xray *rp, point_t center, fastf_t radius_sq)
 
HIDDEN void bend_pipe_shot (struct soltab *stp, struct xray *rp, struct bend_pipe *bp, struct hit *hits, int *hit_count, int seg_no)
 
HIDDEN void linear_pipe_shot (struct soltab *stp, struct xray *rp, struct lin_pipe *lp, struct hit *hits, int *hit_count, int seg_no)
 
HIDDEN void pipe_start_shot (struct soltab *stp, struct xray *rp, struct id_pipe *id_p, struct hit *hits, int *hit_count, int seg_no)
 
HIDDEN void pipe_end_shot (struct soltab *stp, struct xray *rp, struct id_pipe *id_p, struct hit *hits, int *hit_count, int seg_no)
 
HIDDEN void rt_pipe_elim_dups (struct hit *hit, int *nh, struct xray *rp, struct soltab *stp)
 
void rt_pipe_norm (struct hit *hitp, struct soltab *stp, struct xray *rp)
 
int rt_pipe_shot (struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_pipe_curve (struct curvature *cvp, struct hit *hitp, struct soltab *stp)
 
void rt_pipe_uv (struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp)
 
void rt_pipe_free (struct soltab *stp)
 
HIDDEN void draw_pipe_arc (struct bu_list *vhead, struct pipe_circle arc_circle, const point_t arc_end, int num_segments)
 
int rt_pipe_adaptive_plot (struct rt_db_internal *ip, const struct rt_view_info *info)
 
int rt_pipe_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
HIDDEN void tesselate_pipe_start (struct wdb_pipept *pipept, 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 orad, fastf_t irad, fastf_t *end_pt, fastf_t end_orad, fastf_t end_irad, 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 orad, fastf_t irad, 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 *pipept, int arc_segs, 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_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_pipe_export4 (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, 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)
 
void rt_pipe_ifree (struct rt_db_internal *ip)
 
int rt_pipe_ck (const struct bu_list *headp)
 
int rt_pipe_get (struct bu_vls *logstr, const struct rt_db_internal *intern, const char *attr)
 
int rt_pipe_adjust (struct bu_vls *logstr, struct rt_db_internal *intern, int argc, const char **argv)
 
int rt_pipe_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
void rt_pipe_surf_area (fastf_t *area, struct rt_db_internal *ip)
 
HIDDEN void pipe_elem_volume_and_centroid (struct id_pipe *p, fastf_t *vol, point_t *cent)
 
void rt_pipe_volume (fastf_t *vol, struct rt_db_internal *ip)
 
void rt_pipe_centroid (point_t *cent, struct rt_db_internal *ip)
 

Detailed Description

Intersect a ray with a pipe solid.

Definition in file pipe.c.

Macro Definition Documentation

#define PIPE_CONNECTING_ARCS   4 /* number of connecting arcs to draw between points */

Definition at line 139 of file pipe.c.

Referenced by rt_pipe_plot().

#define PIPE_CIRCLE_SEGS   16 /* number of segments used to plot a circle */

Definition at line 140 of file pipe.c.

#define PIPE_LINEAR_OUTER_BODY   1

Definition at line 142 of file pipe.c.

Referenced by linear_pipe_shot(), and rt_pipe_norm().

#define PIPE_LINEAR_INNER_BODY   2

Definition at line 143 of file pipe.c.

Referenced by linear_pipe_shot(), and rt_pipe_norm().

#define PIPE_LINEAR_TOP   3

Definition at line 144 of file pipe.c.

Referenced by pipe_end_shot(), and rt_pipe_norm().

#define PIPE_LINEAR_BASE   4

Definition at line 145 of file pipe.c.

Referenced by pipe_start_shot(), and rt_pipe_norm().

#define PIPE_BEND_OUTER_BODY   5

Definition at line 146 of file pipe.c.

Referenced by bend_pipe_shot(), and rt_pipe_norm().

#define PIPE_BEND_INNER_BODY   6

Definition at line 147 of file pipe.c.

Referenced by bend_pipe_shot(), and rt_pipe_norm().

#define PIPE_BEND_BASE   7

Definition at line 148 of file pipe.c.

Referenced by pipe_start_shot(), and rt_pipe_norm().

#define PIPE_BEND_TOP   8

Definition at line 149 of file pipe.c.

Referenced by pipe_end_shot(), and rt_pipe_norm().

#define PIPE_RADIUS_CHANGE   9

Definition at line 150 of file pipe.c.

Referenced by discont_radius_shot(), and rt_pipe_norm().

#define RT_PIPE_MAXHITS   128

Function Documentation

HIDDEN int rt_bend_pipe_prep ( 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  od,
fastf_t  id,
fastf_t  prev_od,
fastf_t  next_od,
point_t *  min,
point_t *  max 
)
HIDDEN void rt_linear_pipe_prep ( struct bu_list head,
fastf_t pt1,
fastf_t  id1,
fastf_t  od1,
fastf_t pt2,
fastf_t  id2,
fastf_t  od2,
point_t *  min,
point_t *  max 
)
HIDDEN void pipe_elements_calculate ( struct bu_list elements_head,
struct rt_db_internal ip,
point_t *  min,
point_t *  max 
)

Definition at line 529 of file pipe.c.

References BU_LIST_FIRST, BU_LIST_IS_EMPTY, BU_LIST_IS_HEAD, BU_LIST_NEXT, rt_db_internal::idb_ptr, M_PI, NEAR_ZERO, rt_bend_pipe_prep(), RT_CK_DB_INTERNAL, RT_LEN_TOL, rt_linear_pipe_prep(), SQRT_SMALL_FASTF, and VSETALL.

Referenced by rt_pipe_bbox(), rt_pipe_centroid(), rt_pipe_prep(), rt_pipe_surf_area(), and rt_pipe_volume().

Here is the call graph for this function:

HIDDEN void pipe_elements_free ( struct bu_list head)
int rt_pipe_bbox ( struct rt_db_internal ip,
point_t *  min,
point_t *  max,
const struct bn_tol tol 
)

Calculate a bounding RPP for a pipe

Definition at line 659 of file pipe.c.

References pipe_elements_calculate().

Here is the call graph for this function:

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

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 if pipe solid is OK !0 if there is an error in the description

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

Definition at line 684 of file pipe.c.

References BU_GET, BU_LIST_INIT, pipe_elements_calculate(), RT_CK_RTI, soltab::st_aradius, soltab::st_bradius, soltab::st_center, soltab::st_max, soltab::st_min, soltab::st_specific, VSET, X, Y, and Z.

Here is the call graph for this function:

void rt_pipe_print ( const struct soltab stp)

Definition at line 723 of file pipe.c.

References if(), and soltab::st_specific.

Here is the call graph for this function:

HIDDEN void discont_radius_shot ( struct xray rp,
point_t  center,
vect_t  norm,
fastf_t  or1_sq,
fastf_t  ir1_sq,
fastf_t  or2_sq,
fastf_t  ir2_sq,
struct hit hits,
int *  hit_count,
int  seg_no,
struct soltab stp 
)

Check for hits on surfaces created by discontinuous radius changes from one pipe segment to the next. Can only happen when one segment is a bend, because linear segments handle different radii at each end. Bend segments must have constant radii . These surfaces are normal to the flow of the pipe.

Definition at line 800 of file pipe.c.

References bu_log(), directory::d_namep, hit::hit_dist, hit::hit_magic, hit::hit_normal, hit::hit_surfno, PIPE_RADIUS_CHANGE, xray::r_dir, xray::r_pt, RT_HIT_MAGIC, RT_PIPE_MAXHITS, soltab::st_dp, and ZERO.

Referenced by bend_pipe_shot().

Here is the call graph for this function:

int rt_in_sph ( struct xray rp,
point_t  center,
fastf_t  radius_sq 
)

check if a ray passes within a bounding sphere

Definition at line 864 of file pipe.c.

References xray::r_dir, and xray::r_pt.

Referenced by rt_pipe_shot().

HIDDEN void linear_pipe_shot ( struct soltab stp,
struct xray rp,
struct lin_pipe lp,
struct hit hits,
int *  hit_count,
int  seg_no 
)
HIDDEN void pipe_start_shot ( struct soltab stp,
struct xray rp,
struct id_pipe id_p,
struct hit hits,
int *  hit_count,
int  seg_no 
)

Definition at line 1352 of file pipe.c.

References bend_pipe::bend_ir, bend_pipe::bend_or, bend_pipe::bend_rb, bend_pipe::bend_start, bu_log(), directory::d_namep, hit::hit_dist, hit::hit_magic, hit::hit_surfno, id_pipe::l, 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, xray::r_dir, xray::r_pt, RT_HIT_MAGIC, RT_PIPE_MAXHITS, soltab::st_dp, and ZERO.

Referenced by rt_pipe_shot().

Here is the call graph for this function:

HIDDEN void pipe_end_shot ( struct soltab stp,
struct xray rp,
struct id_pipe id_p,
struct hit hits,
int *  hit_count,
int  seg_no 
)
HIDDEN void rt_pipe_elim_dups ( struct hit hit,
int *  nh,
struct xray rp,
struct soltab stp 
)
void rt_pipe_norm ( struct hit hitp,
struct soltab stp,
struct xray rp 
)

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

Definition at line 1591 of file pipe.c.

References pipe_bend::bend_end, BU_LIST_FIRST, BU_LIST_NEXT, bu_log(), hit::hit_dist, hit::hit_normal, hit::hit_point, hit::hit_surfno, hit::hit_vpriv, id_pipe::l, 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, PIPE_RADIUS_CHANGE, xray::r_dir, xray::r_pt, soltab::st_specific, VSET, X, Y, and Z.

Referenced by rt_pipe_shot().

Here is the call graph for this function:

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

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 1681 of file pipe.c.

References application::a_inv_dir, application::a_resource, bend_pipe::bend_bound_center, bend_pipe::bend_bound_radius_sq, bend_pipe_shot(), BU_LIST_FIRST, BU_LIST_FOR, BU_LIST_INSERT, BU_LIST_LAST, bu_log(), directory::d_namep, seg::l, linear_pipe_shot(), pipe_end_shot(), lin_pipe::pipe_max, lin_pipe::pipe_min, pipe_start_shot(), xray::r_dir, xray::r_pt, RT_GET_SEG, rt_hitsort(), rt_in_rpp(), rt_in_sph(), rt_pipe_elim_dups(), RT_PIPE_MAXHITS, rt_pipe_norm(), soltab::st_dp, soltab::st_specific, and V3ARGS.

Here is the call graph for this function:

void rt_pipe_curve ( struct curvature cvp,
struct hit hitp,
struct soltab stp 
)

Return the curvature of the pipe.

Definition at line 1774 of file pipe.c.

References bn_vec_ortho(), curvature::crv_c1, curvature::crv_c2, curvature::crv_pdir, hit::hit_normal, and RT_CK_SOLTAB.

Here is the call graph for this function:

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

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 1797 of file pipe.c.

void rt_pipe_free ( struct soltab stp)

Definition at line 1810 of file pipe.c.

References BU_PUT, pipe_elements_free(), and soltab::st_specific.

Here is the call graph for this function:

HIDDEN void draw_pipe_arc ( struct bu_list vhead,
struct pipe_circle  arc_circle,
const point_t  arc_end,
int  num_segments 
)

Using the specified number of segments, draw the shortest arc on the given circle which starts at (center + radius * v1) and ends at (arc_end).

Definition at line 2017 of file pipe.c.

References BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, BU_CK_LIST_HEAD, pipe_circle::center, ellipse_point_at_radian(), pipe_circle::orient, pipe_circle::radius, RT_ADD_VLIST, pipe_orientation::v1, and pipe_orientation::v2.

Here is the call graph for this function:

int rt_pipe_adaptive_plot ( struct rt_db_internal ip,
const struct rt_view_info info 
)
int rt_pipe_plot ( struct bu_list vhead,
struct rt_db_internal ip,
const struct rt_tess_tol ttol,
const struct bn_tol tol,
const struct rt_view_info info 
)
HIDDEN void tesselate_pipe_start ( struct wdb_pipept *  pipept,
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 2387 of file pipe.c.

References BN_CK_TOL, bn_vec_ortho(), bu_bomb(), BU_LIST_FIRST, BU_LIST_FIRST_MAGIC, BU_LIST_FOR, BU_LIST_NEXT, bu_log(), bn_tol::dist, lu, nmg_calc_face_g(), nmg_cface(), NMG_CK_LOOPUSE(), NMG_CK_SHELL(), NMG_EDGEUSE_MAGIC, nmg_meonvu(), nmg_mlv(), and nmg_vertex_gv().

Referenced by rt_pipe_tess().

Here is the call graph for this function:

HIDDEN void tesselate_pipe_linear ( fastf_t start_pt,
fastf_t  orad,
fastf_t  irad,
fastf_t end_pt,
fastf_t  end_orad,
fastf_t  end_irad,
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 2509 of file pipe.c.

References BN_CK_TOL, bu_calloc(), bu_free(), BU_LIST_FIRST, BU_LIST_FOR, BU_LIST_PNEXT_CIRC, bu_log(), bn_tol::dist, lu, nmg_calc_face_g(), NMG_CK_SHELL(), nmg_cmface(), nmg_kfu(), nmg_vertex_gv(), nmg_vertexuse_nv(), OSL::Strings::v, and V3ARGS.

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  orad,
fastf_t  irad,
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 3190 of file pipe.c.

References rt_tess_tol::abs, Add_vert(), BN_CK_TOL, bn_mat_arb_rot(), bu_bomb(), bu_calloc(), bu_free(), BU_LIST_FIRST, BU_LIST_FOR, BU_LIST_PNEXT_CIRC, bu_log(), create_vert_tree(), bn_tol::dist_sq, free_vert_tree(), lu, nmg_calc_face_g(), NMG_CK_SHELL(), nmg_cmface(), nmg_kfu(), nmg_vertex_gv(), nmg_vertexuse_nv(), rt_tess_tol::norm, rt_tess_tol::rel, RT_CK_TESS_TOL, OSL::Strings::v, V3ARGS, VSETALL, X, Y, and Z.

Referenced by rt_pipe_tess().

Here is the call graph for this function:

HIDDEN void tesselate_pipe_end ( struct wdb_pipept *  pipept,
int  arc_segs,
struct vertex ***  outer_loop,
struct vertex ***  inner_loop,
struct shell *  s,
const struct bn_tol tol 
)

Definition at line 3629 of file 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(), bn_tol::dist, lu, nmg_add_loop_to_face(), nmg_calc_face_g(), nmg_cface(), NMG_CK_LOOPUSE(), NMG_CK_SHELL(), NMG_EDGEUSE_MAGIC, nmg_kfu(), nmg_mlv(), and nmg_vertex_gv().

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 
)

XXXX Still needs vertexuse normals!

Definition at line 3709 of file pipe.c.

References rt_tess_tol::abs, BN_CK_TOL, 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, M_PI, nmg_edge_fuse(), nmg_mrsv(), nmg_rebound(), rt_tess_tol::norm, rt_tess_tol::rel, RT_CK_DB_INTERNAL, RT_CK_TESS_TOL, s, SMALL_FASTF, tesselate_pipe_bend(), tesselate_pipe_end(), tesselate_pipe_linear(), and tesselate_pipe_start().

Here is the call graph for this function:

int rt_pipe_import4 ( struct rt_db_internal ip,
const struct bu_external ep,
const fastf_t mat,
const struct db_i dbip 
)

Definition at line 3901 of file pipe.c.

References bn_mat_identity, BU_ALLOC, BU_CK_EXTERNAL, bu_cv_ntohd(), BU_LIST_APPEND, BU_LIST_INIT, bu_log(), bu_external::ext_buf, ID_PIPE, rt_db_internal::idb_major_type, rt_db_internal::idb_meth, rt_db_internal::idb_ptr, if(), OBJ, RT_CK_DB_INTERNAL, RT_CK_DBI, RT_PIPE_INTERNAL_MAGIC, and WDB_PIPESEG_MAGIC.

Here is the call graph for this function:

int rt_pipe_export4 ( struct bu_external ep,
const struct rt_db_internal ip,
double  local2mm,
const struct db_i dbip 
)

Definition at line 3975 of file pipe.c.

References bu_calloc(), BU_CK_EXTERNAL, bu_cv_htond(), BU_LIST_FOR, bu_external::ext_buf, bu_external::ext_nbytes, rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, and RT_CK_DBI.

Here is the call graph for this function:

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

Definition at line 4058 of file pipe.c.

References bn_mat_identity, BU_ALLOC, BU_ASSERT_LONG, BU_CK_EXTERNAL, bu_cv_ntohd(), bu_free(), BU_LIST_INIT, BU_LIST_INSERT, bu_malloc(), 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, OBJ, RT_CK_DB_INTERNAL, RT_CK_DBI, 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 
)

Definition at line 4128 of file pipe.c.

References BU_CK_EXTERNAL, bu_cv_htond(), bu_free(), BU_LIST_FOR, bu_malloc(), bu_external::ext_buf, bu_external::ext_nbytes, rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, RT_CK_DBI, and SIZEOF_NETWORK_DOUBLE.

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 
)

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 4199 of file pipe.c.

References BU_LIST_FOR, bu_vls_strcat(), rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, X, Y, and Z.

Here is the call graph for this function:

void rt_pipe_ifree ( struct rt_db_internal ip)

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

Definition at line 4250 of file pipe.c.

References bu_free(), BU_LIST_DEQUEUE, BU_LIST_WHILE, rt_db_internal::idb_ptr, and RT_CK_DB_INTERNAL.

Here is the call graph for this function:

int rt_pipe_get ( struct bu_vls logstr,
const struct rt_db_internal intern,
const char *  attr 
)

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 4391 of file pipe.c.

References BRLCAD_ERROR, BRLCAD_OK, BU_LIST_FOR, bu_vls_printf(), bu_vls_strcat(), rt_db_internal::idb_ptr, and V3ARGS.

Here is the call graph for this function:

int rt_pipe_adjust ( struct bu_vls logstr,
struct rt_db_internal intern,
int  argc,
const char **  argv 
)

Definition at line 4470 of file pipe.c.

References BRLCAD_ERROR, brlcad_interp, BU_ALLOC, BU_LIST_FOR, BU_LIST_INIT, BU_LIST_INSERT, BU_LIST_LAST, bu_next_token(), bu_vls_printf(), rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, rt_pipe_ck(), and VSETALL.

Here is the call graph for this function:

int rt_pipe_params ( struct pc_pc_set ps,
const struct rt_db_internal ip 
)

Definition at line 4601 of file pipe.c.

References RT_CK_DB_INTERNAL.

void rt_pipe_volume ( fastf_t vol,
struct rt_db_internal ip 
)

Definition at line 4811 of file pipe.c.

References BU_LIST_FOR, BU_LIST_INIT, pipe_elem_volume_and_centroid(), pipe_elements_calculate(), and pipe_elements_free().

Here is the call graph for this function:

void rt_pipe_centroid ( point_t *  cent,
struct rt_db_internal ip 
)

Definition at line 4831 of file pipe.c.

References BU_LIST_FOR, BU_LIST_INIT, pipe_elem_volume_and_centroid(), pipe_elements_calculate(), pipe_elements_free(), and VSETALL.

Here is the call graph for this function: