Revision: 44842
http://brlcad.svn.sourceforge.net/brlcad/?rev=44842&view=rev
Author: brlcad
Date: 2011-06-08 23:22:53 +0000 (Wed, 08 Jun 2011)
Log Message:
-----------
dead code elimination. not likely support for these (old bspline geometry)
will be implemented any time soon, so remove the unused code instead of exiting.
Modified Paths:
--------------
brlcad/trunk/src/conv/asc/asc2g.c
Modified: brlcad/trunk/src/conv/asc/asc2g.c
===================================================================
--- brlcad/trunk/src/conv/asc/asc2g.c 2011-06-08 23:21:53 UTC (rev 44841)
+++ brlcad/trunk/src/conv/asc/asc2g.c 2011-06-08 23:22:53 UTC (rev 44842)
@@ -1185,148 +1185,6 @@
/**
- * B S P L B L D
- *
- * This routine builds B-splines using libwdb.
- */
-void
-bsplbld(void)
-{
-#if 0
- char *cp;
- char *np;
- short nsurf; /* number of surfaces */
- fastf_t resolution; /* resolution of flatness */
-
- cp = buf;
- cp++; /* ident */
- cp = nxt_spc(cp); /* skip the space */
-
- np = name;
- while (*cp != ' ') {
- *np++ = *cp++;
- }
- *np = '\0';
- cp = nxt_spc(cp);
-
- nsurf = (short)atoi(cp);
- cp = nxt_spc(cp);
- resolution = atof(cp);
-
- mk_bsolid(ofp, name, nsurf, resolution);
-#else
- bu_exit(1, "bsplbld() needs to be upgraded to v5\n");
-#endif
-}
-
-
-/**
- * B S U R F B L D
- *
- * This routine builds d-spline surface descriptions using libwdb.
- */
-void
-bsurfbld(void)
-{
-#if 0
-
- /* HELP! This involves mk_bsurf(filep, bp) where bp is a ptr to struct */
-
- char *cp;
- int i;
- float *vp;
- int nbytes, count;
- float *fp;
-
- cp = buf;
- record.d.d_id = *cp++;
- cp = nxt_spc(cp); /* skip the space */
-
- record.d.d_order[0] = (short)atoi(cp);
- cp = nxt_spc(cp);
- record.d.d_order[1] = (short)atoi(cp);
- cp = nxt_spc(cp);
- record.d.d_kv_size[0] = (short)atoi(cp);
- cp = nxt_spc(cp);
- record.d.d_kv_size[1] = (short)atoi(cp);
- cp = nxt_spc(cp);
- record.d.d_ctl_size[0] = (short)atoi(cp);
- cp = nxt_spc(cp);
- record.d.d_ctl_size[1] = (short)atoi(cp);
- cp = nxt_spc(cp);
- record.d.d_geom_type = (short)atoi(cp);
- cp = nxt_spc(cp);
- record.d.d_nknots = (short)atoi(cp);
- cp = nxt_spc(cp);
- record.d.d_nctls = (short)atoi(cp);
-
- record.d.d_nknots =
- ngran(record.d.d_kv_size[0] + record.d.d_kv_size[1]);
-
- record.d.d_nctls =
- ngran(record.d.d_ctl_size[0] * record.d.d_ctl_size[1]
- * record.d.d_geom_type);
-
- /* Write out the record */
- (void)fwrite((char *)&record, sizeof record, 1, ofp);
-
- /*
- * The b_surf_head record is followed by d_nknots granules of knot
- * vectors (first u, then v), and then by d_nctls granules of
- * control mesh information. Note that neither of these have an
- * ID field!
- *
- * B-spline surface record, followed by
- * d_kv_size[0] floats,
- * d_kv_size[1] floats,
- * padded to d_nknots granules, followed by
- * ctl_size[0]*ctl_size[1]*geom_type floats,
- * padded to d_nctls granules.
- *
- * IMPORTANT NOTE: granule == sizeof(union record)
- */
-
- /* Malloc and clear memory for the KNOT DATA and read it */
- nbytes = record.d.d_nknots * sizeof(union record);
- vp = (float *)bu_malloc(nbytes, "vp");
- fp = vp;
- memset((char *)vp, 0, nbytes);
- /* Read the knot vector information */
- count = record.d.d_kv_size[0] + record.d.d_kv_size[1];
- for (i = 0; i < count; i++) {
- bu_fgets(buf, BUFSIZE, ifp);
- (void)sscanf(buf, "%f", vp++);
- }
- /* Write out the information */
- (void)fwrite((char *)fp, nbytes, 1, ofp);
-
- /* Free the knot data memory */
- (void)bu_free((char *)fp, "knot data");
-
- /* Malloc and clear memory for the CONTROL MESH data and read it */
- nbytes = record.d.d_nctls * sizeof(union record);
- vp = (float *)bu_malloc(nbytes, "vp");
- fp = vp;
- memset((char *)vp, 0, nbytes);
- /* Read the control mesh information */
- count = record.d.d_ctl_size[0] * record.d.d_ctl_size[1] *
- record.d.d_geom_type;
- for (i = 0; i < count; i++) {
- bu_fgets(buf, BUFSIZE, ifp);
- (void)sscanf(buf, "%f", vp++);
- }
- /* Write out the information */
- (void)fwrite((char *)fp, nbytes, 1, ofp);
-
- /* Free the control mesh memory */
- (void)bu_free((char *)fp, "mesh data");
-#else
- bu_exit(1, "bsrfbld() needs to be upgraded to v5\n");
-#endif
-}
-
-
-/**
* C L I N E B L D
*
*/
@@ -1885,11 +1743,11 @@
continue;
case ID_BSOLID:
- bsplbld();
+ bu_log("WARNING: conversion support for old B-spline solid
geometry is not supported. Contact [email protected] if you need this feature.");
continue;
case ID_BSURF:
- bsurfbld();
+ bu_log("WARNING: conversion support for old B-spline surface
geometry is not supported. contact [email protected] if you need this feature.");
continue;
case DBID_PIPE:
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits