STAT(nged)

report information about objects in a BRL-CAD database

πŸ“… published 7.44.0, from nixpkgs unstable

πŸ’– STAT(nged) πŸ’–

okay so welcome to STAT(nged), the BRL-CAD manual page where the GED stat command gets its whole main-character moment ✨ bestie, this one is all about peeking into a BRL-CAD .g file and getting a cute little table of what’s inside πŸŽ€


✨ NAME ✨

stat β€” report information about objects in a BRL-CAD database πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

stat [-h] [-?] [-v] [-q] [-r] [-F string] [-C type1[,type2]...] [-S type1[,type2]...] [-o filename] {glob pattern}

🌸 DESCRIPTION 🌸

The GED stat command reports information about objects in a BRL-CAD .g file. It produces a configurable table and can filter, sort, and redirect the reported results. Periodt. πŸ’–


πŸŽ€ OVERVIEW πŸŽ€

The GED stat command reports information about objects in a BRL-CAD .g file. It produces tabular output, with options for user configurability and sorting. It’s giving β€œdatabase gossip, but make it organized.” 😌

Available types reflect geometry object data:

πŸ“Š Table 1. STAT Information Keys - Core Object Info πŸ“Š

  • name β€” Object database name (for example, "primitive.s")
  • uses β€” Number of uses, from instancing
  • size β€” Size of database object
  • refs β€” Number of times object is referenced by COMBs
  • flags β€” Flags
  • major_type β€” Object major type
  • minor_type β€” Object minor type
  • type β€” Object type (short name)

In addition to the above standard keys, attributes may also be specified. If the desired attribute happens to have the same name as one of the above standard keys, the prefix attr: may be added to denote an attribute. iykyk 🫢


πŸ’… OPTIONS πŸ’…

  • -h, -?, β€”help β€” Print help and exit.
  • -v, β€”verbosity β€” Increase output verbosity. Repeating -v increases it further.
  • -q, β€”quiet β€” Decrease output verbosity. Repeating -q decreases it further.
  • -r, β€”raw β€” Print raw values, instead of human friendly strings (for example, 5195952 for a size instead of 5.0M).
  • -F, β€”filter β€” Specify search style filters to trim down what is reported in stat output.
  • -C, β€”columns β€” Supply a comma separated list of column specifiers or attribute keys to define the table layout for stat.
  • -S, β€”sort-order β€” Supply a comma separated list of column specifiers or attribute keys to specify a sorting priority for stat. Priority is left to right - sorting will be performed first based on the leftmost specifier, and subsequent specifiers will be used to resolve any ties. To reverse the ordering decisions for a given column, prefix the specifier with a ! character.
  • -o, β€”output-file β€” Write output to filename instead of the command prompt.

🌈 EXAMPLES 🌈

🌟 Example 1. Default Output 🌟

           stat *

                Object Name             uses   References   Flags   Type     Size
               ----------------------- ------ ------------ ------- -------- ------
                Default                 0      1            2       comb     288B
                NIST_MBE_PMI_7-10.3dm   0      0            2       comb     264B
                Solid1.r                0      1            6       region   280B
                Solid1.r.s              0      1            1       brep     859K
                Solid1_2.r              0      1            6       region   280B
                Solid1_2.r.s            0      1            1       brep     672K
                Solid1_3.r              0      1            6       region   280B
                Solid1_3.r.s            0      1            1       brep     431K
                Solid1_4.r              0      1            6       region   280B
                Solid1_4.r.s            0      1            1       brep     771K
                _GLOBAL                 0      0            8                96B

πŸ¦‹ Example 2. Sorting by Size πŸ¦‹

           stat -S "size" *

                Object Name             uses   References   Flags   Type     Size
               ----------------------- ------ ------------ ------- -------- ------
                _GLOBAL                 0      0            8                96B
                NIST_MBE_PMI_7-10.3dm   0      0            2       comb     264B
                Solid1_2.r              0      1            6       region   280B
                Solid1_3.r              0      1            6       region   280B
                Solid1.r                0      1            6       region   280B
                Solid1_4.r              0      1            6       region   280B
                Default                 0      1            2       comb     288B
                Solid1_3.r.s            0      1            1       brep     431K
                Solid1_2.r.s            0      1            1       brep     672K
                Solid1_4.r.s            0      1            1       brep     771K
                Solid1.r.s              0      1            1       brep     859K

πŸ’œ Example 3. Sorting by Size, Reversed Order πŸ’œ

           stat -S "!size" *

                Object Name             uses   References   Flags   Type     Size
               ----------------------- ------ ------------ ------- -------- ------
                Solid1.r.s              0      1            1       brep     859K
                Solid1_4.r.s            0      1            1       brep     771K
                Solid1_2.r.s            0      1            1       brep     672K
                Solid1_3.r.s            0      1            1       brep     431K
                Default                 0      1            2       comb     288B
                Solid1_3.r              0      1            6       region   280B
                Solid1.r                0      1            6       region   280B
                Solid1_2.r              0      1            6       region   280B
                Solid1_4.r              0      1            6       region   280B
                NIST_MBE_PMI_7-10.3dm   0      0            2       comb     264B
                _GLOBAL                 0      0            8                96B

πŸ“ Example 4. Filtering by Type πŸ“

           stat -F "-type brep" *

                Object Name    uses   References   Flags   Type   Size
               -------------- ------ ------------ ------- ------ ------
                Solid1.r.s     0      1            1       brep   859K
                Solid1_2.r.s   0      1            1       brep   672K
                Solid1_3.r.s   0      1            1       brep   431K
                Solid1_4.r.s   0      1            1       brep   771K

🧚 Example 5. Custom Columns 🧚

           stat -C "name,type,size,color" *

                Object Name             Type     Size   color
               ----------------------- -------- ------ -------------
                Default                 comb     288B   0/0/0
                NIST_MBE_PMI_7-10.3dm   comb     264B   0/0/0
                Solid1.r                region   280B   153/231/254
                Solid1.r.s              brep     859K
                Solid1_2.r              region   280B   255/206/142
                Solid1_2.r.s            brep     672K
                Solid1_3.r              region   280B   237/255/168
                Solid1_3.r.s            brep     431K
                Solid1_4.r              region   280B   178/178/178
                Solid1_4.r.s            brep     771K
                _GLOBAL                          96B

Source/version: BRL-CAD Β· manual: STAT(nged) Β· date: not shown in the original footer πŸŽ€ love u bestie, go slay some database inspection βœ¨πŸ’–

πŸ“¦ where this page comes from