[brlcad-commits] SF.net SVN: brlcad:[36127] brlcad/trunk/src/librt/primitives/bspline/ nurb_brep.cp
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2009-10-01 04:56:56
|
Revision: 36127 http://brlcad.svn.sourceforge.net/brlcad/?rev=36127&view=rev Author: brlcad Date: 2009-10-01 04:56:48 +0000 (Thu, 01 Oct 2009) Log Message: ----------- kill the initial bounding volume code now that things seem to be working. Modified Paths: -------------- brlcad/trunk/src/librt/primitives/bspline/nurb_brep.cpp Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_brep.cpp 2009-10-01 04:55:40 UTC (rev 36126) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_brep.cpp 2009-10-01 04:56:48 UTC (rev 36127) @@ -43,26 +43,6 @@ nip = (struct rt_nurb_internal *)ip->idb_ptr; RT_NURB_CK_MAGIC(nip); -#if 0 - for (i = 0; i < nip->nsrf; i++) { - point_t min_bound, max_bound; - NMG_CK_SNURB(nip->srfs[i]); - rt_nurb_s_bound(nip->srfs[i], min_bound, max_bound); - - VMINMAX(min_pt, max_pt, min_bound); - VMINMAX(min_pt, max_pt, max_bound); - } - - VADD2SCALE(center, max_pt, min_pt, 0.5); - - /* create a bounding sphere for now */ - // bu_log("DEBUG: min_pt is (%f,%f,%f); max_pt is (%f,%f,%f); radius is %f\n", V3ARGS(min_pt), V3ARGS(max_pt), DIST_PT_PT(min_pt, max_pt) * 0.5); - - ON_Sphere sph(center, DIST_PT_PT(min_pt, max_pt) * 0.5); - *b = ON_BrepSphere(sph); - -#else - *b = ON_Brep::New(); for (i = 0; i < nip->nsrf; i++) { @@ -72,12 +52,6 @@ ON_NurbsSurface *nurb = ON_NurbsSurface::New(3, true, surface->order[0], surface->order[1], surface->s_size[0], surface->s_size[1]); /* set 'u' knots */ -#if 0 - nurb->SetKnot(0, 0, 0.0); - nurb->SetKnot(0, 1, 1.0); - nurb->SetKnot(1, 0, 0.0); - nurb->SetKnot(1, 1, 1.0); -#else /* set 'u' knots */ /* skip first and last (duplicates?) */ for (j = 1; j < surface->u.k_size - 1; j++) { @@ -90,7 +64,7 @@ nurb->SetKnot(1, j-1, surface->v.knots[j]); // bu_log("v knot %d is %f\n", j-1, surface->u.knots[j]); } -#endif + /* set control points */ for (j = 0; j < surface->s_size[0]; j++) { for (k = 0; k < surface->s_size[1]; k++) { @@ -109,8 +83,6 @@ int findex = (*b)->m_F.Count(); ON_BrepLoop* loop = (*b)->NewOuterLoop(findex - 1); } - -#endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |