Revision: 49346
http://brlcad.svn.sourceforge.net/brlcad/?rev=49346&view=rev
Author: brlcad
Date: 2012-02-08 20:52:26 +0000 (Wed, 08 Feb 2012)
Log Message:
-----------
same for ell, deadcode default switch case. (cid 232)
Modified Paths:
--------------
brlcad/trunk/src/vdeck/vdeck.c
Modified: brlcad/trunk/src/vdeck/vdeck.c
===================================================================
--- brlcad/trunk/src/vdeck/vdeck.c 2012-02-08 20:49:31 UTC (rev 49345)
+++ brlcad/trunk/src/vdeck/vdeck.c 2012-02-08 20:52:26 UTC (rev 49346)
@@ -903,7 +903,7 @@
addell(struct bu_vls *v, struct rt_ell_internal *gp, char *name, int num )
{
double ma, mb, mc;
- int cgtype;
+ int cgtype = GENELL;
/* Check for ell1 or sph. */
ma = MAGNITUDE( gp->a );
@@ -926,28 +926,13 @@
/* switch vector A and vector B */
swap_vec( gp->a, gp->b );
swap_dbl( &ma, &mb );
- } else if ( fabs( mb-mc ) < CONV_EPSILON )
+ } else if ( fabs( mb-mc ) < CONV_EPSILON ) {
cgtype = ELL1;
- else
- cgtype = GENELL;
+ }
/* Print the solid parameters. */
vls_itoa( v, num, 5 );
switch ( cgtype ) {
- case GENELL:
- bu_vls_strcat( v, "ellg " ); /* 5 */
- vls_ftoa_vec_cvt( v, gp->v, 10, 4 );
- vls_ftoa_vec_cvt( v, gp->a, 10, 4 );
- bu_vls_strcat( v, name );
- bu_vls_strcat( v, "\n" );
-
- vls_itoa( v, num, 5 );
- vls_blanks( v, 5 );
- vls_ftoa_vec_cvt( v, gp->b, 10, 4 );
- vls_ftoa_vec_cvt( v, gp->c, 10, 4 );
- bu_vls_strcat( v, name );
- bu_vls_strcat( v, "\n");
- break;
case ELL1:
bu_vls_strcat( v, "ell1 " ); /* 5 */
vls_ftoa_vec_cvt( v, gp->v, 10, 4 );
@@ -970,12 +955,21 @@
bu_vls_strcat( v, name );
bu_vls_strcat( v, "\n" );
break;
+ case GENELL:
default:
- (void) fprintf( stderr,
- "Error in type of ellipse (%d).\n",
- cgtype
- );
- bu_exit( 10, NULL );
+ bu_vls_strcat( v, "ellg " ); /* 5 */
+ vls_ftoa_vec_cvt( v, gp->v, 10, 4 );
+ vls_ftoa_vec_cvt( v, gp->a, 10, 4 );
+ bu_vls_strcat( v, name );
+ bu_vls_strcat( v, "\n" );
+
+ vls_itoa( v, num, 5 );
+ vls_blanks( v, 5 );
+ vls_ftoa_vec_cvt( v, gp->b, 10, 4 );
+ vls_ftoa_vec_cvt( v, gp->c, 10, 4 );
+ bu_vls_strcat( v, name );
+ bu_vls_strcat( v, "\n");
+ break;
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits