Compare commits

...
4 Commits
11 changed files with 417 additions and 718 deletions
+9 -694
View File
@@ -1,702 +1,17 @@
commit 7a9b8958614d7af947e43a0e3bb18db6587d05d8
commit 975e0417fbffe1fb7b2f68b39cbccaad9e04fcb8
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Fri Mar 13 09:09:29 2026 -0400
Date: Thu Apr 16 11:50:42 2026 -0400
brledit is stand-alone intentionally - adjust
Spotted by Keith - we weren't respecting the -S flag when redrawing a previously drawn comb
commit 0bc0943116408f7990cb95f5b106585e45706c47
commit b311f6794789b647c191778bbc7b6382a0f46ab7
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Fri Mar 13 08:36:39 2026 -0400
Date: Fri Sep 25 11:57:01 2026 -0400
Update ChangeLog and release date
Update version number for 7.42.4 patch
commit fc905ca063dd18d98c94269351b1a0872a1c7299
commit 1eaf01d7b708d73e85b288826c93e3025f15f489
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Thu Mar 12 16:49:14 2026 -0400
Date: Wed Sep 23 15:20:33 2026 +0000
Move brledit to libbu - for bu_editor to work reliably, it has to be there for anything that might call bu_editor - which means it has to be there for libbu.
(cherry picked from commit dc2cca5853d24d9dea90f2cecb61529e04b42fb7)
commit 1a86cbd7acc40ec7affff2d046e6a0fa49ef0b21
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Thu Mar 12 15:16:57 2026 -0400
Move brledit to src/util, set up its license file - it needs to be installed as the last resort editor
(cherry picked from commit 433722851eb94d7cd0f1c24808191e32e3e742cd)
commit f2afb65a8e1a1fe4ee0962eb1986e227cec76184
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Thu Mar 12 12:55:48 2026 -0400
Update ChangeLog with commits being incorporated into rel-7-42-2
commit c1fc1ee1d8d70e8653c52122519c42ad666ac55b
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Thu Mar 12 12:42:58 2026 -0400
Update release numbers and date
commit 2a0af414df146fa4ee69cc8a51eea5dbe0e3a121
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Thu Aug 28 19:24:40 2025 -0400
Bump libpkg error msg buffer size
One of the GitHub CI runners had a long enough path that it hit the 128
char limit. Need to pick some value, so going with the fallback default
for MAXPATHLEN from common.h plus a little extra for message chars.
(cherry picked from commit ad91dec0282920feba3cff7dd176b898449786b7)
commit 88df8abbeb1fd56da360cfb45e02405fcc1f43a6
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Mon Mar 9 09:24:19 2026 -0400
document e46c6ddb6a and 1ac6bde653
commit 1ac6bde653b67d20cc6eb3c8b7949cccc49aeb5d
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Tue Dec 23 16:05:55 2025 -0500
another stab at better scaling gqa grid
We need to always work in mm. Otherwise we restrict our grid to 1 UNIT -
ie if we're working in m, the grid can only go down to 1m = 1000mm (is a
very loose grid).
Also, set the grid lower bound to be 1/10th the upper to see if we can
get some cheap convergence and higher accuracy value without sacrificing
too much speed.
NOTE: this value is still largely arbitrary and would be nice to verify
how much error this is introducing over a much slower precision run.
commit e46c6ddb6abaf3903b16315d356ae39aaee6f5a8
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Thu Sep 18 02:39:25 2025 -0400
need to have grid_step of atleast 1
commit e47ace67925c728acb527a15ea106ddf063f5d1e
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Fri Feb 20 09:58:20 2026 -0500
Bump patch number
commit b7ed363f3b10ee784c57cb99f81840156a46146b
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Thu Feb 19 12:12:44 2026 -0500
Note crash fix for invalid data input
commit 5982ac1303e56a5162916b63d3117ae1ab938c99
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Wed Feb 18 13:24:46 2026 -0500
cleanup unused var
commit b5440039ed920eabe92f47fca3cf76807ba284aa
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Wed Feb 18 12:51:13 2026 -0500
oops, inverted logic
commit 542354b6eb5140c56b89ae8e9e934d780190306c
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Wed Feb 18 11:05:06 2026 -0500
these should not be possible
since we've validated the point, vector math with real numbers should
not produce NaN/INF's. Remove unnecessary if check, but leave an assert
for completeness' sake
commit 75663b3f1842a81761d1d666f2cb8f08b0866265
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Wed Feb 18 11:03:27 2026 -0500
sanity asserts
commit 0fa200fb741d47f8f90977750f5718cbb3ce613e
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Wed Feb 18 10:03:20 2026 -0500
be a little more memory friendly
There's no reason to always allocate valid_faces array during prep.
Instead take a two-loop approach: the first pass assumes all faces are
valid and computes centroids + bounds directly. If an invalid face is
encountered, we enter a 'heavier' path where we then create the valid
face mapping to compact the array (skip the bad data).
This preserves crash resilience while reducing memory usage for the
"correct" usage of bots with good data.
commit 56a6640cb9eb1443103011c8e8cc9718fb585061
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Thu Feb 12 12:51:06 2026 -0500
better safeguards on bot prep
Josh caught a bot that crashes when raytraced. So, add a safety function
to protect prep from doing vector math on bad data (nan's / inf's).
Might have gotten a bit carried away with the validation checks -
performance impact is currently untested.
In the future, we could be smarter about stitching out the bad data, but
this edit matches old (< 7.42.0) behavior of just ignoring the problem
geometry and moving on to ray tracing.
commit e5044cc491ac7ae7ba34f9d6d0ca3af2990be1c5
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Tue Feb 17 11:27:38 2026 -0500
Right, the Qt6 approach won't work with Qt5
commit 02e8d3ec8e22fd10486413f5ce53a21a4d45d3c4
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Thu Feb 12 09:38:55 2026 -0500
Add stepcode dep update to NEWS items
commit b096fe7f7f0ce978e4fa0626a5b68452e743bc41
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Thu Feb 12 09:37:08 2026 -0500
Update sha1 to point to latest bext branch updates
commit 7eddd4769bb7159e857e73d9a95dba9b41a76080
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Wed Feb 11 10:16:18 2026 -0500
Updates for warnings and deprecations with newer Qt6
commit 3db6857feaff3afed1b5884951aef2d029120d3a
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Wed Sep 10 13:45:48 2025 -0400
Add brledit editor as a last-resort fallback
Originally based on https://github.com/troglobit/mg
We went with pico/nano style key bindings rather than emacs-style, since the
latter is more complex to deal with for a casual user. Anyone wanting more
powerful editing capabilities is also likely to have their preferred editor
set up - the envisioned use case for this is constrained/last-resort cases
where the only option is to use what is available.
The original code has been extensively reworked, simplified, etc. to produce a
minimalist console editor that can work both on Linux/OSX/etc. type systems and
the various Windows console environments. The latter in particular are very
difficult to deal with, and there will likely be various corner cases we
don't/can't handle well, but brledit has demonstrated the ability to edit a
file in PowerShell, Command Prompt and git bash.
Typically, the only environment where we might not have access to at least a vi
editor is a headless Windows server. If we're going to maintain console mode
on a Windows desktop without 3rd party editors installed brledit also comes
into play , but in that situation we can generally also fall back on local GUI
editors to get the job done as well. In one sense yori's yedit, a Windows-only
console editor and our previous last resort, covers the only truly problematic
case. Running in git bash, for example, we will generally have nano available
and so not need brledit. However, the switch is still worthwhile - brledit is
both a much smaller code footprint than yori and also works on POSIX type
systems in case some unforseen circumstance DOES end up making having our own
fallback there desirable or necessary.
In addition to brledit itself we have added new logic to the libtermio.h header
to deal with the requirements of its interace, which are much more extensive
than any of the other BRL-CAD utilities still leveraging libtermio.h. Previous
functionality was left in place, so the libtermio.h header update should
introduce no behaviorial changes in other tools.
This commit also swaps brledit in for yedit in bu_editor logic and removes the
yori directory we previously added to support compiling yedit as part of
BRL-CAD.
(cherry picked from commit 400037e12d00e5dd1b7e5cade93390f43b5d5240)
commit 5d971c51d649c76fc4e411091f89358d3662ba2f
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Tue Feb 10 09:37:32 2026 -0500
Typo
commit 15029fae8b4db00e102113e2c4be354b909a0ca8
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Mon Feb 9 14:24:50 2026 -0500
Use full checkout rather than co alias
commit 7edeafaf48f7d23e117afb0eb23b2fabea2eafc8
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Mon Feb 9 12:57:03 2026 -0500
Match CMakeLists.txt sha1
commit a1ce5c10a3e4e6b8c9b642be848f6bb5850d6228
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Mon Feb 9 09:47:05 2026 -0500
As with bext itself, only target macos-14 for this release
commit ee5c0e12bcec13b6f890370771eb18ee5bce4555
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Mon Feb 9 09:45:29 2026 -0500
Point 7-42-2 test branch at the latest test 7-42-2 bext sha1
commit a5e37dd4472a6cbd8e55d2470bf7477f769c53bf
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Thu Feb 5 14:47:25 2026 -0500
Update libtiff to v4.7.1
commit 3862f3c94873548e15c98134c3823f574d257312
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Thu Feb 5 13:14:32 2026 -0500
A lot of dependencies with CVE updates - update NEWS with the list so far.
commit ecb84ddb38810d9feac3f58733ec7f632300ada5
Author: joshbaker22 <141415098+joshbaker22@users.noreply.github.com>
Date: Wed Jan 7 10:22:32 2026 -0500
Update lc.xml
update notes for flags to reflect actual behavior (-d flag claims to only list 1 region per id but actually is designed to list only duplicate ids (regions that share ids)).
(cherry picked from commit a01688ff2d7750a8993b43e277574228310355dc)
commit cd28b5cfaadfe003459c025066fae87fa1ce140e
Author: joshbaker22 <141415098+joshbaker22@users.noreply.github.com>
Date: Mon Jan 5 10:05:29 2026 -0500
Update gqa.xml
add note on density file order
(cherry picked from commit e7fb6619591d342c295c6249d678a8645d9ee99f)
commit 6be84e7082c7e97e32c5c9f5cf4debc7abfd60ec
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Wed Dec 31 15:06:35 2025 -0500
document Josh's changes
(cherry picked from commit 6662c3318e3460720adcbab0f73c0c25b623763c)
commit 3ab24cabca2b4841a436d78893d903307cc80ca6
Author: joshbaker22 <141415098+joshbaker22@users.noreply.github.com>
Date: Mon Dec 29 14:34:39 2025 -0500
Update helplib.tcl
(cherry picked from commit b90147b26d61529d170874cc705d44a3462dba4f)
commit fe22bb795d232627b20d6f4aaa3b382cb9ac2628
Author: joshbaker22 <141415098+joshbaker22@users.noreply.github.com>
Date: Mon Dec 29 13:29:33 2025 -0500
Update view.xml
expand view save notes (with options listed out) and add example
(cherry picked from commit 27b23a1c1590a8a835f8134f5abf3f5ca43ed4eb)
commit 5e67a885b61515b16ce31400ec580e98ae8a8884
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Mon Dec 29 12:56:55 2025 -0500
want a literal ampersand here
(cherry picked from commit 0e17a6386d2ea0763a5d85e6c7f7cb6bbda9b929)
commit f9bb22f1ad999225375a707973cfe6895d7f8c9c
Author: joshbaker22 <141415098+joshbaker22@users.noreply.github.com>
Date: Mon Dec 29 12:49:20 2025 -0500
Update get.xml
reword name description to match syntax
(cherry picked from commit 44c5c2fbf7d2b84dca4e5a12aaad85274975ef55)
commit 5ae766bb16a71f383e5c62c3b723796aa23078e1
Author: joshbaker22 <141415098+joshbaker22@users.noreply.github.com>
Date: Mon Dec 29 12:29:52 2025 -0500
Update get.xml
add notes about adjust
(cherry picked from commit 908911eb6aeea1ba6a9695cfd0fdcd41e53c5ee9)
commit 4620183b2b538fb55b9713d86381f90079726992
Author: joshbaker22 <141415098+joshbaker22@users.noreply.github.com>
Date: Mon Dec 29 12:27:15 2025 -0500
Update CMakeLists.txt
add new adjust page
(cherry picked from commit b466ae0e7af483e97cc838cfb44e111251a51801)
commit f1993cb9148746780158302ea3a0fd158467dd45
Author: joshbaker22 <141415098+joshbaker22@users.noreply.github.com>
Date: Mon Dec 29 12:26:54 2025 -0500
Create adjust.xml
add new page for adjust
(cherry picked from commit f29054f9e133d177822a907ce54219bbf15728b3)
commit faf89c6fe216765049e6404f58d155adca02b058
Author: joshbaker22 <141415098+joshbaker22@users.noreply.github.com>
Date: Mon Dec 29 12:12:14 2025 -0500
Update helplib.tcl
update adjust to show that it works on solid parameters (not on metadata attributes). Make a note on get for the same (although it works on some basic attr as well (default region ones I think))
(cherry picked from commit a7cf1dc61237a73a637ad4ea8b865079d05327fd)
commit 768b4618344fec3f7637daca340f24c5ce1c881e
Author: joshbaker22 <141415098+joshbaker22@users.noreply.github.com>
Date: Mon Dec 29 11:52:52 2025 -0500
Update draw.xml
note on what -A -o does
(cherry picked from commit 561a8e50a79a69b771699f7814f8bf5e0e812f3a)
commit a400b360a4419bddaed893a90713ef248b434186
Author: joshbaker22 <141415098+joshbaker22@users.noreply.github.com>
Date: Mon Dec 29 11:46:38 2025 -0500
Update B.xml
Add flags to match draw command and quick note on -S and -m1.
(cherry picked from commit b3cccb00e93dc5f635c3b9219844f5f2768ce88a)
commit 6c7068a311669ae968f0aa90686498a337bda6ec
Author: joshbaker22 <141415098+joshbaker22@users.noreply.github.com>
Date: Mon Dec 29 11:39:07 2025 -0500
Update draw.xml
fix spacing issue after -A -o
(cherry picked from commit 091e4c881df57c95380d1452004cf22ed870e395)
commit 516f7c06c2e92409d13047865b352d25977949a1
Author: joshbaker22 <141415098+joshbaker22@users.noreply.github.com>
Date: Mon Dec 29 11:02:48 2025 -0500
Update voxelize.xml
adjust example to be 100 size and note defaults for each value.
(cherry picked from commit cbe6c1d6cb1c3811e2b4286bccd5ed30cff5edeb)
commit d9c2e82500435881d3c93ab7dbd7545f458b4f20
Author: joshbaker22 <141415098+joshbaker22@users.noreply.github.com>
Date: Mon Dec 29 10:29:56 2025 -0500
Update gqa.cpp
add p in options after -A (for display with -h)
(cherry picked from commit b570d5dc2e46b8d83e18f4e5a6d25776d8d44dba)
commit e90f4c46d24b3918b32e64df1a5c0a30c1b99270
Author: joshbaker22 <141415098+joshbaker22@users.noreply.github.com>
Date: Mon Dec 29 10:17:18 2025 -0500
Update center.xml
fix typo (extra > in example)
(cherry picked from commit 7cc0f24a162ee601cd824461760df67f572a88d1)
commit 07423da5bfa5a535c7c7f68c57e9bd5c84d0b4dc
Author: joshbaker22 <141415098+joshbaker22@users.noreply.github.com>
Date: Mon Aug 18 10:08:31 2025 -0400
Update gqa.xml - removed extra > after p (under analysis flags)
(cherry picked from commit 7c4455d3ea220dc1cac8bf8c86b17adbcb223620)
commit 947d7cf728a89b067ed67880167cda69ce6e0d36
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Wed Feb 4 10:45:24 2026 -0500
Document open cmd reporting fix
commit 09a092581ee3d125355ce8abe145ff26f44ec64b
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Fri Jan 23 14:13:12 2026 -0500
If we don't have a database open, report that.
(cherry picked from commit 399356125e8429125aad10ae7f2461a86ecb4843)
commit accdc0384278d81111f4f534a55ddb1506d31cdb
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Wed Jan 21 16:56:27 2026 -0500
While I'm at it, do the same check in g2asc
(cherry picked from commit db8e79d886dd12e417930deb9eee8d978aaf310b)
commit 633eec2a03c7abb431e1860d51e829efc3f9d785
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Wed Jan 21 16:52:18 2026 -0500
Update asc2g to not overwrite input file if specified as output
Ugh. Let's not do that again. Sanity check that the user didn't
specify the input file as the output file. Previously that would
dump output to the input file and corrupt it.
(cherry picked from commit 12ec562e6cdb1c9e7d910392e87f0831e100f7f1)
commit 1b4cb31ba6f88e634889c22306ca05861c27f928
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Mon Jan 12 15:11:40 2026 -0500
Fix default behavior of open cmd when creating non-extant files
Back in commit e0384c3abc29a6b4 in 2023, I added a -c option to open for
creating files. In the process, I inadvertantly broke the default ged open
behavior when supplied with a filename that didn't yet exist, and various uses
of the opendb command in MGED and Archer depended on that.
This restores the "create by default" behavior. To allow for cases were we
don't want that, we need to add an "o" option to disable it and only open
existing files - the default behavior needs to remain create. We'll leave
the -c option for compatibility, since it is harmless.
(cherry picked from commit e7c5ca378047573b00f806dc6c0f3177cd07b610)
commit 50c8016ffcead1d148b8f1bd93a17fd549339919
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Wed Nov 26 10:21:29 2025 -0500
Fix static initialization order issues in libged/libdm plugin registries
Global registry objects (using STL containers) in libged and libdm were defined
as static variables at file scope. This risks "static initialization order
fiasco" - static constructors from other translation units (TUs) may access the
registries before they are initialized, causing crashes or undefined behavior,
especially in static builds with plugins.
The solution is to convert global registry objects to function-local static
"Meyers singletons". All registry accesses now use singleton getter functions,
ensuring construction is ordered and thread-safe by C++11 guarantees.
With this approach function-local statics are initialized on first use,
guaranteeing that any plugin constructor or TU macro accessing the registry
always gets a fully constructed object, regardless of cross-TU initialization
order. This makes static and dynamic plugin registration robust across all
platforms and build/link scenarios.
(cherry picked from commit 48a87e7e134c84a71f46db95c59adbaf68f048be)
commit 7c1e3c303750ab046157dff9dfabfb6e01833eb0
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Tue Nov 25 16:28:46 2025 -0500
Fixed a crash with bot -h when we don't have a database open - no reason we can't still print help.
(cherry picked from commit 35bf1f3ca0ce283719037b2060cea7cd1fe2e032)
commit e8f8715fb1c638c7baf0e50e57ae86bcb90c3c09
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Fri Nov 21 16:33:56 2025 -0500
Fix libged (i.e. MGED's) handling of nirt -c option to disable ray point backout
(cherry picked from commit a788c096152fe0181402ab05b08f4744f9c4a250)
commit efe0496b07b87965cc22227f00043351f7f73b44
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Fri Sep 26 11:20:11 2025 -0400
Add workaround for broken OSX signal header
(cherry picked from commit 1a9c712da501e0bd92447e4aac4f3cf825792bb9)
commit bd2087f3d5877cb8e15bd2ced78cd47c2dbc275c
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Tue Sep 9 12:00:36 2025 -0400
Don't create an LoD cache unless we need it.
(cherry picked from commit bccb3733e69f38fed0a3ee3cc9fd1bc340ddef70)
commit 79949ffd43d0b4aef21621f770dc1c50d75c1bea
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Sat Aug 30 23:42:47 2025 -0400
Add workaround for broken Xcode signal.h header
Apparently Xcode 16.4 has a broken signal.h header that uses NSIG but
doesn't define it.
(cherry picked from commit db6809643e4796ad13651301b357da28ec9bb7f4)
commit c7f2cbdab278bbb6ff0de9cd01cfb21cc10f81a1
Author: ChangJoon Lee <changjoonlee@me.com>
Date: Thu Aug 21 17:39:18 2025 +0900
Remove documentation error in clang
(cherry picked from commit 68ad20e42c7fb8ab18fff0a0ebeea4cad9f66ab3)
commit a3903fab55bc1eb7e6eac9bd6e246cb9ed45770f
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Sun Aug 17 00:13:30 2025 -0400
Add error case if all THREADLOCAL attempts fail
Per suggestion from Sean, make the failure to define THREADLOCAL
explicit.
(cherry picked from commit 5e54a73797e415cbc8e794a6b2c94c78875e09c8)
commit 44782d88bdc7998c750fff305c007339d2e4f5f3
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Sat Aug 16 23:07:18 2025 -0400
Define THREADLOCAL to use for per-thread storage
How to properly identify per-thread storage varies somewhat with
different standards and platforms - boil the various cases down to a
THREADLOCAL encapsulation we can use in our code.
(cherry picked from commit fc7c51af95cc18e3adddcbf258429b77ef59c432)
commit c8a53047c910543be6a44cc9b1cece98d124dc72
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Tue Aug 12 16:30:43 2025 -0400
Stop bot remesh subcmd from clearing output
Was truncating the help message being built up for the bot subcommands.
(cherry picked from commit 3dd6914b578337e32861d6cff85ccd6dc1c3ef20)
commit 8482dc235a0a436a90995611b2ef8fae2b83cb21
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Wed Feb 4 10:00:05 2026 -0500
Correct BoT raytracing behavior when starting pt inside mesh
Josh found a test case (long small arb subtracted from narrow large arb) where
the new raytracing code wasn't properly evaluating the subtraction.
Turned out that the new code wasn't backing a starting ray point that was
inside a BoT mesh out of the mesh before intersecting with the BVH tree - the
result was that only the triangles after the start of the ray were reported.
That in turn resulted in single hit reports that produced no solid segments -
with nothing for boolweave to process from the subtraction solid, we got no
subtraction in the rendering result.
Fix is straightforward and consistent with how other primitives are handled -
back the start point out along the ray for the solve so we properly get all
triangles from a mesh intersection even when the originally specified ray pt is
inside the mesh.
This evidently didn't show up in more normal testing because it is rare for a
starting ray point to be set up inside geometry - when the same geometry
configuration was set up as a union rather than a subtraction it worked,
because the staring ray point calcluated for the scene incorprated both
bounding boxes. The overall scene bounding calculation does not incorporate
subtractions (since they do not contribute positive volume they're not a good
basis for things like autoview sizing) and in most geometries that means the
ray point is already backed up "far enough". The corner case of a subtraction
volume outside the overall scene was what was needed to trigger this issue.
(cherry picked from commit 0a8a286e34a6f81d3f44f84b0f1f1bac863394e3)
commit a3091bed40140a40e49a83007511287d4fb0167b
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Wed Jan 21 18:11:35 2026 -0500
this is wrong
(cherry picked from commit fa85521fd564bca1adb033e1b38b5a6096216311)
commit 1972c0246677828ca5f1658780820e086c7b1ae3
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Wed Jan 21 18:06:55 2026 -0500
get rid of the magic number
since we're now ensuring the ray origin WILL be outside of the root
node, we can ditch the -1 magic tolerance value here and use the
standard slab rejection criteria.
Use SMALL_FASTF instead of straight up 0.0 to give us a little
fuzz protection.
(cherry picked from commit 106f5fa6e553595b11b33b888841c4dad4ee91fa)
commit 1d759184924877f6ffc02678ddf63814dcb98907
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Wed Jan 21 18:00:10 2026 -0500
only backup our ray pt if we need to
the rp->r_min has already accounted for if the ray is inside the
bounding sphere. We can us it directly to back up rather than blindly
applying a bounding sphere diameter backout. This has the added
benefit of keeping our bot_shot_hlbvh_flat() function signature clean
of the soltab.
we can also do the backout in-line to avoid the tiny load/store overhead
and improve formula readability.
(cherry picked from commit 0cf43403e8a3746b6312535e5b0ba884e0f0272e)
commit 7376385fd24f0e55dcc3525f5085bfffbe924bcd
Author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
Date: Wed Jan 21 15:50:03 2026 -0500
For the initial fast culling test, back our r_pt out in the inverse ray direction.
Also try avoiding NaNs, but not sure this will make a major difference either
way performance wise.
(cherry picked from commit 042338c49cbc3b72658ff5d4960f24de997a15fa)
commit e12863573f8d7809c7ab1b8792475cc2a63b0600
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Tue Jan 20 14:44:01 2026 -0500
improve readability
probably way overkill on the comments but oh well
(cherry picked from commit fb2757bee85730fe39eb3a8405300f573de512f7)
commit a7cf755c0365ae1174875e4ad94e06d8a13f18f7
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Tue Jan 20 13:27:54 2026 -0500
pretty sure we want don't want bitwise
(cherry picked from commit 42ce6f5d64c1ac1fb0a335d1fbc934ef6e0c7014)
commit 437eaaf3ae7c1871ad33548509b6a556eb3badfe
Author: f4alt <christopherjmacgregor@gmail.com>
Date: Tue Jan 20 13:26:42 2026 -0500
make sure we're not accidentally wiping out the ray
(cherry picked from commit 3eba161f7b0aa5e825b16b85bf8fcb5ec7a817b0)
Backport commit de09372b73b fixing BoT raytracing interacting with bad r_min settings in multi-solid raytracing.
+11
View File
@@ -9,6 +9,17 @@ first and are grouped by release. Each release also includes optional
descriptive text that emphasizes or further describes significant
changes made. See document footer for additional details.
----------------------------------------------------------------------
--- 2026-10-08 Release 7.42.4 ---
----------------------------------------------------------------------
Follow-on patch release to 7.42.2 correcting a case where multiple
object raytracing could result in rays whose origins start inside
BoT primitives not backing out of the solid correctly.
* fixed ray origin pnt backout behavior in BoT primitives - Cliff Yapp
* respect-S flag redrawing a previously drawn comb - Cliff Yapp
----------------------------------------------------------------------
--- 2026-03-13 Release 7.42.2 ---
----------------------------------------------------------------------
+1 -1
View File
@@ -1,5 +1,5 @@
BRL-CAD
Release 7.42.2
Release 7.42.4
http://brlcad.org/
BRL-CAD is a powerful cross-platform open source combinatorial
+1 -1
View File
@@ -1 +1 @@
2
4
+7
View File
@@ -1,3 +1,10 @@
brlcad (7.42.4-0) unstable; urgency=low
* update brlcad version
-- Cliff Yapp <cyapp@brlcad.org> Thu, 08 Oct 2026 20:00:00 UTC
brlcad (7.42.2-0) unstable; urgency=low
* update brlcad version
+1 -1
View File
@@ -11,7 +11,7 @@
\f0\i\b\fs72 \cf0 README
\fs36 \
\f1\i0\b0\fs28 This is BRL-CAD 7.42.2 for Mac OS X. Please send any bugs, comments, questions, or suggestions to the project website.\
\f1\i0\b0\fs28 This is BRL-CAD 7.42.4 for Mac OS X. Please send any bugs, comments, questions, or suggestions to the project website.\
\fs22 \
+1 -1
View File
@@ -4,7 +4,7 @@
\margl1440\margr1440\vieww8020\viewh6280\viewkind0
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f0\fs22 \cf0 This installer will guide you through the installation of BRL-CAD 7.42.2 for Mac OS X and Darwin.\
\f0\fs22 \cf0 This installer will guide you through the installation of BRL-CAD 7.42.4 for Mac OS X and Darwin.\
\
This distribution of BRL-CAD requires approximately 500 MB of available disk space and does not include source code.\
\
+11
View File
@@ -2362,6 +2362,17 @@ BViewState::scene_obj(
sp->s_soldash = (is_subtract) ? 1 : 0;
}
// Align with vs draw_non_subtract_only settings
if (vs->s_dmode == curr_mode) {
if (sp->s_soldash && vs->draw_non_subtract_only) {
if (sp->s_flag != DOWN)
sp->s_flag = DOWN;
} else {
if (sp->s_flag != UP)
sp->s_flag = UP;
}
}
// Set line width, if the user specified a non-default value
if (vs && vs->s_line_width)
sp->s_os->s_line_width = vs->s_line_width;
+43 -20
View File
@@ -701,8 +701,46 @@ rt_bot_makesegs(hit_da *hits,
struct rt_piecestate *psp);
/* r_min may be the start of a spatial partition cell inside this solid.
* Start BVH traversal just before the ray enters the BoT root box so its
* entrance triangles are considered when assembling solid segments. */
static void
bot_backed_origin(point_t b_pt, const struct xray *rp, const struct bvh_flat_node *root,
const vect_t inv_dir, const struct soltab *stp)
{
fastf_t backout = MAX_FASTF;
int axis;
for (axis = X; axis <= Z; axis++) {
if (rp->r_pt[axis] < root->bounds[axis] ||
rp->r_pt[axis] > root->bounds[axis + 3]) {
VMOVE(b_pt, rp->r_pt);
return;
}
}
for (axis = X; axis <= Z; axis++) {
fastf_t distance;
if (rp->r_dir[axis] > 0.0)
distance = (rp->r_pt[axis] - root->bounds[axis]) * inv_dir[axis];
else if (rp->r_dir[axis] < 0.0)
distance = (root->bounds[axis + 3] - rp->r_pt[axis]) * -inv_dir[axis];
else
continue;
backout = FMIN(backout, distance);
}
if (backout < MAX_FASTF) {
fastf_t padding = stp->st_rtip ? stp->st_rtip->rti_tol.dist : BN_TOL_DIST;
VJOIN1(b_pt, rp->r_pt, -(backout + padding), rp->r_dir);
} else {
VMOVE(b_pt, rp->r_pt);
}
}
void
bot_shot_hlbvh_flat(struct bvh_flat_node *root, struct xray* rp, triangle_s *tris, size_t ntris, hit_da* hits, fastf_t toldist)
bot_shot_hlbvh_flat(struct bvh_flat_node *root, struct xray* rp, triangle_s *tris, size_t ntris, hit_da* hits, fastf_t toldist, const struct soltab *stp)
{
struct bvh_flat_node *stack_node[HLBVH_STACK_SIZE];
unsigned char stack_child_index[HLBVH_STACK_SIZE];
@@ -718,25 +756,10 @@ bot_shot_hlbvh_flat(struct bvh_flat_node *root, struct xray* rp, triangle_s *tri
inverse_r_dir[1] = RAYDIR_INV(rp->r_dir[1]);
inverse_r_dir[2] = RAYDIR_INV(rp->r_dir[2]);
// Because we are doing solid shotlining, we need to intersect all
// triangles on the line of the ray, even when the r_pt is inside the mesh.
// This means we DON'T want to cull hlbvh leaves behind our r_pt when the
// r_pt is inside the mesh. To avoid this, we back our r_pt up to the
// bounding sphere if needed. This incurs a slight
// performance penalty when r_pt is past the mesh but still within the
// bounding sphere diameter distance, since backing up will cause false
// bbox intersect matches in those cases. This is necessary to ensure we
// get the intersections needed for solid segment creation - the subsequent
// full intersection solves will still produce the correct results.
//
// NOTE: We DO, however, need to use the real rp->r_pt when doing the
// actual intersection solve math so our segments end up in the right
// place.
fastf_t backout = FMAX(0.0, -rp->r_min);
/* Only BVH culling uses the backed origin. Triangle intersections must
* remain relative to the original ray origin. */
point_t b_pt;
b_pt[X] = rp->r_pt[X] - backout * rp->r_dir[X];
b_pt[Y] = rp->r_pt[Y] - backout * rp->r_dir[Y];
b_pt[Z] = rp->r_pt[Z] - backout * rp->r_dir[Z];
bot_backed_origin(b_pt, rp, root, inverse_r_dir, stp);
while (stack_ind >= 0) {
if (UNLIKELY(stack_ind >= HLBVH_STACK_SIZE)) {
@@ -900,7 +923,7 @@ rt_bot_shot(struct soltab *stp, struct xray *rp, struct application *ap, struct
toldist = (DBL_EPSILON * stp->st_aradius * 10);
}
bot_shot_hlbvh_flat(sps->root, rp, sps->tris, bot->bot_ntri, &hits_per_cpu, toldist);
bot_shot_hlbvh_flat(sps->root, rp, sps->tris, bot->bot_ntri, &hits_per_cpu, toldist, stp);
if (hits_per_cpu.count == 0) {
return 0;
+5
View File
@@ -80,6 +80,10 @@ brlcad_addexec(rt_arb8 arb8_tests.c "librt;libwdb;libbg;libbu" TEST)
brlcad_addexec(bot_match bot_match.cpp "librt;libbg" TEST)
# BoT rays starting inside the mesh, including a spatially partitioned scene
brlcad_addexec(rt_bot_inside bot_inside.c "librt;libwdb;libbu;${M_LIBRARY}" TEST)
brlcad_add_test(NAME rt_bot_inside COMMAND rt_bot_inside)
# boolweave testing
brlcad_addexec(rt_boolweave rt_boolweave.c "librt" TEST)
@@ -91,6 +95,7 @@ set(
CMakeLists.txt
arb_intersect.g
binary_attribute.c
bot_inside.c
brep_boolean_tests.g
cyclic_tests.g
extreme_ssi_test.g
+327
View File
@@ -0,0 +1,327 @@
/* B O T _ I N S I D E . C
* BRL-CAD
*
* Copyright (c) 2026 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this file; see the file named COPYING for more
* information.
*/
#include "common.h"
#include <math.h>
#include <string.h>
#include "bu/app.h"
#include "bu/log.h"
#include "bu/malloc.h"
#include "raytrace.h"
#include "rt/geom.h"
#include "wdb.h"
/* ARS prep also uses BoT raytracing, but its RPP bounds can refresh r_min.
* Compare converted ARS and native BoT for direct and scene shots. */
#define RING_SIDES 8
#define RING_POINTS (RING_SIDES + 1)
static int
check_shot(const struct rt_functab *ftp, struct soltab *stp, struct application *ap, struct xray *ray, const char *label)
{
struct seg seghead;
struct seg *segp;
struct resource *resp = ap->a_resource;
int nhits;
int failed = 0;
BU_LIST_INIT(&seghead.l);
nhits = ftp->ft_shot(stp, ray, ap, &seghead);
if (nhits <= 0 || BU_LIST_IS_EMPTY(&seghead.l)) {
bu_log("%s: inside-origin ray missed\n", label);
failed = 1;
} else {
segp = BU_LIST_FIRST(seg, &seghead.l);
if (!NEAR_EQUAL(segp->seg_in.hit_dist, -9.0, SMALL_FASTF) ||
!NEAR_EQUAL(segp->seg_out.hit_dist, 7.0, SMALL_FASTF)) {
bu_log("%s: interval %g..%g, expected -9..7\n", label,
segp->seg_in.hit_dist, segp->seg_out.hit_dist);
failed = 1;
}
}
while (BU_LIST_WHILE(segp, seg, &seghead.l)) {
BU_LIST_DEQUEUE(&segp->l);
RT_FREE_SEG(segp, resp);
}
return failed;
}
struct scene_result {
int subject_hits;
fastf_t out_dist;
};
static int
scene_hit(struct application *ap, struct partition *part_head,
struct seg *UNUSED(finished_segs))
{
struct scene_result *result = (struct scene_result *)ap->a_uptr;
struct partition *part;
for (part = part_head->pt_forw; part != part_head; part = part->pt_forw) {
if (strstr(part->pt_regionp->reg_name, "subject.r")) {
result->subject_hits++;
result->out_dist = part->pt_outhit->hit_dist;
}
}
return result->subject_hits > 0;
}
static int
scene_miss(struct application *UNUSED(ap))
{
return 0;
}
/* The support sphere makes the cut tree start the ray's first cell
* inside the subject, while the subject itself spans the entire cell. */
static int
check_scene(int subject_id, const fastf_t *const curve_data[3],
fastf_t *vertices, int *faces, const char *file)
{
struct db_i *dbip = NULL;
struct rt_wdb *wdbp = NULL;
struct rt_i *rtip = NULL;
struct resource resp = RT_RESOURCE_INIT_ZERO;
struct wmember members;
struct application ap;
struct scene_result result = {0};
point_t support_center;
int failed = 0;
if (file) {
wdbp = wdb_fopen(file);
if (wdbp)
dbip = wdbp->dbip;
} else {
dbip = db_create_inmem();
if (dbip)
wdbp = wdb_dbopen(dbip, RT_WDB_TYPE_DB_INMEM);
}
if (!wdbp) {
if (dbip)
db_close(dbip);
return 1;
}
if (subject_id == ID_ARS) {
fastf_t **curves = (fastf_t **)bu_malloc(3 * sizeof(fastf_t *), "ARS curves");
size_t i;
for (i = 0; i < 3; i++) {
curves[i] = (fastf_t *)bu_malloc(RING_POINTS * ELEMENTS_PER_POINT *
sizeof(fastf_t), "ARS curve");
memcpy(curves[i], curve_data[i],
RING_POINTS * ELEMENTS_PER_POINT * sizeof(fastf_t));
}
failed += mk_ars(wdbp, "subject.s", 3, RING_POINTS, curves) != 0;
} else {
failed += mk_bot(wdbp, "subject.s", RT_BOT_SOLID, RT_BOT_CCW, 0,
RING_SIDES + 2, RING_SIDES * 2, vertices, faces,
NULL, NULL) != 0;
}
BU_LIST_INIT(&members.l);
if (!mk_addmember("subject.s", &members.l, NULL, WMOP_UNION))
failed++;
failed += mk_lcomb(wdbp, "subject.r", &members, 1, NULL, NULL, NULL, 0) != 0;
VSET(support_center, 1.5, 0, 4);
failed += mk_sph(wdbp, "support.s", support_center, 1.0) != 0;
BU_LIST_INIT(&members.l);
if (!mk_addmember("support.s", &members.l, NULL, WMOP_UNION))
failed++;
failed += mk_lcomb(wdbp, "support.r", &members, 1, NULL, NULL, NULL, 0) != 0;
if (failed)
goto done;
rtip = rt_new_rti(dbip);
if (!rtip || rt_gettree(rtip, "subject.r") ||
rt_gettree(rtip, "support.r")) {
failed = 1;
goto done;
}
rt_prep(rtip);
rt_init_resource(&resp, 0, rtip);
RT_APPLICATION_INIT(&ap);
ap.a_rt_i = rtip;
ap.a_resource = &resp;
ap.a_hit = scene_hit;
ap.a_miss = scene_miss;
ap.a_uptr = &result;
VSET(ap.a_ray.r_pt, 3, 0, 4);
VSET(ap.a_ray.r_dir, 1, 0, 0);
rt_shootray(&ap);
if (result.subject_hits != 1 ||
!NEAR_EQUAL(result.out_dist, 5.0, rtip->rti_tol.dist)) {
bu_log("%s scene: %d subject partitions, exit %.17g; expected one exit at 5\n",
subject_id == ID_ARS ? "ARS" : "BoT",
result.subject_hits, result.out_dist);
failed = 1;
}
done:
if (rtip)
rt_free_rti(rtip);
wdb_close(wdbp);
return failed;
}
int
main(int argc, char **argv)
{
fastf_t curve_data[3][RING_POINTS * ELEMENTS_PER_POINT] = {{0}};
fastf_t *curves[3] = {curve_data[0], curve_data[1], curve_data[2]};
fastf_t bot_vertices[(RING_SIDES + 2) * ELEMENTS_PER_POINT] = {0};
int bot_faces[RING_SIDES * 2 * 3];
struct rt_bot_internal bot = {0};
struct rt_ars_internal ars = {0};
struct rt_db_internal intern;
struct rt_db_internal bot_intern;
struct soltab st = {0};
struct soltab bot_st = {0};
struct rt_i *rtip;
struct resource *resp = &rt_uniresource;
struct application ap;
struct xray ray = {0};
vect_t invdir;
size_t i;
int failed = 0;
(void)argc;
bu_setprogname(argv[0]);
for (i = 0; i < RING_POINTS; i++) {
fastf_t angle = 2.0 * M_PI * (i % RING_SIDES) / RING_SIDES;
VSET(&curve_data[1][i * ELEMENTS_PER_POINT],
10.0 * cos(angle), 10.0 * sin(angle), 5.0);
if (i < RING_SIDES)
VMOVE(&bot_vertices[(i + 1) * ELEMENTS_PER_POINT],
&curve_data[1][i * ELEMENTS_PER_POINT]);
curve_data[2][i * ELEMENTS_PER_POINT + Z] = 10.0;
}
bot_vertices[(RING_SIDES + 1) * ELEMENTS_PER_POINT + Z] = 10.0;
for (i = 0; i < RING_SIDES; i++) {
int current = (int)i + 1;
int next = (int)((i + 1) % RING_SIDES) + 1;
int *bottom = &bot_faces[i * 6];
int *top = &bottom[3];
bottom[0] = 0;
bottom[1] = next;
bottom[2] = current;
top[0] = current;
top[1] = next;
top[2] = RING_SIDES + 1;
}
bot.magic = RT_BOT_INTERNAL_MAGIC;
bot.mode = RT_BOT_SOLID;
bot.orientation = RT_BOT_CCW;
bot.num_vertices = RING_SIDES + 2;
bot.vertices = bot_vertices;
bot.num_faces = RING_SIDES * 2;
bot.faces = bot_faces;
ars.magic = RT_ARS_INTERNAL_MAGIC;
ars.ncurves = 3;
ars.pts_per_curve = RING_POINTS;
ars.curves = curves;
RT_DB_INTERNAL_INIT(&intern);
intern.idb_major_type = DB5_MAJORTYPE_BRLCAD;
intern.idb_type = ID_ARS;
intern.idb_meth = &OBJ[ID_ARS];
intern.idb_ptr = &ars;
RT_DB_INTERNAL_INIT(&bot_intern);
bot_intern.idb_major_type = DB5_MAJORTYPE_BRLCAD;
bot_intern.idb_type = ID_BOT;
bot_intern.idb_meth = &OBJ[ID_BOT];
bot_intern.idb_ptr = &bot;
rtip = rt_dirbuild_inmem(NULL, 0, NULL, 0);
if (!rtip)
return 1;
rt_init_resource(resp, 0, rtip);
st.l.magic = RT_SOLTAB_MAGIC;
st.l2.magic = RT_SOLTAB2_MAGIC;
st.st_rtip = rtip;
st.st_meth = &OBJ[ID_ARS];
st.st_id = ID_ARS;
if (OBJ[ID_ARS].ft_prep(&st, &intern, rtip)) {
bu_log("ARS prep failed\n");
return 1;
}
bot_st.l.magic = RT_SOLTAB_MAGIC;
bot_st.l2.magic = RT_SOLTAB2_MAGIC;
bot_st.st_rtip = rtip;
bot_st.st_meth = &OBJ[ID_BOT];
bot_st.st_id = ID_BOT;
if (OBJ[ID_BOT].ft_prep(&bot_st, &bot_intern, rtip)) {
bu_log("BoT prep failed\n");
return 1;
}
RT_APPLICATION_INIT(&ap);
ap.a_rt_i = rtip;
ap.a_resource = resp;
ray.magic = RT_RAY_MAGIC;
VSET(ray.r_pt, 1, 0, 4);
VSET(ray.r_dir, 1, 0, 0);
ray.r_min = -0.05; /* the current spatial cell starts inside the mesh */
failed += check_shot(&OBJ[ID_ARS], &st, &ap, &ray, "ARS cell bound");
failed += check_shot(&OBJ[ID_BOT], &bot_st, &ap, &ray, "BoT cell bound");
VSET(invdir, 1, INFINITY, INFINITY);
if (!rt_in_rpp(&ray, invdir, st.st_min, st.st_max)) {
bu_log("ARS bounding box missed the test ray\n");
failed++;
} else {
failed += check_shot(&OBJ[ID_ARS], &st, &ap, &ray, "ARS solid bound");
}
ray.r_min = -0.05;
if (!rt_in_rpp(&ray, invdir, bot_st.st_min, bot_st.st_max)) {
bu_log("BoT bounding box missed the test ray\n");
failed++;
} else {
failed += check_shot(&OBJ[ID_BOT], &bot_st, &ap, &ray, "BoT solid bound");
}
OBJ[ID_ARS].ft_free(&st);
OBJ[ID_BOT].ft_free(&bot_st);
rt_free_rti(rtip);
if (argc != 1 && argc != 3) {
bu_log("Usage: %s [ars_scene.g bot_scene.g]\n", argv[0]);
return 1;
}
{
const fastf_t *scene_curves[3] = {curve_data[0], curve_data[1], curve_data[2]};
failed += check_scene(ID_ARS, scene_curves, bot_vertices, bot_faces,
argc == 3 ? argv[1] : NULL);
failed += check_scene(ID_BOT, scene_curves, bot_vertices, bot_faces,
argc == 3 ? argv[2] : NULL);
}
return failed ? 1 : 0;
}