annotate.c File Reference
#include "common.h"
#include <string.h>
#include "ged.h"
Include dependency graph for annotate.c:

Go to the source code of this file.


void annotate_help (struct bu_vls *result, const char *cmd)
int ged_annotate (struct ged *gedp, int argc, const char *argv[])

Detailed Description

The annotate command.


annotate [text {string}] [as label|leader|angular|radial|dimension|table|note|box|axes|plane [named {name}]] [on|for {object1} [and {object2}] [and {...}]] [to|thru|at {point|plane} [offset {distance|vector}]] [align auto|model|view] [position auto|fixed|absolute|relative] [visible always|never|rendering|wireframe]

[help] [list {name}] [get {key} from {name}] [set {key=value} on {name}]

annotate help annotate text "Hello, World!" annotate for all.g annotate as label named my.note for all.g text "This is a tank." annotate as box text "This geometry is unclassified."


Types: text (see Text), leader, angular, radial, aligned, ordinate, linear

Extended types: note, label, table, dimension, tolerance, box (see Box), axes, plane

Orientation: auto, horizontal, vertical, above, below, inline

Align: auto, model, view

Text: fontname, fontsize, fontstyle (regular, italic, bold), linespacing, justification Justification: undefined left center right bottom middle top bottomleft bottomcenter bottomright middleleft middlecenter middleright topleft topcenter topright

Decoration: color, leader line, box (see Box) around target, box around annotation

Box: empty, hatch, gradient, solid

Placement: position (auto/fixed/relative/absolute), scale, orientation/rotation/twist, head/tail auto is automatic static placement fixed is 2d coordinate relative to view absolute is 2d coordinate relative to world center or global 3d position relative is 2d coordinate relative to view center or 3d offset distance from target center

Leader: linelength, linewidth, type (no head, arrow head, round head, square head)

Visibility: auto, wireframe, render, both

linearformat: "%.2f" linearunits: mm, m, in, ft, etc.

angularformat: "%.2f" angularunits: degrees, radians

struct parameters: type plane point list text? color? visibility?

Definition in file annotate.c.

Function Documentation

void annotate_help ( struct bu_vls result,
const char *  cmd 

Definition at line 113 of file annotate.c.

References bu_vls_printf(), and usage().

Referenced by ged_annotate().

Here is the call graph for this function:

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

Creates an annotation.

Definition at line 122 of file annotate.c.

References annotate_help(), bu_argv_from_string(), bu_calloc(), bu_free(), bu_log(), bu_vls_addr(), bu_vls_free(), bu_vls_from_argv(), BU_VLS_INIT_ZERO, bu_vls_putc(), bu_vls_trunc(), GED_CHECK_ARGC_GT_0, GED_CHECK_DATABASE_OPEN, GED_CHECK_READ_ONLY, GED_ERROR, GED_HELP, GED_OK, and ged::ged_result_str.

Here is the call graph for this function: