DB(nged)
Provides an interface to a number of database manipulation routines.
π DB(nged) β the database-manipulation interface, bestie edition
okay so this is from the BRL-CAD MGED Commands manual set, and it's genuinely one of my fave utility commands because it just... does everything?? like it's the main character of database manipulation fr fr π«Ά
β¨ NAME β¨
db β provides an interface to a number of database manipulation routines.
πΈ SYNOPSIS πΈ
db {command} [arguments]
π¦ DESCRIPTION π¦
So db gives you an interface to a whole bunch of database manipulation routines. Lowkey iconic.
β οΈ heads up bestie: this command always operates in units of millimeters. no cap. every single time.
The {command} you pass has to be one of the following, each with its own appropriate arguments:
match [regular_exp]β returns a list of all the objects in that database that match the list of regular expressions. it's giving search bar energy π.get shape_or_path [attribute]β returns info about the primitive shape sitting at the end of the shape_or_path. if you hand it a path, the transformation matrices you run into along that path get accumulated and then applied to the leaf shape before it shows you the information. if you don't specify an attribute, you get all the details about the shape. if you do list a specific attribute, then only that info comes back. choose your fighter π .put shape_name shape_type attributesβ creates a shape named shape_name of type shape_type, with attributes exactly as listed in attributes. the arguments toputare the same ones thatgetgives you back β they're matching besties π«Ά.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.form object_typeβ displays the format used to display objects of type object_type.topsβ returns all top-level objects. the popular kids π.closeβ closes the previously opened database and deletes the associated command. it's giving goodbye, it's giving closure, it's giving self-care π.
π EXAMPLES π
These examples show off using the db command to list various objects and attributes from the database, plus creating new TGC shapes, adjusting a vertex attribute, and displaying command formats. let's gooo π₯
Example 1. List all objects in the database that end with .s
mged> db match *.s
Gets a list of all objects in the database that end with .s. no thoughts, just shapes β¨
Example 2. List all attributes and their values for cone.s
mged>db get cone.s
Gets a list of all the attributes and their values for shape cone.s. the full lore drop π
Example 3. Get the value of the vertex attribute of cone.s
mged>db get cone.s V
Gets the value of the V (vertex) attribute of shape cone.s. just the one detail, very minimal, very demure π
Example 4. Create a new TGC shape named new_cone.s with specified attributes.
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. look at her go, a star is born β
Example 5. Adjust the vertex attribute of new_cone.s to a given value.
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}. glow-up arc complete π
Example 6. Display the format used by the get and put commands for the TGC shape type.
mged>db form tgc
Displays the format used by the get and put commands for the TGC shape type. iykyk π§
π AUTHOR π
BRL-CAD Team β they ate and left no crumbs.
π BUG REPORTS π
got a bug? a problem? a little situation? π reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. they want to hear from you, bestie, fr fr.
and that's the whole page! brought to you by BRL-CAD and the DB(nged) manual page β big slay, no date on this one, we're living in the moment β¨ππ
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms