BRL-CAD
clone.c File Reference
#include "common.h"
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include <string.h>
#include "bu/getopt.h"
#include "vmath.h"
#include "db.h"
#include "raytrace.h"
#include "./ged_private.h"
Include dependency graph for clone.c:

Go to the source code of this file.

Data Structures

struct  ged_clone_state
 
struct  name
 
struct  nametbl
 
struct  knot
 
struct  spline
 
struct  link
 

Macros

#define CLONE_VERSION   "Clone ver 4.0\n2006-08-08\n"
 
#define CLONE_BUFSIZE   512
 

Functions

int ged_clone (struct ged *gedp, int argc, const char *argv[])
 

Detailed Description

The clone command.

routines related to performing deep object copies

TODO: use bu_vls strings use bu_list lists

ISSUES/TODO (for DK, ^D means done)

  1. No -c option. This allows the increment given in the '-i' to act on the second number D2. Remove 15 char name limit. I ran into this today.
  2. No -p option. I couldn't get this to work. I re-centered the geometry, then it tried to work but I ran into the 15 char limit and had to kill the process (^C).
  3. Names - This tool is built around a naming convention. Currently, the second number does not list properly (it just truncated the second number of the 'cut' prims so they ended up 'mess.s1.c' instead of 'mess.s1.c1'). And the '+' and '-' didn't work, I had to switch from 'mess.s1-1' to 'mess.s1.c1'. Also, prims need to increment by the 'i' number but combs, regions, and assemblies (.c#, .r#, or just name with a # at the end) should increment by 1. So you end up with widget_1, widget_2, widget_3 and not widget_1, widget_4, widget_7...
  4. Tree structure - please retain tree structure to the extent that you can and try not to re-create prims or combs used more than once. No warning needed for redundant copies. Warnings can come later... D6. Display - do display clones but do not resize or re-center view.

Definition in file clone.c.

Macro Definition Documentation

#define CLONE_VERSION   "Clone ver 4.0\n2006-08-08\n"

Definition at line 67 of file clone.c.

#define CLONE_BUFSIZE   512

Definition at line 68 of file clone.c.

Function Documentation

int ged_clone ( struct ged gedp,
int  argc,
const char *  argv[] 
)

Performs a deep copy of object.

Definition at line 957 of file clone.c.

References bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), bu_vls_trunc(), directory::d_namep, GED_CHECK_ARGC_GT_0, GED_CHECK_DATABASE_OPEN, GED_CHECK_READ_ONLY, GED_ERROR, GED_HELP, GED_OK, ged::ged_result_str, get_args(), ged_clone_state::olist, and rt_uniresource.

Here is the call graph for this function: