Skip to documentation
DocumentationAll documentsEnglish

TANKILL-G(1)

NAME

tankill-g - convert UK TANKILL triangular mesh geometry to a BRL-CAD database

On this page

SYNOPSIS

tankill-g [-v] [-n] [-k] [-t _tolerance_] [-x _lvl_] [-X _lvl_] [-i _input.tankill_] [-o _output.g_]

DESCRIPTION

tankill-g converts a model in the UK TANKILL format (a simple triangular patch format used by the British Defence Research Agency) into a BRL-CAD .g database. TANKILL describes each object as a series of vertices from which triangular facets are built in a strip: vertices one, two and three; then two, three and four; then three, four and five; and so on.

Each object is converted to a single bot(5) solid by default (or to an nmg(5) solid with -n), placed into its own region, and assigned the component code given in the TANKILL file. The resulting regions are collected into a hierarchy of groups based on their component codes (for example 00XX_codes, 0XXX_codes, and a top level all group). Component code 1000 is treated as an air region; component code 1001 is skipped by default unless -k is given.

Input is read from standard input unless -i is used, and output is written to tankill.g unless -o is used.

OPTIONS

-v

Verbose output; report each component, solid, region, and group as it is created.

-n

Write each object as an nmg(5) solid instead of the default bot(5) solid.

-k

Keep components with id 1001 (these are normally skipped as non-physical).

-t tolerance

Minimum distance, in millimeters, below which two vertices are treated as the same vertex. The default is 0.0005.

-x lvl

Set the librt debug flag to the given hexadecimal value.

-X lvl

Set the NMG debug flag to the given hexadecimal value.

-i input.tankill

Read the TANKILL model from the named file instead of standard input.

-o output.g

Write the BRL-CAD database to the named file instead of tankill.g.

EXAMPLES

Example 1. Convert a TANKILL model and inspect the result
tankill-g -t 0.01 -i tank.tankill -o tank.g
mged tank.g 'tops'

Convert tank.tankill into tank.g, merging vertices within 0.01 mm of each other, then list the top-level objects of the new database (such as the all group) with mged(1).

Example 2. Pipe TANKILL data through a filter and keep 1001 components as NMGs
gunzip -c tank.tankill.gz | tankill-g -n -k -o tank.g

Read gzip-compressed TANKILL data from standard input, retain the normally skipped component code 1001, and write nmg(5) solids to tank.g.

SEE ALSO

brlcad(1), mged(1), fast4-g(1), bot(5), nmg(5)

AUTHOR

BRL-CAD Team

This software is Copyright (c) 1993-2026 by the United States Government as represented by U.S. Army Research Laboratory.

BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org