Revision: 69028
http://sourceforge.net/p/brlcad/code/69028
Author: starseeker
Date: 2016-10-11 23:07:50 +0000 (Tue, 11 Oct 2016)
Log Message:
-----------
woosh - get the rest of the public stuff in rt/nurbs.h renamed.
Modified Paths:
--------------
brlcad/trunk/CHANGES
brlcad/trunk/include/rt/nurb.h
brlcad/trunk/src/librt/nurb_example.c
brlcad/trunk/src/librt/oslo_calc.c
brlcad/trunk/src/librt/oslo_map.c
brlcad/trunk/src/librt/primitives/bspline/bspline.cpp
brlcad/trunk/src/librt/primitives/bspline/nurb_basis.c
brlcad/trunk/src/librt/primitives/bspline/nurb_bezier.c
brlcad/trunk/src/librt/primitives/bspline/nurb_bound.c
brlcad/trunk/src/librt/primitives/bspline/nurb_c2.c
brlcad/trunk/src/librt/primitives/bspline/nurb_copy.c
brlcad/trunk/src/librt/primitives/bspline/nurb_diff.c
brlcad/trunk/src/librt/primitives/bspline/nurb_eval.c
brlcad/trunk/src/librt/primitives/bspline/nurb_flat.c
brlcad/trunk/src/librt/primitives/bspline/nurb_interp.c
brlcad/trunk/src/librt/primitives/bspline/nurb_knot.c
brlcad/trunk/src/librt/primitives/bspline/nurb_norm.c
brlcad/trunk/src/librt/primitives/bspline/nurb_plot.c
brlcad/trunk/src/librt/primitives/bspline/nurb_poly.c
brlcad/trunk/src/librt/primitives/bspline/nurb_ray.c
brlcad/trunk/src/librt/primitives/bspline/nurb_refine.c
brlcad/trunk/src/librt/primitives/bspline/nurb_solve.c
brlcad/trunk/src/librt/primitives/bspline/nurb_split.c
brlcad/trunk/src/librt/primitives/bspline/nurb_tess.c
brlcad/trunk/src/librt/primitives/bspline/nurb_trim.c
brlcad/trunk/src/librt/primitives/bspline/nurb_util.c
brlcad/trunk/src/librt/primitives/bspline/nurb_xsplit.c
brlcad/trunk/src/librt/primitives/nmg/nmg_mk.c
brlcad/trunk/src/librt/primitives/nmg/nmg_plot.c
brlcad/trunk/src/librt/primitives/nmg/nmg_rt_isect.c
brlcad/trunk/src/proc-db/spltest.c
brlcad/trunk/src/proc-db/tea.c
brlcad/trunk/src/proc-db/wavy.c
Modified: brlcad/trunk/CHANGES
===================================================================
--- brlcad/trunk/CHANGES 2016-10-11 21:04:01 UTC (rev 69027)
+++ brlcad/trunk/CHANGES 2016-10-11 23:07:50 UTC (rev 69028)
@@ -1238,5 +1238,57 @@
s/rt_nurb_kvmerge/nmg_nurb_kvmerge/g
s/rt_nurb_s_print/nmg_nurb_s_print/g
s/rt_nurb_s_refine/nmg_nurb_s_refine/g
+s/rt_bez_check/nmg_bez_check/g
+s/rt_nurb_back_solve/nmg_nurb_back_solve/g
+s/rt_nurb_basis_eval/nmg_nurb_basis_eval/g
+s/rt_nurb_c_bound/nmg_nurb_c_bound/g
+s/rt_nurb_c_check/nmg_nurb_c_check/g
+s/rt_nurb_c_diff/nmg_nurb_c_diff/g
+s/rt_nurb_c_refine/nmg_nurb_c_refine/g
+s/rt_nurb_c_xsplit/nmg_nurb_c_xsplit/g
+s/rt_nurb_calc_oslo/nmg_nurb_calc_oslo/g
+s/rt_nurb_cinterp/nmg_nurb_cinterp/g
+s/rt_nurb_clean_cnurb/nmg_nurb_clean_cnurb/g
+s/rt_nurb_clip_srf/nmg_nurb_clip_srf/g
+s/rt_nurb_crv_copy/nmg_nurb_crv_copy/g
+s/rt_nurb_crv_flat/nmg_nurb_crv_flat/g
+s/rt_nurb_curvature/nmg_nurb_curvature/g
+s/rt_nurb_doolittle/nmg_nurb_doolittle/g
+s/rt_nurb_eval_crv/nmg_nurb_eval_crv/g
+s/rt_nurb_forw_solve/nmg_nurb_forw_solve/g
+s/rt_nurb_free_oslo/nmg_nurb_free_oslo/g
+s/rt_nurb_gen_knot_vector/nmg_nurb_gen_knot_vector/g
+s/rt_nurb_knot_index/nmg_nurb_knot_index/g
+s/rt_nurb_kvcheck/nmg_nurb_kvcheck/g
+s/rt_nurb_kvcopy/nmg_nurb_kvcopy/g
+s/rt_nurb_kvextract/nmg_nurb_kvextract/g
+s/rt_nurb_kvknot/nmg_nurb_kvknot/g
+s/rt_nurb_kvmult/nmg_nurb_kvmult/g
+s/rt_nurb_kvnorm/nmg_nurb_kvnorm/g
+s/rt_nurb_map_oslo/nmg_nurb_map_oslo/g
+s/rt_nurb_mesh_diff/nmg_nurb_mesh_diff/g
+s/rt_nurb_mk_poly/nmg_nurb_mk_poly/g
+s/rt_nurb_p_mat/nmg_nurb_p_mat/g
+s/rt_nurb_plot_cnurb/nmg_nurb_plot_cnurb/g
+s/rt_nurb_plot_snurb/nmg_nurb_plot_snurb/g
+s/rt_nurb_poly/nmg_nurb_poly/g
+s/rt_nurb_pr_crv/nmg_nurb_pr_crv/g
+s/rt_nurb_pr_kv/nmg_nurb_pr_kv/g
+s/rt_nurb_pr_mesh/nmg_nurb_pr_mesh/g
+s/rt_nurb_pr_oslo/nmg_nurb_pr_oslo/g
+s/rt_nurb_print_pt_type/nmg_nurb_print_pt_type/g
+s/rt_nurb_project_srf/nmg_nurb_project_srf/g
+s/rt_nurb_region_from_srf/nmg_nurb_region_from_srf/g
+s/rt_nurb_s_bound/nmg_nurb_s_bound/g
+s/rt_nurb_s_check/nmg_nurb_s_check/g
+s/rt_nurb_s_diff/nmg_nurb_s_diff/g
+s/rt_nurb_s_flat/nmg_nurb_s_flat/g
+s/rt_nurb_s_plot/nmg_nurb_s_plot/g
+s/rt_nurb_s_split/nmg_nurb_s_split/g
+s/rt_nurb_s_xsplit/nmg_nurb_s_xsplit/g
+s/rt_nurb_scopy/nmg_nurb_scopy/g
+s/rt_nurb_sinterp/nmg_nurb_sinterp/g
+s/rt_nurb_solve/nmg_nurb_solve/g
+s/rt_nurb_to_poly/nmg_nurb_to_poly/g
rename old nurbs functions intertwined with nmg to use nmg prefix
[7.26]
Modified: brlcad/trunk/include/rt/nurb.h
===================================================================
--- brlcad/trunk/include/rt/nurb.h 2016-10-11 21:04:01 UTC (rev 69027)
+++ brlcad/trunk/include/rt/nurb.h 2016-10-11 23:07:50 UTC (rev 69028)
@@ -99,8 +99,8 @@
/* ----- Internal structures ----- */
-struct rt_nurb_poly {
- struct rt_nurb_poly * next;
+struct nmg_nurb_poly {
+ struct nmg_nurb_poly * next;
point_t ply[3]; /**< @brief Vertices */
fastf_t uv[3][2]; /**< @brief U, V parametric values */
};
@@ -130,29 +130,29 @@
__BEGIN_DECLS
/* nurb_basis.c */
-RT_EXPORT extern fastf_t rt_nurb_basis_eval(struct knot_vector *knts, int
interval,
+RT_EXPORT extern fastf_t nmg_nurb_basis_eval(struct knot_vector *knts, int
interval,
int order, fastf_t mu);
/* nurb_bezier.c */
RT_EXPORT extern int nmg_nurb_bezier(struct bu_list *bezier_hd, const struct
face_g_snurb * srf, struct resource *res);
-RT_EXPORT extern int rt_bez_check(const struct face_g_snurb * srf);
+RT_EXPORT extern int nmg_bez_check(const struct face_g_snurb * srf);
RT_EXPORT extern int nurb_crv_is_bezier(const struct edge_g_cnurb *crv);
RT_EXPORT extern void nurb_c_to_bezier(struct bu_list *clist, struct
edge_g_cnurb *crv);
/* nurb_bound.c */
-RT_EXPORT extern int rt_nurb_s_bound(struct face_g_snurb *srf, point_t bmin,
point_t bmax);
-RT_EXPORT extern int rt_nurb_c_bound(struct edge_g_cnurb *crv, point_t bmin,
point_t bmax);
-RT_EXPORT extern int rt_nurb_s_check(struct face_g_snurb *srf);
-RT_EXPORT extern int rt_nurb_c_check(struct edge_g_cnurb *crv);
+RT_EXPORT extern int nmg_nurb_s_bound(struct face_g_snurb *srf, point_t bmin,
point_t bmax);
+RT_EXPORT extern int nmg_nurb_c_bound(struct edge_g_cnurb *crv, point_t bmin,
point_t bmax);
+RT_EXPORT extern int nmg_nurb_s_check(struct face_g_snurb *srf);
+RT_EXPORT extern int nmg_nurb_c_check(struct edge_g_cnurb *crv);
/* nurb_copy.c */
-RT_EXPORT extern struct face_g_snurb *rt_nurb_scopy(const struct face_g_snurb
*srf, struct resource *res);
-RT_EXPORT extern struct edge_g_cnurb *rt_nurb_crv_copy(const struct
edge_g_cnurb * crv);
+RT_EXPORT extern struct face_g_snurb *nmg_nurb_scopy(const struct face_g_snurb
*srf, struct resource *res);
+RT_EXPORT extern struct edge_g_cnurb *nmg_nurb_crv_copy(const struct
edge_g_cnurb * crv);
/* nurb_diff.c */
-RT_EXPORT extern struct face_g_snurb *rt_nurb_s_diff(const struct face_g_snurb
*srf, int dir);
-RT_EXPORT extern struct edge_g_cnurb *rt_nurb_c_diff(const struct edge_g_cnurb
*crv);
-RT_EXPORT extern void rt_nurb_mesh_diff(int order, const fastf_t *o_pts,
+RT_EXPORT extern struct face_g_snurb *nmg_nurb_s_diff(const struct
face_g_snurb *srf, int dir);
+RT_EXPORT extern struct edge_g_cnurb *nmg_nurb_c_diff(const struct
edge_g_cnurb *crv);
+RT_EXPORT extern void nmg_nurb_mesh_diff(int order, const fastf_t *o_pts,
fastf_t *n_pts,
const fastf_t *knots, int
o_stride, int n_stride,
int o_size, int pt_type);
@@ -160,19 +160,19 @@
/* nurb_eval.c */
RT_EXPORT extern void nmg_nurb_s_eval(const struct face_g_snurb *srf, fastf_t
u, fastf_t v, fastf_t * final_value);
RT_EXPORT extern void nmg_nurb_c_eval(const struct edge_g_cnurb *crv, fastf_t
param, fastf_t * final_value);
-RT_EXPORT extern fastf_t *rt_nurb_eval_crv(fastf_t *crv, int order,
+RT_EXPORT extern fastf_t *nmg_nurb_eval_crv(fastf_t *crv, int order,
fastf_t param,
const struct knot_vector
*k_vec, int k_index, int coords);
-RT_EXPORT extern void rt_nurb_pr_crv(fastf_t *crv, int c_size, int coords);
+RT_EXPORT extern void nmg_nurb_pr_crv(fastf_t *crv, int c_size, int coords);
/* nurb_flat.c */
-RT_EXPORT extern int rt_nurb_s_flat(struct face_g_snurb *srf, fastf_t epsilon);
-RT_EXPORT extern fastf_t rt_nurb_crv_flat(fastf_t *crv, int size, int
pt_type);
+RT_EXPORT extern int nmg_nurb_s_flat(struct face_g_snurb *srf, fastf_t
epsilon);
+RT_EXPORT extern fastf_t nmg_nurb_crv_flat(fastf_t *crv, int size, int
pt_type);
/* nurb_knot.c */
-RT_EXPORT extern void rt_nurb_kvknot(struct knot_vector *new_knots, int order,
+RT_EXPORT extern void nmg_nurb_kvknot(struct knot_vector *new_knots, int order,
fastf_t lower, fastf_t upper, int
num, struct resource *res);
-RT_EXPORT extern void rt_nurb_kvmult(struct knot_vector *new_kv,
+RT_EXPORT extern void nmg_nurb_kvmult(struct knot_vector *new_kv,
const struct knot_vector *kv,
int num, fastf_t val, struct resource
*res);
RT_EXPORT extern void nmg_nurb_kvgen(struct knot_vector *kv,
@@ -180,46 +180,46 @@
RT_EXPORT extern void nmg_nurb_kvmerge(struct knot_vector *new_knots,
const struct knot_vector *kv1,
const struct knot_vector *kv2,
struct resource *res);
-RT_EXPORT extern int rt_nurb_kvcheck(fastf_t val, const struct knot_vector
*kv);
-RT_EXPORT extern void rt_nurb_kvextract(struct knot_vector *new_kv,
+RT_EXPORT extern int nmg_nurb_kvcheck(fastf_t val, const struct knot_vector
*kv);
+RT_EXPORT extern void nmg_nurb_kvextract(struct knot_vector *new_kv,
const struct knot_vector *kv,
int lower, int upper, struct
resource *res);
-RT_EXPORT extern void rt_nurb_kvcopy(struct knot_vector *new_kv,
+RT_EXPORT extern void nmg_nurb_kvcopy(struct knot_vector *new_kv,
const struct knot_vector *old_kv,
struct resource *res);
-RT_EXPORT extern void rt_nurb_kvnorm(struct knot_vector *kv);
-RT_EXPORT extern int rt_nurb_knot_index(const struct knot_vector *kv, fastf_t
k_value, int order);
-RT_EXPORT extern void rt_nurb_gen_knot_vector(struct knot_vector *new_knots,
+RT_EXPORT extern void nmg_nurb_kvnorm(struct knot_vector *kv);
+RT_EXPORT extern int nmg_nurb_knot_index(const struct knot_vector *kv, fastf_t
k_value, int order);
+RT_EXPORT extern void nmg_nurb_gen_knot_vector(struct knot_vector *new_knots,
int order, fastf_t lower,
fastf_t upper, struct resource *res);
/* nurb_norm.c */
RT_EXPORT extern void nmg_nurb_s_norm(struct face_g_snurb *srf, fastf_t u,
fastf_t v, fastf_t * norm);
/* nurb_c2.c */
-RT_EXPORT extern void rt_nurb_curvature(struct curvature *cvp,
+RT_EXPORT extern void nmg_nurb_curvature(struct curvature *cvp,
const struct face_g_snurb *srf,
fastf_t u, fastf_t v);
/* nurb_plot.c */
-RT_EXPORT extern void rt_nurb_plot_snurb(FILE *fp, const struct face_g_snurb
*srf);
-RT_EXPORT extern void rt_nurb_plot_cnurb(FILE *fp, const struct edge_g_cnurb
*crv);
-RT_EXPORT extern void rt_nurb_s_plot(const struct face_g_snurb *srf);
+RT_EXPORT extern void nmg_nurb_plot_snurb(FILE *fp, const struct face_g_snurb
*srf);
+RT_EXPORT extern void nmg_nurb_plot_cnurb(FILE *fp, const struct edge_g_cnurb
*crv);
+RT_EXPORT extern void nmg_nurb_s_plot(const struct face_g_snurb *srf);
/* nurb_interp.c */
-RT_EXPORT extern void rt_nurb_cinterp(struct edge_g_cnurb *crv, int order,
+RT_EXPORT extern void nmg_nurb_cinterp(struct edge_g_cnurb *crv, int order,
const fastf_t *data, int n);
-RT_EXPORT extern void rt_nurb_sinterp(struct face_g_snurb *srf, int order,
+RT_EXPORT extern void nmg_nurb_sinterp(struct face_g_snurb *srf, int order,
const fastf_t *data, int ymax, int
xmax);
/* nurb_poly.c */
-RT_EXPORT extern struct rt_nurb_poly *rt_nurb_to_poly(struct face_g_snurb
*srf);
-RT_EXPORT extern struct rt_nurb_poly *rt_nurb_mk_poly(fastf_t *v1, fastf_t
*v2, fastf_t *v3,
+RT_EXPORT extern struct nmg_nurb_poly *nmg_nurb_to_poly(struct face_g_snurb
*srf);
+RT_EXPORT extern struct nmg_nurb_poly *nmg_nurb_mk_poly(fastf_t *v1, fastf_t
*v2, fastf_t *v3,
fastf_t uv1[2], fastf_t uv2[2], fastf_t uv3[2]);
/* nurb_ray.c */
-RT_EXPORT extern struct face_g_snurb *rt_nurb_project_srf(const struct
face_g_snurb *srf,
+RT_EXPORT extern struct face_g_snurb *nmg_nurb_project_srf(const struct
face_g_snurb *srf,
plane_t plane1,
plane_t plane2, struct resource *res);
-RT_EXPORT extern void rt_nurb_clip_srf(const struct face_g_snurb *srf,
+RT_EXPORT extern void nmg_nurb_clip_srf(const struct face_g_snurb *srf,
int dir, fastf_t *min, fastf_t
*max);
-RT_EXPORT extern struct face_g_snurb *rt_nurb_region_from_srf(const struct
face_g_snurb *srf,
+RT_EXPORT extern struct face_g_snurb *nmg_nurb_region_from_srf(const struct
face_g_snurb *srf,
int dir,
fastf_t param1, fastf_t param2, struct resource *res);
RT_EXPORT extern struct nmg_nurb_uv_hit *nmg_nurb_intersect(const struct
face_g_snurb * srf,
plane_t plane1,
plane_t plane2, double uv_tol, struct resource *res, struct bu_list *plist);
@@ -227,22 +227,22 @@
/* nurb_refine.c */
RT_EXPORT extern struct face_g_snurb *nmg_nurb_s_refine(const struct
face_g_snurb *srf,
int dir, struct
knot_vector *kv, struct resource *res);
-RT_EXPORT extern struct edge_g_cnurb *rt_nurb_c_refine(const struct
edge_g_cnurb * crv,
+RT_EXPORT extern struct edge_g_cnurb *nmg_nurb_c_refine(const struct
edge_g_cnurb * crv,
struct knot_vector
*kv);
/* nurb_solve.c */
-RT_EXPORT extern void rt_nurb_solve(fastf_t *mat_1, fastf_t *mat_2,
+RT_EXPORT extern void nmg_nurb_solve(fastf_t *mat_1, fastf_t *mat_2,
fastf_t *solution, int dim, int
coords);
-RT_EXPORT extern void rt_nurb_doolittle(fastf_t *mat_1, fastf_t *mat_2,
+RT_EXPORT extern void nmg_nurb_doolittle(fastf_t *mat_1, fastf_t *mat_2,
int row, int coords);
-RT_EXPORT extern void rt_nurb_forw_solve(const fastf_t *lu, const fastf_t *b,
+RT_EXPORT extern void nmg_nurb_forw_solve(const fastf_t *lu, const fastf_t *b,
fastf_t *y, int n);
-RT_EXPORT extern void rt_nurb_back_solve(const fastf_t *lu, const fastf_t *y,
+RT_EXPORT extern void nmg_nurb_back_solve(const fastf_t *lu, const fastf_t *y,
fastf_t *x, int n);
-RT_EXPORT extern void rt_nurb_p_mat(const fastf_t * mat, int dim);
+RT_EXPORT extern void nmg_nurb_p_mat(const fastf_t * mat, int dim);
/* nurb_split.c */
-RT_EXPORT extern void rt_nurb_s_split(struct bu_list *split_hd, const struct
face_g_snurb *srf,
+RT_EXPORT extern void nmg_nurb_s_split(struct bu_list *split_hd, const struct
face_g_snurb *srf,
int dir, struct resource *res);
RT_EXPORT extern void nmg_nurb_c_split(struct bu_list *split_hd, const struct
edge_g_cnurb *crv);
@@ -259,25 +259,25 @@
RT_EXPORT extern void nmg_nurb_free_cnurb(struct edge_g_cnurb * crv);
RT_EXPORT extern void nmg_nurb_c_print(const struct edge_g_cnurb *crv);
RT_EXPORT extern void nmg_nurb_s_print(char *c, const struct face_g_snurb
*srf);
-RT_EXPORT extern void rt_nurb_pr_kv(const struct knot_vector *kv);
-RT_EXPORT extern void rt_nurb_pr_mesh(const struct face_g_snurb *m);
-RT_EXPORT extern void rt_nurb_print_pt_type(int c);
-RT_EXPORT extern void rt_nurb_clean_cnurb(struct edge_g_cnurb *crv);
+RT_EXPORT extern void nmg_nurb_pr_kv(const struct knot_vector *kv);
+RT_EXPORT extern void nmg_nurb_pr_mesh(const struct face_g_snurb *m);
+RT_EXPORT extern void nmg_nurb_print_pt_type(int c);
+RT_EXPORT extern void nmg_nurb_clean_cnurb(struct edge_g_cnurb *crv);
/* nurb_xsplit.c */
-RT_EXPORT extern struct face_g_snurb *rt_nurb_s_xsplit(struct face_g_snurb
*srf,
+RT_EXPORT extern struct face_g_snurb *nmg_nurb_s_xsplit(struct face_g_snurb
*srf,
fastf_t param, int
dir);
-RT_EXPORT extern struct edge_g_cnurb *rt_nurb_c_xsplit(struct edge_g_cnurb
*crv, fastf_t param);
+RT_EXPORT extern struct edge_g_cnurb *nmg_nurb_c_xsplit(struct edge_g_cnurb
*crv, fastf_t param);
/* oslo_calc.c */
-RT_EXPORT extern struct oslo_mat *rt_nurb_calc_oslo(int order,
+RT_EXPORT extern struct oslo_mat *nmg_nurb_calc_oslo(int order,
const struct
knot_vector *tau_kv,
struct knot_vector
*t_kv, struct resource *res);
-RT_EXPORT extern void rt_nurb_pr_oslo(struct oslo_mat *om);
-RT_EXPORT extern void rt_nurb_free_oslo(struct oslo_mat *om, struct resource
*res);
+RT_EXPORT extern void nmg_nurb_pr_oslo(struct oslo_mat *om);
+RT_EXPORT extern void nmg_nurb_free_oslo(struct oslo_mat *om, struct resource
*res);
/* oslo_map.c */
-RT_EXPORT extern void rt_nurb_map_oslo(struct oslo_mat *oslo,
+RT_EXPORT extern void nmg_nurb_map_oslo(struct oslo_mat *oslo,
fastf_t *old_pts, fastf_t *new_pts,
int o_stride, int n_stride,
int lower, int upper, int pt_type);
Modified: brlcad/trunk/src/librt/nurb_example.c
===================================================================
--- brlcad/trunk/src/librt/nurb_example.c 2016-10-11 21:04:01 UTC (rev
69027)
+++ brlcad/trunk/src/librt/nurb_example.c 2016-10-11 23:07:50 UTC (rev
69028)
@@ -49,16 +49,16 @@
struct face_g_snurb *srf2, *srf3;
struct knot_vector new_kv;
- rt_nurb_sinterp(&srf, 4, (const fastf_t *)grid, 10, 10);
+ nmg_nurb_sinterp(&srf, 4, (const fastf_t *)grid, 10, 10);
/* lets take a look at it. Refine to 100 points in both directions. */
- rt_nurb_kvknot(&new_kv, srf.order[0], 0.0, 1.0, 100, (struct resource
*)NULL);
+ nmg_nurb_kvknot(&new_kv, srf.order[0], 0.0, 1.0, 100, (struct resource
*)NULL);
srf2 = (struct face_g_snurb *) nmg_nurb_s_refine(&srf, 0, &new_kv, (struct
resource *)NULL);
srf3 = (struct face_g_snurb *) nmg_nurb_s_refine(srf2, 1, &new_kv, (struct
resource *)NULL);
/* Draw refined mesh in yellow */
pl_color(stdout, 200, 200, 50);
- rt_nurb_plot_snurb(stdout, srf3);
+ nmg_nurb_plot_snurb(stdout, srf3);
}
Modified: brlcad/trunk/src/librt/oslo_calc.c
===================================================================
--- brlcad/trunk/src/librt/oslo_calc.c 2016-10-11 21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/oslo_calc.c 2016-10-11 23:07:50 UTC (rev 69028)
@@ -48,7 +48,7 @@
#define AMIN(i, j) ((i) < (j) ? (i) : (j))
struct oslo_mat *
-rt_nurb_calc_oslo(register int order, register const struct knot_vector
*tau_kv, register struct knot_vector *t_kv, struct resource *res)
+nmg_nurb_calc_oslo(register int order, register const struct knot_vector
*tau_kv, register struct knot_vector *t_kv, struct resource *res)
/* old knot vector */
/* new knot vector */
@@ -83,7 +83,7 @@
head = (struct oslo_mat *) bu_malloc (
sizeof(struct oslo_mat),
- "rt_nurb_calc_oslo: oslo mat head");
+ "nmg_nurb_calc_oslo: oslo mat head");
o_ptr = head;
@@ -93,7 +93,7 @@
if (j != 0) {
new_o = (struct oslo_mat *) bu_malloc (
sizeof(struct oslo_mat),
- "rt_nurb_calc_oslo: oslo mat struct");
+ "nmg_nurb_calc_oslo: oslo mat struct");
o_ptr->next = new_o;
o_ptr = new_o;
@@ -170,7 +170,7 @@
}
o_ptr->o_vec = (fastf_t *) bu_malloc (sizeof(fastf_t) * (v+1),
- "rt_nurb_calc_oslo: oslo vector");
+ "nmg_nurb_calc_oslo: oslo
vector");
o_ptr->offset = AMAX(muprim -v, 0);
o_ptr->osize = v;
@@ -188,7 +188,7 @@
* For debugging purposes only
*/
void
-rt_nurb_pr_oslo(struct oslo_mat *om)
+nmg_nurb_pr_oslo(struct oslo_mat *om)
{
struct oslo_mat * omp;
int j;
@@ -211,7 +211,7 @@
* Free up the structures and links for the oslo matrix.
*/
void
-rt_nurb_free_oslo(struct oslo_mat *om, struct resource *res)
+nmg_nurb_free_oslo(struct oslo_mat *om, struct resource *res)
{
register struct oslo_mat * omp;
@@ -220,8 +220,8 @@
while (om != (struct oslo_mat *) 0) {
omp = om;
om = om->next;
- bu_free((char *)omp->o_vec, "rt_nurb_free_oslo: ovec");
- bu_free((char *)omp, "rt_nurb_free_oslo: struct oslo");
+ bu_free((char *)omp->o_vec, "nmg_nurb_free_oslo: ovec");
+ bu_free((char *)omp, "nmg_nurb_free_oslo: struct oslo");
}
}
Modified: brlcad/trunk/src/librt/oslo_map.c
===================================================================
--- brlcad/trunk/src/librt/oslo_map.c 2016-10-11 21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/oslo_map.c 2016-10-11 23:07:50 UTC (rev 69028)
@@ -42,7 +42,7 @@
*/
void
-rt_nurb_map_oslo(struct oslo_mat *oslo, fastf_t *old_pts, fastf_t *new_pts,
int o_stride, int n_stride, int lower, int upper, int pt_type)
+nmg_nurb_map_oslo(struct oslo_mat *oslo, fastf_t *old_pts, fastf_t *new_pts,
int o_stride, int n_stride, int lower, int upper, int pt_type)
/* Oslo matrix */
/* Old control points */
/* New control points */
Modified: brlcad/trunk/src/librt/primitives/bspline/bspline.cpp
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/bspline.cpp 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/bspline.cpp 2016-10-11
23:07:50 UTC (rev 69028)
@@ -137,9 +137,9 @@
BU_GET(n, struct nurb_specific);
/* Store off the original face_g_snurb */
- s = rt_nurb_scopy(sip->srfs[i], (struct resource *)NULL);
+ s = nmg_nurb_scopy(sip->srfs[i], (struct resource *)NULL);
NMG_CK_SNURB(s);
- rt_nurb_s_bound(s, s->min_pt, s->max_pt);
+ nmg_nurb_s_bound(s, s->min_pt, s->max_pt);
n->srf = s;
BU_LIST_INIT(&n->bez_hd);
@@ -150,7 +150,7 @@
/* Compute bounds of each Bezier face_g_snurb */
for (BU_LIST_FOR(s, face_g_snurb, &n->bez_hd)) {
NMG_CK_SNURB(s);
- rt_nurb_s_bound(s, s->min_pt, s->max_pt);
+ nmg_nurb_s_bound(s, s->min_pt, s->max_pt);
VMINMAX((*min), (*max), s->min_pt);
VMINMAX((*min), (*max), s->max_pt);
}
@@ -236,9 +236,9 @@
BU_GET(n, struct nurb_specific);
/* Store off the original face_g_snurb */
- s = rt_nurb_scopy(sip->srfs[i], (struct resource *)NULL);
+ s = nmg_nurb_scopy(sip->srfs[i], (struct resource *)NULL);
NMG_CK_SNURB(s);
- rt_nurb_s_bound(s, s->min_pt, s->max_pt);
+ nmg_nurb_s_bound(s, s->min_pt, s->max_pt);
n->srf = s;
BU_LIST_INIT(&n->bez_hd);
@@ -249,7 +249,7 @@
/* Compute bounds of each Bezier face_g_snurb */
for (BU_LIST_FOR(s, face_g_snurb, &n->bez_hd)) {
NMG_CK_SNURB(s);
- rt_nurb_s_bound(s, s->min_pt, s->max_pt);
+ nmg_nurb_s_bound(s, s->min_pt, s->max_pt);
VMINMAX(stp->st_min, stp->st_max, s->min_pt);
VMINMAX(stp->st_min, stp->st_max, s->max_pt);
}
@@ -525,7 +525,7 @@
u = hitp->hit_vpriv[0];
v = hitp->hit_vpriv[1];
- rt_nurb_curvature(cvp, srf, u, v);
+ nmg_nurb_curvature(cvp, srf, u, v);
#endif /* CONVERT_TO_BREP */
}
@@ -633,11 +633,11 @@
if (num_knots < 2) num_knots = 2;
- rt_nurb_kvknot(&tkv1, n->order[0],
+ nmg_nurb_kvknot(&tkv1, n->order[0],
n->u.knots[0],
n->u.knots[n->u.k_size-1], num_knots, (struct resource
*)NULL);
- rt_nurb_kvknot(&tkv2, n->order[1],
+ nmg_nurb_kvknot(&tkv2, n->order[1],
n->v.knots[0],
n->v.knots[n->v.k_size-1], num_knots, (struct resource
*)NULL);
@@ -827,8 +827,8 @@
}
}
- rt_nurb_kvnorm(&sip->srfs[s]->u);
- rt_nurb_kvnorm(&sip->srfs[s]->v);
+ nmg_nurb_kvnorm(&sip->srfs[s]->u);
+ nmg_nurb_kvnorm(&sip->srfs[s]->v);
vp = (dbfloat_t *) &rp[d.d.d_nknots+1];
m = sip->srfs[s]->ctl_points;
@@ -877,7 +877,7 @@
}
/* bound the surface for tolerancing and other bounding box tests */
- rt_nurb_s_bound(sip->srfs[s], sip->srfs[s]->min_pt,
+ nmg_nurb_s_bound(sip->srfs[s], sip->srfs[s]->min_pt,
sip->srfs[s]->max_pt);
rp += 1 + d.d.d_nknots + d.d.d_nctls;
@@ -1174,8 +1174,8 @@
bu_free(uknots, "uknots");
bu_free(vknots, "vknots");
- rt_nurb_kvnorm(&srf->u);
- rt_nurb_kvnorm(&srf->v);
+ nmg_nurb_kvnorm(&srf->u);
+ nmg_nurb_kvnorm(&srf->v);
points = (double *)bu_malloc(coords * srf->s_size[0] * srf->s_size[1] *
sizeof(double), "points");
@@ -1205,7 +1205,7 @@
}
/* bound the surface for tolerancing and other bounding box tests */
- rt_nurb_s_bound(sip->srfs[s], sip->srfs[s]->min_pt,
+ nmg_nurb_s_bound(sip->srfs[s], sip->srfs[s]->min_pt,
sip->srfs[s]->max_pt);
}
return 0;
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_basis.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_basis.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_basis.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -60,7 +60,7 @@
* Academic Press, New York 1988.
*/
fastf_t
-rt_nurb_basis_eval(register struct knot_vector *knts, int interval, int order,
fastf_t mu)
+nmg_nurb_basis_eval(register struct knot_vector *knts, int interval, int
order, fastf_t mu)
{
register fastf_t den;
@@ -88,7 +88,7 @@
b1 = 0.0;
else
b1 = ((mu - k1) *
- rt_nurb_basis_eval(knts, interval, order - 1, mu)) / den;
+ nmg_nurb_basis_eval(knts, interval, order - 1, mu)) / den;
den = (k3 - k2);
@@ -96,7 +96,7 @@
b2 = 0.0;
else
b2 = ((k3 - mu) *
- rt_nurb_basis_eval(knts, interval + 1, order - 1, mu)) / den;
+ nmg_nurb_basis_eval(knts, interval + 1, order - 1, mu)) / den;
return b1 + b2;
}
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_bezier.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_bezier.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_bezier.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -58,24 +58,24 @@
NMG_CK_SNURB(orig_surf);
- if ((dir = rt_bez_check(orig_surf)) == -1) {
- s = rt_nurb_scopy(orig_surf, res);
+ if ((dir = nmg_bez_check(orig_surf)) == -1) {
+ s = nmg_nurb_scopy(orig_surf, res);
BU_LIST_APPEND(bezier_hd, &s->l);
return 1; /* Was already Bezier, nothing done */
}
BU_LIST_INIT(&todo);
- rt_nurb_s_split(&todo, orig_surf, dir, res);
+ nmg_nurb_s_split(&todo, orig_surf, dir, res);
while (BU_LIST_WHILE(s, face_g_snurb, &todo)) {
- if ((dir = rt_bez_check(s)) == -1) {
+ if ((dir = nmg_bez_check(s)) == -1) {
/* This snurb is now a Bezier */
BU_LIST_DEQUEUE(&s->l);
BU_LIST_APPEND(bezier_hd, &s->l);
} else {
/* Split, and keep going */
BU_LIST_DEQUEUE(&s->l);
- rt_nurb_s_split(&todo, s, dir, res);
+ nmg_nurb_s_split(&todo, s, dir, res);
nmg_nurb_free_snurb(s, res);
}
}
@@ -84,7 +84,7 @@
int
-rt_bez_check(const struct face_g_snurb *srf)
+nmg_bez_check(const struct face_g_snurb *srf)
{
NMG_CK_SNURB(srf);
@@ -139,7 +139,7 @@
int done;
/* make a copy of original curve */
- crv_copy = rt_nurb_crv_copy(crv);
+ crv_copy = nmg_nurb_crv_copy(crv);
/* split curve at each knot value */
done = 0;
@@ -163,7 +163,7 @@
break;
}
- crv1 = rt_nurb_c_xsplit(crv_copy, split);
+ crv1 = nmg_nurb_c_xsplit(crv_copy, split);
nmg_nurb_free_cnurb(crv_copy);
crv_copy = BU_LIST_PNEXT(edge_g_cnurb, &crv1->l);
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_bound.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_bound.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_bound.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -45,7 +45,7 @@
* surface, and returns the minimum and maximum points of the surface.
*/
int
-rt_nurb_s_bound(struct face_g_snurb *srf, fastf_t *bmin, fastf_t *bmax)
+nmg_nurb_s_bound(struct face_g_snurb *srf, fastf_t *bmin, fastf_t *bmax)
{
register fastf_t *p_ptr; /* Mesh pointer */
register int coords; /* Elements per vector */
@@ -85,7 +85,7 @@
int
-rt_nurb_c_bound(struct edge_g_cnurb *crv, fastf_t *bmin, fastf_t *bmax)
+nmg_nurb_c_bound(struct edge_g_cnurb *crv, fastf_t *bmin, fastf_t *bmax)
{
register fastf_t *p_ptr; /* Mesh pointer */
register int coords; /* Elements per vector */
@@ -124,14 +124,14 @@
/**
- * rt_nurb_s_check(srf)
+ * nmg_nurb_s_check(srf)
*
* Checks the NURB surface control points to make sure no one point is
* near INFINITY, which probably means that the surface mesh is bad.
*/
int
-rt_nurb_s_check(register struct face_g_snurb *srf)
+nmg_nurb_s_check(register struct face_g_snurb *srf)
{
register fastf_t *mp; /* Mesh pointer */
register int i;
@@ -152,14 +152,14 @@
/**
- * rt_nurb_c_check(srf)
+ * nmg_nurb_c_check(srf)
*
* Checks the NURB curve control points to make sure no one point is
* near INFINITY, which probably means that the surface mesh is bad.
*/
int
-rt_nurb_c_check(register struct edge_g_cnurb *crv)
+nmg_nurb_c_check(register struct edge_g_cnurb *crv)
{
register fastf_t *mp; /* Mesh pointer */
register int i;
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_c2.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_c2.c 2016-10-11 21:04:01 UTC
(rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_c2.c 2016-10-11 23:07:50 UTC
(rev 69028)
@@ -37,7 +37,7 @@
void
-rt_nurb_curvature(struct curvature *cvp, const struct face_g_snurb *srf,
fastf_t u, fastf_t v)
+nmg_nurb_curvature(struct curvature *cvp, const struct face_g_snurb *srf,
fastf_t u, fastf_t v)
{
struct face_g_snurb * us, *vs, * uus, * vvs, *uvs;
fastf_t ue[4], ve[4], uue[4], vve[4], uve[4], se[4];
@@ -50,11 +50,11 @@
vect_t norm;
int i;
- us = rt_nurb_s_diff(srf, RT_NURB_SPLIT_ROW);
- vs = rt_nurb_s_diff(srf, RT_NURB_SPLIT_COL);
- uus = rt_nurb_s_diff(us, RT_NURB_SPLIT_ROW);
- vvs = rt_nurb_s_diff(vs, RT_NURB_SPLIT_COL);
- uvs = rt_nurb_s_diff(vs, RT_NURB_SPLIT_ROW);
+ us = nmg_nurb_s_diff(srf, RT_NURB_SPLIT_ROW);
+ vs = nmg_nurb_s_diff(srf, RT_NURB_SPLIT_COL);
+ uus = nmg_nurb_s_diff(us, RT_NURB_SPLIT_ROW);
+ vvs = nmg_nurb_s_diff(vs, RT_NURB_SPLIT_COL);
+ uvs = nmg_nurb_s_diff(vs, RT_NURB_SPLIT_ROW);
nmg_nurb_s_eval(srf, u, v, se);
nmg_nurb_s_eval(us, u, v, ue);
@@ -131,7 +131,7 @@
if (fabs(E*G - F*F) < 0.0001) {
/* XXX */
- bu_log("rt_nurb_curvature: first fundamental form is singular E = %g F=
%g G = %g\n",
+ bu_log("nmg_nurb_curvature: first fundamental form is singular E = %g
F= %g G = %g\n",
E, F, G);
bn_vec_ortho(cvp->crv_pdir, norm); /* sanity */
return;
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_copy.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_copy.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_copy.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -36,7 +36,7 @@
#include "rt/nurb.h"
struct face_g_snurb *
-rt_nurb_scopy(const struct face_g_snurb *srf, struct resource *res)
+nmg_nurb_scopy(const struct face_g_snurb *srf, struct resource *res)
{
register struct face_g_snurb * n;
int i;
@@ -66,7 +66,7 @@
struct edge_g_cnurb *
-rt_nurb_crv_copy(const struct edge_g_cnurb *crv)
+nmg_nurb_crv_copy(const struct edge_g_cnurb *crv)
{
register struct edge_g_cnurb * n;
int i;
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_diff.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_diff.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_diff.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -49,13 +49,13 @@
* knot vector is a subset of the original. (subtract a knot from each
* of the ends).
*
- * Arguments to rt_nurb_s_diff() --
+ * Arguments to nmg_nurb_s_diff() --
* srf - NURB surface
* dir - parametric direction of the split.
*/
struct face_g_snurb *
-rt_nurb_s_diff(const struct face_g_snurb *srf, int dir)
+nmg_nurb_s_diff(const struct face_g_snurb *srf, int dir)
{
struct face_g_snurb *nsrf;
int i;
@@ -80,7 +80,7 @@
i * RT_NURB_EXTRACT_COORDS(nsrf->pt_type)
*nsrf->s_size[1];
- rt_nurb_mesh_diff(srf->order[0],
+ nmg_nurb_mesh_diff(srf->order[0],
old_points, new_points, srf->u.knots,
RT_NURB_EXTRACT_COORDS(srf->pt_type),
RT_NURB_EXTRACT_COORDS(nsrf->pt_type),
@@ -108,7 +108,7 @@
new_points = nsrf->ctl_points +
i * RT_NURB_EXTRACT_COORDS(nsrf->pt_type);
- rt_nurb_mesh_diff(srf->order[1],
+ nmg_nurb_mesh_diff(srf->order[1],
old_points, new_points, srf->v.knots,
RT_NURB_EXTRACT_COORDS(srf->pt_type) *
srf->s_size[1],
@@ -130,7 +130,7 @@
/* Do the same thing for a curve. */
struct edge_g_cnurb *
-rt_nurb_c_diff(const struct edge_g_cnurb *crv)
+nmg_nurb_c_diff(const struct edge_g_cnurb *crv)
{
struct edge_g_cnurb *ncrv;
@@ -146,7 +146,7 @@
opts = (fastf_t *) crv->ctl_points;
npts = (fastf_t *) ncrv->ctl_points;
- rt_nurb_mesh_diff(crv->order, opts, npts, crv->k.knots,
+ nmg_nurb_mesh_diff(crv->order, opts, npts, crv->k.knots,
RT_NURB_EXTRACT_COORDS(crv->pt_type),
RT_NURB_EXTRACT_COORDS(ncrv->pt_type),
crv->c_size, crv->pt_type);
@@ -160,7 +160,7 @@
void
-rt_nurb_mesh_diff(int order, const fastf_t *o_pts, fastf_t *n_pts, const
fastf_t *knots, int o_stride, int n_stride, int o_size, int pt_type)
+nmg_nurb_mesh_diff(int order, const fastf_t *o_pts, fastf_t *n_pts, const
fastf_t *knots, int o_stride, int n_stride, int o_size, int pt_type)
{
int i, k;
int coords;
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_eval.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_eval.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_eval.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -72,7 +72,7 @@
c_ptr = diff_curve;
- k_index = rt_nurb_knot_index(&srf->u, u, srf->order[RT_NURB_SPLIT_ROW]);
+ k_index = nmg_nurb_knot_index(&srf->u, u, srf->order[RT_NURB_SPLIT_ROW]);
if (k_index < 0) {
bu_log("nmg_nurb_s_eval: u value outside parameter range\n");
bu_log("\tUV = (%g %g)\n", u, v);
@@ -93,7 +93,7 @@
*crv_ptr++ = *mesh_ptr++;
}
- rtr_pt = (fastf_t *) rt_nurb_eval_crv(curves,
srf->order[RT_NURB_SPLIT_ROW], u,
+ rtr_pt = (fastf_t *) nmg_nurb_eval_crv(curves,
srf->order[RT_NURB_SPLIT_ROW], u,
&srf->u, k_index, coords);
for (k = 0; k < coords; k++)
@@ -103,7 +103,7 @@
bu_free((char *)curves, "nmg_nurb_s_eval: curves");
- k_index = rt_nurb_knot_index(&srf->v, v, srf->order[RT_NURB_SPLIT_COL]);
+ k_index = nmg_nurb_knot_index(&srf->v, v, srf->order[RT_NURB_SPLIT_COL]);
if (k_index < 0) {
bu_log("nmg_nurb_s_eval: v value outside parameter range\n");
bu_log("\tUV = (%g %g)\n", u, v);
@@ -111,7 +111,7 @@
bu_bomb("nmg_nurb_s_eval: v value outside parameter range\n");
}
- ev_pt = (fastf_t *) rt_nurb_eval_crv(diff_curve,
srf->order[RT_NURB_SPLIT_COL],
+ ev_pt = (fastf_t *) nmg_nurb_eval_crv(diff_curve,
srf->order[RT_NURB_SPLIT_COL],
v, &srf->v, k_index, coords);
for (k = 0; k < coords; k++)
@@ -133,7 +133,7 @@
coords = RT_NURB_EXTRACT_COORDS(crv->pt_type);
- k_index = rt_nurb_knot_index(&crv->k, param, crv->order);
+ k_index = nmg_nurb_knot_index(&crv->k, param, crv->order);
if (k_index < 0) {
bu_log("nmg_nurb_c_eval: param value outside parameter range\n");
bu_log("\tparam = (%g)\n", param);
@@ -147,7 +147,7 @@
for (i = 0; i < coords * crv->c_size; i++)
pnts[i] = crv->ctl_points[i];
- ev_pt = (fastf_t *) rt_nurb_eval_crv(
+ ev_pt = (fastf_t *) nmg_nurb_eval_crv(
pnts, crv->order, param, &crv->k, k_index, coords);
for (i = 0; i < coords; i++)
@@ -158,7 +158,7 @@
fastf_t *
-rt_nurb_eval_crv(register fastf_t *crv, int order, fastf_t param, const struct
knot_vector *k_vec, int k_index, int coords)
+nmg_nurb_eval_crv(register fastf_t *crv, int order, fastf_t param, const
struct knot_vector *k_vec, int k_index, int coords)
{
int i, j;
@@ -186,13 +186,13 @@
}
j--;
}
- return rt_nurb_eval_crv(crv, order - 1, param, k_vec,
+ return nmg_nurb_eval_crv(crv, order - 1, param, k_vec,
k_index, coords);
}
void
-rt_nurb_pr_crv(fastf_t *crv, int c_size, int coords)
+nmg_nurb_pr_crv(fastf_t *crv, int c_size, int coords)
{
int i;
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_flat.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_flat.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_flat.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -41,7 +41,7 @@
int
-rt_nurb_s_flat(struct face_g_snurb *srf, fastf_t epsilon)
+nmg_nurb_s_flat(struct face_g_snurb *srf, fastf_t epsilon)
/* Epsilon value for flatness testing */
{
@@ -68,7 +68,7 @@
crv = (fastf_t *) bu_malloc(sizeof(fastf_t) *
RT_NURB_EXTRACT_COORDS(srf->pt_type) *
srf->s_size[1],
- "rt_nurb_s_flat: crv");
+ "nmg_nurb_s_flat: crv");
/* Test Row and RT_NURB_SPLIT_COL curves for flatness, If a curve
* is not flat than get distance to line
@@ -84,16 +84,16 @@
j++)
crv[j] = *mesh_ptr++;
- rdist = rt_nurb_crv_flat(crv, srf->s_size[1],
+ rdist = nmg_nurb_crv_flat(crv, srf->s_size[1],
srf->pt_type);
max_row_dist = FMAX(max_row_dist, rdist);
}
- bu_free((char *)crv, "rt_nurb_s_flat: crv");
+ bu_free((char *)crv, "nmg_nurb_s_flat: crv");
crv = (fastf_t *) bu_malloc(sizeof(fastf_t) *
RT_NURB_EXTRACT_COORDS(srf->pt_type) *
- srf->s_size[0], "rt_nurb_s_flat: crv");
+ srf->s_size[0], "nmg_nurb_s_flat: crv");
for (i = 0; i < (coords * srf->s_size[1]); i += coords) {
fastf_t rdist;
@@ -107,13 +107,13 @@
srf->ctl_points[mesh_elt + k];
}
- rdist = rt_nurb_crv_flat(crv,
+ rdist = nmg_nurb_crv_flat(crv,
srf->s_size[0], srf->pt_type);
max_col_dist = FMAX(max_col_dist, rdist);
}
- bu_free((char *)crv, "rt_nurb_s_flat: crv");
+ bu_free((char *)crv, "nmg_nurb_s_flat: crv");
max_dist = FMAX(max_row_dist, max_col_dist);
@@ -195,7 +195,7 @@
fastf_t
-rt_nurb_crv_flat(fastf_t *crv, int size, int pt_type)
+nmg_nurb_crv_flat(fastf_t *crv, int size, int pt_type)
{
point_t p1, p2;
vect_t ln;
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_interp.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_interp.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_interp.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -65,7 +65,7 @@
for (i = 0; i < dim; i++)
for (j = 0; j < dim; j++) {
- imat[ptr] = rt_nurb_basis_eval(knots, j, order, nodes[i]);
+ imat[ptr] = nmg_nurb_basis_eval(knots, j, order, nodes[i]);
ptr++;
}
@@ -77,7 +77,7 @@
* main routine for interpolation of curves
*/
void
-rt_nurb_cinterp(struct edge_g_cnurb *crv, int order, const fastf_t *data, int
n)
+nmg_nurb_cinterp(struct edge_g_cnurb *crv, int order, const fastf_t *data, int
n)
{
fastf_t * interp_mat;
fastf_t * nodes;
@@ -101,7 +101,7 @@
/* First set up Curve data structs */
/* For now we will assume that all parameterizations are uniform */
- rt_nurb_kvknot(&crv->k, order, 0.0, 1.0, (n - order), (struct resource
*)NULL);
+ nmg_nurb_kvknot(&crv->k, order, 0.0, 1.0, (n - order), (struct resource
*)NULL);
/* Calculate Nodes at which the data points will be evaluated in
* the curve
@@ -116,18 +116,18 @@
rt_nurb_interp_mat(interp_mat, &crv->k, nodes, order, n);
/* Solve the system of equations to get the control points Because
- * rt_nurb_solve needs to modify the data as it works, and it
+ * nmg_nurb_solve needs to modify the data as it works, and it
* wouldn't be polite to trash our caller's data, make a local
* copy. This creates the final ctl_points[] array.
*/
memcpy((char *)local_data, (char *)data, n * 3 * sizeof(fastf_t));
- rt_nurb_solve(interp_mat, local_data, crv->ctl_points, n, 3);
+ nmg_nurb_solve(interp_mat, local_data, crv->ctl_points, n, 3);
/* Free up node and interp_mat storage */
- bu_free((char *) interp_mat, "rt_nurb_cinterp: interp_mat");
- bu_free((char *) nodes, "rt_nurb_cinterp: nodes");
- bu_free((char *) local_data, "rt_nurb_cinterp() local_data[]");
+ bu_free((char *) interp_mat, "nmg_nurb_cinterp: interp_mat");
+ bu_free((char *) nodes, "nmg_nurb_cinterp: nodes");
+ bu_free((char *) local_data, "nmg_nurb_cinterp() local_data[]");
/* All done, The resulting crv now interpolates the data */
}
@@ -148,7 +148,7 @@
* independent variable being interpolated to make the surface.
*/
void
-rt_nurb_sinterp(struct face_g_snurb *srf, int order, const fastf_t *data, int
ymax, int xmax)
+nmg_nurb_sinterp(struct face_g_snurb *srf, int order, const fastf_t *data, int
ymax, int xmax)
/* data[x, y] */
@@ -174,30 +174,30 @@
* vector
*/
- rt_nurb_kvknot(&srf->u, order, 0.0, 1.0, ymax - order, (struct resource
*)NULL);
- rt_nurb_kvknot(&srf->v, order, 0.0, 1.0, xmax - order, (struct resource
*)NULL);
+ nmg_nurb_kvknot(&srf->u, order, 0.0, 1.0, ymax - order, (struct resource
*)NULL);
+ nmg_nurb_kvknot(&srf->v, order, 0.0, 1.0, xmax - order, (struct resource
*)NULL);
srf->ctl_points = (fastf_t *) bu_malloc(
sizeof(fastf_t) * xmax * ymax * 3,
- "rt_nurb_sinterp() surface ctl_points[]");
+ "nmg_nurb_sinterp() surface ctl_points[]");
cpt = &srf->ctl_points[0];
/* _col is X, _row is Y */
#define NVAL(_col, _row) data[((_row)*xmax+(_col))*3]
crv = (struct edge_g_cnurb *)bu_calloc(sizeof(struct edge_g_cnurb), ymax,
- "rt_nurb_sinterp() crv[]");
+ "nmg_nurb_sinterp() crv[]");
/* Interpolate the data across the rows, fitting a curve to each. */
for (y = 0; y < ymax; y++) {
crv[y].l.magic = NMG_EDGE_G_CNURB_MAGIC;
/* Build curve from from (0, y) to (xmax-1, y) */
- rt_nurb_cinterp(&crv[y], order, &NVAL(0, y), xmax);
+ nmg_nurb_cinterp(&crv[y], order, &NVAL(0, y), xmax);
}
#undef NVAL
tmp = (fastf_t *)bu_malloc(sizeof(fastf_t)*3 * ymax,
- "rt_nurb_sinterp() tmp[]");
+ "nmg_nurb_sinterp() tmp[]");
for (x = 0; x < xmax; x++) {
struct edge_g_cnurb ncrv;
@@ -208,16 +208,16 @@
/* Interpolate the curve interpolates, giving rows of a surface */
ncrv.l.magic = NMG_EDGE_G_CNURB_MAGIC;
- rt_nurb_cinterp(&ncrv, order, tmp, ymax);
+ nmg_nurb_cinterp(&ncrv, order, tmp, ymax);
/* Move new curve interpolations into snurb ctl_points[] */
for (y = 0; y < ymax*3; y++) {
*cpt++ = ncrv.ctl_points[y];
}
- rt_nurb_clean_cnurb(&ncrv);
+ nmg_nurb_clean_cnurb(&ncrv);
}
for (y = 0; y < ymax; y++) {
- rt_nurb_clean_cnurb(&crv[y]);
+ nmg_nurb_clean_cnurb(&crv[y]);
}
bu_free((char *)crv, "crv[]");
bu_free((char *)tmp, "tmp[]");
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_knot.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_knot.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_knot.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -37,14 +37,14 @@
/**
- * rt_nurb_kvknot()
+ * nmg_nurb_kvknot()
*
* Generate a open knot vector with n=order knots at the beginning of
* the sequence and n knots at the end of the sequence with a lower,
* and an upper value and num knots in between
*/
void
-rt_nurb_kvknot(register struct knot_vector *new_knots, int order, fastf_t
lower, fastf_t upper, int num, struct resource *res)
+nmg_nurb_kvknot(register struct knot_vector *new_knots, int order, fastf_t
lower, fastf_t upper, int num, struct resource *res)
{
register int i;
int total;
@@ -59,7 +59,7 @@
new_knots->k_size = total;
new_knots->knots = (fastf_t *) bu_malloc (sizeof(fastf_t) * total,
- "rt_nurb_kvknot: new knots
values");
+ "nmg_nurb_kvknot: new knots
values");
for (i = 0; i < order; i++)
new_knots->knots[i] = lower;
@@ -73,14 +73,14 @@
/**
- * rt_nurb_kvmult()
+ * nmg_nurb_kvmult()
*
* Construct a new knot vector which is the same as the passed in knot
* vector except it has multiplicity of num of val. It checks to see
* if val already is a multiple knot.
*/
void
-rt_nurb_kvmult(struct knot_vector *new_kv, const struct knot_vector *kv, int
num, register fastf_t val, struct resource *res)
+nmg_nurb_kvmult(struct knot_vector *new_kv, const struct knot_vector *kv, int
num, register fastf_t val, struct resource *res)
{
int n;
register int i;
@@ -88,18 +88,18 @@
if (res) RT_CK_RESOURCE(res);
- n = rt_nurb_kvcheck(val, kv);
+ n = nmg_nurb_kvcheck(val, kv);
check.k_size = num - n;
if (check.k_size <= 0) {
- bu_log("rt_nurb_kvmult(new_kv=%p, kv=%p, num=%d, val=%g)\n",
+ bu_log("nmg_nurb_kvmult(new_kv=%p, kv=%p, num=%d, val=%g)\n",
(void *)new_kv, (void *)kv, num, val);
- rt_nurb_pr_kv(kv);
- bu_bomb("rt_nurb_kvmult\n");
+ nmg_nurb_pr_kv(kv);
+ bu_bomb("nmg_nurb_kvmult\n");
}
check.knots = (fastf_t *) bu_malloc(sizeof(fastf_t) * check.k_size,
- "rt_nurb_kvmult: check knots");
+ "nmg_nurb_kvmult: check knots");
for (i = 0; i < num - n; i++)
check.knots[i] = val;
@@ -107,7 +107,7 @@
nmg_nurb_kvmerge(new_kv, &check, kv, res);
/* free up old knot values */
- bu_free((char *)check.knots, "rt_nurb_kvmult:check knots");
+ bu_free((char *)check.knots, "nmg_nurb_kvmult:check knots");
}
@@ -172,13 +172,13 @@
/**
- * rt_nurb_kvcheck()
+ * nmg_nurb_kvcheck()
*
* Checks to see if the knot (val) exists in the Knot Vector and
* returns its multiplicity.
*/
int
-rt_nurb_kvcheck(fastf_t val, register const struct knot_vector *kv)
+nmg_nurb_kvcheck(fastf_t val, register const struct knot_vector *kv)
{
register int kv_num = 0;
register int i;
@@ -193,13 +193,13 @@
/**
- * rt_nurb_kvextract()
+ * nmg_nurb_kvextract()
*
* Extract the portion of the knot vector from kv->knots[lower] to
* kv->knots[upper]
*/
void
-rt_nurb_kvextract(struct knot_vector *new_kv, register const struct
knot_vector *kv, int lower, int upper, struct resource *res)
+nmg_nurb_kvextract(struct knot_vector *new_kv, register const struct
knot_vector *kv, int lower, int upper, struct resource *res)
{
register int i;
register fastf_t *ptr;
@@ -219,12 +219,12 @@
/**
- * rt_nurb_kvcopy()
+ * nmg_nurb_kvcopy()
*
* Generic copy the knot vector and pass a new one in.
*/
void
-rt_nurb_kvcopy(struct knot_vector *new_kv, register const struct knot_vector
*old_kv, struct resource *res)
+nmg_nurb_kvcopy(struct knot_vector *new_kv, register const struct knot_vector
*old_kv, struct resource *res)
{
register int i;
@@ -241,14 +241,14 @@
/**
- * rt_nurb_kvnorm()
+ * nmg_nurb_kvnorm()
*
* Normalize the knot vector so its values are from zero to one.
*
* XXX Need to check to see if the lower value is zero
*/
void
-rt_nurb_kvnorm(register struct knot_vector *kv)
+nmg_nurb_kvnorm(register struct knot_vector *kv)
{
register fastf_t upper;
register int i;
@@ -272,7 +272,7 @@
* XXX It is hard to know what tolerance to use here for the comparisons.
*/
int
-rt_nurb_knot_index(const struct knot_vector *kv, fastf_t k_value, int order)
+nmg_nurb_knot_index(const struct knot_vector *kv, fastf_t k_value, int order)
{
int i;
fastf_t knt;
@@ -309,13 +309,13 @@
/**
- * rt_nurb_gen_knot_vector()
+ * nmg_nurb_gen_knot_vector()
*
* Generate a open knot vector with n=order knots at the beginning of
* the sequence and n knots at the end of the sequence.
*/
void
-rt_nurb_gen_knot_vector(register struct knot_vector *new_knots, int order,
fastf_t lower, fastf_t upper, struct resource *res)
+nmg_nurb_gen_knot_vector(register struct knot_vector *new_knots, int order,
fastf_t lower, fastf_t upper, struct resource *res)
{
register int i;
int total;
@@ -327,7 +327,7 @@
new_knots->k_size = total;
new_knots->knots = (fastf_t *) bu_malloc (sizeof(fastf_t) * total,
- "rt_nurb_gen_knot_vector: new
knots values");
+ "nmg_nurb_gen_knot_vector: new
knots values");
for (i = 0; i < order; i++)
new_knots->knots[i] = lower;
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_norm.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_norm.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_norm.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -126,7 +126,7 @@
nmg_nurb_s_eval(srf, p, v, ue);
- vsrf = (struct face_g_snurb *) rt_nurb_s_diff(srf, RT_NURB_SPLIT_COL);
+ vsrf = (struct face_g_snurb *) nmg_nurb_s_diff(srf, RT_NURB_SPLIT_COL);
nmg_nurb_s_eval(vsrf, u, v, ve);
@@ -180,7 +180,7 @@
nmg_nurb_s_eval(srf, u, p, ve);
- usrf = (struct face_g_snurb *) rt_nurb_s_diff(srf, RT_NURB_SPLIT_ROW);
+ usrf = (struct face_g_snurb *) nmg_nurb_s_diff(srf, RT_NURB_SPLIT_ROW);
nmg_nurb_s_eval(usrf, u, v, ue);
@@ -220,8 +220,8 @@
/* Case Non Rational (order > 2, order > 2) */
if (!RT_NURB_IS_PT_RATIONAL(srf->pt_type)) {
- usrf = (struct face_g_snurb *) rt_nurb_s_diff(srf, RT_NURB_SPLIT_ROW);
- vsrf = (struct face_g_snurb *) rt_nurb_s_diff(srf, RT_NURB_SPLIT_COL);
+ usrf = (struct face_g_snurb *) nmg_nurb_s_diff(srf, RT_NURB_SPLIT_ROW);
+ vsrf = (struct face_g_snurb *) nmg_nurb_s_diff(srf, RT_NURB_SPLIT_COL);
nmg_nurb_s_eval(usrf, u, v, ue);
nmg_nurb_s_eval(vsrf, u, v, ve);
@@ -242,8 +242,8 @@
nmg_nurb_s_eval(srf, u, v, se);
- usrf = (struct face_g_snurb *) rt_nurb_s_diff(srf, RT_NURB_SPLIT_ROW);
- vsrf = (struct face_g_snurb *) rt_nurb_s_diff(srf, RT_NURB_SPLIT_COL);
+ usrf = (struct face_g_snurb *) nmg_nurb_s_diff(srf, RT_NURB_SPLIT_ROW);
+ vsrf = (struct face_g_snurb *) nmg_nurb_s_diff(srf, RT_NURB_SPLIT_COL);
nmg_nurb_s_eval(usrf, u, v, ue);
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_plot.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_plot.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_plot.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -38,7 +38,7 @@
void
-rt_nurb_plot_snurb(FILE *fp, const struct face_g_snurb *srf)
+nmg_nurb_plot_snurb(FILE *fp, const struct face_g_snurb *srf)
{
int i, j;
const fastf_t * m_ptr = srf->ctl_points;
@@ -99,7 +99,7 @@
void
-rt_nurb_plot_cnurb(FILE *fp, const struct edge_g_cnurb *crv)
+nmg_nurb_plot_cnurb(FILE *fp, const struct edge_g_cnurb *crv)
{
register int i, k;
const fastf_t * m_ptr = crv->ctl_points;
@@ -141,9 +141,9 @@
}
-void rt_nurb_s_plot(const struct face_g_snurb *srf)
+void nmg_nurb_s_plot(const struct face_g_snurb *srf)
{
- rt_nurb_plot_snurb(stdout, srf);
+ nmg_nurb_plot_snurb(stdout, srf);
}
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_poly.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_poly.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_poly.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -43,13 +43,13 @@
* the diagonal from the first and third corner point making sure
* Homogeneous points are divided.
*/
-struct rt_nurb_poly *
-rt_nurb_to_poly(struct face_g_snurb *srf)
+struct nmg_nurb_poly *
+nmg_nurb_to_poly(struct face_g_snurb *srf)
{
int coords = srf->pt_type;
fastf_t * p1, *p2, *p3, *p4;
fastf_t uv1[2], uv2[2], uv3[2], uv4[2];
- struct rt_nurb_poly *p, *p_head;
+ struct nmg_nurb_poly *p, *p_head;
/* Extract the four corners from the mesh */
@@ -92,9 +92,9 @@
uv4[0] = srf->u.knots[0];
uv4[1] = srf->v.knots[srf->v.k_size -1];
- p = rt_nurb_mk_poly(p1, p2, p3, uv1, uv2, uv3);
+ p = nmg_nurb_mk_poly(p1, p2, p3, uv1, uv2, uv3);
p_head = p;
- p = rt_nurb_mk_poly(p3, p4, p1, uv3, uv4, uv1);
+ p = nmg_nurb_mk_poly(p3, p4, p1, uv3, uv4, uv1);
p->next = p_head;
p_head = p;
@@ -102,13 +102,13 @@
}
-struct rt_nurb_poly *
-rt_nurb_mk_poly(fastf_t *v1, fastf_t *v2, fastf_t *v3, fastf_t *uv1, fastf_t
*uv2, fastf_t *uv3)
+struct nmg_nurb_poly *
+nmg_nurb_mk_poly(fastf_t *v1, fastf_t *v2, fastf_t *v3, fastf_t *uv1, fastf_t
*uv2, fastf_t *uv3)
{
- struct rt_nurb_poly *p;
+ struct nmg_nurb_poly *p;
- BU_ALLOC(p, struct rt_nurb_poly);
- p->next = (struct rt_nurb_poly *) 0;
+ BU_ALLOC(p, struct nmg_nurb_poly);
+ p->next = (struct nmg_nurb_poly *) 0;
VMOVE(p->ply[0], v1);
VMOVE(p->ply[1], v2);
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_ray.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_ray.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_ray.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -39,7 +39,7 @@
void rt_nurb_pbound(struct face_g_snurb *srf, fastf_t *vmin, fastf_t *vmax);
struct face_g_snurb *
-rt_nurb_project_srf(const struct face_g_snurb *srf, fastf_t *plane1, fastf_t
*plane2, struct resource *res)
+nmg_nurb_project_srf(const struct face_g_snurb *srf, fastf_t *plane1, fastf_t
*plane2, struct resource *res)
{
register struct face_g_snurb *psrf;
@@ -49,7 +49,7 @@
int i;
if (RTG.NMG_debug & DEBUG_RT_ISECT)
- bu_log("rt_nurb_project_srf: projecting surface, planes = (%g %g %g %g)
(%g %g %g %g)\n",
+ bu_log("nmg_nurb_project_srf: projecting surface, planes = (%g %g %g
%g) (%g %g %g %g)\n",
V4ARGS(plane1), V4ARGS(plane2));
rational = RT_NURB_IS_PT_RATIONAL(srf->pt_type);
@@ -128,7 +128,7 @@
#endif
void
-rt_nurb_clip_srf(const struct face_g_snurb *srf, int dir, fastf_t *min,
fastf_t *max)
+nmg_nurb_clip_srf(const struct face_g_snurb *srf, int dir, fastf_t *min,
fastf_t *max)
{
struct internal_convex_hull ch[20]; /* max order is 10 */
register fastf_t * mp1;
@@ -281,7 +281,7 @@
struct face_g_snurb *
-rt_nurb_region_from_srf(const struct face_g_snurb *srf, int dir, fastf_t
param1, fastf_t param2, struct resource *res)
+nmg_nurb_region_from_srf(const struct face_g_snurb *srf, int dir, fastf_t
param1, fastf_t param2, struct resource *res)
{
register int i;
struct face_g_snurb *region;
@@ -343,7 +343,7 @@
/* project the surface to a 2 dimensional problem */
/* NOTE that this gives a single snurb back, NOT a list */
- psrf = rt_nurb_project_srf(srf, plane2, plane1, res);
+ psrf = nmg_nurb_project_srf(srf, plane2, plane1, res);
psrf->dir = 1;
BU_LIST_APPEND(plist, &psrf->l);
@@ -383,7 +383,7 @@
continue;
}
- rt_nurb_clip_srf(psrf, dir, &smin, &smax);
+ nmg_nurb_clip_srf(psrf, dir, &smin, &smax);
if ((smax - smin) > .8) {
struct nmg_nurb_uv_hit *hp;
@@ -392,7 +392,7 @@
/* New surfs will have same dir as arg, here */
if (RT_G_DEBUG & DEBUG_SPLINE)
bu_log("splitting this surface\n");
- rt_nurb_s_split(plist, psrf, dir, res);
+ nmg_nurb_s_split(plist, psrf, dir, res);
nmg_nurb_free_snurb(psrf, res);
hp = nmg_nurb_intersect(srf, plane1, plane2, uv_tol, res,
plist);
@@ -422,14 +422,14 @@
}
osrf = psrf;
- psrf = (struct face_g_snurb *) rt_nurb_region_from_srf(
+ psrf = (struct face_g_snurb *) nmg_nurb_region_from_srf(
osrf, dir, smin, smax, res);
psrf->dir = dir;
nmg_nurb_free_snurb(osrf, res);
if (RT_G_DEBUG & DEBUG_SPLINE) {
- bu_log("After call to rt_nurb_region_from_srf() (smin=%g,
smax=%g)\n", smin, smax);
+ bu_log("After call to nmg_nurb_region_from_srf() (smin=%g,
smax=%g)\n", smin, smax);
nmg_nurb_s_print("psrf", psrf);
}
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_refine.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_refine.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_refine.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -61,8 +61,8 @@
nurb_srf->order[0] = srf->order[0];
nurb_srf->order[1] = srf->order[1];
- rt_nurb_kvcopy(&nurb_srf->u, kv, res);
- rt_nurb_kvcopy(&nurb_srf->v, &srf->v, res);
+ nmg_nurb_kvcopy(&nurb_srf->u, kv, res);
+ nmg_nurb_kvcopy(&nurb_srf->v, &srf->v, res);
nurb_srf->s_size[0] = srf->s_size[0];
nurb_srf->s_size[1] = kv->k_size - srf->order[0];
@@ -75,7 +75,7 @@
"nmg_nurb_s_refine: row mesh control points");
oslo = (struct oslo_mat *)
- rt_nurb_calc_oslo (srf -> order[RT_NURB_SPLIT_ROW], &srf->u, kv,
res);
+ nmg_nurb_calc_oslo (srf -> order[RT_NURB_SPLIT_ROW], &srf->u, kv,
res);
for (i = 0; i < nurb_srf->s_size[0]; i++) {
fastf_t * old_mesh_ptr;
@@ -87,14 +87,14 @@
new_mesh_ptr = &nurb_srf->ctl_points[
i * nurb_srf->s_size[1] *
RT_NURB_EXTRACT_COORDS(nurb_srf->pt_type)];
- rt_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
+ nmg_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
RT_NURB_EXTRACT_COORDS(srf->pt_type),
RT_NURB_EXTRACT_COORDS(nurb_srf->pt_type),
0, kv->k_size - nurb_srf->order[0],
nurb_srf->pt_type);
}
- rt_nurb_free_oslo(oslo, res);
+ nmg_nurb_free_oslo(oslo, res);
} else {
/* Col (v) direction */
@@ -102,8 +102,8 @@
nurb_srf->order[0] = srf->order[0];
nurb_srf->order[1] = srf->order[1];
- rt_nurb_kvcopy(&nurb_srf->u, &srf->u, res);
- rt_nurb_kvcopy(&nurb_srf->v, kv, res);
+ nmg_nurb_kvcopy(&nurb_srf->u, &srf->u, res);
+ nmg_nurb_kvcopy(&nurb_srf->v, kv, res);
nurb_srf->s_size[0] = kv->k_size - srf->order[1];
nurb_srf->s_size[1] = srf->s_size[1];
@@ -117,7 +117,7 @@
"nmg_nurb_s_refine: row mesh control points");
oslo = (struct oslo_mat *)
- rt_nurb_calc_oslo (srf->order[RT_NURB_SPLIT_COL], &srf->v, kv, res);
+ nmg_nurb_calc_oslo (srf->order[RT_NURB_SPLIT_COL], &srf->v, kv,
res);
for (i = 0; i < nurb_srf->s_size[1]; i++) {
fastf_t * old_mesh_ptr;
@@ -127,7 +127,7 @@
i * RT_NURB_EXTRACT_COORDS(srf->pt_type)];
new_mesh_ptr = &nurb_srf->ctl_points[
i * RT_NURB_EXTRACT_COORDS(nurb_srf->pt_type)];
- rt_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
+ nmg_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
srf->s_size[1] *
RT_NURB_EXTRACT_COORDS(srf->pt_type),
nurb_srf->s_size[1] *
@@ -135,14 +135,14 @@
0, kv->k_size - nurb_srf->order[1],
nurb_srf->pt_type);
}
- rt_nurb_free_oslo(oslo, res);
+ nmg_nurb_free_oslo(oslo, res);
}
return nurb_srf;
}
struct edge_g_cnurb *
-rt_nurb_c_refine(const struct edge_g_cnurb *crv, struct knot_vector *kv)
+nmg_nurb_c_refine(const struct edge_g_cnurb *crv, struct knot_vector *kv)
{
struct oslo_mat * oslo;
struct edge_g_cnurb * new_crv;
@@ -156,10 +156,10 @@
crv->order, kv->k_size, kv->k_size - crv->order,
crv->pt_type);
- oslo = (struct oslo_mat *) rt_nurb_calc_oslo(
+ oslo = (struct oslo_mat *) nmg_nurb_calc_oslo(
crv->order, &crv->k, kv, (struct resource *)NULL);
- rt_nurb_map_oslo(oslo, crv->ctl_points,
+ nmg_nurb_map_oslo(oslo, crv->ctl_points,
new_crv->ctl_points,
coords, coords, 0,
kv->k_size - new_crv->order,
@@ -170,7 +170,7 @@
for (i = 0; i < kv->k_size; i++)
new_crv->k.knots[i] = kv->knots[i];
- rt_nurb_free_oslo(oslo, (struct resource *)NULL);
+ nmg_nurb_free_oslo(oslo, (struct resource *)NULL);
return new_crv;
}
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_solve.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_solve.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_solve.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -25,7 +25,7 @@
*
* These Procedures take a set of matrices of the form Ax = b and
* allows one to solve the system by various means. The
- * rt_nurb_doolittle routine takes the system and creates a lu
+ * nmg_nurb_doolittle routine takes the system and creates a lu
* decomposition using pivoting to get the system in a desired
* form. Forward and backward substitution are then used to solve the
* system. All work is done in place.
@@ -55,7 +55,7 @@
* The solution is written into the solution[] array.
*/
void
-rt_nurb_solve(fastf_t *mat_1, fastf_t *mat_2, fastf_t *solution, int dim, int
coords)
+nmg_nurb_solve(fastf_t *mat_1, fastf_t *mat_2, fastf_t *solution, int dim, int
coords)
/* A and b array of the system Ax= b*/
@@ -68,15 +68,15 @@
fastf_t * s;
y = (fastf_t *) bu_malloc(sizeof (fastf_t) * dim,
- "rt_nurb_solve: y");/* Create temp array */
+ "nmg_nurb_solve: y");/* Create temp array */
b = (fastf_t *) bu_malloc(sizeof (fastf_t) * dim,
- "rt_nurb_solve: b");/* Create temp array */
+ "nmg_nurb_solve: b");/* Create temp array */
s = (fastf_t *) bu_malloc(sizeof (fastf_t) * dim,
- "rt_nurb_solve: s");/* Create temp array */
+ "nmg_nurb_solve: s");/* Create temp array */
- rt_nurb_doolittle (mat_1, mat_2, dim, coords);/* Create LU decomposition */
+ nmg_nurb_doolittle (mat_1, mat_2, dim, coords);/* Create LU decomposition
*/
for (k =0; k < coords; k++) {
fastf_t * ptr;
@@ -89,10 +89,10 @@
}
/* Solve the system Ly =b */
- rt_nurb_forw_solve (mat_1, b, y, dim);
+ nmg_nurb_forw_solve (mat_1, b, y, dim);
/* Solve the system Ux = y */
- rt_nurb_back_solve (mat_1, y, s, dim);
+ nmg_nurb_back_solve (mat_1, y, s, dim);
ptr = solution + k;
@@ -102,9 +102,9 @@
}
}
- bu_free ((char *)y, "rt_nurb_solve: y"); /* Free up
storage */
- bu_free ((char *)b, "rt_nurb_solve: b"); /* Free up
storage */
- bu_free ((char *)s, "rt_nurb_solve: s"); /* Free up
storage */
+ bu_free ((char *)y, "nmg_nurb_solve: y"); /* Free up
storage */
+ bu_free ((char *)b, "nmg_nurb_solve: b"); /* Free up
storage */
+ bu_free ((char *)s, "nmg_nurb_solve: s"); /* Free up
storage */
}
@@ -113,7 +113,7 @@
* Modifies both mat_1 and mat_2 values.
*/
void
-rt_nurb_doolittle(fastf_t *mat_1, fastf_t *mat_2, int row, int coords)
+nmg_nurb_doolittle(fastf_t *mat_1, fastf_t *mat_2, int row, int coords)
{
register int i;
register int j;
@@ -129,11 +129,11 @@
int max_pivot;
d = (fastf_t *) bu_malloc(sizeof (fastf_t) * row,
- "rt_nurb_doolittle:d"); /* scale factor */
+ "nmg_nurb_doolittle:d"); /* scale factor */
s = (fastf_t *) bu_malloc(sizeof (fastf_t) * row * row,
- "rt_nurb_doolittle:s"); /* vector to check */
+ "nmg_nurb_doolittle:s"); /* vector to check */
ds = (fastf_t *) bu_malloc(sizeof (fastf_t) * row,
- "rt_nurb_doolittle:ds"); /* if rows need to be
swapped */
+ "nmg_nurb_doolittle:ds"); /* if rows need
to be swapped */
for (i = 0; i < row; i++) {
/* calculate the scaling factors */
@@ -196,14 +196,14 @@
}
}
- bu_free((char *)d, "rt_nurb_doolittle:d"); /* Free up the storage.
*/
- bu_free((char *)s, "rt_nurb_doolittle:s");
- bu_free((char *)ds, "rt_nurb_doolittle:ds");
+ bu_free((char *)d, "nmg_nurb_doolittle:d"); /* Free up the
storage. */
+ bu_free((char *)s, "nmg_nurb_doolittle:s");
+ bu_free((char *)ds, "nmg_nurb_doolittle:ds");
}
void
-rt_nurb_forw_solve(const fastf_t *lu, const fastf_t *b, fastf_t *y, int n)
/* spl_solve lower triangular matrix */
+nmg_nurb_forw_solve(const fastf_t *lu, const fastf_t *b, fastf_t *y, int n)
/* spl_solve lower triangular matrix */
{
@@ -220,7 +220,7 @@
void
-rt_nurb_back_solve(const fastf_t *lu, const fastf_t *y, fastf_t *x, int n)
/* spl_solve upper triangular matrix */
+nmg_nurb_back_solve(const fastf_t *lu, const fastf_t *y, fastf_t *x, int n)
/* spl_solve upper triangular matrix */
{
@@ -238,7 +238,7 @@
void
-rt_nurb_p_mat(const fastf_t *mat, int dim)
+nmg_nurb_p_mat(const fastf_t *mat, int dim)
{
int i;
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_split.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_split.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_split.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -53,7 +53,7 @@
* The original surface is undisturbed by this operation.
*/
void
-rt_nurb_s_split(struct bu_list *split_hd, const struct face_g_snurb *srf, int
dir, struct resource *res)
+nmg_nurb_s_split(struct bu_list *split_hd, const struct face_g_snurb *srf, int
dir, struct resource *res)
{
struct knot_vector new_kv;
fastf_t value;
@@ -79,17 +79,17 @@
k_index = srf->order[0];
}
- rt_nurb_kvmult(&new_kv, &srf->u, srf->order[0], value, res);
+ nmg_nurb_kvmult(&new_kv, &srf->u, srf->order[0], value, res);
oslo = (struct oslo_mat *)
- rt_nurb_calc_oslo(srf->order[RT_NURB_SPLIT_ROW], &srf->u, &new_kv,
res);
+ nmg_nurb_calc_oslo(srf->order[RT_NURB_SPLIT_ROW], &srf->u, &new_kv,
res);
GET_SNURB(srf1);
srf1->order[0] = srf->order[0];
srf1->order[1] = srf->order[1];
srf1->dir = RT_NURB_SPLIT_ROW;
- rt_nurb_kvextract(&srf1->u, &new_kv, 0, k_index + srf1->order[0], res);
- rt_nurb_kvcopy(&srf1->v, &srf->v, res);
+ nmg_nurb_kvextract(&srf1->u, &new_kv, 0, k_index + srf1->order[0], res);
+ nmg_nurb_kvcopy(&srf1->v, &srf->v, res);
srf1->pt_type = srf->pt_type;
srf1->s_size[0] = srf1->v.k_size -
@@ -101,14 +101,14 @@
bu_malloc(sizeof(fastf_t) * srf1->s_size[0] *
srf1->s_size[1] *
RT_NURB_EXTRACT_COORDS(srf1->pt_type),
- "rt_nurb_s_split: srf1 row mesh control points");
+ "nmg_nurb_s_split: srf1 row mesh control points");
GET_SNURB(srf2);
srf2->order[0] = srf->order[0];
srf2->order[1] = srf->order[1];
srf2->dir = RT_NURB_SPLIT_ROW;
- rt_nurb_kvextract(&srf2->u, &new_kv, k_index, new_kv.k_size, res);
- rt_nurb_kvcopy(&srf2->v, &srf->v, res);
+ nmg_nurb_kvextract(&srf2->u, &new_kv, k_index, new_kv.k_size, res);
+ nmg_nurb_kvcopy(&srf2->v, &srf->v, res);
srf2->pt_type = srf->pt_type;
srf2->s_size[0] = srf2->v.k_size -
@@ -120,7 +120,7 @@
bu_malloc(sizeof(fastf_t) * srf2->s_size[0] *
srf2->s_size[1] *
RT_NURB_EXTRACT_COORDS(srf2->pt_type),
- "rt_nurb_s_split: srf2 row mesh control points");
+ "nmg_nurb_s_split: srf2 row mesh control points");
for (i = 0; i < srf->s_size[0]; i++) {
fastf_t * old_mesh_ptr;
@@ -132,14 +132,14 @@
new_mesh_ptr = &srf1->ctl_points[
i * srf1->s_size[1] *
RT_NURB_EXTRACT_COORDS(srf1->pt_type)];
- rt_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
+ nmg_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
RT_NURB_EXTRACT_COORDS(srf->pt_type),
RT_NURB_EXTRACT_COORDS(srf1->pt_type),
0, k_index, srf1->pt_type);
new_mesh_ptr = &srf2->ctl_points[
i * srf2->s_size[1] *
RT_NURB_EXTRACT_COORDS(srf2->pt_type)];
- rt_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
+ nmg_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
RT_NURB_EXTRACT_COORDS(srf->pt_type),
RT_NURB_EXTRACT_COORDS(srf2->pt_type),
k_index, new_kv.k_size - srf2->order[0],
@@ -160,17 +160,17 @@
k_index = srf->order[1];
}
- rt_nurb_kvmult(&new_kv, &srf->v, srf->order[RT_NURB_SPLIT_COL], value,
res);
+ nmg_nurb_kvmult(&new_kv, &srf->v, srf->order[RT_NURB_SPLIT_COL], value,
res);
oslo = (struct oslo_mat *)
- rt_nurb_calc_oslo(srf->order[RT_NURB_SPLIT_COL], &srf->v, &new_kv,
res);
+ nmg_nurb_calc_oslo(srf->order[RT_NURB_SPLIT_COL], &srf->v, &new_kv,
res);
GET_SNURB(srf1);
srf1->order[0] = srf->order[0];
srf1->order[1] = srf->order[1];
srf1->dir = RT_NURB_SPLIT_COL;
- rt_nurb_kvextract(&srf1->v, &new_kv, 0, k_index +
srf1->order[RT_NURB_SPLIT_COL], res);
- rt_nurb_kvcopy(&srf1->u, &srf->u, res);
+ nmg_nurb_kvextract(&srf1->v, &new_kv, 0, k_index +
srf1->order[RT_NURB_SPLIT_COL], res);
+ nmg_nurb_kvcopy(&srf1->u, &srf->u, res);
srf1->pt_type = srf->pt_type;
srf1->s_size[0] = srf1->v.k_size -
@@ -182,14 +182,14 @@
bu_malloc(sizeof(fastf_t) * srf1->s_size[0] *
srf1->s_size[1] *
RT_NURB_EXTRACT_COORDS(srf1->pt_type),
- "rt_nurb_s_split: srf1 col mesh control points");
+ "nmg_nurb_s_split: srf1 col mesh control points");
GET_SNURB(srf2);
srf2->order[0] = srf->order[0];
srf2->order[1] = srf->order[1];
srf2->dir = RT_NURB_SPLIT_COL;
- rt_nurb_kvextract(&srf2->v, &new_kv, k_index, new_kv.k_size, res);
- rt_nurb_kvcopy(&srf2->u, &srf->u, res);
+ nmg_nurb_kvextract(&srf2->v, &new_kv, k_index, new_kv.k_size, res);
+ nmg_nurb_kvcopy(&srf2->u, &srf->u, res);
srf2->pt_type = srf->pt_type;
srf2->s_size[0] = srf2->v.k_size -
@@ -201,7 +201,7 @@
bu_malloc(sizeof(fastf_t) * srf2->s_size[0] *
srf2->s_size[1] *
RT_NURB_EXTRACT_COORDS(srf2->pt_type),
- "rt_nurb_s_split: srf2 col mesh control points");
+ "nmg_nurb_s_split: srf2 col mesh control points");
for (i = 0; i < srf->s_size[1]; i++) {
fastf_t * old_mesh_ptr;
@@ -211,7 +211,7 @@
i * RT_NURB_EXTRACT_COORDS(srf->pt_type)];
new_mesh_ptr = &srf1->ctl_points[
i * RT_NURB_EXTRACT_COORDS(srf1->pt_type)];
- rt_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
+ nmg_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
srf->s_size[1] *
RT_NURB_EXTRACT_COORDS(srf->pt_type),
srf1->s_size[1] *
@@ -219,7 +219,7 @@
0, k_index, srf1->pt_type);
new_mesh_ptr = &srf2->ctl_points[
i * RT_NURB_EXTRACT_COORDS(srf2->pt_type)];
- rt_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
+ nmg_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
srf->s_size[1] *
RT_NURB_EXTRACT_COORDS(srf->pt_type),
srf2->s_size[1] *
@@ -233,8 +233,8 @@
BU_LIST_APPEND(split_hd, &srf2->l);
BU_LIST_APPEND(split_hd, &srf1->l);
- rt_nurb_free_oslo(oslo, res);
- bu_free((char *)new_kv.knots, "rt_nurb_s_split: new kv knots");
+ nmg_nurb_free_oslo(oslo, res);
+ bu_free((char *)new_kv.knots, "nmg_nurb_s_split: new kv knots");
}
@@ -283,14 +283,14 @@
k_index = crv->order;
}
- rt_nurb_kvmult(&new_kv, &crv->k, crv->order, value, (struct resource
*)NULL);
+ nmg_nurb_kvmult(&new_kv, &crv->k, crv->order, value, (struct resource
*)NULL);
oslo = (struct oslo_mat *)
- rt_nurb_calc_oslo(crv->order, &crv->k, &new_kv, (struct resource
*)NULL);
+ nmg_nurb_calc_oslo(crv->order, &crv->k, &new_kv, (struct resource
*)NULL);
GET_CNURB(crv1);
crv1->order = crv->order;
- rt_nurb_kvextract(&crv1->k, &new_kv, 0, k_index + crv->order, (struct
resource *)NULL);
+ nmg_nurb_kvextract(&crv1->k, &new_kv, 0, k_index + crv->order, (struct
resource *)NULL);
crv1->pt_type = crv->pt_type;
crv1->c_size = crv1->k.k_size - crv1->order;
crv1->ctl_points = (fastf_t *)
@@ -300,22 +300,22 @@
GET_CNURB(crv2);
crv2->order = crv->order;
- rt_nurb_kvextract(&crv2->k, &new_kv, k_index, new_kv.k_size, (struct
resource *)NULL);
+ nmg_nurb_kvextract(&crv2->k, &new_kv, k_index, new_kv.k_size, (struct
resource *)NULL);
crv2->pt_type = crv->pt_type;
crv2->c_size = crv2->k.k_size - crv2->order;
crv2->ctl_points = (fastf_t *)
bu_malloc(sizeof(fastf_t) * crv2->c_size *
RT_NURB_EXTRACT_COORDS(crv2->pt_type),
- "rt_nurb_s_split: crv2 mesh control points");
+ "nmg_nurb_s_split: crv2 mesh control points");
- rt_nurb_map_oslo(oslo, crv->ctl_points, crv1->ctl_points,
+ nmg_nurb_map_oslo(oslo, crv->ctl_points, crv1->ctl_points,
coords, coords, 0, k_index, crv->pt_type);
- rt_nurb_map_oslo(oslo, crv->ctl_points, crv2->ctl_points,
+ nmg_nurb_map_oslo(oslo, crv->ctl_points, crv2->ctl_points,
coords, coords, k_index, new_kv.k_size - crv2->order,
crv2->pt_type);
- rt_nurb_free_oslo(oslo, (struct resource *)NULL);
+ nmg_nurb_free_oslo(oslo, (struct resource *)NULL);
bu_free((char *) new_kv.knots, "nmg_nurb_c_split; new_kv.knots");
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_tess.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_tess.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_tess.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -45,7 +45,7 @@
* and Arnaud Richard.
*
* There is a slight deviation from the paper; since libnurb
- * (rt_nurb_s_diff) differentiation correctly handles rational
+ * (nmg_nurb_s_diff) differentiation correctly handles rational
* surfaces, no special processing for rational is needed.
*
* The idea is to compute the longest edge size in parametric space
@@ -64,11 +64,11 @@
fastf_t *pt;
- us = rt_nurb_s_diff(srf, RT_NURB_SPLIT_ROW);
- vs = rt_nurb_s_diff(srf, RT_NURB_SPLIT_COL);
- uus = rt_nurb_s_diff(us, RT_NURB_SPLIT_ROW);
- vvs = rt_nurb_s_diff(vs, RT_NURB_SPLIT_COL);
- uvs = rt_nurb_s_diff(vs, RT_NURB_SPLIT_ROW);
+ us = nmg_nurb_s_diff(srf, RT_NURB_SPLIT_ROW);
+ vs = nmg_nurb_s_diff(srf, RT_NURB_SPLIT_COL);
+ uus = nmg_nurb_s_diff(us, RT_NURB_SPLIT_ROW);
+ vvs = nmg_nurb_s_diff(vs, RT_NURB_SPLIT_COL);
+ uvs = nmg_nurb_s_diff(vs, RT_NURB_SPLIT_ROW);
d1 = 0.0;
d2 = 0.0;
@@ -176,8 +176,8 @@
final_t = MAX_FASTF;
num_coord_factor = sqrt((double)num_coords);
- d1 = rt_nurb_c_diff(crv);
- d2 = rt_nurb_c_diff(d1);
+ d1 = nmg_nurb_c_diff(crv);
+ d2 = nmg_nurb_c_diff(d1);
pt = d2->ctl_points;
for (i=0; i<d2->c_size; i++) {
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_trim.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_trim.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_trim.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -480,8 +480,8 @@
crv->k.knots[crv->k.k_size -1] * umax;
/* subdivide the curve */
- c1 = (struct edge_g_cnurb *) rt_nurb_c_xsplit(crv, m1);
- c2 = rt_nurb_c_xsplit((struct edge_g_cnurb *) c1->l.forw, m2);
+ c1 = (struct edge_g_cnurb *) nmg_nurb_c_xsplit(crv, m1);
+ c2 = nmg_nurb_c_xsplit((struct edge_g_cnurb *) c1->l.forw, m2);
tmp = (struct edge_g_cnurb *) c1->l.forw;
BU_LIST_DEQUEUE(&tmp->l);
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_util.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_util.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_util.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -149,7 +149,7 @@
* use automatic variables to hold one.
*/
void
-rt_nurb_clean_cnurb(struct edge_g_cnurb *crv)
+nmg_nurb_clean_cnurb(struct edge_g_cnurb *crv)
{
NMG_CK_CNURB(crv);
bu_free((char*)crv->k.knots, "nmg_nurb_free_cnurb: knots");
@@ -193,7 +193,7 @@
bu_log("\n\t}\n");
bu_log("\t");
- rt_nurb_print_pt_type(crv->pt_type);
+ nmg_nurb_print_pt_type(crv->pt_type);
bu_log("\tmesh = {\n");
for (ptr = &crv->ctl_points[0], i= 0;
i < crv->c_size; i++, ptr += RT_NURB_EXTRACT_COORDS(crv->pt_type))
@@ -220,19 +220,19 @@
bu_log("u knot vector \n");
- rt_nurb_pr_kv(&srf->u);
+ nmg_nurb_pr_kv(&srf->u);
bu_log("v knot vector \n");
- rt_nurb_pr_kv(&srf->v);
+ nmg_nurb_pr_kv(&srf->v);
- rt_nurb_pr_mesh(srf);
+ nmg_nurb_pr_mesh(srf);
}
void
-rt_nurb_pr_kv(const struct knot_vector *kv)
+nmg_nurb_pr_kv(const struct knot_vector *kv)
{
register fastf_t * ptr = kv->knots;
int i;
@@ -248,7 +248,7 @@
void
-rt_nurb_pr_mesh(const struct face_g_snurb *m)
+nmg_nurb_pr_mesh(const struct face_g_snurb *m)
{
int i, j, k;
fastf_t * m_ptr = m->ctl_points;
@@ -274,7 +274,7 @@
void
-rt_nurb_print_pt_type(int c)
+nmg_nurb_print_pt_type(int c)
{
int rat;
Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_xsplit.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_xsplit.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_xsplit.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -45,12 +45,12 @@
* vector and insert a multiple knot of parametric direction surface
* order. This is somewhat different than rt_nurb_split in that the
* surface is give a parametric value at which to split the surface.
- * rt_nurb_kvmult does the right thing in inserting a multiple knot
+ * nmg_nurb_kvmult does the right thing in inserting a multiple knot
* with the correct amount. Separate the surface and return the two
* resulting surface.
*/
struct face_g_snurb *
-rt_nurb_s_xsplit(struct face_g_snurb *srf, fastf_t param, int dir)
+nmg_nurb_s_xsplit(struct face_g_snurb *srf, fastf_t param, int dir)
{
struct knot_vector new_kv;
struct oslo_mat * oslo;
@@ -61,19 +61,19 @@
NMG_CK_SNURB(srf);
if (dir == RT_NURB_SPLIT_ROW) {
- rt_nurb_kvmult(&new_kv, &srf->u, srf->order[0], param, (struct resource
*)NULL);
+ nmg_nurb_kvmult(&new_kv, &srf->u, srf->order[0], param, (struct
resource *)NULL);
k_index = srf->order[0];
oslo = (struct oslo_mat *)
- rt_nurb_calc_oslo(srf->order[RT_NURB_SPLIT_ROW], &srf->u, &new_kv,
(struct resource *)NULL);
+ nmg_nurb_calc_oslo(srf->order[RT_NURB_SPLIT_ROW], &srf->u, &new_kv,
(struct resource *)NULL);
GET_SNURB(srf1);
srf1->order[0] = srf->order[0];
srf1->order[1] = srf->order[1];
srf1->dir = RT_NURB_SPLIT_ROW;
- rt_nurb_kvextract(&srf1->u, &new_kv, 0, k_index + srf1->order[0],
(struct resource *)NULL);
- rt_nurb_kvcopy(&srf1->v, &srf->v, (struct resource *)NULL);
+ nmg_nurb_kvextract(&srf1->u, &new_kv, 0, k_index + srf1->order[0],
(struct resource *)NULL);
+ nmg_nurb_kvcopy(&srf1->v, &srf->v, (struct resource *)NULL);
srf1->pt_type = srf->pt_type;
srf1->s_size[0] = srf1->v.k_size -
@@ -85,14 +85,14 @@
bu_malloc(sizeof(fastf_t) * srf1->s_size[0] *
srf1->s_size[1] *
RT_NURB_EXTRACT_COORDS(srf1->pt_type),
- "rt_nurb_s_xsplit: srf1 row mesh control points");
+ "nmg_nurb_s_xsplit: srf1 row mesh control points");
GET_SNURB(srf2);
srf2->order[0] = srf->order[0];
srf2->order[1] = srf->order[1];
srf2->dir = RT_NURB_SPLIT_ROW;
- rt_nurb_kvextract(&srf2->u, &new_kv, k_index, new_kv.k_size, (struct
resource *)NULL);
- rt_nurb_kvcopy(&srf2->v, &srf->v, (struct resource *)NULL);
+ nmg_nurb_kvextract(&srf2->u, &new_kv, k_index, new_kv.k_size, (struct
resource *)NULL);
+ nmg_nurb_kvcopy(&srf2->v, &srf->v, (struct resource *)NULL);
srf2->pt_type = srf->pt_type;
srf2->s_size[0] = srf2->v.k_size -
@@ -104,7 +104,7 @@
bu_malloc(sizeof(fastf_t) * srf2->s_size[0] *
srf2->s_size[1] *
RT_NURB_EXTRACT_COORDS(srf2->pt_type),
- "rt_nurb_s_xsplit: srf2 row mesh control points");
+ "nmg_nurb_s_xsplit: srf2 row mesh control points");
for (i = 0; i < srf->s_size[0]; i++) {
fastf_t * old_mesh_ptr;
@@ -116,33 +116,33 @@
new_mesh_ptr = &srf1->ctl_points[
i * srf1->s_size[1] *
RT_NURB_EXTRACT_COORDS(srf1->pt_type)];
- rt_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
+ nmg_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
RT_NURB_EXTRACT_COORDS(srf->pt_type),
RT_NURB_EXTRACT_COORDS(srf1->pt_type),
0, k_index, srf1->pt_type);
new_mesh_ptr = &srf2->ctl_points[
i * srf2->s_size[1] *
RT_NURB_EXTRACT_COORDS(srf2->pt_type)];
- rt_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
+ nmg_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
RT_NURB_EXTRACT_COORDS(srf->pt_type),
RT_NURB_EXTRACT_COORDS(srf2->pt_type),
k_index, new_kv.k_size - srf2->order[0],
srf2->pt_type);
}
} else {
- rt_nurb_kvmult(&new_kv, &srf->v, srf->order[RT_NURB_SPLIT_COL], param,
(struct resource *)NULL);
+ nmg_nurb_kvmult(&new_kv, &srf->v, srf->order[RT_NURB_SPLIT_COL], param,
(struct resource *)NULL);
k_index = srf->order[1];
oslo = (struct oslo_mat *)
- rt_nurb_calc_oslo(srf->order[RT_NURB_SPLIT_COL], &srf->v, &new_kv,
(struct resource *)NULL);
+ nmg_nurb_calc_oslo(srf->order[RT_NURB_SPLIT_COL], &srf->v, &new_kv,
(struct resource *)NULL);
GET_SNURB(srf1);
srf1->order[0] = srf->order[0];
srf1->order[1] = srf->order[1];
srf1->dir = RT_NURB_SPLIT_COL;
- rt_nurb_kvextract(&srf1->v, &new_kv, 0, k_index +
srf1->order[RT_NURB_SPLIT_COL], (struct resource *)NULL);
- rt_nurb_kvcopy(&srf1->u, &srf->u, (struct resource *)NULL);
+ nmg_nurb_kvextract(&srf1->v, &new_kv, 0, k_index +
srf1->order[RT_NURB_SPLIT_COL], (struct resource *)NULL);
+ nmg_nurb_kvcopy(&srf1->u, &srf->u, (struct resource *)NULL);
srf1->pt_type = srf->pt_type;
srf1->s_size[0] = srf1->v.k_size -
@@ -160,8 +160,8 @@
srf2->order[0] = srf->order[0];
srf2->order[1] = srf->order[1];
srf2->dir = RT_NURB_SPLIT_COL;
- rt_nurb_kvextract(&srf2->v, &new_kv, k_index, new_kv.k_size, (struct
resource *)NULL);
- rt_nurb_kvcopy(&srf2->u, &srf->u, (struct resource *)NULL);
+ nmg_nurb_kvextract(&srf2->v, &new_kv, k_index, new_kv.k_size, (struct
resource *)NULL);
+ nmg_nurb_kvcopy(&srf2->u, &srf->u, (struct resource *)NULL);
srf2->pt_type = srf->pt_type;
srf2->s_size[0] = srf2->v.k_size -
@@ -173,7 +173,7 @@
bu_malloc(sizeof(fastf_t) * srf2->s_size[0] *
srf2->s_size[1] *
RT_NURB_EXTRACT_COORDS(srf2->pt_type),
- "rt_nurb_s_xsplit: srf2 row mesh control points");
+ "nmg_nurb_s_xsplit: srf2 row mesh control points");
for (i = 0; i < srf->s_size[1]; i++) {
fastf_t * old_mesh_ptr;
@@ -183,7 +183,7 @@
i * RT_NURB_EXTRACT_COORDS(srf->pt_type)];
new_mesh_ptr = &srf1->ctl_points[
i * RT_NURB_EXTRACT_COORDS(srf1->pt_type)];
- rt_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
+ nmg_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
srf->s_size[1] *
RT_NURB_EXTRACT_COORDS(srf->pt_type),
srf1->s_size[1] *
@@ -191,7 +191,7 @@
0, k_index, srf1->pt_type);
new_mesh_ptr = &srf2->ctl_points[
i * RT_NURB_EXTRACT_COORDS(srf2->pt_type)];
- rt_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
+ nmg_nurb_map_oslo(oslo, old_mesh_ptr, new_mesh_ptr,
srf->s_size[1] *
RT_NURB_EXTRACT_COORDS(srf->pt_type),
srf2->s_size[1] *
@@ -203,16 +203,16 @@
BU_LIST_APPEND(&srf1->l, &srf2->l);
- bu_free((char *) new_kv.knots, "rt_nurb_s_xsplit: new_kv.knots");
+ bu_free((char *) new_kv.knots, "nmg_nurb_s_xsplit: new_kv.knots");
- rt_nurb_free_oslo(oslo, (struct resource *)NULL);
+ nmg_nurb_free_oslo(oslo, (struct resource *)NULL);
return srf1;
}
/**
- * rt_nurb_c_xsplit()
+ * nmg_nurb_c_xsplit()
*
* Split a NURB curve by inserting a multiple knot and return the
* result of the two curves.
@@ -223,7 +223,7 @@
* the knot value for which the curve will be split.
*/
struct edge_g_cnurb *
-rt_nurb_c_xsplit(struct edge_g_cnurb *crv, fastf_t param)
+nmg_nurb_c_xsplit(struct edge_g_cnurb *crv, fastf_t param)
{
struct knot_vector new_kv;
struct oslo_mat * oslo;
@@ -236,41 +236,41 @@
coords = RT_NURB_EXTRACT_COORDS(crv->pt_type);
k_index = crv->order;
- rt_nurb_kvmult(&new_kv, &crv->k, crv->order, param, (struct resource
*)NULL);
+ nmg_nurb_kvmult(&new_kv, &crv->k, crv->order, param, (struct resource
*)NULL);
oslo = (struct oslo_mat *)
- rt_nurb_calc_oslo(crv->order, &crv->k, &new_kv, (struct resource
*)NULL);
+ nmg_nurb_calc_oslo(crv->order, &crv->k, &new_kv, (struct resource
*)NULL);
GET_CNURB(crv1);
crv1->order = crv->order;
- rt_nurb_kvextract(&crv1->k, &new_kv, 0, k_index + crv->order, (struct
resource *)NULL);
+ nmg_nurb_kvextract(&crv1->k, &new_kv, 0, k_index + crv->order, (struct
resource *)NULL);
crv1->pt_type = crv->pt_type;
crv1->c_size = crv1->k.k_size - crv1->order;
crv1->ctl_points = (fastf_t *)
bu_malloc(sizeof(fastf_t) * crv1->c_size *
RT_NURB_EXTRACT_COORDS(crv1->pt_type),
- "rt_nurb_c_xsplit: crv1 control points");
+ "nmg_nurb_c_xsplit: crv1 control points");
GET_CNURB(crv2);
crv2->order = crv->order;
- rt_nurb_kvextract(&crv2->k, &new_kv, k_index, new_kv.k_size, (struct
resource *)NULL);
+ nmg_nurb_kvextract(&crv2->k, &new_kv, k_index, new_kv.k_size, (struct
resource *)NULL);
crv2->pt_type = crv->pt_type;
crv2->c_size = crv2->k.k_size - crv2->order;
crv2->ctl_points = (fastf_t *)
bu_malloc(sizeof(fastf_t) * crv2->c_size *
RT_NURB_EXTRACT_COORDS(crv2->pt_type),
- "rt_nurb_c_xsplit: crv2 row mesh control points");
+ "nmg_nurb_c_xsplit: crv2 row mesh control points");
- rt_nurb_map_oslo(oslo, crv->ctl_points, crv1->ctl_points,
+ nmg_nurb_map_oslo(oslo, crv->ctl_points, crv1->ctl_points,
coords, coords, 0, k_index, crv->pt_type);
- rt_nurb_map_oslo(oslo, crv->ctl_points, crv2->ctl_points,
+ nmg_nurb_map_oslo(oslo, crv->ctl_points, crv2->ctl_points,
coords, coords, k_index, new_kv.k_size - crv2->order,
crv2->pt_type);
- rt_nurb_free_oslo(oslo, (struct resource *)NULL);
+ nmg_nurb_free_oslo(oslo, (struct resource *)NULL);
- bu_free((char *) new_kv.knots, "rt_nurb_c_xsplit: new_kv.knots");
+ bu_free((char *) new_kv.knots, "nmg_nurb_c_xsplit: new_kv.knots");
BU_LIST_APPEND(&crv1->l, &crv2->l);
return crv1;
Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_mk.c
===================================================================
--- brlcad/trunk/src/librt/primitives/nmg/nmg_mk.c 2016-10-11 21:04:01 UTC
(rev 69027)
+++ brlcad/trunk/src/librt/primitives/nmg/nmg_mk.c 2016-10-11 23:07:50 UTC
(rev 69028)
@@ -1933,7 +1933,7 @@
eg->k.knots = kv;
} else {
/* Give a default curve, no interior knots */
- rt_nurb_kvknot(&eg->k, order, 0.0, 1.0, n_knots - (2 * order), (struct
resource *)NULL);
+ nmg_nurb_kvknot(&eg->k, order, 0.0, 1.0, n_knots - (2 * order), (struct
resource *)NULL);
}
if (n_pts < 2) bu_bomb("nmg_edge_g_cnurb() n_pts < 2\n");
@@ -2455,7 +2455,7 @@
*/
if (*fu->f_p->g.magic_p == NMG_FACE_G_SNURB_MAGIC) {
- rt_nurb_s_bound(fu->f_p->g.snurb_p, fu->f_p->g.snurb_p->min_pt,
+ nmg_nurb_s_bound(fu->f_p->g.snurb_p, fu->f_p->g.snurb_p->min_pt,
fu->f_p->g.snurb_p->max_pt);
VMIN(f->min_pt, fu->f_p->g.snurb_p->min_pt);
VMAX(f->max_pt, fu->f_p->g.snurb_p->max_pt);
Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_plot.c
===================================================================
--- brlcad/trunk/src/librt/primitives/nmg/nmg_plot.c 2016-10-11 21:04:01 UTC
(rev 69027)
+++ brlcad/trunk/src/librt/primitives/nmg/nmg_plot.c 2016-10-11 23:07:50 UTC
(rev 69028)
@@ -2289,7 +2289,7 @@
n.order = 2;
n.l.magic = NMG_EDGE_G_CNURB_MAGIC;
n.c_size = 2;
- rt_nurb_gen_knot_vector(&n.k, n.order, 0.0, 1.0, (struct resource
*)NULL);
+ nmg_nurb_gen_knot_vector(&n.k, n.order, 0.0, 1.0, (struct resource
*)NULL);
n.pt_type = RT_NURB_MAKE_PT_TYPE(2, RT_NURB_PT_UV, RT_NURB_PT_NONRAT);
n.ctl_points = (fastf_t *)bu_malloc(
sizeof(fastf_t) * RT_NURB_EXTRACT_COORDS(n.pt_type) *
@@ -2330,7 +2330,7 @@
if (coords != 2 && !RT_NURB_IS_PT_RATIONAL(c->pt_type))
bu_log("nmg_cnurb_to_vlist() coords=%d\n", coords);
s = fu->f_p->g.snurb_p;
- /* This section uses nmg_nurb_c_eval(), but rt_nurb_c_refine is likely
faster.
+ /* This section uses nmg_nurb_c_eval(), but nmg_nurb_c_refine is likely
faster.
* XXXX Need a way to selectively and recursively refine curve to avoid
* feeding nmg_nurb_s_eval() parameters outside domain of surface.
*/
Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_rt_isect.c
===================================================================
--- brlcad/trunk/src/librt/primitives/nmg/nmg_rt_isect.c 2016-10-11
21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/librt/primitives/nmg/nmg_rt_isect.c 2016-10-11
23:07:50 UTC (rev 69028)
@@ -1905,7 +1905,7 @@
if (RTG.NMG_debug & DEBUG_RT_ISECT)
bu_log("isect_ray_snurb_face: using planes (%g %g %g %g) (%g %g
%g %g)\n",
V4ARGS(pl1), V4ARGS(pl2));
- (void)rt_nurb_s_bound(srf, srf_min, srf_max);
+ (void)nmg_nurb_s_bound(srf, srf_min, srf_max);
if (!rt_in_rpp(rd->rp, rd->rd_invdir, srf_min, srf_max)) {
nmg_nurb_free_snurb(srf, rd->ap->a_resource);
continue;
Modified: brlcad/trunk/src/proc-db/spltest.c
===================================================================
--- brlcad/trunk/src/proc-db/spltest.c 2016-10-11 21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/proc-db/spltest.c 2016-10-11 23:07:50 UTC (rev 69028)
@@ -76,7 +76,7 @@
srf->u.knots[ki] = srf->v.knots[ki] = cur_kv;
}
- rt_nurb_pr_kv(&srf->u);
+ nmg_nurb_pr_kv(&srf->u);
/*
* The control mesh is stored in row-major order.
Modified: brlcad/trunk/src/proc-db/tea.c
===================================================================
--- brlcad/trunk/src/proc-db/tea.c 2016-10-11 21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/proc-db/tea.c 2016-10-11 23:07:50 UTC (rev 69028)
@@ -68,10 +68,10 @@
*/
bu_free((char *)b_patch->u.knots, "dumping u knots I'm about to realloc");
- rt_nurb_kvknot(&b_patch->u, 4, 0.0, 1.0, 0, &rt_uniresource);
+ nmg_nurb_kvknot(&b_patch->u, 4, 0.0, 1.0, 0, &rt_uniresource);
bu_free((char *)b_patch->v.knots, "dumping v_kv knots I'm about to
realloc");
- rt_nurb_kvknot(&b_patch->v, 4, 0.0, 1.0, 0, &rt_uniresource);
+ nmg_nurb_kvknot(&b_patch->v, 4, 0.0, 1.0, 0, &rt_uniresource);
/* Copy the control points */
Modified: brlcad/trunk/src/proc-db/wavy.c
===================================================================
--- brlcad/trunk/src/proc-db/wavy.c 2016-10-11 21:04:01 UTC (rev 69027)
+++ brlcad/trunk/src/proc-db/wavy.c 2016-10-11 23:07:50 UTC (rev 69028)
@@ -46,9 +46,9 @@
BU_ALLOC(srf, struct face_g_snurb);
- rt_nurb_sinterp(srf, 4, grid, 10, 10);
- rt_nurb_kvnorm(&srf->u);
- rt_nurb_kvnorm(&srf->v);
+ nmg_nurb_sinterp(srf, 4, grid, 10, 10);
+ nmg_nurb_kvnorm(&srf->u);
+ nmg_nurb_kvnorm(&srf->v);
surfs = (struct face_g_snurb **)bu_calloc(2, sizeof(struct face_g_snurb
*), "surfaces");
surfs[0] = srf;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits