Revision: 56511
          http://sourceforge.net/p/brlcad/code/56511
Author:   brlcad
Date:     2013-08-04 17:38:21 +0000 (Sun, 04 Aug 2013)
Log Message:
-----------
remove dead code from our external plugin modules.  they're updated far too 
infrequently for any reference code to have more utility than just figuring out 
what needs to be done going forward should a need arise.

Modified Paths:
--------------
    brlcad/trunk/src/external/ProEngineer/proe-brl.c
    brlcad/trunk/src/external/Unigraphics/ug-g.c
    brlcad/trunk/src/external/Unigraphics/ug_misc.c
    brlcad/trunk/src/external/Unigraphics/ug_misc.h

Modified: brlcad/trunk/src/external/ProEngineer/proe-brl.c
===================================================================
--- brlcad/trunk/src/external/ProEngineer/proe-brl.c    2013-08-04 17:31:51 UTC 
(rev 56510)
+++ brlcad/trunk/src/external/ProEngineer/proe-brl.c    2013-08-04 17:38:21 UTC 
(rev 56511)
@@ -1971,7 +1971,6 @@
        fprintf( logger, "Tessellate part (%s)\n", curr_part_name );
     }
 
-#if 1
     /* Going from coarse to fine tessellation */
     for (i = 0; i <= max_to_min_steps; ++i) {
        curr_error = max_error - (i * error_increment);
@@ -1994,10 +1993,7 @@
            fprintf(logger, "Failed to tessellate %s using:  tessellation error 
- %g, angle - %g\n", curr_part_name, curr_error, curr_angle);
        }
     }
-#else
-    status = ProPartTessellate( ProMdlToPart(model), 
max_error/proe_to_brl_conv,
-                               max_angle_cntrl, PRO_B_TRUE, &tess  );
-#endif
+
     if ( status != PRO_TK_NO_ERROR ) {
        /* Failed!!! */
 
@@ -2828,7 +2824,7 @@
     int ret_status;
 
     empty_parts_root = NULL;
-#if 1
+
     /* use UI dialog */
     status = ProUIDialogCreate( "proe_brl", "proe_brl" );
     if ( status != PRO_TK_NO_ERROR ) {
@@ -2857,21 +2853,6 @@
        fprintf( stderr, "\t dialog returned %d\n", ret_status );
     }
 
-#else
-    /* default output file name */
-    bu_strlcpy( output_file, "proe.asc", sizeof(output_file) );
-
-    /* get the angle control */
-    (void) ProMessageDisplay( MSGFIL, "USER_PROMPT_DOUBLE",
-                             "Enter a value for angle control: ",
-                             &max_angle_cntrl );
-    range[0] = 0.0;
-    range[1] = 1.0;
-    status = ProMessageDoubleRead( range, &max_angle_cntrl );
-    if ( status == PRO_TK_MSG_USER_QUIT ) {
-       return 0;
-    }
-#endif
     return 0;
 }
 
@@ -3005,7 +2986,6 @@
        fprintf( stderr, "\t dialog returned %d\n", ret_status );
     }
 
-#if 1
     /* get logger type */
     status = ProUIRadiogroupSelectednamesGet( "proe_brl", "log_file_type_rg", 
&n_selected_names, &selected_names );
     if ( status != PRO_TK_NO_ERROR ) {
@@ -3015,9 +2995,6 @@
     }
     sprintf(logger_type_str,"%s", selected_names[0]);
     ProStringarrayFree(selected_names, n_selected_names);
-#else
-    sprintf(logger_type_str, "Failure");
-#endif
 
     /* get the name of the log file */
     status = ProUIInputpanelValueGet( "proe_brl", "log_file", &tmp_str );
@@ -3530,9 +3507,8 @@
     ProError status;
     int ret_status=0;
 
+    empty_parts_root = NULL;
 
-    empty_parts_root = NULL;
-#if 1
     ProMessageDisplay(MSGFIL, "USER_INFO", "Launching proe_brl...");
 
     /* use UI dialog */
@@ -3589,243 +3565,21 @@
        bu_vls_free(&vls);
     }
 
-#else
-    /* get the currently displayed model in Pro/E */
-    status = ProMdlCurrentGet( &model );
-    if ( status == PRO_TK_BAD_CONTEXT ) {
-       ProName dialog_label;
-       ProLine w_answer;
-       char answer[PRO_LINE_SIZE];
-       char *ptr;
-
-       ProStringToWstring( dialog_label, "Select an Object for Conversion" );
-       ProStringToWstring( dialog_filter, "*.prt,*.asm" );
-       status = ProFileOpen( dialog_label, dialog_filter, (ProPath *)NULL,
-                             (ProName *)NULL, NULL,
-                             NULL, file_to_open );
-       if ( status != PRO_TK_NO_ERROR )
-           return status;
-
-       (void)ProWstringToString( file_name, file_to_open );
-    }
-
-    /* default output file name */
-    bu_strlcpy( output_file, "proe.asc", sizeof(output_file) );
-
-    /* get the output file name */
-    (void)ProMessageDisplay( MSGFIL, "USER_PROMPT_STRING",
-                            "Enter name of file to receive output: ",
-                            output_file );
-    status = ProMessageStringRead( 127, w_output_file );
-    if ( status == PRO_TK_NO_ERROR ) {
-       (void)ProWstringToString( output_file, w_output_file );
-    } else if ( status == PRO_TK_MSG_USER_QUIT) {
-       return 0;
-    }
-
-    /* get starting ident number */
-    (void)ProMessageDisplay( MSGFIL, "USER_PROMPT_INT",
-                            "Enter starting ident number: ",
-                            &reg_id );
-    status = ProMessageIntegerRead( NULL, &reg_id );
-    if ( status == PRO_TK_MSG_USER_QUIT ) {
-       return 0;
-    }
-
-    /* get the maximum allowed error */
-    (void)ProMessageDisplay( MSGFIL, "USER_PROMPT_DOUBLE",
-                            "Enter maximum allowable error for tessellation 
(mm): ",
-                            &max_error );
-    range[0] = 0.0;
-    range[1] = 500.0;
-    status = ProMessageDoubleRead( range, &max_error );
-    if ( status == PRO_TK_MSG_USER_QUIT ) {
-       return 0;
-    }
-
-    /* get the angle control */
-    (void) ProMessageDisplay( MSGFIL, "USER_PROMPT_DOUBLE",
-                             "Enter a value for angle control: ",
-                             &max_angle_cntrl );
-    range[0] = 0.0;
-    range[1] = 1.0;
-    status = ProMessageDoubleRead( range, &max_angle_cntrl );
-    if ( status == PRO_TK_MSG_USER_QUIT ) {
-       return 0;
-    }
-
-    /* get the minimum hole diameter */
-    (void) ProMessageDisplay( MSGFIL, "USER_PROMPT_DOUBLE",
-                             "Enter the minimum allowed hole diameter (smaller 
holes will be deleted): ",
-                             &min_hole_diameter );
-    status = ProMessageDoubleRead( NULL, &min_hole_diameter );
-    if ( status == PRO_TK_MSG_USER_QUIT ) {
-       return 0;
-    }
-    if ( min_hole_diameter < 0.0 ) {
-       min_hole_diameter = 0.0;
-    }
-
-    /* get the minimum round radius */
-    (void) ProMessageDisplay( MSGFIL, "USER_PROMPT_DOUBLE",
-                             "Enter the minimum allowed round radius (smaller 
rounds will be deleted): ",
-                             &min_round_radius );
-    status = ProMessageDoubleRead( NULL, &min_round_radius );
-    if ( status == PRO_TK_MSG_USER_QUIT ) {
-       return 0;
-    }
-    if ( min_round_radius < 0.0 ) {
-       min_round_radius = 0.0;
-    }
-
-    /* get the minimum chamfer dimension */
-    (void) ProMessageDisplay( MSGFIL, "USER_PROMPT_DOUBLE",
-                             "Enter the minimum allowed chamfer dimension 
(smaller chamfers will be deleted): ",
-                             &min_chamfer_dim );
-    status = ProMessageDoubleRead( NULL, &min_chamfer_dim );
-    if ( status == PRO_TK_MSG_USER_QUIT ) {
-       return 0;
-    }
-    if ( min_chamfer_dim < 0.0 ) {
-       min_chamfer_dim = 0.0;
-    }
-
-    /* initialize */
-    do_initialize();
-
-    /* open output file */
-    mode = create_for_writing;
-    if ( (outfp=fopen( output_file, mode ) ) == NULL ) {
-       (void)ProMessageDisplay(MSGFIL, "USER_ERROR", "Cannot open output file" 
);
-       ProMessageClear();
-       fprintf( stderr, "Cannot open output file\n" );
-       perror( "\t" );
-       return PRO_TK_GENERAL_ERROR;
-    }
-
-    /* get model type */
-    status = ProMdlTypeGet( model, &type );
-    if ( status == PRO_TK_BAD_INPUTS ) {
-       (void)ProMessageDisplay(MSGFIL, "USER_NO_TYPE" );
-       ProMessageClear();
-       fprintf( stderr, "Cannot get type of current model\n" );
-       (void)ProWindowRefresh( PRO_VALUE_UNUSED );
-       return PRO_TK_NO_ERROR;
-    }
-
-    /* can only do parts and assemblies, no drawings, etc. */
-    if ( type != PRO_MDL_ASSEMBLY && type != PRO_MDL_PART ) {
-       (void)ProMessageDisplay(MSGFIL, "USER_TYPE_NOT_SOLID" );
-       ProMessageClear();
-       fprintf( stderr, "Current model is not a solid object\n" );
-       (void)ProWindowRefresh( PRO_VALUE_UNUSED );
-       return PRO_TK_NO_ERROR;
-    }
-
-    /* get units, and adjust conversion factor */
-    model_units( model );
-
-    vert_tree_root = create_vert_tree();
-
-    /* output the top level object
-     * this will recurse through the entire model
-     */
-    output_top_level_object( model, type );
-
-    free_vert_tree( vert_tree_root );
-
-    /* kill any references to empty parts */
-    kill_empty_parts();
-
-    /* let user know we are done */
-    ProMessageDisplay(MSGFIL, "USER_INFO", "Conversion complete" );
-
-    /* let user know we are done */
-    ProStringToWstring( tmp_line, "Conversion complete" );
-    ProUILabelTextSet( "proe_brl", "curr_proc", tmp_line );
-
-    /* free a bunch of stuff */
-    if ( done_list_part ) {
-       bu_rb_free( done_list_part, free_rb_data );
-       done_list_part = NULL;
-    }
-
-    if ( done_list_asm ) {
-       bu_rb_free( done_list_asm, free_rb_data );
-       done_list_asm = NULL;
-    }
-
-    /* free a bunch of stuff */
-    if ( done ) {
-       bu_free( (char *)done, "done" );
-    }
-    done = NULL;
-    max_done = 0;
-    curr_done = 0;
-
-    for ( i=0; i<BU_PTBL_LEN( &search_path_list ); i++ ) {
-       bu_free( (char *)BU_PTBL_GET( &search_path_list, i ), "search_path 
entry" );
-    }
-    bu_ptbl_free( &search_path_list );
-
-    if ( part_tris ) {
-       bu_free( (char *)part_tris, "part triangles" );
-    }
-    part_tris = NULL;
-
-    free_vert_tree( vert_tree_root );
-
-    max_tri = 0;
-
-    free_empty_parts();
-
-    fclose( outfp );
-
-    /* list summary of objects and feature type seen */
-    fprintf( stderr, "Object types encountered:\n" );
-    for ( i=0; i<NUM_OBJ_TYPES; i++ ) {
-       if ( !obj_type_count[i] )
-           continue;
-       fprintf( stderr, "\t%s\t%d\n", obj_type[i], obj_type_count[i] );
-    }
-    fprintf( stderr, "Feature types encountered:\n" );
-    for ( i=0; i<NUM_FEAT_TYPES; i++ ) {
-       if ( !feat_type_count[i] )
-           continue;
-       fprintf( stderr, "\t%s\t%d\n", feat_type[i], feat_type_count[i] );
-    }
-#endif
     return 0;
 }
 
+
 /* this routine determines whether the "proe-brl" menu item in Pro/E
  * should be displayed as available or greyed out
  */
 static uiCmdAccessState
 proe_brl_access( uiCmdAccessMode access_mode )
 {
-
-#if 1
     /* doing the correct checks appears to be unreliable */
     return ACCESS_AVAILABLE;
-#else
-    ProMode mode;
-    ProError status;
+}
 
-    status = ProModeCurrentGet( &mode );
-    if ( status != PRO_TK_NO_ERROR ) {
-       return ACCESS_UNAVAILABLE;
-    }
 
-    /* only allow our menu item to be used when parts or assemblies are 
displayed */
-    if ( mode == PRO_MODE_ASSEMBLY || mode == PRO_MODE_PART ) {
-       return ACCESS_AVAILABLE;
-    } else {
-       return ACCESS_UNAVAILABLE;
-    }
-#endif
-}
-
 /* routine to add our menu item */
 int
 user_initialize( int argc, char *argv[], char *version, char *build, wchar_t 
errbuf[80] )

Modified: brlcad/trunk/src/external/Unigraphics/ug-g.c
===================================================================
--- brlcad/trunk/src/external/Unigraphics/ug-g.c        2013-08-04 17:31:51 UTC 
(rev 56510)
+++ brlcad/trunk/src/external/Unigraphics/ug-g.c        2013-08-04 17:38:21 UTC 
(rev 56511)
@@ -4111,8 +4111,6 @@
            failed = 1;
        }
     } else if ( BU_STR_EQUAL( feat_type, "MIRROR" ) ) {
-#if 1
-
        int i;
        tag_t source_body, body_xform, datum_plane, datum_xform;
 
@@ -4125,122 +4123,6 @@
        bu_log( "UF_WAVE_ask_link_mirror_data says: source_body = %d, 
body_xform = %d, datum_plane = %d, datum_xform = %d\n",
                source_body, body_xform, datum_plane, datum_xform );
        failed = 1;
-#else
-       char *solid_name;
-       tag_t *parents, *children;
-       int num_parents, num_children;
-       int num_datum_planes=0;
-       int type, subtype;
-       double plane_pt[3], plane_norm[3];
-       double mirror_mtx[16];
-       mat_t mirror_mat;
-       int i, j;
-       struct wmember mirror_head;
-
-       UF_func( UF_MODL_ask_feat_relatives( feat_tag, &num_parents, &parents, 
&num_children, &children ) );
-
-       DO_INDENT;
-       bu_log( "Mirror has %d children and %d parents\n", num_children, 
num_parents );
-       for ( i=0; i<num_parents; i++ ) {
-           char *ftype1;
-
-           UF_func( UF_OBJ_ask_type_and_subtype( parents[i], &type, &subtype));
-           UF_func( UF_MODL_ask_feat_type( parents[i], &ftype1 ) );
-           DO_INDENT;
-           bu_log( "parent[%d] is feature %s, type %s\n", i, feat_name, ftype1 
);
-           if ( BU_STR_EQUAL( ftype1, "DATUM_PLANE" ) ) {
-               char *offset, *angle;
-               UF_func( UF_MODL_ask_datum_plane_parms( parents[i], plane_pt, 
plane_norm, &offset, &angle ) );
-               DO_INDENT;
-               bu_log( "plane is at (%g %g %g), normal is (%g %g %g)\n", 
V3ARGS( plane_pt ), V3ARGS( plane_norm ) );
-               UF_free( offset );
-               UF_free( angle );
-               UF_func( UF_MTX4_mirror( plane_pt, plane_norm, mirror_mtx ) );
-               MAT_COPY( mirror_mat, mirror_mtx );
-               num_datum_planes++;
-           }
-           UF_free( ftype1 );
-       }
-
-       if ( num_datum_planes != 1 ) {
-           UF_free( parents );
-           UF_free( children );
-
-           DO_INDENT;
-           bu_log( "Failed to convert MIRROR BODY (%s) in part %s\n", 
feat_name, part_name );
-           failed = 1;
-           goto out;
-       }
-
-       BU_LIST_INIT( &mirror_head.l );
-       for ( i=0; i<num_parents; i++ ) {
-           char *ftype1;
-
-           UF_func( UF_OBJ_ask_type_and_subtype( parents[i], &type, &subtype));
-           UF_func( UF_MODL_ask_feat_type( parents[i], &ftype1 ) );
-           if ( !BU_STR_EQUAL( ftype1, "DATUM_PLANE" ) ) {
-               uf_list_p_t feat_list;
-               int feat_count=0;
-               tag_t body_tag;
-               tag_t body_feat;
-
-               UF_func( UF_MODL_ask_feat_body( parents[i], &body_tag ) );
-               UF_func( UF_MODL_ask_body_feats( body_tag, &feat_list ) );
-               UF_func( UF_MODL_ask_list_count( feat_list, &feat_count ) );
-               DO_INDENT;
-               bu_log( "parent feature %s has %d features\n", ftype1, 
feat_count );
-               for ( j=0; j<feat_count; j++ ) {
-                   UF_free( ftype1 );
-                   UF_func( UF_MODL_ask_list_item( feat_list, j, &body_feat ) 
);
-                   UF_func( UF_MODL_ask_feat_type( body_feat, &ftype1 ) );
-                   DO_INDENT;
-                   bu_log( "\t%s\n", ftype1 );
-               }
-
-               if ( only_facetize ) {
-                   solid_name = (char *)NULL;
-               } else {
-                   solid_name = conv_features( body_tag, part_name, NULL, 
NULL, curr_xform, units_conv, 0 );
-               }
-
-               if ( !solid_name ) {
-                   parts_facetized++;
-                   if ( !only_facetize ) {
-                       DO_INDENT;
-                       bu_log( "\tfailed to convert features for feature %s 
part %s, facetizing\n",
-                               feat_name, part_name );
-                   }
-                   solid_name = facetize( body_tag, part_name, NULL, NULL, 
curr_xform, units_conv, 0 );
-               } else {
-                   parts_bool++;
-               }
-               if ( solid_name ) {
-                   add_to_obj_list( solid_name );
-                   (void)mk_addmember( solid_name, &mirror_head.l, mirror_mat, 
brlcad_op );
-               }
-           }
-           UF_free( ftype1 );
-       }
-
-       UF_free( parents );
-       UF_free( children );
-
-       if ( BU_LIST_NON_EMPTY( &mirror_head.l ) ) {
-           if ( BU_LIST_IS_HEAD( BU_LIST_PNEXT_PNEXT( bu_list, &mirror_head.l 
), &mirror_head.l ) ) {
-               /* only one member in list, we don't need to build a 
combination */
-               (void)mk_addmember( bu_strdup( solid_name ), &head->l, 
mirror_mat, brlcad_op );
-               mk_freemembers( &mirror_head.l );
-           } else {
-               char *comb_name;
-
-               /* we need to build a combination */
-               comb_name = create_unique_brlcad_combination_name();
-               (void)mk_comb( wdb_fd, comb_name, &mirror_head.l, 0, NULL, 
NULL, NULL, 0, 0, 0, 0, 0, 0, 0 );
-               add_to_obj_list( comb_name );
-               (void)mk_addmember( comb_name, &head->l, NULL, brlcad_op );
-           }
-       }
-#endif
     } else if ( BU_STR_EQUAL( feat_type, "MIRROR_SET" ) ) {
        tag_t plane_tag;
        tag_t *mirror_features;
@@ -5600,15 +5482,10 @@
        return 0;
     }
 
-#if 1
     if ( !only_facetize ) {
        curr_level = 0;
        get_it_all_loaded( displayed_part );
     }
-#else
-    cset = load_sub_parts(displayed_part);
-    bu_log( "loaded sub_parts\n" );
-#endif
 
 #if DO_SUPPRESSIONS
     if ( min_chamfer > 0.0 || min_round > 0.0 ) {

Modified: brlcad/trunk/src/external/Unigraphics/ug_misc.c
===================================================================
--- brlcad/trunk/src/external/Unigraphics/ug_misc.c     2013-08-04 17:31:51 UTC 
(rev 56510)
+++ brlcad/trunk/src/external/Unigraphics/ug_misc.c     2013-08-04 17:38:21 UTC 
(rev 56511)
@@ -131,8 +131,6 @@
 }
 
 
-jmp_buf my_env;
-
 /*     R E P O R T
  *
  */
@@ -151,11 +149,8 @@
        fprintf(stderr, "%s Error in %s:%d\ncall: %s\nmessage:%s\n",
                progname, file, line, call, message);
     }
-#if 1
+
     bu_exit( 1, NULL );
-#else
-    longjmp(my_env, 1);
-#endif
 
     return 0; /* NOTREACHED */
 }

Modified: brlcad/trunk/src/external/Unigraphics/ug_misc.h
===================================================================
--- brlcad/trunk/src/external/Unigraphics/ug_misc.h     2013-08-04 17:31:51 UTC 
(rev 56510)
+++ brlcad/trunk/src/external/Unigraphics/ug_misc.h     2013-08-04 17:38:21 UTC 
(rev 56511)
@@ -19,15 +19,13 @@
  */
 /** @file ug_misc.h
  *
+ * This macro and function support a compact error-checking interface to the
+ * UG library routines
+ *
  */
 
-#include <setjmp.h>
-extern jmp_buf my_env;
+#define UF_func(X) report(#X, __FILE__, __LINE__, (X))
 
-/* This macro and function support a compact error-checking interface to the
- * UG library routines
- */
-#define UF_func(X) report(#X, __FILE__, __LINE__, (X))
 extern int report(char *call, char *file, int line, int code);
 extern void Add_lists(uf_list_p_t dest, uf_list_p_t src);
 extern const char *feature_sign(tag_t feat);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to