38#define NMG_CK_EDGE(_p) NMG_CKMAG(_p, NMG_EDGE_MAGIC, "edge")
39#define NMG_CK_EDGE_G_LSEG(_p) NMG_CKMAG(_p, NMG_EDGE_G_LSEG_MAGIC, "edge_g_lseg")
40#define NMG_CK_EDGEUSE(_p) NMG_CKMAG(_p, NMG_EDGEUSE_MAGIC, "edgeuse")
42#define GET_EDGE(p, m) {NMG_GETSTRUCT(p, edge); NMG_INCR_INDEX(p, m);}
43#define GET_EDGE_G_LSEG(p, m) {NMG_GETSTRUCT(p, edge_g_lseg); NMG_INCR_INDEX(p, m);}
44#define GET_EDGE_G_CNURB(p, m) {NMG_GETSTRUCT(p, edge_g_cnurb); NMG_INCR_INDEX(p, m);}
45#define GET_EDGEUSE(p, m) {NMG_GETSTRUCT(p, edgeuse); NMG_INCR_INDEX(p, m);}
47#define FREE_EDGE(p) NMG_FREESTRUCT(p, edge)
48#define FREE_EDGE_G_LSEG(p) NMG_FREESTRUCT(p, edge_g_lseg)
49#define FREE_EDGE_G_CNURB(p) NMG_FREESTRUCT(p, edge_g_cnurb)
50#define FREE_EDGEUSE(p) NMG_FREESTRUCT(p, edgeuse)
155#define nmg_mev(_v, _u) nmg_me((_v), (struct vertex *)NULL, (_u))
186#define NMG_ARE_EUS_ADJACENT(_eu1, _eu2) (\
187 ((_eu1)->vu_p->v_p == (_eu2)->vu_p->v_p && \
188 (_eu1)->eumate_p->vu_p->v_p == (_eu2)->eumate_p->vu_p->v_p) || \
189 ((_eu1)->vu_p->v_p == (_eu2)->eumate_p->vu_p->v_p && \
190 (_eu1)->eumate_p->vu_p->v_p == (_eu2)->vu_p->v_p))
193#define EDGESADJ(_e1, _e2) NMG_ARE_EUS_ADJACENT(_e1, _e2)
203 const struct shell *s2);
223 const struct shell *s,
251 const struct shell *s,
252 const struct edge *ep);
299 const struct bn_tol *tol);
311 const struct bn_tol *tol);
326 const struct bn_tol *tol);
510 const struct bn_tol *tol);
531 const struct bn_tol *tol);
559 const struct bn_tol *tol);
569 const struct bn_tol *tol);
577 const struct bn_tol *tol);
592 const struct bn_tol *tol);
600 const struct bn_tol *tol);
652 const struct bn_tol *tol);
681 const struct bn_tol *tol);
688 const struct bn_tol *tol);
707 const struct bn_tol *tol);
Header file for the BRL-CAD common definitions.
struct edge_g_lseg * nmg_pick_best_edge_g(struct edgeuse *eu1, struct edgeuse *eu2, const struct bn_tol *tol)
Given two edgeuses with different edge geometry but running between the same two vertices,...
void nmg_edgeuse_on_line_tabulate(struct bu_ptbl *tab, const uint32_t *magic_p, const point_t pt, const vect_t dir, struct bu_list *vlfree, const struct bn_tol *tol)
Given a pointer to any nmg data structure, build an bu_ptbl list which cites every edgeuse pointer fr...
void nmg_edge_g_tabulate(struct bu_ptbl *tab, const uint32_t *magic_p, struct bu_list *vlfree)
Build the set of pointers to all edge geometry structures in an NMG model that are "below" the data s...
int nmg_find_eu_leftvec(vect_t left, const struct edgeuse *eu)
Given an edgeuse, if it is part of a faceuse, return the inward pointing "left" vector which points i...
const struct edgeuse * nmg_faceradial(const struct edgeuse *eu)
Looking radially around an edge, find another edge in the same face as the current edge....
void nmg_edge_g(struct edgeuse *eu)
Compute the equation of the line formed by the endpoints of the edge.
int nmg_edge_fuse(const uint32_t *magic_p, struct bu_list *vlfree, const struct bn_tol *tol)
Fuse vertices and edges according to tol.
struct edgeuse * nmg_find_e(const struct vertex *v1, const struct vertex *v2, const struct shell *s, const struct edge *ep)
Find an edge between a given pair of vertices.
struct edgeuse * nmg_find_eu_of_vu(const struct vertexuse *vu)
Return a pointer to the edgeuse which is the parent of this vertexuse.
int nmg_move_edge_thru_pnt(struct edgeuse *mv_eu, const point_t pt, const struct bn_tol *tol)
Moves indicated edgeuse (mv_eu) so that it passes thru the given point (pt). The direction of the edg...
int nmg_find_eu_left_non_unit(vect_t left, const struct edgeuse *eu)
Given an edgeuse, if it is part of a faceuse, return the inward pointing "left" vector which points i...
void nmg_edgeuse_with_eg_tabulate(struct bu_ptbl *tab, const struct edge_g_lseg *eg)
Build an bu_ptbl list which cites every edgeuse pointer that uses edge geometry "eg".
int nmg_keu(struct edgeuse *eu)
Delete an edgeuse & its mate from a shell or loop.
struct edge * nmg_find_e_nearest_pt2(uint32_t *magic_p, const point_t pt2, const mat_t mat, struct bu_list *vlfree, const struct bn_tol *tol)
A geometric search routine to find the edge that is nearest to the given point, when all edges are pr...
struct edgeuse * nmg_find_matching_eu_in_s(const struct edgeuse *eu1, const struct shell *s2)
If shell s2 has an edge that connects the same vertices as eu1 connects, return the matching edgeuse ...
struct edgeuse * nmg_me(struct vertex *v1, struct vertex *v2, struct shell *s)
Make wire edge.
struct edgeuse * nmg_pop_eu(struct bu_ptbl *stack)
Convenience wrapper to retrieve and remove the last edgeuse element from the stack bu_ptbl.
int nmg_edge_g_fuse(const uint32_t *magic_p, struct bu_list *vlfree, const struct bn_tol *tol)
Fuse edge_g structs.
void nmg_unglueedge(struct edgeuse *eu)
If edgeuse is part of a shared edge (more than one pair of edgeuses on the edge), it and its mate are...
struct edgeuse * nmg_findeu(const struct vertex *v1, const struct vertex *v2, const struct shell *s, const struct edgeuse *eup, int dangling_only)
Find an edgeuse in a shell between a given pair of vertex structs.
void nmg_eu_2vecs_perp(vect_t xvec, vect_t yvec, vect_t zvec, const struct edgeuse *eu, const struct bn_tol *tol)
Given an edgeuse, return two arbitrary unit-length vectors which are perpendicular to each other and ...
int nmg_break_edges(uint32_t *magic_p, struct bu_list *vlfree, const struct bn_tol *tol)
Apply nmg_break_edge_at_verts() to all edge/vertex combinations present in the NMG model below the NM...
int nmg_break_edge_at_verts(struct edge *e, struct bu_ptbl *verts, const struct bn_tol *tol)
Split an edge into multiple edges at specified vertices if they are within tolerance distance.
const struct edgeuse * nmg_radial_face_edge_in_shell(const struct edgeuse *eu)
Looking radially around an edge, find another edge which is a part of a face in the same shell.
struct edgeuse * nmg_find_eu_with_vu_in_lu(const struct loopuse *lu, const struct vertexuse *vu)
Find an edgeuse starting at a given vertexuse within a loopuse.
void nmg_je(struct edgeuse *eudst, struct edgeuse *eusrc)
Move a pair of edgeuses onto a single edge (glue edgeuse).
int nmg_wedge_class(int ass, double a, double b)
Determine if the given wedge is entirely to the left or right of the ray, or if it crosses.
int nmg_break_all_es_on_v(uint32_t *magic_p, struct vertex *v, struct bu_list *vlfree, const struct bn_tol *tol)
TODO - document...
const struct edgeuse * nmg_find_edge_between_2fu(const struct faceuse *fu1, const struct faceuse *fu2, struct bu_list *vlfree, const struct bn_tol *tol)
Perform a topology search to determine if two faces (specified by their faceuses) share an edge in co...
int nmg_mark_edges_real(const uint32_t *magic_p, struct bu_list *vlfree)
Sets the "is_real" flag on all edges at or below the pointer passed. Returns the number of flags set.
int nmg_use_edge_g(struct edgeuse *eu, uint32_t *magic_p)
Associate edgeuse 'eu' with the edge geometry structure identified by 'magic_p', where magic_p is the...
int nmg_demote_eu(struct edgeuse *eu)
Demote a wire edge into a pair of self-loop vertices.
int nmg_is_edge_in_edgelist(const struct edge *e, const struct bu_list *hd)
Check if edge e is present within a list of edges.
int nmg_is_vertex_in_edgelist(const struct vertex *v, const struct bu_list *hd)
Check if a vertex is in use within a list of edges.
int nmg_break_e_on_v(const uint32_t *magic_p, struct bu_list *vlfree, const struct bn_tol *tol)
As the first step in evaluating a boolean formula, before starting to do face/face intersections,...
void nmg_edgeuse_tabulate(struct bu_ptbl *tab, const uint32_t *magic_p, struct bu_list *vlfree)
Build the set of pointers to all edgeuse structures in an NMG model that are "below" the data structu...
struct edgeuse * nmg_find_ot_same_eu_of_e(const struct edge *e)
If there is an edgeuse of an OT_SAME faceuse on this edge, return it. Only return a wire edgeuse if t...
void nmg_jeg(struct edge_g_lseg *dest_eg, struct edge_g_lseg *src_eg)
Join two edge geometries.
void nmg_e_and_v_tabulate(struct bu_ptbl *eutab, struct bu_ptbl *vtab, const uint32_t *magic_p, struct bu_list *vlfree)
Build lists of all edges (represented by one edgeuse on that edge) and all vertices found underneath ...
void nmg_radial_join_eu(struct edgeuse *eu1, struct edgeuse *eu2, const struct bn_tol *tol)
Make all the edgeuses around eu2's edge to refer to eu1's edge, taking care to organize them into the...
struct edgeuse * nmg_find_eu_in_face(const struct vertex *v1, const struct vertex *v2, const struct faceuse *fu, const struct edgeuse *eup, int dangling_only)
An analog to nmg_findeu(), only restricted to searching a faceuse, rather than to a whole shell.
struct edgeuse * nmg_meonvu(struct vertexuse *vu)
Make an edge on vertexuse.
int nmg_2edgeuse_g_coincident(const struct edgeuse *eu1, const struct edgeuse *eu2, const struct bn_tol *tol)
void nmg_edge_tabulate(struct bu_ptbl *tab, const uint32_t *magic_p, struct bu_list *vlfree)
Build the set of pointers to all edge structures in an NMG model that are "below" the data structure ...
int nmg_eu_is_part_of_crack(const struct edgeuse *eu)
Check if eu is part of a loop but is not correctly connected topologically to other edges in the loop...
fastf_t vect_t[ELEMENTS_PER_VECT]
3-tuple vector
fastf_t mat_t[ELEMENTS_PER_MAT]
4x4 matrix
fastf_t point_t[ELEMENTS_PER_POINT]
3-tuple point
NMG topological edge usage.
uint32_t * magic_p
for those times when we're not sure
NMG topological face usage.
NMG topological loop usage.
NMG topological vertex - the simplest element of the topology system.
NMG topological vertex usage.
fundamental vector, matrix, quaternion math macros