ANALYZE(nged)
Report and/or compute analytical information about the listed objects.
π ANALYZE β the nged glow-up report card π
okay bestie, welcome to ANALYZE(nged) from the BRL-CAD User Commands collection β yes it's a real nged manual page and yes it's kind of iconic. this one's a whole multitool: it reports on your geometry, it builds new shapes for you, and it even tells you whether a point is inside or outside a thing. let's get into it π
β¨ NAME β¨
analyze β reports and/or computes analytical information about the objects you list. that's the whole vibe. π
β¨ SYNOPSIS β¨
analyze [options] [subcommand] [subcmd_options]...
summarize {obj1 [...]}
intersect [-o output_obj] [-h] {obj1 obj2 [...]}
subtract [-o output_obj] [-h] {obj1 obj2 [...]}
inside {obj1} {x} {y} {z}
β¨ DESCRIPTION β¨
so analyze is giving many talents, ok? it's an array of reporting and shape-generation capabilities all chillin' in one command. π¦
the classic behavior β and like, what you get if you call it with no subcommand at all β is a report summarizing geometric information about the solid(s) you named. and if you want to be extra and say it out loud, you can invoke that same behavior explicitly with the summarize subcommand. same thing, different energy. β¨
the inside subcommand takes an object plus the x y z coordinates of a point, and reports whether that point is inside or outside the object in question. it returns 1 if inside and 0 otherwise. yes, just a little number. very demure, very minimal. π«Ά
the intersect subcommand takes the first object you specified and intersects it with every object after it β so effectively you're building up a brand new object made of the geometry common to all the objects you specified. intersection slay. π₯
the subtract subcommand takes the first object you specified and subtracts from it all the objects that come after it. bye bye geometry. π
β¨ OPTIONS β¨
-h,βhelpβ prints help. that's it, that's the whole thing. π-v,βverboseβ cranks up the reporting verbosity for the top-levelanalyzereporting mode. more words, more detail, more everything. π£οΈ
ngl, the subcommands bring their own little flags too βintersectandsubtractboth take-o output_obj(to name where the result goes) and-h(help). don't leave home without checking them.
β¨ EXAMPLES β¨
πΈ Example 1. Analyze a particular ARB
mged>analyze box.s
box.s: ARB8
1 (30.0283, -5.21153, -16.3791)
2 (30.0283, 21.5812, -16.3791)
3 (30.0283, 21.5812, 10.4137)
4 (30.0283, -5.21153, 10.4137)
5 (3.23558, -5.21153, -16.3791)
6 (3.23558, 21.5812, -16.3791)
7 (3.23558, 21.5812, 10.4137)
8 (3.23558, -5.21153, 10.4137)
+------+---------------------------+-------------------------------------------------+--------------+
| FACE | ROT FB | PLANE EQUATION | SURFACE AREA |
+------+---------------------------+-------------------------------------------------+--------------+
| 1234 | 0.00000000 0.00000000 | 1.00000000 0.00000000 0.00000000 30.02833557 | 717.85172729 |
| 5678 | 180.00000000 -0.00000000 | -1.00000000 -0.00000000 -0.00000000 -3.23558044 | 717.85172729 |
| 1584 | 270.00000000 -0.00000000 | -0.00000000 -1.00000000 -0.00000000 5.21152973 | 717.85172729 |
| 2376 | 90.00000000 -0.00000000 | -0.00000000 1.00000000 -0.00000000 21.58122540 | 717.85172729 |
| 1265 | 0.00000000 -90.00000000 | -0.00000000 0.00000000 -1.00000000 16.37908936 | 717.85172729 |
| 4378 | 0.00000000 90.00000000 | 0.00000000 -0.00000000 1.00000000 10.41366577 | 717.85172729 |
+------+---------------------------+-------------------------------------------------+--------------+
+--------------------+--------------------+--------------------+--------------------+
| EDGE LENGTH | EDGE LENGTH | EDGE LENGTH | EDGE LENGTH |
+--------------------+--------------------+--------------------+--------------------+
| 12 26.79275513 | 23 26.79275513 | 34 26.79275513 | 14 26.79275513 |
| 15 26.79275513 | 56 26.79275513 | 26 26.79275513 | 67 26.79275513 |
| 78 26.79275513 | 58 26.79275513 | 48 26.79275513 | 37 26.79275513 |
+--------------------+--------------------+--------------------+--------------------+
+-------------------------------+
| Volume = 19233.22554681 |
| Surface Area = 4307.11036376 |
| Gallons = 0.00508088 |
+-------------------------------+
look at those tables. the way that output ate and left no crumbs. π
πΈ Example 2. Analyze a particular TOR
mged>analyze tor
tor: torus (TOR)
V (4.91624, -32.8022, 31.7118), r1=25.4 (A), r2=5.08 (H)
N=(0, 1, 0)
A=(0, -0, 1)
B=(1, 0, -0)
vector to inner edge = (0, -0, 20.32)
vector to outer edge = (0, -0, 30.48)
Centroid: (4.91624, -32.8022, 31.7118)
+-------------------------------+
| Volume = 12938.70529707 |
| Surface Area = 5093.97853992 |
| Gallons = 0.00341804 |
+-------------------------------+
a donut got measured. she's got a centroid and everything. π©
πΈ Example 3. Points inside a sphere
mged>l sph.s
sph.s: ellipsoid (ELL)
V (0, 0, 0)
A (10, 0, 0) mag=10
B (0, 10, 0) mag=10
C (0, 0, 10) mag=10
A direction cosines=(0, 90, 90)
A rotation angle=0, fallback angle=0
B direction cosines=(90, 0, 90)
B rotation angle=90, fallback angle=0
C direction cosines=(90, 90, 0)
C rotation angle=0, fallback angle=90
mged>l pnts.s
pnts.s: Point Cloud (PNTS)
Total number of points: 6
Default scale: 0.000000
point#, (point)
1, (2.000000 2.000000 2.000000)
2, (0.000000 0.000000 -5.000000)
3, (0.000000 0.000000 10.000000)
4, (0.000000 0.000000 20.000000)
5, (10.000000 0.000000 10.000000)
6, (0.000000 10.000000 20.000000)
mged>analyze intersect -o inside.s pnts.s sph.s
3
mged>l inside.s
inside.s: Point Cloud (PNTS)
Total number of points: 3
Default scale: 0.000000
point#, (point)
1, (0.000000 0.000000 10.000000)
2, (0.000000 0.000000 -5.000000)
3, (2.000000 2.000000 2.000000)
so we kept only the points that live inside the sphere and dropped inside.s with 3 points in it. that's the intersection vibe check and everybody passed. β¨
πΈ Example 4. Points outside a sphere
mged>l sph.s
sph.s: ellipsoid (ELL)
V (0, 0, 0)
A (10, 0, 0) mag=10
B (0, 10, 0) mag=10
C (0, 0, 10) mag=10
A direction cosines=(0, 90, 90)
A rotation angle=0, fallback angle=0
B direction cosines=(90, 0, 90)
B rotation angle=90, fallback angle=0
C direction cosines=(90, 90, 0)
C rotation angle=0, fallback angle=90
mged>l pnts.s
pnts.s: Point Cloud (PNTS)
Total number of points: 6
Default scale: 0.000000
point#, (point)
1, (2.000000 2.000000 2.000000)
2, (0.000000 0.000000 -5.000000)
3, (0.000000 0.000000 10.000000)
4, (0.000000 0.000000 20.000000)
5, (10.000000 0.000000 10.000000)
6, (0.000000 10.000000 20.000000)
mged>analyze subtract -o outside.s pnts.s sph
3
mged>l outside.s
outside.s: Point Cloud (PNTS)
Total number of points: 3
Default scale: 0.000000
point#, (point)
1, (0.000000 10.000000 20.000000)
2, (10.000000 0.000000 10.000000)
3, (0.000000 0.000000 20.000000)
same energy, opposite direction: subtract the sphere from the point cloud and the leftover 3 points are the ones outside. outside.s said "not me being the outside group" and honestly? mood. π
β¨ AUTHOR β¨
the BRL-CAD Team wrote this. legends only. π
β¨ BUG REPORTS β¨
found a bug or a problem? don't suffer in silence bestie β report it via electronic mail to devs@brlcad.org. π«Ά
and that's the page! π source/version is BRL-CAD, filed under ANALYZE(nged) in the BRL-CAD User Commands lineup β the footer literally just says BRL-CAD and ANALYZE(nged) with no date attached, so no invented tea here. go analyze something pretty. β¨ππ¦
π¦ 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