Revision: 45904
http://brlcad.svn.sourceforge.net/brlcad/?rev=45904&view=rev
Author: brlcad
Date: 2011-08-10 20:00:19 +0000 (Wed, 10 Aug 2011)
Log Message:
-----------
revolve doesn't yet implement tessellation, but doesn't mean we should bomb.
the NMG_CK checks aren't right since it's this function's job to fill them in.
Modified Paths:
--------------
brlcad/trunk/src/librt/primitives/revolve/revolve.c
Modified: brlcad/trunk/src/librt/primitives/revolve/revolve.c
===================================================================
--- brlcad/trunk/src/librt/primitives/revolve/revolve.c 2011-08-10 19:35:33 UTC
(rev 45903)
+++ brlcad/trunk/src/librt/primitives/revolve/revolve.c 2011-08-10 20:00:19 UTC
(rev 45904)
@@ -1313,16 +1313,33 @@
* 0 OK. *r points to nmgregion that holds this tessellation.
*/
int
-rt_revolve_tess(struct nmgregion **r, struct model *m, struct rt_db_internal
*ip, const struct rt_tess_tol *UNUSED(ttol), const struct bn_tol *UNUSED(tol))
+rt_revolve_tess(struct nmgregion **UNUSED(r), struct model *UNUSED(m), struct
rt_db_internal *ip, const struct rt_tess_tol *UNUSED(ttol), const struct bn_tol
*UNUSED(tol))
{
- struct rt_revolve_internal *rip;
+ struct rt_revolve_internal *rip = NULL;
+ struct rt_sketch_internal *sketch_ip = NULL;
+ struct rt_curve *crv = NULL;
- if (r) NMG_CK_REGION(*r);
- if (m) NMG_CK_MODEL(m);
-
+ RT_CK_DB_INTERNAL(ip);
rip = (struct rt_revolve_internal *)ip->idb_ptr;
RT_REVOLVE_CK_MAGIC(rip);
+ if (!rip->skt) {
+ bu_log("rt_revolve_tess: ERROR: no sketch for revolve!\n");
+ return -1;
+ }
+
+ sketch_ip = rip->skt;
+
+ RT_SKETCH_CK_MAGIC(sketch_ip);
+
+ crv = &sketch_ip->curve;
+
+ if (crv->count < 1)
+ return 0;
+
+ /* FIXME: unimplemented */
+ bu_log("Sorry, tessellation of revolve primitives is not yet
implemented.\n");
+
return -1;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at: http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits