BRL-CAD
edpipe.c File Reference
#include "common.h"
#include <math.h>
#include <string.h>
#include "vmath.h"
#include "nmg.h"
#include "rtgeom.h"
#include "ged.h"
#include "nurb.h"
#include "wdb.h"
Include dependency graph for edpipe.c:

Go to the source code of this file.

Functions

int _ged_get_pipe_i_seg (struct rt_pipe_internal *pipeip, struct wdb_pipept *ps)
 
struct wdb_pipept * _ged_get_pipe_seg_i (struct rt_pipe_internal *pipeip, int seg_i)
 
void split_pipept (struct bu_list *pipe_hd, struct wdb_pipept *ps, fastf_t *new_pt)
 
void pipe_scale_od (struct rt_pipe_internal *pipeip, fastf_t scale)
 
void pipe_scale_id (struct rt_pipe_internal *pipeip, fastf_t scale)
 
void pipe_seg_scale_od (struct wdb_pipept *ps, fastf_t scale)
 
void pipe_seg_scale_id (struct wdb_pipept *ps, fastf_t scale)
 
void pipe_seg_scale_radius (struct wdb_pipept *ps, fastf_t scale)
 
void pipe_scale_radius (struct rt_pipe_internal *pipeip, fastf_t scale)
 
struct wdb_pipept * find_pipept_nearest_pt (const struct bu_list *pipe_hd, const point_t model_pt, matp_t view2model)
 
struct wdb_pipept * _ged_add_pipept (struct rt_pipe_internal *pipeip, struct wdb_pipept *pp, const point_t new_pt)
 
struct wdb_pipept * _ged_ins_pipept (struct rt_pipe_internal *pipeip, struct wdb_pipept *pp, const point_t new_pt)
 
struct wdb_pipept * _ged_delete_pipept (struct wdb_pipept *ps)
 
int _ged_move_pipept (struct rt_pipe_internal *pipeip, struct wdb_pipept *ps, const point_t new_pt)
 
int _ged_scale_pipe (struct ged *gedp, struct rt_pipe_internal *pipeip, const char *attribute, fastf_t sf, int rflag)
 
int _ged_append_pipept_common (struct ged *gedp, int argc, const char *argv[], struct wdb_pipept *(*func)(struct rt_pipe_internal *, struct wdb_pipept *, const point_t))
 
int ged_append_pipept (struct ged *gedp, int argc, const char *argv[])
 
int ged_delete_pipept (struct ged *gedp, int argc, const char *argv[])
 
int ged_find_pipept_nearest_pt (struct ged *gedp, int argc, const char *argv[])
 
int ged_move_pipept (struct ged *gedp, int argc, const char *argv[])
 
int ged_prepend_pipept (struct ged *gedp, int argc, const char *argv[])
 

Detailed Description

Functions -

split_pipept - split a pipe segment at a given point

find_pipept_nearest_pt - find which segment of a pipe is nearest the ray from "pt" in the viewing direction (for segment selection in MGED)

Definition in file edpipe.c.

Function Documentation

int _ged_get_pipe_i_seg ( struct rt_pipe_internal *  pipeip,
struct wdb_pipept *  ps 
)

Definition at line 48 of file edpipe.c.

References BU_LIST_FOR.

Referenced by ged_find_pipept_nearest_pt().

struct wdb_pipept* _ged_get_pipe_seg_i ( struct rt_pipe_internal *  pipeip,
int  seg_i 
)

Definition at line 68 of file edpipe.c.

References BU_LIST_FOR.

Referenced by _ged_scale_pipe(), ged_delete_pipept(), and ged_move_pipept().

void split_pipept ( struct bu_list pipe_hd,
struct wdb_pipept *  ps,
fastf_t new_pt 
)

Definition at line 85 of file edpipe.c.

References bu_log().

Here is the call graph for this function:

void pipe_scale_od ( struct rt_pipe_internal *  pipeip,
fastf_t  scale 
)

Definition at line 105 of file edpipe.c.

References BU_LIST_FOR.

Referenced by _ged_scale_pipe().

void pipe_scale_id ( struct rt_pipe_internal *  pipeip,
fastf_t  scale 
)

Definition at line 134 of file edpipe.c.

References BU_LIST_FOR.

Referenced by _ged_scale_pipe().

void pipe_seg_scale_od ( struct wdb_pipept *  ps,
fastf_t  scale 
)

Definition at line 163 of file edpipe.c.

References BU_CKMAG, bu_log(), and WDB_PIPESEG_MAGIC.

Referenced by _ged_scale_pipe().

Here is the call graph for this function:

void pipe_seg_scale_id ( struct wdb_pipept *  ps,
fastf_t  scale 
)

Definition at line 188 of file edpipe.c.

References BU_CKMAG, bu_log(), and WDB_PIPESEG_MAGIC.

Referenced by _ged_scale_pipe().

Here is the call graph for this function:

void pipe_seg_scale_radius ( struct wdb_pipept *  ps,
fastf_t  scale 
)

Definition at line 211 of file edpipe.c.

References BU_CKMAG, BU_LIST_HEAD_MAGIC, BU_LIST_NEXT, bu_log(), rt_pipe_ck(), and WDB_PIPESEG_MAGIC.

Referenced by _ged_scale_pipe().

Here is the call graph for this function:

void pipe_scale_radius ( struct rt_pipe_internal *  pipeip,
fastf_t  scale 
)

Definition at line 242 of file edpipe.c.

References BU_GET, BU_LIST_APPEND, BU_LIST_DEQUEUE, BU_LIST_FIRST, BU_LIST_FOR, BU_LIST_INIT, BU_LIST_NON_EMPTY, bu_log(), BU_PUT, and rt_pipe_ck().

Referenced by _ged_scale_pipe().

Here is the call graph for this function:

struct wdb_pipept* find_pipept_nearest_pt ( const struct bu_list pipe_hd,
const point_t  model_pt,
matp_t  view2model 
)

Definition at line 303 of file edpipe.c.

References bn_dist_line3_pt3(), BN_TOL_MAGIC, BU_LIST_FOR, bn_tol::dist, bn_tol::dist_sq, bn_tol::magic, MAX_FASTF, bn_tol::para, bn_tol::perp, and VSET.

Referenced by ged_find_pipept_nearest_pt().

Here is the call graph for this function:

struct wdb_pipept* _ged_add_pipept ( struct rt_pipe_internal *  pipeip,
struct wdb_pipept *  pp,
const point_t  new_pt 
)

Definition at line 336 of file edpipe.c.

References BU_CKMAG, BU_GET, BU_LIST_APPEND, BU_LIST_DEQUEUE, BU_LIST_HEAD_MAGIC, BU_LIST_INSERT, BU_LIST_LAST, BU_PUT, rt_pipe_ck(), and WDB_PIPESEG_MAGIC.

Referenced by _ged_append_pipept_common(), and ged_append_pipept().

Here is the call graph for this function:

struct wdb_pipept* _ged_ins_pipept ( struct rt_pipe_internal *  pipeip,
struct wdb_pipept *  pp,
const point_t  new_pt 
)

Definition at line 390 of file edpipe.c.

References BU_CKMAG, BU_GET, BU_LIST_APPEND, BU_LIST_DEQUEUE, BU_LIST_FIRST, BU_LIST_HEAD_MAGIC, BU_LIST_INSERT, BU_PUT, rt_pipe_ck(), and WDB_PIPESEG_MAGIC.

Referenced by ged_prepend_pipept().

Here is the call graph for this function:

struct wdb_pipept* _ged_delete_pipept ( struct wdb_pipept *  ps)

Definition at line 444 of file edpipe.c.

References BU_CKMAG, BU_LIST_APPEND, BU_LIST_DEQUEUE, BU_LIST_HEAD_MAGIC, BU_LIST_INSERT, BU_LIST_NEXT, BU_LIST_PREV, bu_log(), BU_PUT, rt_pipe_ck(), and WDB_PIPESEG_MAGIC.

Referenced by ged_delete_pipept().

Here is the call graph for this function:

int _ged_move_pipept ( struct rt_pipe_internal *  pipeip,
struct wdb_pipept *  ps,
const point_t  new_pt 
)

Definition at line 495 of file edpipe.c.

References BU_CKMAG, bu_log(), rt_pipe_ck(), and WDB_PIPESEG_MAGIC.

Referenced by ged_move_pipept().

Here is the call graph for this function:

int _ged_scale_pipe ( struct ged gedp,
struct rt_pipe_internal *  pipeip,
const char *  attribute,
fastf_t  sf,
int  rflag 
)

Definition at line 516 of file edpipe.c.

References _ged_get_pipe_seg_i(), bu_vls_printf(), GED_ERROR, GED_OK, ged::ged_result_str, pipe_scale_id(), pipe_scale_od(), pipe_scale_radius(), pipe_seg_scale_id(), pipe_seg_scale_od(), and pipe_seg_scale_radius().

Referenced by ged_pscale().

Here is the call graph for this function:

int _ged_append_pipept_common ( struct ged gedp,
int  argc,
const char *  argv[],
struct wdb_pipept *(*)(struct rt_pipe_internal *, struct wdb_pipept *, const point_t)  func 
)
int ged_append_pipept ( struct ged gedp,
int  argc,
const char *  argv[] 
)

Append a pipe point.

Definition at line 680 of file edpipe.c.

References _ged_add_pipept(), and _ged_append_pipept_common().

Here is the call graph for this function:

int ged_delete_pipept ( struct ged gedp,
int  argc,
const char *  argv[] 
)

Delete the specified pipe point.

Definition at line 687 of file edpipe.c.

References _ged_delete_pipept(), _ged_get_pipe_seg_i(), bu_vls_printf(), bu_vls_trunc(), db_lookup(), rt_wdb::dbip, GED_CHECK_ARGC_GT_0, GED_CHECK_DATABASE_OPEN, GED_DB_PUT_INTERNAL, GED_ERROR, GED_HELP, GED_OK, ged::ged_result_str, ged::ged_wdbp, rt_db_internal::idb_major_type, rt_db_internal::idb_minor_type, rt_db_internal::idb_ptr, if(), LOOKUP_QUIET, rt_db_free_internal(), rt_db_get_internal(), RT_DIR_NULL, rt_uniresource, and usage().

Here is the call graph for this function:

int ged_find_pipept_nearest_pt ( struct ged gedp,
int  argc,
const char *  argv[] 
)

Find the pipe point nearest the specified point in model coordinates.

Definition at line 769 of file edpipe.c.

References _ged_get_pipe_i_seg(), bu_vls_printf(), bu_vls_trunc(), db_lookup(), rt_wdb::dbip, find_pipept_nearest_pt(), GED_CHECK_ARGC_GT_0, GED_CHECK_DATABASE_OPEN, GED_CHECK_VIEW, GED_ERROR, ged::ged_gvp, GED_HELP, GED_OK, ged::ged_result_str, ged::ged_wdbp, bview::gv_view2model, rt_db_internal::idb_ptr, LOOKUP_QUIET, rt_db_free_internal(), RT_DIR_NULL, usage(), wdb_import_from_path2(), X, Y, and Z.

Referenced by to_mouse_find_pipept().

Here is the call graph for this function:

int ged_move_pipept ( struct ged gedp,
int  argc,
const char *  argv[] 
)
int ged_prepend_pipept ( struct ged gedp,
int  argc,
const char *  argv[] 
)

Prepend a pipe point.

Definition at line 965 of file edpipe.c.

References _ged_append_pipept_common(), and _ged_ins_pipept().

Here is the call graph for this function: