db {command} [arguments]
db(nged)
NAME
db - Provides an interface to a number of database manipulation routines.
On this page
SYNOPSIS
DESCRIPTION
Provides an interface to a number of database manipulation routines. Note that this command always operates in units of millimeters. The command must be one of the following with appropriate arguments:
- adjust shape_name attribute new_value1 [new_value2 new_value3…]
-
Modifies the shape named shape_name by adjusting the value of its attribute to the new_values.
- close
-
Closes the previously opened database and deletes the associated command.
- concat [-h] [-t] [-u] [-c] [-s|-p] [-L] [-O] {database_file} [affix]
-
Concatenates an existing BRL-CAD database to the database currently being edited.
- find [-a] <objects>
-
Displays all combinations that have any of the objects specified as a member. By default, db find will only return non-hidden objects. The
-aoption will include hidden objects. - form object_type
-
Displays the format used to display objects of type object_type.
- get shape_or_path [attribute]
-
Returns information about the primitive shape at the end of the shape_or_path. If a path is specified, the transformation matrices encountered along that path will be accumulated and applied to the leaf shape before displaying the information. If no attribute is specified, all the details about the shape are returned. If a specific attribute is listed, then only that information is returned.
- match [regular_exp]
-
Returns a list of all objects in that database that match the list of regular expressions.
- put shape_name shape_type attributes
-
Creates shape named shape_name of type shape_type with attributes as listed in attributes. The arguments to the put command are the same as those returned by the get command.
- tops
-
Returns all top-level objects.
- version
-
Print the version of the currently open BRL-CAD database.
EXAMPLES
The following examples show the uses of the db command to list various objects and attributes from the database, as well as to create new TGC shapes, adjust a vertex attribute, and display command formats.
- mged> db match *.s
-
Gets a list of all objects in the database that end with .s.
mged>db get cone.s
Gets a list of all the attributes and their values for shape cone.s.
mged>db get cone.s V
Gets the value of the V (vertex) attribute of shape cone.s
mged>db put new_cone.s tgc V {0 0 0} H {0 0 1} A {1 0 0} B {0 1 0} C {5 0 0} D {0 5 0}
Creates a new TGC shape named new_cone.s with the specified attributes.
mged>db adjust new_cone.s V {0 0 10}
Adjusts the V (vertex) attribute of new_cone.s to the value {0 0 10}.
mged>db form tgc
Displays the format used by the get and put commands for the TGC shape type.
AUTHOR
BRL-CAD Team
BUG REPORTS
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org