Revision: 69073
          http://sourceforge.net/p/brlcad/code/69073
Author:   starseeker
Date:     2016-10-15 20:24:06 +0000 (Sat, 15 Oct 2016)
Log Message:
-----------
bspline routine needs a concept of curvature.

Modified Paths:
--------------
    brlcad/trunk/include/rt/nurb.h
    brlcad/trunk/src/librt/primitives/bspline/bspline.cpp
    brlcad/trunk/src/librt/primitives/bspline/nurb_c2.c

Modified: brlcad/trunk/include/rt/nurb.h
===================================================================
--- brlcad/trunk/include/rt/nurb.h      2016-10-15 20:18:14 UTC (rev 69072)
+++ brlcad/trunk/include/rt/nurb.h      2016-10-15 20:24:06 UTC (rev 69073)
@@ -37,7 +37,6 @@
 #include "bu/list.h"
 #include "bn/plane.h"
 #include "rt/defines.h"
-#include "rt/hit.h"
 
 /* Define parametric directions for splitting. */
 
@@ -128,6 +127,13 @@
 
 __BEGIN_DECLS
 
+/* TODO - this is another one of those data concepts common to librt and 
libnmg */
+struct nmg_curvature {
+    vect_t      crv_pdir;       /**< @brief Principle direction */
+    fastf_t     crv_c1;         /**< @brief curvature in principle dir */
+    fastf_t     crv_c2;         /**< @brief curvature in other direction */
+};
+
 /* nurb_basis.c */
 RT_EXPORT extern fastf_t nmg_nurb_basis_eval(struct knot_vector *knts, int 
interval,
                                                 int order, fastf_t mu);
@@ -194,7 +200,7 @@
 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 nmg_nurb_curvature(struct curvature *cvp,
+RT_EXPORT extern void nmg_nurb_curvature(struct nmg_curvature *cvp,
                                             const struct face_g_snurb *srf, 
fastf_t u, fastf_t v);
 
 /* nurb_plot.c */

Modified: brlcad/trunk/src/librt/primitives/bspline/bspline.cpp
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/bspline.cpp       2016-10-15 
20:18:14 UTC (rev 69072)
+++ brlcad/trunk/src/librt/primitives/bspline/bspline.cpp       2016-10-15 
20:24:06 UTC (rev 69073)
@@ -525,7 +525,7 @@
     u = hitp->hit_vpriv[0];
     v = hitp->hit_vpriv[1];
 
-    nmg_nurb_curvature(cvp, srf, u, v);
+    nmg_nurb_curvature((struct nmg_curvature *)cvp, srf, u, v);
 #endif /* CONVERT_TO_BREP */
 }
 

Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_c2.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/nurb_c2.c 2016-10-15 20:18:14 UTC 
(rev 69072)
+++ brlcad/trunk/src/librt/primitives/bspline/nurb_c2.c 2016-10-15 20:24:06 UTC 
(rev 69073)
@@ -39,7 +39,7 @@
 
 
 void
-nmg_nurb_curvature(struct curvature *cvp, const struct face_g_snurb *srf, 
fastf_t u, fastf_t v)
+nmg_nurb_curvature(struct nmg_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];

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
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to