/** * Create a bounding RPP for an hyp */ int rt_hyp_bbox(struct rt_db_internal *ip, point_t *min, point_t *max, const struct bn_tol *UNUSED(tol)) { struct rt_hyp_internal *xip; vect_t hyp_Au, hyp_B, hyp_An, hyp_Bn, hyp_H; vect_t pt1, pt2, pt3, pt4, pt5, pt6, pt7, pt8; RT_CK_DB_INTERNAL(ip); xip = (struct rt_hyp_internal *)ip->idb_ptr; RT_HYP_CK_MAGIC(xip); VMOVE(hyp_H, xip->hyp_Hi); VUNITIZE(hyp_H); VMOVE(hyp_Au, xip->hyp_A); VUNITIZE(hyp_Au); VCROSS(hyp_B, hyp_Au, hyp_H); VSETALL((*min), INFINITY); VSETALL((*max), -INFINITY); VSCALE(hyp_B, hyp_B, xip->hyp_b); VREVERSE(hyp_An, xip->hyp_A); VREVERSE(hyp_Bn, hyp_B); VADD3(pt1, xip->hyp_Vi, xip->hyp_A, hyp_B); VADD3(pt2, xip->hyp_Vi, xip->hyp_A, hyp_Bn); VADD3(pt3, xip->hyp_Vi, hyp_An, hyp_B); VADD3(pt4, xip->hyp_Vi, hyp_An, hyp_Bn); VADD4(pt5, xip->hyp_Vi, xip->hyp_A, hyp_B, xip->hyp_Hi); VADD4(pt6, xip->hyp_Vi, xip->hyp_A, hyp_Bn, xip->hyp_Hi); VADD4(pt7, xip->hyp_Vi, hyp_An, hyp_B, xip->hyp_Hi); VADD4(pt8, xip->hyp_Vi, hyp_An, hyp_Bn, xip->hyp_Hi); /* Find the RPP of the rotated axis-aligned hyp bbox - that is, * the bounding box the given hyp would have if its height * vector were in the positive Z direction. This does not give * us an optimal bbox except in the case where the hyp is * actually axis aligned to start with, but it's usually * at least a bit better than the bounding sphere RPP. */ VMINMAX((*min), (*max), pt1); VMINMAX((*min), (*max), pt2); VMINMAX((*min), (*max), pt3); VMINMAX((*min), (*max), pt4); VMINMAX((*min), (*max), pt5); VMINMAX((*min), (*max), pt6); VMINMAX((*min), (*max), pt7); VMINMAX((*min), (*max), pt8); return 0; }
int rt_hyp_plot(struct bu_list *vhead, struct rt_db_internal *incoming, const struct rt_tess_tol *UNUSED(ttol), const struct bn_tol *UNUSED(tol), const struct rt_view_info *UNUSED(info)) { int i, j; /* loop indices */ struct rt_hyp_internal *hyp_in; struct hyp_specific *hyp; vect_t majorAxis[8], /* vector offsets along major axis */ minorAxis[8], /* vector offsets along minor axis */ heightAxis[7], /* vector offsets for layers */ Bunit; /* unit vector along semi-minor axis */ vect_t ell[16]; /* stores 16 points to draw ellipses */ vect_t ribs[16][7]; /* assume 7 layers for now */ fastf_t scale; /* used to calculate semi-major/minor axes for top/bottom */ fastf_t cos22_5 = 0.9238795325112867385; fastf_t cos67_5 = 0.3826834323650898373; BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(incoming); hyp_in = (struct rt_hyp_internal *)incoming->idb_ptr; RT_HYP_CK_MAGIC(hyp_in); hyp = hyp_internal_to_specific(hyp_in); VCROSS(Bunit, hyp->hyp_H, hyp->hyp_Au); VUNITIZE(Bunit); VMOVE(heightAxis[0], hyp->hyp_H); VSCALE(heightAxis[1], heightAxis[0], 0.5); VSCALE(heightAxis[2], heightAxis[0], 0.25); VSETALL(heightAxis[3], 0); VREVERSE(heightAxis[4], heightAxis[2]); VREVERSE(heightAxis[5], heightAxis[1]); VREVERSE(heightAxis[6], heightAxis[0]); for (i = 0; i < 7; i++) { /* determine Z height depending on i */ scale = sqrt(MAGSQ(heightAxis[i])*(hyp->hyp_c * hyp->hyp_c)/(hyp->hyp_r1 * hyp->hyp_r1) + 1); /* calculate vectors for offset */ VSCALE(majorAxis[0], hyp->hyp_Au, hyp->hyp_r1 * scale); VSCALE(majorAxis[1], majorAxis[0], cos22_5); VSCALE(majorAxis[2], majorAxis[0], M_SQRT1_2); VSCALE(majorAxis[3], majorAxis[0], cos67_5); VREVERSE(majorAxis[4], majorAxis[3]); VREVERSE(majorAxis[5], majorAxis[2]); VREVERSE(majorAxis[6], majorAxis[1]); VREVERSE(majorAxis[7], majorAxis[0]); VSCALE(minorAxis[0], Bunit, hyp->hyp_r2 * scale); VSCALE(minorAxis[1], minorAxis[0], cos22_5); VSCALE(minorAxis[2], minorAxis[0], M_SQRT1_2); VSCALE(minorAxis[3], minorAxis[0], cos67_5); VREVERSE(minorAxis[4], minorAxis[3]); VREVERSE(minorAxis[5], minorAxis[2]); VREVERSE(minorAxis[6], minorAxis[1]); VREVERSE(minorAxis[7], minorAxis[0]); /* calculate ellipse */ VADD3(ell[ 0], hyp->hyp_V, heightAxis[i], majorAxis[0]); VADD4(ell[ 1], hyp->hyp_V, heightAxis[i], majorAxis[1], minorAxis[3]); VADD4(ell[ 2], hyp->hyp_V, heightAxis[i], majorAxis[2], minorAxis[2]); VADD4(ell[ 3], hyp->hyp_V, heightAxis[i], majorAxis[3], minorAxis[1]); VADD3(ell[ 4], hyp->hyp_V, heightAxis[i], minorAxis[0]); VADD4(ell[ 5], hyp->hyp_V, heightAxis[i], majorAxis[4], minorAxis[1]); VADD4(ell[ 6], hyp->hyp_V, heightAxis[i], majorAxis[5], minorAxis[2]); VADD4(ell[ 7], hyp->hyp_V, heightAxis[i], majorAxis[6], minorAxis[3]); VADD3(ell[ 8], hyp->hyp_V, heightAxis[i], majorAxis[7]); VADD4(ell[ 9], hyp->hyp_V, heightAxis[i], majorAxis[6], minorAxis[4]); VADD4(ell[10], hyp->hyp_V, heightAxis[i], majorAxis[5], minorAxis[5]); VADD4(ell[11], hyp->hyp_V, heightAxis[i], majorAxis[4], minorAxis[6]); VADD3(ell[12], hyp->hyp_V, heightAxis[i], minorAxis[7]); VADD4(ell[13], hyp->hyp_V, heightAxis[i], majorAxis[3], minorAxis[6]); VADD4(ell[14], hyp->hyp_V, heightAxis[i], majorAxis[2], minorAxis[5]); VADD4(ell[15], hyp->hyp_V, heightAxis[i], majorAxis[1], minorAxis[4]); /* draw ellipse */ RT_ADD_VLIST(vhead, ell[15], BN_VLIST_LINE_MOVE); for (j = 0; j < 16; j++) { RT_ADD_VLIST(vhead, ell[j], BN_VLIST_LINE_DRAW); } /* add ellipse's points to ribs */ for (j = 0; j < 16; j++) { VMOVE(ribs[j][i], ell[j]); } } /* draw ribs */ for (i = 0; i < 16; i++) { RT_ADD_VLIST(vhead, ribs[i][0], BN_VLIST_LINE_MOVE); for (j = 1; j < 7; j++) { RT_ADD_VLIST(vhead, ribs[i][j], BN_VLIST_LINE_DRAW); } } BU_PUT(hyp, struct hyp_specific); return 0; }
/* * G E T S O L I D * * Returns - * -1 error * 0 conversion OK * 1 EOF */ int getsolid(void) { char given_solid_num[16]; char solid_type[16]; int i; double r1, r2; vect_t work; double m1, m2; /* Magnitude temporaries */ char *name=NULL; double dd[4*6]; /* 4 cards of 6 nums each */ point_t tmp[8]; /* 8 vectors of 3 nums each */ int ret; #define D(_i) (&(dd[_i*3])) #define T(_i) (&(tmp[_i][0])) if ( (i = get_line( scard, sizeof(scard), "solid card" )) == EOF ) { printf("getsolid: unexpected EOF\n"); return( 1 ); } switch ( version ) { case 5: bu_strlcpy( given_solid_num, scard+0, sizeof(given_solid_num) ); given_solid_num[5] = '\0'; bu_strlcpy( solid_type, scard+5, sizeof(solid_type) ); solid_type[5] = '\0'; break; case 4: bu_strlcpy( given_solid_num, scard+0, sizeof(given_solid_num) ); given_solid_num[3] = '\0'; bu_strlcpy( solid_type, scard+3, sizeof(solid_type) ); solid_type[7] = '\0'; break; case 1: /* DoE/MORSE version, believed to be original MAGIC format */ bu_strlcpy( given_solid_num, scard+5, sizeof(given_solid_num) ); given_solid_num[4] = '\0'; bu_strlcpy( solid_type, scard+2, sizeof(solid_type) ); break; default: fprintf(stderr, "getsolid() version %d unimplemented\n", version); bu_exit(1, NULL); break; } /* Trim trailing spaces */ trim_trail_spaces( given_solid_num ); trim_trail_spaces( solid_type ); /* another solid - increment solid counter * rather than using number from the card, which may go into * pseudo-hex format in version 4 models (due to 3 column limit). */ sol_work++; if ( version == 5 ) { if ( (i = getint( scard, 0, 5 )) != sol_work ) { printf("expected solid card %d, got %d, abort\n", sol_work, i ); return(1); } } /* Reduce solid type to lower case */ { register char *cp; register char c; cp = solid_type; while ( (c = *cp) != '\0' ) { if ( !isascii(c) ) { *cp++ = '?'; } else if ( isupper(c) ) { *cp++ = tolower(c); } else { cp++; } } } namecvt( sol_work, &name, 's' ); if (verbose) col_pr( name ); if ( strcmp( solid_type, "end" ) == 0 ) { /* DoE/MORSE version 1 format */ bu_free( name, "name" ); return(1); /* END */ } if ( strcmp( solid_type, "ars" ) == 0 ) { int ncurves; int pts_per_curve; double **curve; ncurves = getint( scard, 10, 10 ); pts_per_curve = getint( scard, 20, 10 ); /* Allocate curves pointer array */ curve = (double **)bu_malloc((ncurves+1)*sizeof(double *), "curve"); /* Allocate space for a curve, and read it in */ for ( i=0; i<ncurves; i++ ) { curve[i] = (double *)bu_malloc((pts_per_curve+1)*3*sizeof(double), "curve[i]" ); /* Get data for this curve */ if ( getxsoldata( curve[i], pts_per_curve*3, sol_work ) < 0 ) { printf("ARS %d: getxsoldata failed, curve %d\n", sol_work, i); return(-1); } } if ( (ret = mk_ars( outfp, name, ncurves, pts_per_curve, curve )) < 0 ) { printf("mk_ars(%s) failed\n", name ); /* Need to free memory; 'ret' is returned below */ } for ( i=0; i<ncurves; i++ ) { bu_free( (char *)curve[i], "curve[i]" ); } bu_free( (char *)curve, "curve" ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "rpp" ) == 0 ) { double min[3], max[3]; if ( getsoldata( dd, 2*3, sol_work ) < 0 ) return(-1); VSET( min, dd[0], dd[2], dd[4] ); VSET( max, dd[1], dd[3], dd[5] ); ret = mk_rpp( outfp, name, min, max ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "box" ) == 0 ) { if ( getsoldata( dd, 4*3, sol_work ) < 0 ) return(-1); VMOVE( T(0), D(0) ); VADD2( T(1), D(0), D(2) ); VADD3( T(2), D(0), D(2), D(1) ); VADD2( T(3), D(0), D(1) ); VADD2( T(4), D(0), D(3) ); VADD3( T(5), D(0), D(3), D(2) ); VADD4( T(6), D(0), D(3), D(2), D(1) ); VADD3( T(7), D(0), D(3), D(1) ); ret = mk_arb8( outfp, name, &tmp[0][X] ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "raw" ) == 0 || strcmp( solid_type, "wed" ) == 0 /* DoE name */ ) { if ( getsoldata( dd, 4*3, sol_work ) < 0 ) return(-1); VMOVE( T(0), D(0) ); VADD2( T(1), D(0), D(2) ); VMOVE( T(2), T(1) ); VADD2( T(3), D(0), D(1) ); VADD2( T(4), D(0), D(3) ); VADD3( T(5), D(0), D(3), D(2) ); VMOVE( T(6), T(5) ); VADD3( T(7), D(0), D(3), D(1) ); ret = mk_arb8( outfp, name, &tmp[0][X] ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "rvw" ) == 0 ) { /* Right Vertical Wedge (Origin: DoE/MORSE) */ double a2, theta, phi, h2; double a2theta; double angle1, angle2; vect_t a, b, c; if ( getsoldata( dd, 1*3+4, sol_work ) < 0 ) return(-1); a2 = dd[3]; /* XY side length */ theta = dd[4]; phi = dd[5]; h2 = dd[6]; /* height in +Z */ angle1 = (phi+theta-90) * bn_degtorad; angle2 = (phi+theta) * bn_degtorad; a2theta = a2 * tan(theta * bn_degtorad); VSET( a, a2theta*cos(angle1), a2theta*sin(angle1), 0 ); VSET( b, -a2*cos(angle2), -a2*sin(angle2), 0 ); VSET( c, 0, 0, h2 ); VSUB2( T(0), D(0), b ); VMOVE( T(1), D(0) ); VMOVE( T(2), D(0) ); VADD2( T(3), T(0), a ); VADD2( T(4), T(0), c ); VADD2( T(5), T(1), c ); VMOVE( T(6), T(5) ); VADD2( T(7), T(3), c ); ret = mk_arb8( outfp, name, &tmp[0][X] ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "arw" ) == 0) { /* ARbitrary Wedge --- ERIM */ if ( getsoldata( dd, 4*3, sol_work ) < 0) return(-1); VMOVE( T(0), D(0) ); VADD2( T(1), D(0), D(2) ); VADD3( T(2), D(0), D(2), D(3) ); VADD2( T(3), D(0), D(3) ); VADD2( T(4), D(0), D(1) ); VMOVE( T(5), T(4) ); VADD3( T(6), D(0), D(1), D(3) ); VMOVE( T(7), T(6) ); ret = mk_arb8( outfp, name, &tmp[0][X]); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "arb8" ) == 0 ) { if ( getsoldata( dd, 8*3, sol_work ) < 0 ) return(-1); ret = mk_arb8( outfp, name, dd ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "arb7" ) == 0 ) { if ( getsoldata( dd, 7*3, sol_work ) < 0 ) return(-1); VMOVE( D(7), D(4) ); ret = mk_arb8( outfp, name, dd ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "arb6" ) == 0 ) { if ( getsoldata( dd, 6*3, sol_work ) < 0 ) return(-1); /* Note that the ordering is important, as data is in D(4), D(5) */ VMOVE( D(7), D(5) ); VMOVE( D(6), D(5) ); VMOVE( D(5), D(4) ); ret = mk_arb8( outfp, name, dd ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "arb5" ) == 0 ) { if ( getsoldata( dd, 5*3, sol_work ) < 0 ) return(-1); VMOVE( D(5), D(4) ); VMOVE( D(6), D(4) ); VMOVE( D(7), D(4) ); ret = mk_arb8( outfp, name, dd ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "arb4" ) == 0 ) { if ( getsoldata( dd, 4*3, sol_work ) < 0 ) return(-1); ret = mk_arb4( outfp, name, dd ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "rcc" ) == 0 ) { /* V, H, r */ if ( getsoldata( dd, 2*3+1, sol_work ) < 0 ) return(-1); ret = mk_rcc( outfp, name, D(0), D(1), dd[6] ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "rec" ) == 0 ) { /* V, H, A, B */ if ( getsoldata( dd, 4*3, sol_work ) < 0 ) return(-1); ret = mk_tgc( outfp, name, D(0), D(1), D(2), D(3), D(2), D(3) ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "trc" ) == 0 ) { /* V, H, r1, r2 */ if ( getsoldata( dd, 2*3+2, sol_work ) < 0 ) return(-1); ret = mk_trc_h( outfp, name, D(0), D(1), dd[6], dd[7] ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "tec" ) == 0 ) { /* V, H, A, B, p */ if ( getsoldata( dd, 4*3+1, sol_work ) < 0 ) return(-1); r1 = 1.0/dd[12]; /* P */ VSCALE( D(4), D(2), r1 ); VSCALE( D(5), D(3), r1 ); ret = mk_tgc( outfp, name, D(0), D(1), D(2), D(3), D(4), D(5) ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "tgc" ) == 0 ) { /* V, H, A, B, r1, r2 */ if ( getsoldata( dd, 4*3+2, sol_work ) < 0 ) return(-1); r1 = dd[12] / MAGNITUDE( D(2) ); /* A/|A| * C */ r2 = dd[13] / MAGNITUDE( D(3) ); /* B/|B| * D */ VSCALE( D(4), D(2), r1 ); VSCALE( D(5), D(3), r2 ); ret = mk_tgc( outfp, name, D(0), D(1), D(2), D(3), D(4), D(5) ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "sph" ) == 0 ) { /* V, radius */ if ( getsoldata( dd, 1*3+1, sol_work ) < 0 ) return(-1); ret = mk_sph( outfp, name, D(0), dd[3] ); bu_free( name, "name" ); return(ret); } if ( strncmp( solid_type, "wir", 3 ) == 0 ) { int numpts; /* points per wire */ int num; int i; double dia; double *pts; /* 3 entries per pt */ struct wdb_pipept *ps; struct bu_list head; /* allow a whole struct for head */ /* This might be getint( solid_type, 3, 2 ); for non-V5 */ numpts = getint( scard, 8, 2 ); num = numpts * 3 + 1; /* 3 entries per pt */ /* allocate space for the points array */ pts = ( double *)bu_malloc(num * sizeof( double), "pts" ); if ( getsoldata( pts, num, sol_work ) < 0 ) { return(-1); } dia = pts[num-1] * 2.0; /* radius X 2.0 == diameter */ /* allocate nodes on a list and store all information in * the appropriate location. */ BU_LIST_INIT( &head ); for ( i = 0; i < numpts; i++ ) { /* malloc a new structure */ ps = (struct wdb_pipept *)bu_malloc(sizeof( struct wdb_pipept), "ps"); ps->l.magic = WDB_PIPESEG_MAGIC; VMOVE( ps->pp_coord, &pts[i*3]); /* 3 pts at a time */ ps->pp_id = 0; /* solid */ ps->pp_od = dia; ps->pp_bendradius = dia; BU_LIST_INSERT( &head, &ps->l ); } if ( mk_pipe( outfp, name, &head ) < 0 ) return(-1); mk_pipe_free( &head ); bu_free( name, "name" ); return(0); /* OK */ } if ( strcmp( solid_type, "rpc" ) == 0 ) { /* V, H, B, r */ if ( getsoldata( dd, 3*3+1, sol_work ) < 0 ) return(-1); ret = mk_rpc( outfp, name, D(0), D(1), D(2), dd[9] ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "rhc" ) == 0 ) { /* V, H, B, r, c */ if ( getsoldata( dd, 3*3+2, sol_work ) < 0 ) return(-1); ret = mk_rhc( outfp, name, D(0), D(1), D(2), dd[9], dd[10] ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "epa" ) == 0 ) { /* V, H, Au, r1, r2 */ if ( getsoldata( dd, 3*3+2, sol_work ) < 0 ) return(-1); ret = mk_epa( outfp, name, D(0), D(1), D(2), dd[9], dd[10] ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "ehy" ) == 0 ) { /* V, H, Au, r1, r2, c */ if ( getsoldata( dd, 3*3+3, sol_work ) < 0 ) return(-1); ret = mk_ehy( outfp, name, D(0), D(1), D(2), dd[9], dd[10], dd[11] ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "eto" ) == 0 ) { /* V, N, C, r, rd */ if ( getsoldata( dd, 3*3+2, sol_work ) < 0 ) return(-1); ret = mk_eto( outfp, name, D(0), D(1), D(2), dd[9], dd[10] ); bu_free( name, "name" ); return(ret); } if ( version <= 4 && strcmp( solid_type, "ell" ) == 0 ) { /* Foci F1, F2, major axis length L */ vect_t v; /* * For simplicity, we convert ELL to ELL1, then * fall through to ELL1 code. * Format of ELL is F1, F2, len * ELL1 format is V, A, r */ if ( getsoldata( dd, 2*3+1, sol_work ) < 0 ) return(-1); VADD2SCALE( v, D(0), D(1), 0.5 ); /* V is midpoint */ VSUB2( work, D(1), D(0) ); /* work holds F2 - F1 */ m1 = MAGNITUDE( work ); r2 = 0.5 * dd[6] / m1; VSCALE( D(1), work, r2 ); /* A */ dd[6] = sqrt( MAGSQ( D(1) ) - (m1 * 0.5)*(m1 * 0.5) ); /* r */ VMOVE( D(0), v ); goto ell1; } if ( (version == 5 && strcmp( solid_type, "ell" ) == 0) || strcmp( solid_type, "ell1" ) == 0 ) { /* V, A, r */ /* GIFT4 name is "ell1", GIFT5 name is "ell" */ if ( getsoldata( dd, 2*3+1, sol_work ) < 0 ) return(-1); ell1: r1 = dd[6]; /* R */ VMOVE( work, D(0) ); work[0] += bn_pi; work[1] += bn_pi; work[2] += bn_pi; VCROSS( D(2), work, D(1) ); m1 = r1/MAGNITUDE( D(2) ); VSCALE( D(2), D(2), m1 ); VCROSS( D(3), D(1), D(2) ); m2 = r1/MAGNITUDE( D(3) ); VSCALE( D(3), D(3), m2 ); /* Now we have V, A, B, C */ ret = mk_ell( outfp, name, D(0), D(1), D(2), D(3) ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "ellg" ) == 0 ) { /* V, A, B, C */ if ( getsoldata( dd, 4*3, sol_work ) < 0 ) return(-1); ret = mk_ell( outfp, name, D(0), D(1), D(2), D(3) ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "tor" ) == 0 ) { /* V, N, r1, r2 */ if ( getsoldata( dd, 2*3+2, sol_work ) < 0 ) return(-1); ret = mk_tor( outfp, name, D(0), D(1), dd[6], dd[7] ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "haf" ) == 0 ) { /* N, d */ if ( getsoldata( dd, 1*3+1, sol_work ) < 0 ) return(-1); ret = mk_half( outfp, name, D(0), -dd[3] ); bu_free( name, "name" ); return(ret); } if ( strcmp( solid_type, "arbn" ) == 0 ) { ret = read_arbn( name ); bu_free( name, "name" ); } /* * The solid type string is defective, * or that solid is not currently supported. */ printf("getsolid: no support for solid type '%s'\n", solid_type ); return(-1); }