gdiff [options]... left_object right_object
GDIFF(nged)
NAME
gdiff - a BRL-CAD differential geometry comparator
On this page
SYNOPSIS
DESCRIPTION
gdiff compares BRL-CAD geometry objects using LIBRT’s solid raytracing capabilities and visualizes differences in the display manager.
Red segments are those generated only from intersections with the left_obj object while blue segments represent intersections unique to the right_obj object. White segments represent intersections common to both objects. By default, only segments unique to the left and/or right objects are displayed.
Users will want to pay careful attention to grid size. By default gdiff will try to guess a reasonable grid spacing using the bounding boxes of the objects in question, but depending on the visual quality of the result users may want to adjust the spacing up or down. Be careful of specifying tolerances that are too fine - performance will drop off rapidly as grid spacing becomes very small.
OPTIONS
- -h, --help
-
Print help.
- -g spacing, --grid-spacing spacing
-
Control the spacing of the test-ray grid in millimeters.
- -l, --view-left
-
Visualize solid segments occurring only in the left object.
- -r, --view-right
-
Visualize solid segments occurring only in the right object.
- -b, --view-both
-
Visualize solid segments occurring in both the left and right objects.
- -G, --grazing
-
Report differences in grazing hits. By default, grazing-hit differences are reported only when nearby offset rays confirm a difference; this option disables that filter.
- -S, --structure
-
Enable structure-diff mode. Instead of raytracing, gdiff compares tree structure, matrices, boolean operators, and leaf geometry while ignoring object names. This mode does not currently produce visual output.
EXAMPLES
mged> gdiff --grid-spacing 1.0 left.r right.r
Shoots a comparison grid across left.r and right.r and displays segments that appear only in one object or the other.
mged> gdiff --structure left.r right.r
Checks whether the two trees differ in matrices, booleans, or leaf geometry without generating view output.
AUTHOR
Clifford Yapp
COPYRIGHT
This software is Copyright (c) 2016-2026 United States Government as represented by the U.S. Army Research Laboratory.
BUG REPORTS
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org